@g4rcez/components 0.0.24 → 0.0.26
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/README.md +7 -7
- package/dist/components/core/button.d.ts.map +1 -1
- package/dist/components/core/button.js +1 -1
- package/dist/components/core/resizable.js +1 -1
- package/dist/components/core/tag.d.ts.map +1 -1
- package/dist/components/display/alert.d.ts.map +1 -1
- package/dist/components/display/alert.js +5 -5
- package/dist/components/display/tabs.d.ts +6 -1
- package/dist/components/display/tabs.d.ts.map +1 -1
- package/dist/components/display/tabs.js +9 -4
- package/dist/components/floating/dropdown.d.ts +1 -0
- package/dist/components/floating/dropdown.d.ts.map +1 -1
- package/dist/components/floating/dropdown.js +1 -1
- package/dist/components/floating/menu.d.ts +16 -0
- package/dist/components/floating/menu.d.ts.map +1 -0
- package/dist/components/floating/menu.js +115 -0
- package/dist/components/floating/modal.d.ts +1 -1
- package/dist/components/floating/modal.d.ts.map +1 -1
- package/dist/components/floating/modal.js +34 -10
- package/dist/components/form/autocomplete.d.ts +3 -2
- package/dist/components/form/autocomplete.d.ts.map +1 -1
- package/dist/components/form/autocomplete.js +47 -22
- package/dist/components/form/checkbox.d.ts.map +1 -1
- package/dist/components/form/checkbox.js +1 -1
- package/dist/components/form/date-picker.d.ts.map +1 -1
- package/dist/components/form/date-picker.js +5 -2
- package/dist/components/form/input-field.d.ts +8 -5
- package/dist/components/form/input-field.d.ts.map +1 -1
- package/dist/components/form/input-field.js +8 -4
- package/dist/components/form/input.d.ts +1 -1
- package/dist/components/form/input.d.ts.map +1 -1
- package/dist/components/form/input.js +3 -3
- package/dist/components/form/radiobox.d.ts.map +1 -1
- package/dist/components/form/select.d.ts +2 -0
- package/dist/components/form/select.d.ts.map +1 -1
- package/dist/components/form/select.js +5 -3
- 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/components/table/filter.d.ts +13 -44
- package/dist/components/table/filter.d.ts.map +1 -1
- package/dist/components/table/filter.js +41 -28
- package/dist/components/table/index.d.ts.map +1 -1
- package/dist/components/table/index.js +10 -9
- package/dist/components/table/pagination.d.ts.map +1 -1
- package/dist/components/table/pagination.js +10 -11
- package/dist/components/table/sort.d.ts.map +1 -1
- package/dist/components/table/sort.js +18 -12
- package/dist/components/table/table-lib.d.ts.map +1 -1
- package/dist/components/table/thead.d.ts +1 -0
- package/dist/components/table/thead.d.ts.map +1 -1
- package/dist/components/table/thead.js +10 -3
- package/dist/hooks/use-form.js +1 -1
- package/dist/hooks/use-media-query.d.ts +2 -0
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +25 -0
- package/dist/hooks/use-translate-context.d.ts +91 -0
- package/dist/hooks/use-translate-context.d.ts.map +1 -0
- package/dist/hooks/use-translate-context.js +49 -0
- package/dist/index.css +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8471 -7752
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +46 -41
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/dom.d.ts +1 -1
- package/dist/lib/dom.d.ts.map +1 -1
- package/dist/lib/dom.js +12 -4
- package/dist/lib/fns.d.ts +1 -0
- package/dist/lib/fns.d.ts.map +1 -1
- package/dist/lib/fns.js +2 -1
- package/dist/preset/preset.tailwind.js +1 -1
- package/dist/preset/src/styles/theme.d.ts.map +1 -1
- package/dist/preset/src/styles/theme.js +2 -4
- package/dist/preset/src/styles/theme.types.d.ts +0 -1
- package/dist/preset/src/styles/theme.types.d.ts.map +1 -1
- package/dist/styles/theme.d.ts.map +1 -1
- package/dist/styles/theme.js +2 -4
- package/dist/styles/theme.types.d.ts +0 -1
- package/dist/styles/theme.types.d.ts.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +190 -184
package/dist/index.umd.js
CHANGED
|
@@ -1,127 +1,132 @@
|
|
|
1
|
-
(function(te,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],w):(te=typeof globalThis<"u"?globalThis:te||self,w(te.components={},te.React,te["react/jsx-runtime"],te.ReactDOM))})(this,function(te,w,x,Rd){"use strict";var vL=Object.defineProperty;var bL=(te,w,x)=>w in te?vL(te,w,{enumerable:!0,configurable:!0,writable:!0,value:x}):te[w]=x;var re=(te,w,x)=>bL(te,typeof w!="symbol"?w+"":w,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 M=jd(w),Bd=jd(Rd);function zd(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=zd(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function x0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=zd(e))&&(r&&(r+=" "),r+=t);return r}const Wd=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Hd=x0,Js=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Hd(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const f=Wd(u)||Wd(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,y]=p;return Array.isArray(y)?y.includes({...s,...a}[m]):{...s,...a}[m]===y})?[...c,d,f]:c},[]);return Hd(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};function Ud(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=Ud(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function S0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ud(e))&&(r&&(r+=" "),r+=t);return r}var Gd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function T0(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 E0=Error,C0=EvalError,P0=RangeError,k0=ReferenceError,qd=SyntaxError,Go=TypeError,O0=URIError,_0=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==o||i.enumerable!==!0)return!1}return!0},Kd=typeof Symbol<"u"&&Symbol,A0=_0,I0=function(){return typeof Kd!="function"||typeof Symbol!="function"||typeof Kd("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:A0()},qa={__proto__:null,foo:{}},D0=Object,M0=function(){return{__proto__:qa}.foo===qa.foo&&!(qa instanceof D0)},N0="Function.prototype.bind called on incompatible ",F0=Object.prototype.toString,L0=Math.max,V0="[object Function]",Zd=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var s=0;s<n.length;s+=1)r[s+t.length]=n[s];return r},$0=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},R0=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},j0=function(t){var n=this;if(typeof n!="function"||F0.apply(n)!==V0)throw new TypeError(N0+n);for(var r=$0(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,Zd(r,arguments));return Object(u)===u?u:this}return n.apply(t,Zd(r,arguments))},i=L0(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+R0(a,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},B0=j0,Ka=Function.prototype.bind||B0,z0=Function.prototype.call,W0=Object.prototype.hasOwnProperty,H0=Ka,U0=H0.call(z0,W0),Se,G0=E0,Y0=C0,q0=P0,K0=k0,Br=qd,zr=Go,Z0=O0,Xd=Function,Za=function(e){try{return Xd('"use strict"; return ('+e+").constructor;")()}catch{}},pr=Object.getOwnPropertyDescriptor;if(pr)try{pr({},"")}catch{pr=null}var Xa=function(){throw new zr},X0=pr?function(){try{return arguments.callee,Xa}catch{try{return pr(arguments,"callee").get}catch{return Xa}}}():Xa,Wr=I0(),Q0=M0(),mt=Object.getPrototypeOf||(Q0?function(e){return e.__proto__}:null),Hr={},J0=typeof Uint8Array>"u"||!mt?Se:mt(Uint8Array),mr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Se:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Se:ArrayBuffer,"%ArrayIteratorPrototype%":Wr&&mt?mt([][Symbol.iterator]()):Se,"%AsyncFromSyncIteratorPrototype%":Se,"%AsyncFunction%":Hr,"%AsyncGenerator%":Hr,"%AsyncGeneratorFunction%":Hr,"%AsyncIteratorPrototype%":Hr,"%Atomics%":typeof Atomics>"u"?Se:Atomics,"%BigInt%":typeof BigInt>"u"?Se:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Se:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Se:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Se:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":G0,"%eval%":eval,"%EvalError%":Y0,"%Float32Array%":typeof Float32Array>"u"?Se:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Se:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Se:FinalizationRegistry,"%Function%":Xd,"%GeneratorFunction%":Hr,"%Int8Array%":typeof Int8Array>"u"?Se:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Se:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Se:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Wr&&mt?mt(mt([][Symbol.iterator]())):Se,"%JSON%":typeof JSON=="object"?JSON:Se,"%Map%":typeof Map>"u"?Se:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Wr||!mt?Se:mt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Se:Promise,"%Proxy%":typeof Proxy>"u"?Se:Proxy,"%RangeError%":q0,"%ReferenceError%":K0,"%Reflect%":typeof Reflect>"u"?Se:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Se:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Wr||!mt?Se:mt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Se:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Wr&&mt?mt(""[Symbol.iterator]()):Se,"%Symbol%":Wr?Symbol:Se,"%SyntaxError%":Br,"%ThrowTypeError%":X0,"%TypedArray%":J0,"%TypeError%":zr,"%Uint8Array%":typeof Uint8Array>"u"?Se:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Se:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Se:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Se:Uint32Array,"%URIError%":Z0,"%WeakMap%":typeof WeakMap>"u"?Se:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Se:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Se:WeakSet};if(mt)try{null.error}catch(e){var ew=mt(mt(e));mr["%Error.prototype%"]=ew}var tw=function e(t){var n;if(t==="%AsyncFunction%")n=Za("async function () {}");else if(t==="%GeneratorFunction%")n=Za("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Za("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&mt&&(n=mt(o.prototype))}return mr[t]=n,n},Qd={__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"]},Yo=Ka,ei=U0,nw=Yo.call(Function.call,Array.prototype.concat),rw=Yo.call(Function.apply,Array.prototype.splice),Jd=Yo.call(Function.call,String.prototype.replace),ti=Yo.call(Function.call,String.prototype.slice),ow=Yo.call(Function.call,RegExp.prototype.exec),sw=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,iw=/\\(\\)?/g,aw=function(t){var n=ti(t,0,1),r=ti(t,-1);if(n==="%"&&r!=="%")throw new Br("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Br("invalid intrinsic syntax, expected opening `%`");var o=[];return Jd(t,sw,function(s,i,a,l){o[o.length]=a?Jd(l,iw,"$1"):i||s}),o},lw=function(t,n){var r=t,o;if(ei(Qd,r)&&(o=Qd[r],r="%"+o[0]+"%"),ei(mr,r)){var s=mr[r];if(s===Hr&&(s=tw(r)),typeof s>"u"&&!n)throw new zr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new Br("intrinsic "+t+" does not exist!")},Ur=function(t,n){if(typeof t!="string"||t.length===0)throw new zr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new zr('"allowMissing" argument must be a boolean');if(ow(/^%?[^%]*%?$/,t)===null)throw new Br("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=aw(t),o=r.length>0?r[0]:"",s=lw("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],rw(r,nw([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=ti(f,0,1),p=ti(f,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new Br("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,i="%"+o+"%",ei(mr,i))a=mr[i];else if(a!=null){if(!(f in a)){if(!n)throw new zr("base intrinsic for "+t+" exists, but the property is not available.");return}if(pr&&u+1>=r.length){var m=pr(a,f);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else d=ei(a,f),a=a[f];d&&!l&&(mr[i]=a)}}return a},ef={exports:{}},Qa,tf;function Ja(){if(tf)return Qa;tf=1;var e=Ur,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Qa=t,Qa}var cw=Ur,ni=cw("%Object.getOwnPropertyDescriptor%",!0);if(ni)try{ni([],"length")}catch{ni=null}var nf=ni,rf=Ja(),uw=qd,Gr=Go,of=nf,dw=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Gr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Gr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Gr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Gr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Gr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Gr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!of&&of(t,n);if(rf)rf(t,n,{configurable:i===null&&l?l.configurable:!i,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:s===null&&l?l.writable:!s});else if(a||!o&&!s&&!i)t[n]=r;else throw new uw("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},el=Ja(),sf=function(){return!!el};sf.hasArrayLengthDefineBug=function(){if(!el)return null;try{return el([],"length",{value:1}).length!==1}catch{return!0}};var fw=sf,hw=Ur,af=dw,pw=fw(),lf=nf,cf=Go,mw=hw("%Math.floor%"),gw=function(t,n){if(typeof t!="function")throw new cf("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||mw(n)!==n)throw new cf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&lf){var i=lf(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(pw?af(t,"length",n,!0,!0):af(t,"length",n)),t};(function(e){var t=Ka,n=Ur,r=gw,o=Go,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=Ja(),c=n("%Math.max%");e.exports=function(f){if(typeof f!="function")throw new o("a function is required");var h=a(t,i,arguments);return r(h,1+c(0,f.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(ef);var yw=ef.exports,uf=Ur,df=yw,vw=df(uf("String.prototype.indexOf")),bw=function(t,n){var r=uf(t,!!n);return typeof r=="function"&&vw(t,".prototype.")>-1?df(r):r};const ww=T0(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var tl=typeof Map=="function"&&Map.prototype,nl=Object.getOwnPropertyDescriptor&&tl?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ri=tl&&nl&&typeof nl.get=="function"?nl.get:null,ff=tl&&Map.prototype.forEach,rl=typeof Set=="function"&&Set.prototype,ol=Object.getOwnPropertyDescriptor&&rl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,oi=rl&&ol&&typeof ol.get=="function"?ol.get:null,hf=rl&&Set.prototype.forEach,xw=typeof WeakMap=="function"&&WeakMap.prototype,qo=xw?WeakMap.prototype.has:null,Sw=typeof WeakSet=="function"&&WeakSet.prototype,Ko=Sw?WeakSet.prototype.has:null,Tw=typeof WeakRef=="function"&&WeakRef.prototype,pf=Tw?WeakRef.prototype.deref:null,Ew=Boolean.prototype.valueOf,Cw=Object.prototype.toString,Pw=Function.prototype.toString,kw=String.prototype.match,sl=String.prototype.slice,jn=String.prototype.replace,Ow=String.prototype.toUpperCase,mf=String.prototype.toLowerCase,gf=RegExp.prototype.test,yf=Array.prototype.concat,cn=Array.prototype.join,_w=Array.prototype.slice,vf=Math.floor,il=typeof BigInt=="function"?BigInt.prototype.valueOf:null,al=Object.getOwnPropertySymbols,ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Yr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Et=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Yr||!0)?Symbol.toStringTag:null,bf=Object.prototype.propertyIsEnumerable,wf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function xf(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||gf.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-vf(-e):vf(e);if(r!==e){var o=String(r),s=sl.call(t,o.length+1);return jn.call(o,n,"$&_")+"."+jn.call(jn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return jn.call(t,n,"$&_")}var cl=ww,Sf=cl.custom,Tf=Pf(Sf)?Sf:null,Aw=function e(t,n,r,o){var s=n||{};if(Bn(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Bn(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=Bn(s,"customInspect")?s.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Bn(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Bn(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Of(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?xf(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?xf(t,c):c}var u=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return ul(t)?"[Array]":"[Object]";var d=qw(s,r);if(typeof o>"u")o=[];else if(kf(o,t)>=0)return"[Circular]";function f(j,D,_){if(D&&(o=_w.call(o),o.push(D)),_){var F={depth:s.depth};return Bn(s,"quoteStyle")&&(F.quoteStyle=s.quoteStyle),e(j,F,r+1,o)}return e(j,s,r+1,o)}if(typeof t=="function"&&!Cf(t)){var h=Rw(t),p=si(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+cn.call(p,", ")+" }":"")}if(Pf(t)){var m=Yr?jn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):ll.call(t);return typeof t=="object"&&!Yr?Zo(m):m}if(Uw(t)){for(var y="<"+mf.call(String(t.nodeName)),v=t.attributes||[],b=0;b<v.length;b++)y+=" "+v[b].name+"="+Ef(Iw(v[b].value),"double",s);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+mf.call(String(t.nodeName))+">",y}if(ul(t)){if(t.length===0)return"[]";var g=si(t,f);return d&&!Yw(g)?"["+fl(g,d)+"]":"[ "+cn.call(g,", ")+" ]"}if(Mw(t)){var T=si(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!bf.call(t,"cause")?"{ ["+String(t)+"] "+cn.call(yf.call("[cause]: "+f(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+cn.call(T,", ")+" }"}if(typeof t=="object"&&i){if(Tf&&typeof t[Tf]=="function"&&cl)return cl(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(jw(t)){var S=[];return ff&&ff.call(t,function(j,D){S.push(f(D,t,!0)+" => "+f(j,t))}),_f("Map",ri.call(t),S,d)}if(Ww(t)){var E=[];return hf&&hf.call(t,function(j){E.push(f(j,t))}),_f("Set",oi.call(t),E,d)}if(Bw(t))return dl("WeakMap");if(Hw(t))return dl("WeakSet");if(zw(t))return dl("WeakRef");if(Fw(t))return Zo(f(Number(t)));if(Vw(t))return Zo(f(il.call(t)));if(Lw(t))return Zo(Ew.call(t));if(Nw(t))return Zo(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Gd<"u"&&t===Gd)return"{ [object globalThis] }";if(!Dw(t)&&!Cf(t)){var C=si(t,f),k=wf?wf(t)===Object.prototype:t instanceof Object||t.constructor===Object,I=t instanceof Object?"":"null prototype",N=!k&&Et&&Object(t)===t&&Et in t?sl.call(zn(t),8,-1):I?"Object":"",L=k||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",O=L+(N||I?"["+cn.call(yf.call([],N||[],I||[]),": ")+"] ":"");return C.length===0?O+"{}":d?O+"{"+fl(C,d)+"}":O+"{ "+cn.call(C,", ")+" }"}return String(t)};function Ef(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Iw(e){return jn.call(String(e),/"/g,""")}function ul(e){return zn(e)==="[object Array]"&&(!Et||!(typeof e=="object"&&Et in e))}function Dw(e){return zn(e)==="[object Date]"&&(!Et||!(typeof e=="object"&&Et in e))}function Cf(e){return zn(e)==="[object RegExp]"&&(!Et||!(typeof e=="object"&&Et in e))}function Mw(e){return zn(e)==="[object Error]"&&(!Et||!(typeof e=="object"&&Et in e))}function Nw(e){return zn(e)==="[object String]"&&(!Et||!(typeof e=="object"&&Et in e))}function Fw(e){return zn(e)==="[object Number]"&&(!Et||!(typeof e=="object"&&Et in e))}function Lw(e){return zn(e)==="[object Boolean]"&&(!Et||!(typeof e=="object"&&Et in e))}function Pf(e){if(Yr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!ll)return!1;try{return ll.call(e),!0}catch{}return!1}function Vw(e){if(!e||typeof e!="object"||!il)return!1;try{return il.call(e),!0}catch{}return!1}var $w=Object.prototype.hasOwnProperty||function(e){return e in this};function Bn(e,t){return $w.call(e,t)}function zn(e){return Cw.call(e)}function Rw(e){if(e.name)return e.name;var t=kw.call(Pw.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function kf(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 jw(e){if(!ri||!e||typeof e!="object")return!1;try{ri.call(e);try{oi.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Bw(e){if(!qo||!e||typeof e!="object")return!1;try{qo.call(e,qo);try{Ko.call(e,Ko)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function zw(e){if(!pf||!e||typeof e!="object")return!1;try{return pf.call(e),!0}catch{}return!1}function Ww(e){if(!oi||!e||typeof e!="object")return!1;try{oi.call(e);try{ri.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Hw(e){if(!Ko||!e||typeof e!="object")return!1;try{Ko.call(e,Ko);try{qo.call(e,qo)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Uw(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Of(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Of(sl.call(e,0,t.maxStringLength),t)+r}var o=jn.call(jn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Gw);return Ef(o,"single",t)}function Gw(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":"")+Ow.call(t.toString(16))}function Zo(e){return"Object("+e+")"}function dl(e){return e+" { ? }"}function _f(e,t,n,r){var o=r?fl(n,r):cn.call(n,", ");return e+" ("+t+") {"+o+"}"}function Yw(e){for(var t=0;t<e.length;t++)if(kf(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,x,Gd){"use strict";var HL=Object.defineProperty;var UL=(ee,b,x)=>b in ee?HL(ee,b,{enumerable:!0,configurable:!0,writable:!0,value:x}):ee[b]=x;var se=(ee,b,x)=>UL(ee,typeof b!="symbol"?b+"":b,x);function Yd(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 _=Yd(b),qd=Yd(Gd);function Kd(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=Kd(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function V0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Kd(e))&&(r&&(r+=" "),r+=t);return r}const Zd=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Xd=V0,si=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Xd(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const f=Zd(u)||Zd(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,y]=p;return Array.isArray(y)?y.includes({...s,...a}[m]):{...s,...a}[m]===y})?[...c,d,f]:c},[]);return Xd(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};function Qd(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=Qd(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function $0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Qd(e))&&(r&&(r+=" "),r+=t);return r}var Jd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ef(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function R0(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 j0=Error,B0=EvalError,z0=RangeError,W0=ReferenceError,tf=SyntaxError,Ko=TypeError,H0=URIError,U0=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==o||i.enumerable!==!0)return!1}return!0},nf=typeof Symbol<"u"&&Symbol,G0=U0,Y0=function(){return typeof nf!="function"||typeof Symbol!="function"||typeof nf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:G0()},Qa={__proto__:null,foo:{}},q0=Object,K0=function(){return{__proto__:Qa}.foo===Qa.foo&&!(Qa instanceof q0)},Z0="Function.prototype.bind called on incompatible ",X0=Object.prototype.toString,Q0=Math.max,J0="[object Function]",rf=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var s=0;s<n.length;s+=1)r[s+t.length]=n[s];return r},ew=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},tw=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},nw=function(t){var n=this;if(typeof n!="function"||X0.apply(n)!==J0)throw new TypeError(Z0+n);for(var r=ew(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,rf(r,arguments));return Object(u)===u?u:this}return n.apply(t,rf(r,arguments))},i=Q0(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+tw(a,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},rw=nw,Ja=Function.prototype.bind||rw,ow=Function.prototype.call,sw=Object.prototype.hasOwnProperty,iw=Ja,aw=iw.call(ow,sw),Te,lw=j0,cw=B0,uw=z0,dw=W0,Ur=tf,Gr=Ko,fw=H0,of=Function,el=function(e){try{return of('"use strict"; return ('+e+").constructor;")()}catch{}},vr=Object.getOwnPropertyDescriptor;if(vr)try{vr({},"")}catch{vr=null}var tl=function(){throw new Gr},hw=vr?function(){try{return arguments.callee,tl}catch{try{return vr(arguments,"callee").get}catch{return tl}}}():tl,Yr=Y0(),pw=K0(),yt=Object.getPrototypeOf||(pw?function(e){return e.__proto__}:null),qr={},mw=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%":Yr&&yt?yt([][Symbol.iterator]()):Te,"%AsyncFromSyncIteratorPrototype%":Te,"%AsyncFunction%":qr,"%AsyncGenerator%":qr,"%AsyncGeneratorFunction%":qr,"%AsyncIteratorPrototype%":qr,"%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%":lw,"%eval%":eval,"%EvalError%":cw,"%Float32Array%":typeof Float32Array>"u"?Te:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Te:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Te:FinalizationRegistry,"%Function%":of,"%GeneratorFunction%":qr,"%Int8Array%":typeof Int8Array>"u"?Te:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Te:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Te:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Yr&&yt?yt(yt([][Symbol.iterator]())):Te,"%JSON%":typeof JSON=="object"?JSON:Te,"%Map%":typeof Map>"u"?Te:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Yr||!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%":uw,"%ReferenceError%":dw,"%Reflect%":typeof Reflect>"u"?Te:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Te:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Yr||!yt?Te:yt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Te:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Yr&&yt?yt(""[Symbol.iterator]()):Te,"%Symbol%":Yr?Symbol:Te,"%SyntaxError%":Ur,"%ThrowTypeError%":hw,"%TypedArray%":mw,"%TypeError%":Gr,"%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%":fw,"%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 gw=yt(yt(e));br["%Error.prototype%"]=gw}var yw=function e(t){var n;if(t==="%AsyncFunction%")n=el("async function () {}");else if(t==="%GeneratorFunction%")n=el("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=el("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},sf={__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"]},Zo=Ja,ii=aw,vw=Zo.call(Function.call,Array.prototype.concat),bw=Zo.call(Function.apply,Array.prototype.splice),af=Zo.call(Function.call,String.prototype.replace),ai=Zo.call(Function.call,String.prototype.slice),ww=Zo.call(Function.call,RegExp.prototype.exec),xw=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Tw=/\\(\\)?/g,Sw=function(t){var n=ai(t,0,1),r=ai(t,-1);if(n==="%"&&r!=="%")throw new Ur("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Ur("invalid intrinsic syntax, expected opening `%`");var o=[];return af(t,xw,function(s,i,a,l){o[o.length]=a?af(l,Tw,"$1"):i||s}),o},Ew=function(t,n){var r=t,o;if(ii(sf,r)&&(o=sf[r],r="%"+o[0]+"%"),ii(br,r)){var s=br[r];if(s===qr&&(s=yw(r)),typeof s>"u"&&!n)throw new Gr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new Ur("intrinsic "+t+" does not exist!")},Kr=function(t,n){if(typeof t!="string"||t.length===0)throw new Gr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Gr('"allowMissing" argument must be a boolean');if(ww(/^%?[^%]*%?$/,t)===null)throw new Ur("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Sw(t),o=r.length>0?r[0]:"",s=Ew("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],bw(r,vw([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=ai(f,0,1),p=ai(f,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new Ur("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,i="%"+o+"%",ii(br,i))a=br[i];else if(a!=null){if(!(f in a)){if(!n)throw new Gr("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=ii(a,f),a=a[f];d&&!l&&(br[i]=a)}}return a},lf={exports:{}},nl,cf;function rl(){if(cf)return nl;cf=1;var e=Kr,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return nl=t,nl}var Cw=Kr,li=Cw("%Object.getOwnPropertyDescriptor%",!0);if(li)try{li([],"length")}catch{li=null}var uf=li,df=rl(),Pw=tf,Zr=Ko,ff=uf,kw=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Zr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Zr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Zr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Zr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Zr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Zr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!ff&&ff(t,n);if(df)df(t,n,{configurable:i===null&&l?l.configurable:!i,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:s===null&&l?l.writable:!s});else if(a||!o&&!s&&!i)t[n]=r;else throw new Pw("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ol=rl(),hf=function(){return!!ol};hf.hasArrayLengthDefineBug=function(){if(!ol)return null;try{return ol([],"length",{value:1}).length!==1}catch{return!0}};var Ow=hf,Iw=Kr,pf=kw,_w=Ow(),mf=uf,gf=Ko,Aw=Iw("%Math.floor%"),Dw=function(t,n){if(typeof t!="function")throw new gf("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Aw(n)!==n)throw new gf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&mf){var i=mf(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(_w?pf(t,"length",n,!0,!0):pf(t,"length",n)),t};(function(e){var t=Ja,n=Kr,r=Dw,o=Ko,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=rl(),c=n("%Math.max%");e.exports=function(f){if(typeof f!="function")throw new o("a function is required");var h=a(t,i,arguments);return r(h,1+c(0,f.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(lf);var Mw=lf.exports,yf=Kr,vf=Mw,Nw=vf(yf("String.prototype.indexOf")),Fw=function(t,n){var r=yf(t,!!n);return typeof r=="function"&&Nw(t,".prototype.")>-1?vf(r):r};const Lw=R0(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var sl=typeof Map=="function"&&Map.prototype,il=Object.getOwnPropertyDescriptor&&sl?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ci=sl&&il&&typeof il.get=="function"?il.get:null,bf=sl&&Map.prototype.forEach,al=typeof Set=="function"&&Set.prototype,ll=Object.getOwnPropertyDescriptor&&al?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ui=al&&ll&&typeof ll.get=="function"?ll.get:null,wf=al&&Set.prototype.forEach,Vw=typeof WeakMap=="function"&&WeakMap.prototype,Xo=Vw?WeakMap.prototype.has:null,$w=typeof WeakSet=="function"&&WeakSet.prototype,Qo=$w?WeakSet.prototype.has:null,Rw=typeof WeakRef=="function"&&WeakRef.prototype,xf=Rw?WeakRef.prototype.deref:null,jw=Boolean.prototype.valueOf,Bw=Object.prototype.toString,zw=Function.prototype.toString,Ww=String.prototype.match,cl=String.prototype.slice,zn=String.prototype.replace,Hw=String.prototype.toUpperCase,Tf=String.prototype.toLowerCase,Sf=RegExp.prototype.test,Ef=Array.prototype.concat,cn=Array.prototype.join,Uw=Array.prototype.slice,Cf=Math.floor,ul=typeof BigInt=="function"?BigInt.prototype.valueOf:null,dl=Object.getOwnPropertySymbols,fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Xr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ot=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Xr||!0)?Symbol.toStringTag:null,Pf=Object.prototype.propertyIsEnumerable,kf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Of(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Sf.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Cf(-e):Cf(e);if(r!==e){var o=String(r),s=cl.call(t,o.length+1);return zn.call(o,n,"$&_")+"."+zn.call(zn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return zn.call(t,n,"$&_")}var hl=Lw,If=hl.custom,_f=Mf(If)?If:null,Gw=function e(t,n,r,o){var s=n||{};if(Wn(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Wn(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=Wn(s,"customInspect")?s.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Wn(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Wn(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Ff(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Of(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Of(t,c):c}var u=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return pl(t)?"[Array]":"[Object]";var d=ux(s,r);if(typeof o>"u")o=[];else if(Nf(o,t)>=0)return"[Circular]";function f(R,C,O){if(C&&(o=Uw.call(o),o.push(C)),O){var M={depth:s.depth};return Wn(s,"quoteStyle")&&(M.quoteStyle=s.quoteStyle),e(R,M,r+1,o)}return e(R,s,r+1,o)}if(typeof t=="function"&&!Df(t)){var h=tx(t),p=di(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+cn.call(p,", ")+" }":"")}if(Mf(t)){var m=Xr?zn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):fl.call(t);return typeof t=="object"&&!Xr?Jo(m):m}if(ax(t)){for(var y="<"+Tf.call(String(t.nodeName)),v=t.attributes||[],w=0;w<v.length;w++)y+=" "+v[w].name+"="+Af(Yw(v[w].value),"double",s);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+Tf.call(String(t.nodeName))+">",y}if(pl(t)){if(t.length===0)return"[]";var g=di(t,f);return d&&!cx(g)?"["+gl(g,d)+"]":"[ "+cn.call(g,", ")+" ]"}if(Kw(t)){var S=di(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!Pf.call(t,"cause")?"{ ["+String(t)+"] "+cn.call(Ef.call("[cause]: "+f(t.cause),S),", ")+" }":S.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+cn.call(S,", ")+" }"}if(typeof t=="object"&&i){if(_f&&typeof t[_f]=="function"&&hl)return hl(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(nx(t)){var T=[];return bf&&bf.call(t,function(R,C){T.push(f(C,t,!0)+" => "+f(R,t))}),Lf("Map",ci.call(t),T,d)}if(sx(t)){var E=[];return wf&&wf.call(t,function(R){E.push(f(R,t))}),Lf("Set",ui.call(t),E,d)}if(rx(t))return ml("WeakMap");if(ix(t))return ml("WeakSet");if(ox(t))return ml("WeakRef");if(Xw(t))return Jo(f(Number(t)));if(Jw(t))return Jo(f(ul.call(t)));if(Qw(t))return Jo(jw.call(t));if(Zw(t))return Jo(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Jd<"u"&&t===Jd)return"{ [object globalThis] }";if(!qw(t)&&!Df(t)){var k=di(t,f),A=kf?kf(t)===Object.prototype:t instanceof Object||t.constructor===Object,D=t instanceof Object?"":"null prototype",I=!A&&Ot&&Object(t)===t&&Ot in t?cl.call(Hn(t),8,-1):D?"Object":"",V=A||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",F=V+(I||D?"["+cn.call(Ef.call([],I||[],D||[]),": ")+"] ":"");return k.length===0?F+"{}":d?F+"{"+gl(k,d)+"}":F+"{ "+cn.call(k,", ")+" }"}return String(t)};function Af(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Yw(e){return zn.call(String(e),/"/g,""")}function pl(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 Df(e){return Hn(e)==="[object RegExp]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Kw(e){return Hn(e)==="[object Error]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Zw(e){return Hn(e)==="[object String]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Xw(e){return Hn(e)==="[object Number]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Qw(e){return Hn(e)==="[object Boolean]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Mf(e){if(Xr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!fl)return!1;try{return fl.call(e),!0}catch{}return!1}function Jw(e){if(!e||typeof e!="object"||!ul)return!1;try{return ul.call(e),!0}catch{}return!1}var ex=Object.prototype.hasOwnProperty||function(e){return e in this};function Wn(e,t){return ex.call(e,t)}function Hn(e){return Bw.call(e)}function tx(e){if(e.name)return e.name;var t=Ww.call(zw.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Nf(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 nx(e){if(!ci||!e||typeof e!="object")return!1;try{ci.call(e);try{ui.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function rx(e){if(!Xo||!e||typeof e!="object")return!1;try{Xo.call(e,Xo);try{Qo.call(e,Qo)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function ox(e){if(!xf||!e||typeof e!="object")return!1;try{return xf.call(e),!0}catch{}return!1}function sx(e){if(!ui||!e||typeof e!="object")return!1;try{ui.call(e);try{ci.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function ix(e){if(!Qo||!e||typeof e!="object")return!1;try{Qo.call(e,Qo);try{Xo.call(e,Xo)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function ax(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Ff(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Ff(cl.call(e,0,t.maxStringLength),t)+r}var o=zn.call(zn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lx);return Af(o,"single",t)}function lx(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":"")+Hw.call(t.toString(16))}function Jo(e){return"Object("+e+")"}function ml(e){return e+" { ? }"}function Lf(e,t,n,r){var o=r?gl(n,r):cn.call(n,", ");return e+" ("+t+") {"+o+"}"}function cx(e){for(var t=0;t<e.length;t++)if(Nf(e[t],`
|
|
2
|
+
`)>=0)return!1;return!0}function ux(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=cn.call(Array(e.indent+1)," ");else return null;return{base:n,prev:cn.call(Array(t+1),n)}}function gl(e,t){if(e.length===0)return"";var n=`
|
|
3
3
|
`+t.prev+t.base;return n+cn.call(e,","+n)+`
|
|
4
|
-
`+t.prev}function si(e,t){var n=ul(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Bn(e,o)?t(e[o],e):""}var s=typeof al=="function"?al(e):[],i;if(Yr){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)Bn(e,l)&&(n&&String(Number(l))===l&&l<e.length||Yr&&i["$"+l]instanceof Symbol||(gf.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof al=="function")for(var c=0;c<s.length;c++)bf.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var Af=Ur,qr=bw,Kw=Aw,Zw=Go,ii=Af("%WeakMap%",!0),ai=Af("%Map%",!0),Xw=qr("WeakMap.prototype.get",!0),Qw=qr("WeakMap.prototype.set",!0),Jw=qr("WeakMap.prototype.has",!0),ex=qr("Map.prototype.get",!0),tx=qr("Map.prototype.set",!0),nx=qr("Map.prototype.has",!0),hl=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},rx=function(e,t){var n=hl(e,t);return n&&n.value},ox=function(e,t,n){var r=hl(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},sx=function(e,t){return!!hl(e,t)},ix=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new Zw("Side channel does not contain "+Kw(s))},get:function(s){if(ii&&s&&(typeof s=="object"||typeof s=="function")){if(t)return Xw(t,s)}else if(ai){if(n)return ex(n,s)}else if(r)return rx(r,s)},has:function(s){if(ii&&s&&(typeof s=="object"||typeof s=="function")){if(t)return Jw(t,s)}else if(ai){if(n)return nx(n,s)}else if(r)return sx(r,s);return!1},set:function(s,i){ii&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new ii),Qw(t,s,i)):ai?(n||(n=new ai),tx(n,s,i)):(r||(r={key:{},next:null}),ox(r,s,i))}};return o},ax=String.prototype.replace,lx=/%20/g,pl={RFC1738:"RFC1738",RFC3986:"RFC3986"},If={default:pl.RFC3986,formatters:{RFC1738:function(e){return ax.call(e,lx,"+")},RFC3986:function(e){return String(e)}},RFC1738:pl.RFC1738,RFC3986:pl.RFC3986},cx=If,ml=Object.prototype.hasOwnProperty,gr=Array.isArray,un=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),ux=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(gr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Df=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},dx=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(gr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!ml.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 gr(t)&&!gr(n)&&(o=Df(t,r)),gr(t)&&gr(n)?(n.forEach(function(s,i){if(ml.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return ml.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},fx=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},hx=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}},px=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;++l){var c=i.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||s===cx.RFC1738&&(c===40||c===41)){a+=i.charAt(l);continue}if(c<128){a=a+un[c];continue}if(c<2048){a=a+(un[192|c>>6]+un[128|c&63]);continue}if(c<55296||c>=57344){a=a+(un[224|c>>12]+un[128|c>>6&63]+un[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|i.charCodeAt(l)&1023),a+=un[240|c>>18]+un[128|c>>12&63]+un[128|c>>6&63]+un[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 s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return ux(n),t},gx=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},yx=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},vx=function(t,n){return[].concat(t,n)},bx=function(t,n){if(gr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Mf={arrayToObject:Df,assign:fx,combine:vx,compact:mx,decode:hx,encode:px,isBuffer:yx,isRegExp:gx,maybeMap:bx,merge:dx},wx=Mf,Nf=If,xx=Date.prototype.toISOString,Ff=Nf.default;wx.encode,Nf.formatters[Ff];var Sx=Mf;Sx.decode;var Lf=e=>Array.isArray(e),gl=e=>e===void 0,yl=e=>e===null,Tx=Function.bind.call(Function.call,Object.prototype.toString),Ex=e=>!!e&&Tx(e)==="[object Error]"||e instanceof Error,Vf=(e,t)=>e instanceof t,Cx=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Px=e=>Object.prototype.toString.call(e)==="[object Date]"&&Vf(e,Date),Pn={array:Lf,date:Px,empty:e=>yl(e)||gl(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:Vf,isError:Ex,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>yl(e)||gl(e),null:yl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Lf(e)&&typeof e=="object",primitive:Cx,string:e=>typeof e=="string",undefined:gl},vl=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const s=`${+o[0]}`===o[0];e[r]=s?[]:{}}if(typeof e[r]!="object"){const s=`${+o[0]}`===o[0];e[r]=vl(s?[]:{},o,n)}else e[r]=vl(e[r],o,n)}else e[r]=n;return e},kx=e=>Object.keys(e),Ox=e=>e.replace("[",".").replace("]","").split("."),$f=(e,t,n)=>{const r=Array.isArray(t)?t:Ox(t),o=structuredClone(e);return vl(o,r,n),o};const bl="-";function _x(e){const t=Ix(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(bl);return a[0]===""&&a.length!==1&&a.shift(),Rf(a,t)||Ax(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Rf(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Rf(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(bl);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const jf=/^\[(.+)\]$/;function Ax(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 Ix(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Mx(Object.entries(e.classGroups),n).forEach(([s,i])=>{wl(i,r,s,t)}),r}function wl(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Bf(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Dx(o)){wl(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{wl(i,Bf(t,s),n,r)})})}function Bf(e,t){let n=e;return t.split(bl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Dx(e){return e.isThemeGetter}function Mx(e,t){return t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e}function Nx(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(s,i){n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}}const zf="!";function Fx(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let c=0,u=0,d;for(let y=0;y<a.length;y++){let v=a[y];if(c===0){if(v===o&&(r||a.slice(y,y+s)===t)){l.push(a.slice(u,y)),u=y+s;continue}if(v==="/"){d=y;continue}}v==="["?c++:v==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(zf),p=h?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function Lx(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 Vx(e){return{cache:Nx(e.cacheSize),parseClassName:Fx(e),..._x(e)}}const $x=/\s+/;function Rx(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split($x).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let d=!!u,f=r(d?c.substring(0,u):c);if(!f){if(!d)return{isTailwindClass:!1,originalClassName:i};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:i};d=!1}const h=Lx(a).join(":");return{isTailwindClass:!0,modifierId:l?h+zf:h,classGroupId:f,originalClassName:i,hasPostfixModifier:d}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,u=a+l;return s.has(u)?!1:(s.add(u),o(l,c).forEach(d=>s.add(a+d)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function jx(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Wf(t))&&(r&&(r+=" "),r+=n);return r}function Wf(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Wf(e[r]))&&(n&&(n+=" "),n+=t);return n}function Bx(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=Vx(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=Rx(l,n);return o(l,u),u}return function(){return s(jx.apply(null,arguments))}}function Ue(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Hf=/^\[(?:([a-z-]+):)?(.+)\]$/i,zx=/^\d+\/\d+$/,Wx=new Set(["px","full","screen"]),Hx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ux=/\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$/,Gx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Yx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function kn(e){return yr(e)||Wx.has(e)||zx.test(e)}function Wn(e){return Kr(e,"length",n1)}function yr(e){return!!e&&!Number.isNaN(Number(e))}function li(e){return Kr(e,"number",yr)}function Xo(e){return!!e&&Number.isInteger(Number(e))}function Kx(e){return e.endsWith("%")&&yr(e.slice(0,-1))}function ve(e){return Hf.test(e)}function Hn(e){return Hx.test(e)}const Zx=new Set(["length","size","percentage"]);function Xx(e){return Kr(e,Zx,Uf)}function Qx(e){return Kr(e,"position",Uf)}const Jx=new Set(["image","url"]);function e1(e){return Kr(e,Jx,o1)}function t1(e){return Kr(e,"",r1)}function Qo(){return!0}function Kr(e,t,n){const r=Hf.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function n1(e){return Ux.test(e)&&!Gx.test(e)}function Uf(){return!1}function r1(e){return Yx.test(e)}function o1(e){return qx.test(e)}function s1(){const e=Ue("colors"),t=Ue("spacing"),n=Ue("blur"),r=Ue("brightness"),o=Ue("borderColor"),s=Ue("borderRadius"),i=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"),y=Ue("margin"),v=Ue("opacity"),b=Ue("padding"),g=Ue("saturate"),T=Ue("scale"),S=Ue("sepia"),E=Ue("skew"),C=Ue("space"),k=Ue("translate"),I=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",ve,t],O=()=>[ve,t],j=()=>["",kn,Wn],D=()=>["auto",yr,ve],_=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",ve],P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[yr,li],Q=()=>[yr,ve];return{cacheSize:500,separator:":",theme:{colors:[Qo],spacing:[kn,Wn],blur:["none","",Hn,ve],brightness:V(),borderColor:[e],borderRadius:["none","","full",Hn,ve],borderSpacing:O(),borderWidth:j(),contrast:V(),grayscale:q(),hueRotate:Q(),invert:q(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[Kx,Wn],inset:L(),margin:L(),opacity:V(),padding:O(),saturate:V(),scale:V(),sepia:q(),skew:Q(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[Hn]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"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:[..._(),ve]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],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",Xo,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:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",Xo,ve]}],"grid-cols":[{"grid-cols":[Qo]}],"col-start-end":[{col:["auto",{span:["full",Xo,ve]},ve]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[Qo]}],"row-start-end":[{row:["auto",{span:[Xo,ve]},ve]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"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:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"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:[Hn]},Hn]}],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",Hn,Wn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",li]}],"font-family":[{font:[Qo]}],"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",yr,li]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",kn,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:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",kn,Wn]}],"underline-offset":[{"underline-offset":["auto",kn,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:O()}],"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:[..._(),Qx]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Xx]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},e1]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[kn,ve]}],"outline-w":[{outline:[kn,Wn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[kn,Wn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Hn,t1]}],"shadow-color":[{shadow:[Qo]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Hn,ve]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[g]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[Xo,ve]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"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":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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:[kn,Wn,li]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const i1=Bx(s1),xl=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},a1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),l1=e=>Pn.function(e),Ct=(...e)=>i1(S0(e)),Sl=(e,t)=>{var r;const n=(r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:r.set;n==null||n.call(e,t),e.dispatchEvent(new Event("input",{bubbles:!0}))},Zr=w.forwardRef(function({as:t,...n},r){const o=t||"span";return x.jsx(o,{...n,ref:r})}),c1=Js("inline-flex duration-700 enabled:hover:bg-opacity-70 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",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-10 p-2 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-md",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",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"}}),Jo=w.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:s="button",size:i,rounded:a,...l},c){const u=r||l.disabled;return x.jsxs(Zr,{...l,ref:c,type:s,"data-theme":o,"data-loading":r,disabled:u,as:l.as??"button",onClick:u?void 0:l.onClick,className:Ct(c1({size:i,rounded:a,theme:o}),t),children:[l.children,n]})}),u1=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:Ct("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}`))}),d1=Js("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"}}),f1=w.forwardRef(function({className:t,icon:n,loading:r,theme:o,size:s,...i},a){return x.jsxs(Zr,{...i,ref:a,"data-theme":o,as:i.as??"span",className:Ct(d1({size:s,theme:o}),t),children:[i.children,n]})});/**
|
|
4
|
+
`+t.prev}function di(e,t){var n=pl(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 s=typeof dl=="function"?dl(e):[],i;if(Xr){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)Wn(e,l)&&(n&&String(Number(l))===l&&l<e.length||Xr&&i["$"+l]instanceof Symbol||(Sf.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof dl=="function")for(var c=0;c<s.length;c++)Pf.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var Vf=Kr,Qr=Fw,dx=Gw,fx=Ko,fi=Vf("%WeakMap%",!0),hi=Vf("%Map%",!0),hx=Qr("WeakMap.prototype.get",!0),px=Qr("WeakMap.prototype.set",!0),mx=Qr("WeakMap.prototype.has",!0),gx=Qr("Map.prototype.get",!0),yx=Qr("Map.prototype.set",!0),vx=Qr("Map.prototype.has",!0),yl=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},bx=function(e,t){var n=yl(e,t);return n&&n.value},wx=function(e,t,n){var r=yl(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},xx=function(e,t){return!!yl(e,t)},Tx=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new fx("Side channel does not contain "+dx(s))},get:function(s){if(fi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return hx(t,s)}else if(hi){if(n)return gx(n,s)}else if(r)return bx(r,s)},has:function(s){if(fi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return mx(t,s)}else if(hi){if(n)return vx(n,s)}else if(r)return xx(r,s);return!1},set:function(s,i){fi&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new fi),px(t,s,i)):hi?(n||(n=new hi),yx(n,s,i)):(r||(r={key:{},next:null}),wx(r,s,i))}};return o},Sx=String.prototype.replace,Ex=/%20/g,vl={RFC1738:"RFC1738",RFC3986:"RFC3986"},$f={default:vl.RFC3986,formatters:{RFC1738:function(e){return Sx.call(e,Ex,"+")},RFC3986:function(e){return String(e)}},RFC1738:vl.RFC1738,RFC3986:vl.RFC3986},Cx=$f,bl=Object.prototype.hasOwnProperty,wr=Array.isArray,un=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Px=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(wr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Rf=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},kx=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)||!bl.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=Rf(t,r)),wr(t)&&wr(n)?(n.forEach(function(s,i){if(bl.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return bl.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},Ox=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},Ix=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}},_x=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;++l){var c=i.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||s===Cx.RFC1738&&(c===40||c===41)){a+=i.charAt(l);continue}if(c<128){a=a+un[c];continue}if(c<2048){a=a+(un[192|c>>6]+un[128|c&63]);continue}if(c<55296||c>=57344){a=a+(un[224|c>>12]+un[128|c>>6&63]+un[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|i.charCodeAt(l)&1023),a+=un[240|c>>18]+un[128|c>>12&63]+un[128|c>>6&63]+un[128|c&63]}return a},Ax=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return Px(n),t},Dx=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Mx=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Nx=function(t,n){return[].concat(t,n)},Fx=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)},jf={arrayToObject:Rf,assign:Ox,combine:Nx,compact:Ax,decode:Ix,encode:_x,isBuffer:Mx,isRegExp:Dx,maybeMap:Fx,merge:kx},Lx=jf,Bf=$f,Vx=Date.prototype.toISOString,zf=Bf.default;Lx.encode,Bf.formatters[zf];var $x=jf;$x.decode;var Rx=(e,t,n)=>Math.min(e,t)===e?t:Math.max(e,n)===e?n:e,Wf=e=>Array.isArray(e),wl=e=>e===void 0,xl=e=>e===null,jx=Function.bind.call(Function.call,Object.prototype.toString),Bx=e=>!!e&&jx(e)==="[object Error]"||e instanceof Error,Hf=(e,t)=>e instanceof t,zx=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Wx=e=>Object.prototype.toString.call(e)==="[object Date]"&&Hf(e,Date),Pn={array:Wf,date:Wx,empty:e=>xl(e)||wl(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:Hf,isError:Bx,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>xl(e)||wl(e),null:xl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Wf(e)&&typeof e=="object",primitive:zx,string:e=>typeof e=="string",undefined:wl},Tl=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const s=`${+o[0]}`===o[0];e[r]=s?[]:{}}if(typeof e[r]!="object"){const s=`${+o[0]}`===o[0];e[r]=Tl(s?[]:{},o,n)}else e[r]=Tl(e[r],o,n)}else e[r]=n;return e},Hx=e=>Object.keys(e),Ux=e=>e.replace("[",".").replace("]","").split("."),Uf=(e,t,n)=>{const r=Array.isArray(t)?t:Ux(t),o=structuredClone(e);return Tl(o,r,n),o};const Sl="-";function Gx(e){const t=qx(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(Sl);return a[0]===""&&a.length!==1&&a.shift(),Gf(a,t)||Yx(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Gf(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Gf(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Sl);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Yf=/^\[(.+)\]$/;function Yx(e){if(Yf.test(e)){const t=Yf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function qx(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Zx(Object.entries(e.classGroups),n).forEach(([s,i])=>{El(i,r,s,t)}),r}function El(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:qf(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Kx(o)){El(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{El(i,qf(t,s),n,r)})})}function qf(e,t){let n=e;return t.split(Sl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Kx(e){return e.isThemeGetter}function Zx(e,t){return t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e}function Xx(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(s,i){n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}}const Kf="!";function Qx(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let c=0,u=0,d;for(let y=0;y<a.length;y++){let v=a[y];if(c===0){if(v===o&&(r||a.slice(y,y+s)===t)){l.push(a.slice(u,y)),u=y+s;continue}if(v==="/"){d=y;continue}}v==="["?c++:v==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(Kf),p=h?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function Jx(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 e1(e){return{cache:Xx(e.cacheSize),parseClassName:Qx(e),...Gx(e)}}const t1=/\s+/;function n1(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(t1).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let d=!!u,f=r(d?c.substring(0,u):c);if(!f){if(!d)return{isTailwindClass:!1,originalClassName:i};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:i};d=!1}const h=Jx(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Kf:h,classGroupId:f,originalClassName:i,hasPostfixModifier:d}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,u=a+l;return s.has(u)?!1:(s.add(u),o(l,c).forEach(d=>s.add(a+d)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function r1(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Zf(t))&&(r&&(r+=" "),r+=n);return r}function Zf(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Zf(e[r]))&&(n&&(n+=" "),n+=t);return n}function o1(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=e1(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=n1(l,n);return o(l,u),u}return function(){return s(r1.apply(null,arguments))}}function Ue(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Xf=/^\[(?:([a-z-]+):)?(.+)\]$/i,s1=/^\d+\/\d+$/,i1=new Set(["px","full","screen"]),a1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,l1=/\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$/,c1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,u1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,d1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function kn(e){return xr(e)||i1.has(e)||s1.test(e)}function Un(e){return Jr(e,"length",b1)}function xr(e){return!!e&&!Number.isNaN(Number(e))}function pi(e){return Jr(e,"number",xr)}function es(e){return!!e&&Number.isInteger(Number(e))}function f1(e){return e.endsWith("%")&&xr(e.slice(0,-1))}function ve(e){return Xf.test(e)}function Gn(e){return a1.test(e)}const h1=new Set(["length","size","percentage"]);function p1(e){return Jr(e,h1,Qf)}function m1(e){return Jr(e,"position",Qf)}const g1=new Set(["image","url"]);function y1(e){return Jr(e,g1,x1)}function v1(e){return Jr(e,"",w1)}function ts(){return!0}function Jr(e,t,n){const r=Xf.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function b1(e){return l1.test(e)&&!c1.test(e)}function Qf(){return!1}function w1(e){return u1.test(e)}function x1(e){return d1.test(e)}function T1(){const e=Ue("colors"),t=Ue("spacing"),n=Ue("blur"),r=Ue("brightness"),o=Ue("borderColor"),s=Ue("borderRadius"),i=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"),y=Ue("margin"),v=Ue("opacity"),w=Ue("padding"),g=Ue("saturate"),S=Ue("scale"),T=Ue("sepia"),E=Ue("skew"),k=Ue("space"),A=Ue("translate"),D=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",ve,t],F=()=>[ve,t],R=()=>["",kn,Un],C=()=>["auto",xr,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"],G=()=>["","0",ve],P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[xr,pi],Z=()=>[xr,ve];return{cacheSize:500,separator:":",theme:{colors:[ts],spacing:[kn,Un],blur:["none","",Gn,ve],brightness:j(),borderColor:[e],borderRadius:["none","","full",Gn,ve],borderSpacing:F(),borderWidth:R(),contrast:j(),grayscale:G(),hueRotate:Z(),invert:G(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[f1,Un],inset:V(),margin:V(),opacity:j(),padding:F(),saturate:j(),scale:j(),sepia:G(),skew:Z(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[Gn]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"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:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],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",es,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:G()}],shrink:[{shrink:G()}],order:[{order:["first","last","none",es,ve]}],"grid-cols":[{"grid-cols":[ts]}],"col-start-end":[{col:["auto",{span:["full",es,ve]},ve]}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":[ts]}],"row-start-end":[{row:["auto",{span:[es,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:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"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",pi]}],"font-family":[{font:[ts]}],"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,pi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",kn,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",kn,Un]}],"underline-offset":[{"underline-offset":["auto",kn,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(),m1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",p1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},y1]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...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":[kn,ve]}],"outline-w":[{outline:[kn,Un]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[kn,Un]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Gn,v1]}],"shadow-color":[{shadow:[ts]}],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:[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":[v]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",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:[es,ve]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",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:[kn,Un,pi]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const S1=o1(T1),Cl=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},E1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),C1=e=>Pn.function(e),pt=(...e)=>S1($0(e)),Pl=(e,t)=>{var r;if(!e)return;if([window.HTMLInputElement,window.HTMLSelectElement,window.HTMLTextAreaElement].indexOf(e.__proto__.constructor)>-1){const o=(r=Object.getOwnPropertyDescriptor(e.__proto__,"value"))==null?void 0:r.set,s=new Event("input",{bubbles:!0});return o==null||o.call(e,t),e.dispatchEvent(s),s}},eo=b.forwardRef(function({as:t,...n},r){const o=t||"span";return x.jsx(o,{...n,ref:r})}),P1=si("inline-flex duration-700 enabled:hover:bg-opacity-70 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",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-10 p-2 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-md",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",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"}}),ns=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:s="button",size:i,rounded:a,...l},c){const u=r||l.disabled;return x.jsxs(eo,{...l,ref:c,type:s,"data-theme":o,"data-loading":r,disabled:u,"aria-busy":u||r,as:l.as??"button",onClick:u?void 0:l.onClick,className:pt(P1({size:i,rounded:a,theme:o}),t),children:[l.children,n]})}),k1=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:pt("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}`))}),O1=si("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"}}),I1=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,size:s,...i},a){return x.jsxs(eo,{...i,ref:a,"data-theme":o,as:i.as??"span",className:pt(O1({size:s,theme:o}),t),children:[i.children,n]})});/**
|
|
5
5
|
* @license lucide-react v0.414.0 - ISC
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the ISC license.
|
|
8
8
|
* See the LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/const
|
|
9
|
+
*/const _1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Jf=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
|
|
10
10
|
* @license lucide-react v0.414.0 - ISC
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the ISC license.
|
|
13
13
|
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/var
|
|
14
|
+
*/var A1={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"};/**
|
|
15
15
|
* @license lucide-react v0.414.0 - ISC
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the ISC license.
|
|
18
18
|
* See the LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/const
|
|
19
|
+
*/const D1=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>b.createElement("svg",{ref:l,...A1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Jf("lucide",o),...a},[...i.map(([c,u])=>b.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
|
|
20
20
|
* @license lucide-react v0.414.0 - ISC
|
|
21
21
|
*
|
|
22
22
|
* This source code is licensed under the ISC license.
|
|
23
23
|
* See the LICENSE file in the root directory of this source tree.
|
|
24
|
-
*/const
|
|
24
|
+
*/const st=(e,t)=>{const n=b.forwardRef(({className:r,...o},s)=>b.createElement(D1,{ref:s,iconNode:t,className:Jf(`lucide-${_1(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
25
25
|
* @license lucide-react v0.414.0 - ISC
|
|
26
26
|
*
|
|
27
27
|
* This source code is licensed under the ISC license.
|
|
28
28
|
* See the LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/const
|
|
29
|
+
*/const M1=st("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"}]]);/**
|
|
30
30
|
* @license lucide-react v0.414.0 - ISC
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the ISC license.
|
|
33
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/const
|
|
34
|
+
*/const N1=st("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"}]]);/**
|
|
35
35
|
* @license lucide-react v0.414.0 - ISC
|
|
36
36
|
*
|
|
37
37
|
* This source code is licensed under the ISC license.
|
|
38
38
|
* See the LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/const
|
|
39
|
+
*/const eh=st("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"}]]);/**
|
|
40
40
|
* @license lucide-react v0.414.0 - ISC
|
|
41
41
|
*
|
|
42
42
|
* This source code is licensed under the ISC license.
|
|
43
43
|
* See the LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/const
|
|
44
|
+
*/const F1=st("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"}]]);/**
|
|
45
45
|
* @license lucide-react v0.414.0 - ISC
|
|
46
46
|
*
|
|
47
47
|
* This source code is licensed under the ISC license.
|
|
48
48
|
* See the LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/const
|
|
49
|
+
*/const th=st("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
50
50
|
* @license lucide-react v0.414.0 - ISC
|
|
51
51
|
*
|
|
52
52
|
* This source code is licensed under the ISC license.
|
|
53
53
|
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
-
*/const
|
|
54
|
+
*/const L1=st("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
55
55
|
* @license lucide-react v0.414.0 - ISC
|
|
56
56
|
*
|
|
57
57
|
* This source code is licensed under the ISC license.
|
|
58
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/const
|
|
59
|
+
*/const kl=st("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
60
60
|
* @license lucide-react v0.414.0 - ISC
|
|
61
61
|
*
|
|
62
62
|
* This source code is licensed under the ISC license.
|
|
63
63
|
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
-
*/const
|
|
64
|
+
*/const V1=st("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"}]]);/**
|
|
65
65
|
* @license lucide-react v0.414.0 - ISC
|
|
66
66
|
*
|
|
67
67
|
* This source code is licensed under the ISC license.
|
|
68
68
|
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/const
|
|
69
|
+
*/const nh=st("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"}]]);/**
|
|
70
70
|
* @license lucide-react v0.414.0 - ISC
|
|
71
71
|
*
|
|
72
72
|
* This source code is licensed under the ISC license.
|
|
73
73
|
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/const
|
|
74
|
+
*/const $1=st("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"}]]);/**
|
|
75
75
|
* @license lucide-react v0.414.0 - ISC
|
|
76
76
|
*
|
|
77
77
|
* This source code is licensed under the ISC license.
|
|
78
78
|
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
-
*/const
|
|
79
|
+
*/const R1=st("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"}]]);/**
|
|
80
80
|
* @license lucide-react v0.414.0 - ISC
|
|
81
81
|
*
|
|
82
82
|
* This source code is licensed under the ISC license.
|
|
83
83
|
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
-
*/const
|
|
84
|
+
*/const j1=st("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"}]]);/**
|
|
85
85
|
* @license lucide-react v0.414.0 - ISC
|
|
86
86
|
*
|
|
87
87
|
* This source code is licensed under the ISC license.
|
|
88
88
|
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
-
*/const
|
|
89
|
+
*/const B1=st("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
90
90
|
* @license lucide-react v0.414.0 - ISC
|
|
91
91
|
*
|
|
92
92
|
* This source code is licensed under the ISC license.
|
|
93
93
|
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
-
*/const
|
|
94
|
+
*/const z1=st("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
|
|
95
95
|
* @license lucide-react v0.414.0 - ISC
|
|
96
96
|
*
|
|
97
97
|
* This source code is licensed under the ISC license.
|
|
98
98
|
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/const
|
|
99
|
+
*/const Ol=st("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
100
100
|
* @license lucide-react v0.414.0 - ISC
|
|
101
101
|
*
|
|
102
102
|
* This source code is licensed under the ISC license.
|
|
103
103
|
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
-
*/const
|
|
104
|
+
*/const W1=st("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
105
105
|
* @license lucide-react v0.414.0 - ISC
|
|
106
106
|
*
|
|
107
107
|
* This source code is licensed under the ISC license.
|
|
108
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
-
*/const
|
|
109
|
+
*/const to=st("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"}]]);/**
|
|
110
110
|
* @license lucide-react v0.414.0 - ISC
|
|
111
111
|
*
|
|
112
112
|
* This source code is licensed under the ISC license.
|
|
113
113
|
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
-
*/const
|
|
114
|
+
*/const H1=st("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"}]]);/**
|
|
115
115
|
* @license lucide-react v0.414.0 - ISC
|
|
116
116
|
*
|
|
117
117
|
* This source code is licensed under the ISC license.
|
|
118
118
|
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
-
*/const
|
|
119
|
+
*/const U1=st("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"}]]);/**
|
|
120
120
|
* @license lucide-react v0.414.0 - ISC
|
|
121
121
|
*
|
|
122
122
|
* This source code is licensed under the ISC license.
|
|
123
123
|
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
-
*/const O1=dt("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"}]]),Qr=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),ci=w.createContext({}),ui=w.createContext(null),El=typeof document<"u",di=El?w.useLayoutEffect:w.useEffect,Qf=w.createContext({strict:!1}),fi=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Jf="data-"+fi("framerAppearId"),_1={skipAnimations:!1,useManualTiming:!1};function A1(e){let t=new Set,n=new Set,r=!1,o=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function a(c){s.has(c)&&(l.schedule(c),e()),c(i)}const l={schedule:(c,u=!1,d=!1)=>{const h=d&&r?t:n;return u&&s.add(c),h.has(c)||h.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(i=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const hi=["read","resolveKeyframes","update","preRender","render","postRender"],I1=40;function eh(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=hi.reduce((v,b)=>(v[b]=A1(s),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,I1),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:hi.reduce((v,b)=>{const g=i[b];return v[b]=(T,S=!1,E=!1)=>(n||p(),g.schedule(T,S,E)),v},{}),cancel:v=>{for(let b=0;b<hi.length;b++)i[hi[b]].cancel(v)},state:o,steps:i}}const{schedule:Cl,cancel:TL}=eh(queueMicrotask,!1);function Jr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const th=w.createContext({});let nh=!1;function D1(e,t,n,r,o){const{visualElement:s}=w.useContext(ci),i=w.useContext(Qf),a=w.useContext(ui),l=w.useContext(Qr).reducedMotion,c=w.useRef();r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=w.useContext(th);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&N1(c.current,n,o,d),w.useInsertionEffect(()=>{u&&u.update(n,a)});const f=w.useRef(!!(n[Jf]&&!window.HandoffComplete));return di(()=>{u&&(u.updateFeatures(),Cl.render(u.render),f.current&&u.animationState&&u.animationState.animateChanges())}),w.useEffect(()=>{u&&(!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(f.current=!1,nh||(nh=!0,queueMicrotask(M1))))}),u}function M1(){window.HandoffComplete=!0}function N1(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:rh(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&Jr(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function rh(e){if(e)return e.options.allowProjection!==!1?e.projection:rh(e.parent)}function F1(e,t,n){return w.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Jr(n)&&(n.current=r))},[t])}function es(e){return typeof e=="string"||Array.isArray(e)}function ts(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Pl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],kl=["initial",...Pl];function pi(e){return ts(e.animate)||kl.some(t=>es(e[t]))}function oh(e){return!!(pi(e)||e.variants)}function L1(e,t){if(pi(e)){const{initial:n,animate:r}=e;return{initial:n===!1||es(n)?n:void 0,animate:es(r)?r:void 0}}return e.inherit!==!1?t:{}}function V1(e){const{initial:t,animate:n}=L1(e,w.useContext(ci));return w.useMemo(()=>({initial:t,animate:n}),[sh(t),sh(n)])}function sh(e){return Array.isArray(e)?e.join(" "):e}const ih={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"]},eo={};for(const e in ih)eo[e]={isEnabled:t=>ih[e].some(n=>!!t[n])};function $1(e){for(const t in e)eo[t]={...eo[t],...e[t]}}const ns=w.createContext({}),R1=Symbol.for("motionComponentSymbol"),bt=e=>e;let to=bt,tn=bt;process.env.NODE_ENV!=="production"&&(to=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},tn=(e,t)=>{if(!e)throw new Error(t)});function j1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&$1(e);function s(a,l){let c;const u={...w.useContext(Qr),...a,layoutId:B1(a)},{isStatic:d}=u,f=V1(a),h=r(a,d);if(!d&&El){z1(u,e);const p=W1(u);c=p.MeasureLayout,f.visualElement=D1(o,h,u,t,p.ProjectionNode)}return x.jsxs(ci.Provider,{value:f,children:[c&&f.visualElement?x.jsx(c,{visualElement:f.visualElement,...u}):null,n(o,a,F1(h,f.visualElement,l),h,d,f.visualElement)]})}const i=w.forwardRef(s);return i[R1]=o,i}function B1({layoutId:e}){const t=w.useContext(ns).id;return t&&e!==void 0?t+"-"+e:e}function z1(e,t){const n=w.useContext(Qf).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?to(!1,r):tn(!1,r)}}function W1(e){const{drag:t,layout:n}=eo;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 H1(e){function t(r,o={}){return j1(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 U1=["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 Ol(e){return typeof e!="string"||e.includes("-")?!1:!!(U1.indexOf(e)>-1||/[A-Z]/u.test(e))}const mi={};function G1(e){Object.assign(mi,e)}const rs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Un=new Set(rs);function ah(e,{layout:t,layoutId:n}){return Un.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!mi[e]||e==="opacity")}const wt=e=>!!(e&&e.getVelocity),Y1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},q1=rs.length;function K1(e,t,n){let r="";for(let o=0;o<q1;o++){const s=rs[o];if(e[s]!==void 0){const i=Y1[s]||s;r+=`${i}(${e[s]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const lh=e=>t=>typeof t=="string"&&t.startsWith(e),ch=lh("--"),Z1=lh("var(--"),_l=e=>Z1(e)?X1.test(e.split("/*")[0].trim()):!1,X1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Q1=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Gn=(e,t,n)=>n>t?t:n<e?e:n,no={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},os={...no,transform:e=>Gn(0,1,e)},gi={...no,default:1},ss=e=>Math.round(e*1e5)/1e5,Al=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,J1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,eS=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function is(e){return typeof e=="string"}function tS(e){return e==null}const as=e=>({test:t=>is(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Yn=as("deg"),dn=as("%"),de=as("px"),nS=as("vh"),rS=as("vw"),uh={...dn,parse:e=>dn.parse(e)/100,transform:e=>dn.transform(e*100)},dh={...no,transform:Math.round},fh={borderWidth:de,borderTopWidth:de,borderRightWidth:de,borderBottomWidth:de,borderLeftWidth:de,borderRadius:de,radius:de,borderTopLeftRadius:de,borderTopRightRadius:de,borderBottomRightRadius:de,borderBottomLeftRadius:de,width:de,maxWidth:de,height:de,maxHeight:de,size:de,top:de,right:de,bottom:de,left:de,padding:de,paddingTop:de,paddingRight:de,paddingBottom:de,paddingLeft:de,margin:de,marginTop:de,marginRight:de,marginBottom:de,marginLeft:de,rotate:Yn,rotateX:Yn,rotateY:Yn,rotateZ:Yn,scale:gi,scaleX:gi,scaleY:gi,scaleZ:gi,skew:Yn,skewX:Yn,skewY:Yn,distance:de,translateX:de,translateY:de,translateZ:de,x:de,y:de,z:de,perspective:de,transformPerspective:de,opacity:os,originX:uh,originY:uh,originZ:de,zIndex:dh,backgroundPositionX:de,backgroundPositionY:de,fillOpacity:os,strokeOpacity:os,numOctaves:dh};function Il(e,t,n){const{style:r,vars:o,transform:s,transformOrigin:i}=e;let a=!1,l=!1,c=!0;for(const u in t){const d=t[u];if(ch(u)){o[u]=d;continue}const f=fh[u],h=Q1(d,f);if(Un.has(u)){if(a=!0,s[u]=h,!c)continue;d!==(f.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,i[u]=h):r[u]=h}if(t.transform||(a||n?r.transform=K1(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:d="50%",originZ:f=0}=i;r.transformOrigin=`${u} ${d} ${f}`}}const Dl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function hh(e,t,n){for(const r in t)!wt(t[r])&&!ah(r,n)&&(e[r]=t[r])}function oS({transformTemplate:e},t){return w.useMemo(()=>{const n=Dl();return Il(n,t,e),Object.assign({},n.vars,n.style)},[t])}function sS(e,t){const n=e.style||{},r={};return hh(r,n,e),Object.assign(r,oS(e,t)),r}function iS(e,t){const n={},r=sS(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 aS=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function yi(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||aS.has(e)}let ph=e=>!yi(e);function mh(e){e&&(ph=t=>t.startsWith("on")?!yi(t):e(t))}try{mh(require("@emotion/is-prop-valid").default)}catch{}function lS(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(ph(o)||n===!0&&yi(o)||!t&&!yi(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function gh(e,t,n){return typeof e=="string"?e:de.transform(t+n*e)}function cS(e,t,n){const r=gh(t,e.x,e.width),o=gh(n,e.y,e.height);return`${r} ${o}`}const uS={offset:"stroke-dashoffset",array:"stroke-dasharray"},dS={offset:"strokeDashoffset",array:"strokeDasharray"};function fS(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?uS:dS;e[s.offset]=de.transform(-r);const i=de.transform(t),a=de.transform(n);e[s.array]=`${i} ${a}`}function Ml(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Il(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=cS(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&fS(f,i,a,l,!1)}const yh=()=>({...Dl(),attrs:{}}),Nl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function hS(e,t,n,r){const o=w.useMemo(()=>{const s=yh();return Ml(s,t,Nl(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};hh(s,e.style,e),o.style={...s,...o.style}}return o}function pS(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Ol(n)?hS:iS)(r,s,i,n),c=lS(r,typeof n=="string",e),u=n!==w.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=w.useMemo(()=>wt(d)?d.get():d,[d]);return w.createElement(n,{...u,children:f})}}function vh(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const bh=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 wh(e,t,n,r){vh(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(bh.has(o)?o:fi(o),t.attrs[o])}function Fl(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(wt(o[i])||t.style&&wt(t.style[i])||ah(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),s}function xh(e,t,n){const r=Fl(e,t,n);for(const o in e)if(wt(e[o])||wt(t[o])){const s=rs.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}function Sh(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ll(e,t,n,r){if(typeof t=="function"){const[o,s]=Sh(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=Sh(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function qn(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const Vl=e=>Array.isArray(e),mS=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),gS=e=>Vl(e)?e[e.length-1]||0:e;function vi(e){const t=wt(e)?e.get():e;return mS(t)?t.toValue():t}const Th=new Set(["opacity","clipPath","filter","transform"]);function Eh(e){if(Un.has(e))return"transform";if(Th.has(e))return fi(e)}function bi(e,t){e.indexOf(t)===-1&&e.push(t)}function wi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function yS([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[s]=e.splice(t,1);e.splice(o,0,s)}return e}function vS({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,s,i,a){const l={latestValues:wS(o,s,i,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Ch=e=>(t,n)=>{const r=w.useContext(ci),o=w.useContext(ui),s=()=>vS(e,t,r,o,n);return n?s():qn(s)};function bS(e,t){const n=Eh(t);n&&bi(e,n)}function Ph(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const s=Ll(e,r[o]);if(s){const{transitionEnd:i,transition:a,...l}=s;n(l,i)}}}function wS(e,t,n,r,o){var s;const i={},a=[],l=r&&((s=e.style)===null||s===void 0?void 0:s.willChange)===void 0,c=o(e,{});for(const y in c)i[y]=vi(c[y]);let{initial:u,animate:d}=e;const f=pi(e),h=oh(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"&&!ts(m)&&Ph(e,m,(y,v)=>{for(const b in y){let g=y[b];if(Array.isArray(g)){const T=p?g.length-1:0;g=g[T]}g!==null&&(i[b]=g)}for(const b in v)i[b]=v[b]}),l&&(d&&u!==!1&&!ts(d)&&Ph(e,d,y=>{for(const v in y)bS(a,v)}),a.length&&(i.willChange=a.join(","))),i}const{schedule:Ae,cancel:fn,state:xt,steps:$l}=eh(typeof requestAnimationFrame<"u"?requestAnimationFrame:bt,!0),xS={useVisualState:Ch({scrapeMotionValuesFromProps:xh,createRenderState:yh,onMount:(e,t,{renderState:n,latestValues:r})=>{Ae.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Ae.render(()=>{Ml(n,r,Nl(t.tagName),e.transformTemplate),wh(t,n)})}})},SS={useVisualState:Ch({applyWillChange:!0,scrapeMotionValuesFromProps:Fl,createRenderState:Dl})};function TS(e,{forwardMotionProps:t=!1},n,r){return{...Ol(e)?xS:SS,preloadedFeatures:n,useRender:pS(t),createVisualElement:r,Component:e}}function On(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const kh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function xi(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const ES=e=>t=>kh(t)&&e(t,xi(t));function _n(e,t,n,r){return On(e,t,ES(n),r)}const CS=(e,t)=>n=>t(e(n)),An=(...e)=>e.reduce(CS);function Oh(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const _h=Oh("dragHorizontal"),Ah=Oh("dragVertical");function Ih(e){let t=!1;if(e==="y")t=Ah();else if(e==="x")t=_h();else{const n=_h(),r=Ah();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Dh(){const e=Ih(!0);return e?(e(),!1):!0}class Kn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Mh(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(s,i)=>{if(s.pointerType==="touch"||Dh())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Ae.postRender(()=>l(s,i))};return _n(e.current,n,o,{passive:!e.getProps()[r]})}class PS extends Kn{mount(){this.unmount=An(Mh(this.node,!0),Mh(this.node,!1))}unmount(){}}class kS extends Kn{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 Nh=(e,t)=>t?e===t?!0:Nh(e,t.parentElement):!1;function Rl(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,xi(n))}class OS extends Kn{constructor(){super(...arguments),this.removeStartListeners=bt,this.removeEndListeners=bt,this.removeAccessibleListeners=bt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=_n(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:d}=this.node.getProps(),f=!d&&!Nh(this.node.current,a.target)?u:c;f&&Ae.update(()=>f(a,l))},{passive:!(r.onTap||r.onPointerUp)}),i=_n(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=An(s,i),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const i=a=>{a.key!=="Enter"||!this.checkPressEnd()||Rl("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Ae.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=On(this.node.current,"keyup",i),Rl("down",(a,l)=>{this.startPress(a,l)})},n=On(this.node.current,"keydown",t),r=()=>{this.isPressing&&Rl("cancel",(s,i)=>this.cancelPress(s,i))},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&&Ae.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Dh()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Ae.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 jl=new WeakMap,Bl=new WeakMap,_S=e=>{const t=jl.get(e.target);t&&t(e)},AS=e=>{e.forEach(_S)};function IS({root:e,...t}){const n=e||document;Bl.has(n)||Bl.set(n,{});const r=Bl.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(AS,{root:e,...t})),r[o]}function DS(e,t,n){const r=IS(t);return jl.set(e,n),r.observe(e),()=>{jl.delete(e),r.unobserve(e)}}const MS={some:0,all:1};class NS extends Kn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:MS[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return DS(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(FS(t,n))&&this.startObserver()}unmount(){}}function FS({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const LS={inView:{Feature:NS},tap:{Feature:OS},focus:{Feature:kS},hover:{Feature:PS}};function Fh(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 Si(e,t,n){const r=e.getProps();return Ll(r,t,n!==void 0?n:r.custom,e)}const In=e=>e*1e3,Dn=e=>e/1e3,VS={type:"spring",stiffness:500,damping:25,restSpeed:10},$S=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),RS={type:"keyframes",duration:.8},jS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},BS=(e,{keyframes:t})=>t.length>2?RS:Un.has(e)?e.startsWith("scale")?$S(t[1]):VS:jS;function zS({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function zl(e,t){return e[t]||e.default||e}const WS=e=>e!==null;function Ti(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(WS),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}let Ei;function HS(){Ei=void 0}const Zn={now:()=>(Ei===void 0&&Zn.set(xt.isProcessing||_1.useManualTiming?xt.timestamp:performance.now()),Ei),set:e=>{Ei=e,queueMicrotask(HS)}},Lh=e=>/^0[^.\s]+$/u.test(e);function US(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Lh(e):!0}const Vh=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),GS=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function YS(e){const t=GS.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const qS=4;function $h(e,t,n=1){tn(n<=qS,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=YS(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Vh(i)?parseFloat(i):i}return _l(o)?$h(o,t,n+1):o}const KS=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Rh=e=>e===no||e===de,jh=(e,t)=>parseFloat(e.split(", ")[t]),Bh=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return jh(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?jh(s[1],e):0}},ZS=new Set(["x","y","z"]),XS=rs.filter(e=>!ZS.has(e));function QS(e){const t=[];return XS.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ro={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:Bh(4,13),y:Bh(5,14)};ro.translateX=ro.x,ro.translateY=ro.y;const zh=e=>t=>t.test(e),Wh=[no,de,dn,Yn,rS,nS,{test:e=>e==="auto",parse:e=>e}],Hh=e=>Wh.find(zh(e)),vr=new Set;let Wl=!1,Hl=!1;function Uh(){if(Hl){const e=Array.from(vr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=QS(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Hl=!1,Wl=!1,vr.forEach(e=>e.complete()),vr.clear()}function Gh(){vr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Hl=!0)})}function JS(){Gh(),Uh()}class Ul{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(vr.add(this),Wl||(Wl=!0,Ae.read(Gh),Ae.resolveKeyframes(Uh))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),vr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,vr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Gl=(e,t)=>n=>!!(is(n)&&eS.test(n)&&n.startsWith(e)||t&&!tS(n)&&Object.prototype.hasOwnProperty.call(n,t)),Yh=(e,t,n)=>r=>{if(!is(r))return r;const[o,s,i,a]=r.match(Al);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},eT=e=>Gn(0,255,e),Yl={...no,transform:e=>Math.round(eT(e))},br={test:Gl("rgb","red"),parse:Yh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Yl.transform(e)+", "+Yl.transform(t)+", "+Yl.transform(n)+", "+ss(os.transform(r))+")"};function tT(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 ql={test:Gl("#"),parse:tT,transform:br.transform},oo={test:Gl("hsl","hue"),parse:Yh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+dn.transform(ss(t))+", "+dn.transform(ss(n))+", "+ss(os.transform(r))+")"},Pt={test:e=>br.test(e)||ql.test(e)||oo.test(e),parse:e=>br.test(e)?br.parse(e):oo.test(e)?oo.parse(e):ql.parse(e),transform:e=>is(e)?e:e.hasOwnProperty("red")?br.transform(e):oo.transform(e)};function nT(e){var t,n;return isNaN(e)&&is(e)&&(((t=e.match(Al))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(J1))===null||n===void 0?void 0:n.length)||0)>0}const qh="number",Kh="color",rT="var",oT="var(",Zh="${}",sT=/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 ls(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(sT,l=>(Pt.test(l)?(r.color.push(s),o.push(Kh),n.push(Pt.parse(l))):l.startsWith(oT)?(r.var.push(s),o.push(rT),n.push(l)):(r.number.push(s),o.push(qh),n.push(parseFloat(l))),++s,Zh)).split(Zh);return{values:n,split:a,indexes:r,types:o}}function Xh(e){return ls(e).values}function Qh(e){const{split:t,types:n}=ls(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===qh?s+=ss(o[i]):a===Kh?s+=Pt.transform(o[i]):s+=o[i]}return s}}const iT=e=>typeof e=="number"?0:e;function aT(e){const t=Xh(e);return Qh(e)(t.map(iT))}const Xn={test:nT,parse:Xh,createTransformer:Qh,getAnimatableNone:aT},lT=new Set(["brightness","contrast","saturate","opacity"]);function cT(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Al)||[];if(!r)return e;const o=n.replace(r,"");let s=lT.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const uT=/\b([a-z-]*)\(.*?\)/gu,Kl={...Xn,getAnimatableNone:e=>{const t=e.match(uT);return t?t.map(cT).join(" "):e}},dT={...fh,color:Pt,backgroundColor:Pt,outlineColor:Pt,fill:Pt,stroke:Pt,borderColor:Pt,borderTopColor:Pt,borderRightColor:Pt,borderBottomColor:Pt,borderLeftColor:Pt,filter:Kl,WebkitFilter:Kl},Zl=e=>dT[e];function Jh(e,t){let n=Zl(e);return n!==Kl&&(n=Xn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const fT=new Set(["auto","none","0"]);function hT(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!fT.has(s)&&ls(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Jh(n,o)}class ep extends Ul{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(),_l(c))){const u=$h(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!KS.has(r)||t.length!==2)return;const[o,s]=t,i=Hh(o),a=Hh(s);if(i!==a)if(Rh(i)&&Rh(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++)US(t[o])&&r.push(o);r.length&&hT(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ro[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=ro[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 tp(e){let t;return()=>(t===void 0&&(t=e()),t)}const np=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Xn.test(e)||e==="0")&&!e.startsWith("url("));function pT(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 mT(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=np(o,t),a=np(s,t);return to(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:pT(e)||n==="spring"&&r}class rp{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&JS(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!mT(t,r,o,s))if(i)this.options.duration=0;else{l==null||l(Ti(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 op(e,t){return t?e*(1e3/t):0}const gT=5;function sp(e,t,n){const r=Math.max(t-gT,0);return op(n-e(r),t-r)}const Xl=.001,yT=.01,ip=10,vT=.05,bT=1;function wT({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;to(e<=In(ip),"Spring duration must be 10 seconds or less");let i=1-t;i=Gn(vT,bT,i),e=Gn(yT,ip,Dn(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=Ql(c,i),p=Math.exp(-d);return Xl-f/h*p},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=Ql(Math.pow(c,2),i);return(-o(c)+Xl>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Xl+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=ST(o,s,a);if(e=In(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const xT=12;function ST(e,t,n){let r=n;for(let o=1;o<xT;o++)r=r-e(r)/t(r);return r}function Ql(e,t){return e*Math.sqrt(1-t*t)}const TT=["duration","bounce"],ET=["stiffness","damping","mass"];function ap(e,t){return t.some(n=>e[n]!==void 0)}function CT(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!ap(e,ET)&&ap(e,TT)){const n=wT(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function lp({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],i={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:f}=CT({...r,velocity:-Dn(r.velocity||0)}),h=d||0,p=l/(2*Math.sqrt(a*c)),m=s-o,y=Dn(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),t||(t=v?.005:.5);let b;if(p<1){const g=Ql(y,p);b=T=>{const S=Math.exp(-p*y*T);return s-S*((h+p*y*m)/g*Math.sin(g*T)+m*Math.cos(g*T))}}else if(p===1)b=g=>s-Math.exp(-y*g)*(m+(h+y*m)*g);else{const g=y*Math.sqrt(p*p-1);b=T=>{const S=Math.exp(-p*y*T),E=Math.min(g*T,300);return s-S*((h+p*y*m)*Math.sinh(E)+g*m*Math.cosh(E))/g}}return{calculatedDuration:f&&u||null,next:g=>{const T=b(g);if(f)i.done=g>=u;else{let S=h;g!==0&&(p<1?S=sp(b,g,T):S=0);const E=Math.abs(S)<=n,C=Math.abs(s-T)<=t;i.done=E&&C}return i.value=i.done?s:T,i}}}function cp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=k=>a!==void 0&&k<a||l!==void 0&&k>l,p=k=>a===void 0?l:l===void 0||Math.abs(a-k)<Math.abs(l-k)?a:l;let m=n*t;const y=d+m,v=i===void 0?y:i(y);v!==y&&(m=v-d);const b=k=>-m*Math.exp(-k/r),g=k=>v+b(k),T=k=>{const I=b(k),N=g(k);f.done=Math.abs(I)<=c,f.value=f.done?v:N};let S,E;const C=k=>{h(f.value)&&(S=k,E=lp({keyframes:[f.value,p(f.value)],velocity:sp(g,k,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:k=>{let I=!1;return!E&&S===void 0&&(I=!0,T(k),C(k)),S!==void 0&&k>=S?E.next(k-S):(!I&&T(k),f)}}}const up=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,PT=1e-7,kT=12;function OT(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=up(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>PT&&++a<kT);return i}function cs(e,t,n,r){if(e===t&&n===r)return bt;const o=s=>OT(s,0,1,e,n);return s=>s===0||s===1?s:up(o(s),t,r)}const _T=cs(.42,0,1,1),AT=cs(0,0,.58,1),dp=cs(.42,0,.58,1),IT=e=>Array.isArray(e)&&typeof e[0]!="number",fp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,hp=e=>t=>1-e(1-t),Jl=e=>1-Math.sin(Math.acos(e)),pp=hp(Jl),DT=fp(Jl),mp=cs(.33,1.53,.69,.99),ec=hp(mp),MT=fp(ec),gp={linear:bt,easeIn:_T,easeInOut:dp,easeOut:AT,circIn:Jl,circInOut:DT,circOut:pp,backIn:ec,backInOut:MT,backOut:mp,anticipate:e=>(e*=2)<1?.5*ec(e):.5*(2-Math.pow(2,-10*(e-1)))},yp=e=>{if(Array.isArray(e)){tn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return cs(t,n,r,o)}else if(typeof e=="string")return tn(gp[e]!==void 0,`Invalid easing type '${e}'`),gp[e];return e},us=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ze=(e,t,n)=>e+(t-e)*n;function tc(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 NT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=tc(l,a,e+1/3),s=tc(l,a,e),i=tc(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function Ci(e,t){return n=>n>0?t:e}const nc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},FT=[ql,br,oo],LT=e=>FT.find(t=>t.test(e));function vp(e){const t=LT(e);if(to(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===oo&&(n=NT(n)),n}const bp=(e,t)=>{const n=vp(e),r=vp(t);if(!n||!r)return Ci(e,t);const o={...n};return s=>(o.red=nc(n.red,r.red,s),o.green=nc(n.green,r.green,s),o.blue=nc(n.blue,r.blue,s),o.alpha=Ze(n.alpha,r.alpha,s),br.transform(o))},rc=new Set(["none","hidden"]);function VT(e,t){return rc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function $T(e,t){return n=>Ze(e,t,n)}function oc(e){return typeof e=="number"?$T:typeof e=="string"?_l(e)?Ci:Pt.test(e)?bp:BT:Array.isArray(e)?wp:typeof e=="object"?Pt.test(e)?bp:RT:Ci}function wp(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>oc(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function RT(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=oc(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function jT(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const BT=(e,t)=>{const n=Xn.createTransformer(t),r=ls(e),o=ls(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?rc.has(e)&&!o.values.length||rc.has(t)&&!r.values.length?VT(e,t):An(wp(jT(r,o),o.values),n):(to(!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.`),Ci(e,t))};function xp(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ze(e,t,n):oc(e)(e,t)}function zT(e,t,n){const r=[],o=n||xp,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||bt:t;a=An(l,a)}r.push(a)}return r}function Sp(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(tn(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=zT(t,r,o),a=i.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const d=us(e[u],e[u+1],c);return i[u](d)};return n?c=>l(Gn(e[0],e[s-1],c)):l}function WT(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=us(0,t,r);e.push(Ze(n,1,o))}}function HT(e){const t=[0];return WT(t,e.length-1),t}function UT(e,t){return e.map(n=>n*t)}function GT(e,t){return e.map(()=>t||dp).splice(0,e.length-1)}function Pi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=IT(r)?r.map(yp):yp(r),s={done:!1,value:t[0]},i=UT(n&&n.length===t.length?n:HT(t),e),a=Sp(i,t,{ease:Array.isArray(o)?o:GT(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Tp=2e4;function YT(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Tp;)t+=n,r=e.next(t);return t>=Tp?1/0:t}const qT=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ae.update(t,!0),stop:()=>fn(t),now:()=>xt.isProcessing?xt.timestamp:Zn.now()}},KT={decay:cp,inertia:cp,tween:Pi,keyframes:Pi,spring:lp},ZT=e=>e/100;class sc extends rp{constructor({KeyframeResolver:t=Ul,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:s}=this.options,i=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(s,i,r,o):this.resolver=new t(s,i,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=KT[n]||Pi;let l,c;a!==Pi&&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(ZT,xp(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=YT(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:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),b=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,T=s;if(h){const k=Math.min(this.currentTime,u)/d;let I=Math.floor(k),N=k%1;!N&&k>=1&&(N=1),N===1&&I--,I=Math.min(I,h+1),!!(I%2)&&(p==="reverse"?(N=1-N,m&&(N-=m/d)):p==="mirror"&&(T=i)),g=Gn(0,1,N)*d}const S=b?{done:!1,value:l[0]}:T.next(g);a&&(S.value=a(S.value));let{done:E}=S;!b&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&o!==void 0&&(S.value=Ti(l,this.options,o)),y&&y(S.value),C&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Dn(t.calculatedDuration):0}get time(){return Dn(this.currentTime)}set time(t){t=In(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=qT,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 Ep=e=>Array.isArray(e)&&typeof e[0]=="number";function Cp(e){return!!(!e||typeof e=="string"&&e in ic||Ep(e)||Array.isArray(e)&&e.every(Cp))}const ds=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ic={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ds([0,.65,.55,1]),circOut:ds([.55,0,1,.45]),backIn:ds([.31,.01,.66,-.59]),backOut:ds([.33,1.53,.69,.99])};function XT(e){return Pp(e)||ic.easeOut}function Pp(e){if(e)return Ep(e)?ds(e):Array.isArray(e)?e.map(XT):ic[e]}function QT(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Pp(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const JT=tp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ki=10,eE=2e4;function tE(e){return e.type==="spring"||!Cp(e.ease)}function nE(e,t){const n=new sc({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<eE;)r=n.sample(s),o.push(r.value),s+=ki;return{times:void 0,keyframes:o,duration:s-ki,ease:"linear"}}class kp extends rp{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new ep(o,(s,i)=>this.onKeyframesResolved(s,i),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:s,ease:i,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(tE(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,...p}=this.options,m=nE(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,s=m.times,i=m.ease,a="keyframes"}const u=QT(l.owner.current,c,t,{...this.options,duration:o,times:s,ease:i});return u.startTime=Zn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;l.set(Ti(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:s,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return 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=In(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 bt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return bt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,...f}=this.options,h=new sc({...f,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),p=In(this.time);c.setWithVelocity(h.sample(p-ki).value,h.sample(p).value,ki)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;return JT()&&r&&Th.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}function rE(e,t){let n;const r=()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i};return Ae.update(r,!0),()=>fn(r)}const oE=tp(()=>window.ScrollTimeline!==void 0);class sE{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(oE()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),rE(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 ac=(e,t,n,r={},o,s,i)=>a=>{const l=zl(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-In(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),i&&i()},onStop:i,name:e,motionValue:t,element:s?void 0:o};zS(l)||(d={...d,...BS(e,d)}),d.duration&&(d.duration=In(d.duration)),d.repeatDelay&&(d.repeatDelay=In(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!s&&t.get()!==void 0){const h=Ti(d.keyframes,l);if(h!==void 0)return Ae.update(()=>{d.onUpdate(h),d.onComplete()}),new sE([])}return!s&&kp.supports(d)?new kp(d):new sc(d)};class lc{constructor(){this.subscriptions=[]}add(t){return bi(this.subscriptions,t),()=>wi(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Op=new Set;function cc(e,t,n){e||Op.has(t)||(console.warn(t),Op.add(t))}const _p=30,iE=e=>!isNaN(parseFloat(e)),fs={current:void 0};class Ap{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=Zn.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Zn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=iE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&cc(!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 lc);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ae.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 fs.current&&fs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Zn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>_p)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,_p);return op(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 so(e,t){return new Ap(e,t)}function aE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,so(n))}function lE(e,t){const n=Si(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=gS(s[i]);aE(e,i,a)}}function Ip(e){return e.getProps()[Jf]}class cE extends Ap{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=Eh(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const s=this.counts.get(n)-1;this.counts.set(n,s),s===0&&(wi(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function uE(e){return!!(wt(e)&&e.add)}function uc(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 cE("auto"),e.addValue("willChange",r)),uE(r))return r.add(t)}function dE({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Dp(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),h=l[d];if(h===void 0||u&&dE(u,d))continue;const p={delay:n,elapsed:0,...zl(i||{},d)};let m=!1;if(window.HandoffAppearAnimations){const v=Ip(e);if(v){const b=window.HandoffAppearAnimations(v,d,f,Ae);b!==null&&(p.elapsed=b,m=!0)}}f.start(ac(d,f,h,e.shouldReduceMotion&&Un.has(d)?{type:!1}:p,e,m,uc(e,d)));const y=f.animation;y&&c.push(y)}return a&&Promise.all(c).then(()=>{Ae.update(()=>{a&&lE(e,a)})}),c}function dc(e,t,n={}){var r;const o=Si(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(Dp(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return fE(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function fE(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(hE).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(dc(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function hE(e,t){return e.sortNodePosition(t)}function pE(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>dc(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=dc(e,t,n);else{const o=typeof t=="function"?Si(e,t,n.custom):t;r=Promise.all(Dp(e,o,n))}return r.then(()=>{Ae.postRender(()=>{e.notify("AnimationComplete",t)})})}const mE=[...Pl].reverse(),gE=Pl.length;function yE(e){return t=>Promise.all(t.map(({animation:n,options:r})=>pE(e,n,r)))}function vE(e){let t=yE(e),n=Mp(),r=!0;const o=l=>(c,u)=>{var d;const f=Si(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],f=new Set;let h={},p=1/0;for(let y=0;y<gE;y++){const v=mE[y],b=n[v],g=c[v]!==void 0?c[v]:u[v],T=es(g),S=v===l?b.isActive:null;S===!1&&(p=y);let E=g===u[v]&&g!==c[v]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),b.protectedKeys={...h},!b.isActive&&S===null||!g&&!b.prevProp||ts(g)||typeof g=="boolean")continue;let k=bE(b.prevProp,g)||v===l&&b.isActive&&!E&&T||y>p&&T,I=!1;const N=Array.isArray(g)?g:[g];let L=N.reduce(o(v),{});S===!1&&(L={});const{prevResolvedValues:O={}}=b,j={...O,...L},D=_=>{k=!0,f.has(_)&&(I=!0,f.delete(_)),b.needsAnimating[_]=!0;const F=e.getValue(_);F&&(F.liveStyle=!1)};for(const _ in j){const F=L[_],$=O[_];if(h.hasOwnProperty(_))continue;let z=!1;Vl(F)&&Vl($)?z=!Fh(F,$):z=F!==$,z?F!=null?D(_):f.add(_):F!==void 0&&f.has(_)?D(_):b.protectedKeys[_]=!0}b.prevProp=g,b.prevResolvedValues=L,b.isActive&&(h={...h,...L}),r&&e.blockInitialAnimation&&(k=!1),k&&(!E||I)&&d.push(...N.map(_=>({animation:_,options:{type:v}})))}if(f.size){const y={};f.forEach(v=>{const b=e.getBaseTarget(v),g=e.getValue(v);g&&(g.liveStyle=!0),y[v]=b??null}),d.push({animation:y})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Mp(),r=!0}}}function bE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Fh(t,e):!1}function wr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Mp(){return{animate:wr(!0),whileInView:wr(),whileHover:wr(),whileTap:wr(),whileDrag:wr(),whileFocus:wr(),exit:wr()}}class wE extends Kn{constructor(t){super(t),t.animationState||(t.animationState=vE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ts(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 xE=0;class SE extends Kn{constructor(){super(...arguments),this.id=xE++}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 TE={animation:{Feature:wE},exit:{Feature:SE}},Np=(e,t)=>Math.abs(e-t);function EE(e,t){const n=Np(e.x,t.x),r=Np(e.y,t.y);return Math.sqrt(n**2+r**2)}class Fp{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=hc(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=EE(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:p}=d,{timestamp:m}=xt;this.history.push({...p,timestamp:m});const{onStart:y,onMove:v}=this.handlers;f||(y&&y(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=fc(f,this.transformPagePoint),Ae.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 y=hc(d.type==="pointercancel"?this.lastMoveEventInfo:fc(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,y),p&&p(d,y)},!kh(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=xi(t),a=fc(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=xt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,hc(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(),fn(this.updatePoint)}}function fc(e,t){return t?{point:t(e.point)}:e}function Lp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function hc({point:e},t){return{point:e,delta:Lp(e,Vp(t)),offset:Lp(e,CE(t)),velocity:PE(t,.1)}}function CE(e){return e[0]}function Vp(e){return e[e.length-1]}function PE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Vp(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>In(t)));)n--;if(!r)return{x:0,y:0};const s=Dn(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}const $p=1e-4,kE=1-$p,OE=1+$p,Rp=.01,_E=0-Rp,AE=0+Rp;function Wt(e){return e.max-e.min}function IE(e,t,n){return Math.abs(e-t)<=n}function jp(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>=kE&&e.scale<=OE||isNaN(e.scale))&&(e.scale=1),(e.translate>=_E&&e.translate<=AE||isNaN(e.translate))&&(e.translate=0)}function hs(e,t,n,r){jp(e.x,t.x,n.x,r?r.originX:void 0),jp(e.y,t.y,n.y,r?r.originY:void 0)}function Bp(e,t,n){e.min=n.min+t.min,e.max=e.min+Wt(t)}function DE(e,t,n){Bp(e.x,t.x,n.x),Bp(e.y,t.y,n.y)}function zp(e,t,n){e.min=t.min-n.min,e.max=e.min+Wt(t)}function ps(e,t,n){zp(e.x,t.x,n.x),zp(e.y,t.y,n.y)}function ME(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 Wp(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 NE(e,{top:t,left:n,bottom:r,right:o}){return{x:Wp(e.x,n,o),y:Wp(e.y,t,r)}}function Hp(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function FE(e,t){return{x:Hp(e.x,t.x),y:Hp(e.y,t.y)}}function LE(e,t){let n=.5;const r=Wt(e),o=Wt(t);return o>r?n=us(t.min,t.max-r,e.min):r>o&&(n=us(e.min,e.max-o,t.min)),Gn(0,1,n)}function VE(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 pc=.35;function $E(e=pc){return e===!1?e=0:e===!0&&(e=pc),{x:Up(e,"left","right"),y:Up(e,"top","bottom")}}function Up(e,t,n){return{min:Gp(e,t),max:Gp(e,n)}}function Gp(e,t){return typeof e=="number"?e:e[t]||0}const Yp=()=>({translate:0,scale:1,origin:0,originPoint:0}),io=()=>({x:Yp(),y:Yp()}),qp=()=>({min:0,max:0}),st=()=>({x:qp(),y:qp()});function Xt(e){return[e("x"),e("y")]}function Kp({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function RE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function jE(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 mc(e){return e===void 0||e===1}function gc({scale:e,scaleX:t,scaleY:n}){return!mc(e)||!mc(t)||!mc(n)}function xr(e){return gc(e)||Zp(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Zp(e){return Xp(e.x)||Xp(e.y)}function Xp(e){return e&&e!=="0%"}function Oi(e,t,n){const r=e-n,o=t*r;return n+o}function Qp(e,t,n,r,o){return o!==void 0&&(e=Oi(e,o,r)),Oi(e,n,r)+t}function yc(e,t=0,n=1,r,o){e.min=Qp(e.min,t,n,r,o),e.max=Qp(e.max,t,n,r,o)}function Jp(e,{x:t,y:n}){yc(e.x,t.translate,t.scale,t.originPoint),yc(e.y,n.translate,n.scale,n.originPoint)}const em=.999999999999,tm=1.0000000000001;function BE(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&ao(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Jp(e,i)),r&&xr(s.latestValues)&&ao(e,s.latestValues))}t.x<tm&&t.x>em&&(t.x=1),t.y<tm&&t.y>em&&(t.y=1)}function Qn(e,t){e.min=e.min+t,e.max=e.max+t}function nm(e,t,n,r,o=.5){const s=Ze(e.min,e.max,o);yc(e,t,n,s,r)}function ao(e,t){nm(e.x,t.x,t.scaleX,t.scale,t.originX),nm(e.y,t.y,t.scaleY,t.scale,t.originY)}function rm(e,t){return Kp(jE(e.getBoundingClientRect(),t))}function zE(e,t,n){const r=rm(e,n),{scroll:o}=t;return o&&(Qn(r.x,o.offset.x),Qn(r.y,o.offset.y)),r}const om=({current:e})=>e?e.ownerDocument.defaultView:null,WE=new WeakMap;class HE{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(xi(u,"page").point)},s=(u,d)=>{var f;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Ih(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(v=>{let b=this.getAxisMotionValue(v).get()||0;if(dn.test(b)){const{projection:g}=this.visualElement;if(g&&g.layout){const T=g.layout.layoutBox[v];T&&(b=Wt(T)*(parseFloat(b)/100))}}this.originPoint[v]=b}),m&&Ae.postRender(()=>m(u,d)),(f=this.removeWillChange)===null||f===void 0||f.call(this),this.removeWillChange=uc(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:y}=d;if(h&&this.currentDirection===null){this.currentDirection=UE(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),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 Fp(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:om(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Ae.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!_i(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=ME(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&Jr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=NE(o.layoutBox,n):this.constraints=!1,this.elastic=$E(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Xt(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=VE(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Jr(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 s=zE(r,o.root,this.visualElement.getTransformPagePoint());let i=FE(o.layout.layoutBox,s);if(n){const a=n(RE(i));this.hasMutatedConstraints=!!a,a&&(i=Kp(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Xt(u=>{if(!_i(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(ac(t,r,0,n,this.visualElement,!1,uc(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(!_i(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-Ze(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Jr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Xt(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=LE({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Xt(i=>{if(!_i(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Ze(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;WE.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();Jr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ae.read(r);const i=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()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=pc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function _i(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function UE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class GE extends Kn{constructor(t){super(t),this.removeGroupControls=bt,this.removeListeners=bt,this.controls=new HE(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||bt}unmount(){this.removeGroupControls(),this.removeListeners()}}const sm=e=>(t,n)=>{e&&Ae.postRender(()=>e(t,n))};class YE extends Kn{constructor(){super(...arguments),this.removePointerDownListener=bt}onPointerDown(t){this.session=new Fp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:om(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:sm(t),onStart:sm(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&Ae.postRender(()=>o(s,i))}}}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 qE(){const e=w.useContext(ui);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=w.useId();return w.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const Ai={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function im(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ms={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(de.test(e))e=parseFloat(e);else return e;const n=im(e,t.target.x),r=im(e,t.target.y);return`${n}% ${r}%`}},KE={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Xn.parse(e);if(o.length>5)return r;const s=Xn.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=Ze(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class ZE extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;G1(XE),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Ai.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||Ae.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Cl.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 am(e){const[t,n]=qE(),r=w.useContext(ns);return x.jsx(ZE,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(th),isPresent:t,safeToRemove:n})}const XE={borderRadius:{...ms,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ms,borderTopRightRadius:ms,borderBottomLeftRadius:ms,borderBottomRightRadius:ms,boxShadow:KE},lm=["TopLeft","TopRight","BottomLeft","BottomRight"],QE=lm.length,cm=e=>typeof e=="string"?parseFloat(e):e,um=e=>typeof e=="number"||de.test(e);function JE(e,t,n,r,o,s){o?(e.opacity=Ze(0,n.opacity!==void 0?n.opacity:1,eC(r)),e.opacityExit=Ze(t.opacity!==void 0?t.opacity:1,0,tC(r))):s&&(e.opacity=Ze(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<QE;i++){const a=`border${lm[i]}Radius`;let l=dm(t,a),c=dm(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||um(l)===um(c)?(e[a]=Math.max(Ze(cm(l),cm(c),r),0),(dn.test(c)||dn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ze(t.rotate||0,n.rotate||0,r))}function dm(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const eC=fm(0,.5,pp),tC=fm(.5,.95,bt);function fm(e,t,n){return r=>r<e?0:r>t?1:n(us(e,t,r))}function hm(e,t){e.min=t.min,e.max=t.max}function Qt(e,t){hm(e.x,t.x),hm(e.y,t.y)}function pm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function mm(e,t,n,r,o){return e-=t,e=Oi(e,1/n,r),o!==void 0&&(e=Oi(e,1/o,r)),e}function nC(e,t=0,n=1,r=.5,o,s=e,i=e){if(dn.test(t)&&(t=parseFloat(t),t=Ze(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Ze(s.min,s.max,r);e===s&&(a-=t),e.min=mm(e.min,t,n,a,o),e.max=mm(e.max,t,n,a,o)}function gm(e,t,[n,r,o],s,i){nC(e,t[n],t[r],t[o],t.scale,s,i)}const rC=["x","scaleX","originX"],oC=["y","scaleY","originY"];function ym(e,t,n,r){gm(e.x,t,rC,n?n.x:void 0,r?r.x:void 0),gm(e.y,t,oC,n?n.y:void 0,r?r.y:void 0)}function vm(e){return e.translate===0&&e.scale===1}function bm(e){return vm(e.x)&&vm(e.y)}function sC(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 wm(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 xm(e){return Wt(e.x)/Wt(e.y)}function Sm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class iC{constructor(){this.members=[]}add(t){bi(this.members,t),t.scheduleRender()}remove(t){if(wi(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function aC(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const lC=(e,t)=>e.depth-t.depth;class cC{constructor(){this.children=[],this.isDirty=!1}add(t){bi(this.children,t),this.isDirty=!0}remove(t){wi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lC),this.isDirty=!1,this.children.forEach(t)}}function uC(e,t){const n=Zn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(fn(r),e(s-t))};return Ae.read(r,!0),()=>fn(r)}function dC(e){return e instanceof SVGElement&&e.tagName!=="svg"}function fC(e,t,n){const r=wt(e)?e:so(e);return r.start(ac("",r,t,n)),r.animation}const Sr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},vc=["","X","Y","Z"],hC={visibility:"hidden"},Tm=1e3;let pC=0;function bc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Em(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Ip(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?Em(e.parent):!1:!1}function Cm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=pC++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,window.MotionDebug&&(Sr.totalNodes=Sr.resolvedTargetDeltas=Sr.recalculatedProjection=0),this.nodes.forEach(yC),this.nodes.forEach(SC),this.nodes.forEach(TC),this.nodes.forEach(vC),window.MotionDebug&&window.MotionDebug.record(Sr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new cC)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new lc),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=dC(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=uC(f,250),Ai.hasAnimatedSinceResize&&(Ai.hasAnimatedSinceResize=!1,this.nodes.forEach(km))})}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()||OC,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!wm(this.targetLayout,p)||h,g=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const T={...zl(m,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||km(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,fn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(EC),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Em(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Pm);return}this.isUpdating||this.nodes.forEach(wC),this.isUpdating=!1,this.nodes.forEach(xC),this.nodes.forEach(mC),this.nodes.forEach(gC),this.clearAllSnapshots();const a=Zn.now();xt.delta=Gn(0,1e3/60,a-xt.timestamp),xt.timestamp=a,xt.isProcessing=!0,$l.update.process(xt),$l.preRender.process(xt),$l.render.process(xt),xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Cl.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(bC),this.sharedNodes.forEach(CC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ae.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ae.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=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,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:i,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!bm(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||xr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),_C(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return st();const a=i.measureViewportBox(),{scroll:l}=this.root;return l&&(Qn(a.x,l.offset.x),Qn(a.y,l.offset.y)),a}removeElementScroll(i){const a=st();Qt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;if(c!==this.root&&u&&d.layoutScroll){if(u.isRoot){Qt(a,i);const{scroll:f}=this.root;f&&(Qn(a.x,-f.offset.x),Qn(a.y,-f.offset.y))}Qn(a.x,u.offset.x),Qn(a.y,u.offset.y)}}return a}applyTransform(i,a=!1){const l=st();Qt(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ao(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),xr(u.latestValues)&&ao(l,u.latestValues)}return xr(this.latestValues)&&ao(l,this.latestValues),l}removeTransform(i){const a=st();Qt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!xr(c.latestValues))continue;gc(c.latestValues)&&c.updateSnapshot();const u=st(),d=c.measurePageBox();Qt(u,d),ym(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return xr(this.latestValues)&&ym(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==xt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=xt.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(),ps(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=st(),this.targetWithTransforms=st()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),DE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Qt(this.target,this.layout.layoutBox),Jp(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=st(),this.relativeTargetOrigin=st(),ps(this.relativeTargetOrigin,this.target,h.target),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&Sr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||gc(this.parent.latestValues)||Zp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===xt.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;BE(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():(pm(this.prevProjectionDelta.x,this.projectionDelta.x),pm(this.prevProjectionDelta.y,this.projectionDelta.y)),hs(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Sm(this.projectionDelta.x,this.prevProjectionDelta.x)||!Sm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&Sr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),i){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=io(),this.projectionDelta=io(),this.projectionDeltaWithTransform=io()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=io();(!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,y=this.getStack(),v=!y||y.members.length<=1,b=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(kC));this.animationProgress=0;let g;this.mixTargetDelta=T=>{const S=T/1e3;Om(d.x,i.x,S),Om(d.y,i.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ps(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),PC(this.relativeTarget,this.relativeTargetOrigin,f,S),g&&sC(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=st()),Qt(g,this.relativeTarget)),m&&(this.animationValues=u,JE(u,c,this.latestValues,S,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(fn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ae.update(()=>{Ai.hasAnimatedSinceResize=!0,this.currentAnimation=fC(0,Tm,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Tm),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&Mm(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||st();const d=Wt(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=Wt(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}Qt(a,l),ao(a,u),hs(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new iC),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&bc("z",i,c,this.animationValues);for(let u=0;u<vc.length;u++)bc(`rotate${vc[u]}`,i,c,this.animationValues),bc(`skew${vc[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return hC;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=vi(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=vi(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!xr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=aC(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 mi){if(f[m]===void 0)continue;const{correct:y,applyTo:v}=mi[m],b=c.transform==="none"?f[m]:y(f[m],d);if(v){const g=v.length;for(let T=0;T<g;T++)c[v[T]]=b}else c[m]=b}return this.options.layoutId&&(c.pointerEvents=d===this?vi(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Pm),this.root.sharedNodes.clear()}}}function mC(e){e.updateLayout()}function gC(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?Xt(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=Wt(f);f.min=r[d].min,f.max=f.min+h}):Mm(s,n.layoutBox,r)&&Xt(d=>{const f=i?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=io();hs(a,r,n.layoutBox);const l=io();i?hs(l,e.applyTransform(o,!0),n.measuredBox):hs(l,r,n.layoutBox);const c=!bm(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();ps(p,n.layoutBox,f.layoutBox);const m=st();ps(m,r,h.layoutBox),wm(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 yC(e){window.MotionDebug&&Sr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function vC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function bC(e){e.clearSnapshot()}function Pm(e){e.clearMeasurements()}function wC(e){e.isLayoutDirty=!1}function xC(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function km(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function SC(e){e.resolveTargetDelta()}function TC(e){e.calcProjection()}function EC(e){e.resetSkewAndRotation()}function CC(e){e.removeLeadSnapshot()}function Om(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 _m(e,t,n,r){e.min=Ze(t.min,n.min,r),e.max=Ze(t.max,n.max,r)}function PC(e,t,n,r){_m(e.x,t.x,n.x,r),_m(e.y,t.y,n.y,r)}function kC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const OC={duration:.45,ease:[.4,0,.1,1]},Am=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Im=Am("applewebkit/")&&!Am("chrome/")?Math.round:bt;function Dm(e){e.min=Im(e.min),e.max=Im(e.max)}function _C(e){Dm(e.x),Dm(e.y)}function Mm(e,t,n){return e==="position"||e==="preserve-aspect"&&!IE(xm(t),xm(n),.2)}const AC=Cm({attachResizeListener:(e,t)=>On(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),wc={current:void 0},Nm=Cm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!wc.current){const e=new AC({});e.mount(window),e.setOptions({layoutScroll:!0}),wc.current=e}return wc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),IC={pan:{Feature:YE},drag:{Feature:GE,ProjectionNode:Nm,MeasureLayout:am}},xc={current:null},Fm={current:!1};function DC(){if(Fm.current=!0,!!El)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>xc.current=e.matches;e.addListener(t),t()}else xc.current=!1}function MC(e,t,n){for(const r in t){const o=t[r],s=n[r];if(wt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&cc(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(wt(s))e.addValue(r,so(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,so(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Lm=new WeakMap,NC=[...Wh,Pt,Xn],FC=e=>NC.find(zh(e)),Vm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],LC=kl.length;class VC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.applyWillChange=!1,this.resolveKeyframes=(f,h,p,m)=>new this.KeyframeResolver(f,h,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ul,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,Ae.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=pi(n),this.isVariantNode=oh(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&&wt(h)&&h.set(l[f],!1)}}mount(t){this.current=t,Lm.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)),Fm.current||DC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:xc.current,process.env.NODE_ENV!=="production"&&cc(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(){Lm.delete(this.current),this.projection&&this.projection.unmount(),fn(this.notifyUpdate),fn(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){const r=Un.has(t),o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Ae.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in eo){const n=eo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):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<Vm.length;r++){const o=Vm[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=MC(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<LC;r++){const o=kl[r],s=this.props[o];(es(s)||s===!1)&&(n[o]=s)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=so(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"&&(Vh(o)||Lh(o))?o=parseFloat(o):!FC(o)&&Xn.test(n)&&(o=Jh(t,n)),this.setBaseTarget(t,wt(o)?o.get():o)),wt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=Ll(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!wt(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new lc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class $m extends VC{constructor(){super(...arguments),this.KeyframeResolver=ep}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 $C(e){return window.getComputedStyle(e)}class RC extends $m{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=vh}readValueFromInstance(t,n){if(Un.has(n)){const r=Zl(n);return r&&r.default||0}else{const r=$C(t),o=(ch(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return rm(t,n)}build(t,n,r){Il(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Fl(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;wt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class jC extends $m{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=st}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Un.has(n)){const r=Zl(n);return r&&r.default||0}return n=bh.has(n)?n:fi(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return xh(t,n,r)}build(t,n,r){Ml(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){wh(t,n,r,o)}mount(t){this.isSVGTag=Nl(t.tagName),super.mount(t)}}const BC=(e,t)=>Ol(e)?new jC(t):new RC(t,{allowProjection:e!==w.Fragment}),zC={...TE,...LS,...IC,...{layout:{ProjectionNode:Nm,MeasureLayout:am}}},Ht=H1((e,t)=>TS(e,t,zC,BC));function Rm(){const e=w.useRef(!1);return di(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function jm(){const e=Rm(),[t,n]=w.useState(0),r=w.useCallback(()=>{e.current&&n(t+1)},[t]);return[w.useCallback(()=>Ae.postRender(r),[r]),t]}class WC 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 HC({children:e,isPresent:t}){const n=w.useId(),r=w.useRef(null),o=w.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=w.useContext(Qr);return w.useInsertionEffect(()=>{const{width:i,height:a,top:l,left:c}=o.current;if(t||!r.current||!i||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return s&&(u.nonce=s),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
124
|
+
*/const rh=st("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
125
|
+
* @license lucide-react v0.414.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const G1=st("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"}]]),no=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),mi=b.createContext({}),gi=b.createContext(null),Il=typeof document<"u",yi=Il?b.useLayoutEffect:b.useEffect,oh=b.createContext({strict:!1}),vi=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),sh="data-"+vi("framerAppearId"),Y1={skipAnimations:!1,useManualTiming:!1};function q1(e){let t=new Set,n=new Set,r=!1,o=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function a(c){s.has(c)&&(l.schedule(c),e()),c(i)}const l={schedule:(c,u=!1,d=!1)=>{const h=d&&r?t:n;return u&&s.add(c),h.has(c)||h.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(i=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const bi=["read","resolveKeyframes","update","preRender","render","postRender"],K1=40;function ih(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=bi.reduce((v,w)=>(v[w]=q1(s),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,K1),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:bi.reduce((v,w)=>{const g=i[w];return v[w]=(S,T=!1,E=!1)=>(n||p(),g.schedule(S,T,E)),v},{}),cancel:v=>{for(let w=0;w<bi.length;w++)i[bi[w]].cancel(v)},state:o,steps:i}}const{schedule:_l,cancel:KL}=ih(queueMicrotask,!1);function ro(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const ah=b.createContext({});let lh=!1;function Z1(e,t,n,r,o){const{visualElement:s}=b.useContext(mi),i=b.useContext(oh),a=b.useContext(gi),l=b.useContext(no).reducedMotion,c=b.useRef();r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=b.useContext(ah);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&Q1(c.current,n,o,d),b.useInsertionEffect(()=>{u&&u.update(n,a)});const f=b.useRef(!!(n[sh]&&!window.HandoffComplete));return yi(()=>{u&&(u.updateFeatures(),_l.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(X1))))}),u}function X1(){window.HandoffComplete=!0}function Q1(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ch(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&ro(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function ch(e){if(e)return e.options.allowProjection!==!1?e.projection:ch(e.parent)}function J1(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 rs(e){return typeof e=="string"||Array.isArray(e)}function os(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Al=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Dl=["initial",...Al];function wi(e){return os(e.animate)||Dl.some(t=>rs(e[t]))}function uh(e){return!!(wi(e)||e.variants)}function eT(e,t){if(wi(e)){const{initial:n,animate:r}=e;return{initial:n===!1||rs(n)?n:void 0,animate:rs(r)?r:void 0}}return e.inherit!==!1?t:{}}function tT(e){const{initial:t,animate:n}=eT(e,b.useContext(mi));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"]},oo={};for(const e in fh)oo[e]={isEnabled:t=>fh[e].some(n=>!!t[n])};function nT(e){for(const t in e)oo[t]={...oo[t],...e[t]}}const ss=b.createContext({}),rT=Symbol.for("motionComponentSymbol"),wt=e=>e;let so=wt,en=wt;process.env.NODE_ENV!=="production"&&(so=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},en=(e,t)=>{if(!e)throw new Error(t)});function oT({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&nT(e);function s(a,l){let c;const u={...b.useContext(no),...a,layoutId:sT(a)},{isStatic:d}=u,f=tT(a),h=r(a,d);if(!d&&Il){iT(u,e);const p=aT(u);c=p.MeasureLayout,f.visualElement=Z1(o,h,u,t,p.ProjectionNode)}return x.jsxs(mi.Provider,{value:f,children:[c&&f.visualElement?x.jsx(c,{visualElement:f.visualElement,...u}):null,n(o,a,J1(h,f.visualElement,l),h,d,f.visualElement)]})}const i=b.forwardRef(s);return i[rT]=o,i}function sT({layoutId:e}){const t=b.useContext(ss).id;return t&&e!==void 0?t+"-"+e:e}function iT(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):en(!1,r)}}function aT(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 lT(e){function t(r,o={}){return oT(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 cT=["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:!!(cT.indexOf(e)>-1||/[A-Z]/u.test(e))}const xi={};function uT(e){Object.assign(xi,e)}const is=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Yn=new Set(is);function hh(e,{layout:t,layoutId:n}){return Yn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!xi[e]||e==="opacity")}const xt=e=>!!(e&&e.getVelocity),dT={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fT=is.length;function hT(e,t,n){let r="";for(let o=0;o<fT;o++){const s=is[o];if(e[s]!==void 0){const i=dT[s]||s;r+=`${i}(${e[s]}) `}}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("--"),pT=ph("var(--"),Nl=e=>pT(e)?mT.test(e.split("/*")[0].trim()):!1,mT=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,gT=(e,t)=>t&&typeof e=="number"?t.transform(e):e,qn=(e,t,n)=>n>t?t:n<e?e:n,io={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},as={...io,transform:e=>qn(0,1,e)},Ti={...io,default:1},ls=e=>Math.round(e*1e5)/1e5,Fl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,yT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,vT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function cs(e){return typeof e=="string"}function bT(e){return e==null}const us=e=>({test:t=>cs(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kn=us("deg"),dn=us("%"),fe=us("px"),wT=us("vh"),xT=us("vw"),gh={...dn,parse:e=>dn.parse(e)/100,transform:e=>dn.transform(e*100)},yh={...io,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:Ti,scaleX:Ti,scaleY:Ti,scaleZ:Ti,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:as,originX:gh,originY:gh,originZ:fe,zIndex:yh,backgroundPositionX:fe,backgroundPositionY:fe,fillOpacity:as,strokeOpacity:as,numOctaves:yh};function Ll(e,t,n){const{style:r,vars:o,transform:s,transformOrigin:i}=e;let a=!1,l=!1,c=!0;for(const u in t){const d=t[u];if(mh(u)){o[u]=d;continue}const f=vh[u],h=gT(d,f);if(Yn.has(u)){if(a=!0,s[u]=h,!c)continue;d!==(f.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,i[u]=h):r[u]=h}if(t.transform||(a||n?r.transform=hT(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:d="50%",originZ:f=0}=i;r.transformOrigin=`${u} ${d} ${f}`}}const 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 TT({transformTemplate:e},t){return b.useMemo(()=>{const n=Vl();return Ll(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ST(e,t){const n=e.style||{},r={};return bh(r,n,e),Object.assign(r,TT(e,t)),r}function ET(e,t){const n={},r=ST(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 Si(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=>!Si(e);function xh(e){e&&(wh=t=>t.startsWith("on")?!Si(t):e(t))}try{xh(require("@emotion/is-prop-valid").default)}catch{}function PT(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(wh(o)||n===!0&&Si(o)||!t&&!Si(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 kT(e,t,n){const r=Th(t,e.x,e.width),o=Th(n,e.y,e.height);return`${r} ${o}`}const OT={offset:"stroke-dashoffset",array:"stroke-dasharray"},IT={offset:"strokeDashoffset",array:"strokeDasharray"};function _T(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?OT:IT;e[s.offset]=fe.transform(-r);const i=fe.transform(t),a=fe.transform(n);e[s.array]=`${i} ${a}`}function $l(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,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||s!==void 0||h.transform)&&(h.transformOrigin=kT(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&_T(f,i,a,l,!1)}const Sh=()=>({...Vl(),attrs:{}}),Rl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function AT(e,t,n,r){const o=b.useMemo(()=>{const s=Sh();return $l(s,t,Rl(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};bh(s,e.style,e),o.style={...s,...o.style}}return o}function DT(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Ml(n)?AT:ET)(r,s,i,n),c=PT(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 s in n)e.style.setProperty(s,n[s])}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:vi(o),t.attrs[o])}function jl(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(xt(o[i])||t.style&&xt(t.style[i])||hh(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),s}function kh(e,t,n){const r=jl(e,t,n);for(const o in e)if(xt(e[o])||xt(t[o])){const s=is.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=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,s]=Oh(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=Oh(r);t=t(n!==void 0?n:e.custom,o,s)}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),MT=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),NT=e=>zl(e)?e[e.length-1]||0:e;function Ei(e){const t=xt(e)?e.get():e;return MT(t)?t.toValue():t}const Ih=new Set(["opacity","clipPath","filter","transform"]);function _h(e){if(Yn.has(e))return"transform";if(Ih.has(e))return vi(e)}function Ci(e,t){e.indexOf(t)===-1&&e.push(t)}function Pi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function FT([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[s]=e.splice(t,1);e.splice(o,0,s)}return e}function LT({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,s,i,a){const l={latestValues:$T(o,s,i,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Ah=e=>(t,n)=>{const r=b.useContext(mi),o=b.useContext(gi),s=()=>LT(e,t,r,o,n);return n?s():Zn(s)};function VT(e,t){const n=_h(t);n&&Ci(e,n)}function Dh(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const s=Bl(e,r[o]);if(s){const{transitionEnd:i,transition:a,...l}=s;n(l,i)}}}function $T(e,t,n,r,o){var s;const i={},a=[],l=r&&((s=e.style)===null||s===void 0?void 0:s.willChange)===void 0,c=o(e,{});for(const y in c)i[y]=Ei(c[y]);let{initial:u,animate:d}=e;const f=wi(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"&&!os(m)&&Dh(e,m,(y,v)=>{for(const w in y){let g=y[w];if(Array.isArray(g)){const S=p?g.length-1:0;g=g[S]}g!==null&&(i[w]=g)}for(const w in v)i[w]=v[w]}),l&&(d&&u!==!1&&!os(d)&&Dh(e,d,y=>{for(const v in y)VT(a,v)}),a.length&&(i.willChange=a.join(","))),i}const{schedule:Ae,cancel:fn,state:Tt,steps:Wl}=ih(typeof requestAnimationFrame<"u"?requestAnimationFrame:wt,!0),RT={useVisualState:Ah({scrapeMotionValuesFromProps:kh,createRenderState:Sh,onMount:(e,t,{renderState:n,latestValues:r})=>{Ae.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Ae.render(()=>{$l(n,r,Rl(t.tagName),e.transformTemplate),Ph(t,n)})}})},jT={useVisualState:Ah({applyWillChange:!0,scrapeMotionValuesFromProps:jl,createRenderState:Vl})};function BT(e,{forwardMotionProps:t=!1},n,r){return{...Ml(e)?RT:jT,preloadedFeatures:n,useRender:DT(t),createVisualElement:r,Component:e}}function On(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 ki(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const zT=e=>t=>Mh(t)&&e(t,ki(t));function In(e,t,n,r){return On(e,t,zT(n),r)}const WT=(e,t)=>n=>t(e(n)),_n=(...e)=>e.reduce(WT);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=(s,i)=>{if(s.pointerType==="touch"||$h())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Ae.postRender(()=>l(s,i))};return In(e.current,n,o,{passive:!e.getProps()[r]})}class HT extends Xn{mount(){this.unmount=_n(Rh(this.node,!0),Rh(this.node,!1))}unmount(){}}class UT 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(On(this.node.current,"focus",()=>this.onFocus()),On(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,ki(n))}class GT 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(),s=In(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&&Ae.update(()=>f(a,l))},{passive:!(r.onTap||r.onPointerUp)}),i=In(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=_n(s,i),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const i=a=>{a.key!=="Enter"||!this.checkPressEnd()||Hl("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Ae.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=On(this.node.current,"keyup",i),Hl("down",(a,l)=>{this.startPress(a,l)})},n=On(this.node.current,"keydown",t),r=()=>{this.isPressing&&Hl("cancel",(s,i)=>this.cancelPress(s,i))},o=On(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&&Ae.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&&Ae.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=In(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=On(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,YT=e=>{const t=Ul.get(e.target);t&&t(e)},qT=e=>{e.forEach(YT)};function KT({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(qT,{root:e,...t})),r[o]}function ZT(e,t,n){const r=KT(t);return Ul.set(e,n),r.observe(e),()=>{Ul.delete(e),r.unobserve(e)}}const XT={some:0,all:1};class QT 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:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:XT[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return ZT(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(JT(t,n))&&this.startObserver()}unmount(){}}function JT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const eS={inView:{Feature:QT},tap:{Feature:GT},focus:{Feature:UT},hover:{Feature:HT}};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 Oi(e,t,n){const r=e.getProps();return Bl(r,t,n!==void 0?n:r.custom,e)}const An=e=>e*1e3,Dn=e=>e/1e3,tS={type:"spring",stiffness:500,damping:25,restSpeed:10},nS=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),rS={type:"keyframes",duration:.8},oS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sS=(e,{keyframes:t})=>t.length>2?rS:Yn.has(e)?e.startsWith("scale")?nS(t[1]):tS:oS;function iS({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Yl(e,t){return e[t]||e.default||e}const aS=e=>e!==null;function Ii(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(aS),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}let _i;function lS(){_i=void 0}const Qn={now:()=>(_i===void 0&&Qn.set(Tt.isProcessing||Y1.useManualTiming?Tt.timestamp:performance.now()),_i),set:e=>{_i=e,queueMicrotask(lS)}},zh=e=>/^0[^.\s]+$/u.test(e);function cS(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),uS=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function dS(e){const t=uS.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const fS=4;function Hh(e,t,n=1){en(n<=fS,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=dS(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Wh(i)?parseFloat(i):i}return Nl(o)?Hh(o,t,n+1):o}const hS=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Uh=e=>e===io||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 s=r.match(/^matrix\((.+)\)$/u);return s?Gh(s[1],e):0}},pS=new Set(["x","y","z"]),mS=is.filter(e=>!pS.has(e));function gS(e){const t=[];return mS.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:Yh(4,13),y:Yh(5,14)};ao.translateX=ao.x,ao.translateY=ao.y;const qh=e=>t=>t.test(e),Kh=[io,fe,dn,Kn,xT,wT,{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=gS(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Kl=!1,ql=!1,Tr.forEach(e=>e.complete()),Tr.clear()}function Qh(){Tr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Kl=!0)})}function yS(){Qh(),Xh()}class Zl{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Tr.add(this),ql||(ql=!0,Ae.read(Qh),Ae.resolveKeyframes(Xh))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Tr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Tr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Xl=(e,t)=>n=>!!(cs(n)&&vT.test(n)&&n.startsWith(e)||t&&!bT(n)&&Object.prototype.hasOwnProperty.call(n,t)),Jh=(e,t,n)=>r=>{if(!cs(r))return r;const[o,s,i,a]=r.match(Fl);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},vS=e=>qn(0,255,e),Ql={...io,transform:e=>Math.round(vS(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)+", "+ls(as.transform(r))+")"};function bS(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:bS,transform:Sr.transform},lo={test:Xl("hsl","hue"),parse:Jh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+dn.transform(ls(t))+", "+dn.transform(ls(n))+", "+ls(as.transform(r))+")"},It={test:e=>Sr.test(e)||Jl.test(e)||lo.test(e),parse:e=>Sr.test(e)?Sr.parse(e):lo.test(e)?lo.parse(e):Jl.parse(e),transform:e=>cs(e)?e:e.hasOwnProperty("red")?Sr.transform(e):lo.transform(e)};function wS(e){var t,n;return isNaN(e)&&cs(e)&&(((t=e.match(Fl))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(yT))===null||n===void 0?void 0:n.length)||0)>0}const ep="number",tp="color",xS="var",TS="var(",np="${}",SS=/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 ds(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(SS,l=>(It.test(l)?(r.color.push(s),o.push(tp),n.push(It.parse(l))):l.startsWith(TS)?(r.var.push(s),o.push(xS),n.push(l)):(r.number.push(s),o.push(ep),n.push(parseFloat(l))),++s,np)).split(np);return{values:n,split:a,indexes:r,types:o}}function rp(e){return ds(e).values}function op(e){const{split:t,types:n}=ds(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===ep?s+=ls(o[i]):a===tp?s+=It.transform(o[i]):s+=o[i]}return s}}const ES=e=>typeof e=="number"?0:e;function CS(e){const t=rp(e);return op(e)(t.map(ES))}const Jn={test:wS,parse:rp,createTransformer:op,getAnimatableNone:CS},PS=new Set(["brightness","contrast","saturate","opacity"]);function kS(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 s=PS.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const OS=/\b([a-z-]*)\(.*?\)/gu,ec={...Jn,getAnimatableNone:e=>{const t=e.match(OS);return t?t.map(kS).join(" "):e}},IS={...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=>IS[e];function sp(e,t){let n=tc(e);return n!==ec&&(n=Jn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const _S=new Set(["auto","none","0"]);function AS(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!_S.has(s)&&ds(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=sp(n,o)}class ip 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(),!hS.has(r)||t.length!==2)return;const[o,s]=t,i=Zh(o),a=Zh(s);if(i!==a)if(Uh(i)&&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++)cS(t[o])&&r.push(o);r.length&&AS(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 s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=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 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 DS(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 MS(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=lp(o,t),a=lp(s,t);return so(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:DS(e)||n==="spring"&&r}class cp{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&yS(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!MS(t,r,o,s))if(i)this.options.duration=0;else{l==null||l(Ii(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 NS=5;function dp(e,t,n){const r=Math.max(t-NS,0);return up(n-e(r),t-r)}const nc=.001,FS=.01,fp=10,LS=.05,VS=1;function $S({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;so(e<=An(fp),"Spring duration must be 10 seconds or less");let i=1-t;i=qn(LS,VS,i),e=qn(FS,fp,Dn(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=rc(c,i),p=Math.exp(-d);return nc-f/h*p},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=rc(Math.pow(c,2),i);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},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=jS(o,s,a);if(e=An(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const RS=12;function jS(e,t,n){let r=n;for(let o=1;o<RS;o++)r=r-e(r)/t(r);return r}function rc(e,t){return e*Math.sqrt(1-t*t)}const BS=["duration","bounce"],zS=["stiffness","damping","mass"];function hp(e,t){return t.some(n=>e[n]!==void 0)}function WS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!hp(e,zS)&&hp(e,BS)){const n=$S(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function pp({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],i={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:f}=WS({...r,velocity:-Dn(r.velocity||0)}),h=d||0,p=l/(2*Math.sqrt(a*c)),m=s-o,y=Dn(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 g=rc(y,p);w=S=>{const T=Math.exp(-p*y*S);return s-T*((h+p*y*m)/g*Math.sin(g*S)+m*Math.cos(g*S))}}else if(p===1)w=g=>s-Math.exp(-y*g)*(m+(h+y*m)*g);else{const g=y*Math.sqrt(p*p-1);w=S=>{const T=Math.exp(-p*y*S),E=Math.min(g*S,300);return s-T*((h+p*y*m)*Math.sinh(E)+g*m*Math.cosh(E))/g}}return{calculatedDuration:f&&u||null,next:g=>{const S=w(g);if(f)i.done=g>=u;else{let T=h;g!==0&&(p<1?T=dp(w,g,S):T=0);const E=Math.abs(T)<=n,k=Math.abs(s-S)<=t;i.done=E&&k}return i.value=i.done?s:S,i}}}function mp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=n*t;const y=d+m,v=i===void 0?y:i(y);v!==y&&(m=v-d);const w=A=>-m*Math.exp(-A/r),g=A=>v+w(A),S=A=>{const D=w(A),I=g(A);f.done=Math.abs(D)<=c,f.value=f.done?v:I};let T,E;const k=A=>{h(f.value)&&(T=A,E=pp({keyframes:[f.value,p(f.value)],velocity:dp(g,A,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:A=>{let D=!1;return!E&&T===void 0&&(D=!0,S(A),k(A)),T!==void 0&&A>=T?E.next(A-T):(!D&&S(A),f)}}}const gp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,HS=1e-7,US=12;function GS(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=gp(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>HS&&++a<US);return i}function fs(e,t,n,r){if(e===t&&n===r)return wt;const o=s=>GS(s,0,1,e,n);return s=>s===0||s===1?s:gp(o(s),t,r)}const YS=fs(.42,0,1,1),qS=fs(0,0,.58,1),yp=fs(.42,0,.58,1),KS=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),ZS=vp(oc),xp=fs(.33,1.53,.69,.99),sc=bp(xp),XS=vp(sc),Tp={linear:wt,easeIn:YS,easeInOut:yp,easeOut:qS,circIn:oc,circInOut:ZS,circOut:wp,backIn:sc,backInOut:XS,backOut:xp,anticipate:e=>(e*=2)<1?.5*sc(e):.5*(2-Math.pow(2,-10*(e-1)))},Sp=e=>{if(Array.isArray(e)){en(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return fs(t,n,r,o)}else if(typeof e=="string")return en(Tp[e]!==void 0,`Invalid easing type '${e}'`),Tp[e];return e},hs=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ze=(e,t,n)=>e+(t-e)*n;function ic(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 QS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=ic(l,a,e+1/3),s=ic(l,a,e),i=ic(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function Ai(e,t){return n=>n>0?t:e}const ac=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},JS=[Jl,Sr,lo],eE=e=>JS.find(t=>t.test(e));function Ep(e){const t=eE(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===lo&&(n=QS(n)),n}const Cp=(e,t)=>{const n=Ep(e),r=Ep(t);if(!n||!r)return Ai(e,t);const o={...n};return s=>(o.red=ac(n.red,r.red,s),o.green=ac(n.green,r.green,s),o.blue=ac(n.blue,r.blue,s),o.alpha=Ze(n.alpha,r.alpha,s),Sr.transform(o))},lc=new Set(["none","hidden"]);function tE(e,t){return lc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function nE(e,t){return n=>Ze(e,t,n)}function cc(e){return typeof e=="number"?nE:typeof e=="string"?Nl(e)?Ai:It.test(e)?Cp:sE:Array.isArray(e)?Pp:typeof e=="object"?It.test(e)?Cp:rE:Ai}function Pp(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>cc(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function rE(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 s in r)n[s]=r[s](o);return n}}function oE(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const sE=(e,t)=>{const n=Jn.createTransformer(t),r=ds(e),o=ds(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?tE(e,t):_n(Pp(oE(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.`),Ai(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 iE(e,t,n){const r=[],o=n||kp,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||wt:t;a=_n(l,a)}r.push(a)}return r}function Op(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(en(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=iE(t,r,o),a=i.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const d=hs(e[u],e[u+1],c);return i[u](d)};return n?c=>l(qn(e[0],e[s-1],c)):l}function aE(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=hs(0,t,r);e.push(Ze(n,1,o))}}function lE(e){const t=[0];return aE(t,e.length-1),t}function cE(e,t){return e.map(n=>n*t)}function uE(e,t){return e.map(()=>t||yp).splice(0,e.length-1)}function Di({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=KS(r)?r.map(Sp):Sp(r),s={done:!1,value:t[0]},i=cE(n&&n.length===t.length?n:lE(t),e),a=Op(i,t,{ease:Array.isArray(o)?o:uE(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Ip=2e4;function dE(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 fE=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ae.update(t,!0),stop:()=>fn(t),now:()=>Tt.isProcessing?Tt.timestamp:Qn.now()}},hE={decay:mp,inertia:mp,tween:Di,keyframes:Di,spring:pp},pE=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:s}=this.options,i=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(s,i,r,o):this.resolver=new t(s,i,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=hE[n]||Di;let l,c;a!==Di&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&en(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=_n(pE,kp(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=dE(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:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const 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 g=this.currentTime,S=s;if(h){const A=Math.min(this.currentTime,u)/d;let D=Math.floor(A),I=A%1;!I&&A>=1&&(I=1),I===1&&D--,D=Math.min(D,h+1),!!(D%2)&&(p==="reverse"?(I=1-I,m&&(I-=m/d)):p==="mirror"&&(S=i)),g=qn(0,1,I)*d}const T=w?{done:!1,value:l[0]}:S.next(g);a&&(T.value=a(T.value));let{done:E}=T;!w&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&o!==void 0&&(T.value=Ii(l,this.options,o)),y&&y(T.value),k&&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=An(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Dn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=fE,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 _p=e=>Array.isArray(e)&&typeof e[0]=="number";function Ap(e){return!!(!e||typeof e=="string"&&e in dc||_p(e)||Array.isArray(e)&&e.every(Ap))}const ps=([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:ps([0,.65,.55,1]),circOut:ps([.55,0,1,.45]),backIn:ps([.31,.01,.66,-.59]),backOut:ps([.33,1.53,.69,.99])};function mE(e){return Dp(e)||dc.easeOut}function Dp(e){if(e)return _p(e)?ps(e):Array.isArray(e)?e.map(mE):dc[e]}function gE(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=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:s+1,direction:i==="reverse"?"alternate":"normal"})}const yE=ap(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Mi=10,vE=2e4;function bE(e){return e.type==="spring"||!Ap(e.ease)}function wE(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 s=0;for(;!r.done&&s<vE;)r=n.sample(s),o.push(r.value),s+=Mi;return{times:void 0,keyframes:o,duration:s-Mi,ease:"linear"}}class Mp extends cp{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new ip(o,(s,i)=>this.onKeyframesResolved(s,i),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:s,ease:i,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(bE(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,...p}=this.options,m=wE(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,s=m.times,i=m.ease,a="keyframes"}const u=gE(l.owner.current,c,t,{...this.options,duration:o,times:s,ease:i});return u.startTime=Qn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;l.set(Ii(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:s,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return 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=An(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return 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:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,...f}=this.options,h=new uc({...f,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),p=An(this.time);c.setWithVelocity(h.sample(p-Mi).value,h.sample(p).value,Mi)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;return yE()&&r&&Ih.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}function xE(e,t){let n;const r=()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i};return Ae.update(r,!0),()=>fn(r)}const TE=ap(()=>window.ScrollTimeline!==void 0);class SE{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(TE()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),xE(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,s,i)=>a=>{const l=Yl(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-An(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),i&&i()},onStop:i,name:e,motionValue:t,element:s?void 0:o};iS(l)||(d={...d,...sS(e,d)}),d.duration&&(d.duration=An(d.duration)),d.repeatDelay&&(d.repeatDelay=An(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!s&&t.get()!==void 0){const h=Ii(d.keyframes,l);if(h!==void 0)return Ae.update(()=>{d.onUpdate(h),d.onComplete()}),new SE([])}return!s&&Mp.supports(d)?new Mp(d):new uc(d)};class hc{constructor(){this.subscriptions=[]}add(t){return Ci(this.subscriptions,t),()=>Pi(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Np=new Set;function pc(e,t,n){e||Np.has(t)||(console.warn(t),Np.add(t))}const Fp=30,EE=e=>!isNaN(parseFloat(e)),ms={current:void 0};class Lp{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=Qn.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Qn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=EE(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(),Ae.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 ms.current&&ms.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 co(e,t){return new Lp(e,t)}function CE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,co(n))}function PE(e,t){const n=Oi(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=NT(s[i]);CE(e,i,a)}}function Vp(e){return e.getProps()[sh]}class kE extends Lp{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=_h(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const s=this.counts.get(n)-1;this.counts.set(n,s),s===0&&(Pi(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function OE(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 kE("auto"),e.addValue("willChange",r)),OE(r))return r.add(t)}function IE({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 s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),h=l[d];if(h===void 0||u&&IE(u,d))continue;const p={delay:n,elapsed:0,...Yl(i||{},d)};let m=!1;if(window.HandoffAppearAnimations){const v=Vp(e);if(v){const w=window.HandoffAppearAnimations(v,d,f,Ae);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 y=f.animation;y&&c.push(y)}return a&&Promise.all(c).then(()=>{Ae.update(()=>{a&&PE(e,a)})}),c}function gc(e,t,n={}){var r;const o=Oi(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all($p(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return _E(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function _E(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(AE).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(gc(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function AE(e,t){return e.sortNodePosition(t)}function DE(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>gc(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=gc(e,t,n);else{const o=typeof t=="function"?Oi(e,t,n.custom):t;r=Promise.all($p(e,o,n))}return r.then(()=>{Ae.postRender(()=>{e.notify("AnimationComplete",t)})})}const ME=[...Al].reverse(),NE=Al.length;function FE(e){return t=>Promise.all(t.map(({animation:n,options:r})=>DE(e,n,r)))}function LE(e){let t=FE(e),n=Rp(),r=!0;const o=l=>(c,u)=>{var d;const f=Oi(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],f=new Set;let h={},p=1/0;for(let y=0;y<NE;y++){const v=ME[y],w=n[v],g=c[v]!==void 0?c[v]:u[v],S=rs(g),T=v===l?w.isActive:null;T===!1&&(p=y);let E=g===u[v]&&g!==c[v]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...h},!w.isActive&&T===null||!g&&!w.prevProp||os(g)||typeof g=="boolean")continue;let A=VE(w.prevProp,g)||v===l&&w.isActive&&!E&&S||y>p&&S,D=!1;const I=Array.isArray(g)?g:[g];let V=I.reduce(o(v),{});T===!1&&(V={});const{prevResolvedValues:F={}}=w,R={...F,...V},C=O=>{A=!0,f.has(O)&&(D=!0,f.delete(O)),w.needsAnimating[O]=!0;const M=e.getValue(O);M&&(M.liveStyle=!1)};for(const O in R){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=g,w.prevResolvedValues=V,w.isActive&&(h={...h,...V}),r&&e.blockInitialAnimation&&(A=!1),A&&(!E||D)&&d.push(...I.map(O=>({animation:O,options:{type:v}})))}if(f.size){const y={};f.forEach(v=>{const w=e.getBaseTarget(v),g=e.getValue(v);g&&(g.liveStyle=!0),y[v]=w??null}),d.push({animation:y})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Rp(),r=!0}}}function VE(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 $E extends Xn{constructor(t){super(t),t.animationState||(t.animationState=LE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();os(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let RE=0;class jE extends Xn{constructor(){super(...arguments),this.id=RE++}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 BE={animation:{Feature:$E},exit:{Feature:jE}},jp=(e,t)=>Math.abs(e-t);function zE(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:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=vc(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=zE(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:y,onMove:v}=this.handlers;f||(y&&y(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),Ae.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 y=vc(d.type==="pointercancel"?this.lastMoveEventInfo:yc(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,y),p&&p(d,y)},!Mh(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=ki(t),a=yc(i,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(In(this.contextWindow,"pointermove",this.handlePointerMove),In(this.contextWindow,"pointerup",this.handlePointerUp),In(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),fn(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,WE(t)),velocity:HE(t,.1)}}function WE(e){return e[0]}function Wp(e){return e[e.length-1]}function HE(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>An(t)));)n--;if(!r)return{x:0,y:0};const s=Dn(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}const Hp=1e-4,UE=1-Hp,GE=1+Hp,Up=.01,YE=0-Up,qE=0+Up;function Wt(e){return e.max-e.min}function KE(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>=UE&&e.scale<=GE||isNaN(e.scale))&&(e.scale=1),(e.translate>=YE&&e.translate<=qE||isNaN(e.translate))&&(e.translate=0)}function gs(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 ZE(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 ys(e,t,n){qp(e.x,t.x,n.x),qp(e.y,t.y,n.y)}function XE(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 QE(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 JE(e,t){return{x:Zp(e.x,t.x),y:Zp(e.y,t.y)}}function eC(e,t){let n=.5;const r=Wt(e),o=Wt(t);return o>r?n=hs(t.min,t.max-r,e.min):r>o&&(n=hs(e.min,e.max-o,t.min)),qn(0,1,n)}function tC(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 nC(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}),uo=()=>({x:Jp(),y:Jp()}),em=()=>({min:0,max:0}),it=()=>({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 rC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function oC(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 Ni(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=Ni(e,o,r)),Ni(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 sm(e,{x:t,y:n}){Tc(e.x,t.translate,t.scale,t.originPoint),Tc(e.y,n.translate,n.scale,n.originPoint)}const im=.999999999999,am=1.0000000000001;function sC(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&fo(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,sm(e,i)),r&&Cr(s.latestValues)&&fo(e,s.latestValues))}t.x<am&&t.x>im&&(t.x=1),t.y<am&&t.y>im&&(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 s=Ze(e.min,e.max,o);Tc(e,t,n,s,r)}function fo(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(oC(e.getBoundingClientRect(),t))}function iC(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,aC=new WeakMap;class lC{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=it(),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(ki(u,"page").point)},s=(u,d)=>{var f;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=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(dn.test(w)){const{projection:g}=this.visualElement;if(g&&g.layout){const S=g.layout.layoutBox[v];S&&(w=Wt(S)*(parseFloat(w)/100))}}this.originPoint[v]=w}),m&&Ae.postRender(()=>m(u,d)),(f=this.removeWillChange)===null||f===void 0||f.call(this),this.removeWillChange=mc(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:y}=d;if(h&&this.currentDirection===null){this.currentDirection=cC(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),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:s,onMove:i,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:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Ae.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Fi(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=XE(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&ro(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=QE(o.layoutBox,n):this.constraints=!1,this.elastic=nC(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Zt(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=tC(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ro(t))return!1;const r=t.current;en(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=iC(r,o.root,this.visualElement.getTransformPagePoint());let i=JE(o.layout.layoutBox,s);if(n){const a=n(rC(i));this.hasMutatedConstraints=!!a,a&&(i=tm(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Zt(u=>{if(!Fi(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(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(!Fi(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-Ze(i,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};Zt(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=eC({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Zt(i=>{if(!Fi(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Ze(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;aC.set(this.visualElement,this);const t=this.visualElement.current,n=In(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,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ae.read(r);const i=On(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()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=bc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function Fi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function cC(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class uC extends Xn{constructor(t){super(t),this.removeGroupControls=wt,this.removeListeners=wt,this.controls=new lC(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&&Ae.postRender(()=>e(t,n))};class dC 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:(s,i)=>{delete this.session,o&&Ae.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=In(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 fC(){const e=b.useContext(gi);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 Li={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vs={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}%`}},hC={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Jn.parse(e);if(o.length>5)return r;const s=Jn.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=Ze(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class pC extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;uT(mC),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Li.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||Ae.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),_l.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]=fC(),r=b.useContext(ss);return x.jsx(pC,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(ah),isPresent:t,safeToRemove:n})}const mC={borderRadius:{...vs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vs,borderTopRightRadius:vs,borderBottomLeftRadius:vs,borderBottomRightRadius:vs,boxShadow:hC},pm=["TopLeft","TopRight","BottomLeft","BottomRight"],gC=pm.length,mm=e=>typeof e=="string"?parseFloat(e):e,gm=e=>typeof e=="number"||fe.test(e);function yC(e,t,n,r,o,s){o?(e.opacity=Ze(0,n.opacity!==void 0?n.opacity:1,vC(r)),e.opacityExit=Ze(t.opacity!==void 0?t.opacity:1,0,bC(r))):s&&(e.opacity=Ze(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<gC;i++){const a=`border${pm[i]}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),(dn.test(c)||dn.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 vC=vm(0,.5,wp),bC=vm(.5,.95,wt);function vm(e,t,n){return r=>r<e?0:r>t?1:n(hs(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=Ni(e,1/n,r),o!==void 0&&(e=Ni(e,1/o,r)),e}function wC(e,t=0,n=1,r=.5,o,s=e,i=e){if(dn.test(t)&&(t=parseFloat(t),t=Ze(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Ze(s.min,s.max,r);e===s&&(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],s,i){wC(e,t[n],t[r],t[o],t.scale,s,i)}const xC=["x","scaleX","originX"],TC=["y","scaleY","originY"];function Sm(e,t,n,r){Tm(e.x,t,xC,n?n.x:void 0,r?r.x:void 0),Tm(e.y,t,TC,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 SC(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 EC{constructor(){this.members=[]}add(t){Ci(this.members,t),t.scheduleRender()}remove(t){if(Pi(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function CC(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const PC=(e,t)=>e.depth-t.depth;class kC{constructor(){this.children=[],this.isDirty=!1}add(t){Ci(this.children,t),this.isDirty=!0}remove(t){Pi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(PC),this.isDirty=!1,this.children.forEach(t)}}function OC(e,t){const n=Qn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(fn(r),e(s-t))};return Ae.read(r,!0),()=>fn(r)}function IC(e){return e instanceof SVGElement&&e.tagName!=="svg"}function _C(e,t,n){const r=xt(e)?e:co(e);return r.start(fc("",r,t,n)),r.animation}const Pr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Sc=["","X","Y","Z"],AC={visibility:"hidden"},Im=1e3;let DC=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 _m(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?_m(e.parent):!1:!1}function Am({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=DC++,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(FC),this.nodes.forEach(jC),this.nodes.forEach(BC),this.nodes.forEach(LC),window.MotionDebug&&window.MotionDebug.record(Pr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new kC)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new hc),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=IC(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=OC(f,250),Li.hasAnimatedSinceResize&&(Li.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()||GC,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),w=!this.targetLayout||!Pm(this.targetLayout,p)||h,g=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const S={...Yl(m,"layout"),onPlay:y,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 i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,fn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(zC),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&_m(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Dm);return}this.isUpdating||this.nodes.forEach($C),this.isUpdating=!1,this.nodes.forEach(RC),this.nodes.forEach(MC),this.nodes.forEach(NC),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,_l.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(VC),this.sharedNodes.forEach(WC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ae.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ae.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=it(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:i,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Cm(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Cr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),YC(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return it();const a=i.measureViewportBox(),{scroll:l}=this.root;return l&&(er(a.x,l.offset.x),er(a.y,l.offset.y)),a}removeElementScroll(i){const a=it();Xt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;if(c!==this.root&&u&&d.layoutScroll){if(u.isRoot){Xt(a,i);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(i,a=!1){const l=it();Xt(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&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(i){const a=it();Xt(a,i);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=it(),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(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Tt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Tt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=it(),this.relativeTargetOrigin=it(),ys(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=it(),this.targetWithTransforms=it()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ZE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Xt(this.target,this.layout.layoutBox),sm(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=it(),this.relativeTargetOrigin=it(),ys(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 i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===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;sC(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=it());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)),gs(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(i=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),i){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=uo(),this.projectionDelta=uo(),this.projectionDeltaWithTransform=uo()}setAnimationOrigin(i,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=it(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,y=this.getStack(),v=!y||y.members.length<=1,w=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(UC));this.animationProgress=0;let g;this.mixTargetDelta=S=>{const T=S/1e3;Nm(d.x,i.x,T),Nm(d.y,i.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ys(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),HC(this.relativeTarget,this.relativeTargetOrigin,f,T),g&&SC(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=it()),Xt(g,this.relativeTarget)),m&&(this.animationValues=u,yC(u,c,this.latestValues,T,w,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(fn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ae.update(()=>{Li.hasAnimatedSinceResize=!0,this.currentAnimation=_C(0,Im,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Im),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&Rm(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||it();const d=Wt(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=Wt(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}Xt(a,l),fo(a,u),gs(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new EC),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Ec("z",i,c,this.animationValues);for(let u=0;u<Sc.length;u++)Ec(`rotate${Sc[u]}`,i,c,this.animationValues),Ec(`skew${Sc[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return AC;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Ei(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const 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=Ei(i==null?void 0:i.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 xi){if(f[m]===void 0)continue;const{correct:y,applyTo:v}=xi[m],w=c.transform==="none"?f[m]:y(f[m],d);if(v){const g=v.length;for(let S=0;S<g;S++)c[v[S]]=w}else c[m]=w}return this.options.layoutId&&(c.pointerEvents=d===this?Ei(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Dm),this.root.sharedNodes.clear()}}}function MC(e){e.updateLayout()}function NC(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?Zt(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=Wt(f);f.min=r[d].min,f.max=f.min+h}):Rm(s,n.layoutBox,r)&&Zt(d=>{const f=i?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=uo();gs(a,r,n.layoutBox);const l=uo();i?gs(l,e.applyTransform(o,!0),n.measuredBox):gs(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=it();ys(p,n.layoutBox,f.layoutBox);const m=it();ys(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 FC(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 LC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function VC(e){e.clearSnapshot()}function Dm(e){e.clearMeasurements()}function $C(e){e.isLayoutDirty=!1}function RC(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 jC(e){e.resolveTargetDelta()}function BC(e){e.calcProjection()}function zC(e){e.resetSkewAndRotation()}function WC(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 HC(e,t,n,r){Fm(e.x,t.x,n.x,r),Fm(e.y,t.y,n.y,r)}function UC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const GC={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 YC(e){$m(e.x),$m(e.y)}function Rm(e,t,n){return e==="position"||e==="preserve-aspect"&&!KE(km(t),km(n),.2)}const qC=Am({attachResizeListener:(e,t)=>On(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=Am({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Cc.current){const e=new qC({});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"}),KC={pan:{Feature:dC},drag:{Feature:uC,ProjectionNode:jm,MeasureLayout:hm}},Pc={current:null},Bm={current:!1};function ZC(){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 XC(e,t,n){for(const r in t){const o=t[r],s=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(s))e.addValue(r,co(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,co(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const zm=new WeakMap,QC=[...Kh,It,Jn],JC=e=>QC.find(qh(e)),Wm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],eP=Dl.length;class tP{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.applyWillChange=!1,this.resolveKeyframes=(f,h,p,m)=>new this.KeyframeResolver(f,h,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=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,Ae.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=wi(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||ZC(),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(),fn(this.notifyUpdate),fn(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){const r=Yn.has(t),o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Ae.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in 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 s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):it()}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 s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=XC(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<eP;r++){const o=Dl[r],s=this.props[o];(rs(s)||s===!1)&&(n[o]=s)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=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"&&(Wh(o)||zh(o))?o=parseFloat(o):!JC(o)&&Jn.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 i=Bl(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!xt(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new hc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Hm extends tP{constructor(){super(...arguments),this.KeyframeResolver=ip}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 nP(e){return window.getComputedStyle(e)}class rP 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=nP(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 oP extends Hm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=it}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:vi(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 sP=(e,t)=>Ml(e)?new oP(t):new rP(t,{allowProjection:e!==b.Fragment}),iP={...BE,...eS,...KC,...{layout:{ProjectionNode:jm,MeasureLayout:hm}}},Ht=lT((e,t)=>BT(e,t,iP,sP));function Um(){const e=b.useRef(!1);return yi(()=>(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(()=>Ae.postRender(r),[r]),t]}class aP extends _.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 lP({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),o=b.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=b.useContext(no);return b.useInsertionEffect(()=>{const{width:i,height:a,top:l,left:c}=o.current;if(t||!r.current||!i||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return s&&(u.nonce=s),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
125
130
|
[data-motion-pop-id="${n}"] {
|
|
126
131
|
position: absolute !important;
|
|
127
132
|
width: ${i}px !important;
|
|
@@ -129,7 +134,7 @@
|
|
|
129
134
|
top: ${l}px !important;
|
|
130
135
|
left: ${c}px !important;
|
|
131
136
|
}
|
|
132
|
-
`),()=>{document.head.removeChild(u)}},[t]),x.jsx(WC,{isPresent:t,childRef:r,sizeRef:o,children:M.cloneElement(e,{ref:r})})}const Sc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const a=qn(UC),l=w.useId(),c=w.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const d of a.values())if(!d)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),s?[Math.random()]:[n]);return w.useMemo(()=>{a.forEach((u,d)=>a.set(d,!1))},[n]),M.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),i==="popLayout"&&(e=x.jsx(HC,{isPresent:n,children:e})),x.jsx(ui.Provider,{value:c,children:e})};function UC(){return new Map}function GC(e){return w.useEffect(()=>()=>e(),[])}const Tr=e=>e.key||"";function YC(e,t){e.forEach(n=>{const r=Tr(n);t.set(r,n)})}function qC(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const Ii=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:s=!0,mode:i="sync"})=>{tn(!o,"Replace exitBeforeEnter with mode='wait'");const a=w.useContext(ns).forceRender||jm()[0],l=Rm(),c=qC(e);let u=c;const d=w.useRef(new Map).current,f=w.useRef(u),h=w.useRef(new Map).current,p=w.useRef(!0);if(di(()=>{p.current=!1,YC(c,h),f.current=u}),GC(()=>{p.current=!0,h.clear(),d.clear()}),p.current)return x.jsx(x.Fragment,{children:u.map(b=>x.jsx(Sc,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:s,mode:i,children:b},Tr(b)))});u=[...u];const m=f.current.map(Tr),y=c.map(Tr),v=m.length;for(let b=0;b<v;b++){const g=m[b];y.indexOf(g)===-1&&!d.has(g)&&d.set(g,void 0)}return i==="wait"&&d.size&&(u=[]),d.forEach((b,g)=>{if(y.indexOf(g)!==-1)return;const T=h.get(g);if(!T)return;const S=m.indexOf(g);let E=b;if(!E){const C=()=>{d.delete(g);const k=Array.from(h.keys()).filter(I=>!y.includes(I));if(k.forEach(I=>h.delete(I)),f.current=c.filter(I=>{const N=Tr(I);return N===g||k.includes(N)}),!d.size){if(l.current===!1)return;a(),r&&r()}};E=x.jsx(Sc,{isPresent:!1,onExitComplete:C,custom:t,presenceAffectsLayout:s,mode:i,children:T},Tr(T)),d.set(g,E)}u.splice(S,0,E)}),u=u.map(b=>{const g=b.key;return d.has(g)?b:x.jsx(Sc,{isPresent:!0,presenceAffectsLayout:s,mode:i,children:b},Tr(b))}),process.env.NODE_ENV!=="production"&&i==="wait"&&u.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x.jsx(x.Fragment,{children:d.size?u:u.map(b=>w.cloneElement(b))})};function KC({children:e,isValidProp:t,...n}){t&&mh(t),n={...w.useContext(Qr),...n},n.isStatic=qn(()=>n.isStatic);const r=w.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(Qr.Provider,{value:r,children:e})}const ZC=w.createContext(null),XC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Bm(){const e=new Set,t=new WeakMap,n=()=>e.forEach(XC);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 zm=e=>e===!0,QC=e=>zm(e===!0)||e==="id",JC=({children:e,id:t,inherit:n=!0})=>{const r=w.useContext(ns),o=w.useContext(ZC),[s,i]=jm(),a=w.useRef(null),l=r.id||o;a.current===null&&(QC(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:zm(n)&&r.group||Bm()});const c=w.useMemo(()=>({...a.current,forceRender:s}),[i]);return x.jsx(ns.Provider,{value:c,children:e})},Wm=w.createContext(null);function eP(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const s=r>0?1:-1,i=e[o+s];if(!i)return e;const a=e[o],l=i.layout,c=Ze(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?yS(e,o,o+s):e}function tP({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=qn(()=>Ht(t)),l=[],c=w.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(oP)},updateOrder:(d,f,h)=>{if(c.current)return;const p=eP(l,d,f,h);l!==p&&(c.current=!0,r(p.map(rP).filter(m=>o.indexOf(m)!==-1)))}};return w.useEffect(()=>{c.current=!1}),x.jsx(a,{...s,ref:i,ignoreStrict:!0,children:x.jsx(Wm.Provider,{value:u,children:e})})}const nP=w.forwardRef(tP);function rP(e){return e.value}function oP(e,t){return e.layout.min-t.layout.min}function lo(e){const t=qn(()=>so(e)),{isStatic:n}=w.useContext(Qr);if(n){const[,r]=w.useState(e);w.useEffect(()=>t.on("change",r),[])}return t}const sP=e=>e&&typeof e=="object"&&e.mix,iP=e=>sP(e)?e.mix:void 0;function aP(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],s=e[2+n],i=e[3+n],a=Sp(o,s,{mixer:iP(s[0]),...i});return t?a(r):a}function Hm(e,t){const n=lo(t()),r=()=>n.set(t());return r(),di(()=>{const o=()=>Ae.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),fn(r)}}),n}function lP(e){fs.current=[],e();const t=Hm(fs.current,e);return fs.current=void 0,t}function cP(e,t,n,r){if(typeof e=="function")return lP(e);const o=typeof t=="function"?t:aP(t,n,r);return Array.isArray(e)?Um(e,o):Um([e],([s])=>o(s))}function Um(e,t){const n=qn(()=>[]);return Hm(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Gm(e,t=0){return wt(e)?e:lo(t)}function uP({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=qn(()=>Ht(r)),c=w.useContext(Wm),u={x:Gm(t.x),y:Gm(t.y)},d=cP([u.x,u.y],([m,y])=>m||y?1:"unset");tn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:h,updateOrder:p}=c;return x.jsx(l,{drag:f,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:s,onDrag:(m,y)=>{const{velocity:v}=y;v[f]&&p(n,u[f].get(),v[f]),o&&o(m,y)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const dP=w.forwardRef(uP),Di={Group:nP,Item:dP};class fP{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 hP=()=>new fP;function pP(){return qn(hP)}const Ym={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},mP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},qm=e=>x.jsx(Ht.section,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:e.open,animate:e.open.toString(),"aria-hidden":!e.open,className:e.className,exit:Ym.false,transition:mP,variants:Ym,children:e.children}),gP=Js("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-contrast bg-success/10 border-success/50"}},defaultVariants:{theme:"neutral"}}),yP=w.forwardRef(function({className:t,theme:n,onClose:r,open:o,...s},i){return x.jsx("div",{"data-open":!!o,"aria-hidden":!o,className:"data-[open=true]:mb-4 isolate data-[open=true]:pointer-events-auto pointer-events-none",children:x.jsx(qm,{"data-open":!!o,open:!!o,children:x.jsxs(Zr,{...s,className:Ct(gP({theme:n}),t),ref:i,"data-theme":n,role:"alert",as:s.as??"div",children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[n==="success"?x.jsx(Zf,{size:20}):null,n==="danger"?x.jsx(w1,{size:20}):null,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:s.title})]}),s.children,o!==void 0?x.jsx("button",{type:"button",onClick:()=>r==null?void 0:r(!1),className:"text-foreground hover:text-danger absolute right-3 top-3 transition-colors duration-300 ease-in-out",children:x.jsx(Xf,{size:20})}):null]})})})});function Re(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 co(e,t){const n=Re(e);return isNaN(t)?Ge(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Mi(e,t){const n=Re(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 s=o.getDate();return r>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const Km=6048e5,vP=864e5,bP=6e4,wP=36e5,xP=1e3;let SP={};function Er(){return SP}function hn(e,t){var a,l,c,u;const n=Er(),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=Re(e),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function uo(e){return hn(e,{weekStartsOn:1})}function Zm(e){const t=Re(e),n=t.getFullYear(),r=Ge(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=uo(r),s=Ge(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=uo(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function fo(e){const t=Re(e);return t.setHours(0,0,0,0),t}function Ni(e){const t=Re(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 TP(e,t){const n=fo(e),r=fo(t),o=+n-Ni(n),s=+r-Ni(r);return Math.round((o-s)/vP)}function EP(e){const t=Zm(e),n=Ge(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),uo(n)}function Xm(e,t){const n=t*7;return co(e,n)}function Qm(e,t){return Mi(e,t*12)}function CP(e){return Ge(e,Date.now())}function PP(e,t){const n=fo(e),r=fo(t);return+n==+r}function kP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function OP(e){if(!kP(e)&&typeof e!="number")return!1;const t=Re(e);return!isNaN(Number(t))}function Jm(e,t){const n=Re(e.start),r=Re(e.end);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let a=1;const l=[];for(;+i<=s;)l.push(Re(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function eg(e){const t=Re(e);return t.setDate(1),t.setHours(0,0,0,0),t}function _P(e){const t=Re(e),n=Ge(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function AP(e,t){var a,l;const n=Er(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=Re(e),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const IP={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"}},DP=(e,t,n)=>{let r;const o=IP[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 Tc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const MP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},NP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},FP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},LP={date:Tc({formats:MP,defaultWidth:"full"}),time:Tc({formats:NP,defaultWidth:"full"}),dateTime:Tc({formats:FP,defaultWidth:"full"})},VP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$P=(e,t,n,r)=>VP[e];function gs(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const RP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},jP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},BP={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"]},zP={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"]},WP={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"}},HP={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"}},UP={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:gs({values:RP,defaultWidth:"wide"}),quarter:gs({values:jP,defaultWidth:"wide",argumentCallback:e=>e-1}),month:gs({values:BP,defaultWidth:"wide"}),day:gs({values:zP,defaultWidth:"wide"}),dayPeriod:gs({values:WP,defaultWidth:"wide",formattingValues:HP,defaultFormattingWidth:"wide"})};function ys(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?YP(a,d=>d.test(i)):GP(a,d=>d.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(i.length);return{value:c,rest:u}}}function GP(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function YP(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function qP(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const KP=/^(\d+)(th|st|nd|rd)?/i,ZP=/\d+/i,XP={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},QP={any:[/^b/i,/^(a|c)/i]},JP={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ek={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},nk={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]},rk={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},ok={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},ik={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}},ak={ordinalNumber:qP({matchPattern:KP,parsePattern:ZP,valueCallback:e=>parseInt(e,10)}),era:ys({matchPatterns:XP,defaultMatchWidth:"wide",parsePatterns:QP,defaultParseWidth:"any"}),quarter:ys({matchPatterns:JP,defaultMatchWidth:"wide",parsePatterns:ek,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ys({matchPatterns:tk,defaultMatchWidth:"wide",parsePatterns:nk,defaultParseWidth:"any"}),day:ys({matchPatterns:rk,defaultMatchWidth:"wide",parsePatterns:ok,defaultParseWidth:"any"}),dayPeriod:ys({matchPatterns:sk,defaultMatchWidth:"any",parsePatterns:ik,defaultParseWidth:"any"})},tg={code:"en-US",formatDistance:DP,formatLong:LP,formatRelative:$P,localize:UP,match:ak,options:{weekStartsOn:0,firstWeekContainsDate:1}};function lk(e){const t=Re(e);return TP(t,_P(t))+1}function ng(e){const t=Re(e),n=+uo(t)-+EP(t);return Math.round(n/Km)+1}function Ec(e,t){var u,d,f,h;const n=Re(e),r=n.getFullYear(),o=Er(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=Ge(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=hn(i,t),l=Ge(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=hn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function ck(e,t){var a,l,c,u;const n=Er(),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=Ec(e,t),s=Ge(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),hn(s,t)}function rg(e,t){const n=Re(e),r=+hn(n,t)-+ck(n,t);return Math.round(r/Km)+1}function Le(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Jn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Le(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Le(n+1,2)},d(e,t){return Le(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 Le(e.getHours()%12||12,t.length)},H(e,t){return Le(e.getHours(),t.length)},m(e,t){return Le(e.getMinutes(),t.length)},s(e,t){return Le(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Le(o,t.length)}},ho={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},og={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 Jn.y(e,t)},Y:function(e,t,n,r){const o=Ec(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return Le(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Le(s,t.length)},R:function(e,t){const n=Zm(e);return Le(n,t.length)},u:function(e,t){const n=e.getFullYear();return Le(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 Le(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 Le(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 Jn.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 Le(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=rg(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Le(o,t.length)},I:function(e,t,n){const r=ng(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Le(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Jn.d(e,t)},D:function(e,t,n){const r=lk(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Le(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Le(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Le(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Le(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=ho.noon:r===0?o=ho.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=ho.evening:r>=12?o=ho.afternoon:r>=4?o=ho.morning:o=ho.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 Jn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Jn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Le(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Le(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Jn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Jn.s(e,t)},S:function(e,t){return Jn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ig(r);case"XXXX":case"XX":return Cr(r);case"XXXXX":case"XXX":default:return Cr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ig(r);case"xxxx":case"xx":return Cr(r);case"xxxxx":case"xxx":default:return Cr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+sg(r,":");case"OOOO":default:return"GMT"+Cr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+sg(r,":");case"zzzz":default:return"GMT"+Cr(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Le(r,t.length)},T:function(e,t,n){const r=e.getTime();return Le(r,t.length)}};function sg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+Le(s,2)}function ig(e,t){return e%60===0?(e>0?"-":"+")+Le(Math.abs(e)/60,2):Cr(e,t)}function Cr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Le(Math.trunc(r/60),2),s=Le(r%60,2);return n+o+t+s}const ag=(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"})}},lg=(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"})}},Cc={p:lg,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return ag(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",ag(r,t)).replace("{{time}}",lg(o,t))}},uk=/^D+$/,dk=/^Y+$/,fk=["D","DD","YY","YYYY"];function cg(e){return uk.test(e)}function ug(e){return dk.test(e)}function Pc(e,t,n){const r=hk(e,t,n);if(console.warn(r),fk.includes(e))throw new RangeError(r)}function hk(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 pk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gk=/^'([^]*?)'?$/,yk=/''/g,vk=/[a-zA-Z]/;function bk(e,t,n){var u,d,f,h;const r=Er(),o=r.locale??tg,s=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=Re(e);if(!OP(a))throw new RangeError("Invalid time value");let l=t.match(mk).map(p=>{const m=p[0];if(m==="p"||m==="P"){const y=Cc[m];return y(p,o.formatLong)}return p}).join("").match(pk).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:wk(p)};if(og[m])return{isToken:!0,value:p};if(m.match(vk))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(ug(m)||cg(m))&&Pc(m,t,String(e));const y=og[m[0]];return y(a,m,o.localize,c)}).join("")}function wk(e){const t=e.match(gk);return t?t[1].replace(yk,"'"):e}function xk(){return Object.assign({},Er())}function Sk(e){let n=Re(e).getDay();return n===0&&(n=7),n}function Tk(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 Ek=10;class dg{constructor(){re(this,"subPriority",0)}validate(t,n){return!0}}class Ck extends dg{constructor(t,n,r,o,s){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,s&&(this.subPriority=s)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class Pk extends dg{constructor(){super(...arguments);re(this,"priority",Ek);re(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Ge(n,Tk(n,Date))}}class Ie{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new Ck(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class kk extends Ie{constructor(){super(...arguments);re(this,"priority",140);re(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 it={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}/},pn={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 at(e,t){return e&&{value:t(e.value),rest:e.rest}}function Xe(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function mn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*wP+s*bP+i*xP),rest:t.slice(n[0].length)}}function fg(e){return Xe(it.anyDigitsSigned,e)}function et(e,t){switch(e){case 1:return Xe(it.singleDigit,t);case 2:return Xe(it.twoDigits,t);case 3:return Xe(it.threeDigits,t);case 4:return Xe(it.fourDigits,t);default:return Xe(new RegExp("^\\d{1,"+e+"}"),t)}}function Fi(e,t){switch(e){case 1:return Xe(it.singleDigitSigned,t);case 2:return Xe(it.twoDigitsSigned,t);case 3:return Xe(it.threeDigitsSigned,t);case 4:return Xe(it.fourDigitsSigned,t);default:return Xe(new RegExp("^-?\\d{1,"+e+"}"),t)}}function kc(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 hg(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const s=r+50,i=Math.trunc(s/100)*100,a=e>=s%100;o=e+i-(a?100:0)}return n?o:1-o}function pg(e){return e%400===0||e%4===0&&e%100!==0}class Ok extends Ie{constructor(){super(...arguments);re(this,"priority",130);re(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return at(et(4,n),s);case"yo":return at(o.ordinalNumber(n,{unit:"year"}),s);default:return at(et(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const s=n.getFullYear();if(o.isTwoDigitYear){const a=hg(o.year,s);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const i=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class _k extends Ie{constructor(){super(...arguments);re(this,"priority",130);re(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return at(et(4,n),s);case"Yo":return at(o.ordinalNumber(n,{unit:"year"}),s);default:return at(et(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=Ec(n,s);if(o.isTwoDigitYear){const l=hg(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),hn(n,s)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),hn(n,s)}}class Ak extends Ie{constructor(){super(...arguments);re(this,"priority",130);re(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return Fi(r==="R"?4:r.length,n)}set(n,r,o){const s=Ge(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),uo(s)}}class Ik extends Ie{constructor(){super(...arguments);re(this,"priority",130);re(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return Fi(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class Dk extends Ie{constructor(){super(...arguments);re(this,"priority",120);re(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 et(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 Mk extends Ie{constructor(){super(...arguments);re(this,"priority",120);re(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 et(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 Nk extends Ie{constructor(){super(...arguments);re(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);re(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return at(Xe(it.month,n),s);case"MM":return at(et(2,n),s);case"Mo":return at(o.ordinalNumber(n,{unit:"month"}),s);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class Fk extends Ie{constructor(){super(...arguments);re(this,"priority",110);re(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const s=i=>i-1;switch(r){case"L":return at(Xe(it.month,n),s);case"LL":return at(et(2,n),s);case"Lo":return at(o.ordinalNumber(n,{unit:"month"}),s);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function Lk(e,t,n){const r=Re(e),o=rg(r,n)-t;return r.setDate(r.getDate()-o*7),r}class Vk extends Ie{constructor(){super(...arguments);re(this,"priority",100);re(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return Xe(it.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return et(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return hn(Lk(n,o,s),s)}}function $k(e,t){const n=Re(e),r=ng(n)-t;return n.setDate(n.getDate()-r*7),n}class Rk extends Ie{constructor(){super(...arguments);re(this,"priority",100);re(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 Xe(it.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return et(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return uo($k(n,o))}}const jk=[31,28,31,30,31,30,31,31,30,31,30,31],Bk=[31,29,31,30,31,30,31,31,30,31,30,31];class zk extends Ie{constructor(){super(...arguments);re(this,"priority",90);re(this,"subPriority",1);re(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return Xe(it.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return et(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=pg(o),i=n.getMonth();return s?r>=1&&r<=Bk[i]:r>=1&&r<=jk[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class Wk extends Ie{constructor(){super(...arguments);re(this,"priority",90);re(this,"subpriority",1);re(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 Xe(it.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return et(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 Oc(e,t,n){var d,f,h,p;const r=Er(),o=(n==null?void 0:n.weekStartsOn)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,s=Re(e),i=s.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(i+c)%7:(l+c)%7-(i+c)%7;return co(s,u)}class Hk extends Ie{constructor(){super(...arguments);re(this,"priority",90);re(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=Oc(n,o,s),n.setHours(0,0,0,0),n}}class Uk extends Ie{constructor(){super(...arguments);re(this,"priority",90);re(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return at(et(r.length,n),i);case"eo":return at(o.ordinalNumber(n,{unit:"day"}),i);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=Oc(n,o,s),n.setHours(0,0,0,0),n}}class Gk extends Ie{constructor(){super(...arguments);re(this,"priority",90);re(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return at(et(r.length,n),i);case"co":return at(o.ordinalNumber(n,{unit:"day"}),i);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=Oc(n,o,s),n.setHours(0,0,0,0),n}}function Yk(e,t){const n=Re(e),r=Sk(n),o=t-r;return co(n,o)}class qk extends Ie{constructor(){super(...arguments);re(this,"priority",90);re(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return et(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return at(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiii":return at(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return at(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return at(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=Yk(n,o),n.setHours(0,0,0,0),n}}class Kk extends Ie{constructor(){super(...arguments);re(this,"priority",80);re(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(kc(o),0,0,0),n}}class Zk extends Ie{constructor(){super(...arguments);re(this,"priority",80);re(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(kc(o),0,0,0),n}}class Xk extends Ie{constructor(){super(...arguments);re(this,"priority",80);re(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(kc(o),0,0,0),n}}class Qk extends Ie{constructor(){super(...arguments);re(this,"priority",70);re(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Xe(it.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return et(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const s=n.getHours()>=12;return s&&o<12?n.setHours(o+12,0,0,0):!s&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class Jk extends Ie{constructor(){super(...arguments);re(this,"priority",70);re(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return Xe(it.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return et(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class eO extends Ie{constructor(){super(...arguments);re(this,"priority",70);re(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Xe(it.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return et(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 tO extends Ie{constructor(){super(...arguments);re(this,"priority",70);re(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return Xe(it.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return et(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const s=o<=24?o%24:o;return n.setHours(s,0,0,0),n}}class nO extends Ie{constructor(){super(...arguments);re(this,"priority",60);re(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Xe(it.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return et(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class rO extends Ie{constructor(){super(...arguments);re(this,"priority",50);re(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Xe(it.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return et(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class oO extends Ie{constructor(){super(...arguments);re(this,"priority",30);re(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return at(et(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class sO extends Ie{constructor(){super(...arguments);re(this,"priority",10);re(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return mn(pn.basicOptionalMinutes,n);case"XX":return mn(pn.basic,n);case"XXXX":return mn(pn.basicOptionalSeconds,n);case"XXXXX":return mn(pn.extendedOptionalSeconds,n);case"XXX":default:return mn(pn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ge(n,n.getTime()-Ni(n)-o)}}class iO extends Ie{constructor(){super(...arguments);re(this,"priority",10);re(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return mn(pn.basicOptionalMinutes,n);case"xx":return mn(pn.basic,n);case"xxxx":return mn(pn.basicOptionalSeconds,n);case"xxxxx":return mn(pn.extendedOptionalSeconds,n);case"xxx":default:return mn(pn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ge(n,n.getTime()-Ni(n)-o)}}class aO extends Ie{constructor(){super(...arguments);re(this,"priority",40);re(this,"incompatibleTokens","*")}parse(n){return fg(n)}set(n,r,o){return[Ge(n,o*1e3),{timestampIsSet:!0}]}}class lO extends Ie{constructor(){super(...arguments);re(this,"priority",20);re(this,"incompatibleTokens","*")}parse(n){return fg(n)}set(n,r,o){return[Ge(n,o),{timestampIsSet:!0}]}}const cO={G:new kk,y:new Ok,Y:new _k,R:new Ak,u:new Ik,Q:new Dk,q:new Mk,M:new Nk,L:new Fk,w:new Vk,I:new Rk,d:new zk,D:new Wk,E:new Hk,e:new Uk,c:new Gk,i:new qk,a:new Kk,b:new Zk,B:new Xk,h:new Qk,H:new Jk,K:new eO,k:new tO,m:new nO,s:new rO,S:new oO,X:new sO,x:new iO,t:new aO,T:new lO},uO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,dO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fO=/^'([^]*?)'?$/,hO=/''/g,pO=/\S/,mO=/[a-zA-Z]/;function gO(e,t,n,r){var m,y,v,b;const o=xk(),s=o.locale??tg,i=o.firstWeekContainsDate??((y=(m=o.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,a=o.weekStartsOn??((b=(v=o.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0;if(t==="")return e===""?Re(n):Ge(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new Pk],u=t.match(dO).map(g=>{const T=g[0];if(T in Cc){const S=Cc[T];return S(g,s.formatLong)}return g}).join("").match(uO),d=[];for(let g of u){ug(g)&&Pc(g,t,e),cg(g)&&Pc(g,t,e);const T=g[0],S=cO[T];if(S){const{incompatibleTokens:E}=S;if(Array.isArray(E)){const k=d.find(I=>E.includes(I.token)||I.token===T);if(k)throw new RangeError(`The format string mustn't contain \`${k.fullToken}\` and \`${g}\` at the same time`)}else if(S.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:T,fullToken:g});const C=S.run(e,g,s.match,l);if(!C)return Ge(n,NaN);c.push(C.setter),e=C.rest}else{if(T.match(mO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(g==="''"?g="'":T==="'"&&(g=yO(g)),e.indexOf(g)===0)e=e.slice(g.length);else return Ge(n,NaN)}}if(e.length>0&&pO.test(e))return Ge(n,NaN);const f=c.map(g=>g.priority).sort((g,T)=>T-g).filter((g,T,S)=>S.indexOf(g)===T).map(g=>c.filter(T=>T.priority===g).sort((T,S)=>S.subPriority-T.subPriority)).map(g=>g[0]);let h=Re(n);if(isNaN(h.getTime()))return Ge(n,NaN);const p={};for(const g of f){if(!g.validate(h,l))return Ge(n,NaN);const T=g.set(h,p,l);Array.isArray(T)?(h=T[0],Object.assign(p,T[1])):h=T}return Ge(n,h)}function yO(e){return e.match(fO)[1].replace(hO,"'")}function vO(e,t){const n=Re(e),r=Re(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function bO(e){return PP(e,CP(e))}function wO(e,t){return co(e,-t)}function mg(e,t){return Mi(e,-t)}function xO(e,t){return Xm(e,-t)}function SO(e,t){return Qm(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 s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},St.apply(this,arguments)};function _c(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ac(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}typeof SuppressedError=="function"&&SuppressedError;var vs=function(e){return e.replace(new RegExp(" ","g")," ")},gg=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)},TO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},yg=function(e,t,n){var r=e.length-2,o=TO(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},vg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},bg=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},EO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Ic=function(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t},CO=function(e){return e==="money"||e==="currency"},PO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return St(St({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Dc=function(e,t){var n=gg(vg(e),t.fraction.length),r="".concat(t.currency).concat(yg(n,t.group,t.decimal));return vs(r)},kO=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,s=o===void 0?"BRL":o,i=e.currencyDisplay,a=i===void 0?"symbol":i;e.mask;var l=e.onChange,c=_c(e,["locale","currency","currencyDisplay","mask","onChange"]),u=w.useRef(null);w.useImperativeHandle(t,function(){return u.current});var d=w.useMemo(function(){var p=PO(r,s,a);return p.currency=vs("".concat(p.currency.trim()," ")),p.literal=vs(p.literal.trim()),p},[r,s]),f=function(p){var m=Dc(p.target.value,d),y=bg(m);p.target.value=m,p.target.setAttribute("data-number",y.toString()),l==null||l(p),y!==0&&(u.current.selectionEnd=m.length)},h=c.defaultValue?Dc(c.defaultValue,d):void 0;return w.createElement("input",St({},c,{value:typeof c.value=="string"?Dc(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),OO=1,_O=function(e){return e==="percentage"||e==="percent"||e==="percentual"},AO=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:""})},Mc=function(e,t){var n=gg(vg(e),t.fraction.length),r="".concat(yg(n,t.group,t.decimal)," ").concat(t.percentSign);return vs(r)},IO=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,s=e.onKeyUp,i=_c(e,["locale","mask","onChange","onKeyUp"]),a=w.useRef(null),l=Ac(w.useState(function(){var v,b;return(b=(v=i.value)===null||v===void 0?void 0:v.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];w.useImperativeHandle(t,function(){return a.current}),w.useEffect(function(){var v,b=Number.parseFloat("".concat((v=i.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(Mc(b,d))},[i.value]);var d=w.useMemo(function(){var v=AO(r);return v.percentSign=vs("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-OO,h=function(v){var b,g=a.current;g&&(g.setSelectionRange(f,f),v&&((b=i.onFocus)===null||b===void 0||b.call(i,v)))},p=function(v){var b=v.currentTarget;if(b.selectionStart!==null){var g=b.selectionStart,T=b.selectionEnd,S=g!==T,E=f<g;!S&&E&&h()}s==null||s(v)},m=function(v){var b=Mc(v.target.value,d),g=bg(b);u(b),v.target.value=b,v.target.setAttribute("data-number",g.toString()),o==null||o(v)};w.useEffect(function(){return h()},[c]);var y=i.defaultValue?Mc(i.defaultValue,d):void 0;return w.createElement("input",St({},i,{defaultValue:y,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),bs={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},DO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=Li[s];i===void 0?r.push(s.replace(bs.dots,"\\.").replace(bs.openParenthesis,"\\(").replace(bs.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(bs.leadingBars,"\\")},ws=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Nc(o,n);var s=DO(o);return n?"^".concat(s,"$"):s},MO=function(e){return e.replace(bs.escape,"\\$&")},Nc=function(e,t){var n=e.map(function(r){return typeof r=="string"?MO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Li={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]/}},NO=/\d/,wg="(dd) 9dddd-dddd",xg="(dd) dddd-dddd",Sg="ddd.ddd.ddd-dd",Tg="dd.ddd.ddd/dddd-dd",Vi=function(e){return e.replace(/\D/g,"")},FO=["2",/[0-3]/,":",/[0-5]/,/\d/],LO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],$t={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Sg,isoDate:"dddd-dd-dd",cnpj:Tg,telephone:xg,cellphone:wg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Vi(e).length<=11?Sg:Tg},int:function(e){return e===void 0&&(e=""),NO.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=Vi(e);return t.length<11?xg:wg},time:function(e){var t=Vi(e),n=t[0];return n==="2"?FO:LO}},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:ws(e,"",!0),infinity:n.infinity},n)},kt={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:Vi}),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 Eg(e,t,n,r){var o,s;r===void 0&&(r=Li);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=i[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var h=d instanceof RegExp?{regex:d}:d;h.regex.test(f)&&(a+=(s=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&s!==void 0?s:f),c+=1,l+=1}return a}var Cg=function(e){return e},VO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(ws(e,n,t));return r.test(n)};function $O(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t.current}var RO=w.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,s=o===void 0?!0:o,i=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,h=_c(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=w.useRef(null);w.useImperativeHandle(t,function(){return p.current});var m=Ic(a),y=Ic(d),v=Ic(u),b=w.useRef(VO(u,s,h.value||h.defaultValue)),g=f??"input",T=Ac(w.useState(""),2),S=T[0],E=T[1],C=$O(S),k=w.useCallback(function(_,F){var $,z,q=($=_??F)!==null&&$!==void 0?$:"";if(u===void 0)return q;var P=(z=q==null?void 0:q.toString())!==null&&z!==void 0?z:"";return Eg(P,typeof u=="function"?u(P):u,i??Cg,c??Li)},[i,u,c]),I=Ac(w.useState(function(){return k(h.value,h.defaultValue)}),2),N=I[0],L=I[1],O=k(h.defaultValue,h.defaultValue),j=w.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var _=u(N);return Array.isArray(_)?Nc(_,s):ws(u,N,s)}return typeof u=="string"?ws(u,N,s):Nc(u,s)},[l,N,s,u]);w.useEffect(function(){if(h.value!==void 0){var _=k(h.value,h.defaultValue);L(_),p.current!==null&&(p.current.value=_)}},[h.value,u,i,h.defaultValue]);var D=function(_){var F,$,z,q,P,V=_.currentTarget,Q=_.target.value;if(v.current===void 0)return L(Q),(F=y.current)===null||F===void 0||F.call(y,Q),($=m.current)===null||$===void 0||$.call(m,_),d==null?void 0:d(Q);var ie=new RegExp(ws(v.current,Q,s)),ee=(z=V.selectionEnd)!==null&&z!==void 0?z:0,H=function(Z,fe,B){if(Z.type!=="number")return Z.setSelectionRange(fe,B)};if(r&&b.current&&Q.length>=N.length)return V.value=N,H(V,ee-1,ee-1);var A=!1;Q.length<C.length&&(b.current=!1,A=!0),ie.test(Q)&&(b.current=!0);var R=ee,W=Q[R-1],Y=Eg(Q,typeof v.current=="function"?v.current(Q):v.current,i??Cg,c??Li);for(V.value=Y,L(Y);R<Y.length&&Y.charAt(R-1)!==W;)R+=1;A?H(V,ee,ee):H(V,R,R),_.target.value=Y,E(Y),(q=y.current)===null||q===void 0||q.call(y,Y),(P=m.current)===null||P===void 0||P.call(m,_)};return w.createElement(g,St({},h,{ref:p,pattern:j,onChange:D,defaultValue:Pg(h.defaultValue)?O:void 0,value:Pg(h.value)?k(h.value,h.value):h.value}))}),Pg=function(e){return typeof e=="string"},kg=w.forwardRef(function(e,t){return CO(e.mask)?w.createElement(kO,St({},e,{mask:void 0,ref:t})):_O(e.mask)?w.createElement(IO,St({},e,{mask:void 0,ref:t})):w.createElement(RO,St({},e,{ref:t}))}),jt=function(e){return function(t){return w.createElement(kg,St({},e,t))}};jt(kt.cellTelephone),jt(kt.cellphone),jt(kt.cep),jt(kt.cnpj),jt(kt.color),jt(kt.cpf),jt(kt.cpfCnpj),jt(kt.creditCard),jt(kt.date),jt(kt.int),jt(kt.isoDate),jt(kt.telephone),jt(kt.time),jt(kt.uuid);var Og=w.forwardRef(function(t,n){var r=w.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&EO(kt,t.mask)?kt[t.mask]:{mask:t.mask}},[t.mask]),o=St(St({},t),r);return w.createElement(kg,St({},o,{ref:n}))}),Fc={},Lc={exports:{}},Vc={};/**
|
|
137
|
+
`),()=>{document.head.removeChild(u)}},[t]),x.jsx(aP,{isPresent:t,childRef:r,sizeRef:o,children:_.cloneElement(e,{ref:r})})}const kc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const a=Zn(cP),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))}),s?[Math.random()]:[n]);return b.useMemo(()=>{a.forEach((u,d)=>a.set(d,!1))},[n]),_.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),i==="popLayout"&&(e=x.jsx(lP,{isPresent:n,children:e})),x.jsx(gi.Provider,{value:c,children:e})};function cP(){return new Map}function uP(e){return b.useEffect(()=>()=>e(),[])}const kr=e=>e.key||"";function dP(e,t){e.forEach(n=>{const r=kr(n);t.set(r,n)})}function fP(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const Vi=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:s=!0,mode:i="sync"})=>{en(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(ss).forceRender||Gm()[0],l=Um(),c=fP(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(yi(()=>{p.current=!1,dP(c,h),f.current=u}),uP(()=>{p.current=!0,h.clear(),d.clear()}),p.current)return x.jsx(x.Fragment,{children:u.map(w=>x.jsx(kc,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:s,mode:i,children:w},kr(w)))});u=[...u];const m=f.current.map(kr),y=c.map(kr),v=m.length;for(let w=0;w<v;w++){const g=m[w];y.indexOf(g)===-1&&!d.has(g)&&d.set(g,void 0)}return i==="wait"&&d.size&&(u=[]),d.forEach((w,g)=>{if(y.indexOf(g)!==-1)return;const S=h.get(g);if(!S)return;const T=m.indexOf(g);let E=w;if(!E){const k=()=>{d.delete(g);const A=Array.from(h.keys()).filter(D=>!y.includes(D));if(A.forEach(D=>h.delete(D)),f.current=c.filter(D=>{const I=kr(D);return I===g||A.includes(I)}),!d.size){if(l.current===!1)return;a(),r&&r()}};E=x.jsx(kc,{isPresent:!1,onExitComplete:k,custom:t,presenceAffectsLayout:s,mode:i,children:S},kr(S)),d.set(g,E)}u.splice(T,0,E)}),u=u.map(w=>{const g=w.key;return d.has(g)?w:x.jsx(kc,{isPresent:!0,presenceAffectsLayout:s,mode:i,children:w},kr(w))}),process.env.NODE_ENV!=="production"&&i==="wait"&&u.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x.jsx(x.Fragment,{children:d.size?u:u.map(w=>b.cloneElement(w))})};function hP({children:e,isValidProp:t,...n}){t&&xh(t),n={...b.useContext(no),...n},n.isStatic=Zn(()=>n.isStatic);const r=b.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(no.Provider,{value:r,children:e})}const pP=b.createContext(null),mP=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Ym(){const e=new Set,t=new WeakMap,n=()=>e.forEach(mP);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 qm=e=>e===!0,gP=e=>qm(e===!0)||e==="id",yP=({children:e,id:t,inherit:n=!0})=>{const r=b.useContext(ss),o=b.useContext(pP),[s,i]=Gm(),a=b.useRef(null),l=r.id||o;a.current===null&&(gP(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:qm(n)&&r.group||Ym()});const c=b.useMemo(()=>({...a.current,forceRender:s}),[i]);return x.jsx(ss.Provider,{value:c,children:e})},Km=b.createContext(null);function vP(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const s=r>0?1:-1,i=e[o+s];if(!i)return e;const a=e[o],l=i.layout,c=Ze(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?FT(e,o,o+s):e}function bP({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=Zn(()=>Ht(t)),l=[],c=b.useRef(!1);en(!!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(TP)},updateOrder:(d,f,h)=>{if(c.current)return;const p=vP(l,d,f,h);l!==p&&(c.current=!0,r(p.map(xP).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{c.current=!1}),x.jsx(a,{...s,ref:i,ignoreStrict:!0,children:x.jsx(Km.Provider,{value:u,children:e})})}const wP=b.forwardRef(bP);function xP(e){return e.value}function TP(e,t){return e.layout.min-t.layout.min}function ho(e){const t=Zn(()=>co(e)),{isStatic:n}=b.useContext(no);if(n){const[,r]=b.useState(e);b.useEffect(()=>t.on("change",r),[])}return t}const SP=e=>e&&typeof e=="object"&&e.mix,EP=e=>SP(e)?e.mix:void 0;function CP(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],s=e[2+n],i=e[3+n],a=Op(o,s,{mixer:EP(s[0]),...i});return t?a(r):a}function Zm(e,t){const n=ho(t()),r=()=>n.set(t());return r(),yi(()=>{const o=()=>Ae.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),fn(r)}}),n}function PP(e){ms.current=[],e();const t=Zm(ms.current,e);return ms.current=void 0,t}function kP(e,t,n,r){if(typeof e=="function")return PP(e);const o=typeof t=="function"?t:CP(t,n,r);return Array.isArray(e)?Xm(e,o):Xm([e],([s])=>o(s))}function Xm(e,t){const n=Zn(()=>[]);return Zm(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Qm(e,t=0){return xt(e)?e:ho(t)}function OP({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=Zn(()=>Ht(r)),c=b.useContext(Km),u={x:Qm(t.x),y:Qm(t.y)},d=kP([u.x,u.y],([m,y])=>m||y?1:"unset");en(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:h,updateOrder:p}=c;return x.jsx(l,{drag:f,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:s,onDrag:(m,y)=>{const{velocity:v}=y;v[f]&&p(n,u[f].get(),v[f]),o&&o(m,y)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const IP=b.forwardRef(OP),$i={Group:wP,Item:IP};class _P{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 AP=()=>new _P;function DP(){return Zn(AP)}const Jm={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},MP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},eg=e=>x.jsx(Ht.section,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:e.open,animate:e.open.toString(),"aria-hidden":!e.open,className:e.className,exit:Jm.false,transition:MP,variants:Jm,children:e.children}),NP=si("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-contrast bg-success/10 border-success/50"}},defaultVariants:{theme:"neutral"}}),FP=b.forwardRef(function({className:t,theme:n,onClose:r,open:o,...s},i){return x.jsx("div",{"data-open":!!o,"aria-hidden":!o,className:"data-[open=true]:mb-4 isolate data-[open=true]:pointer-events-auto pointer-events-none",children:x.jsx(eg,{"data-open":!!o,open:!!o,children:x.jsxs(eo,{...s,className:pt(NP({theme:n}),t),ref:i,"data-theme":n,role:"alert",as:s.as??"div",children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[n==="success"?x.jsx(nh,{size:20}):null,n==="danger"?x.jsx(V1,{size:20}):null,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:s.title})]}),s.children,o!==void 0?x.jsx("button",{type:"button",onClick:()=>r==null?void 0:r(!1),className:"text-foreground hover:text-danger absolute right-3 top-3 transition-colors duration-300 ease-in-out",children:x.jsx(rh,{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 po(e,t){const n=Be(e);return isNaN(t)?Ge(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Ri(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 s=o.getDate();return r>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const tg=6048e5,LP=864e5,VP=6e4,$P=36e5,RP=1e3;let jP={};function Or(){return jP}function hn(e,t){var a,l,c,u;const n=Or(),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),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function mo(e){return hn(e,{weekStartsOn:1})}function ng(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=mo(r),s=Ge(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=mo(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function go(e){const t=Be(e);return t.setHours(0,0,0,0),t}function ji(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=go(e),r=go(t),o=+n-ji(n),s=+r-ji(r);return Math.round((o-s)/LP)}function zP(e){const t=ng(e),n=Ge(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),mo(n)}function rg(e,t){const n=t*7;return po(e,n)}function og(e,t){return Ri(e,t*12)}function WP(e){return Ge(e,Date.now())}function HP(e,t){const n=go(e),r=go(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 sg(e,t){const n=Be(e.start),r=Be(e.end);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let a=1;const l=[];for(;+i<=s;)l.push(Be(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function ig(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=Or(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=Be(e),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const 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 Oc(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:Oc({formats:XP,defaultWidth:"full"}),time:Oc({formats:QP,defaultWidth:"full"}),dateTime:Oc({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 bs(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const 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"]},sk={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"]},ik={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:bs({values:rk,defaultWidth:"wide"}),quarter:bs({values:ok,defaultWidth:"wide",argumentCallback:e=>e-1}),month:bs({values:sk,defaultWidth:"wide"}),day:bs({values:ik,defaultWidth:"wide"}),dayPeriod:bs({values:ak,defaultWidth:"wide",formattingValues:lk,defaultFormattingWidth:"wide"})};function ws(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?dk(a,d=>d.test(i)):uk(a,d=>d.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(i.length);return{value:c,rest:u}}}function 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],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const 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:ws({matchPatterns:mk,defaultMatchWidth:"wide",parsePatterns:gk,defaultParseWidth:"any"}),quarter:ws({matchPatterns:yk,defaultMatchWidth:"wide",parsePatterns:vk,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ws({matchPatterns:bk,defaultMatchWidth:"wide",parsePatterns:wk,defaultParseWidth:"any"}),day:ws({matchPatterns:xk,defaultMatchWidth:"wide",parsePatterns:Tk,defaultParseWidth:"any"}),dayPeriod:ws({matchPatterns:Sk,defaultMatchWidth:"any",parsePatterns:Ek,defaultParseWidth:"any"})},ag={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 lg(e){const t=Be(e),n=+mo(t)-+zP(t);return Math.round(n/tg)+1}function Ic(e,t){var u,d,f,h;const n=Be(e),r=n.getFullYear(),o=Or(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=Ge(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=hn(i,t),l=Ge(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=hn(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=Or(),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=Ic(e,t),s=Ge(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),hn(s,t)}function cg(e,t){const n=Be(e),r=+hn(n,t)-+kk(n,t);return Math.round(r/tg)+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)}},yo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ug={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=Ic(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return Ve(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ve(s,t.length)},R:function(e,t){const n=ng(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=cg(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ve(o,t.length)},I:function(e,t,n){const r=lg(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(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ve(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ve(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return 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=yo.noon:r===0?o=yo.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=yo.evening:r>=12?o=yo.afternoon:r>=4?o=yo.morning:o=yo.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 fg(r);case"XXXX":case"XX":return Ir(r);case"XXXXX":case"XXX":default:return Ir(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return fg(r);case"xxxx":case"xx":return Ir(r);case"xxxxx":case"xxx":default:return Ir(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+dg(r,":");case"OOOO":default:return"GMT"+Ir(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+dg(r,":");case"zzzz":default:return"GMT"+Ir(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 dg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+Ve(s,2)}function fg(e,t){return e%60===0?(e>0?"-":"+")+Ve(Math.abs(e)/60,2):Ir(e,t)}function Ir(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ve(Math.trunc(r/60),2),s=Ve(r%60,2);return n+o+t+s}const hg=(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"})}},pg=(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"})}},_c={p:pg,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return hg(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",hg(r,t)).replace("{{time}}",pg(o,t))}},Ok=/^D+$/,Ik=/^Y+$/,_k=["D","DD","YY","YYYY"];function mg(e){return Ok.test(e)}function gg(e){return Ik.test(e)}function Ac(e,t,n){const r=Ak(e,t,n);if(console.warn(r),_k.includes(e))throw new RangeError(r)}function Ak(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=Or(),o=r.locale??ag,s=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=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 y=_c[m];return y(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(ug[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:s,weekStartsOn:i,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(gg(m)||mg(m))&&Ac(m,t,String(e));const y=ug[m[0]];return y(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({},Or())}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 yg{constructor(){se(this,"subPriority",0)}validate(t,n){return!0}}class Wk extends yg{constructor(t,n,r,o,s){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,s&&(this.subPriority=s)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class Hk extends yg{constructor(){super(...arguments);se(this,"priority",zk);se(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Ge(n,Bk(n,Date))}}class De{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new Wk(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class Uk extends De{constructor(){super(...arguments);se(this,"priority",140);se(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 at={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}/},pn={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 lt(e,t){return e&&{value:t(e.value),rest:e.rest}}function Xe(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function mn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*$P+s*VP+i*RP),rest:t.slice(n[0].length)}}function vg(e){return Xe(at.anyDigitsSigned,e)}function et(e,t){switch(e){case 1:return Xe(at.singleDigit,t);case 2:return Xe(at.twoDigits,t);case 3:return Xe(at.threeDigits,t);case 4:return Xe(at.fourDigits,t);default:return Xe(new RegExp("^\\d{1,"+e+"}"),t)}}function Bi(e,t){switch(e){case 1:return Xe(at.singleDigitSigned,t);case 2:return Xe(at.twoDigitsSigned,t);case 3:return Xe(at.threeDigitsSigned,t);case 4:return Xe(at.fourDigitsSigned,t);default:return Xe(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Dc(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 bg(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const s=r+50,i=Math.trunc(s/100)*100,a=e>=s%100;o=e+i-(a?100:0)}return n?o:1-o}function wg(e){return e%400===0||e%4===0&&e%100!==0}class Gk extends De{constructor(){super(...arguments);se(this,"priority",130);se(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return lt(et(4,n),s);case"yo":return lt(o.ordinalNumber(n,{unit:"year"}),s);default:return lt(et(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const s=n.getFullYear();if(o.isTwoDigitYear){const a=bg(o.year,s);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const i=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class Yk extends De{constructor(){super(...arguments);se(this,"priority",130);se(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return lt(et(4,n),s);case"Yo":return lt(o.ordinalNumber(n,{unit:"year"}),s);default:return lt(et(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=Ic(n,s);if(o.isTwoDigitYear){const l=bg(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),hn(n,s)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),hn(n,s)}}class qk extends De{constructor(){super(...arguments);se(this,"priority",130);se(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return Bi(r==="R"?4:r.length,n)}set(n,r,o){const s=Ge(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),mo(s)}}class Kk extends De{constructor(){super(...arguments);se(this,"priority",130);se(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return Bi(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 De{constructor(){super(...arguments);se(this,"priority",120);se(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 et(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 De{constructor(){super(...arguments);se(this,"priority",120);se(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 et(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 De{constructor(){super(...arguments);se(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);se(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return lt(Xe(at.month,n),s);case"MM":return lt(et(2,n),s);case"Mo":return lt(o.ordinalNumber(n,{unit:"month"}),s);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class Jk extends De{constructor(){super(...arguments);se(this,"priority",110);se(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const s=i=>i-1;switch(r){case"L":return lt(Xe(at.month,n),s);case"LL":return lt(et(2,n),s);case"Lo":return lt(o.ordinalNumber(n,{unit:"month"}),s);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function eO(e,t,n){const r=Be(e),o=cg(r,n)-t;return r.setDate(r.getDate()-o*7),r}class tO extends De{constructor(){super(...arguments);se(this,"priority",100);se(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return Xe(at.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return et(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return hn(eO(n,o,s),s)}}function nO(e,t){const n=Be(e),r=lg(n)-t;return n.setDate(n.getDate()-r*7),n}class rO extends De{constructor(){super(...arguments);se(this,"priority",100);se(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 Xe(at.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return et(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return mo(nO(n,o))}}const oO=[31,28,31,30,31,30,31,31,30,31,30,31],sO=[31,29,31,30,31,30,31,31,30,31,30,31];class iO extends De{constructor(){super(...arguments);se(this,"priority",90);se(this,"subPriority",1);se(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return Xe(at.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return et(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=wg(o),i=n.getMonth();return s?r>=1&&r<=sO[i]:r>=1&&r<=oO[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class aO extends De{constructor(){super(...arguments);se(this,"priority",90);se(this,"subpriority",1);se(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 Xe(at.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return et(r.length,n)}}validate(n,r){const o=n.getFullYear();return wg(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 Mc(e,t,n){var d,f,h,p;const r=Or(),o=(n==null?void 0:n.weekStartsOn)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,s=Be(e),i=s.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(i+c)%7:(l+c)%7-(i+c)%7;return po(s,u)}class lO extends De{constructor(){super(...arguments);se(this,"priority",90);se(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=Mc(n,o,s),n.setHours(0,0,0,0),n}}class cO extends De{constructor(){super(...arguments);se(this,"priority",90);se(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return lt(et(r.length,n),i);case"eo":return lt(o.ordinalNumber(n,{unit:"day"}),i);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=Mc(n,o,s),n.setHours(0,0,0,0),n}}class uO extends De{constructor(){super(...arguments);se(this,"priority",90);se(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return lt(et(r.length,n),i);case"co":return lt(o.ordinalNumber(n,{unit:"day"}),i);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=Mc(n,o,s),n.setHours(0,0,0,0),n}}function dO(e,t){const n=Be(e),r=jk(n),o=t-r;return po(n,o)}class fO extends De{constructor(){super(...arguments);se(this,"priority",90);se(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return et(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return lt(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiii":return lt(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return lt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return lt(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=dO(n,o),n.setHours(0,0,0,0),n}}class hO extends De{constructor(){super(...arguments);se(this,"priority",80);se(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(Dc(o),0,0,0),n}}class pO extends De{constructor(){super(...arguments);se(this,"priority",80);se(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(Dc(o),0,0,0),n}}class mO extends De{constructor(){super(...arguments);se(this,"priority",80);se(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(Dc(o),0,0,0),n}}class gO extends De{constructor(){super(...arguments);se(this,"priority",70);se(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Xe(at.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return et(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const s=n.getHours()>=12;return s&&o<12?n.setHours(o+12,0,0,0):!s&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class yO extends De{constructor(){super(...arguments);se(this,"priority",70);se(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return Xe(at.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return et(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 De{constructor(){super(...arguments);se(this,"priority",70);se(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Xe(at.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return et(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 De{constructor(){super(...arguments);se(this,"priority",70);se(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return Xe(at.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return et(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const s=o<=24?o%24:o;return n.setHours(s,0,0,0),n}}class wO extends De{constructor(){super(...arguments);se(this,"priority",60);se(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Xe(at.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return et(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 De{constructor(){super(...arguments);se(this,"priority",50);se(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Xe(at.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return et(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class TO extends De{constructor(){super(...arguments);se(this,"priority",30);se(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return lt(et(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class SO extends De{constructor(){super(...arguments);se(this,"priority",10);se(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return mn(pn.basicOptionalMinutes,n);case"XX":return mn(pn.basic,n);case"XXXX":return mn(pn.basicOptionalSeconds,n);case"XXXXX":return mn(pn.extendedOptionalSeconds,n);case"XXX":default:return mn(pn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ge(n,n.getTime()-ji(n)-o)}}class EO extends De{constructor(){super(...arguments);se(this,"priority",10);se(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return mn(pn.basicOptionalMinutes,n);case"xx":return mn(pn.basic,n);case"xxxx":return mn(pn.basicOptionalSeconds,n);case"xxxxx":return mn(pn.extendedOptionalSeconds,n);case"xxx":default:return mn(pn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ge(n,n.getTime()-ji(n)-o)}}class CO extends De{constructor(){super(...arguments);se(this,"priority",40);se(this,"incompatibleTokens","*")}parse(n){return vg(n)}set(n,r,o){return[Ge(n,o*1e3),{timestampIsSet:!0}]}}class PO extends De{constructor(){super(...arguments);se(this,"priority",20);se(this,"incompatibleTokens","*")}parse(n){return vg(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 iO,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,_O=/^'([^]*?)'?$/,AO=/''/g,DO=/\S/,MO=/[a-zA-Z]/;function NO(e,t,n,r){var m,y,v,w;const o=Rk(),s=o.locale??ag,i=o.firstWeekContainsDate??((y=(m=o.locale)==null?void 0:m.options)==null?void 0:y.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:i,weekStartsOn:a,locale:s},c=[new Hk],u=t.match(IO).map(g=>{const S=g[0];if(S in _c){const T=_c[S];return T(g,s.formatLong)}return g}).join("").match(OO),d=[];for(let g of u){gg(g)&&Ac(g,t,e),mg(g)&&Ac(g,t,e);const S=g[0],T=kO[S];if(T){const{incompatibleTokens:E}=T;if(Array.isArray(E)){const A=d.find(D=>E.includes(D.token)||D.token===S);if(A)throw new RangeError(`The format string mustn't contain \`${A.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 k=T.run(e,g,s.match,l);if(!k)return Ge(n,NaN);c.push(k.setter),e=k.rest}else{if(S.match(MO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(g==="''"?g="'":S==="'"&&(g=FO(g)),e.indexOf(g)===0)e=e.slice(g.length);else return Ge(n,NaN)}}if(e.length>0&&DO.test(e))return Ge(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=Be(n);if(isNaN(h.getTime()))return Ge(n,NaN);const p={};for(const g of f){if(!g.validate(h,l))return Ge(n,NaN);const S=g.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(_O)[1].replace(AO,"'")}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 po(e,-t)}function xg(e,t){return Ri(e,-t)}function RO(e,t){return rg(e,-t)}function jO(e,t){return og(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 s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},St.apply(this,arguments)};function Nc(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 Fc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}typeof SuppressedError=="function"&&SuppressedError;var xs=function(e){return e.replace(new RegExp(" ","g")," ")},Tg=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")},Sg=function(e,t,n){var r=e.length-2,o=BO(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},Eg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Cg=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)},Lc=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 s;return St(St({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Vc=function(e,t){var n=Tg(Eg(e),t.fraction.length),r="".concat(t.currency).concat(Sg(n,t.group,t.decimal));return xs(r)},UO=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,s=o===void 0?"BRL":o,i=e.currencyDisplay,a=i===void 0?"symbol":i;e.mask;var l=e.onChange,c=Nc(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,s,a);return p.currency=xs("".concat(p.currency.trim()," ")),p.literal=xs(p.literal.trim()),p},[r,s]),f=function(p){var m=Vc(p.target.value,d),y=Cg(m);p.target.value=m,p.target.setAttribute("data-number",y.toString()),l==null||l(p),y!==0&&(u.current.selectionEnd=m.length)},h=c.defaultValue?Vc(c.defaultValue,d):void 0;return b.createElement("input",St({},c,{value:typeof c.value=="string"?Vc(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:""})},$c=function(e,t){var n=Tg(Eg(e),t.fraction.length),r="".concat(Sg(n,t.group,t.decimal)," ").concat(t.percentSign);return xs(r)},KO=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,s=e.onKeyUp,i=Nc(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=Fc(b.useState(function(){var v,w;return(w=(v=i.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=i.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u($c(w,d))},[i.value]);var d=b.useMemo(function(){var v=qO(r);return v.percentSign=xs("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-GO,h=function(v){var w,g=a.current;g&&(g.setSelectionRange(f,f),v&&((w=i.onFocus)===null||w===void 0||w.call(i,v)))},p=function(v){var w=v.currentTarget;if(w.selectionStart!==null){var g=w.selectionStart,S=w.selectionEnd,T=g!==S,E=f<g;!T&&E&&h()}s==null||s(v)},m=function(v){var w=$c(v.target.value,d),g=Cg(w);u(w),v.target.value=w,v.target.setAttribute("data-number",g.toString()),o==null||o(v)};b.useEffect(function(){return h()},[c]);var y=i.defaultValue?$c(i.defaultValue,d):void 0;return b.createElement("input",St({},i,{defaultValue:y,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),Ts={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 s=e[o],i=zi[s];i===void 0?r.push(s.replace(Ts.dots,"\\.").replace(Ts.openParenthesis,"\\(").replace(Ts.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ts.leadingBars,"\\")},Ss=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Rc(o,n);var s=ZO(o);return n?"^".concat(s,"$"):s},XO=function(e){return e.replace(Ts.escape,"\\$&")},Rc=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},zi={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/,Pg="(dd) 9dddd-dddd",kg="(dd) dddd-dddd",Og="ddd.ddd.ddd-dd",Ig="dd.ddd.ddd/dddd-dd",Wi=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:Og,isoDate:"dddd-dd-dd",cnpj:Ig,telephone:kg,cellphone:Pg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Wi(e).length<=11?Og:Ig},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=Wi(e);return t.length<11?kg:Pg},time:function(e){var t=Wi(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:Ss(e,"",!0),infinity:n.infinity},n)},_t={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:Wi}),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 _g(e,t,n,r){var o,s;r===void 0&&(r=zi);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=i[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var h=d instanceof RegExp?{regex:d}:d;h.regex.test(f)&&(a+=(s=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&s!==void 0?s:f),c+=1,l+=1}return a}var Ag=function(e){return e},tI=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Ss(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,s=o===void 0?!0:o,i=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,h=Nc(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=Lc(a),y=Lc(d),v=Lc(u),w=b.useRef(tI(u,s,h.value||h.defaultValue)),g=f??"input",S=Fc(b.useState(""),2),T=S[0],E=S[1],k=nI(T),A=b.useCallback(function(O,M){var L,H,G=(L=O??M)!==null&&L!==void 0?L:"";if(u===void 0)return G;var P=(H=G==null?void 0:G.toString())!==null&&H!==void 0?H:"";return _g(P,typeof u=="function"?u(P):u,i??Ag,c??zi)},[i,u,c]),D=Fc(b.useState(function(){return A(h.value,h.defaultValue)}),2),I=D[0],V=D[1],F=A(h.defaultValue,h.defaultValue),R=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var O=u(I);return Array.isArray(O)?Rc(O,s):Ss(u,I,s)}return typeof u=="string"?Ss(u,I,s):Rc(u,s)},[l,I,s,u]);b.useEffect(function(){if(h.value!==void 0){var O=A(h.value,h.defaultValue);V(O),p.current!==null&&(p.current.value=O)}},[h.value,u,i,h.defaultValue]);var C=function(O){var M,L,H,G,P,j=O.currentTarget,Z=O.target.value;if(v.current===void 0)return V(Z),(M=y.current)===null||M===void 0||M.call(y,Z),(L=m.current)===null||L===void 0||L.call(m,O),d==null?void 0:d(Z);var re=new RegExp(Ss(v.current,Z,s)),J=(H=j.selectionEnd)!==null&&H!==void 0?H:0,U=function(Y,oe,z){if(Y.type!=="number")return Y.setSelectionRange(oe,z)};if(r&&w.current&&Z.length>=I.length)return j.value=I,U(j,J-1,J-1);var N=!1;Z.length<k.length&&(w.current=!1,N=!0),re.test(Z)&&(w.current=!0);var B=J,W=Z[B-1],$=_g(Z,typeof v.current=="function"?v.current(Z):v.current,i??Ag,c??zi);for(j.value=$,V($);B<$.length&&$.charAt(B-1)!==W;)B+=1;N?U(j,J,J):U(j,B,B),O.target.value=$,E($),(G=y.current)===null||G===void 0||G.call(y,$),(P=m.current)===null||P===void 0||P.call(m,O)};return b.createElement(g,St({},h,{ref:p,pattern:R,onChange:C,defaultValue:Dg(h.defaultValue)?F:void 0,value:Dg(h.value)?A(h.value,h.value):h.value}))}),Dg=function(e){return typeof e=="string"},Mg=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(Mg,St({},e,t))}};jt(_t.cellTelephone),jt(_t.cellphone),jt(_t.cep),jt(_t.cnpj),jt(_t.color),jt(_t.cpf),jt(_t.cpfCnpj),jt(_t.creditCard),jt(_t.date),jt(_t.int),jt(_t.isoDate),jt(_t.telephone),jt(_t.time),jt(_t.uuid);var Ng=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&zO(_t,t.mask)?_t[t.mask]:{mask:t.mask}},[t.mask]),o=St(St({},t),r);return b.createElement(Mg,St({},o,{ref:n}))}),jc={},Bc={exports:{}},zc={};/**
|
|
133
138
|
* @license React
|
|
134
139
|
* use-sync-external-store-shim.production.min.js
|
|
135
140
|
*
|
|
@@ -137,7 +142,7 @@
|
|
|
137
142
|
*
|
|
138
143
|
* This source code is licensed under the MIT license found in the
|
|
139
144
|
* LICENSE file in the root directory of this source tree.
|
|
140
|
-
*/var
|
|
145
|
+
*/var Fg;function oI(){if(Fg)return zc;Fg=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,s=e.useLayoutEffect,i=e.useDebugValue;function a(d,f){var h=f(),p=r({inst:{value:h,getSnapshot:f}}),m=p[0].inst,y=p[1];return s(function(){m.value=h,m.getSnapshot=f,l(m)&&y({inst:m})},[d,h,f]),o(function(){return l(m)&&y({inst:m}),d(function(){l(m)&&y({inst:m})})},[d]),i(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return zc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,zc}var Lg={};/**
|
|
141
146
|
* @license React
|
|
142
147
|
* use-sync-external-store-shim.development.js
|
|
143
148
|
*
|
|
@@ -145,7 +150,7 @@
|
|
|
145
150
|
*
|
|
146
151
|
* This source code is licensed under the MIT license found in the
|
|
147
152
|
* LICENSE file in the root directory of this source tree.
|
|
148
|
-
*/var
|
|
153
|
+
*/var Vg;function sI(){return Vg||(Vg=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=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,k=E.getStackAddendum();k!==""&&(S+="%s",T=T.concat([k]));var A=T.map(function(D){return String(D)});A.unshift("Warning: "+S),Function.prototype.apply.call(console[g],console,A)}}function o(g,S){return g===S&&(g!==0||1/g===1/S)||g!==g&&S!==S}var s=typeof Object.is=="function"?Object.is:o,i=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,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 k=S();s(E,k)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var A=i({inst:{value:E,getSnapshot:S}}),D=A[0].inst,I=A[1];return l(function(){D.value=E,D.getSnapshot=S,h(D)&&I({inst:D})},[g,E,S]),a(function(){h(D)&&I({inst:D});var V=function(){h(D)&&I({inst:D})};return g(V)},[g]),c(E),E}function h(g){var S=g.getSnapshot,T=g.value;try{var E=S();return!s(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",y=!m,v=y?p:f,w=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;Lg.useSyncExternalStore=w,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Lg}var $g;function Rg(){return $g||($g=1,process.env.NODE_ENV==="production"?Bc.exports=oI():Bc.exports=sI()),Bc.exports}/**
|
|
149
154
|
* @license React
|
|
150
155
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
151
156
|
*
|
|
@@ -153,7 +158,7 @@
|
|
|
153
158
|
*
|
|
154
159
|
* This source code is licensed under the MIT license found in the
|
|
155
160
|
* LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/var
|
|
161
|
+
*/var jg;function iI(){if(jg)return jc;jg=1;var e=b,t=Rg();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return jc.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function v(E){if(!w){if(w=!0,g=E,E=f(E),h!==void 0&&m.hasValue){var k=m.value;if(h(k,E))return S=k}return S=E}if(k=S,r(g,E))return k;var A=f(E);return h!==void 0&&h(k,A)?k:(g=E,S=A)}var w=!1,g,S,T=d===void 0?null:d;return[function(){return v(u())},T===null?void 0:function(){return v(T())}]},[u,d,f,h]);var y=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},jc}var Bg={};/**
|
|
157
162
|
* @license React
|
|
158
163
|
* use-sync-external-store-shim/with-selector.development.js
|
|
159
164
|
*
|
|
@@ -161,31 +166,31 @@
|
|
|
161
166
|
*
|
|
162
167
|
* This source code is licensed under the MIT license found in the
|
|
163
168
|
* LICENSE file in the root directory of this source tree.
|
|
164
|
-
*/var Lg;function WO(){return Lg||(Lg=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w,t=Mg();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,p){var m=s(null),y;m.current===null?(y={hasValue:!1,value:null},m.current=y):y=m.current;var v=a(function(){var S=!1,E,C,k=function(O){if(!S){S=!0,E=O;var j=h(O);if(p!==void 0&&y.hasValue){var D=y.value;if(p(D,j))return C=D,D}return C=j,j}var _=E,F=C;if(r(_,O))return F;var $=h(O);return p!==void 0&&p(F,$)?F:(E=O,C=$,$)},I=f===void 0?null:f,N=function(){return k(d())},L=I===null?void 0:function(){return k(I())};return[N,L]},[d,f,h,p]),b=v[0],g=v[1],T=o(u,b,g);return i(function(){y.hasValue=!0,y.value=T},[T]),l(T),T}Fg.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Fg}process.env.NODE_ENV==="production"?zO():WO();const po=e=>{const t=w.useRef(e??{});return w.useEffect(()=>void(t.current=e),[e]),t},HO=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current},UO=e=>Object.entries(e),Vg=e=>e instanceof Promise,$g=(e,t,n,r)=>t===e?n.reduce((o,s)=>s(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,s)=>s(o,t,r),{...t,...e}):n.reduce((o,s)=>s(o,t,r),e),GO=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,d)=>n(f=>$g(u,f,s,d));return Vg(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))},YO=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>$g(c,u,s,o.current));return Vg(a)?a.then(c=>l(c)):l(a)},$c=(e,t,n)=>{const[r,o]=w.useState(()=>e),s=po(r),i=po((n==null?void 0:n.props)??{}),a=po(t),l=po((n==null?void 0:n.postMiddleware)??[]),c=po((n==null?void 0:n.interceptor)??[]),u=w.useRef(e),d=HO(r),f=po(d),h=w.useRef(null);w.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(y=>{y(r,d,m)})},[r,l,d]);const[p]=w.useState(()=>{const m=()=>i.current,y=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>f.current});return UO(y).reduce((v,[b,g])=>({...v,[b]:n!=null&&n.debug?GO(b,g,o,m,h,c.current):YO(b,g,o,m,h,c.current)}),{})});return[r,p,i.current]},qO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function KO(e,t){return w.useRef(qO(e,t)).current}function Rc(e,t,n){var r,o,s,i,a;t==null&&(t=100);function l(){var u=Date.now()-i;u<t&&u>=0?r=setTimeout(l,t-u):(r=null,n||(a=e.apply(s,o),s=o=null))}var c=function(){s=this,o=arguments,i=Date.now();var u=n&&!r;return r||(r=setTimeout(l,t)),u&&(a=e.apply(s,o),s=o=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=e.apply(s,o),s=o=null,clearTimeout(r),r=null)},c}Rc.debounce=Rc;var ZO=Rc;const Rg=Yd(ZO);function XO(e){let{debounce:t,scroll:n,polyfill:r,offsetSize:o}={debounce:0,scroll:!1,offsetSize:!1};const s=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[i,a]=w.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=w.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:i}),c=t?typeof t=="number"?t:t.scroll:null,u=t?typeof t=="number"?t:t.resize:null,d=w.useRef(!1);w.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[f,h,p]=w.useMemo(()=>{const b=()=>{if(!l.current.element)return;const{left:g,top:T,width:S,height:E,bottom:C,right:k,x:I,y:N}=l.current.element.getBoundingClientRect(),L={left:g,top:T,width:S,height:E,bottom:C,right:k,x:I,y:N};l.current.element instanceof HTMLElement&&o&&(L.height=l.current.element.offsetHeight,L.width=l.current.element.offsetWidth),Object.freeze(L),d.current&&!t_(l.current.lastBounds,L)&&a(l.current.lastBounds=L)};return[b,u?Rg(b,u):b,c?Rg(b,c):b]},[a,o,c,u]);function m(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(b=>b.removeEventListener("scroll",p,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function y(){l.current.element&&(l.current.resizeObserver=new s(p),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(b=>b.addEventListener("scroll",p,{capture:!0,passive:!0})))}const v=b=>{!b||b===l.current.element||(m(),l.current.element=b,l.current.scrollContainers=jg(b),y())};return JO(p,!!n),QO(h),w.useEffect(()=>{m(),y()},[n,p,h]),w.useEffect(()=>m,[]),[v,i,f]}function QO(e){w.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function JO(e,t){w.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function jg(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:o}=window.getComputedStyle(e);return[n,r,o].some(s=>s==="auto"||s==="scroll")&&t.push(e),[...t,...jg(e.parentElement)]}const e_=["x","y","top","bottom","left","right","width","height"],t_=(e,t)=>e_.every(n=>e[n]===t[n]),n_=({children:e})=>{const[t,n]=XO();return x.jsx(Ht.div,{animate:{height:n.height>0?n.height:"auto"},children:x.jsx("div",{ref:t,children:e})})},r_={type:"spring",bounce:.1,duration:.3},Bg=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.5}),zg={middle:{x:"0%",opacity:1},enter:Bg(1),exit:Bg(-1)},Wg={exit:{visibility:"hidden"}},o_=e=>{const t=hn(eg(e));return Jm({start:t,end:co(t,41)})},Hg=(e,t)=>e.toLocaleDateString(t,{month:"long"}),s_=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=eg(new Date(e).setMonth(r)),s=Hg(o,t);return x.jsx("option",{value:s,"data-index":r,children:s},s)}),jc={ArrowLeft:(e,t)=>t==="days"?wO(e,1):mg(e,1),ArrowRight:(e,t)=>t==="days"?co(e,1):Mi(e,1),ArrowUp:(e,t)=>t==="days"?xO(e,1):SO(e,1),ArrowDown:(e,t)=>t==="days"?Xm(e,1):Qm(e,1)},Ug=(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)},Pr=e=>e.getFullYear().toString().padStart(4,"0"),Gg=({locale:e,disabledDate:t,markToday:n=!0,autoFocusToday:r=!0,date:o,onChange:s})=>{const i=o||new Date,[a,l]=$c({date:i,isAnimating:!1,year:Pr(i),direction:void 0,months:s_(i,e),week:Jm({start:hn(i),end:AP(i)})},p=>({onChangeYear:m=>({year:m}),setToday:()=>({date:fo(new Date)}),onExitComplete:()=>(Ug(p.state().date,200),{isAnimating:!1}),date:m=>{const y=m(p.state().date);return{date:y,year:Pr(y)}},nextMonth:()=>{const m=p.state();if(m.isAnimating)return m;const y=Mi(m.date,1);return{date:y,isAnimating:!0,direction:1,year:Pr(y)}},previousMonth:()=>{const m=p.state();if(m.isAnimating)return m;const y=mg(m.date,1);return{date:y,isAnimating:!0,direction:-1,year:Pr(y)}},onSelectDate:m=>{const y=m.currentTarget.dataset.date||"",v=new Date(y);return{date:v,year:Pr(v)}},onChangeMonth:m=>{const y=m.target.value,b=Array.from(m.target.options).find(g=>g.value===y);if(b){const g=b.dataset.index||"",T=new Date(p.state().date);return T.setMonth(+g),{date:T,year:Pr(T)}}return p.state()},onKeyDown:m=>{const y=m.key;if(y in jc){(y==="ArrowUp"||y==="ArrowDown")&&m.preventDefault();const v=p.state().date,b=Pn.keyof(jc,y)?jc[y](v,m.shiftKey?"month":"days"):null;if(b!==null)return Ug(b),{date:b,year:Pr(b)}}return p.state()}})),c=o_(a.date),u=a.date.toISOString(),d=Hg(a.date,e);w.useEffect(()=>s==null?void 0:s(a.date),[u]);const f=KO(p=>{l.date(m=>{const y=new Date(m);return y.setFullYear(+p),y})},700),h=p=>{const m=p.currentTarget.value;l.onChangeYear(m),f(m)};return x.jsx(KC,{transition:r_,children:x.jsxs("div",{className:"relative overflow-hidden",children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(n_,{children:x.jsx(Ii,{presenceAffectsLayout:!0,mode:"popLayout",initial:!1,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:Wg,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(b1,{className:"h-4 w-4"})}),x.jsx(Ht.span,{variants:zg,custom:a.direction,className:"absolute z-normal isolate inset-0 flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"w-fit flex items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{style:{width:`${d.length}ch`},value:d,onChange:l.onChangeMonth,className:"appearance-none capitalize bg-transparent proportional-nums hover:text-primary cursor-pointer w-fit",children:a.months}),x.jsx(Og,{mask:"int",value:a.year,maxLength:4,placeholder:"YYYY",onChange:h,style:{width:`${a.year.length}ch`},className:"w-16 bg-transparent appearance-none hover:text-primary cursor-pointer"})]})}),x.jsx(Ht.button,{variants:Wg,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:l.nextMonth,children:x.jsx(Kf,{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:"font-medium capitalize text-sm",children:p.toLocaleDateString(e,{weekday:"short"})},p.toString()))}),x.jsx(Ht.ul,{onKeyDown:l.onKeyDown,variants:zg,custom:a.direction,className:"mt-4 pb-2 grid grid-cols-7 gap-y-4",children:c.map(p=>{const m=p.toISOString(),y=m===u,v=bO(p)&&n,b=(t==null?void 0:t(p))||!1,g=!vO(p,a.date)||b;return x.jsx("li",{className:"w-full flex items-center justify-center",children:x.jsx("button",{type:"button","data-date":m,disabled:b,onClick:l.onSelectDate,"data-view":a.date.getMonth().toString(),className:`size-8 disabled:cursor-not-allowed rounded-full font-semibold flex items-center justify-center proportional-nums ${v?"text-primary":""} ${g?"text-disabled":""} ${y?"bg-primary text-primary-foreground":""}`,children:p.getDate()})},m)})})]},d)})})}),x.jsx("footer",{className:"text-center text-primary mt-2",children:x.jsx("button",{className:"hover:scale-105 transition-transform duration-300",type:"button",onClick:l.setToday,children:"Today"})})]})})},Yg=({children:e,title:t,container:n="",header:r=null,className:o="",...s})=>x.jsxs(Zr,{...s,as:"div",className:Ct("rounded-card flex flex-col gap-4 bg-card-background py-4 pb-8 border-card-border border shadow",n),children:[t?x.jsx("header",{className:"w-full px-8 pb-4 mb-2 border-b border-card-border font-medium text-xl",children:t}):r,x.jsx("div",{className:`min-w-full px-8 ${o}`,children:e})]}),i_=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:Ct("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]}),qg=(e,t)=>{const[n,r]=w.useState(()=>t||e);return w.useEffect(()=>{r(e)},[e]),[n,r]},Kg=w.createContext(""),a_=e=>{const[t,n]=qg(e.active),r=lo(0),o=lo(0),s=w.useRef(null),i=e.useHash?"a":"button";w.useEffect(()=>{const c=s.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)},[]),w.useEffect(()=>{e.onChange&&e.onChange(t)},[e.onChange,t]);const a=w.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(Kg.Provider,{value:t,children:x.jsx(Yg,{className:e.className,container:"pt-0",header:x.jsxs("header",{ref:s,className:"border-b border-card-border relative mb-2",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:"w-28 h-0.5 bg-primary absolute bottom-0 duration-300 transition-all hidden md:block"}),x.jsx("nav",{children:x.jsx("ul",{className:"divide-x divide-card-border overflow-x-auto flex justify-between md:justify-start",children:a.map(c=>{const u=c.props;return x.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"data-[active=true]:text-primary w-full md:w-auto",children:x.jsx(i,{"data-id":u.id,onClick:l,"aria-current":"page",className:"px-10 py-4 block font-medium w-full whitespace-nowrap",href:e.useHash?`#${u.id}`:void 0,children:u.title})},`tab-header-${u.id}`)})})})]}),children:e.children})})},l_=()=>w.useContext(Kg),c_=e=>{const t=l_();return x.jsx(w.Fragment,{children:e.id===t?e.children:null})};function er(e){return Zg(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mn(e){var t;return(t=(Zg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Zg(e){return e instanceof Node||e instanceof Bt(e).Node}function je(e){return e instanceof Element||e instanceof Bt(e).Element}function lt(e){return e instanceof HTMLElement||e instanceof Bt(e).HTMLElement}function Bc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function xs(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 u_(e){return["table","td","th"].includes(er(e))}function $i(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function zc(e){const t=Wc(),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 d_(e){let t=Nn(e);for(;lt(t)&&!tr(t);){if(zc(t))return t;if($i(t))return null;t=Nn(t)}return null}function Wc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function tr(e){return["html","body","#document"].includes(er(e))}function Ut(e){return Bt(e).getComputedStyle(e)}function Ri(e){return je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nn(e){if(er(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bc(e)&&e.host||Mn(e);return Bc(t)?t.host:t}function Xg(e){const t=Nn(e);return tr(t)?e.ownerDocument?e.ownerDocument.body:e.body:lt(t)&&xs(t)?t:Xg(t)}function nr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Xg(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Bt(o);return s?t.concat(i,i.visualViewport||[],xs(o)?o:[],i.frameElement&&n?nr(i.frameElement):[]):t.concat(o,nr(o,[],n))}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 gt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Bc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Hc(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Qg(){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 Jg(e){return e.mozInputSource===0&&e.isTrusted?!0:Yc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Uc(e){return f_()?!1:!Yc()&&e.width===0&&e.height===0||Yc()&&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 Gc(){return/apple/i.test(navigator.vendor)}function Yc(){const e=/android/i;return e.test(Hc())||e.test(Qg())}function ey(){return Hc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function f_(){return Qg().includes("jsdom/")}function Ss(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function h_(e){return"nativeEvent"in e}function p_(e){return e.matches("html,body")}function yt(e){return(e==null?void 0:e.ownerDocument)||document}function qc(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 rr(e){return"composedPath"in e?e.composedPath()[0]:e.target}const m_="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Kc(e){return lt(e)&&e.matches(m_)}function Dt(e){e.preventDefault(),e.stopPropagation()}function ty(e){return e?e.getAttribute("role")==="combobox"&&Kc(e):!1}const gn=Math.min,Gt=Math.max,ji=Math.round,mo=Math.floor,or=e=>({x:e,y:e}),g_={left:"right",right:"left",bottom:"top",top:"bottom"},y_={start:"end",end:"start"};function Zc(e,t,n){return Gt(e,gn(t,n))}function go(e,t){return typeof e=="function"?e(t):e}function sr(e){return e.split("-")[0]}function yo(e){return e.split("-")[1]}function ny(e){return e==="x"?"y":"x"}function Xc(e){return e==="y"?"height":"width"}function kr(e){return["top","bottom"].includes(sr(e))?"y":"x"}function Qc(e){return ny(kr(e))}function v_(e,t,n){n===void 0&&(n=!1);const r=yo(e),o=Qc(e),s=Xc(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Bi(i)),[i,Bi(i)]}function b_(e){const t=Bi(e);return[Jc(e),t,Jc(t)]}function Jc(e){return e.replace(/start|end/g,t=>y_[t])}function w_(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function x_(e,t,n,r){const o=yo(e);let s=w_(sr(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Jc)))),s}function Bi(e){return e.replace(/left|right|bottom|top/g,t=>g_[t])}function S_(e){return{top:0,right:0,bottom:0,left:0,...e}}function ry(e){return typeof e!="number"?S_(e):{top:e,right:e,bottom:e,left:e}}function zi(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}}/*!
|
|
169
|
+
*/var zg;function aI(){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=Rg();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,p){var m=s(null),y;m.current===null?(y={hasValue:!1,value:null},m.current=y):y=m.current;var v=a(function(){var T=!1,E,k,A=function(F){if(!T){T=!0,E=F;var R=h(F);if(p!==void 0&&y.hasValue){var C=y.value;if(p(C,R))return k=C,C}return k=R,R}var O=E,M=k;if(r(O,F))return M;var L=h(F);return p!==void 0&&p(M,L)?M:(E=F,k=L,L)},D=f===void 0?null:f,I=function(){return A(d())},V=D===null?void 0:function(){return A(D())};return[I,V]},[d,f,h,p]),w=v[0],g=v[1],S=o(u,w,g);return i(function(){y.hasValue=!0,y.value=S},[S]),l(S),S}Bg.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Bg}process.env.NODE_ENV==="production"?iI():aI();const vo=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),Wg=e=>e instanceof Promise,Hg=(e,t,n,r)=>t===e?n.reduce((o,s)=>s(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,s)=>s(o,t,r),{...t,...e}):n.reduce((o,s)=>s(o,t,r),e),uI=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,d)=>n(f=>Hg(u,f,s,d));return Wg(l)?l.then(u=>{o.current={method:e,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:e,props:r(),time:performance.now()-a},void c(l,o.current))},dI=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>Hg(c,u,s,o.current));return Wg(a)?a.then(c=>l(c)):l(a)},Wc=(e,t,n)=>{const[r,o]=b.useState(()=>e),s=vo(r),i=vo((n==null?void 0:n.props)??{}),a=vo(t),l=vo((n==null?void 0:n.postMiddleware)??[]),c=vo((n==null?void 0:n.interceptor)??[]),u=b.useRef(e),d=lI(r),f=vo(d),h=b.useRef(null);b.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(y=>{y(r,d,m)})},[r,l,d]);const[p]=b.useState(()=>{const m=()=>i.current,y=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>f.current});return cI(y).reduce((v,[w,g])=>({...v,[w]:n!=null&&n.debug?uI(w,g,o,m,h,c.current):dI(w,g,o,m,h,c.current)}),{})});return[r,p,i.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}function Hc(e,t,n){var r,o,s,i,a;t==null&&(t=100);function l(){var u=Date.now()-i;u<t&&u>=0?r=setTimeout(l,t-u):(r=null,n||(a=e.apply(s,o),s=o=null))}var c=function(){s=this,o=arguments,i=Date.now();var u=n&&!r;return r||(r=setTimeout(l,t)),u&&(a=e.apply(s,o),s=o=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=e.apply(s,o),s=o=null,clearTimeout(r),r=null)},c}Hc.debounce=Hc;var pI=Hc;const Ug=ef(pI);function mI(e){let{debounce:t,scroll:n,polyfill:r,offsetSize:o}={debounce:0,scroll:!1,offsetSize:!1};const s=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[i,a]=b.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=b.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:i}),c=t?typeof t=="number"?t:t.scroll:null,u=t?typeof t=="number"?t:t.resize:null,d=b.useRef(!1);b.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[f,h,p]=b.useMemo(()=>{const w=()=>{if(!l.current.element)return;const{left:g,top:S,width:T,height:E,bottom:k,right:A,x:D,y:I}=l.current.element.getBoundingClientRect(),V={left:g,top:S,width:T,height:E,bottom:k,right:A,x:D,y:I};l.current.element instanceof HTMLElement&&o&&(V.height=l.current.element.offsetHeight,V.width=l.current.element.offsetWidth),Object.freeze(V),d.current&&!bI(l.current.lastBounds,V)&&a(l.current.lastBounds=V)};return[w,u?Ug(w,u):w,c?Ug(w,c):w]},[a,o,c,u]);function m(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(w=>w.removeEventListener("scroll",p,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function y(){l.current.element&&(l.current.resizeObserver=new s(p),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(w=>w.addEventListener("scroll",p,{capture:!0,passive:!0})))}const v=w=>{!w||w===l.current.element||(m(),l.current.element=w,l.current.scrollContainers=Gg(w),y())};return yI(p,!!n),gI(h),b.useEffect(()=>{m(),y()},[n,p,h]),b.useEffect(()=>m,[]),[v,i,f]}function gI(e){b.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function yI(e,t){b.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function Gg(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:o}=window.getComputedStyle(e);return[n,r,o].some(s=>s==="auto"||s==="scroll")&&t.push(e),[...t,...Gg(e.parentElement)]}const vI=["x","y","top","bottom","left","right","width","height"],bI=(e,t)=>vI.every(n=>e[n]===t[n]),wI=({children:e})=>{const[t,n]=mI();return x.jsx(Ht.div,{animate:{height:n.height>0?n.height:"auto"},children:x.jsx("div",{ref:t,children:e})})},xI={type:"spring",bounce:.1,duration:.3},Yg=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.5}),qg={middle:{x:"0%",opacity:1},enter:Yg(1),exit:Yg(-1)},Kg={exit:{visibility:"hidden"}},TI=e=>{const t=hn(ig(e));return sg({start:t,end:po(t,41)})},Zg=(e,t)=>e.toLocaleDateString(t,{month:"long"}),SI=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=ig(new Date(e).setMonth(r)),s=Zg(o,t);return x.jsx("option",{value:s,"data-index":r,children:s},s)}),Uc={ArrowLeft:(e,t)=>t==="days"?$O(e,1):xg(e,1),ArrowRight:(e,t)=>t==="days"?po(e,1):Ri(e,1),ArrowUp:(e,t)=>t==="days"?RO(e,1):jO(e,1),ArrowDown:(e,t)=>t==="days"?rg(e,1):og(e,1)},Xg=(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"),Qg=({locale:e,disabledDate:t,markToday:n=!0,autoFocusToday:r=!0,date:o,onChange:s})=>{const i=o||new Date,[a,l]=Wc({date:i,isAnimating:!1,year:_r(i),direction:void 0,months:SI(i,e),week:sg({start:hn(i),end:qP(i)})},p=>({onChangeYear:m=>({year:m}),setToday:()=>({date:go(new Date)}),onExitComplete:()=>(Xg(p.state().date,200),{isAnimating:!1}),date:m=>{const y=m(p.state().date);return{date:y,year:_r(y)}},nextMonth:()=>{const m=p.state();if(m.isAnimating)return m;const y=Ri(m.date,1);return{date:y,isAnimating:!0,direction:1,year:_r(y)}},previousMonth:()=>{const m=p.state();if(m.isAnimating)return m;const y=xg(m.date,1);return{date:y,isAnimating:!0,direction:-1,year:_r(y)}},onSelectDate:m=>{const y=m.currentTarget.dataset.date||"",v=new Date(y);return{date:v,year:_r(v)}},onChangeMonth:m=>{const y=m.target.value,w=Array.from(m.target.options).find(g=>g.value===y);if(w){const g=w.dataset.index||"",S=new Date(p.state().date);return S.setMonth(+g),{date:S,year:_r(S)}}return p.state()},onKeyDown:m=>{const y=m.key;if(y in Uc){(y==="ArrowUp"||y==="ArrowDown")&&m.preventDefault();const v=p.state().date,w=Pn.keyof(Uc,y)?Uc[y](v,m.shiftKey?"month":"days"):null;if(w!==null)return Xg(w),{date:w,year:_r(w)}}return p.state()}})),c=TI(a.date),u=a.date.toISOString(),d=Zg(a.date,e);b.useEffect(()=>s==null?void 0:s(a.date),[u]);const f=hI(p=>{l.date(m=>{const y=new Date(m);return y.setFullYear(+p),y})},700),h=p=>{const m=p.currentTarget.value;l.onChangeYear(m),f(m)};return x.jsx(hP,{transition:xI,children:x.jsxs("div",{className:"relative overflow-hidden",children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(wI,{children:x.jsx(Vi,{presenceAffectsLayout:!0,mode:"popLayout",initial:!1,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:Kg,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(L1,{className:"h-4 w-4"})}),x.jsx(Ht.span,{variants:qg,custom:a.direction,className:"absolute z-normal isolate inset-0 flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"w-fit flex items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{style:{width:`${d.length}ch`},value:d,onChange:l.onChangeMonth,className:"appearance-none capitalize bg-transparent proportional-nums hover:text-primary cursor-pointer w-fit",children:a.months}),x.jsx(Ng,{mask:"int",value:a.year,maxLength:4,placeholder:"YYYY",onChange:h,style:{width:`${a.year.length}ch`},className:"w-16 bg-transparent appearance-none hover:text-primary cursor-pointer"})]})}),x.jsx(Ht.button,{variants:Kg,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:l.nextMonth,children:x.jsx(kl,{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:"font-medium capitalize text-sm",children:p.toLocaleDateString(e,{weekday:"short"})},p.toString()))}),x.jsx(Ht.ul,{onKeyDown:l.onKeyDown,variants:qg,custom:a.direction,className:"mt-4 pb-2 grid grid-cols-7 gap-y-4",children:c.map(p=>{const m=p.toISOString(),y=m===u,v=VO(p)&&n,w=(t==null?void 0:t(p))||!1,g=!LO(p,a.date)||w;return x.jsx("li",{className:"w-full flex 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:`size-8 disabled:cursor-not-allowed rounded-full font-semibold flex items-center justify-center proportional-nums ${v?"text-primary":""} ${g?"text-disabled":""} ${y?"bg-primary text-primary-foreground":""}`,children:p.getDate()})},m)})})]},d)})})}),x.jsx("footer",{className:"text-center text-primary mt-2",children:x.jsx("button",{className:"hover:scale-105 transition-transform duration-300",type:"button",onClick:l.setToday,children:"Today"})})]})})},Jg=({children:e,title:t,container:n="",header:r=null,className:o="",...s})=>x.jsxs(eo,{...s,as:"div",className:pt("rounded-card flex flex-col gap-4 bg-card-background py-4 pb-8 border-card-border border shadow",n),children:[t?x.jsx("header",{className:"w-full px-8 pb-4 mb-2 border-b border-card-border font-medium text-xl",children:t}):r,x.jsx("div",{className:`min-w-full px-8 ${o}`,children:e})]}),EI=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:pt("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]}),ey=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]},ty={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."]})},CI=b.createContext({translations:ty}),tn=()=>{const e=b.useContext(CI);return e?e.translations:ty};function nr(e){return ny(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mn(e){var t;return(t=(ny(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ny(e){return e instanceof Node||e instanceof Bt(e).Node}function je(e){return e instanceof Element||e instanceof Bt(e).Element}function ct(e){return e instanceof HTMLElement||e instanceof Bt(e).HTMLElement}function Gc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function Es(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 PI(e){return["table","td","th"].includes(nr(e))}function Hi(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Yc(e){const t=qc(),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 kI(e){let t=Nn(e);for(;ct(t)&&!rr(t);){if(Yc(t))return t;if(Hi(t))return null;t=Nn(t)}return null}function qc(){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 Ui(e){return je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nn(e){if(nr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gc(e)&&e.host||Mn(e);return Gc(t)?t.host:t}function ry(e){const t=Nn(e);return rr(t)?e.ownerDocument?e.ownerDocument.body:e.body:ct(t)&&Es(t)?t:ry(t)}function or(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ry(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Bt(o);return s?t.concat(i,i.visualViewport||[],Es(o)?o:[],i.frameElement&&n?or(i.frameElement):[]):t.concat(o,or(o,[],n))}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 ut(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Gc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Kc(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function oy(){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 sy(e){return e.mozInputSource===0&&e.isTrusted?!0:Qc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Zc(e){return OI()?!1:!Qc()&&e.width===0&&e.height===0||Qc()&&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 Xc(){return/apple/i.test(navigator.vendor)}function Qc(){const e=/android/i;return e.test(Kc())||e.test(oy())}function iy(){return Kc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function OI(){return oy().includes("jsdom/")}function Cs(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function II(e){return"nativeEvent"in e}function _I(e){return e.matches("html,body")}function vt(e){return(e==null?void 0:e.ownerDocument)||document}function Jc(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 Fn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const AI="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function eu(e){return ct(e)&&e.matches(AI)}function Et(e){e.preventDefault(),e.stopPropagation()}function ay(e){return e?e.getAttribute("role")==="combobox"&&eu(e):!1}const gn=Math.min,Gt=Math.max,Gi=Math.round,bo=Math.floor,sr=e=>({x:e,y:e}),DI={left:"right",right:"left",bottom:"top",top:"bottom"},MI={start:"end",end:"start"};function tu(e,t,n){return Gt(e,gn(t,n))}function wo(e,t){return typeof e=="function"?e(t):e}function ir(e){return e.split("-")[0]}function xo(e){return e.split("-")[1]}function ly(e){return e==="x"?"y":"x"}function nu(e){return e==="y"?"height":"width"}function Ar(e){return["top","bottom"].includes(ir(e))?"y":"x"}function ru(e){return ly(Ar(e))}function NI(e,t,n){n===void 0&&(n=!1);const r=xo(e),o=ru(e),s=nu(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Yi(i)),[i,Yi(i)]}function FI(e){const t=Yi(e);return[ou(e),t,ou(t)]}function ou(e){return e.replace(/start|end/g,t=>MI[t])}function LI(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function VI(e,t,n,r){const o=xo(e);let s=LI(ir(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(ou)))),s}function Yi(e){return e.replace(/left|right|bottom|top/g,t=>DI[t])}function $I(e){return{top:0,right:0,bottom:0,left:0,...e}}function cy(e){return typeof e!="number"?$I(e):{top:e,right:e,bottom:e,left:e}}function qi(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}}/*!
|
|
165
170
|
* tabbable 6.2.0
|
|
166
171
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
167
|
-
*/var T_=["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])"],Wi=T_.join(","),oy=typeof Element>"u",vo=oy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Hi=!oy&&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},Ui=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},E_=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},C_=function(t,n,r){if(Ui(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Wi));return n&&vo.call(t,Wi)&&o.unshift(t),o=o.filter(r),o},P_=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Ui(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=vo.call(i,Wi);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!Ui(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&f){var h=e(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return o},sy=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},iy=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||E_(t))&&!sy(t)?0:t.tabIndex},k_=function(t,n){var r=iy(t);return r<0&&n&&!sy(t)?0:r},O_=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},ay=function(t){return t.tagName==="INPUT"},__=function(t){return ay(t)&&t.type==="hidden"},A_=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},I_=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},D_=function(t){if(!t.name)return!0;var n=t.form||Hi(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=I_(o,t.form);return!s||s===t},M_=function(t){return ay(t)&&t.type==="radio"},N_=function(t){return M_(t)&&!D_(t)},F_=function(t){var n,r=t&&Hi(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,d;r=Hi(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return s},ly=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},L_=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=vo.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(vo.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=Hi(t);if(l&&!l.shadowRoot&&o(l)===!0)return ly(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(F_(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ly(t);return!1},V_=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 vo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},$_=function(t,n){return!(n.disabled||Ui(n)||__(n)||L_(n,t)||A_(n)||V_(n))},eu=function(t,n){return!(N_(n)||iy(n)<0||!$_(t,n))},R_=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},j_=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=k_(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(O_).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Ts=function(t,n){n=n||{};var r;return n.getShadowRoot?r=P_([t],n.includeContainer,{filter:eu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:R_}):r=C_(t,n.includeContainer,eu.bind(null,n)),j_(r)},B_=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return vo.call(t,Wi)===!1?!1:eu(n,t)};function cy(e,t,n){let{reference:r,floating:o}=e;const s=kr(t),i=Qc(t),a=Xc(i),l=sr(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(yo(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}const z_=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=cy(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:y,fn:v}=a[m],{x:b,y:g,data:T,reset:S}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=b??u,d=g??d,h={...h,[y]:{...h[y],...T}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:d}=cy(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function tu(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=go(t,e),p=ry(h),y=a[f?d==="floating"?"reference":"floating":d],v=zi(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),T=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},S=zi(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:g,strategy:l}):b);return{top:(v.top-S.top+p.top)/T.y,bottom:(S.bottom-v.bottom+p.bottom)/T.y,left:(v.left-S.left+p.left)/T.x,right:(S.right-v.right+p.right)/T.x}}const W_=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=go(e,t)||{};if(c==null)return{};const d=ry(u),f={x:n,y:r},h=Qc(o),p=Xc(h),m=await i.getDimensions(c),y=h==="y",v=y?"top":"left",b=y?"bottom":"right",g=y?"clientHeight":"clientWidth",T=s.reference[p]+s.reference[h]-f[h]-s.floating[p],S=f[h]-s.reference[h],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let C=E?E[g]:0;(!C||!await(i.isElement==null?void 0:i.isElement(E)))&&(C=a.floating[g]||s.floating[p]);const k=T/2-S/2,I=C/2-m[p]/2-1,N=gn(d[v],I),L=gn(d[b],I),O=N,j=C-m[p]-L,D=C/2-m[p]/2+k,_=Zc(O,D,j),F=!l.arrow&&yo(o)!=null&&D!==_&&s.reference[p]/2-(D<O?N:L)-m[p]/2<0,$=F?D<O?D-O:D-j:0;return{[h]:f[h]+$,data:{[h]:_,centerOffset:D-_-$,...F&&{alignmentOffset:$}},reset:F}}}),H_=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=go(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=sr(o),b=kr(a),g=sr(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(g||!m?[Bi(a)]:b_(a)),E=p!=="none";!f&&E&&S.push(...x_(a,m,p,T));const C=[a,...S],k=await tu(t,y),I=[];let N=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[v]),d){const D=v_(o,i,T);I.push(k[D[0]],k[D[1]])}if(N=[...N,{placement:o,overflows:I}],!I.every(D=>D<=0)){var L,O;const D=(((L=s.flip)==null?void 0:L.index)||0)+1,_=C[D];if(_)return{data:{index:D,overflows:N},reset:{placement:_}};let F=(O=N.filter($=>$.overflows[0]<=0).sort(($,z)=>$.overflows[1]-z.overflows[1])[0])==null?void 0:O.placement;if(!F)switch(h){case"bestFit":{var j;const $=(j=N.filter(z=>{if(E){const q=kr(z.placement);return q===b||q==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(q=>q>0).reduce((q,P)=>q+P,0)]).sort((z,q)=>z[1]-q[1])[0])==null?void 0:j[0];$&&(F=$);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};async function U_(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=sr(n),a=yo(n),l=kr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=go(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 G_=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await U_(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Y_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:y=>{let{x:v,y:b}=y;return{x:v,y:b}}},...l}=go(e,t),c={x:n,y:r},u=await tu(t,l),d=kr(sr(o)),f=ny(d);let h=c[f],p=c[d];if(s){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=h+u[y],g=h-u[v];h=Zc(b,h,g)}if(i){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=p+u[y],g=p-u[v];p=Zc(b,p,g)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},q_=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=go(e,t),l=await tu(t,a),c=sr(n),u=yo(n),d=kr(n)==="y",{width:f,height:h}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const y=h-l.top-l.bottom,v=f-l.left-l.right,b=gn(h-l[p],y),g=gn(f-l[m],v),T=!t.middlewareData.shift;let S=b,E=g;if(d?E=u||T?gn(g,v):v:S=u||T?gn(b,y):y,T&&!u){const k=Gt(l.left,0),I=Gt(l.right,0),N=Gt(l.top,0),L=Gt(l.bottom,0);d?E=f-2*(k!==0||I!==0?k+I:Gt(l.left,l.right)):S=h-2*(N!==0||L!==0?N+L:Gt(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:S});const C=await o.getDimensions(s.floating);return f!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}};function uy(e){const t=Ut(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=lt(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=ji(n)!==s||ji(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function nu(e){return je(e)?e:e.contextElement}function bo(e){const t=nu(e);if(!lt(t))return or(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=uy(t);let i=(s?ji(n.width):n.width)/r,a=(s?ji(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const K_=or(0);function dy(e){const t=Bt(e);return!Wc()||!t.visualViewport?K_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Z_(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function Or(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=nu(e);let i=or(1);t&&(r?je(r)&&(i=bo(r)):i=bo(e));const a=Z_(s,n,r)?dy(s):or(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const f=Bt(s),h=r&&je(r)?Bt(r):r;let p=f,m=p.frameElement;for(;m&&r&&h!==p;){const y=bo(m),v=m.getBoundingClientRect(),b=Ut(m),g=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,T=v.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=g,c+=T,p=Bt(m),m=p.frameElement}}return zi({width:u,height:d,x:l,y:c})}function X_(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Mn(r),a=t?$i(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=or(1);const u=or(0),d=lt(r);if((d||!d&&!s)&&((er(r)!=="body"||xs(i))&&(l=Ri(r)),lt(r))){const f=Or(r);c=bo(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 Q_(e){return Array.from(e.getClientRects())}function fy(e){return Or(Mn(e)).left+Ri(e).scrollLeft}function J_(e){const t=Mn(e),n=Ri(e),r=e.ownerDocument.body,o=Gt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Gt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+fy(e);const a=-n.scrollTop;return Ut(r).direction==="rtl"&&(i+=Gt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function eA(e,t){const n=Bt(e),r=Mn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Wc();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function tA(e,t){const n=Or(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=lt(e)?bo(e):or(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function hy(e,t,n){let r;if(t==="viewport")r=eA(e,n);else if(t==="document")r=J_(Mn(e));else if(je(t))r=tA(t,n);else{const o=dy(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return zi(r)}function py(e,t){const n=Nn(e);return n===t||!je(n)||tr(n)?!1:Ut(n).position==="fixed"||py(n,t)}function nA(e,t){const n=t.get(e);if(n)return n;let r=nr(e,[],!1).filter(a=>je(a)&&er(a)!=="body"),o=null;const s=Ut(e).position==="fixed";let i=s?Nn(e):e;for(;je(i)&&!tr(i);){const a=Ut(i),l=zc(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||xs(i)&&!l&&py(e,i))?r=r.filter(u=>u!==i):o=a,i=Nn(i)}return t.set(e,r),r}function rA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?$i(t)?[]:nA(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=hy(t,u,o);return c.top=Gt(d.top,c.top),c.right=gn(d.right,c.right),c.bottom=gn(d.bottom,c.bottom),c.left=Gt(d.left,c.left),c},hy(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function oA(e){const{width:t,height:n}=uy(e);return{width:t,height:n}}function sA(e,t,n){const r=lt(t),o=Mn(t),s=n==="fixed",i=Or(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=or(0);if(r||!r&&!s)if((er(t)!=="body"||xs(o))&&(a=Ri(t)),r){const d=Or(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=fy(o));const c=i.left+a.scrollLeft-l.x,u=i.top+a.scrollTop-l.y;return{x:c,y:u,width:i.width,height:i.height}}function ru(e){return Ut(e).position==="static"}function my(e,t){return!lt(e)||Ut(e).position==="fixed"?null:t?t(e):e.offsetParent}function gy(e,t){const n=Bt(e);if($i(e))return n;if(!lt(e)){let o=Nn(e);for(;o&&!tr(o);){if(je(o)&&!ru(o))return o;o=Nn(o)}return n}let r=my(e,t);for(;r&&u_(r)&&ru(r);)r=my(r,t);return r&&tr(r)&&ru(r)&&!zc(r)?n:r||d_(e)||n}const iA=async function(e){const t=this.getOffsetParent||gy,n=this.getDimensions,r=await n(e.floating);return{reference:sA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function aA(e){return Ut(e).direction==="rtl"}const lA={convertOffsetParentRelativeRectToViewportRelativeRect:X_,getDocumentElement:Mn,getClippingRect:rA,getOffsetParent:gy,getElementRects:iA,getClientRects:Q_,getDimensions:oA,getScale:bo,isElement:je,isRTL:aA};function cA(e,t){let n=null,r;const o=Mn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=mo(u),p=mo(o.clientWidth-(c+d)),m=mo(o.clientHeight-(u+f)),y=mo(c),b={rootMargin:-h+"px "+-p+"px "+-m+"px "+-y+"px",threshold:Gt(0,gn(1,l))||1};let g=!0;function T(S){const E=S[0].intersectionRatio;if(E!==l){if(!g)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(T,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,b)}n.observe(e)}return i(!0),s}function ou(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=nu(e),u=o||s?[...c?nr(c):[],...nr(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=c&&a?cA(c,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?Or(e):null;l&&y();function y(){const v=Or(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,p=requestAnimationFrame(y)}return n(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const uA=G_,dA=Y_,fA=H_,hA=q_,yy=W_,pA=(e,t,n)=>{const r=new Map,o={platform:lA,...n},s={...o.platform,_c:r};return z_(e,t,{...o,platform:s})};var Gi=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Yi(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(!Yi(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Yi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function vy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function by(e,t){const n=vy(e);return Math.round(t*n)/n}function wy(e){const t=M.useRef(e);return Gi(()=>{t.current=e}),t}function mA(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=M.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=M.useState(r);Yi(f,r)||h(r);const[p,m]=M.useState(null),[y,v]=M.useState(null),b=M.useCallback($=>{$!==E.current&&(E.current=$,m($))},[]),g=M.useCallback($=>{$!==C.current&&(C.current=$,v($))},[]),T=s||p,S=i||y,E=M.useRef(null),C=M.useRef(null),k=M.useRef(u),I=l!=null,N=wy(l),L=wy(o),O=M.useCallback(()=>{if(!E.current||!C.current)return;const $={placement:t,strategy:n,middleware:f};L.current&&($.platform=L.current),pA(E.current,C.current,$).then(z=>{const q={...z,isPositioned:!0};j.current&&!Yi(k.current,q)&&(k.current=q,Bd.flushSync(()=>{d(q)}))})},[f,t,n,L]);Gi(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d($=>({...$,isPositioned:!1})))},[c]);const j=M.useRef(!1);Gi(()=>(j.current=!0,()=>{j.current=!1}),[]),Gi(()=>{if(T&&(E.current=T),S&&(C.current=S),T&&S){if(N.current)return N.current(T,S,O);O()}},[T,S,O,N,I]);const D=M.useMemo(()=>({reference:E,floating:C,setReference:b,setFloating:g}),[b,g]),_=M.useMemo(()=>({reference:T,floating:S}),[T,S]),F=M.useMemo(()=>{const $={position:n,left:0,top:0};if(!_.floating)return $;const z=by(_.floating,u.x),q=by(_.floating,u.y);return a?{...$,transform:"translate("+z+"px, "+q+"px)",...vy(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:q}},[n,a,_.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:O,refs:D,elements:_,floatingStyles:F}),[u,O,D,_,F])}const gA=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?yy({element:r.current,padding:o}).fn(n):{}:r?yy({element:r,padding:o}).fn(n):{}}}},su=(e,t)=>({...uA(e),options:[e,t]}),xy=(e,t)=>({...dA(e),options:[e,t]}),Sy=(e,t)=>({...fA(e),options:[e,t]}),yA=(e,t)=>({...hA(e),options:[e,t]}),Ty=(e,t)=>({...gA(e),options:[e,t]}),Ey={...M},vA=Ey.useInsertionEffect||(e=>e());function Yt(e){const t=M.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return vA(()=>{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 iu="ArrowUp",Es="ArrowDown",wo="ArrowLeft",xo="ArrowRight";function qi(e,t,n){return Math.floor(e/t)!==n}function Cs(e,t){return t<0||t>=e.current.length}function au(e,t){return Ot(e,{disabledIndices:t})}function Cy(e,t){return Ot(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ot(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:s=1}=t===void 0?{}:t;const i=e.current;let a=n;do a+=r?-s:s;while(a>=0&&a<=i.length-1&&Ki(i,a,o));return a}function bA(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===iu){if(u&&Dt(n),c===-1)d=l;else if(d=Ot(e,{startingIndex:d,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||d<0)){const f=c%s,h=l%s,p=l-(h-f);h===f?d=l:d=h>f?p:p-s}Cs(e,d)&&(d=c)}if(n.key===Es&&(u&&Dt(n),c===-1?d=a:(d=Ot(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(d=Ot(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),Cs(e,d)&&(d=c)),r==="both"){const f=mo(c/s);n.key===xo&&(u&&Dt(n),c%s!==s-1?(d=Ot(e,{startingIndex:c,disabledIndices:i}),o&&qi(d,s,f)&&(d=Ot(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(d=Ot(e,{startingIndex:c-c%s-1,disabledIndices:i})),qi(d,s,f)&&(d=c)),n.key===wo&&(u&&Dt(n),c%s!==0?(d=Ot(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&qi(d,s,f)&&(d=Ot(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(d=Ot(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),qi(d,s,f)&&(d=c));const h=mo(l/s)===f;Cs(e,d)&&(o&&h?d=n.key===wo?l:Ot(e,{startingIndex:c-c%s-1,disabledIndices:i}):d=c)}return d}function wA(e,t,n){const r=[];let o=0;return e.forEach((s,i)=>{let{width:a,height:l}=s;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+i+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=i}),c=!0):o++}}),[...r]}function xA(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e)}}function SA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Ki(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 Py=0;function ir(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Py);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():Py=requestAnimationFrame(s)}var We=typeof document<"u"?w.useLayoutEffect:w.useEffect;function So(){return So=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},So.apply(this,arguments)}let ky=!1,TA=0;const Oy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+TA++;function EA(){const[e,t]=M.useState(()=>ky?Oy():void 0);return We(()=>{e==null&&t(Oy())},[]),M.useEffect(()=>{ky=!0},[]),e}const Ps=Ey.useId||EA;let ks;process.env.NODE_ENV!=="production"&&(ks=new Set);function Zi(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ks)!=null&&e.has(o))){var s;(s=ks)==null||s.add(o),console.warn(o)}}function CA(){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=ks)!=null&&e.has(o))){var s;(s=ks)==null||s.add(o),console.error(o)}}const _y=M.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:s}},width:i=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:f,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||Zi("The `ref` prop is required for `FloatingArrow`."));const y=Ps(),[v,b]=M.useState(!1);if(We(()=>{if(!o)return;Ut(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const g=c*2,T=g/2,S=i/2*(l/-8+1),E=a/2*l/4,[C,k]=r.split("-"),I=!!f,N=C==="top"||C==="bottom",L=u&&k==="end"?"bottom":"top";let O=u&&k==="end"?"right":"left";u&&v&&(O=k==="end"?"left":"right");const j=(s==null?void 0:s.x)!=null?u||s.x:"",D=(s==null?void 0:s.y)!=null?u||s.y:"",_=f||"M0,0"+(" H"+i)+(" L"+(i-S)+","+(a-E))+(" Q"+i/2+","+a+" "+S+","+(a-E))+" Z",F={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return M.createElement("svg",So({},m,{"aria-hidden":!0,ref:n,width:I?i:i+g,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[O]:j,[L]:D,[C]:N||I?"100%":"calc(100% - "+g/2+"px)",transform:""+F+(h??""),...p}}),g>0&&M.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:d,strokeWidth:g+(f?0:1),d:_}),M.createElement("path",{stroke:g&&!f?m.fill:"none",d:_}),M.createElement("clipPath",{id:y},M.createElement("rect",{x:-T,y:T*(I?-1:1),width:i+g,height:i})))});function PA(){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 kA=M.createContext(null),OA=M.createContext(null),Xi=()=>{var e;return((e=M.useContext(kA))==null?void 0:e.id)||null},Os=()=>M.useContext(OA);function ar(e){return"data-floating-ui-"+e}function Mt(e){const t=w.useRef(e);return We(()=>{t.current=e}),t}const Ay=ar("safe-polygon");function lu(e,t,n){return n&&!Ss(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function _A(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,h=Os(),p=Xi(),m=Mt(c),y=Mt(l),v=Mt(n),b=M.useRef(),g=M.useRef(-1),T=M.useRef(),S=M.useRef(-1),E=M.useRef(!0),C=M.useRef(!1),k=M.useRef(()=>{}),I=M.useCallback(()=>{var _;const F=(_=o.current.openEvent)==null?void 0:_.type;return(F==null?void 0:F.includes("mouse"))&&F!=="mousedown"},[o]);M.useEffect(()=>{if(!a)return;function _(F){let{open:$}=F;$||(clearTimeout(g.current),clearTimeout(S.current),E.current=!0)}return s.on("openchange",_),()=>{s.off("openchange",_)}},[a,s]),M.useEffect(()=>{if(!a||!m.current||!n)return;function _($){I()&&r(!1,$,"hover")}const F=yt(i.floating).documentElement;return F.addEventListener("mouseleave",_),()=>{F.removeEventListener("mouseleave",_)}},[i.floating,n,r,a,m,I]);const N=M.useCallback(function(_,F,$){F===void 0&&(F=!0),$===void 0&&($="hover");const z=lu(y.current,"close",b.current);z&&!T.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,_,$),z)):F&&(clearTimeout(g.current),r(!1,_,$))},[y,r]),L=Yt(()=>{k.current(),T.current=void 0}),O=Yt(()=>{if(C.current){const _=yt(i.floating).body;_.style.pointerEvents="",_.removeAttribute(Ay),C.current=!1}});M.useEffect(()=>{if(!a)return;function _(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function F(P){if(clearTimeout(g.current),E.current=!1,u&&!Ss(b.current)||d>0&&!lu(y.current,"open"))return;const V=lu(y.current,"open",b.current);V?g.current=window.setTimeout(()=>{v.current||r(!0,P,"hover")},V):r(!0,P,"hover")}function $(P){if(_())return;k.current();const V=yt(i.floating);if(clearTimeout(S.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),T.current=m.current({...o.current.floatingContext,tree:h,x:P.clientX,y:P.clientY,onClose(){O(),L(),N(P,!0,"safe-polygon")}});const ie=T.current;V.addEventListener("mousemove",ie),k.current=()=>{V.removeEventListener("mousemove",ie)};return}(b.current==="touch"?!gt(i.floating,P.relatedTarget):!0)&&N(P)}function z(P){_()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:P.clientX,y:P.clientY,onClose(){O(),L(),N(P)}})(P))}if(je(i.domReference)){var q;const P=i.domReference;return n&&P.addEventListener("mouseleave",z),(q=i.floating)==null||q.addEventListener("mouseleave",z),f&&P.addEventListener("mousemove",F,{once:!0}),P.addEventListener("mouseenter",F),P.addEventListener("mouseleave",$),()=>{var V;n&&P.removeEventListener("mouseleave",z),(V=i.floating)==null||V.removeEventListener("mouseleave",z),f&&P.removeEventListener("mousemove",F),P.removeEventListener("mouseenter",F),P.removeEventListener("mouseleave",$)}}},[i,a,e,u,d,f,N,L,O,r,n,v,h,y,m,o]),We(()=>{var _;if(a&&n&&(_=m.current)!=null&&_.__options.blockPointerEvents&&I()){const $=yt(i.floating).body;$.setAttribute(Ay,""),$.style.pointerEvents="none",C.current=!0;const z=i.floating;if(je(i.domReference)&&z){var F;const q=i.domReference,P=h==null||(F=h.nodesRef.current.find(V=>V.id===p))==null||(F=F.context)==null?void 0:F.elements.floating;return P&&(P.style.pointerEvents=""),q.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{q.style.pointerEvents="",z.style.pointerEvents=""}}}},[a,n,p,i,h,m,I]),We(()=>{n||(b.current=void 0,L(),O())},[n,L,O]),M.useEffect(()=>()=>{L(),clearTimeout(g.current),clearTimeout(S.current),O()},[a,i.domReference,L,O]);const j=M.useMemo(()=>{function _(F){b.current=F.pointerType}return{onPointerDown:_,onPointerEnter:_,onMouseMove(F){const{nativeEvent:$}=F;function z(){!E.current&&!v.current&&r(!0,$,"hover")}u&&!Ss(b.current)||n||d===0||(clearTimeout(S.current),b.current==="touch"?z():S.current=window.setTimeout(z,d))}}},[u,r,n,v,d]),D=M.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(_){N(_.nativeEvent,!1)}}),[N]);return M.useMemo(()=>a?{reference:j,floating:D}:{},[a,j,D])}function AA(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function To(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function IA(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),To(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let Eo=new WeakMap,Qi=new WeakSet,Ji={},cu=0;const DA=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Iy=e=>e&&(e.host||Iy(e.parentNode)),MA=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Iy(n);return e.contains(r)?r:null}).filter(n=>n!=null);function NA(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=MA(t,e),a=new Set,l=new Set(i),c=[];Ji[o]||(Ji[o]=new WeakMap);const u=Ji[o];i.forEach(d),f(t),a.clear();function d(h){!h||a.has(h)||(a.add(h),h.parentNode&&d(h.parentNode))}function f(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(er(p)!=="script")if(a.has(p))f(p);else{const m=s?p.getAttribute(s):null,y=m!==null&&m!=="false",v=(Eo.get(p)||0)+1,b=(u.get(p)||0)+1;Eo.set(p,v),u.set(p,b),c.push(p),v===1&&y&&Qi.add(p),b===1&&p.setAttribute(o,""),!y&&s&&p.setAttribute(s,"true")}})}return cu++,()=>{c.forEach(h=>{const p=(Eo.get(h)||0)-1,m=(u.get(h)||0)-1;Eo.set(h,p),u.set(h,m),p||(!Qi.has(h)&&s&&h.removeAttribute(s),Qi.delete(h)),m||h.removeAttribute(o)}),cu--,cu||(Eo=new WeakMap,Eo=new WeakMap,Qi=new WeakSet,Ji={})}}function Dy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=yt(e[0]).body;return NA(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Co=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function My(e,t){const n=Ts(e,Co());t==="prev"&&n.reverse();const r=n.indexOf(nn(yt(e)));return n.slice(r+1)[0]}function Ny(){return My(document.body,"next")}function Fy(){return My(document.body,"prev")}function _s(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!gt(n,r)}function FA(e){Ts(e,Co()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function LA(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 VA(e,t,n){const r=e.indexOf(t);function o(i){const a=ar("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||gt(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const uu={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 $A;function Ly(e){e.key==="Tab"&&(e.target,clearTimeout($A))}const ea=M.forwardRef(function(t,n){const[r,o]=M.useState();We(()=>(Gc()&&o("button"),document.addEventListener("keydown",Ly),()=>{document.removeEventListener("keydown",Ly)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ar("focus-guard")]:"",style:uu};return M.createElement("span",So({},t,s))}),Vy=M.createContext(null),$y=ar("portal");function RA(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Ps(),o=Ry(),[s,i]=M.useState(null),a=M.useRef(null);return We(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),We(()=>{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($y,""),l.appendChild(c),a.current=c,i(c)},[t,r]),We(()=>{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($y,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function ta(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=RA({id:n,root:r}),[i,a]=M.useState(null),l=M.useRef(null),c=M.useRef(null),u=M.useRef(null),d=M.useRef(null),f=!!i&&!i.modal&&i.open&&o&&!!(r||s);return M.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function h(p){s&&_s(p)&&(p.type==="focusin"?LA:FA)(s)}return s.addEventListener("focusin",h,!0),s.addEventListener("focusout",h,!0),()=>{s.removeEventListener("focusin",h,!0),s.removeEventListener("focusout",h,!0)}},[s,o,i==null?void 0:i.modal]),M.createElement(Vy.Provider,{value:M.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s])},f&&s&&M.createElement(ea,{"data-type":"outside",ref:l,onFocus:h=>{if(_s(h,s)){var p;(p=u.current)==null||p.focus()}else{const m=Fy()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),f&&s&&M.createElement("span",{"aria-owns":s.id,style:uu}),s&&Bd.createPortal(t,s),f&&s&&M.createElement(ea,{"data-type":"outside",ref:c,onFocus:h=>{if(_s(h,s)){var p;(p=d.current)==null||p.focus()}else{const m=Ny()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,h.nativeEvent))}}}))}const Ry=()=>M.useContext(Vy),jy=20;let _r=[];function du(e){_r=_r.filter(n=>n.isConnected);let t=e;if(!(!t||er(t)==="body")){if(!B_(t,Co())){const n=Ts(t,Co())[0];n&&(t=n)}_r.push(t),_r.length>jy&&(_r=_r.slice(-jy))}}function By(){return _r.slice().reverse().find(e=>e.isConnected)}const jA=M.forwardRef(function(t,n){return M.createElement("button",So({},t,{type:"button",ref:n,tabIndex:-1,style:uu}))});function fu(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:f,refs:h,nodeId:p,onOpenChange:m,events:y,dataRef:v,floatingId:b,elements:{domReference:g,floating:T}}=t,S=typeof i=="number"&&i<0,E=ty(g)&&S,C=DA()?s:!0,k=Mt(o),I=Mt(i),N=Mt(a),L=Os(),O=Ry(),j=M.useRef(null),D=M.useRef(null),_=M.useRef(!1),F=M.useRef(!1),$=M.useRef(-1),z=O!=null,q=T==null?void 0:T.firstElementChild,P=(q==null?void 0:q.id)===b?q:T,V=Yt(function(H){return H===void 0&&(H=P),H?Ts(H,Co()):[]}),Q=Yt(H=>{const A=V(H);return k.current.map(R=>g&&R==="reference"?g:P&&R==="floating"?P:A).filter(Boolean).flat()});M.useEffect(()=>{if(r||!c)return;function H(R){if(R.key==="Tab"){gt(P,nn(yt(P)))&&V().length===0&&!E&&Dt(R);const W=Q(),Y=rr(R);k.current[0]==="reference"&&Y===g&&(Dt(R),R.shiftKey?ir(W[W.length-1]):ir(W[1])),k.current[1]==="floating"&&Y===P&&R.shiftKey&&(Dt(R),ir(W[0]))}}const A=yt(P);return A.addEventListener("keydown",H),()=>{A.removeEventListener("keydown",H)}},[r,g,P,c,k,E,V,Q]),M.useEffect(()=>{if(r||!T)return;function H(A){const R=rr(A),Y=V().indexOf(R);Y!==-1&&($.current=Y)}return T.addEventListener("focusin",H),()=>{T.removeEventListener("focusin",H)}},[r,T,V]),M.useEffect(()=>{if(r||!d)return;function H(){F.current=!0,setTimeout(()=>{F.current=!1})}function A(R){const W=R.relatedTarget;queueMicrotask(()=>{const Y=!(gt(g,W)||gt(T,W)||gt(W,T)||gt(O==null?void 0:O.portalNode,W)||W!=null&&W.hasAttribute(ar("focus-guard"))||L&&(To(L.nodesRef.current,p).find(Z=>{var fe,B;return gt((fe=Z.context)==null?void 0:fe.elements.floating,W)||gt((B=Z.context)==null?void 0:B.elements.domReference,W)})||AA(L.nodesRef.current,p).find(Z=>{var fe,B;return((fe=Z.context)==null?void 0:fe.elements.floating)===W||((B=Z.context)==null?void 0:B.elements.domReference)===W})));if(l&&Y&&nn(yt(P))===yt(P).body){lt(P)&&(P==null||P.focus());const Z=$.current,fe=V(),B=fe[Z]||fe[fe.length-1]||P;lt(B)&&B.focus()}(E||!c)&&W&&Y&&!F.current&&W!==By()&&(_.current=!0,m(!1,R))})}if(T&<(g))return g.addEventListener("focusout",A),g.addEventListener("pointerdown",H),T.addEventListener("focusout",A),()=>{g.removeEventListener("focusout",A),g.removeEventListener("pointerdown",H),T.removeEventListener("focusout",A)}},[r,g,T,P,c,p,L,O,m,d,l,V,E]),M.useEffect(()=>{var H;if(r)return;const A=Array.from((O==null||(H=O.portalNode)==null?void 0:H.querySelectorAll("["+ar("portal")+"]"))||[]);if(T){const R=[T,...A,j.current,D.current,k.current.includes("reference")||E?g:null].filter(Y=>Y!=null),W=c||E?Dy(R,C,!C):Dy(R);return()=>{W()}}},[r,g,T,c,k,O,E,C]),We(()=>{if(r||!lt(P))return;const H=yt(P),A=nn(H);queueMicrotask(()=>{const R=Q(P),W=I.current,Y=(typeof W=="number"?R[W]:W.current)||P,Z=gt(P,A);!S&&!Z&&f&&ir(Y,{preventScroll:Y===P})})},[r,f,P,S,Q,I]),We(()=>{if(r||!P)return;let H=!1;const A=yt(P),R=nn(A);let Y=v.current.openEvent;const Z=h.domReference.current;du(R);function fe(B){let{open:Me,reason:rt,event:He,nested:ot}=B;Me&&(Y=He),rt==="escape-key"&&h.domReference.current&&du(h.domReference.current),rt==="hover"&&He.type==="mouseleave"&&(_.current=!0),rt==="outside-press"&&(ot?(_.current=!1,H=!0):_.current=!(Jg(He)||Uc(He)))}return y.on("openchange",fe),()=>{y.off("openchange",fe);const B=nn(A),Me=gt(T,B)||L&&To(L.nodesRef.current,p).some(ue=>{var Ee;return gt((Ee=ue.context)==null?void 0:Ee.elements.floating,B)});(Me||Y&&["click","mousedown"].includes(Y.type))&&h.domReference.current&&du(h.domReference.current);const He=Z||R,ot=Ts(yt(He).body,Co());queueMicrotask(()=>{let ue=By();!ue&<(He)&&T&&(ue=VA(ot,He,T)),N.current&&!_.current&<(ue)&&(!(ue!==B&&B!==A.body)||Me)&&ue.focus({preventScroll:H})})}},[r,T,P,N,v,h,y,L,p]),We(()=>{if(!r&&O)return O.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:m,refs:h}),()=>{O.setFocusManagerState(null)}},[r,O,c,f,m,h,d]),We(()=>{if(r||!P||typeof MutationObserver!="function"||S)return;const H=()=>{const R=P.getAttribute("tabindex"),W=V(),Y=nn(yt(T)),Z=W.indexOf(Y);Z!==-1&&($.current=Z),k.current.includes("floating")||Y!==h.domReference.current&&W.length===0?R!=="0"&&P.setAttribute("tabindex","0"):R!=="-1"&&P.setAttribute("tabindex","-1")};H();const A=new MutationObserver(H);return A.observe(P,{childList:!0,subtree:!0,attributes:!0}),()=>{A.disconnect()}},[r,T,P,h,k,V,S]);function ie(H){return r||!u||!c?null:M.createElement(jA,{ref:H==="start"?j:D,onClick:A=>m(!1,A.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&C&&(c?!E:!0)&&(z||c);return M.createElement(M.Fragment,null,ee&&M.createElement(ea,{"data-type":"inside",ref:O==null?void 0:O.beforeInsideRef,onFocus:H=>{if(c){const R=Q();ir(o[0]==="reference"?R[0]:R[R.length-1])}else if(O!=null&&O.preserveTabOrder&&O.portalNode)if(_.current=!1,_s(H,O.portalNode)){const R=Ny()||g;R==null||R.focus()}else{var A;(A=O.beforeOutsideRef.current)==null||A.focus()}}}),!E&&ie("start"),n,ie("end"),ee&&M.createElement(ea,{"data-type":"inside",ref:O==null?void 0:O.afterInsideRef,onFocus:H=>{if(c)ir(Q()[0]);else if(O!=null&&O.preserveTabOrder&&O.portalNode)if(d&&(_.current=!0),_s(H,O.portalNode)){const R=Fy()||g;R==null||R.focus()}else{var A;(A=O.afterOutsideRef.current)==null||A.focus()}}}))}const hu=new Set,BA=M.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=Ps();return We(()=>{if(!r)return;hu.add(s);const i=/iP(hone|ad|od)|iOS/.test(Hc()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,f=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,y=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(y))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{hu.delete(s),hu.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[s,r]),M.createElement("div",So({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function zy(e){return lt(e.target)&&e.target.tagName==="BUTTON"}function Wy(e){return Kc(e)}function Hy(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=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"&&(Ss(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}Ss(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||zy(p))&&(p.key===" "&&!Wy(s)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||zy(p)||Wy(s)||p.key===" "&&f.current&&(f.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return M.useMemo(()=>i?{reference:h}:{},[i,h])}const zA={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},WA={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Uy=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 na(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:p}=t,m=Os(),y=Yt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?y:l,b=M.useRef(!1),g=M.useRef(!1),{escapeKey:T,outsidePress:S}=Uy(h),{escapeKey:E,outsidePress:C}=Uy(p),k=Yt(D=>{var _;if(!n||!i||!a||D.key!=="Escape")return;const F=(_=s.current.floatingContext)==null?void 0:_.nodeId,$=m?To(m.nodesRef.current,F):[];if(!T&&(D.stopPropagation(),$.length>0)){let z=!0;if($.forEach(q=>{var P;if((P=q.context)!=null&&P.open&&!q.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}r(!1,h_(D)?D.nativeEvent:D,"escape-key")}),I=Yt(D=>{var _;const F=()=>{var $;k(D),($=rr(D))==null||$.removeEventListener("keydown",F)};(_=rr(D))==null||_.addEventListener("keydown",F)}),N=Yt(D=>{var _;const F=b.current;b.current=!1;const $=g.current;if(g.current=!1,c==="click"&&$||F||typeof v=="function"&&!v(D))return;const z=rr(D),q="["+ar("inert")+"]",P=yt(o.floating).querySelectorAll(q);let V=je(z)?z:null;for(;V&&!tr(V);){const H=Nn(V);if(tr(H)||!je(H))break;V=H}if(P.length&&je(z)&&!p_(z)&&!gt(z,o.floating)&&Array.from(P).every(H=>!gt(V,H)))return;if(lt(z)&&j){const H=z.clientWidth>0&&z.scrollWidth>z.clientWidth,A=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let R=A&&D.offsetX>z.clientWidth;if(A&&Ut(z).direction==="rtl"&&(R=D.offsetX<=z.offsetWidth-z.clientWidth),R||H&&D.offsetY>z.clientHeight)return}const Q=(_=s.current.floatingContext)==null?void 0:_.nodeId,ie=m&&To(m.nodesRef.current,Q).some(H=>{var A;return qc(D,(A=H.context)==null?void 0:A.elements.floating)});if(qc(D,o.floating)||qc(D,o.domReference)||ie)return;const ee=m?To(m.nodesRef.current,Q):[];if(ee.length>0){let H=!0;if(ee.forEach(A=>{var R;if((R=A.context)!=null&&R.open&&!A.context.dataRef.current.__outsidePressBubbles){H=!1;return}}),!H)return}r(!1,D,"outside-press")}),L=Yt(D=>{var _;const F=()=>{var $;N(D),($=rr(D))==null||$.removeEventListener(c,F)};(_=rr(D))==null||_.addEventListener(c,F)});M.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=T,s.current.__outsidePressBubbles=S;function D($){r(!1,$,"ancestor-scroll")}const _=yt(o.floating);a&&_.addEventListener("keydown",E?I:k,E),v&&_.addEventListener(c,C?L:N,C);let F=[];return f&&(je(o.domReference)&&(F=nr(o.domReference)),je(o.floating)&&(F=F.concat(nr(o.floating))),!je(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(nr(o.reference.contextElement)))),F=F.filter($=>{var z;return $!==((z=_.defaultView)==null?void 0:z.visualViewport)}),F.forEach($=>{$.addEventListener("scroll",D,{passive:!0})}),()=>{a&&_.removeEventListener("keydown",E?I:k,E),v&&_.removeEventListener(c,C?L:N,C),F.forEach($=>{$.removeEventListener("scroll",D)})}},[s,o,a,v,c,n,r,f,i,T,S,k,E,I,N,C,L]),M.useEffect(()=>{b.current=!1},[v,c]);const O=M.useMemo(()=>({onKeyDown:k,[zA[d]]:D=>{u&&r(!1,D.nativeEvent,"reference-press")}}),[k,r,u,d]),j=M.useMemo(()=>({onKeyDown:k,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[WA[c]]:()=>{b.current=!0}}),[k,c]);return M.useMemo(()=>i?{reference:O,floating:j}:{},[i,O,j])}function HA(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Ps(),s=M.useRef({}),[i]=M.useState(()=>PA()),a=Xi()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!je(h)&&CA("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=Yt((h,p,m)=>{s.current.openEvent=h?p:void 0,i.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),d=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:s,open:t,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[t,u,f,i,o,d])}function ra(e){e===void 0&&(e={});const{nodeId:t}=e,n=HA({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=M.useState(null),[a,l]=M.useState(null),u=(o==null?void 0:o.reference)||s,d=M.useRef(null),f=Os();We(()=>{u&&(d.current=u)},[u]);const h=mA({...e,elements:{...o,...a&&{reference:a}}}),p=M.useCallback(g=>{const T=je(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(T),h.refs.setReference(T)},[h.refs]),m=M.useCallback(g=>{(je(g)||g===null)&&(d.current=g,i(g)),(je(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!je(g))&&h.refs.setReference(g)},[h.refs]),y=M.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),v=M.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),b=M.useMemo(()=>({...h,...r,refs:y,elements:v,nodeId:t}),[h,y,v,t,r]);return We(()=>{r.dataRef.current.floatingContext=b;const g=f==null?void 0:f.nodesRef.current.find(T=>T.id===t);g&&(g.context=b)}),M.useMemo(()=>({...h,context:b,refs:y,elements:v}),[h,y,v,b])}function UA(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=M.useRef(!1),u=M.useRef(),d=M.useRef(!0);M.useEffect(()=>{if(!a)return;const h=Bt(i.domReference);function p(){!n&<(i.domReference)&&i.domReference===nn(yt(i.domReference))&&(c.current=!0)}function m(){d.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),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){Uc(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=rr(h.nativeEvent);if(l&&je(p))try{if(Gc()&&ey())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!Kc(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,y=je(p)&&p.hasAttribute(ar("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=nn(i.domReference?i.domReference.ownerDocument:document);!p&&b===i.domReference||gt((v=s.current.floatingContext)==null?void 0:v.refs.floating.current,b)||gt(i.domReference,b)||y||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return M.useMemo(()=>a?{reference:f}:{},[a,f])}const Gy="active",Yy="selected";function pu(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[Gy]:i,[Yy]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[Gy,Yy].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),i[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(y=>y(...p)).find(y=>y!==void 0)}}}else i[c]=u}),i),{})}}function oa(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=>pu(a,e,"reference"),t),s=M.useCallback(a=>pu(a,e,"floating"),n),i=M.useCallback(a=>pu(a,e,"item"),r);return M.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let qy=!1;function sa(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ky(e,t){return sa(t,e===iu||e===Es,e===wo||e===xo)}function mu(e,t,n){return sa(t,e===Es,n?e===wo:e===xo)||e==="Enter"||e===" "||e===""}function GA(e,t,n){return sa(t,n?e===wo:e===xo,e===Es)}function Zy(e,t,n){return sa(t,n?e===xo:e===wo,e===iu)}function YA(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:v=!0,disabledIndices:b=void 0,orientation:g="vertical",cols:T=1,scrollItemIntoView:S=!0,virtualItemRef:E,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||Zi("`useListNavigation` looping must be enabled to allow escaping."),p||Zi("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&T>1&&Zi("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=Xi(),N=Os(),L=Yt(a),O=M.useRef(m),j=M.useRef(c??-1),D=M.useRef(null),_=M.useRef(!0),F=M.useRef(L),$=M.useRef(!!o.floating),z=M.useRef(n),q=M.useRef(!1),P=M.useRef(!1),V=Mt(b),Q=Mt(n),ie=Mt(S),ee=Mt(o.floating),H=Mt(c),[A,R]=M.useState(),[W,Y]=M.useState(),Z=Yt(function(ue,Ee,le){le===void 0&&(le=!1);function ke(Oe){p?(R(Oe.id),N==null||N.events.emit("virtualfocus",Oe),E&&(E.current=Oe)):ir(Oe,{preventScroll:!0,sync:ey()&&Gc()?qy||q.current:!1})}const ut=ue.current[Ee.current];ut&&ke(ut),requestAnimationFrame(()=>{const Oe=ue.current[Ee.current]||ut;if(!Oe)return;ut||ke(Oe);const ft=ie.current;ft&&B&&(le||!_.current)&&(Oe.scrollIntoView==null||Oe.scrollIntoView(typeof ft=="boolean"?{block:"nearest",inline:"nearest"}:ft))})});We(()=>{document.createElement("div").focus({get preventScroll(){return qy=!0,!1}})},[]),We(()=>{l&&(n&&o.floating?O.current&&c!=null&&(P.current=!0,j.current=c,L(c)):$.current&&(j.current=-1,F.current(null)))},[l,n,o.floating,c,L]),We(()=>{if(l&&n&&o.floating)if(i==null){if(q.current=!1,H.current!=null)return;if($.current&&(j.current=-1,Z(s,j)),(!z.current||!$.current)&&O.current&&(D.current!=null||O.current===!0&&D.current==null)){let ue=0;const Ee=()=>{s.current[0]==null?(ue<2&&(ue?requestAnimationFrame:queueMicrotask)(Ee),ue++):(j.current=D.current==null||mu(D.current,g,h)||f?au(s,V.current):Cy(s,V.current),D.current=null,L(j.current))};Ee()}}else Cs(s,i)||(j.current=i,Z(s,j,P.current),P.current=!1)},[l,n,o.floating,i,H,f,s,g,h,L,Z,V]),We(()=>{var ue;if(!l||o.floating||!N||p||!$.current)return;const Ee=N.nodesRef.current,le=(ue=Ee.find(Oe=>Oe.id===I))==null||(ue=ue.context)==null?void 0:ue.elements.floating,ke=nn(yt(o.floating)),ut=Ee.some(Oe=>Oe.context&>(Oe.context.elements.floating,ke));le&&!ut&&_.current&&le.focus({preventScroll:!0})},[l,o.floating,N,I,p]),We(()=>{if(!l||!N||!p||I)return;function ue(Ee){Y(Ee.id),E&&(E.current=Ee)}return N.events.on("virtualfocus",ue),()=>{N.events.off("virtualfocus",ue)}},[l,N,p,I,E]),We(()=>{F.current=L,$.current=!!o.floating}),We(()=>{n||(D.current=null)},[n]),We(()=>{z.current=n},[n]);const fe=i!=null,B=M.useMemo(()=>{function ue(le){if(!n)return;const ke=s.current.indexOf(le);ke!==-1&&L(ke)}return{onFocus(le){let{currentTarget:ke}=le;ue(ke)},onClick:le=>{let{currentTarget:ke}=le;return ke.focus({preventScroll:!0})},...y&&{onMouseMove(le){let{currentTarget:ke}=le;ue(ke)},onPointerLeave(le){let{pointerType:ke}=le;!_.current||ke==="touch"||(j.current=-1,Z(s,j),L(null),p||ir(ee.current,{preventScroll:!0}))}}}},[n,ee,Z,y,s,L,p]),Me=Yt(ue=>{if(_.current=!1,q.current=!0,!Q.current&&ue.currentTarget===ee.current)return;if(f&&Zy(ue.key,g,h)){Dt(ue),r(!1,ue.nativeEvent,"list-navigation"),lt(o.domReference)&&!p&&o.domReference.focus();return}const Ee=j.current,le=au(s,b),ke=Cy(s,b);if(ue.key==="Home"&&(Dt(ue),j.current=le,L(j.current)),ue.key==="End"&&(Dt(ue),j.current=ke,L(j.current)),T>1){const ut=C||Array.from({length:s.current.length},()=>({width:1,height:1})),Oe=wA(ut,T,k),ft=Oe.findIndex(se=>se!=null&&!Ki(s.current,se,b)),X=Oe.reduce((se,_e,Ke)=>_e!=null&&!Ki(s.current,_e,b)?Ke:se,-1);if(j.current=Oe[bA({current:Oe.map(se=>se!=null?s.current[se]:null)},{event:ue,orientation:g,loop:d,cols:T,disabledIndices:SA([...b||s.current.map((se,_e)=>Ki(s.current,_e)?_e:void 0),void 0],Oe),minIndex:ft,maxIndex:X,prevIndex:xA(j.current>ke?le:j.current,ut,Oe,T,ue.key===Es?"bl":ue.key===xo?"tr":"tl"),stopEvent:!0})],L(j.current),g==="both")return}if(Ky(ue.key,g)){if(Dt(ue),n&&!p&&nn(ue.currentTarget.ownerDocument)===ue.currentTarget){j.current=mu(ue.key,g,h)?le:ke,L(j.current);return}mu(ue.key,g,h)?d?j.current=Ee>=ke?u&&Ee!==s.current.length?-1:le:Ot(s,{startingIndex:Ee,disabledIndices:b}):j.current=Math.min(ke,Ot(s,{startingIndex:Ee,disabledIndices:b})):d?j.current=Ee<=le?u&&Ee!==-1?s.current.length:ke:Ot(s,{startingIndex:Ee,decrement:!0,disabledIndices:b}):j.current=Math.max(le,Ot(s,{startingIndex:Ee,decrement:!0,disabledIndices:b})),Cs(s,j.current)?L(null):L(j.current)}}),rt=M.useMemo(()=>p&&n&&fe&&{"aria-activedescendant":W||A},[p,n,fe,W,A]),He=M.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!ty(o.domReference)&&rt,onKeyDown:Me,onPointerMove(){_.current=!0}}),[rt,Me,o.domReference,g]),ot=M.useMemo(()=>{function ue(le){m==="auto"&&Jg(le.nativeEvent)&&(O.current=!0)}function Ee(le){O.current=m,m==="auto"&&Uc(le.nativeEvent)&&(O.current=!0)}return{...rt,onKeyDown(le){_.current=!1;const ke=le.key.indexOf("Arrow")===0,ut=GA(le.key,g,h),Oe=Zy(le.key,g,h),ft=Ky(le.key,g),X=(f?ut:ft)||le.key==="Enter"||le.key.trim()==="";if(p&&n){const Tt=N==null?void 0:N.nodesRef.current.find(Vt=>Vt.parentId==null),It=N&&Tt?IA(N.nodesRef.current,Tt.id):null;if(ke&&It&&E){const Vt=new KeyboardEvent("keydown",{key:le.key,bubbles:!0});if(ut||Oe){var se,_e;const jr=((se=It.context)==null?void 0:se.elements.domReference)===le.currentTarget,Ho=Oe&&!jr?(_e=It.context)==null?void 0:_e.elements.domReference:ut?s.current.find(Uo=>(Uo==null?void 0:Uo.id)===A):null;Ho&&(Dt(le),Ho.dispatchEvent(Vt),Y(void 0))}if(ft&&It.context&&It.context.open&&It.parentId&&le.currentTarget!==It.context.elements.domReference){var Ke;Dt(le),(Ke=It.context.elements.domReference)==null||Ke.dispatchEvent(Vt);return}}return Me(le)}if(!(!n&&!v&&ke)){if(X&&(D.current=f&&ft?null:le.key),f){ut&&(Dt(le),n?(j.current=au(s,V.current),L(j.current)):r(!0,le.nativeEvent,"list-navigation"));return}ft&&(c!=null&&(j.current=c),Dt(le),!n&&v?r(!0,le.nativeEvent,"list-navigation"):Me(le),n&&L(j.current))}},onFocus(){n&&!p&&L(null)},onPointerDown:Ee,onMouseDown:ue,onClick:ue}},[A,rt,Me,V,m,s,f,L,r,n,v,g,h,c,N,p,E]);return M.useMemo(()=>l?{reference:ot,floating:He,item:B}:{},[l,ot,He,B])}const qA=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ia(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=qA.get(i))!=null?n:i,l=Ps(),u=Xi()!=null,d=M.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,i]),f=M.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),h=M.useCallback(p=>{let{active:m,selected:y}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...v,"aria-selected":m&&y};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,i]);return M.useMemo(()=>s?{reference:d,floating:f,item:h}:{},[s,d,f,h])}const Xy=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Po(e,t){return typeof e=="function"?e(t):e}function KA(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 ZA(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=(typeof o=="number"?o:o.close)||0,[a,l]=M.useState("unmounted"),c=KA(n,i);return!c&&a==="close"&&l("unmounted"),We(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function XA(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:s,duration:i=250}=t,a=e.placement,l=a.split("-")[0],c=M.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",d=(u?i:i.open)||0,f=(u?i:i.close)||0,[h,p]=M.useState(()=>({...Po(s,c),...Po(n,c)})),{isMounted:m,status:y}=ZA(e,{duration:i}),v=Mt(n),b=Mt(r),g=Mt(o),T=Mt(s);return We(()=>{const S=Po(v.current,c),E=Po(g.current,c),C=Po(T.current,c),k=Po(b.current,c)||Object.keys(S).reduce((I,N)=>(I[N]="",I),{});if(y==="initial"&&p(I=>({transitionProperty:I.transitionProperty,...C,...S})),y==="open"&&p({transitionProperty:Object.keys(k).map(Xy).join(","),transitionDuration:d+"ms",...C,...k}),y==="close"){const I=E||S;p({transitionProperty:Object.keys(I).map(Xy).join(","),transitionDuration:f+"ms",...C,...I})}},[f,g,v,b,T,d,y,c]),{isMounted:m,styles:h}}const ko=e=>{const t=w.useId(),[n,r]=w.useState(e.open),o=w.useRef(null),s=w.useMemo(()=>[su(10),Sy({fallbackAxisSideDirection:"end"}),xy(),Ty({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=ra({open:n,middleware:s,transform:!0,whileElementsMounted:ou,onOpenChange:(p,m)=>{var v;const y=m==null?void 0:m.relatedTarget;y&&y.dataset.floating==="true"&&!p||(r(p),(v=e.onChange)==null||v.call(e,p))}}),c=Hy(l),u=na(l),d=ia(l),{getReferenceProps:f,getFloatingProps:h}=oa([c,u,d]);return x.jsxs(w.Fragment,{children:[x.jsx("button",{ref:i.setReference,...f(),type:"button",children:e.trigger}),n&&x.jsx(ta,{id:`${t}-portal`,children:x.jsx(fu,{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:i.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]})})})]})};function QA(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function JA(...e){return t=>e.forEach(n=>QA(n,t))}var Qy=M.forwardRef((e,t)=>{const{children:n,...r}=e,o=M.Children.toArray(n),s=o.find(tI);if(s){const i=s.props.children,a=o.map(l=>l===s?M.Children.count(i)>1?M.Children.only(null):M.isValidElement(i)?i.props.children:null:l);return x.jsx(gu,{...r,ref:t,children:M.isValidElement(i)?M.cloneElement(i,void 0,a):null})}return x.jsx(gu,{...r,ref:t,children:n})});Qy.displayName="Slot";var gu=M.forwardRef((e,t)=>{const{children:n,...r}=e;if(M.isValidElement(n)){const o=rI(n);return M.cloneElement(n,{...nI(r,n.props),ref:t?JA(t,o):o})}return M.Children.count(n)>1?M.Children.only(null):null});gu.displayName="SlotClone";var eI=({children:e})=>x.jsx(x.Fragment,{children:e});function tI(e){return M.isValidElement(e)&&e.type===eI}function nI(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function rI(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 Oo="600ms",Jy=e=>({initial:{[e]:"-60%",opacity:.8,animationDuration:Oo},enter:{[e]:0,opacity:1,animationDuration:Oo},exit:{[e]:["-50%","-90%"],opacity:0,animationDuration:Oo}}),oI=Jy("left"),sI=Jy("right"),ev={drawer:e=>e==="left"?oI:sI,dialog:{initial:{opacity:0,scale:.95,animationDuration:Oo},enter:{opacity:1,scale:[1.05,1],animationDuration:Oo},exit:{opacity:0,scale:.97,animationDuration:Oo}}},iI=Js("isolate 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%] w-auto h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] container h-[inherit] rounded-lg py-8"},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"}}),aI={top:0,left:0,right:0,bottom:0},lI=e=>{const t=(n,r)=>{if(e.parent.current){const o=e.parent.current,s=e.value.get()||o.getBoundingClientRect().width,i=e.type==="right"?-r.delta.x:r.delta.x;e.value.set(Math.abs(s+i))}};return x.jsx(Ht.div,{drag:"x",dragElastic:0,dragMomentum:!1,onDrag:t,dragConstraints:aI,whileDrag:{cursor:"grabbing"},className:`absolute top-1/2 ${e.type==="left"?"right-5":"left-2"} rounded-lg cursor-grab h-10 w-2 bg-floating-border`})},cI=({type:e="dialog",resizer:t=!0,...n})=>{const r=e==="dialog",o=r?"none":n.position||"left",s=r?ev.dialog:ev.drawer(o),i=w.useId(),a=w.useId(),{refs:l,context:c}=ra({open:n.open,onOpenChange:n.onChange}),u=Hy(c),d=ia(c),f=na(c,{escapeKey:!0,referencePress:!0,outsidePress:!1}),{getReferenceProps:h,getFloatingProps:p}=oa([u,d,f]),m=n.trigger,y=lo(void 0);return x.jsxs(w.Fragment,{children:[n.trigger?x.jsx(w.Fragment,{children:n.asChild?x.jsx(Qy,{ref:l.setReference,...h(),children:m}):x.jsx("button",{ref:l.setReference,...h(),type:"button",children:m})}):null,x.jsx(ta,{children:x.jsx(Ii,{presenceAffectsLayout:!0,children:n.open&&x.jsx(BA,{lockScroll:!0,className:`relative !overflow-clip h-[100dvh] z-floating bg-floating-overlay/70 ${e==="drawer"?"":"grid justify-center p-8"}`,children:x.jsx(fu,{modal:!0,closeOnFocusOut:!0,context:c,children:x.jsxs(Ht.div,{animate:"enter","aria-describedby":a,"aria-labelledby":i,className:iI({position:o,type:e}),exit:"exit",initial:"initial",ref:l.setFloating,variants:s,style:{width:y},...p(),children:[!r&&t?x.jsx(lI,{value:y,parent:l.floating,type:o}):null,n.title||n.closable?x.jsxs("header",{className:"w-full relative",children:[n.title?x.jsx("h2",{className:"px-8 pb-4 border-b border-floating-border text-3xl font-medium leading-relaxed",children:n.title}):null,n.closable!==!1?x.jsx("nav",{className:"absolute -top-1 right-8",children:x.jsx("button",{type:"button",onClick:()=>{var v;return(v=n.onChange)==null?void 0:v.call(n,!1)},className:"p-1 transition-colors hover:text-danger focus:text-danger",children:x.jsx(Xf,{})})}):null]}):null,x.jsx("div",{className:"flex-1 px-8 overflow-y-auto",children:n.children}),n.footer?x.jsx("footer",{className:"px-8 border-t border-floating-border pt-4 w-full",children:n.footer}):null]})})})})})]})},uI=({children:e,as:t,title:n,...r})=>{const[o,s]=w.useState(!1),i=w.useRef(null),a=t||"span",{refs:l,floatingStyles:c,context:u}=ra({open:o,onOpenChange:s,whileElementsMounted:ou,transform:!0,middleware:[su(5),Sy({fallbackAxisSideDirection:"start"}),xy(),Ty({element:i,padding:5})]}),d=_A(u,{move:!0}),f=UA(u),h=na(u),p=ia(u,{role:"tooltip"}),{getReferenceProps:m,getFloatingProps:y}=oa([d,f,h,p]);return x.jsxs(w.Fragment,{children:[x.jsx(a,{ref:l.setReference,...m(r),children:n}),x.jsx(ta,{children:o&&x.jsxs(Zr,{...y(),ref:l.setFloating,style:c,className:"bg-tooltip-background z-tooltip text-tooltip-foreground border border-tooltip-border p-3 rounded-lg",children:[x.jsx(_y,{ref:i,context:u,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class aa{static getDescendantProperty(t,n,r=[]){let o,s,i,a,l,c;if(n){if(i=n.indexOf("."),i===-1?o=n:(o=n.slice(0,i),s=n.slice(i+1)),a=t[o],a!==null&&typeof a<"u")if(!s&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)aa.getDescendantProperty(a[l],s,r);else s&&aa.getDescendantProperty(a,s,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 s=_o.isMatch(o,t,this.options.caseSensitive);s&&n.push({item:o,score:s})}else for(let s=0;s<this.keys.length;s++){const i=aa.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=_o.isMatch(i[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=_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((i,a)=>{let l=i+1;o[a]=[i];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(i=>i!==!1),o.length?o.sort((i,a)=>i.length===1?i[0]-a[0]:(i=i[i.length-1]-i[0],a=a[a.length-1]-a[0],i-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,s)=>o!==r?!1:s).filter(o=>o!==!1)}}const tv=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current},nv=({reportStatus:e,hideLeft:t=!1,className:n,children:r,title:o})=>x.jsxs("div",{className:Ct("w-full justify-between",t&&r===null?"hidden":"flex",n),children:[t?null:x.jsxs("span",{className:"flex items-center gap-1 group-hover:text-primary group-focus-within:text-primary transition-colors group-error:text-danger",children:[o,e?x.jsxs("span",{className:"flex aspect-square h-4 w-4 items-center justify-center",children:[x.jsx(Zf,{className:"hidden aspect-square h-3 w-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(x1,{className:"hidden aspect-square h-3 w-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}),r]}),la=({optionalText:e="Optional",left:t,rightLabel:n,container:r,feedback:o,interactive:s,right:i,children:a,error:l,form:c,id:u,name:d,title:f,placeholder:h,hideLeft:p,required:m})=>{const y=u??d;return x.jsxs("fieldset",{"data-interactive":!!s,"data-error":!!l,form:c,className:Ct("group inline-block w-full",r),children:[x.jsxs("label",{form:c,htmlFor:y,className:"inline-flex w-full cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-error:text-danger group-hover:border-primary",children:[!p&&!n?x.jsx(nv,{hideLeft:p,reportStatus:!0,title:f,placeholder:h,children:e||n?x.jsxs(w.Fragment,{children:[m?null:x.jsx("span",{className:"text-opacity-70",children:e}),n?x.jsx(w.Fragment,{children:n}):null]}):null}):null,x.jsxs("div",{className:"relative group 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",children:[t?x.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,a,i?x.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:i}):null]})]}),x.jsx("p",{className:"group-error:block group-error:text-danger mt-1 hidden text-xs group-has-[input:not(:focus):invalid[data-initialized=true]]:block",children:l}),x.jsx("p",{className:"mt-1 hidden text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block",children:o})]})},rv=w.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>x.jsx("li",{...o,ref:s,role:"option","aria-selected":e,className:"w-full",children:x.jsx("button",{type:"button",onClick:n,"aria-selected":e,className:`p-2 w-full text-left cursor-pointer ${e?"bg-primary text-primary-foreground":""} ${t?"bg-primary-subtle text-primary-foreground":""}`,children:r.label??r.value})})),dI={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},fI={caseSensitive:!1,sort:!1},hI=[],pI=w.forwardRef(({options:e,required:t=!0,...n},r)=>{const[o,s]=w.useState(!1),[i,a]=w.useState(""),[l,c]=w.useState(n.value??n.defaultValue??""),[u,d]=w.useState(null),f=w.useRef(hI),h=tv(u),p=new _o(e,["value"],fI).search(i),{x:m,y,strategy:v,refs:b,context:g}=ra({open:o,transform:!0,onOpenChange:s,whileElementsMounted:ou,middleware:[su(4),yA({padding:10,apply(O){Object.assign(O.elements.floating.style,{width:`${O.rects.reference.width}px`,maxHeight:`${Math.min(480,O.availableHeight)}px`})}})]});w.useImperativeHandle(r,()=>{var O;return(O=b.domReference)==null?void 0:O.current},[b]);const T=XA(g,dI),{getReferenceProps:S,getFloatingProps:E,getItemProps:C}=oa([ia(g,{role:"listbox"}),na(g),YA(g,{listRef:f,loop:!0,activeIndex:u,allowEscape:!0,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:u,virtual:!0,onNavigate:O=>{const j=p.length-1;if(O===null&&h===0)return d(j);if(O===null&&h===j)return d(0);const D=O??h??null;return D===null?void 0:d(D)}})]),k=O=>{c(O.value),Sl(b.reference.current,O.value),s(!1),a("")},I=O=>{var D;const j=O.target.value;return a(j),!o&&j===""||j?s(!0):(D=n.onChange)==null?void 0:D.call(n,O)},N=()=>{s(!0),a("")},L=()=>{a(""),c(""),Sl(b.reference.current,""),s(!1)};return x.jsxs("fieldset",{className:"relative w-auto",children:[x.jsx(la,{...n,required:t,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsx(qf,{size:20}),l?x.jsx("button",{type:"button",onClick:L,className:"link:text-danger transition-colors",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",{...S({...n,onChange:I,onFocus:N,ref:b.setReference,onClick:O=>O.currentTarget.focus(),onKeyDown(O){if(O.key==="Escape")return O.currentTarget.blur(),s(!1);if(O.key==="Enter"){if(u!==null&&p[u])return O.preventDefault(),k(p[u]);if(p.length===1)return O.preventDefault(),k(p[0])}}}),required:t,value:o?i:l,"aria-autocomplete":"list",autoComplete:"off",className:Ct("input text-foreground group h-10 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",n.right||i?"pe-12":"",n.left?"ps-8":"",n.className)})}),x.jsx(ta,{preserveTabOrder:!0,children:x.jsx(fu,{closeOnFocusOut:!0,guards:!0,returnFocus:!0,context:g,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsx("ul",{...E({ref:b.setFloating,style:{position:v,left:m??0,top:y??0,...T.styles}}),"data-floating":"true",className:"bg-floating-background shadow-floating text-foreground list-none p-0 m-0 rounded-b-lg overflow-auto origin-[top_center] overflow-y-auto z-floating",children:p.map((O,j)=>w.createElement(rv,{...C({onClick:()=>k(O),ref:D=>void(f.current[j]=D),selected:u===j,active:l===O.value}),key:`${O.value}-option`,option:O,selected:u===j,active:l===O.value}))})})})]})}),ov=({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:"checkbox",className:Ct("form-checkbox h-4 w-4 app rounded 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]}),As=w.forwardRef(({type:e="text",container:t,feedback:n=null,next:r,rightLabel:o,optionalText:s,hideLeft:i=!1,right:a,left:l,...c},u)=>{const d=c.id??c.name,f=w.useRef(null);return w.useEffect(()=>{if(f.current===null)return;const h=f.current,p=()=>h.setAttribute("data-initialized","true"),m=y=>{const v=y;if(v.key==="Enter"&&h.enterKeyHint==="next"){const b=h.getAttribute("data-next");if(b){const g=document.getElementById(b);if(g)return g.focus(),void v.preventDefault()}}};return h.addEventListener("keydown",m),h.addEventListener("focus",p),()=>{h.removeEventListener("keydown",m),h.removeEventListener("focus",p)}},[]),x.jsx(la,{...c,feedback:n,right:a,left:l,hideLeft:i,rightLabel:o,optionalText:s,container:Ct("group inline-block w-full",t),children:x.jsx(Og,{...c,type:e,"data-next":r,ref:xl(u,f),id:d,name:d,className:Ct("input text-foreground group h-10 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",a?"pe-4":"",l?"ps-4":"",c.className)})})}),sv=new Date(1970,11,31),yu={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},iv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},mI={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")},gI=({date:e,locale:t,disabledDate:n,autoFocusToday:r,onChange:o,markToday:s,...i})=>{const a=w.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[l,c]=w.useState(e||void 0),[u,d]=w.useState(!1),f=a.formatToParts(sv).flatMap(b=>Pn.keyof(yu,b.type)?yu[b.type](b.value):[]),h=a.formatToParts(sv).reduce((b,g)=>b+(Pn.keyof(iv,g.type)?iv[g.type](g.value):""),""),[p,m]=w.useState(l?a.formatToParts(l).reduce((b,g)=>b+(Pn.keyof(yu,g.type)?mI[g.type](l,g.value):""),""):""),y=b=>{const g=b.target.value;if(m(g),f.length===g.length&&f.every((S,E)=>{const C=g.charAt(E);return typeof S=="string"?C===S:S.test(C)})){const S=fo(gO(g,h,new Date));c(S),o==null||o(S)}},v=b=>{c(b),o==null||o(b),m(bk(b,h))};return x.jsx(As,{...i,mask:f,value:p,onChange:y,className:"uppercase",formNoValidate:!u,placeholder:h,required:i.required??!0,error:u?void 0:i.error,name:i.name?`${i.name}-picker`:i.name,right:x.jsxs(w.Fragment,{children:[x.jsx("input",{defaultValue:l==null?void 0:l.toISOString(),hidden:!0,type:"date",name:i.name}),x.jsx(ko,{restoreFocus:!0,trigger:x.jsx(v1,{}),onChange:d,open:u,children:x.jsx(Gg,{...i,locale:t,date:l,onChange:v,markToday:s,disabledDate:n,autoFocusToday:r})})]})})},yI=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],vI=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],bI=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],wI=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],av=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function lv(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?wI:bI:t.binary?vI:yI,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,s=o?"-":t.signed?"+":"";o&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){const u=av(e,t.locale,i);return s+u+r+n[0]}const a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**a,i||(e=e.toPrecision(3));const l=av(Number(e),t.locale,i),c=n[a];return s+l+r+c}var vu={exports:{}},ca={exports:{}},Ne={};/** @license React v16.13.1
|
|
172
|
+
*/var RI=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ki=RI.join(","),uy=typeof Element>"u",To=uy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Zi=!uy&&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},Xi=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},jI=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},BI=function(t,n,r){if(Xi(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ki));return n&&To.call(t,Ki)&&o.unshift(t),o=o.filter(r),o},zI=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Xi(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=To.call(i,Ki);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!Xi(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&f){var h=e(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return o},dy=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},fy=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||jI(t))&&!dy(t)?0:t.tabIndex},WI=function(t,n){var r=fy(t);return r<0&&n&&!dy(t)?0:r},HI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},hy=function(t){return t.tagName==="INPUT"},UI=function(t){return hy(t)&&t.type==="hidden"},GI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},YI=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},qI=function(t){if(!t.name)return!0;var n=t.form||Zi(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=YI(o,t.form);return!s||s===t},KI=function(t){return hy(t)&&t.type==="radio"},ZI=function(t){return KI(t)&&!qI(t)},XI=function(t){var n,r=t&&Zi(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,d;r=Zi(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return s},py=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},QI=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=To.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(To.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=Zi(t);if(l&&!l.shadowRoot&&o(l)===!0)return py(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(XI(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return py(t);return!1},JI=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return To.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},e_=function(t,n){return!(n.disabled||Xi(n)||UI(n)||QI(n,t)||GI(n)||JI(n))},su=function(t,n){return!(ZI(n)||fy(n)<0||!e_(t,n))},t_=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},n_=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=WI(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(HI).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Ps=function(t,n){n=n||{};var r;return n.getShadowRoot?r=zI([t],n.includeContainer,{filter:su.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:t_}):r=BI(t,n.includeContainer,su.bind(null,n)),n_(r)},r_=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return To.call(t,Ki)===!1?!1:su(n,t)};function my(e,t,n){let{reference:r,floating:o}=e;const s=Ar(t),i=ru(t),a=nu(i),l=ir(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(xo(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}const o_=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=my(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:y,fn:v}=a[m],{x:w,y:g,data:S,reset:T}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=w??u,d=g??d,h={...h,[y]:{...h[y],...S}},T&&p<=50&&(p++,typeof T=="object"&&(T.placement&&(f=T.placement),T.rects&&(c=T.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:d}=my(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function iu(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=wo(t,e),p=cy(h),y=a[f?d==="floating"?"reference":"floating":d],v=qi(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},T=qi(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:g,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 s_=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=wo(e,t)||{};if(c==null)return{};const d=cy(u),f={x:n,y:r},h=ru(o),p=nu(h),m=await i.getDimensions(c),y=h==="y",v=y?"top":"left",w=y?"bottom":"right",g=y?"clientHeight":"clientWidth",S=s.reference[p]+s.reference[h]-f[h]-s.floating[p],T=f[h]-s.reference[h],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let k=E?E[g]:0;(!k||!await(i.isElement==null?void 0:i.isElement(E)))&&(k=a.floating[g]||s.floating[p]);const A=S/2-T/2,D=k/2-m[p]/2-1,I=gn(d[v],D),V=gn(d[w],D),F=I,R=k-m[p]-V,C=k/2-m[p]/2+A,O=tu(F,C,R),M=!l.arrow&&xo(o)!=null&&C!==O&&s.reference[p]/2-(C<F?I:V)-m[p]/2<0,L=M?C<F?C-F:C-R:0;return{[h]:f[h]+L,data:{[h]:O,centerOffset:C-O-L,...M&&{alignmentOffset:L}},reset:M}}}),i_=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=wo(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=ir(o),w=Ar(a),g=ir(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=f||(g||!m?[Yi(a)]:FI(a)),E=p!=="none";!f&&E&&T.push(...VI(a,m,p,S));const k=[a,...T],A=await iu(t,y),D=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&D.push(A[v]),d){const C=NI(o,i,S);D.push(A[C[0]],A[C[1]])}if(I=[...I,{placement:o,overflows:D}],!D.every(C=>C<=0)){var V,F;const C=(((V=s.flip)==null?void 0:V.index)||0)+1,O=k[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 R;const L=(R=I.filter(H=>{if(E){const G=Ar(H.placement);return G===w||G==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(G=>G>0).reduce((G,P)=>G+P,0)]).sort((H,G)=>H[1]-G[1])[0])==null?void 0:R[0];L&&(M=L);break}case"initialPlacement":M=a;break}if(o!==M)return{reset:{placement:M}}}return{}}}};async function a_(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=ir(n),a=xo(n),l=Ar(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=wo(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 l_=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await a_(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},c_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:y=>{let{x:v,y:w}=y;return{x:v,y:w}}},...l}=wo(e,t),c={x:n,y:r},u=await iu(t,l),d=Ar(ir(o)),f=ly(d);let h=c[f],p=c[d];if(s){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",w=h+u[y],g=h-u[v];h=tu(w,h,g)}if(i){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",w=p+u[y],g=p-u[v];p=tu(w,p,g)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},u_=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=wo(e,t),l=await iu(t,a),c=ir(n),u=xo(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(s.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const y=h-l.top-l.bottom,v=f-l.left-l.right,w=gn(h-l[p],y),g=gn(f-l[m],v),S=!t.middlewareData.shift;let T=w,E=g;if(d?E=u||S?gn(g,v):v:T=u||S?gn(w,y):y,S&&!u){const A=Gt(l.left,0),D=Gt(l.right,0),I=Gt(l.top,0),V=Gt(l.bottom,0);d?E=f-2*(A!==0||D!==0?A+D:Gt(l.left,l.right)):T=h-2*(I!==0||V!==0?I+V:Gt(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:T});const k=await o.getDimensions(s.floating);return f!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function gy(e){const t=Ut(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ct(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Gi(n)!==s||Gi(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function au(e){return je(e)?e:e.contextElement}function So(e){const t=au(e);if(!ct(t))return sr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=gy(t);let i=(s?Gi(n.width):n.width)/r,a=(s?Gi(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const d_=sr(0);function yy(e){const t=Bt(e);return!qc()||!t.visualViewport?d_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function f_(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function Dr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=au(e);let i=sr(1);t&&(r?je(r)&&(i=So(r)):i=So(e));const a=f_(s,n,r)?yy(s):sr(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const f=Bt(s),h=r&&je(r)?Bt(r):r;let p=f,m=p.frameElement;for(;m&&r&&h!==p;){const y=So(m),v=m.getBoundingClientRect(),w=Ut(m),g=v.left+(m.clientLeft+parseFloat(w.paddingLeft))*y.x,S=v.top+(m.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=g,c+=S,p=Bt(m),m=p.frameElement}}return qi({width:u,height:d,x:l,y:c})}function h_(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Mn(r),a=t?Hi(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=sr(1);const u=sr(0),d=ct(r);if((d||!d&&!s)&&((nr(r)!=="body"||Es(i))&&(l=Ui(r)),ct(r))){const f=Dr(r);c=So(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 p_(e){return Array.from(e.getClientRects())}function vy(e){return Dr(Mn(e)).left+Ui(e).scrollLeft}function m_(e){const t=Mn(e),n=Ui(e),r=e.ownerDocument.body,o=Gt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Gt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+vy(e);const a=-n.scrollTop;return Ut(r).direction==="rtl"&&(i+=Gt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function g_(e,t){const n=Bt(e),r=Mn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=qc();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function y_(e,t){const n=Dr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ct(e)?So(e):sr(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function by(e,t,n){let r;if(t==="viewport")r=g_(e,n);else if(t==="document")r=m_(Mn(e));else if(je(t))r=y_(t,n);else{const o=yy(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return qi(r)}function wy(e,t){const n=Nn(e);return n===t||!je(n)||rr(n)?!1:Ut(n).position==="fixed"||wy(n,t)}function v_(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 s=Ut(e).position==="fixed";let i=s?Nn(e):e;for(;je(i)&&!rr(i);){const a=Ut(i),l=Yc(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Es(i)&&!l&&wy(e,i))?r=r.filter(u=>u!==i):o=a,i=Nn(i)}return t.set(e,r),r}function b_(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Hi(t)?[]:v_(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=by(t,u,o);return c.top=Gt(d.top,c.top),c.right=gn(d.right,c.right),c.bottom=gn(d.bottom,c.bottom),c.left=Gt(d.left,c.left),c},by(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function w_(e){const{width:t,height:n}=gy(e);return{width:t,height:n}}function x_(e,t,n){const r=ct(t),o=Mn(t),s=n==="fixed",i=Dr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=sr(0);if(r||!r&&!s)if((nr(t)!=="body"||Es(o))&&(a=Ui(t)),r){const d=Dr(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=vy(o));const c=i.left+a.scrollLeft-l.x,u=i.top+a.scrollTop-l.y;return{x:c,y:u,width:i.width,height:i.height}}function lu(e){return Ut(e).position==="static"}function xy(e,t){return!ct(e)||Ut(e).position==="fixed"?null:t?t(e):e.offsetParent}function Ty(e,t){const n=Bt(e);if(Hi(e))return n;if(!ct(e)){let o=Nn(e);for(;o&&!rr(o);){if(je(o)&&!lu(o))return o;o=Nn(o)}return n}let r=xy(e,t);for(;r&&PI(r)&&lu(r);)r=xy(r,t);return r&&rr(r)&&lu(r)&&!Yc(r)?n:r||kI(e)||n}const T_=async function(e){const t=this.getOffsetParent||Ty,n=this.getDimensions,r=await n(e.floating);return{reference:x_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function S_(e){return Ut(e).direction==="rtl"}const E_={convertOffsetParentRelativeRectToViewportRelativeRect:h_,getDocumentElement:Mn,getClippingRect:b_,getOffsetParent:Ty,getElementRects:T_,getClientRects:p_,getDimensions:w_,getScale:So,isElement:je,isRTL:S_};function C_(e,t){let n=null,r;const o=Mn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=bo(u),p=bo(o.clientWidth-(c+d)),m=bo(o.clientHeight-(u+f)),y=bo(c),w={rootMargin:-h+"px "+-p+"px "+-m+"px "+-y+"px",threshold:Gt(0,gn(1,l))||1};let g=!0;function S(T){const E=T[0].intersectionRatio;if(E!==l){if(!g)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(S,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return i(!0),s}function Qi(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=au(e),u=o||s?[...c?or(c):[],...or(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=c&&a?C_(c,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(v=>{let[w]=v;w&&w.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?Dr(e):null;l&&y();function y(){const v=Dr(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,p=requestAnimationFrame(y)}return n(),()=>{var v;u.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const P_=l_,k_=c_,O_=i_,I_=u_,Sy=s_,__=(e,t,n)=>{const r=new Map,o={platform:E_,...n},s={...o.platform,_c:r};return o_(e,t,{...o,platform:s})};var Ji=typeof document<"u"?b.useLayoutEffect:b.useEffect;function ea(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(!ea(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!ea(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ey(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Cy(e,t){const n=Ey(e);return Math.round(t*n)/n}function Py(e){const t=_.useRef(e);return Ji(()=>{t.current=e}),t}function A_(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=_.useState(r);ea(f,r)||h(r);const[p,m]=_.useState(null),[y,v]=_.useState(null),w=_.useCallback(L=>{L!==E.current&&(E.current=L,m(L))},[]),g=_.useCallback(L=>{L!==k.current&&(k.current=L,v(L))},[]),S=s||p,T=i||y,E=_.useRef(null),k=_.useRef(null),A=_.useRef(u),D=l!=null,I=Py(l),V=Py(o),F=_.useCallback(()=>{if(!E.current||!k.current)return;const L={placement:t,strategy:n,middleware:f};V.current&&(L.platform=V.current),__(E.current,k.current,L).then(H=>{const G={...H,isPositioned:!0};R.current&&!ea(A.current,G)&&(A.current=G,qd.flushSync(()=>{d(G)}))})},[f,t,n,V]);Ji(()=>{c===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(L=>({...L,isPositioned:!1})))},[c]);const R=_.useRef(!1);Ji(()=>(R.current=!0,()=>{R.current=!1}),[]),Ji(()=>{if(S&&(E.current=S),T&&(k.current=T),S&&T){if(I.current)return I.current(S,T,F);F()}},[S,T,F,I,D]);const C=_.useMemo(()=>({reference:E,floating:k,setReference:w,setFloating:g}),[w,g]),O=_.useMemo(()=>({reference:S,floating:T}),[S,T]),M=_.useMemo(()=>{const L={position:n,left:0,top:0};if(!O.floating)return L;const H=Cy(O.floating,u.x),G=Cy(O.floating,u.y);return a?{...L,transform:"translate("+H+"px, "+G+"px)",...Ey(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:G}},[n,a,O.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:F,refs:C,elements:O,floatingStyles:M}),[u,F,C,O,M])}const D_=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?Sy({element:r.current,padding:o}).fn(n):{}:r?Sy({element:r,padding:o}).fn(n):{}}}},ta=(e,t)=>({...P_(e),options:[e,t]}),cu=(e,t)=>({...k_(e),options:[e,t]}),uu=(e,t)=>({...O_(e),options:[e,t]}),M_=(e,t)=>({...I_(e),options:[e,t]}),ky=(e,t)=>({...D_(e),options:[e,t]});function Oy(e){return _.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const Iy={..._},N_=Iy.useInsertionEffect||(e=>e());function Ct(e){const t=_.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return N_(()=>{t.current=e}),_.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 du="ArrowUp",ks="ArrowDown",Eo="ArrowLeft",Co="ArrowRight";function na(e,t,n){return Math.floor(e/t)!==n}function Os(e,t){return t<0||t>=e.current.length}function fu(e,t){return At(e,{disabledIndices:t})}function _y(e,t){return At(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function At(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:s=1}=t===void 0?{}:t;const i=e.current;let a=n;do a+=r?-s:s;while(a>=0&&a<=i.length-1&&ra(i,a,o));return a}function F_(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===du){if(u&&Et(n),c===-1)d=l;else if(d=At(e,{startingIndex:d,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||d<0)){const f=c%s,h=l%s,p=l-(h-f);h===f?d=l:d=h>f?p:p-s}Os(e,d)&&(d=c)}if(n.key===ks&&(u&&Et(n),c===-1?d=a:(d=At(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(d=At(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),Os(e,d)&&(d=c)),r==="both"){const f=bo(c/s);n.key===Co&&(u&&Et(n),c%s!==s-1?(d=At(e,{startingIndex:c,disabledIndices:i}),o&&na(d,s,f)&&(d=At(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(d=At(e,{startingIndex:c-c%s-1,disabledIndices:i})),na(d,s,f)&&(d=c)),n.key===Eo&&(u&&Et(n),c%s!==0?(d=At(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&na(d,s,f)&&(d=At(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(d=At(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),na(d,s,f)&&(d=c));const h=bo(l/s)===f;Os(e,d)&&(o&&h?d=n.key===Eo?l:At(e,{startingIndex:c-c%s-1,disabledIndices:i}):d=c)}return d}function L_(e,t,n){const r=[];let o=0;return e.forEach((s,i)=>{let{width:a,height:l}=s;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+i+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=i}),c=!0):o++}}),[...r]}function V_(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e)}}function $_(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ra(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 Ay=0;function ar(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Ay);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():Ay=requestAnimationFrame(s)}var Ie=typeof document<"u"?b.useLayoutEffect:b.useEffect;function R_(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 Dy=_.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function B_(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,s]=_.useState(()=>new Map),i=_.useCallback(l=>{s(c=>new Map(c).set(l,null))},[]),a=_.useCallback(l=>{s(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Ie(()=>{const l=new Map(o);Array.from(l.keys()).sort(R_).forEach((u,d)=>{l.set(u,d)}),j_(o,l)||s(l)},[o]),_.createElement(Dy.Provider,{value:_.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function My(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=_.useContext(Dy),[a,l]=_.useState(null),c=_.useRef(null),u=_.useCallback(d=>{if(c.current=d,a!==null&&(s.current[a]=d,i)){var f;const h=t!==void 0;i.current[a]=h?t:(f=d==null?void 0:d.textContent)!=null?f:null}},[a,s,i,t]);return Ie(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ie(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),_.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function Po(){return Po=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},Po.apply(this,arguments)}let Ny=!1,z_=0;const Fy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+z_++;function W_(){const[e,t]=_.useState(()=>Ny?Fy():void 0);return Ie(()=>{e==null&&t(Fy())},[]),_.useEffect(()=>{Ny=!0},[]),e}const ko=Iy.useId||W_;let Is;process.env.NODE_ENV!=="production"&&(Is=new Set);function oa(){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=Is)!=null&&e.has(o))){var s;(s=Is)==null||s.add(o),console.warn(o)}}function H_(){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=Is)!=null&&e.has(o))){var s;(s=Is)==null||s.add(o),console.error(o)}}const Ly=_.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:s}},width:i=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:f,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||oa("The `ref` prop is required for `FloatingArrow`."));const y=ko(),[v,w]=_.useState(!1);if(Ie(()=>{if(!o)return;Ut(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const g=c*2,S=g/2,T=i/2*(l/-8+1),E=a/2*l/4,[k,A]=r.split("-"),D=!!f,I=k==="top"||k==="bottom",V=u&&A==="end"?"bottom":"top";let F=u&&A==="end"?"right":"left";u&&v&&(F=A==="end"?"left":"right");const R=(s==null?void 0:s.x)!=null?u||s.x:"",C=(s==null?void 0:s.y)!=null?u||s.y:"",O=f||"M0,0"+(" H"+i)+(" L"+(i-T)+","+(a-E))+(" Q"+i/2+","+a+" "+T+","+(a-E))+" Z",M={top:D?"rotate(180deg)":"",left:D?"rotate(90deg)":"rotate(-90deg)",bottom:D?"":"rotate(180deg)",right:D?"rotate(-90deg)":"rotate(90deg)"}[k];return _.createElement("svg",Po({},m,{"aria-hidden":!0,ref:n,width:D?i:i+g,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[F]:R,[V]:C,[k]:I||D?"100%":"calc(100% - "+g/2+"px)",transform:""+M+(h??""),...p}}),g>0&&_.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:d,strokeWidth:g+(f?0:1),d:O}),_.createElement("path",{stroke:g&&!f?m.fill:"none",d:O}),_.createElement("clipPath",{id:y},_.createElement("rect",{x:-S,y:S*(D?-1:1),width:i+g,height:i})))});function Vy(){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 $y=_.createContext(null),Ry=_.createContext(null),lr=()=>{var e;return((e=_.useContext($y))==null?void 0:e.id)||null},cr=()=>_.useContext(Ry);function U_(e){const t=ko(),n=cr(),o=lr();return Ie(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function G_(e){const{children:t,id:n}=e,r=lr();return _.createElement($y.Provider,{value:_.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function Y_(e){const{children:t}=e,n=_.useRef([]),r=_.useCallback(i=>{n.current=[...n.current,i]},[]),o=_.useCallback(i=>{n.current=n.current.filter(a=>a!==i)},[]),s=_.useState(()=>Vy())[0];return _.createElement(Ry.Provider,{value:_.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function ur(e){return"data-floating-ui-"+e}function Pt(e){const t=b.useRef(e);return Ie(()=>{t.current=e}),t}const jy=ur("safe-polygon");function hu(e,t,n){return n&&!Cs(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function By(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,h=cr(),p=lr(),m=Pt(c),y=Pt(l),v=Pt(n),w=_.useRef(),g=_.useRef(-1),S=_.useRef(),T=_.useRef(-1),E=_.useRef(!0),k=_.useRef(!1),A=_.useRef(()=>{}),D=_.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]);_.useEffect(()=>{if(!a)return;function O(M){let{open:L}=M;L||(clearTimeout(g.current),clearTimeout(T.current),E.current=!0)}return s.on("openchange",O),()=>{s.off("openchange",O)}},[a,s]),_.useEffect(()=>{if(!a||!m.current||!n)return;function O(L){D()&&r(!1,L,"hover")}const M=vt(i.floating).documentElement;return M.addEventListener("mouseleave",O),()=>{M.removeEventListener("mouseleave",O)}},[i.floating,n,r,a,m,D]);const I=_.useCallback(function(O,M,L){M===void 0&&(M=!0),L===void 0&&(L="hover");const H=hu(y.current,"close",w.current);H&&!S.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,O,L),H)):M&&(clearTimeout(g.current),r(!1,O,L))},[y,r]),V=Ct(()=>{A.current(),S.current=void 0}),F=Ct(()=>{if(k.current){const O=vt(i.floating).body;O.style.pointerEvents="",O.removeAttribute(jy),k.current=!1}});_.useEffect(()=>{if(!a)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function M(P){if(clearTimeout(g.current),E.current=!1,u&&!Cs(w.current)||d>0&&!hu(y.current,"open"))return;const j=hu(y.current,"open",w.current);j?g.current=window.setTimeout(()=>{v.current||r(!0,P,"hover")},j):r(!0,P,"hover")}function L(P){if(O())return;A.current();const j=vt(i.floating);if(clearTimeout(T.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),S.current=m.current({...o.current.floatingContext,tree:h,x:P.clientX,y:P.clientY,onClose(){F(),V(),I(P,!0,"safe-polygon")}});const re=S.current;j.addEventListener("mousemove",re),A.current=()=>{j.removeEventListener("mousemove",re)};return}(w.current==="touch"?!ut(i.floating,P.relatedTarget):!0)&&I(P)}function H(P){O()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:P.clientX,y:P.clientY,onClose(){F(),V(),I(P)}})(P))}if(je(i.domReference)){var G;const P=i.domReference;return n&&P.addEventListener("mouseleave",H),(G=i.floating)==null||G.addEventListener("mouseleave",H),f&&P.addEventListener("mousemove",M,{once:!0}),P.addEventListener("mouseenter",M),P.addEventListener("mouseleave",L),()=>{var j;n&&P.removeEventListener("mouseleave",H),(j=i.floating)==null||j.removeEventListener("mouseleave",H),f&&P.removeEventListener("mousemove",M),P.removeEventListener("mouseenter",M),P.removeEventListener("mouseleave",L)}}},[i,a,e,u,d,f,I,V,F,r,n,v,h,y,m,o]),Ie(()=>{var O;if(a&&n&&(O=m.current)!=null&&O.__options.blockPointerEvents&&D()){const L=vt(i.floating).body;L.setAttribute(jy,""),L.style.pointerEvents="none",k.current=!0;const H=i.floating;if(je(i.domReference)&&H){var M;const G=i.domReference,P=h==null||(M=h.nodesRef.current.find(j=>j.id===p))==null||(M=M.context)==null?void 0:M.elements.floating;return P&&(P.style.pointerEvents=""),G.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{G.style.pointerEvents="",H.style.pointerEvents=""}}}},[a,n,p,i,h,m,D]),Ie(()=>{n||(w.current=void 0,V(),F())},[n,V,F]),_.useEffect(()=>()=>{V(),clearTimeout(g.current),clearTimeout(T.current),F()},[a,i.domReference,V,F]);const R=_.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&&!Cs(w.current)||n||d===0||(clearTimeout(T.current),w.current==="touch"?H():T.current=window.setTimeout(H,d))}}},[u,r,n,v,d]),C=_.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(O){I(O.nativeEvent,!1)}}),[I]);return _.useMemo(()=>a?{reference:R,floating:C}:{},[a,R,C])}function q_(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function Mr(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function K_(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),Mr(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let Oo=new WeakMap,sa=new WeakSet,ia={},pu=0;const Z_=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,zy=e=>e&&(e.host||zy(e.parentNode)),X_=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=zy(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Q_(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=X_(t,e),a=new Set,l=new Set(i),c=[];ia[o]||(ia[o]=new WeakMap);const u=ia[o];i.forEach(d),f(t),a.clear();function d(h){!h||a.has(h)||(a.add(h),h.parentNode&&d(h.parentNode))}function f(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(nr(p)!=="script")if(a.has(p))f(p);else{const m=s?p.getAttribute(s):null,y=m!==null&&m!=="false",v=(Oo.get(p)||0)+1,w=(u.get(p)||0)+1;Oo.set(p,v),u.set(p,w),c.push(p),v===1&&y&&sa.add(p),w===1&&p.setAttribute(o,""),!y&&s&&p.setAttribute(s,"true")}})}return pu++,()=>{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||(!sa.has(h)&&s&&h.removeAttribute(s),sa.delete(h)),m||h.removeAttribute(o)}),pu--,pu||(Oo=new WeakMap,Oo=new WeakMap,sa=new WeakSet,ia={})}}function Wy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=vt(e[0]).body;return Q_(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Io=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Hy(e,t){const n=Ps(e,Io());t==="prev"&&n.reverse();const r=n.indexOf(nn(vt(e)));return n.slice(r+1)[0]}function Uy(){return Hy(document.body,"next")}function Gy(){return Hy(document.body,"prev")}function _s(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ut(n,r)}function J_(e){Ps(e,Io()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function eA(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 tA(e,t,n){const r=e.indexOf(t);function o(i){const a=ur("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||ut(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const mu={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 nA;function Yy(e){e.key==="Tab"&&(e.target,clearTimeout(nA))}const aa=_.forwardRef(function(t,n){const[r,o]=_.useState();Ie(()=>(Xc()&&o("button"),document.addEventListener("keydown",Yy),()=>{document.removeEventListener("keydown",Yy)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ur("focus-guard")]:"",style:mu};return _.createElement("span",Po({},t,s))}),qy=_.createContext(null),Ky=ur("portal");function rA(e){e===void 0&&(e={});const{id:t,root:n}=e,r=ko(),o=Zy(),[s,i]=_.useState(null),a=_.useRef(null);return Ie(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),Ie(()=>{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(Ky,""),l.appendChild(c),a.current=c,i(c)},[t,r]),Ie(()=>{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(Ky,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function As(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=rA({id:n,root:r}),[i,a]=_.useState(null),l=_.useRef(null),c=_.useRef(null),u=_.useRef(null),d=_.useRef(null),f=!!i&&!i.modal&&i.open&&o&&!!(r||s);return _.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function h(p){s&&_s(p)&&(p.type==="focusin"?eA:J_)(s)}return s.addEventListener("focusin",h,!0),s.addEventListener("focusout",h,!0),()=>{s.removeEventListener("focusin",h,!0),s.removeEventListener("focusout",h,!0)}},[s,o,i==null?void 0:i.modal]),_.createElement(qy.Provider,{value:_.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s])},f&&s&&_.createElement(aa,{"data-type":"outside",ref:l,onFocus:h=>{if(_s(h,s)){var p;(p=u.current)==null||p.focus()}else{const m=Gy()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),f&&s&&_.createElement("span",{"aria-owns":s.id,style:mu}),s&&qd.createPortal(t,s),f&&s&&_.createElement(aa,{"data-type":"outside",ref:c,onFocus:h=>{if(_s(h,s)){var p;(p=d.current)==null||p.focus()}else{const m=Uy()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,h.nativeEvent))}}}))}const Zy=()=>_.useContext(qy),Xy=20;let Nr=[];function gu(e){Nr=Nr.filter(n=>n.isConnected);let t=e;if(!(!t||nr(t)==="body")){if(!r_(t,Io())){const n=Ps(t,Io())[0];n&&(t=n)}Nr.push(t),Nr.length>Xy&&(Nr=Nr.slice(-Xy))}}function Qy(){return Nr.slice().reverse().find(e=>e.isConnected)}const oA=_.forwardRef(function(t,n){return _.createElement("button",Po({},t,{type:"button",ref:n,tabIndex:-1,style:mu}))});function la(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:f,refs:h,nodeId:p,onOpenChange:m,events:y,dataRef:v,floatingId:w,elements:{domReference:g,floating:S}}=t,T=typeof i=="number"&&i<0,E=ay(g)&&T,k=Z_()?s:!0,A=Pt(o),D=Pt(i),I=Pt(a),V=cr(),F=Zy(),R=_.useRef(null),C=_.useRef(null),O=_.useRef(!1),M=_.useRef(!1),L=_.useRef(-1),H=F!=null,G=S==null?void 0:S.firstElementChild,P=(G==null?void 0:G.id)===w?G:S,j=Ct(function(U){return U===void 0&&(U=P),U?Ps(U,Io()):[]}),Z=Ct(U=>{const N=j(U);return A.current.map(B=>g&&B==="reference"?g:P&&B==="floating"?P:N).filter(Boolean).flat()});_.useEffect(()=>{if(r||!c)return;function U(B){if(B.key==="Tab"){ut(P,nn(vt(P)))&&j().length===0&&!E&&Et(B);const W=Z(),$=Fn(B);A.current[0]==="reference"&&$===g&&(Et(B),B.shiftKey?ar(W[W.length-1]):ar(W[1])),A.current[1]==="floating"&&$===P&&B.shiftKey&&(Et(B),ar(W[0]))}}const N=vt(P);return N.addEventListener("keydown",U),()=>{N.removeEventListener("keydown",U)}},[r,g,P,c,A,E,j,Z]),_.useEffect(()=>{if(r||!S)return;function U(N){const B=Fn(N),$=j().indexOf(B);$!==-1&&(L.current=$)}return S.addEventListener("focusin",U),()=>{S.removeEventListener("focusin",U)}},[r,S,j]),_.useEffect(()=>{if(r||!d)return;function U(){M.current=!0,setTimeout(()=>{M.current=!1})}function N(B){const W=B.relatedTarget;queueMicrotask(()=>{const $=!(ut(g,W)||ut(S,W)||ut(W,S)||ut(F==null?void 0:F.portalNode,W)||W!=null&&W.hasAttribute(ur("focus-guard"))||V&&(Mr(V.nodesRef.current,p).find(Y=>{var oe,z;return ut((oe=Y.context)==null?void 0:oe.elements.floating,W)||ut((z=Y.context)==null?void 0:z.elements.domReference,W)})||q_(V.nodesRef.current,p).find(Y=>{var oe,z;return((oe=Y.context)==null?void 0:oe.elements.floating)===W||((z=Y.context)==null?void 0:z.elements.domReference)===W})));if(l&&$&&nn(vt(P))===vt(P).body){ct(P)&&(P==null||P.focus());const Y=L.current,oe=j(),z=oe[Y]||oe[oe.length-1]||P;ct(z)&&z.focus()}(E||!c)&&W&&$&&!M.current&&W!==Qy()&&(O.current=!0,m(!1,B))})}if(S&&ct(g))return g.addEventListener("focusout",N),g.addEventListener("pointerdown",U),S.addEventListener("focusout",N),()=>{g.removeEventListener("focusout",N),g.removeEventListener("pointerdown",U),S.removeEventListener("focusout",N)}},[r,g,S,P,c,p,V,F,m,d,l,j,E]),_.useEffect(()=>{var U;if(r)return;const N=Array.from((F==null||(U=F.portalNode)==null?void 0:U.querySelectorAll("["+ur("portal")+"]"))||[]);if(S){const B=[S,...N,R.current,C.current,A.current.includes("reference")||E?g:null].filter($=>$!=null),W=c||E?Wy(B,k,!k):Wy(B);return()=>{W()}}},[r,g,S,c,A,F,E,k]),Ie(()=>{if(r||!ct(P))return;const U=vt(P),N=nn(U);queueMicrotask(()=>{const B=Z(P),W=D.current,$=(typeof W=="number"?B[W]:W.current)||P,Y=ut(P,N);!T&&!Y&&f&&ar($,{preventScroll:$===P})})},[r,f,P,T,Z,D]),Ie(()=>{if(r||!P)return;let U=!1;const N=vt(P),B=nn(N);let $=v.current.openEvent;const Y=h.domReference.current;gu(B);function oe(z){let{open:Ne,reason:rt,event:He,nested:ot}=z;Ne&&($=He),rt==="escape-key"&&h.domReference.current&&gu(h.domReference.current),rt==="hover"&&He.type==="mouseleave"&&(O.current=!0),rt==="outside-press"&&(ot?(O.current=!1,U=!0):O.current=!(sy(He)||Zc(He)))}return y.on("openchange",oe),()=>{y.off("openchange",oe);const z=nn(N),Ne=ut(S,z)||V&&Mr(V.nodesRef.current,p).some(de=>{var Ee;return ut((Ee=de.context)==null?void 0:Ee.elements.floating,z)});(Ne||$&&["click","mousedown"].includes($.type))&&h.domReference.current&&gu(h.domReference.current);const He=Y||B,ot=Ps(vt(He).body,Io());queueMicrotask(()=>{let de=Qy();!de&&ct(He)&&S&&(de=tA(ot,He,S)),I.current&&!O.current&&ct(de)&&(!(de!==z&&z!==N.body)||Ne)&&de.focus({preventScroll:U})})}},[r,S,P,I,v,h,y,V,p]),Ie(()=>{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]),Ie(()=>{if(r||!P||typeof MutationObserver!="function"||T)return;const U=()=>{const B=P.getAttribute("tabindex"),W=j(),$=nn(vt(S)),Y=W.indexOf($);Y!==-1&&(L.current=Y),A.current.includes("floating")||$!==h.domReference.current&&W.length===0?B!=="0"&&P.setAttribute("tabindex","0"):B!=="-1"&&P.setAttribute("tabindex","-1")};U();const N=new MutationObserver(U);return N.observe(P,{childList:!0,subtree:!0,attributes:!0}),()=>{N.disconnect()}},[r,S,P,h,A,j,T]);function re(U){return r||!u||!c?null:_.createElement(oA,{ref:U==="start"?R:C,onClick:N=>m(!1,N.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&k&&(c?!E:!0)&&(H||c);return _.createElement(_.Fragment,null,J&&_.createElement(aa,{"data-type":"inside",ref:F==null?void 0:F.beforeInsideRef,onFocus:U=>{if(c){const B=Z();ar(o[0]==="reference"?B[0]:B[B.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(O.current=!1,_s(U,F.portalNode)){const B=Uy()||g;B==null||B.focus()}else{var N;(N=F.beforeOutsideRef.current)==null||N.focus()}}}),!E&&re("start"),n,re("end"),J&&_.createElement(aa,{"data-type":"inside",ref:F==null?void 0:F.afterInsideRef,onFocus:U=>{if(c)ar(Z()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(O.current=!0),_s(U,F.portalNode)){const B=Gy()||g;B==null||B.focus()}else{var N;(N=F.afterOutsideRef.current)==null||N.focus()}}}))}const yu=new Set,sA=_.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=ko();return Ie(()=>{if(!r)return;yu.add(s);const i=/iP(hone|ad|od)|iOS/.test(Kc()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,f=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,y=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(y))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{yu.delete(s),yu.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[s,r]),_.createElement("div",Po({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Jy(e){return ct(e.target)&&e.target.tagName==="BUTTON"}function ev(e){return eu(e)}function vu(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=_.useRef(),f=_.useRef(!1),h=_.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(Cs(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}Cs(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||Jy(p))&&(p.key===" "&&!ev(s)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Jy(p)||ev(s)||p.key===" "&&f.current&&(f.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return _.useMemo(()=>i?{reference:h}:{},[i,h])}const iA={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},aA={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},tv=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 Ds(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:p}=t,m=cr(),y=Ct(typeof l=="function"?l:()=>!1),v=typeof l=="function"?y:l,w=_.useRef(!1),g=_.useRef(!1),{escapeKey:S,outsidePress:T}=tv(h),{escapeKey:E,outsidePress:k}=tv(p),A=Ct(C=>{var O;if(!n||!i||!a||C.key!=="Escape")return;const M=(O=s.current.floatingContext)==null?void 0:O.nodeId,L=m?Mr(m.nodesRef.current,M):[];if(!S&&(C.stopPropagation(),L.length>0)){let H=!0;if(L.forEach(G=>{var P;if((P=G.context)!=null&&P.open&&!G.context.dataRef.current.__escapeKeyBubbles){H=!1;return}}),!H)return}r(!1,II(C)?C.nativeEvent:C,"escape-key")}),D=Ct(C=>{var O;const M=()=>{var L;A(C),(L=Fn(C))==null||L.removeEventListener("keydown",M)};(O=Fn(C))==null||O.addEventListener("keydown",M)}),I=Ct(C=>{var O;const M=w.current;w.current=!1;const L=g.current;if(g.current=!1,c==="click"&&L||M||typeof v=="function"&&!v(C))return;const H=Fn(C),G="["+ur("inert")+"]",P=vt(o.floating).querySelectorAll(G);let j=je(H)?H:null;for(;j&&!rr(j);){const U=Nn(j);if(rr(U)||!je(U))break;j=U}if(P.length&&je(H)&&!_I(H)&&!ut(H,o.floating)&&Array.from(P).every(U=>!ut(j,U)))return;if(ct(H)&&R){const U=H.clientWidth>0&&H.scrollWidth>H.clientWidth,N=H.clientHeight>0&&H.scrollHeight>H.clientHeight;let B=N&&C.offsetX>H.clientWidth;if(N&&Ut(H).direction==="rtl"&&(B=C.offsetX<=H.offsetWidth-H.clientWidth),B||U&&C.offsetY>H.clientHeight)return}const Z=(O=s.current.floatingContext)==null?void 0:O.nodeId,re=m&&Mr(m.nodesRef.current,Z).some(U=>{var N;return Jc(C,(N=U.context)==null?void 0:N.elements.floating)});if(Jc(C,o.floating)||Jc(C,o.domReference)||re)return;const J=m?Mr(m.nodesRef.current,Z):[];if(J.length>0){let U=!0;if(J.forEach(N=>{var B;if((B=N.context)!=null&&B.open&&!N.context.dataRef.current.__outsidePressBubbles){U=!1;return}}),!U)return}r(!1,C,"outside-press")}),V=Ct(C=>{var O;const M=()=>{var L;I(C),(L=Fn(C))==null||L.removeEventListener(c,M)};(O=Fn(C))==null||O.addEventListener(c,M)});_.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=S,s.current.__outsidePressBubbles=T;function C(L){r(!1,L,"ancestor-scroll")}const O=vt(o.floating);a&&O.addEventListener("keydown",E?D:A,E),v&&O.addEventListener(c,k?V:I,k);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:A,E),v&&O.removeEventListener(c,k?V:I,k),M.forEach(L=>{L.removeEventListener("scroll",C)})}},[s,o,a,v,c,n,r,f,i,S,T,A,E,D,I,k,V]),_.useEffect(()=>{w.current=!1},[v,c]);const F=_.useMemo(()=>({onKeyDown:A,[iA[d]]:C=>{u&&r(!1,C.nativeEvent,"reference-press")}}),[A,r,u,d]),R=_.useMemo(()=>({onKeyDown:A,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[aA[c]]:()=>{w.current=!0}}),[A,c]);return _.useMemo(()=>i?{reference:F,floating:R}:{},[i,F,R])}function lA(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=ko(),s=_.useRef({}),[i]=_.useState(()=>Vy()),a=lr()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!je(h)&&H_("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]=_.useState(r.reference),u=Ct((h,p,m)=>{s.current.openEvent=h?p:void 0,i.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),d=_.useMemo(()=>({setPositionReference:c}),[]),f=_.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return _.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[t,u,f,i,o,d])}function Ms(e){e===void 0&&(e={});const{nodeId:t}=e,n=lA({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=_.useState(null),[a,l]=_.useState(null),u=(o==null?void 0:o.reference)||s,d=_.useRef(null),f=cr();Ie(()=>{u&&(d.current=u)},[u]);const h=A_({...e,elements:{...o,...a&&{reference:a}}}),p=_.useCallback(g=>{const S=je(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(S),h.refs.setReference(S)},[h.refs]),m=_.useCallback(g=>{(je(g)||g===null)&&(d.current=g,i(g)),(je(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!je(g))&&h.refs.setReference(g)},[h.refs]),y=_.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),v=_.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),w=_.useMemo(()=>({...h,...r,refs:y,elements:v,nodeId:t}),[h,y,v,t,r]);return Ie(()=>{r.dataRef.current.floatingContext=w;const g=f==null?void 0:f.nodesRef.current.find(S=>S.id===t);g&&(g.context=w)}),_.useMemo(()=>({...h,context:w,refs:y,elements:v}),[h,y,v,w])}function cA(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=_.useRef(!1),u=_.useRef(),d=_.useRef(!0);_.useEffect(()=>{if(!a)return;const h=Bt(i.domReference);function p(){!n&&ct(i.domReference)&&i.domReference===nn(vt(i.domReference))&&(c.current=!0)}function m(){d.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),_.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]),_.useEffect(()=>()=>{clearTimeout(u.current)},[]);const f=_.useMemo(()=>({onPointerDown(h){Zc(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=Fn(h.nativeEvent);if(l&&je(p))try{if(Xc()&&iy())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!eu(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,y=je(p)&&p.hasAttribute(ur("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const w=nn(i.domReference?i.domReference.ownerDocument:document);!p&&w===i.domReference||ut((v=s.current.floatingContext)==null?void 0:v.refs.floating.current,w)||ut(i.domReference,w)||y||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return _.useMemo(()=>a?{reference:f}:{},[a,f])}const nv="active",rv="selected";function bu(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[nv]:i,[rv]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[nv,rv].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),i[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(y=>y(...p)).find(y=>y!==void 0)}}}else i[c]=u}),i),{})}}function Ns(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=_.useCallback(a=>bu(a,e,"reference"),t),s=_.useCallback(a=>bu(a,e,"floating"),n),i=_.useCallback(a=>bu(a,e,"item"),r);return _.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let ov=!1;function ca(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function sv(e,t){return ca(t,e===du||e===ks,e===Eo||e===Co)}function wu(e,t,n){return ca(t,e===ks,n?e===Eo:e===Co)||e==="Enter"||e===" "||e===""}function uA(e,t,n){return ca(t,n?e===Eo:e===Co,e===ks)}function iv(e,t,n){return ca(t,n?e===Co:e===Eo,e===du)}function av(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:v=!0,disabledIndices:w=void 0,orientation:g="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:E,itemSizes:k,dense:A=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||oa("`useListNavigation` looping must be enabled to allow escaping."),p||oa("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&S>1&&oa("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const D=lr(),I=cr(),V=Ct(a),F=_.useRef(m),R=_.useRef(c??-1),C=_.useRef(null),O=_.useRef(!0),M=_.useRef(V),L=_.useRef(!!o.floating),H=_.useRef(n),G=_.useRef(!1),P=_.useRef(!1),j=Pt(w),Z=Pt(n),re=Pt(T),J=Pt(o.floating),U=Pt(c),[N,B]=_.useState(),[W,$]=_.useState(),Y=Ct(function(de,Ee,ce){ce===void 0&&(ce=!1);function ke(Oe){p?(B(Oe.id),I==null||I.events.emit("virtualfocus",Oe),E&&(E.current=Oe)):ar(Oe,{preventScroll:!0,sync:iy()&&Xc()?ov||G.current:!1})}const ft=de.current[Ee.current];ft&&ke(ft),requestAnimationFrame(()=>{const Oe=de.current[Ee.current]||ft;if(!Oe)return;ft||ke(Oe);const ht=re.current;ht&&z&&(ce||!O.current)&&(Oe.scrollIntoView==null||Oe.scrollIntoView(typeof ht=="boolean"?{block:"nearest",inline:"nearest"}:ht))})});Ie(()=>{document.createElement("div").focus({get preventScroll(){return ov=!0,!1}})},[]),Ie(()=>{l&&(n&&o.floating?F.current&&c!=null&&(P.current=!0,R.current=c,V(c)):L.current&&(R.current=-1,M.current(null)))},[l,n,o.floating,c,V]),Ie(()=>{if(l&&n&&o.floating)if(i==null){if(G.current=!1,U.current!=null)return;if(L.current&&(R.current=-1,Y(s,R)),(!H.current||!L.current)&&F.current&&(C.current!=null||F.current===!0&&C.current==null)){let de=0;const Ee=()=>{s.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(Ee),de++):(R.current=C.current==null||wu(C.current,g,h)||f?fu(s,j.current):_y(s,j.current),C.current=null,V(R.current))};Ee()}}else Os(s,i)||(R.current=i,Y(s,R,P.current),P.current=!1)},[l,n,o.floating,i,U,f,s,g,h,V,Y,j]),Ie(()=>{var de;if(!l||o.floating||!I||p||!L.current)return;const Ee=I.nodesRef.current,ce=(de=Ee.find(Oe=>Oe.id===D))==null||(de=de.context)==null?void 0:de.elements.floating,ke=nn(vt(o.floating)),ft=Ee.some(Oe=>Oe.context&&ut(Oe.context.elements.floating,ke));ce&&!ft&&O.current&&ce.focus({preventScroll:!0})},[l,o.floating,I,D,p]),Ie(()=>{if(!l||!I||!p||D)return;function de(Ee){$(Ee.id),E&&(E.current=Ee)}return I.events.on("virtualfocus",de),()=>{I.events.off("virtualfocus",de)}},[l,I,p,D,E]),Ie(()=>{M.current=V,L.current=!!o.floating}),Ie(()=>{n||(C.current=null)},[n]),Ie(()=>{H.current=n},[n]);const oe=i!=null,z=_.useMemo(()=>{function de(ce){if(!n)return;const ke=s.current.indexOf(ce);ke!==-1&&V(ke)}return{onFocus(ce){let{currentTarget:ke}=ce;de(ke)},onClick:ce=>{let{currentTarget:ke}=ce;return ke.focus({preventScroll:!0})},...y&&{onMouseMove(ce){let{currentTarget:ke}=ce;de(ke)},onPointerLeave(ce){let{pointerType:ke}=ce;!O.current||ke==="touch"||(R.current=-1,Y(s,R),V(null),p||ar(J.current,{preventScroll:!0}))}}}},[n,J,Y,y,s,V,p]),Ne=Ct(de=>{if(O.current=!1,G.current=!0,!Z.current&&de.currentTarget===J.current)return;if(f&&iv(de.key,g,h)){Et(de),r(!1,de.nativeEvent,"list-navigation"),ct(o.domReference)&&!p&&o.domReference.focus();return}const Ee=R.current,ce=fu(s,w),ke=_y(s,w);if(de.key==="Home"&&(Et(de),R.current=ce,V(R.current)),de.key==="End"&&(Et(de),R.current=ke,V(R.current)),S>1){const ft=k||Array.from({length:s.current.length},()=>({width:1,height:1})),Oe=L_(ft,S,A),ht=Oe.findIndex(ae=>ae!=null&&!ra(s.current,ae,w)),Q=Oe.reduce((ae,_e,Ke)=>_e!=null&&!ra(s.current,_e,w)?Ke:ae,-1);if(R.current=Oe[F_({current:Oe.map(ae=>ae!=null?s.current[ae]:null)},{event:de,orientation:g,loop:d,cols:S,disabledIndices:$_([...w||s.current.map((ae,_e)=>ra(s.current,_e)?_e:void 0),void 0],Oe),minIndex:ht,maxIndex:Q,prevIndex:V_(R.current>ke?ce:R.current,ft,Oe,S,de.key===ks?"bl":de.key===Co?"tr":"tl"),stopEvent:!0})],V(R.current),g==="both")return}if(sv(de.key,g)){if(Et(de),n&&!p&&nn(de.currentTarget.ownerDocument)===de.currentTarget){R.current=wu(de.key,g,h)?ce:ke,V(R.current);return}wu(de.key,g,h)?d?R.current=Ee>=ke?u&&Ee!==s.current.length?-1:ce:At(s,{startingIndex:Ee,disabledIndices:w}):R.current=Math.min(ke,At(s,{startingIndex:Ee,disabledIndices:w})):d?R.current=Ee<=ce?u&&Ee!==-1?s.current.length:ke:At(s,{startingIndex:Ee,decrement:!0,disabledIndices:w}):R.current=Math.max(ce,At(s,{startingIndex:Ee,decrement:!0,disabledIndices:w})),Os(s,R.current)?V(null):V(R.current)}}),rt=_.useMemo(()=>p&&n&&oe&&{"aria-activedescendant":W||N},[p,n,oe,W,N]),He=_.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!ay(o.domReference)&&rt,onKeyDown:Ne,onPointerMove(){O.current=!0}}),[rt,Ne,o.domReference,g]),ot=_.useMemo(()=>{function de(ce){m==="auto"&&sy(ce.nativeEvent)&&(F.current=!0)}function Ee(ce){F.current=m,m==="auto"&&Zc(ce.nativeEvent)&&(F.current=!0)}return{...rt,onKeyDown(ce){O.current=!1;const ke=ce.key.indexOf("Arrow")===0,ft=uA(ce.key,g,h),Oe=iv(ce.key,g,h),ht=sv(ce.key,g),Q=(f?ft:ht)||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?K_(I.nodesRef.current,kt.id):null;if(ke&&Nt&&E){const Vt=new KeyboardEvent("keydown",{key:ce.key,bubbles:!0});if(ft||Oe){var ae,_e;const Hr=((ae=Nt.context)==null?void 0:ae.elements.domReference)===ce.currentTarget,Yo=Oe&&!Hr?(_e=Nt.context)==null?void 0:_e.elements.domReference:ft?s.current.find(qo=>(qo==null?void 0:qo.id)===N):null;Yo&&(Et(ce),Yo.dispatchEvent(Vt),$(void 0))}if(ht&&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 Ne(ce)}if(!(!n&&!v&&ke)){if(Q&&(C.current=f&&ht?null:ce.key),f){ft&&(Et(ce),n?(R.current=fu(s,j.current),V(R.current)):r(!0,ce.nativeEvent,"list-navigation"));return}ht&&(c!=null&&(R.current=c),Et(ce),!n&&v?r(!0,ce.nativeEvent,"list-navigation"):Ne(ce),n&&V(R.current))}},onFocus(){n&&!p&&V(null)},onPointerDown:Ee,onMouseDown:de,onClick:de}},[N,rt,Ne,j,m,s,f,V,r,n,v,g,h,c,I,p,E]);return _.useMemo(()=>l?{reference:ot,floating:He,item:z}:{},[l,ot,He,z])}const dA=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Fs(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=dA.get(i))!=null?n:i,l=ko(),u=lr()!=null,d=_.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,i]),f=_.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),h=_.useCallback(p=>{let{active:m,selected:y}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...v,"aria-selected":m&&y};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,i]);return _.useMemo(()=>s?{reference:d,floating:f,item:h}:{},[s,d,f,h])}const lv=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 fA(e,t){const[n,r]=_.useState(e);return e&&!n&&r(!0),_.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function hA(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=(typeof o=="number"?o:o.close)||0,[a,l]=_.useState("unmounted"),c=fA(n,i);return!c&&a==="close"&&l("unmounted"),Ie(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function pA(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:s,duration:i=250}=t,a=e.placement,l=a.split("-")[0],c=_.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",d=(u?i:i.open)||0,f=(u?i:i.close)||0,[h,p]=_.useState(()=>({..._o(s,c),..._o(n,c)})),{isMounted:m,status:y}=hA(e,{duration:i}),v=Pt(n),w=Pt(r),g=Pt(o),S=Pt(s);return Ie(()=>{const T=_o(v.current,c),E=_o(g.current,c),k=_o(S.current,c),A=_o(w.current,c)||Object.keys(T).reduce((D,I)=>(D[I]="",D),{});if(y==="initial"&&p(D=>({transitionProperty:D.transitionProperty,...k,...T})),y==="open"&&p({transitionProperty:Object.keys(A).map(lv).join(","),transitionDuration:d+"ms",...k,...A}),y==="close"){const D=E||T;p({transitionProperty:Object.keys(D).map(lv).join(","),transitionDuration:f+"ms",...k,...D})}},[f,g,v,w,S,d,y,c]),{isMounted:m,styles:h}}function mA(e,t){var n;const{open:r,dataRef:o}=e,{listRef:s,activeIndex:i,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:h=null}=t,p=_.useRef(),m=_.useRef(""),y=_.useRef((n=h??i)!=null?n:-1),v=_.useRef(null),w=Ct(a),g=Ct(l),S=Pt(u),T=Pt(f);Ie(()=>{r&&(clearTimeout(p.current),v.current=null,m.current="")},[r]),Ie(()=>{if(r&&m.current===""){var I;y.current=(I=h??i)!=null?I:-1}},[r,h,i]);const E=Ct(I=>{I?o.current.typing||(o.current.typing=I,g(I)):o.current.typing&&(o.current.typing=I,g(I))}),k=Ct(I=>{function V(M,L,H){const G=S.current?S.current(L,H):L.find(P=>(P==null?void 0:P.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return G?M.indexOf(G):-1}const F=s.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="",y.current=v.current),m.current+=I.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",y.current=v.current,E(!1)},d);const C=y.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))}),A=_.useMemo(()=>({onKeyDown:k}),[k]),D=_.useMemo(()=>({onKeyDown:k,onKeyUp(I){I.key===" "&&E(!1)}}),[k,E]);return _.useMemo(()=>c?{reference:A,floating:D}:{},[c,A,D])}function cv(e,t){const[n,r]=e;let o=!1;const s=t.length;for(let i=0,a=s-1;i<s;a=i++){const[l,c]=t[i]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function gA(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function yA(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,s=!1,i=null,a=null,l=performance.now();function c(d,f){const h=performance.now(),p=h-l;if(i===null||a===null||p===0)return i=d,a=f,l=h,null;const m=d-i,y=f-a,w=Math.sqrt(m*m+y*y)/p;return i=d,a=f,l=h,w}const u=d=>{let{x:f,y:h,placement:p,elements:m,onClose:y,nodeId:v,tree:w}=d;return function(S){function T(){clearTimeout(o),y()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||f==null||h==null)return;const{clientX:E,clientY:k}=S,A=[E,k],D=Fn(S),I=S.type==="mouseleave",V=ut(m.floating,D),F=ut(m.domReference,D),R=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=gA(A,R),G=C.width>R.width,P=C.height>R.height,j=(G?R:C).left,Z=(G?R:C).right,re=(P?R:C).top,J=(P?R:C).bottom;if(V&&(s=!0,!I))return;if(F&&(s=!1),F&&!I){s=!0;return}if(I&&je(S.relatedTarget)&&ut(m.floating,S.relatedTarget)||w&&Mr(w.nodesRef.current,v).some(B=>{let{context:W}=B;return W==null?void 0:W.open}))return;if(O==="top"&&h>=R.bottom-1||O==="bottom"&&h<=R.top+1||O==="left"&&f>=R.right-1||O==="right"&&f<=R.left+1)return T();let U=[];switch(O){case"top":U=[[j,R.top+1],[j,C.bottom-1],[Z,C.bottom-1],[Z,R.top+1]];break;case"bottom":U=[[j,C.top+1],[j,R.bottom-1],[Z,R.bottom-1],[Z,C.top+1]];break;case"left":U=[[C.right-1,J],[C.right-1,re],[R.left+1,re],[R.left+1,J]];break;case"right":U=[[R.right-1,J],[R.right-1,re],[C.left+1,re],[C.left+1,J]];break}function N(B){let[W,$]=B;switch(O){case"top":{const Y=[G?W+t/2:M?W+t*4:W-t*4,$+t+1],oe=[G?W-t/2:M?W+t*4:W-t*4,$+t+1],z=[[C.left,M||G?C.bottom-t:C.top],[C.right,M?G?C.bottom-t:C.top:C.bottom-t]];return[Y,oe,...z]}case"bottom":{const Y=[G?W+t/2:M?W+t*4:W-t*4,$-t],oe=[G?W-t/2:M?W+t*4:W-t*4,$-t],z=[[C.left,M||G?C.top+t:C.bottom],[C.right,M?G?C.top+t:C.bottom:C.top+t]];return[Y,oe,...z]}case"left":{const Y=[W+t+1,P?$+t/2:L?$+t*4:$-t*4],oe=[W+t+1,P?$-t/2:L?$+t*4:$-t*4];return[...[[L||P?C.right-t:C.left,C.top],[L?P?C.right-t:C.left:C.right-t,C.bottom]],Y,oe]}case"right":{const Y=[W-t,P?$+t/2:L?$+t*4:$-t*4],oe=[W-t,P?$-t/2:L?$+t*4:$-t*4],z=[[L||P?C.left+t:C.right,C.top],[L?P?C.left+t:C.right:C.left+t,C.bottom]];return[Y,oe,...z]}}}if(!cv([E,k],U)){if(s&&!H)return T();if(!I&&r){const B=c(S.clientX,S.clientY);if(B!==null&&B<.1)return T()}cv([E,k],N([f,h]))?!s&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const uv=({children:e,as:t,title:n,...r})=>{const[o,s]=b.useState(!1),i=b.useRef(null),a=t||"span",{refs:l,floatingStyles:c,context:u}=Ms({open:o,onOpenChange:s,whileElementsMounted:Qi,transform:!0,middleware:[ta(5),uu({fallbackAxisSideDirection:"start"}),cu(),ky({element:i,padding:5})]}),d=By(u,{move:!0}),f=cA(u),h=Ds(u),p=Fs(u,{role:"tooltip"}),{getReferenceProps:m,getFloatingProps:y}=Ns([d,f,h,p]);return x.jsxs(b.Fragment,{children:[x.jsx(a,{ref:l.setReference,...m(r),children:n}),x.jsx(As,{children:o&&x.jsxs(eo,{...y(),ref:l.setFloating,style:c,className:"bg-tooltip-background z-tooltip text-tooltip-foreground border border-tooltip-border p-3 rounded-lg",children:[x.jsx(Ly,{ref:i,context:u,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})},dv=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>x.jsxs("div",{className:pt("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:x.jsxs("span",{className:"flex items-center gap-1 group-hover:text-primary group-focus-within:text-primary transition-colors group-error:text-danger",children:[s,e||r?x.jsxs("span",{className:"flex gap-1 items-center justify-center",children:[r?x.jsx(uv,{title:x.jsxs("span",{children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(B1,{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(nh,{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($1,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),o]}),ua=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:s,right:i,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:h,title:p,placeholder:m,hideLeft:y,required:v})=>{const w=d??h,g=tn(),S=e??g.inputOptionalLabel;return x.jsxs("fieldset",{form:u,"data-error":!!c,"data-interactive":!!s,className:pt("group inline-flex gap-1.5 w-full",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-error:text-danger group-hover:border-primary",children:[!y&&!n?x.jsx(dv,{info:a,hideLeft:y,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:`relative group 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}`,children:[t?x.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,i?x.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:i}):null]})]}),x.jsx("p",{className:"group-error:block empty:hidden group-error:text-danger hidden text-xs group-has-[input:not(:focus):invalid[data-initialized=true]]:block",children:c}),x.jsx("p",{className:"text-xs group-assert:block group-error:hidden empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block",children:o})]})},dr=b.forwardRef(({required:e=!0,options:t,selectContainer:n="",feedback:r=null,labelClassName:o,interactive:s,rightLabel:i,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,...h},p)=>{const m=tn(),y=b.useRef(null),v=h.id??h.name;return b.useEffect(()=>{if(y.current===null)return;const w=y.current,g=()=>w.setAttribute("data-initialized","true"),S=()=>w.setAttribute("data-selected","true");return w.addEventListener("focus",g),w.addEventListener("change",S),()=>{w.removeEventListener("focus",g),w.removeEventListener("change",S)}},[]),x.jsx(ua,{container:pt("group inline-block w-full",l),error:f,feedback:r,hideLeft:c,left:d,optionalText:a,rightLabel:i,interactive:s,form:h.form,id:h.name||h.id,name:h.name,labelClassName:o,title:h.title,placeholder:h.placeholder,required:e,right:x.jsxs("button",{type:"button",className:"hover:text-primary transition-colors",children:[x.jsx(th,{size:20}),x.jsx("span",{className:"sr-only",children:m.inputCaretDown})]}),children:x.jsxs("select",{...h,ref:Cl(p,y),id:v,name:v,required:e,"data-selected":!!h.value||!1,className:pt("input bg-transparent text-foreground select group h-11 w-full flex-1 rounded-md p-2 placeholder-input-placeholder outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",h.className),children:[x.jsx("option",{value:"",hidden:!0,disabled:!0,children:h.placeholder}),t.map(w=>x.jsx("option",{...w,children:w.label??w.value},`${v}-select-option-${w.value}`))]})})}),fv=b.createContext(""),vA=e=>{const[t,n]=ey(e.active),r=ho(0),o=ho(0),s=b.useRef(null),i=e.useHash?"a":"button";b.useEffect(()=>{const c=s.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(fv.Provider,{value:t,children:x.jsx(Jg,{className:e.className,container:"pt-0",header:x.jsxs("header",{ref:s,className:"border-b border-card-border relative mb-2",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:"w-28 h-0.5 bg-primary absolute bottom-0 duration-300 transition-all hidden lg:block"}),x.jsxs("nav",{children:[x.jsx(dr,{onChange:c=>n(c.target.value),value:t,hideLeft:!0,container:"container rounded mt-4 lg:mt-0 min-w-full lg:hidden inline-flex px-6 w-full mx-auto",labelClassName:"border-transparent rounded-none",rightLabel:null,options:a.map(c=>{const u=c.props;return{value:u.id,label:u.label??u.title}})}),x.jsx("ul",{className:"hidden lg:flex divide-x divide-card-border overflow-x-auto justify-between md:justify-start",children:a.map(c=>{const u=c.props;return x.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"data-[active=true]:text-primary w-full md:w-auto",children:x.jsx(i,{"data-id":u.id,onClick:l,"aria-current":"page",className:"px-10 py-4 block font-medium w-full whitespace-nowrap",href:e.useHash?`#${u.id}`:void 0,children:u.title})},`tab-header-${u.id}`)})})]})]}),children:e.children})})},bA=()=>b.useContext(fv),wA=e=>{const t=bA();return x.jsx(b.Fragment,{children:e.id===t?e.children:null})},Ao=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),s=b.useMemo(()=>[ta(10),uu({fallbackAxisSideDirection:"end"}),cu(),ky({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=Ms({open:n,middleware:s,transform:!0,whileElementsMounted:Qi,onOpenChange:(p,m)=>{var v;const y=m==null?void 0:m.relatedTarget;y&&y.dataset.floating==="true"&&!p||(r(p),(v=e.onChange)==null||v.call(e,p))}}),c=vu(l),u=Ds(l),d=Fs(l),{getReferenceProps:f,getFloatingProps:h}=Ns([c,u,d]);return x.jsxs(b.Fragment,{children:[x.jsx("button",{ref:i.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(As,{id:`${t}-portal`,children:x.jsx(la,{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:i.setFloating,style:a,"aria-labelledby":t,...h(),children:[x.jsx(Ly,{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]})})})]})};function xA(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function TA(...e){return t=>e.forEach(n=>xA(n,t))}var hv=_.forwardRef((e,t)=>{const{children:n,...r}=e,o=_.Children.toArray(n),s=o.find(EA);if(s){const i=s.props.children,a=o.map(l=>l===s?_.Children.count(i)>1?_.Children.only(null):_.isValidElement(i)?i.props.children:null:l);return x.jsx(xu,{...r,ref:t,children:_.isValidElement(i)?_.cloneElement(i,void 0,a):null})}return x.jsx(xu,{...r,ref:t,children:n})});hv.displayName="Slot";var xu=_.forwardRef((e,t)=>{const{children:n,...r}=e;if(_.isValidElement(n)){const o=PA(n);return _.cloneElement(n,{...CA(r,n.props),ref:t?TA(t,o):o})}return _.Children.count(n)>1?_.Children.only(null):null});xu.displayName="SlotClone";var SA=({children:e})=>x.jsx(x.Fragment,{children:e});function EA(e){return _.isValidElement(e)&&e.type===SA}function CA(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function PA(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const da=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),pv=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),mv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},gv=(e,t)=>{const n=pv(t,mv.basic,e)||pv(t,mv.extend,e);return n===void 0||n===e?void 0:n},fa=()=>typeof window>"u",Tu=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),kA=(e,t)=>fa()?t:window.matchMedia(e).matches,OA=(e,t=!0)=>{const[n,r]=b.useState(t);return b.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(kA(e,t));return s(),o.addListener?(o.addListener(s),()=>o.removeListener?o.removeListener(s):void 0):(o.addEventListener("change",s),()=>o.removeEventListener("change",s))},[e]),n},Ln="600ms",yv=e=>({initial:{[e]:"-60%",opacity:.8,animationDuration:Ln},enter:{[e]:0,opacity:1,animationDuration:Ln},exit:{[e]:["-50%","-90%"],opacity:0,animationDuration:Ln}}),IA=yv("left"),_A=yv("right"),vv={drawer:e=>e==="left"?IA:_A,sheet:{initial:{opacity:0,scaleY:.95,animationDuration:Ln,originY:"bottom"},enter:{opacity:1,scaleY:1,animationDuration:Ln,originY:"bottom"},exit:{opacity:0,scaleY:.8,animationDuration:Ln,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:Ln},enter:{opacity:1,scale:[1.05,1],animationDuration:Ln},exit:{opacity:0,scale:.97,animationDuration:Ln}}},AA=si("isolate 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%] w-auto h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] container h-[inherit] rounded-lg py-8",sheet:"w-full absolute bottom-0 max-h-[calc(100lvh-10%)] 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"}}),DA={top:0,left:0,right:0,bottom:0},MA=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.type==="right"?-r.delta.x:r.delta.x;e.value.set(Math.abs(u+d))}const s=e.parent.current.getBoundingClientRect(),i=e.value.get()||s.height,a=Math.abs(i-r.delta.y),l=window.outerHeight*.68;return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight*.9),350)):e.value.set(a)}};return x.jsx(Ht.div,{drag:"x",dragElastic:0,dragMomentum:!1,onDrag:t,dragConstraints:DA,whileDrag:{cursor:"grabbing"},className:pt("absolute rounded-lg cursor-grab bg-floating-border",e.sheet?"left-1/2 top-2 w-16 h-2":e.type==="left"?"top-1/2 right-5 h-10 w-2":"top-1/2 left-2 h-10 w-2")})},bv={drawer:"right",sheet:"none",dialog:"none"},NA=({type:e="dialog",resizer:t=!0,...n})=>{const r=b.useId(),o=b.useId(),s=OA("(min-width: 48rem)"),i=e==="drawer"||!s,a=s?bv[e]:bv.sheet,l=s?vv[e]:vv.sheet,c=typeof l=="function"?l(a):l,u=s?e:"sheet",{refs:d,context:f}=Ms({open:n.open,onOpenChange:n.onChange}),h=vu(f),p=Fs(f),m=Ds(f,{escapeKey:!0,referencePress:!0,outsidePress:!1}),{getReferenceProps:y,getFloatingProps:v}=Ns([h,p,m]),w=n.trigger,g=ho(void 0);return x.jsxs(b.Fragment,{children:[n.trigger?x.jsx(b.Fragment,{children:n.asChild?x.jsx(hv,{ref:d.setReference,...y(),children:w}):x.jsx("button",{ref:d.setReference,...y(),type:"button",children:w})}):null,x.jsx(As,{children:x.jsx(Vi,{presenceAffectsLayout:!0,children:n.open&&x.jsx(sA,{lockScroll:!0,className:`relative !overflow-clip h-[100dvh] z-floating bg-floating-overlay/70 ${u==="drawer"?"":"grid justify-center p-8"}`,children:x.jsx(la,{modal:!0,closeOnFocusOut:!0,context:f,children:x.jsxs(Ht.div,{animate:"enter","aria-describedby":o,"aria-labelledby":r,className:AA({position:a,type:u}),exit:"exit",initial:"initial",ref:d.setFloating,variants:c,style:s?{width:g}:{height:g},...v(),children:[i&&t?x.jsx(MA,{onChange:n.onChange,sheet:!s,value:g,parent:d.floating,type:a}):null,n.title||n.closable?x.jsxs("header",{className:"w-full relative",children:[n.title?x.jsx("h2",{className:"px-8 pb-4 border-b border-floating-border text-3xl font-medium leading-relaxed",children:n.title}):null,n.closable!==!1?x.jsx("nav",{className:"absolute -top-1 right-8",children:x.jsx("button",{type:"button",onClick:()=>n.onChange(!1),className:"p-1 transition-colors hover:text-danger focus:text-danger",children:x.jsx(rh,{})})}):null]}):null,x.jsx("div",{className:"flex-1 px-8 overflow-y-auto",children:n.children}),n.footer?x.jsx("footer",{className:"px-8 border-t border-floating-border pt-4 w-full",children:n.footer}):null]})})})})})]})};class ha{static getDescendantProperty(t,n,r=[]){let o,s,i,a,l,c;if(n){if(i=n.indexOf("."),i===-1?o=n:(o=n.slice(0,i),s=n.slice(i+1)),a=t[o],a!==null&&typeof a<"u")if(!s&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)ha.getDescendantProperty(a[l],s,r);else s&&ha.getDescendantProperty(a,s,r)}else r.push(t);return r}}class Do{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const s=Do.isMatch(o,t,this.options.caseSensitive);s&&n.push({item:o,score:s})}else for(let s=0;s<this.keys.length;s++){const i=ha.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=Do.isMatch(i[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Do.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 Do.indexesOfFirstLetter(t,n).forEach((i,a)=>{let l=i+1;o[a]=[i];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(i=>i!==!1),o.length?o.sort((i,a)=>i.length===1?i[0]-a[0]:(i=i[i.length-1]-i[0],a=a[a.length-1]-a[0],i-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,s)=>o!==r?!1:s).filter(o=>o!==!1)}}const wv=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},xv=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>x.jsx("li",{...o,ref:s,role:"option","aria-selected":e,className:"w-full",children:x.jsx("button",{type:"button",onClick:n,"aria-selected":e,className:`p-2 w-full text-left cursor-pointer ${e?"bg-primary text-primary-foreground":""} ${t?"bg-primary-subtle text-primary-foreground":""}`,children:r.label??r.value})})),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:s,optionalText:i,container:a,hideLeft:l=!1,right:c,left:u,error:d,required:f=!1,...h},p)=>{const m=tn(),y=b.useRef(null),[v,w]=b.useState(!1),[g,S]=b.useState(""),[T,E]=b.useState(h.value??h.defaultValue??""),[k,A]=b.useState(h.value??h.defaultValue??""),[D,I]=b.useState(null),V=b.useRef(VA),F=wv(D),R=t&&g!==""?[{value:g,label:g,"data-dynamic":"true"},...e]:e,C=new Do(R,["value","label"],LA).search(g),O=t?void 0:`^(${e.map($=>`${Tu($.value)}${$.label?"|"+Tu($.label):""}`).join("|")})$`;b.useEffect(()=>{if(h.value){E(h.value);const $=e.find(Y=>Y.value===h.value);E(($==null?void 0:$.label)??h.value)}},[h.value]);const{x:M,y:L,strategy:H,refs:G,context:P}=Ms({open:v,transform:!0,onOpenChange:w,whileElementsMounted:Qi,middleware:[ta(4),M_({padding:10,apply($){Object.assign($.elements.floating.style,{width:`${$.rects.reference.width}px`,maxHeight:`${Math.min(480,$.availableHeight)}px`})}})]});b.useImperativeHandle(p,()=>{var $;return($=G.domReference)==null?void 0:$.current},[G]);const j=pA(P,FA),{getReferenceProps:Z,getFloatingProps:re,getItemProps:J}=Ns([Fs(P,{role:"listbox"}),Ds(P),av(P,{listRef:V,loop:!0,activeIndex:D,allowEscape:!0,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:D,virtual:!0,onNavigate:$=>{const Y=C.length-1;if($===null&&F===0)return I(Y);if($===null&&F===Y)return I(0);const oe=$??F??null;return oe===null?void 0:I(oe)}})]),U=$=>{var oe;E($.value),A($.label??"");const Y=Pl(y.current,$.value);Y&&((oe=h.onChange)==null||oe.call(h,Y)),w(!1),S("")},N=$=>{var oe;const Y=$.target.value;return S(Y),!v&&Y===""?w(!0):($.target.name=h.name||"",Y?w(!0):(oe=h.onChange)==null?void 0:oe.call(h,$))},B=()=>{w(!0),S("")},W=()=>{S(""),E(""),A(""),Pl(G.reference.current,""),w(!1)};return x.jsxs(ua,{...h,container:pt("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:i,placeholder:h.placeholder,required:f,rightLabel:s,title:h.title,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"link:text-primary transition-colors",children:[x.jsx(th,{size:20}),x.jsx("span",{className:"sr-only",children:m.inputCaretDown})]}),T?x.jsx("button",{type:"button",onClick:W,className:"link:text-danger transition-colors",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",{ref:y,required:f,type:"hidden",name:h.name,defaultValue:h.value||T||void 0}),x.jsx("input",{...Z({...h,onChange:N,onFocus:B,pattern:O,ref:G.setReference,name:void 0,onClick:$=>$.currentTarget.focus(),onKeyDown($){if($.key==="Escape")return $.currentTarget.blur(),w(!1);if($.key==="Enter"){if(D!==null&&C[D])return $.preventDefault(),U(C[D]);if(C.length===1)return $.preventDefault(),U(C[0])}}}),required:f,value:v?g:k||T,"aria-autocomplete":"list",autoComplete:"off",className:pt("input text-foreground text-base group h-11 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",c||g?"pe-12":"",u?"ps-8":"",h.className)}),x.jsx(As,{preserveTabOrder:!0,children:v?x.jsx(la,{guards:!0,returnFocus:!1,context:P,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsx("ul",{...re({ref:G.setFloating,style:{position:H,left:M??0,top:L??0,...j.styles}}),"data-floating":"true",className:"bg-floating-background shadow-floating text-foreground list-none p-0 m-0 rounded-b-lg overflow-auto origin-[top_center] overflow-y-auto z-floating",children:C.map(($,Y)=>b.createElement(xv,{...J({onClick:()=>U($),ref:oe=>void(V.current[Y]=oe),selected:D===Y,active:T===$.value}),key:`${$.value}-option`,option:$,selected:D===Y,active:T===$.value}))})}):null})]})}),Tv=({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:"checkbox",className:pt("form-checkbox size-4 rounded 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]}),Ls=b.forwardRef(({type:e="text",feedback:t=null,info:n,labelClassName:r,next:o,interactive:s,rightLabel:i,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,...h},p)=>{const m=h.id??h.name,y=b.useRef(null);return b.useEffect(()=>{if(y.current===null)return;const v=y.current,w=()=>v.setAttribute("data-initialized","true"),g=S=>{const T=S;if(T.key==="Enter"&&v.enterKeyHint==="next"){const E=v.getAttribute("data-next");if(E){const k=document.getElementById(E);if(k)return k.focus(),void T.preventDefault()}}};return v.addEventListener("keydown",g),v.addEventListener("focus",w),()=>{v.removeEventListener("keydown",g),v.removeEventListener("focus",w)}},[]),x.jsx(ua,{info:n,container:pt("group inline-block w-full",l),error:f,feedback:t,hideLeft:c,left:d,optionalText:a,right:u,rightLabel:i,interactive:s,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(Ng,{...h,type:e,"data-next":o,ref:Cl(p,y),id:m,name:m,className:pt("input text-foreground group h-11 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",u?"pe-4":"",d?"ps-4":"",h.className)})})}),Sv=new Date(1970,11,31),Su={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Ev={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},RA={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")},jA=({date:e,locale:t,disabledDate:n,autoFocusToday:r,onChange:o,markToday:s,...i})=>{const a=b.useId(),l=tn(),c=b.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[u,d]=b.useState(e||void 0),[f,h]=b.useState(!1),p=c.formatToParts(Sv).flatMap(S=>Pn.keyof(Su,S.type)?Su[S.type](S.value):[]),m=c.formatToParts(Sv).reduce((S,T)=>S+(Pn.keyof(Ev,T.type)?Ev[T.type](T.value):""),""),[y,v]=b.useState(u?c.formatToParts(u).reduce((S,T)=>S+(Pn.keyof(Su,T.type)?RA[T.type](u,T.value):""),""):""),w=S=>{const T=S.target.value;if(v(T),p.length===T.length&&p.every((k,A)=>{const D=T.charAt(A);return typeof k=="string"?D===k:k.test(D)})){const k=go(NO(T,m,new Date));d(k),o==null||o(k)}},g=S=>{d(S),o==null||o(S),v(Vk(S,m))};return x.jsx(Ls,{...i,mask:p,value:y,onChange:w,className:"uppercase",formNoValidate:!f,placeholder:m,required:i.required??!0,error:f?void 0:i.error,name:i.name?`${i.name}-picker`:i.name,right:x.jsxs(b.Fragment,{children:[x.jsx("input",{defaultValue:u==null?void 0:u.toISOString(),hidden:!0,type:"date",name:i.name}),x.jsx(Ao,{open:f,restoreFocus:!0,onChange:h,trigger:x.jsxs("span",{"aria-labelledby":a,children:[x.jsx("span",{id:a,className:"sr-only",children:l.datePickerCalendarButtonLabel}),x.jsx(F1,{})]}),buttonProps:{"aria-describedby":a},children:x.jsx(Qg,{...i,locale:t,date:u,onChange:g,markToday:s,disabledDate:n,autoFocusToday:r})})]})})},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"],Cv=(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 Pv(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,s=o?"-":t.signed?"+":"";o&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){const u=Cv(e,t.locale,i);return s+u+r+n[0]}const a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**a,i||(e=e.toPrecision(3));const l=Cv(Number(e),t.locale,i),c=n[a];return s+l+r+c}var Eu={exports:{}},pa={exports:{}},Fe={};/** @license React v16.13.1
|
|
168
173
|
* react-is.production.min.js
|
|
169
174
|
*
|
|
170
175
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
171
176
|
*
|
|
172
177
|
* This source code is licensed under the MIT license found in the
|
|
173
178
|
* LICENSE file in the root directory of this source tree.
|
|
174
|
-
*/var
|
|
179
|
+
*/var kv;function UA(){if(kv)return Fe;kv=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,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,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,w=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 s:case o:case d:return T;default:switch(T=T&&T.$$typeof,T){case a:case u:case p:case h:case i:return T;default:return E}}case n:return E}}}function S(T){return g(T)===c}return Fe.AsyncMode=l,Fe.ConcurrentMode=c,Fe.ContextConsumer=a,Fe.ContextProvider=i,Fe.Element=t,Fe.ForwardRef=u,Fe.Fragment=r,Fe.Lazy=p,Fe.Memo=h,Fe.Portal=n,Fe.Profiler=s,Fe.StrictMode=o,Fe.Suspense=d,Fe.isAsyncMode=function(T){return S(T)||g(T)===l},Fe.isConcurrentMode=S,Fe.isContextConsumer=function(T){return g(T)===a},Fe.isContextProvider=function(T){return g(T)===i},Fe.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Fe.isForwardRef=function(T){return g(T)===u},Fe.isFragment=function(T){return g(T)===r},Fe.isLazy=function(T){return g(T)===p},Fe.isMemo=function(T){return g(T)===h},Fe.isPortal=function(T){return g(T)===n},Fe.isProfiler=function(T){return g(T)===s},Fe.isStrictMode=function(T){return g(T)===o},Fe.isSuspense=function(T){return g(T)===d},Fe.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===s||T===o||T===d||T===f||typeof T=="object"&&T!==null&&(T.$$typeof===p||T.$$typeof===h||T.$$typeof===i||T.$$typeof===a||T.$$typeof===u||T.$$typeof===y||T.$$typeof===v||T.$$typeof===w||T.$$typeof===m)},Fe.typeOf=g,Fe}var Le={};/** @license React v16.13.1
|
|
175
180
|
* react-is.development.js
|
|
176
181
|
*
|
|
177
182
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
178
183
|
*
|
|
179
184
|
* This source code is licensed under the MIT license found in the
|
|
180
185
|
* LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/var
|
|
186
|
+
*/var Ov;function GA(){return Ov||(Ov=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function g(z){return typeof z=="string"||typeof z=="function"||z===r||z===c||z===s||z===o||z===d||z===f||typeof z=="object"&&z!==null&&(z.$$typeof===p||z.$$typeof===h||z.$$typeof===i||z.$$typeof===a||z.$$typeof===u||z.$$typeof===y||z.$$typeof===v||z.$$typeof===w||z.$$typeof===m)}function S(z){if(typeof z=="object"&&z!==null){var Ne=z.$$typeof;switch(Ne){case t:var rt=z.type;switch(rt){case l:case c:case r:case s:case o:case d:return rt;default:var He=rt&&rt.$$typeof;switch(He){case a:case u:case p:case h:case i:return He;default:return Ne}}case n:return Ne}}}var T=l,E=c,k=a,A=i,D=t,I=u,V=r,F=p,R=h,C=n,O=s,M=o,L=d,H=!1;function G(z){return H||(H=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(z)||S(z)===l}function P(z){return S(z)===c}function j(z){return S(z)===a}function Z(z){return S(z)===i}function re(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function J(z){return S(z)===u}function U(z){return S(z)===r}function N(z){return S(z)===p}function B(z){return S(z)===h}function W(z){return S(z)===n}function $(z){return S(z)===s}function Y(z){return S(z)===o}function oe(z){return S(z)===d}Le.AsyncMode=T,Le.ConcurrentMode=E,Le.ContextConsumer=k,Le.ContextProvider=A,Le.Element=D,Le.ForwardRef=I,Le.Fragment=V,Le.Lazy=F,Le.Memo=R,Le.Portal=C,Le.Profiler=O,Le.StrictMode=M,Le.Suspense=L,Le.isAsyncMode=G,Le.isConcurrentMode=P,Le.isContextConsumer=j,Le.isContextProvider=Z,Le.isElement=re,Le.isForwardRef=J,Le.isFragment=U,Le.isLazy=N,Le.isMemo=B,Le.isPortal=W,Le.isProfiler=$,Le.isStrictMode=Y,Le.isSuspense=oe,Le.isValidElementType=g,Le.typeOf=S}()),Le}var Iv;function _v(){return Iv||(Iv=1,process.env.NODE_ENV==="production"?pa.exports=UA():pa.exports=GA()),pa.exports}/*
|
|
182
187
|
object-assign
|
|
183
188
|
(c) Sindre Sorhus
|
|
184
189
|
@license MIT
|
|
185
|
-
*/var
|
|
186
|
-
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var
|
|
187
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
188
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
189
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
190
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $v(e,t){if(e){if(typeof e=="string")return _u(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 _u(e,t)}}function _u(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 bD(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function wD(e){if(Array.isArray(e))return e}function Rv(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 Qe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rv(Object(n),!0).forEach(function(r){Au(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Au(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ha(e,t){if(e==null)return{};var n=xD(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xD(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Iu=w.forwardRef(function(e,t){var n=e.children,r=ha(e,uD),o=Bv(r),s=o.open,i=ha(o,dD);return w.useImperativeHandle(t,function(){return{open:s}},[s]),w.createElement(w.Fragment,null,n(Qe(Qe({},i),{},{open:s})))});Iu.displayName="Dropzone";var jv={disabled:!1,getFilesFromEvent:MI,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};Iu.defaultProps=jv,Iu.propTypes={children:Be.func,accept:Be.objectOf(Be.arrayOf(Be.string)),multiple:Be.bool,preventDropOnDocument:Be.bool,noClick:Be.bool,noKeyboard:Be.bool,noDrag:Be.bool,noDragEventsBubbling:Be.bool,minSize:Be.number,maxSize:Be.number,maxFiles:Be.number,disabled:Be.bool,getFilesFromEvent:Be.func,onFileDialogCancel:Be.func,onFileDialogOpen:Be.func,useFsAccessApi:Be.bool,autoFocus:Be.bool,onDragEnter:Be.func,onDragLeave:Be.func,onDragOver:Be.func,onDrop:Be.func,onDropAccepted:Be.func,onDropRejected:Be.func,onError:Be.func,validator:Be.func};var Du={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Bv(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Qe(Qe({},jv),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,y=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,g=t.preventDropOnDocument,T=t.noClick,S=t.noKeyboard,E=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,N=w.useMemo(function(){return aD(n)},[n]),L=w.useMemo(function(){return iD(n)},[n]),O=w.useMemo(function(){return typeof y=="function"?y:zv},[y]),j=w.useMemo(function(){return typeof m=="function"?m:zv},[m]),D=w.useRef(null),_=w.useRef(null),F=w.useReducer(SD,Du),$=Ou(F,2),z=$[0],q=$[1],P=z.isFocused,V=z.isFileDialogActive,Q=w.useRef(typeof window<"u"&&window.isSecureContext&&v&&sD()),ie=function(){!Q.current&&V&&setTimeout(function(){if(_.current){var se=_.current.files;se.length||(q({type:"closeDialog"}),j())}},300)};w.useEffect(function(){return window.addEventListener("focus",ie,!1),function(){window.removeEventListener("focus",ie,!1)}},[_,V,j,Q]);var ee=w.useRef([]),H=function(se){D.current&&D.current.contains(se.target)||(se.preventDefault(),ee.current=[])};w.useEffect(function(){return g&&(document.addEventListener("dragover",Fv,!1),document.addEventListener("drop",H,!1)),function(){g&&(document.removeEventListener("dragover",Fv),document.removeEventListener("drop",H))}},[D,g]),w.useEffect(function(){return!r&&b&&D.current&&D.current.focus(),function(){}},[D,b,r]);var A=w.useCallback(function(X){k?k(X):console.error(X)},[k]),R=w.useCallback(function(X){X.preventDefault(),X.persist(),ke(X),ee.current=[].concat(pD(ee.current),[X.target]),fa(X)&&Promise.resolve(o(X)).then(function(se){if(!(da(X)&&!C)){var _e=se.length,Ke=_e>0&&tD({files:se,accept:N,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:I}),Tt=_e>0&&!Ke;q({isDragAccept:Ke,isDragReject:Tt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(X)}}).catch(function(se){return A(se)})},[o,c,A,C,N,i,s,a,l,I]),W=w.useCallback(function(X){X.preventDefault(),X.persist(),ke(X);var se=fa(X);if(se&&X.dataTransfer)try{X.dataTransfer.dropEffect="copy"}catch{}return se&&d&&d(X),!1},[d,C]),Y=w.useCallback(function(X){X.preventDefault(),X.persist(),ke(X);var se=ee.current.filter(function(Ke){return D.current&&D.current.contains(Ke)}),_e=se.indexOf(X.target);_e!==-1&&se.splice(_e,1),ee.current=se,!(se.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),fa(X)&&u&&u(X))},[D,u,C]),Z=w.useCallback(function(X,se){var _e=[],Ke=[];X.forEach(function(Tt){var It=Mv(Tt,N),Vt=Ou(It,2),jr=Vt[0],Ho=Vt[1],Uo=Nv(Tt,i,s),Ya=Ou(Uo,2),Nd=Ya[0],Fd=Ya[1],Ld=I?I(Tt):null;if(jr&&Nd&&!Ld)_e.push(Tt);else{var Vd=[Ho,Fd];Ld&&(Vd=Vd.concat(Ld)),Ke.push({file:Tt,errors:Vd.filter(function(yL){return yL})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(Tt){Ke.push({file:Tt,errors:[eD]})}),_e.splice(0)),q({acceptedFiles:_e,fileRejections:Ke,type:"setFiles"}),f&&f(_e,Ke,se),Ke.length>0&&p&&p(Ke,se),_e.length>0&&h&&h(_e,se)},[q,a,N,i,s,l,f,h,p,I]),fe=w.useCallback(function(X){X.preventDefault(),X.persist(),ke(X),ee.current=[],fa(X)&&Promise.resolve(o(X)).then(function(se){da(X)&&!C||Z(se,X)}).catch(function(se){return A(se)}),q({type:"reset"})},[o,Z,A,C]),B=w.useCallback(function(){if(Q.current){q({type:"openDialog"}),O();var X={multiple:a,types:L};window.showOpenFilePicker(X).then(function(se){return o(se)}).then(function(se){Z(se,null),q({type:"closeDialog"})}).catch(function(se){lD(se)?(j(se),q({type:"closeDialog"})):cD(se)?(Q.current=!1,_.current?(_.current.value=null,_.current.click()):A(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."))):A(se)});return}_.current&&(q({type:"openDialog"}),O(),_.current.value=null,_.current.click())},[q,O,j,v,Z,A,L,a]),Me=w.useCallback(function(X){!D.current||!D.current.isEqualNode(X.target)||(X.key===" "||X.key==="Enter"||X.keyCode===32||X.keyCode===13)&&(X.preventDefault(),B())},[D,B]),rt=w.useCallback(function(){q({type:"focus"})},[]),He=w.useCallback(function(){q({type:"blur"})},[]),ot=w.useCallback(function(){T||(oD()?setTimeout(B,0):B())},[T,B]),ue=function(se){return r?null:se},Ee=function(se){return S?null:ue(se)},le=function(se){return E?null:ue(se)},ke=function(se){C&&se.stopPropagation()},ut=w.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=X.refKey,_e=se===void 0?"ref":se,Ke=X.role,Tt=X.onKeyDown,It=X.onFocus,Vt=X.onBlur,jr=X.onClick,Ho=X.onDragEnter,Uo=X.onDragOver,Ya=X.onDragLeave,Nd=X.onDrop,Fd=ha(X,fD);return Qe(Qe(Au({onKeyDown:Ee(yn(Tt,Me)),onFocus:Ee(yn(It,rt)),onBlur:Ee(yn(Vt,He)),onClick:ue(yn(jr,ot)),onDragEnter:le(yn(Ho,R)),onDragOver:le(yn(Uo,W)),onDragLeave:le(yn(Ya,Y)),onDrop:le(yn(Nd,fe)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},_e,D),!r&&!S?{tabIndex:0}:{}),Fd)}},[D,Me,rt,He,ot,R,W,Y,fe,S,E,r]),Oe=w.useCallback(function(X){X.stopPropagation()},[]),ft=w.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=X.refKey,_e=se===void 0?"ref":se,Ke=X.onChange,Tt=X.onClick,It=ha(X,hD),Vt=Au({accept:N,multiple:a,type:"file",style:{display:"none"},onChange:ue(yn(Ke,fe)),onClick:ue(yn(Tt,Oe)),tabIndex:-1},_e,_);return Qe(Qe({},Vt),It)}},[_,n,a,fe,r]);return Qe(Qe({},z),{},{isFocused:P&&!r,getRootProps:ut,getInputProps:ft,rootRef:D,inputRef:_,open:ue(B)})}function SD(e,t){switch(t.type){case"focus":return Qe(Qe({},e),{},{isFocused:!0});case"blur":return Qe(Qe({},e),{},{isFocused:!1});case"openDialog":return Qe(Qe({},Du),{},{isFileDialogActive:!0});case"closeDialog":return Qe(Qe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Qe(Qe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Qe(Qe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Qe({},Du);default:return e}}function zv(){}const TD={isImage:e=>e.type.includes("image")},ED=e=>{const[t,n]=w.useState({url:"",type:"",size:""});return w.useEffect(()=>{if(TD.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:lv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:lv(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(Jo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Xr,{})})]}):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(S1,{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(Jo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Xr,{className:"text-danger"})})]})},CD=e=>x.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>x.jsx(ED,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),PD=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(CD,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(w.Fragment,{children:e.idle}),kD=x.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[x.jsx(k1,{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"})]})]}),OD=({idle:e=kD,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=w.useState([]),i=d=>{n==null||n(d),s(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=Bv({onDrop:i});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(PD,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},_D=["INPUT","SELECT"],Wv=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{_D.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},AD=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})},ID=({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:Ct("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]}),Ir=w.forwardRef(({container:e,required:t=!0,options:n,...r},o)=>{const s=w.useRef(null),i=r.id??r.name;return w.useEffect(()=>{if(s.current===null)return;const a=s.current,l=()=>a.setAttribute("data-initialized","true"),c=()=>a.setAttribute("data-selected","true");return a.addEventListener("focus",l),a.addEventListener("change",c),()=>{a.removeEventListener("focus",l),a.removeEventListener("change",c)}},[]),x.jsx(la,{...r,required:t,container:Ct("group inline-block w-full",e),right:x.jsx(qf,{size:20}),children:x.jsxs("select",{...r,ref:xl(o,s),id:i,name:i,required:t,"data-selected":!!r.value||!1,className:Ct("input bg-transparent text-foreground select group h-10 w-full flex-1 rounded-md p-2 placeholder-input-placeholder outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",r.className),children:[x.jsx("option",{value:"",hidden:!0,disabled:!0,children:r.placeholder}),n.map(a=>x.jsx("option",{...a,children:a.label??a.value},`${i}-select-option-${a.value}`))]})})}),DD=({children:e,...t})=>{const n=w.useId(),[r,o]=w.useState(!1),s=t.checked??r,i=a=>{var u;const c=a.target.dataset.checked!=="true";o(c),(u=t==null?void 0:t.onCheck)==null||u.call(t,c)};return x.jsxs("div",{className:"flex items-center",children:[x.jsx("input",{...t,hidden:!0,type:"checkbox",checked:s,onChange:a=>o(a.target.checked)}),x.jsx("button",{type:"button",role:"switch",onClick:i,"aria-checked":s,"data-checked":s,"aria-labelledby":`${n}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary transition-colors ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:x.jsx("span",{"aria-hidden":"true","data-checked":s,className:"data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch inline-block size-5 aspect-square data-[checked=false]translate-x-0 data-[checked=true]:translate-x-5 transform rounded-full shadow ring-0 transition ease-in-out"})}),x.jsx("span",{className:"ml-3 text-sm",id:`${n}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})})]})},pa=0,lr=1,Do=2,Hv=4;function Ms(e,t){return n=>e(t(n))}function MD(e,t){return t(e)}function Uv(e,t){return n=>e(t,n)}function Gv(e,t){return()=>e(t)}function ma(e,t){return t(e),e}function Ye(...e){return e}function ND(e){e()}function Yv(e){return()=>e}function FD(...e){return()=>{e.map(ND)}}function Mu(e){return e!==void 0}function Dr(){}function Ve(e,t){return e(lr,t)}function be(e,t){e(pa,t)}function Nu(e){e(Do)}function _t(e){return e(Hv)}function ce(e,t){return Ve(e,Uv(t,pa))}function vn(e,t){const n=e(lr,r=>{n(),t(r)});return n}function Ce(){const e=[];return(t,n)=>{switch(t){case Do:e.splice(0,e.length);return;case lr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case pa:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function K(e){let t=e;const n=Ce();return(r,o)=>{switch(r){case lr:o(t);break;case pa:t=o;break;case Hv:return t}return n(r,o)}}function LD(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case lr:return s?n===s?void 0:(r(),n=s,t=Ve(e,s),t):(r(),Dr);case Do:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function qt(e){return ma(Ce(),t=>ce(e,t))}function At(e,t){return ma(K(t),n=>ce(e,n))}function VD(...e){return t=>e.reduceRight(MD,t)}function U(e,...t){const n=VD(...t);return(r,o)=>{switch(r){case lr:return Ve(e,n(o));case Do:Nu(e);return}}}function qv(e,t){return e===t}function qe(e=qv){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function pe(e){return t=>n=>{e(n)&&t(n)}}function oe(e){return t=>Ms(t,e)}function bn(e){return t=>()=>t(e)}function wn(e,t){return n=>r=>n(t=e(t,r))}function Mo(e){return t=>n=>{e>0?e--:t(n)}}function cr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Kv(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((s,i)=>{const a=Math.pow(2,i);Ve(s,l=>{const c=n;n=n|a,t[i]=l,c!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const a=()=>s([i].concat(t));n===o?a():r=a}}function Zv(...e){return function(t,n){switch(t){case lr:return FD(...e.map(r=>Ve(r,n)));case Do:return;default:throw new Error(`unrecognized action ${t}`)}}}function ge(e,t=qv){return U(e,qe(t))}function vt(...e){const t=Ce(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Ve(s,l=>{n[i]=l,r=r|a,r===o&&be(t,n)})}),function(s,i){switch(s){case lr:return r===o&&i(n),Ve(t,i);case Do:return Nu(t);default:throw new Error(`unrecognized action ${s}`)}}}function De(e,t=[],{singleton:n}={singleton:!0}){return{id:$D(),constructor:e,dependencies:t,singleton:n}}const $D=()=>Symbol();function RD(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const a=o(s.map(l=>n(l)));return i&&t.set(r,a),a};return n(e)}function jD(e,t){const n={},r={};let o=0;const s=e.length;for(;o<s;)r[e[o]]=1,o+=1;for(const i in t)r.hasOwnProperty(i)||(n[i]=t[i]);return n}const ga=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Fu(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),i=Object.keys(t.events||{}),a=w.createContext({});function l(v,b){v.propsReady&&be(v.propsReady,!1);for(const g of r){const T=v[t.required[g]];be(T,b[g])}for(const g of o)if(g in b){const T=v[t.optional[g]];be(T,b[g])}v.propsReady&&be(v.propsReady,!0)}function c(v){return s.reduce((b,g)=>(b[g]=T=>{const S=v[t.methods[g]];be(S,T)},b),{})}function u(v){return i.reduce((b,g)=>(b[g]=LD(v[t.events[g]]),b),{})}const d=w.forwardRef((v,b)=>{const{children:g,...T}=v,[S]=w.useState(()=>ma(RD(e),C=>l(C,T))),[E]=w.useState(Gv(u,S));return ga(()=>{for(const C of i)C in T&&Ve(E[C],T[C]);return()=>{Object.values(E).map(Nu)}},[T,E,S]),ga(()=>{l(S,T)}),w.useImperativeHandle(b,Yv(c(S))),w.createElement(a.Provider,{value:S},n?w.createElement(n,jD([...r,...o,...i],T),g):g)}),f=v=>w.useCallback(Uv(be,w.useContext(a)[v]),[v]),h=v=>{const g=w.useContext(a)[v],T=w.useCallback(S=>Ve(g,S),[g]);return w.useSyncExternalStore(T,()=>_t(g),()=>_t(g))},p=v=>{const g=w.useContext(a)[v],[T,S]=w.useState(Gv(_t,g));return ga(()=>Ve(g,E=>{E!==T&&S(Yv(E))}),[g,T]),T},m=w.version.startsWith("18")?h:p;return{Component:d,usePublisher:f,useEmitterValue:m,useEmitter:(v,b)=>{const T=w.useContext(a)[v];ga(()=>Ve(T,b),[b,T])}}}const BD=typeof document<"u"?w.useLayoutEffect:w.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 zD={0:"debug",1:"log",2:"warn",3:"error"},WD=()=>typeof globalThis>"u"?window:globalThis,ur=De(()=>{const e=K(3);return{log:K((n,r,o=1)=>{var s;const i=(s=WD().VIRTUOSO_LOG_LEVEL)!=null?s:_t(e);o>=i&&console[zD[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Lu(e,t=!0){const n=w.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=w.useMemo(()=>new ResizeObserver(s=>{requestAnimationFrame(()=>{const i=s[0].target;i.offsetParent!==null&&e(i)})}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function xn(e,t=!0){return Lu(e,t).callbackRef}function Xv(e,t,n,r,o,s,i){const a=w.useCallback(l=>{const c=HD(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",f=i?i.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=i?i.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:p}),s==null||s(UD("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return Lu(a,n)}function HD(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i<o;i++){const a=e.item(i);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Kt.ERROR),u===c)continue;const d=s[s.length-1];s.length===0||d.size!==u||d.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function UD(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 rn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Qv(e,t){return Math.abs(e-t)<1.01}function Jv(e,t,n,r=Dr,o){const s=w.useRef(null),i=w.useRef(null),a=w.useRef(null),l=w.useCallback(d=>{const f=d.target,h=f===window||f===document,p=h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,m=h?document.documentElement.scrollHeight:f.scrollHeight,y=h?window.innerHeight:f.offsetHeight,v=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:y})};d.suppressFlushSync?v():Rd.flushSync(v),i.current!==null&&(p===i.current||p<=0||p===m-y)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);w.useEffect(()=>{const d=o||s.current;return r(o||s.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(d){const f=s.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let p,m,y;f===window?(m=Math.max(rn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,y=document.documentElement.scrollTop):(m=f.scrollHeight,p=rn(f,"height"),y=f.scrollTop);const v=m-p;if(d.top=Math.ceil(Math.max(Math.min(v,d.top),0)),Qv(p,m)||d.top===y){e({scrollTop:y,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(i.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,f.scrollTo(d)}function u(d){s.current.scrollBy(d)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const Nt=De(()=>{const e=Ce(),t=Ce(),n=K(0),r=Ce(),o=K(0),s=Ce(),i=Ce(),a=K(0),l=K(0),c=K(0),u=K(0),d=Ce(),f=Ce(),h=K(!1);return ce(U(e,oe(({scrollTop:p})=>p)),t),ce(U(e,oe(({scrollHeight:p})=>p)),i),ce(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:d,scrollBy:f,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),Ns={lvl:0};function eb(e,t,n,r=Ns,o=Ns){return{k:e,v:t,lvl:n,l:r,r:o}}function ze(e){return e===Ns}function No(){return Ns}function Vu(e,t){if(ze(e))return Ns;const{k:n,l:r,r:o}=e;if(t===n){if(ze(r))return o;if(ze(o))return r;{const[s,i]=tb(r);return ya(ht(e,{k:s,v:i,l:nb(r)}))}}else return t<n?ya(ht(e,{l:Vu(r,t)})):ya(ht(e,{r:Vu(o,t)}))}function Fs(e,t){if(!ze(e))return t===e.k?e.v:t<e.k?Fs(e.l,t):Fs(e.r,t)}function on(e,t,n="k"){if(ze(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=on(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return on(e.l,t,n)}function Zt(e,t,n){return ze(e)?eb(t,n,1):t===e.k?ht(e,{k:t,v:n}):t<e.k?rb(ht(e,{l:Zt(e.l,t,n)})):rb(ht(e,{r:Zt(e.r,t,n)}))}function $u(e,t,n){if(ze(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat($u(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat($u(i,t,n))),a}function Mr(e){return ze(e)?[]:[...Mr(e.l),{k:e.k,v:e.v},...Mr(e.r)]}function tb(e){return ze(e.r)?[e.k,e.v]:tb(e.r)}function nb(e){return ze(e.r)?e.l:ya(ht(e,{r:nb(e.r)}))}function ht(e,t){return eb(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 Ru(e){return ze(e)||e.lvl>e.r.lvl}function rb(e){return ju(sb(e))}function ya(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(Ru(t))return sb(ht(e,{lvl:r-1}));if(!ze(t)&&!ze(t.r))return ht(t.r,{l:ht(t,{r:t.r.l}),r:ht(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(Ru(e))return ju(ht(e,{lvl:r-1}));if(!ze(n)&&!ze(n.l)){const o=n.l,s=Ru(o)?n.lvl-1:n.lvl;return ht(o,{l:ht(e,{r:o.l,lvl:r-1}),r:ju(ht(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function va(e,t,n){if(ze(e))return[];const r=on(e,t)[0];return GD($u(e,r,n))}function ob(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i<n;i++){const{index:a,value:l}=t(e[i]);s.push({start:r,end:a-1,value:o}),r=a,o=l}return s.push({start:r,end:1/0,value:o}),s}function GD(e){return ob(e,({k:t,v:n})=>({index:t,value:n}))}function ju(e){const{r:t,lvl:n}=e;return!ze(t)&&!ze(t.r)&&t.lvl===n&&t.r.lvl===n?ht(t,{l:ht(e,{r:t.l}),lvl:n+1}):e}function sb(e){const{l:t}=e;return!ze(t)&&t.lvl===e.lvl?ht(t,{r:ht(e,{l:t.r})}):e}function ba(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],a=n(i,t);if(a===0)return s;if(a===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function ib(e,t,n){return e[ba(e,t,n)]}function YD(e,t,n,r){const o=ba(e,t,r),s=ba(e,n,r,o);return e.slice(o,s+1)}const Bu=De(()=>({recalcInProgress:K(!1)}),[],{singleton:!0});function qD(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 ab(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 KD(e,t){let n=ze(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),ze(e)){e=Zt(e,0,o);continue}const a=va(e,s-1,i+1);if(a.some(qD(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(i>=u||o===f)&&(e=Vu(e,u)):(c=f!==o,l=!0),d>i&&i>=u&&f!==o&&(e=Zt(e,i+1,f));c&&(e=Zt(e,s,o))}return[e,n]}function ZD(){return{offsetTree:[],sizeTree:No(),groupOffsetTree:No(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function zu({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 QD(e){return{index:e.index,value:e}}function JD(e,t,n,r=0){return r>0&&(t=Math.max(t,ib(e,r,zu).offset)),ob(YD(e,t,n,XD),QD)}function Wu(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=ba(o,t-1,zu),a=o[l].offset;const u=on(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===on(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of va(n,t,1/0)){const d=c-s,f=d*i+a+d*r;o.push({offset:f,size:u,index:c}),s=c,a=f,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function eM(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Kt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&ze(s)&&t.length===2){const f=t[0].size,h=t[1].size;i=n.reduce((p,m)=>Zt(Zt(p,m,f),m+1,h),i)}else[i,a]=KD(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=Wu(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Zt(f,h,Ls(h,l,o)),No()),groupIndices:n}}function Ls(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=ib(t,e,zu),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function tM(e){return typeof e.groupIndex<"u"}function lb(e,t,n){if(tM(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=cb(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function cb(e,t){if(!wa(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function wa(e){return!ze(e.groupOffsetTree)}function nM(e){return Mr(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const rM={offsetHeight:"height",offsetWidth:"width"},Sn=De(([{log:e},{recalcInProgress:t}])=>{const n=Ce(),r=Ce(),o=At(r,0),s=Ce(),i=Ce(),a=K(0),l=K([]),c=K(void 0),u=K(void 0),d=K((S,E)=>rn(S,rM[E])),f=K(void 0),h=K(0),p=ZD(),m=At(U(n,we(l,e,h),wn(eM,p),qe()),p),y=At(U(l,qe(),wn((S,E)=>({prev:S.current,current:E}),{prev:[],current:[]}),oe(({prev:S})=>S)),[]);ce(U(l,pe(S=>S.length>0),we(m,h),oe(([S,E,C])=>{const k=S.reduce((I,N,L)=>Zt(I,N,Ls(N,E.offsetTree,C)||L),No());return{...E,groupIndices:S,groupOffsetTree:k}})),m),ce(U(r,we(m),pe(([S,{lastIndex:E}])=>S<E),oe(([S,{lastIndex:E,lastSize:C}])=>[{startIndex:S,endIndex:E,size:C}])),n),ce(c,u);const v=At(U(c,oe(S=>S===void 0)),!0);ce(U(u,pe(S=>S!==void 0&&ze(_t(m).sizeTree)),oe(S=>[{startIndex:0,endIndex:0,size:S}])),n);const b=qt(U(n,we(m),wn(({sizes:S},[E,C])=>({changed:C!==S,sizes:C}),{changed:!1,sizes:p}),oe(S=>S.changed)));Ve(U(a,wn((S,E)=>({diff:S.prev-E,prev:E}),{diff:0,prev:0}),oe(S=>S.diff)),S=>{const{groupIndices:E}=_t(m);if(S>0)be(t,!0),be(s,S+ab(S,E));else if(S<0){const C=_t(y);C.length>0&&(S-=ab(-S,C)),be(i,S)}}),Ve(U(a,we(e)),([S,E])=>{S<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},Kt.ERROR)});const g=qt(s);ce(U(s,we(m),oe(([S,E])=>{const C=E.groupIndices.length>0,k=[],I=E.lastSize;if(C){const N=Fs(E.sizeTree,0);let L=0,O=0;for(;L<S;){const _=E.groupIndices[O],F=E.groupIndices.length===O+1?1/0:E.groupIndices[O+1]-_-1;k.push({startIndex:_,endIndex:_,size:N}),k.push({startIndex:_+1,endIndex:_+1+F-1,size:I}),O++,L+=F+1}const j=Mr(E.sizeTree);return L!==S&&j.shift(),j.reduce((_,{k:F,v:$})=>{let z=_.ranges;return _.prevSize!==0&&(z=[..._.ranges,{startIndex:_.prevIndex,endIndex:F+S-1,size:_.prevSize}]),{ranges:z,prevIndex:F+S,prevSize:$}},{ranges:k,prevIndex:S,prevSize:0}).ranges}return Mr(E.sizeTree).reduce((N,{k:L,v:O})=>({ranges:[...N.ranges,{startIndex:N.prevIndex,endIndex:L+S-1,size:N.prevSize}],prevIndex:L+S,prevSize:O}),{ranges:[],prevIndex:0,prevSize:I}).ranges})),n);const T=qt(U(i,we(m,h),oe(([S,{offsetTree:E},C])=>{const k=-S;return Ls(k,E,C)})));return ce(U(i,we(m,h),oe(([S,E,C])=>{if(E.groupIndices.length>0){if(ze(E.sizeTree))return E;let I=No();const N=_t(y);let L=0,O=0,j=0;for(;L<-S;){j=N[O];const _=N[O+1]-j-1;O++,L+=_+1}if(I=Mr(E.sizeTree).reduce((_,{k:F,v:$})=>Zt(_,Math.max(0,F+S),$),I),L!==-S){const _=Fs(E.sizeTree,j);I=Zt(I,0,_);const F=on(E.sizeTree,-S+1)[1];I=Zt(I,1,F)}return{...E,sizeTree:I,...Wu(E.offsetTree,0,I,C)}}else{const I=Mr(E.sizeTree).reduce((N,{k:L,v:O})=>Zt(N,Math.max(0,L+S),O),No());return{...E,sizeTree:I,...Wu(E.offsetTree,0,I,C)}}})),m),{data:f,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:T,beforeUnshiftWith:g,firstItemIndex:a,gap:h,sizes:m,listRefresh:b,statefulTotalCount:o,trackItemSizes:v,itemSize:d}},Ye(ur,Bu),{singleton:!0}),oM=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function ub(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!oM)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Vs=De(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:f}])=>{const h=Ce(),p=Ce(),m=K(0);let y=null,v=null,b=null;function g(){y&&(y(),y=null),b&&(b(),b=null),v&&(clearTimeout(v),v=null),be(o,!1)}return ce(U(h,we(e,s,t,m,l,c,f),we(r,u,d),oe(([[T,S,E,C,k,I,N,L],O,j,D])=>{const _=ub(T),{align:F,behavior:$,offset:z}=_,q=C-1,P=lb(_,S,q);let V=Ls(P,S.offsetTree,O)+I;F==="end"?(V+=j+on(S.sizeTree,P)[1]-E+D,P===q&&(V+=N)):F==="center"?V+=(j+on(S.sizeTree,P)[1]-E+D)/2:V-=k,z&&(V+=z);const Q=ie=>{g(),ie?(L("retrying to scroll to",{location:T},Kt.DEBUG),be(h,T)):(be(p,!0),L("list did not change, scroll successful",{},Kt.DEBUG))};if(g(),$==="smooth"){let ie=!1;b=Ve(n,ee=>{ie=ie||ee}),y=vn(a,()=>{Q(ie)})}else y=vn(U(n,sM(150)),Q);return v=setTimeout(()=>{g()},1200),be(o,!0),L("scrolling from index to",{index:P,top:V,behavior:$},Kt.DEBUG),{top:V,behavior:$}})),i),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},Ye(Sn,Nt,ur),{singleton:!0});function sM(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const $s="up",Rs="down",iM="none",aM={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},lM=0,js=De(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=K(!1),a=K(!0),l=Ce(),c=Ce(),u=K(4),d=K(lM),f=At(U(Zv(U(ge(t),Mo(1),bn(!0)),U(ge(t),Mo(1),bn(!1),Kv(100))),qe()),!1),h=At(U(Zv(U(s,bn(!0)),U(s,bn(!1),Kv(200))),qe()),!1);ce(U(vt(ge(t),ge(d)),oe(([b,g])=>b<=g),qe()),a),ce(U(a,cr(50)),c);const p=qt(U(vt(e,ge(n),ge(r),ge(o),ge(u)),wn((b,[{scrollTop:g,scrollHeight:T},S,E,C,k])=>{const I=g+S-T>-k,N={viewportHeight:S,scrollTop:g,scrollHeight:T};if(I){let O,j;return g>b.state.scrollTop?(O="SCROLLED_DOWN",j=b.state.scrollTop-g):(O="SIZE_DECREASED",j=b.state.scrollTop-g||b.scrollTopDelta),{atBottom:!0,state:N,atBottomBecause:O,scrollTopDelta:j}}let L;return N.scrollHeight>b.state.scrollHeight?L="SIZE_INCREASED":S<b.state.viewportHeight?L="VIEWPORT_HEIGHT_DECREASING":g<b.state.scrollTop?L="SCROLLING_UPWARDS":L="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:L,state:N}},aM),qe((b,g)=>b&&b.atBottom===g.atBottom))),m=At(U(e,wn((b,{scrollTop:g,scrollHeight:T,viewportHeight:S})=>{if(Qv(b.scrollHeight,T))return{scrollTop:g,scrollHeight:T,jump:0,changed:!1};{const E=T-(g+S)<1;return b.scrollTop!==g&&E?{scrollHeight:T,scrollTop:g,jump:b.scrollTop-g,changed:!0}:{scrollHeight:T,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),pe(b=>b.changed),oe(b=>b.jump)),0);ce(U(p,oe(b=>b.atBottom)),i),ce(U(i,cr(50)),l);const y=K(Rs);ce(U(e,oe(({scrollTop:b})=>b),qe(),wn((b,g)=>_t(h)?{direction:b.direction,prevScrollTop:g}:{direction:g<b.prevScrollTop?$s:Rs,prevScrollTop:g},{direction:Rs,prevScrollTop:0}),oe(b=>b.direction)),y),ce(U(e,cr(50),bn(iM)),y);const v=K(0);return ce(U(f,pe(b=>!b),bn(0)),v),ce(U(t,cr(100),we(f),pe(([b,g])=>!!g),wn(([b,g],[T])=>[g,T],[0,0]),oe(([b,g])=>g-b)),v),{isScrolling:f,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:y,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:v,lastJumpDueToItemResize:m}},Ye(Nt)),dr=De(([{log:e}])=>{const t=K(!1),n=qt(U(t,pe(r=>r),qe()));return Ve(t,r=>{r&&_t(e)("props updated",{},Kt.DEBUG)}),{propsReady:t,didMount:n}},Ye(ur),{singleton:!0});function Hu(e,t){e==0?t():requestAnimationFrame(()=>Hu(e-1,t))}function Uu(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Bs=De(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=K(!0),l=K(0),c=K(!0);return ce(U(i,we(l),pe(([u,d])=>!!d),bn(!1)),a),ce(U(i,we(l),pe(([u,d])=>!!d),bn(!1)),c),Ve(U(vt(t,i),we(a,e,n,c),pe(([[,u],d,{sizeTree:f},h,p])=>u&&(!ze(f)||Mu(h))&&!d&&!p),we(l)),([,u])=>{vn(s,()=>{be(c,!0)}),Hu(4,()=>{vn(r,()=>{be(a,!0)}),be(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Ye(Sn,Nt,Vs,dr),{singleton:!0});function db(e){return e?e==="smooth"?"smooth":"auto":!1}const cM=(e,t)=>typeof e=="function"?db(e(t)):t&&db(e),uM=De(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=K(!1),d=Ce();let f=null;function h(m){be(o,{index:"LAST",align:"end",behavior:m})}Ve(U(vt(U(ge(e),Mo(1)),a),we(ge(u),n,s,c),oe(([[m,y],v,b,g,T])=>{let S=y&&g,E="auto";return S&&(E=cM(v,b||T),S=S&&!!E),{totalCount:m,shouldFollow:S,followOutputBehavior:E}}),pe(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:y})=>{f&&(f(),f=null),f=vn(t,()=>{_t(l)("following output to ",{totalCount:m},Kt.DEBUG),h(y),f=null})});function p(m){const y=vn(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(_t(l)("scrolling to bottom due to increased size",{},Kt.DEBUG),h("auto"))});setTimeout(y,100)}return Ve(U(vt(ge(u),e,i),pe(([m,,y])=>m&&y),wn(({value:m},[,y])=>({refreshed:m===y,value:y}),{refreshed:!1,value:0}),pe(({refreshed:m})=>m),we(u,e)),([,m])=>{_t(s)&&p(m!==!1)}),Ve(d,()=>{p(_t(u)!==!1)}),Ve(vt(ge(u),r),([m,y])=>{m&&!y.atBottom&&y.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},Ye(Sn,js,Vs,Bs,dr,ur,Nt));function dM(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const fb=De(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Ce(),i=Ce(),a=qt(U(s,oe(dM)));return ce(U(a,oe(l=>l.totalCount)),e),ce(U(a,oe(l=>l.groupIndices)),t),ce(U(vt(r,n,o),pe(([l,c])=>wa(c)),oe(([l,c,u])=>on(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),qe(),oe(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Ye(Sn,Nt));function zs(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function hb(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const xa="top",Sa="bottom",pb="none";function mb(e,t,n){return typeof e=="number"?n===$s&&t===xa||n===Rs&&t===Sa?e:0:n===$s?t===xa?e.main:e.reverse:t===Sa?e.main:e.reverse}function gb(e,t){return typeof e=="number"?e:e[t]||0}const Gu=De(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Ce(),i=K(0),a=K(0),l=K(0),c=At(U(vt(ge(e),ge(t),ge(r),ge(s,zs),ge(l),ge(i),ge(o),ge(n),ge(a)),oe(([u,d,f,[h,p],m,y,v,b,g])=>{const T=u-b,S=y+v,E=Math.max(f-T,0);let C=pb;const k=gb(g,xa),I=gb(g,Sa);return h-=b,h+=f+v,p+=f+v,p-=b,h>u+S-k&&(C=$s),p<u-E+d+I&&(C=Rs),C!==pb?[Math.max(T-f-mb(m,xa,C)-k,0),T-E-v+d+mb(m,Sa,C)+I]:null}),pe(u=>u!=null),qe(zs)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Ye(Nt),{singleton:!0});function fM(e,t,n){if(wa(t)){const r=cb(e,t);return[{index:on(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 Yu={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function yb(e,t,n){if(e.length===0)return[];if(!wa(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=va(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=i.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},s.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return s}function Ta(e,t,n,r,o,s){const{lastSize:i,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const d=n-l,f=a+d*i+(d-1)*r,h=c,p=f-u;return{items:yb(e,o,s),topItems:yb(t,o,s),topListHeight:t.reduce((m,y)=>y.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function vb(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=e)break;i++}const a=e+i,l=Uu(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:s[d+l]}));return Ta(c,[],a,o,n,r)}const Nr=De(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:p}])=>{const m=K([]),y=K(0),v=Ce();ce(s.topItemsIndexes,m);const b=At(U(vt(h,p,ge(i,zs),ge(t),ge(e),ge(u),c,ge(m),ge(r),ge(o),n),pe(([E,C,,k,,,,,,,I])=>{const N=I&&I.length!==k;return E&&!C&&!N}),oe(([,,[E,C],k,I,N,L,O,j,D,_])=>{const F=I,{sizeTree:$,offsetTree:z}=F,q=_t(y);if(k===0)return{...Yu,totalCount:k};if(E===0&&C===0)return q===0?{...Yu,totalCount:k}:vb(q,N,I,j,D,_||[]);if(ze($))return q>0?null:Ta(fM(Uu(N,k),F,_),[],k,D,F,j);const P=[];if(O.length>0){const H=O[0],A=O[O.length-1];let R=0;for(const W of va($,H,A)){const Y=W.value,Z=Math.max(W.start,H),fe=Math.min(W.end,A);for(let B=Z;B<=fe;B++)P.push({index:B,size:Y,offset:R,data:_&&_[B]}),R+=Y}}if(!L)return Ta([],P,k,D,F,j);const V=O.length>0?O[O.length-1]+1:0,Q=JD(z,E,C,V);if(Q.length===0)return null;const ie=k-1,ee=ma([],H=>{for(const A of Q){const R=A.value;let W=R.offset,Y=A.start;const Z=R.size;if(R.offset<E){Y+=Math.floor((E-R.offset+D)/(Z+D));const B=Y-A.start;W+=B*Z+B*D}Y<V&&(W+=(V-Y)*Z,Y=V);const fe=Math.min(A.end,ie);for(let B=Y;B<=fe&&!(W>=C);B++)H.push({index:B,size:Z,offset:W,data:_&&_[B]}),W+=Z+D}});return Ta(ee,P,k,D,F,j)}),pe(E=>E!==null),qe()),Yu);ce(U(n,pe(Mu),oe(E=>E==null?void 0:E.length)),t),ce(U(b,oe(E=>E.topListHeight)),d),ce(d,l),ce(U(b,oe(E=>[E.top,E.bottom])),a),ce(U(b,oe(E=>E.items)),v);const g=qt(U(b,pe(({items:E})=>E.length>0),we(t,n),pe(([{items:E},C])=>E[E.length-1].originalIndex===C-1),oe(([,E,C])=>[E-1,C]),qe(zs),oe(([E])=>E))),T=qt(U(b,cr(200),pe(({items:E,topItems:C})=>E.length>0&&E[0].originalIndex===C.length),oe(({items:E})=>E[0].index),qe())),S=qt(U(b,pe(({items:E})=>E.length>0),oe(({items:E})=>{let C=0,k=E.length-1;for(;E[C].type==="group"&&C<k;)C++;for(;E[k].type==="group"&&k>C;)k--;return{startIndex:E[C].index,endIndex:E[k].index}}),qe(hb)));return{listState:b,topItemsIndexes:m,endReached:g,startReached:T,rangeChanged:S,itemsRendered:v,initialItemCount:y,...f}},Ye(Sn,fb,Gu,Bs,Vs,js,dr,Bu),{singleton:!0}),hM=De(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(ce(U(a,we(s),pe(([,l])=>l!==0),we(o,e,t,r,n),oe(([[,l],c,u,d,f,h=[]])=>vb(l,c,u,d,f,h))),i),{}),Ye(Sn,Bs,Nr,dr),{singleton:!0}),bb=De(([{scrollVelocity:e}])=>{const t=K(!1),n=Ce(),r=K(!1);return ce(U(e,we(r,t,n),pe(([o,s])=>!!s),oe(([o,s,i,a])=>{const{exit:l,enter:c}=s;if(i){if(l(o,a))return!1}else if(c(o,a))return!0;return i}),qe()),t),Ve(U(vt(t,e,n),we(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Ye(js),{singleton:!0}),pM=De(([{topItemsIndexes:e}])=>{const t=K(0);return ce(U(t,pe(n=>n>0),oe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Ye(Nr)),wb=De(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Ce(),i=At(U(vt(e,r,t,n,o),oe(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return ce(ge(i),s),{totalListHeight:i,totalListHeightChanged:s}},Ye(Nt,Nr),{singleton:!0});function xb(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const mM=xb(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),gM=De(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:f},{log:h},{recalcInProgress:p}])=>{const m=qt(U(l,we(a),wn(([,v,b,g],[{items:T,totalCount:S,bottom:E,offsetBottom:C},k])=>{const I=E+C;let N=0;return b===S&&v.length>0&&T.length>0&&(T[0].originalIndex===0&&v[0].originalIndex===0||(N=I-g,N!==0&&(N+=k))),[N,T,S,I]},[0,[],0,0]),pe(([v])=>v!==0),we(t,i,r,s,h,p),pe(([,v,b,g,,,T])=>!T&&!g&&v!==0&&b===$s),oe(([[v],,,,,b])=>(b("Upward scrolling compensation",{amount:v},Kt.DEBUG),v))));function y(v){v>0?(be(e,{top:-v,behavior:"auto"}),be(n,0)):(be(n,0),be(e,{top:-v,behavior:"auto"}))}return Ve(U(m,we(n,o)),([v,b,g])=>{g&&mM()?be(n,b-v):y(-v)}),Ve(U(vt(At(o,!1),n,p),pe(([v,b,g])=>!v&&!g&&b!==0),oe(([v,b])=>b),cr(1)),y),ce(U(u,oe(v=>({top:-v}))),e),Ve(U(c,we(d,f),oe(([v,{lastSize:b,groupIndices:g,sizeTree:T},S])=>{function E(C){return C*(b+S)}if(g.length===0)return E(v);{let C=0;const k=Fs(T,0);let I=0,N=0;for(;I<v;){I++,C+=k;let L=g.length===N+1?1/0:g[N+1]-g[N]-1;I+L>v&&(C-=k,L=v-I+1),I+=L,C+=E(L),N++}return C}})),v=>{be(n,v),requestAnimationFrame(()=>{be(e,{top:v}),requestAnimationFrame(()=>{be(n,0),be(p,!1)})})}),{deviation:n}},Ye(Nt,js,Nr,Sn,ur,Bu)),yM=De(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=K(0);return Ve(U(e,we(r),pe(([,o])=>o!==0),oe(([,o])=>({top:o}))),o=>{vn(U(n,Mo(1),pe(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{be(t,o)})})}),{initialScrollTop:r}},Ye(dr,Nt,Nr),{singleton:!0}),vM=De(([{viewportHeight:e},{totalListHeight:t}])=>{const n=K(!1),r=At(U(vt(n,e,t),pe(([o])=>o),oe(([,o,s])=>Math.max(0,o-s)),cr(0),qe()),0);return{alignToBottom:n,paddingTopAddition:r}},Ye(Nt,wb),{singleton:!0}),qu=De(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ce(),r=Ce(),o=Ce(),s=K(!1),i=K(void 0);return ce(U(vt(n,r),oe(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ce(U(e,we(r),oe(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Ye(Nt)),bM=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>e<n?{...i,behavior:o,align:s??"start"}:t>r?{...i,behavior:o,align:s??"end"}:null,wM=De(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ce();return ce(U(u,we(e,o,t,s,i,a,r),we(n),oe(([[d,f,h,p,m,y,v,b],g])=>{const{done:T,behavior:S,align:E,calculateViewLocation:C=bM,...k}=d,I=lb(d,f,p-1),N=Ls(I,f.offsetTree,g)+m+y,L=N+on(f.sizeTree,I)[1],O=b+y,j=b+h-v,D=C({itemTop:N,itemBottom:L,viewportTop:O,viewportBottom:j,locationParams:{behavior:S,align:E,...k}});return D?T&&vn(U(l,pe(_=>_===!1),Mo(_t(l)?1:2)),T):T&&T(),D}),pe(d=>d!==null)),c),{scrollIntoView:u}},Ye(Sn,Nt,Vs,Nr,ur),{singleton:!0}),xM=De(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ce(),u=K(void 0),d=K(null),f=K(null);return ce(a,d),ce(l,f),Ve(U(c,we(e,n,i,d,f,r)),([h,p,m,y,v,b,g])=>{const T=nM(p.sizeTree);y&&v!==null&&b!==null&&(m=v.scrollTop-b.offsetTop),m-=g,h({ranges:T,scrollTop:m})}),ce(U(u,pe(Mu),oe(SM)),o),ce(U(s,we(u),pe(([,h])=>h!==void 0),qe(),oe(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},Ye(Sn,Nt,Bs,dr,qu));function SM(e){return{offset:e.scrollTop,index:0,align:"start"}}const TM=De(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Ye(Gu,hM,dr,bb,wb,yM,vM,qu,wM,ur)),Sb=De(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,y,v,{listState:b,topItemsIndexes:g,...T},{scrollToIndex:S},E,{topItemCount:C},{groupCounts:k},I])=>(ce(T.rangeChanged,I.scrollSeekRangeChanged),ce(U(I.windowViewportRect,oe(N=>N.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:g,topItemCount:C,groupCounts:k,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:b,scrollToIndex:S,trackItemSizes:o,itemSize:s,groupIndices:l,...T,...I,...m,sizes:d,...y}),Ye(Sn,Bs,Nt,xM,uM,Nr,Vs,gM,pM,fb,TM)),Ku="-webkit-sticky",Tb="sticky",Eb=xb(()=>{if(typeof document>"u")return Tb;const e=document.createElement("div");return e.style.position=Ku,e.style.position===Ku?Ku:Tb});function Zu(e,t){const n=w.useRef(null),r=w.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,d;if(t){const f=t.getBoundingClientRect(),h=l.top-f.top;u=f.height-Math.max(0,h),d=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=Lu(r),i=w.useCallback(()=>{r(s.current)},[r,s]);return w.useEffect(()=>{if(t){t.addEventListener("scroll",i);const a=new ResizeObserver(()=>{requestAnimationFrame(i)});return a.observe(t),()=>{t.removeEventListener("scroll",i),a.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const Ea=w.createContext(void 0),Cb=w.createContext(void 0);function Xu(e){return e}const EM=De(([e,t])=>({...e,...t}),Ye(Sb,De(()=>{const e=K(l=>`Item ${l}`),t=K(null),n=K(l=>`Group ${l}`),r=K({}),o=K(Xu),s=K("div"),i=K(Dr),a=(l,c=null)=>At(U(r,oe(u=>u[l]),qe()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}))),CM=({height:e})=>w.createElement("div",{style:{height:e}}),PM={position:Eb(),zIndex:1,overflowAnchor:"none"},kM={overflowAnchor:"none"},Pb=w.memo(function({showTopList:t=!1}){const n=Te("listState"),r=Jt("sizeRanges"),o=Te("useWindowScroll"),s=Te("customScrollParent"),i=Jt("windowScrollContainerState"),a=Jt("scrollContainerState"),l=s||o?i:a,c=Te("itemContent"),u=Te("context"),d=Te("groupContent"),f=Te("trackItemSizes"),h=Te("itemSize"),p=Te("log"),m=Jt("gap"),{callbackRef:y}=Xv(r,h,f,t?Dr:l,p,m,s),[v,b]=w.useState(0);ed("deviation",D=>{v!==D&&b(D)});const g=Te("EmptyPlaceholder"),T=Te("ScrollSeekPlaceholder")||CM,S=Te("ListComponent"),E=Te("ItemComponent"),C=Te("GroupComponent"),k=Te("computeItemKey"),I=Te("isSeeking"),N=Te("groupIndices").length>0,L=Te("alignToBottom"),O=Te("initialItemFinalLocationReached"),j=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:v!==0?v:L?"auto":0,...O?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?w.createElement(g,tt(g,u)):w.createElement(S,{...tt(S,u),ref:y,style:j,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(D=>{const _=D.originalIndex,F=k(_+n.firstItemIndex,D.data,u);return I?w.createElement(T,{...tt(T,u),key:F,index:D.index,height:D.size,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?w.createElement(C,{...tt(C,u),key:F,"data-index":_,"data-known-size":D.size,"data-item-index":D.index,style:PM},d(D.index,u)):w.createElement(E,{...tt(E,u),...kb(E,D.data),key:F,"data-index":_,"data-known-size":D.size,"data-item-index":D.index,"data-item-group-index":D.groupIndex,style:kM},N?c(D.index,D.groupIndex,D.data,u):c(D.index,D.data,u))}))}),OM={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Fo=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),_M={width:"100%",position:Eb(),top:0,zIndex:1};function tt(e,t){if(typeof e!="string")return{context:t}}function kb(e,t){return{item:typeof e=="string"?void 0:t}}const AM=w.memo(function(){const t=Te("HeaderComponent"),n=Jt("headerHeight"),r=Te("headerFooterTag"),o=xn(w.useMemo(()=>i=>n(rn(i,"height")),[n])),s=Te("context");return t?w.createElement(r,{ref:o},w.createElement(t,tt(t,s))):null}),IM=w.memo(function(){const t=Te("FooterComponent"),n=Jt("footerHeight"),r=Te("headerFooterTag"),o=xn(w.useMemo(()=>i=>n(rn(i,"height")),[n])),s=Te("context");return t?w.createElement(r,{ref:o},w.createElement(t,tt(t,s))):null});function Qu({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),f=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=Jv(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),w.createElement(c,{ref:h,style:{...OM,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...tt(c,f)},i)})}function Ju({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),f=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:y,scrollToCallback:v}=Jv(l,u,c,Dr,h);return BD(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",v),t("scrollBy",y),w.createElement(c,{style:{position:"relative",...s,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...tt(c,p)},i)})}const DM=({children:e})=>{const t=w.useContext(Ea),n=Jt("viewportHeight"),r=Jt("fixedItemHeight"),o=Te("alignToBottom"),s=xn(w.useMemo(()=>Ms(n,i=>rn(i,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:Fo(o),ref:s,"data-viewport-type":"element"},e)},MM=({children:e})=>{const t=w.useContext(Ea),n=Jt("windowViewportRect"),r=Jt("fixedItemHeight"),o=Te("customScrollParent"),s=Zu(n,o),i=Te("alignToBottom");return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:Fo(i),"data-viewport-type":"window"},e)},NM=({children:e})=>{const t=Te("TopItemListComponent")||"div",n=Te("headerHeight"),r={..._M,marginTop:`${n}px`},o=Te("context");return w.createElement(t,{style:r,...tt(t,o)},e)},FM=w.memo(function(t){const n=Te("useWindowScroll"),r=Te("topItemsIndexes").length>0,o=Te("customScrollParent"),s=o||n?$M:VM,i=o||n?MM:DM;return w.createElement(s,{...t},r&&w.createElement(NM,null,w.createElement(Pb,{showTopList:!0})),w.createElement(i,null,w.createElement(AM,null),w.createElement(Pb,null),w.createElement(IM,null)))}),{Component:LM,usePublisher:Jt,useEmitterValue:Te,useEmitter:ed}=Fu(EM,{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"}},FM),VM=Qu({usePublisher:Jt,useEmitterValue:Te,useEmitter:ed}),$M=Ju({usePublisher:Jt,useEmitterValue:Te,useEmitter:ed}),RM=LM,Ob={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},jM={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:_b,ceil:Ab,floor:Ca,min:td,max:Ws}=Math;function BM(e){return{...jM,items:e}}function Ib(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function zM(e,t){return e&&e.column===t.column&&e.row===t.row}function Pa(e,t){return e&&e.width===t.width&&e.height===t.height}const WM=De(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,f,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:b,windowScrollTo:g},T])=>{const S=K(0),E=K(0),C=K(Ob),k=K({height:0,width:0}),I=K({height:0,width:0}),N=Ce(),L=Ce(),O=K(0),j=K(null),D=K({row:0,column:0}),_=Ce(),F=Ce(),$=K(!1),z=K(0),q=K(!0),P=K(!1);Ve(U(p,we(z),pe(([A,R])=>!!R)),()=>{be(q,!1),be(E,0)}),Ve(U(vt(p,q,I,k,z,P),pe(([A,R,W,Y,,Z])=>A&&!R&&W.height!==0&&Y.height!==0&&!Z)),([,,,,A])=>{be(P,!0),Hu(1,()=>{be(N,A)}),vn(U(r),()=>{be(n,[0,0]),be(q,!0)})}),ce(U(F,pe(A=>A!=null&&A.scrollTop>0),bn(0)),E),Ve(U(p,we(F),pe(([,A])=>A!=null)),([,A])=>{A&&(be(k,A.viewport),be(I,A==null?void 0:A.item),be(D,A.gap),A.scrollTop>0&&(be($,!0),vn(U(r,Mo(1)),R=>{be($,!1)}),be(i,{top:A.scrollTop})))}),ce(U(k,oe(({height:A})=>A)),o),ce(U(vt(ge(k,Pa),ge(I,Pa),ge(D,(A,R)=>A&&A.column===R.column&&A.row===R.row),ge(r)),oe(([A,R,W,Y])=>({viewport:A,item:R,gap:W,scrollTop:Y}))),_),ce(U(vt(ge(S),t,ge(D,zM),ge(I,Pa),ge(k,Pa),ge(j),ge(E),ge($),ge(q),ge(z)),pe(([,,,,,,,A])=>!A),oe(([A,[R,W],Y,Z,fe,B,Me,,rt,He])=>{const{row:ot,column:ue}=Y,{height:Ee,width:le}=Z,{width:ke}=fe;if(Me===0&&(A===0||ke===0))return Ob;if(le===0){const Vt=Uu(He,A),jr=Vt===0?Math.max(Me-1,0):Vt;return BM(Ib(Vt,jr,B))}const ut=Mb(ke,le,ue);let Oe,ft;rt?R===0&&W===0&&Me>0?(Oe=0,ft=Me-1):(Oe=ut*Ca((R+ot)/(Ee+ot)),ft=ut*Ab((W+ot)/(Ee+ot))-1,ft=td(A-1,Ws(ft,ut-1)),Oe=td(ft,Ws(0,Oe))):(Oe=0,ft=-1);const X=Ib(Oe,ft,B),{top:se,bottom:_e}=Db(fe,Y,Z,X),Ke=Ab(A/ut),It=Ke*Ee+(Ke-1)*ot-_e;return{items:X,offsetTop:se,offsetBottom:It,top:se,bottom:_e,itemHeight:Ee,itemWidth:le}})),C),ce(U(j,pe(A=>A!==null),oe(A=>A.length)),S),ce(U(vt(k,I,C,D),pe(([A,R,{items:W}])=>W.length>0&&R.height!==0&&A.height!==0),oe(([A,R,{items:W},Y])=>{const{top:Z,bottom:fe}=Db(A,Y,R,W);return[Z,fe]}),qe(zs)),n);const V=K(!1);ce(U(r,we(V),oe(([A,R])=>R||A!==0)),V);const Q=qt(U(ge(C),pe(({items:A})=>A.length>0),we(S,V),pe(([{items:A},R,W])=>W&&A[A.length-1].index===R-1),oe(([,A])=>A-1),qe())),ie=qt(U(ge(C),pe(({items:A})=>A.length>0&&A[0].index===0),bn(0),qe())),ee=qt(U(ge(C),we($),pe(([{items:A},R])=>A.length>0&&!R),oe(([{items:A}])=>({startIndex:A[0].index,endIndex:A[A.length-1].index})),qe(hb),cr(0)));ce(ee,f.scrollSeekRangeChanged),ce(U(N,we(k,I,S,D),oe(([A,R,W,Y,Z])=>{const fe=ub(A),{align:B,behavior:Me,offset:rt}=fe;let He=fe.index;He==="LAST"&&(He=Y-1),He=Ws(0,He,td(Y-1,He));let ot=nd(R,Z,W,He);return B==="end"?ot=_b(ot-R.height+W.height):B==="center"&&(ot=_b(ot-R.height/2+W.height/2)),rt&&(ot+=rt),{top:ot,behavior:Me}})),i);const H=At(U(C,oe(A=>A.offsetBottom+A.bottom)),0);return ce(U(m,oe(A=>({width:A.visibleWidth,height:A.visibleHeight}))),k),{data:j,totalCount:S,viewportDimensions:k,itemDimensions:I,scrollTop:r,scrollHeight:L,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:N,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:b,deviation:O,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:D,restoreStateFrom:F,...f,initialTopMostItemIndex:z,gridState:C,totalListHeight:H,...d,startReached:ie,endReached:Q,rangeChanged:ee,stateChanged:_,propsReady:h,stateRestoreInProgress:$,...T}},Ye(Gu,Nt,js,bb,dr,qu,ur));function Db(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=nd(e,t,n,r[0].index),i=nd(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function nd(e,t,n,r){const o=Mb(e.width,n.width,t.column),s=Ca(r/o),i=s*n.height+Ws(0,s-1)*t.row;return i>0?i+t.row:i}function Mb(e,t,n){return Ws(1,Ca((e+n)/(Ca(t)+n)))}const HM=De(([e,t])=>({...e,...t}),Ye(WM,De(()=>{const e=K(c=>`Item ${c}`),t=K({}),n=K(null),r=K("virtuoso-grid-item"),o=K("virtuoso-grid-list"),s=K(Xu),i=K("div"),a=K(Dr),l=(c,u=null)=>At(U(t,oe(d=>d[c]),qe()),u);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),UM=w.memo(function(){const t=Je("gridState"),n=Je("listClassName"),r=Je("itemClassName"),o=Je("itemContent"),s=Je("computeItemKey"),i=Je("isSeeking"),a=sn("scrollHeight"),l=Je("ItemComponent"),c=Je("ListComponent"),u=Je("ScrollSeekPlaceholder"),d=Je("context"),f=sn("itemDimensions"),h=sn("gap"),p=Je("log"),m=Je("stateRestoreInProgress"),y=xn(w.useMemo(()=>v=>{const b=v.parentElement.parentElement.scrollHeight;a(b);const g=v.firstChild;if(g){const{width:T,height:S}=g.getBoundingClientRect();f({width:T,height:S})}h({row:Fb("row-gap",getComputedStyle(v).rowGap,p),column:Fb("column-gap",getComputedStyle(v).columnGap,p)})},[a,f,h,p]));return m?null:w.createElement(c,{ref:y,className:n,...tt(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(v=>{const b=s(v.index,v.data,d);return i?w.createElement(u,{key:b,...tt(u,d),index:v.index,height:t.itemHeight,width:t.itemWidth}):w.createElement(l,{...tt(l,d),className:r,"data-index":v.index,key:b},o(v.index,v.data,d))}))}),GM=w.memo(function(){const t=Je("HeaderComponent"),n=sn("headerHeight"),r=Je("headerFooterTag"),o=xn(w.useMemo(()=>i=>n(rn(i,"height")),[n])),s=Je("context");return t?w.createElement(r,{ref:o},w.createElement(t,tt(t,s))):null}),YM=w.memo(function(){const t=Je("FooterComponent"),n=sn("footerHeight"),r=Je("headerFooterTag"),o=xn(w.useMemo(()=>i=>n(rn(i,"height")),[n])),s=Je("context");return t?w.createElement(r,{ref:o},w.createElement(t,tt(t,s))):null}),qM=({children:e})=>{const t=w.useContext(Cb),n=sn("itemDimensions"),r=sn("viewportDimensions"),o=xn(w.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]));return w.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),w.createElement("div",{style:Fo(!1),ref:o},e)},KM=({children:e})=>{const t=w.useContext(Cb),n=sn("windowViewportRect"),r=sn("itemDimensions"),o=Je("customScrollParent"),s=Zu(n,o);return w.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),w.createElement("div",{ref:s,style:Fo(!1)},e)},ZM=w.memo(function({...t}){const n=Je("useWindowScroll"),r=Je("customScrollParent"),o=r||n?QM:XM,s=r||n?KM:qM;return w.createElement(o,{...t},w.createElement(s,null,w.createElement(GM,null),w.createElement(UM,null),w.createElement(YM,null)))}),{Component:NL,usePublisher:sn,useEmitterValue:Je,useEmitter:Nb}=Fu(HM,{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"}},ZM),XM=Qu({usePublisher:sn,useEmitterValue:Je,useEmitter:Nb}),QM=Ju({usePublisher:sn,useEmitterValue:Je,useEmitter:Nb});function Fb(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 JM=De(([e,t])=>({...e,...t}),Ye(Sb,De(()=>{const e=K(l=>w.createElement("td",null,"Item $",l)),t=K(null),n=K(null),r=K(null),o=K({}),s=K(Xu),i=K(Dr),a=(l,c=null)=>At(U(o,oe(u=>u[l]),qe()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),eN=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e}})),tN=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e,padding:0,border:0}})),nN={overflowAnchor:"none"},rN=w.memo(function(){const t=$e("listState"),n=an("sizeRanges"),r=$e("useWindowScroll"),o=$e("customScrollParent"),s=an("windowScrollContainerState"),i=an("scrollContainerState"),a=o||r?s:i,l=$e("itemContent"),c=$e("trackItemSizes"),u=$e("itemSize"),d=$e("log"),{callbackRef:f,ref:h}=Xv(n,u,c,a,d,void 0,o),[p,m]=w.useState(0);rd("deviation",F=>{p!==F&&(h.current.style.marginTop=`${F}px`,m(F))});const y=$e("EmptyPlaceholder"),v=$e("ScrollSeekPlaceholder")||eN,b=$e("FillerRow")||tN,g=$e("TableBodyComponent"),T=$e("TableRowComponent"),S=$e("computeItemKey"),E=$e("isSeeking"),C=$e("paddingTopAddition"),k=$e("firstItemIndex"),I=$e("statefulTotalCount"),N=$e("context");if(I===0&&y)return w.createElement(y,tt(y,N));const L=t.offsetTop+C+p,O=t.offsetBottom,j=L>0?w.createElement(b,{height:L,key:"padding-top",context:N}):null,D=O>0?w.createElement(b,{height:O,key:"padding-bottom",context:N}):null,_=t.items.map(F=>{const $=F.originalIndex,z=S($+k,F.data,N);return E?w.createElement(v,{...tt(v,N),key:z,index:F.index,height:F.size,type:F.type||"item"}):w.createElement(T,{...tt(T,N),...kb(T,F.data),key:z,"data-index":$,"data-known-size":F.size,"data-item-index":F.index,style:nN},l(F.index,F.data,N))});return w.createElement(g,{ref:f,"data-testid":"virtuoso-item-list",...tt(g,N)},[j,..._,D])}),oN=({children:e})=>{const t=w.useContext(Ea),n=an("viewportHeight"),r=an("fixedItemHeight"),o=xn(w.useMemo(()=>Ms(n,s=>rn(s,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:Fo(!1),ref:o,"data-viewport-type":"element"},e)},sN=({children:e})=>{const t=w.useContext(Ea),n=an("windowViewportRect"),r=an("fixedItemHeight"),o=$e("customScrollParent"),s=Zu(n,o);return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:Fo(!1),"data-viewport-type":"window"},e)},iN=w.memo(function(t){const n=$e("useWindowScroll"),r=$e("customScrollParent"),o=an("fixedHeaderHeight"),s=an("fixedFooterHeight"),i=$e("fixedHeaderContent"),a=$e("fixedFooterContent"),l=$e("context"),c=xn(w.useMemo(()=>Ms(o,b=>rn(b,"height")),[o])),u=xn(w.useMemo(()=>Ms(s,b=>rn(b,"height")),[s])),d=r||n?cN:lN,f=r||n?sN:oN,h=$e("TableComponent"),p=$e("TableHeadComponent"),m=$e("TableFooterComponent"),y=i?w.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...tt(p,l)},i()):null,v=a?w.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...tt(m,l)},a()):null;return w.createElement(d,{...t},w.createElement(f,null,w.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...tt(h,l)},[y,w.createElement(rN,{key:"TableBody"}),v])))}),{Component:aN,usePublisher:an,useEmitterValue:$e,useEmitter:rd}=Fu(JM,{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"}},iN),lN=Qu({usePublisher:an,useEmitterValue:$e,useEmitter:rd}),cN=Ju({usePublisher:an,useEmitterValue:$e,useEmitter:rd}),uN=aN,dN=e=>{const[t,n]=w.useState(0);return w.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const s=()=>{n(o.clientHeight)};return o.addEventListener("resize",s),s(),()=>{o.removeEventListener("resize",s)}},[]),t},fN={Item:w.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:w.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},hN=e=>{const t=w.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(As,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(RM,{height:n,useWindowScroll:!0,data:e.source,components:fN,itemContent:(r,o)=>x.jsx(w.Fragment,{children:x.jsx(ov,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(Jo,{children:x.jsx(Kf,{})})}),x.jsx("div",{})]})};var pN=Object.defineProperty,Lb=Object.getOwnPropertySymbols,mN=Object.prototype.hasOwnProperty,gN=Object.prototype.propertyIsEnumerable,Vb=(e,t,n)=>t in e?pN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yN=(e,t)=>{for(var n in t||(t={}))mN.call(t,n)&&Vb(e,n,t[n]);if(Lb)for(var n of Lb(t))gN.call(t,n)&&Vb(e,n,t[n]);return e},od=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},vN=(e,t,n,r)=>Oa(od,e,t,n,r),Lo=e=>typeof e=="object",fr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Lo(e)&&!Lo(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>fr(e[r],t[r]))},bN=(e,t)=>(Lo(e)||Array.isArray(e))&&t?e[t]:e,wN=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,ka=e=>/[0-9.]+/.test(e),$b=e=>["string","number"].includes(typeof e),Rb=e=>e==null||(e==null?void 0:e.length)===0||e==="",jb={eq:fr,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:Rb,notEmpty:e=>!Rb(e),in:(e,t)=>od(t,n=>fr(e,n)),notIn:(e,t)=>Bb(t,n=>!fr(e,n))},xN=e=>{if(e in jb)return jb[e];throw new Error("Linq - Symbol not found")},Vo=(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},Oa=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=xN(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},SN=(e,t,n,r)=>Oa(Vo,e,t,n,r),Bb=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},TN=(e,t,n,r)=>Oa(Bb,e,t,n,r),zb=e=>{if(e===null)return null;const t=yN({},e);return Object.keys(t).forEach(n=>t[n]=Lo(e[n])?zb(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Wb=(e,t)=>{if(Lo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(fr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(fr(t,r))return!0}return!1},EN=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},CN=e=>Vo(e,(t,n,r)=>Lo(t)?n===r.findIndex(o=>fr(o,t)):n===r.indexOf(t)),PN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},Hb=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),s=n.get(o)||[];s.push(r),n.set(o,s)}),Object.fromEntries(n.entries())},kN=(e,t)=>Hb(e,n=>n[t]),Ub=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const s=t(e[r],r,e);n.push(s)}return n},ON=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},_N=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const s=t.charCodeAt(0);for(;o<=s;o+=n)r.push(String.fromCharCode(o));return ka(e)&&ka(t)?r.map(i=>Number.parseInt(i)):r},sd=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&ka(e)&&ka(t)){const o=[],[s,i]=ON(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return _N(e,t,r)},AN=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?sd(r,o,1):sd(r,s,Number.parseInt(o,10))}return $b(e)&&$b(t)?sd(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},id=(e,t,n)=>{let r=t;const o=n.length;for(let s=0;s<o;s++){const i=n[s];r=e(r,i,s,n)}return r},Gb=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let s=t[n];t[n]=t[r],t[r]=s}return t},IN=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},DN=(e,t,n,r)=>Oa(IN,e,t,n,r),Yb=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(wN(t))},MN=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.key,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),NN=(e,t)=>e.sort(MN(t)),FN=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Vo(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},LN=class $d{constructor(t=[]){this.array=t}static Range(...t){return AN(...t)}static New(t){return new $d(t)}Where(t,n,r){return this.array=SN(this.array,t,n,r),this}Some(t,n,r){return vN(this.array,t,n,r)}All(t,n,r){return TN(this.array,t,n,r)}Reverse(){return this.array=Gb(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=DN(this.array,t,n,r),this}Distinct(){return this.array=CN(this.array),this}First(t){return t===void 0?this.array[0]:PN(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?id((n,r)=>n+r,0,this.array):id((n,r)=>n+bN(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return kN(this.array,t)}GroupWith(t){return Hb(this.array,t)}Except(t){return Vo(this.array,n=>!Wb(t,n))}Intersect(t){return Vo(this.array,n=>Wb(t,n))}OrderBy(t,n){let r;return r=t?Yb(this.array,t):this.array.toSorted(),this.array=n==="desc"?Gb(r):r,this}Includes(t){return od(this.array,n=>fr(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 id(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Ub(this.array,n=>[t,n]))}Zip(t,n){return Ub(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Vo(this.array,t).length}Get(t){return this.array[t]}Clone(){return new $d(zb(this.array))}ToObject(t){return EN(this.array,t)}Sort(t){return Array.isArray(t)?NN(this.array,t):Yb(this.array,t)}Unique(t){return FN(this.array,t)}},qb=LN;const Kb=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),t},_a=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),Zb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Xb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Qb=(e,t)=>{const n=Zb(t,Xb.basic,e)||Zb(t,Xb.extend,e);return n===void 0||n===e?void 0:n},ad=()=>typeof window>"u";var ld={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(y,v)=>{try{Object.keys(y).forEach(v)}catch(b){window.console.log(b)}},n=y=>y==null,r=y=>{const v=typeof y;return v==="string"||v==="number"||v==="boolean"||n(y)},o=(y,v)=>{const b=v.getItem(y);try{return JSON.parse(b)}catch{return b??null}},s=y=>Object.keys(y).reduce((v,b)=>({...v,[b]:o(b,y)}),{}),i=y=>y instanceof Date?y:typeof y=="number"?new Date(new Date*1+y*864e5):y,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(y=>y.split("=")).reduce((y,v)=>(y[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),y),{}),c=new Set,u=()=>{const y=l();c.forEach(v=>v(y))},d=[{name:"expires",parse:y=>`expires=${i(y.expires??a)}`},{name:"maxAge",parse:y=>y.maxAge?`max-age=${i(y.expires??a)}`:""},{name:"path",parse:y=>`path=${y.path??"/"}`},{name:"sameSite",parse:y=>`samesite=${y.sameSite??"strict"}`},{name:"useSecure",parse:y=>`${y.useSecure??!0?"secure":""}`},{name:"domain",parse:y=>{const v=y.domain??"";return v===""?"":`domain=${y.multiDomain?".":""}${v}`}},{name:"partitioned",parse:y=>y.partitioned?"Partitioned":""}],f={json:l,listener:y=>(c.add(y),()=>c.delete(y)),clearListeners:()=>c.clear(),has:y=>document.cookie.split(";").some(v=>v.trim().startsWith(`${y}=`)),deleteAll:()=>{document.cookie.split(";").forEach(y=>{document.cookie=y.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:y=>{const v=f.json()[y];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:y=>{document.cookie=`${encodeURIComponent(y)}=;expires=${new Date().toUTCString()}`,u()},set:(y,v,b={})=>{const g=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((S,E)=>{const C=E.parse(b);return C===""?S:S.concat(C)},[`${encodeURIComponent(y)}=${g}`]).join(";");document.cookie=T,u()}},h=y=>{const v=new Set,b=g=>{y().removeItem(g);const T=s(y());v.forEach(S=>S(T))};return{delete:b,listener:g=>(v.add(g),()=>v.delete(g)),clearListeners:()=>v.clear(),json:(g=!1)=>g?s(y()):y(),has:g=>{const T=y().getItem(g);return!n(T)},deleteAll:()=>{t(y(),b),v.forEach(g=>g(y()))},get:g=>o(g,y()),set:(g,T)=>{y().setItem(g,JSON.stringify(T)),v.forEach(S=>S(y()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(ld);const Jb=e=>e.headerLabel??e.thead??e.id,cd=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var $o=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))($o||{});const ud=e=>e.type==="number"?e.valueAsNumber:e.value,VN=e=>{let t=[];return e({add:(o,s,i)=>t.push({...i,id:o,thead:s}),remove:o=>t=t.filter(s=>s.id!==o)}),t},$N={},RN=(e,t=$N)=>{const n=ad()?null:ld.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=$c({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)||[]},s=>{const i=a=>{const l=s.state(),c={...l,...a};return ad()||ld.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>i(a)}});return{...r,...o,name:e}},Ft={contains:{value:"contains",label:"Contains",symbol:"includes"},is:{value:"is",label:"Is",symbol:"is"},isNot:{value:"isNot",label:"Is not",symbol:"!=="},notContains:{value:"notContains",label:"Does not contains",symbol:"notIncludes"},lessThan:{value:"lessThan",label:"Less Than",symbol:"<="},greaterThan:{value:"greaterThan",label:"Greater than",symbol:">="},startsWith:{value:"startsWith",label:"Starts with",symbol:"startsWith"},endsWith:{value:"endsWith",label:"Ends with",symbol:"endsWith"}},dd={[$o.Text]:[Ft.is,Ft.isNot,Ft.contains,Ft.notContains,Ft.startsWith,Ft.endsWith],[$o.Boolean]:[Ft.is,Ft.isNot],[$o.Number]:[Ft.is,Ft.isNot,Ft.greaterThan,Ft.lessThan]},fd=(e,t={})=>{var i;const n=e.id,r=e.type??$o.Text,o=(i=dd[r])==null?void 0:i[0].value,s=Ft[o];return{id:_a(),operation:s,label:Jb(e),name:n,type:r,value:"",...t}},jN=e=>{const t=()=>{const i=e.cols.at(0);e.set(a=>[...a,fd(i)])},n=i=>{const a=i.target.dataset.id||"",l=i.target.value;e.set(c=>c.map(u=>{if(a!==u.id)return u;const d=e.cols.find(f=>l===f.id);return fd(d,{value:""})}))},r=i=>{const a=i.target.dataset.id||"",l=i.target.value;e.set(c=>c.map(u=>u.id===a?{...u,operation:Ft[l]}:u))},o=i=>{const a=i.currentTarget.dataset.id||"";e.set(l=>l.filter(c=>c.id!==a))},s=i=>{const a=i.target.dataset.id||"",l=ud(i.target);e.set(c=>c.map(u=>u.id===a?{...u,value:l}:u))};return x.jsx(w.Fragment,{children:x.jsx(ko,{arrow:!1,title:"Filters",trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(E1,{size:14}),"Filtros ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(i=>{const a=dd[i.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Ir,{title:"Filter",options:e.options,placeholder:"Name...",value:i.name,"data-id":i.id,onChange:n}),x.jsx(Ir,{title:"Filter type","data-id":i.id,onChange:r,value:i.operation.value,options:a,placeholder:"Operator..."}),x.jsx(As,{"data-id":i.id,onChange:s,placeholder:"Search...",title:"Value",type:i.type,value:i.value}),x.jsx("div",{className:"flex items-center justify-center mt-5",children:x.jsx("button",{"data-id":i.id,type:"button",onClick:o,children:x.jsx(Xr,{className:"text-danger",size:16})})})]},`filter-select-${i.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:t,className:"text-primary flex items-center gap-1",children:[x.jsx(Tl,{size:14})," New filter"]})})]})})})},BN=({filter:e,onDelete:t,set:n})=>{const r=s=>{const i=s.target.value,a=s.target.dataset.id||"";n(l=>l.map(c=>c.id===a?{...c,operation:Ft[i]}:c))},o=s=>{const i=s.target.dataset.id||"",a=ud(s.target);n(l=>l.map(c=>c.id===i?{...c,value:a}:c))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(Ir,{"data-id":e.id,onChange:r,options:dd[e.type],placeholder:"Operation...",title:"Filter type",value:e.operation.value}),x.jsx(As,{"data-id":e.id,onChange:o,placeholder:"Looking for...",title:"Value",type:e.type,value:e.value}),x.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:x.jsx(Xr,{className:"text-danger",size:14})})]})},zN=({item:e,onPointerDown:t})=>{const n=lo(0);return x.jsxs(Di.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[x.jsx("button",{type:"button",className:"cursor-grab",children:x.jsx(T1,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},WN=e=>{var a;const t=cd(e.cols),n=pP(),[r,o]=w.useState(((a=e.groups[0])==null?void 0:a.thead)||""),s=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 qb(e.rows).GroupBy(u),p=e.cols.find(y=>y.id===u);e.setGroups(kx(h).map((y,v)=>{const b=h[y];return{...p,groupId:_a(),groupKey:u,index:v,rows:b,groupName:y}}))},i=()=>e.setGroups([]);return x.jsx(w.Fragment,{children:x.jsxs(ko,{arrow:!1,title:"Groups",trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(P1,{size:14}),"Groups",e.groups.length>0?` - ${r}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(Ir,{value:r,title:"Tipo de agrupamento",onChange:s,options:t,placeholder:"Agrupar por..."}),x.jsx(Jo,{className:"mt-4",onClick:i,theme:"raw","data-id":r,children:x.jsx(Xr,{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(JC,{children:x.jsx(Di.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(zN,{item:l,onPointerDown:c=>{n.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},HN=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.value,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),UN=(e,t)=>e.sort(HN(t)),hd={asc:{label:"Ascending",value:"asc"},desc:{label:"Descending",value:"desc"}},GN=[hd.asc,hd.desc],pd=(e,t="asc")=>({id:_a(),type:t,value:e.id,label:hd.asc.label}),YN=e=>{const t=()=>{const s=e.cols[0];s&&e.set(i=>[...i,pd(s)])},n=s=>i=>{const a=i.target.value;e.set(l=>l.map(c=>c.id===s?{...c,value:a}:c))},r=s=>i=>{const a=i.target.value;e.set(l=>l.map(c=>c.id===s?{...c,type:a}:c))},o=s=>{const i=s.currentTarget.dataset.id||"";e.set(a=>a.filter(l=>l.id!==i))};return x.jsx(w.Fragment,{children:x.jsx(ko,{arrow:!1,title:"Order By",trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(Yf,{size:14}),"Order by ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(s=>x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Ir,{onChange:n(s.id),options:e.options,title:"Field",placeholder:"Selecione um campo...",value:s.value}),x.jsx(Ir,{title:"Sort type",onChange:r(s.id),value:s.type,options:GN,placeholder:"Operação..."}),x.jsx("button",{className:"mt-4","data-id":s.id,onClick:o,children:x.jsx(Xr,{className:"text-danger",size:14})})]},`sorter-select-${s.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:t,className:"text-primary flex items-center gap-1",children:[x.jsx(Tl,{size:14})," Add sort"]})})]})})})},qN=e=>{const[t,n]=w.useState(()=>{const o=e.sorters.find(s=>s.value===e.col.id);return o?o.type:"undefined"}),r=()=>n(o=>o==="undefined"?"asc":o==="asc"?"desc":"undefined");return w.useEffect(()=>{e.setSorters(o=>{if(t==="undefined")return o.filter(i=>i.value!==e.col.id);const s=o.findIndex(i=>i.value===e.col.id);return s===-1?[...o,pd(e.col,t)]:(o[s]=pd(e.col,t),[...o])})},[t,e.col]),x.jsxs("button",{className:"isolate flex items-center",onClick:r,type:"button",children:[t==="asc"?x.jsx(y1,{size:14}):null,t==="desc"?x.jsx(g1,{size:14}):null,t==="undefined"?x.jsx(Yf,{size:14}):null]})},KN=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(jN,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(YN,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(WN,{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=ud(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function ZN(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2;const o=e-r,s=e+r;for(let a=o>2?o:2;a<=Math.min(t,s);a++)n.push(a);const i=t-2;return s+1!==i&&s+1<t&&n.push("_"),s<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const XN=e=>{const t=e.asLink||"button",n=w.useMemo(()=>ZN(e.current,e.pages),[e.current,e.pages]),r=e.current<e.pages;return x.jsxs("footer",{className:"flex px-1 py-2 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[x.jsxs("p",{children:[e.current," to ",e.pages," of ",e.totalItems," items.",e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(w.Fragment,{children:[x.jsx("select",{value:e.size,className:"cursor-pointer bg-transparent",onChange:o=>{var s;(s=e.onChangeSize)==null||s.call(e,Number(o.target.value))},children:e.sizes.map(o=>x.jsx("option",{value:o,children:o}))})," per page"]}):null]}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(t,{href:"previous",className:"",children:"Previous"})}):null,n.map(o=>o===null?null:x.jsx(w.Fragment,{children:typeof o=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(t,{href:o,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${o===e.current?"text-primary border-primary":"border-transparent"}`,children:o})},`pagination-${o}`)})),r?x.jsx("li",{children:x.jsx(t,{href:"next",className:"",children:"Next"})}):null]})})]})},QN={opacity:1},JN={opacity:.75,backgroundColor:"var(--table-border)"},eF={opacity:0,transition:{duration:.4,type:"spring"}},tF=e=>{var s;const t=e.filters.filter(i=>i.name===e.header.id),r=t.length>0?O1:C1,o=i=>{const a=i.currentTarget.dataset.id||"";return e.setFilters(l=>l.filter(c=>c.id!==a))};return x.jsx(Di.Item,{...e.header.thProps,as:"th",exit:eF,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,value:e.header,whileDrag:JN,animate:QN,className:`hidden font-medium px-2 py-4 first:table-cell md:table-cell ${((s=e.header.thProps)==null?void 0:s.className)??""}`,children:x.jsx("span",{className:"flex items-center justify-between",children:x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx(ko,{title:`Filter by ${Jb(e.header)}`,arrow:!0,trigger:x.jsx(r,{size:14}),children:t.length===0===null?null:x.jsxs("ul",{className:"font-medium",children:[t.map(i=>x.jsx("li",{className:"my-1",children:x.jsx(BN,{onDelete:o,filter:i,set:e.setFilters})},`thead-filter-${i.id}`)),x.jsx("li",{children:x.jsxs("button",{onClick:()=>e.setFilters(i=>i.concat(fd(e.header))),className:"flex items-center",children:[x.jsx(Tl,{size:14})," Add"]})})]})}),x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),x.jsx(qN,{col:e.header,setSorters:e.setSorters,sorters:e.sorters})]})})})},nF=e=>x.jsx(Di.Group,{as:"tr",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(Ii,{children:e.headers.map(t=>x.jsx(tF,{setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),rF=w.forwardRef((e,t)=>x.jsx("tbody",{...e,className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:x.jsx(Ii,{children:e.children})})),oF=w.forwardRef((e,t)=>x.jsx("table",{...e,ref:t,className:`table min-w-full divide-y divide-table-border table-auto text-left ${e.className??""}`})),sF=w.forwardRef((e,t)=>x.jsx("thead",{...e,className:"bg-card-background shadow-xs group:sticky top-0",ref:t})),iF=w.forwardRef((e,t)=>x.jsx("tr",{...e,ref:t,className:`table-row ${e.className??""}`})),aF=w.forwardRef((e,t)=>e.context.loadingMore?x.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:x.jsx("tr",{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),lF={TableHead:sF,Table:oF,TableBody:rF,TableRow:iF,TableFoot:aF},cF=[0,0,0,0,0,0,0,0,0,0],uF=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(w.Fragment,{children:r.map((s,i)=>{const a=`${i},${e}`,l=Qb(t,s.id),c=s.Element;return w.createElement("td",{...s.cellProps,"data-matrix":a,key:`accessor-${e}-${i}`,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"}):c?x.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):x.jsx(w.Fragment,{children:Pn.nil(l)?"":l}))})})},dF=()=>x.jsx(w.Fragment,{}),e0=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:s,sorters:i,cols:a,border:l=!0,setSorters:c,...u})=>{const d=w.useRef(null),[f,h]=w.useState(!1),p=Kb(n),m=Kb(u.loadingMore),y=w.useMemo(()=>{if(u.loading)return cF;if(r)return u.rows;const v=new qb(u.rows);return e.length>0&&e.forEach(b=>b.value===""||Number.isNaN(b.value)?void 0:v.Where(b.name,b.operation.symbol,b.value)),i.length===0?v.Select():UN(v.Select(),i)},[u.rows,e,i,u.loading]);return w.useEffect(()=>{if(d.current===null)return()=>{};const v=d.current,b=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 b.observe(v),()=>b.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(uN,{data:y,useWindowScroll:!0,components:lF,totalCount:y.length,itemContent:uF,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:f?dF:null,fixedHeaderContent:()=>x.jsx(nF,{sorters:i,setSorters:c,filters:e,setFilters:s,headers:a,setCols:o})}),x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),t!==null?x.jsx(XN,{...t}):null]})},fF=(e,t)=>typeof t=="function"?t(e):t,hF=e=>{const t=e.operations??!0,n=w.useMemo(()=>cd(e.cols),[e.cols]),[r,o]=$c({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},s=>{const i=a=>l=>{const c=s.state();return{...c,[a]:fF(c[a],l)}};return{cols:i("cols"),filters:i("filters"),groups:i("groups"),sorters:i("sorters")}},{postMiddleware:[s=>{var i;return(i=e.set)==null||i.call(e,s),s}]});return x.jsxs("div",{className:"relative min-w-full",children:[t?x.jsx(KN,{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(e0,{...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((s,i)=>x.jsx(Ht.div,{className:"min-w-full",children:x.jsx(e0,{...e,pagination:null,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,group:s,groups:r.groups,index:i,optionCols:n,options:n,rows:s.rows,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters})},`group-${s.groupId}`))})]})};var pF=String.prototype.replace,mF=/%20/g,md={RFC1738:"RFC1738",RFC3986:"RFC3986"},gd={default:md.RFC3986,formatters:{RFC1738:function(e){return pF.call(e,mF,"+")},RFC3986:function(e){return String(e)}},RFC1738:md.RFC1738,RFC3986:md.RFC3986},gF=gd,yd=Object.prototype.hasOwnProperty,Fr=Array.isArray,Tn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),yF=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Fr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},t0=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},vF=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Fr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!yd.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 Fr(t)&&!Fr(n)&&(o=t0(t,r)),Fr(t)&&Fr(n)?(n.forEach(function(s,i){if(yd.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return yd.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},bF=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}},vd=1024,xF=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=vd){for(var c=i.length>=vd?i.slice(l,l+vd):i,u=[],d=0;d<c.length;++d){var f=c.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===gF.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=Tn[f];continue}if(f<2048){u[u.length]=Tn[192|f>>6]+Tn[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=Tn[224|f>>12]+Tn[128|f>>6&63]+Tn[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=Tn[240|f>>18]+Tn[128|f>>12&63]+Tn[128|f>>6&63]+Tn[128|f&63]}a+=u.join("")}return a},SF=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return yF(n),t},TF=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},EF=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},CF=function(t,n){return[].concat(t,n)},PF=function(t,n){if(Fr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},n0={arrayToObject:t0,assign:bF,combine:CF,compact:SF,decode:wF,encode:xF,isBuffer:EF,isRegExp:TF,maybeMap:PF,merge:vF},r0=ix,Aa=n0,Hs=gd,kF=Object.prototype.hasOwnProperty,o0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},En=Array.isArray,OF=Array.prototype.push,s0=function(e,t){OF.apply(e,En(t)?t:[t])},_F=Date.prototype.toISOString,i0=Hs.default,pt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Aa.encode,encodeValuesOnly:!1,format:i0,formatter:Hs.formatters[i0],indices:!1,serializeDate:function(t){return _F.call(t)},skipNulls:!1,strictNullHandling:!1},AF=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},bd={},IF=function e(t,n,r,o,s,i,a,l,c,u,d,f,h,p,m,y,v,b){for(var g=t,T=b,S=0,E=!1;(T=T.get(bd))!==void 0&&!E;){var C=T.get(t);if(S+=1,typeof C<"u"){if(C===S)throw new RangeError("Cyclic object value");E=!0}typeof T.get(bd)>"u"&&(S=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&En(g)&&(g=Aa.maybeMap(g,function(P){return P instanceof Date?h(P):P})),g===null){if(i)return c&&!y?c(n,pt.encoder,v,"key",p):n;g=""}if(AF(g)||Aa.isBuffer(g)){if(c){var k=y?n:c(n,pt.encoder,v,"key",p);return[m(k)+"="+m(c(g,pt.encoder,v,"value",p))]}return[m(n)+"="+m(String(g))]}var I=[];if(typeof g>"u")return I;var N;if(r==="comma"&&En(g))y&&c&&(g=Aa.maybeMap(g,c)),N=[{value:g.length>0?g.join(",")||null:void 0}];else if(En(u))N=u;else{var L=Object.keys(g);N=d?L.sort(d):L}var O=l?n.replace(/\./g,"%2E"):n,j=o&&En(g)&&g.length===1?O+"[]":O;if(s&&En(g)&&g.length===0)return j+"[]";for(var D=0;D<N.length;++D){var _=N[D],F=typeof _=="object"&&typeof _.value<"u"?_.value:g[_];if(!(a&&F===null)){var $=f&&l?_.replace(/\./g,"%2E"):_,z=En(g)?typeof r=="function"?r(j,$):j:j+(f?"."+$:"["+$+"]");b.set(t,S);var q=r0();q.set(bd,b),s0(I,e(F,z,r,o,s,i,a,l,r==="comma"&&y&&En(g)?null:c,u,d,f,h,p,m,y,v,q))}}return I},DF=function(t){if(!t)return pt;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||pt.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=Hs.default;if(typeof t.format<"u"){if(!kF.call(Hs.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Hs.formatters[r],s=pt.filter;(typeof t.filter=="function"||En(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in o0?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=pt.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:pt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:pt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:pt.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:pt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?pt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:pt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:pt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:pt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:pt.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:pt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:pt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:pt.strictNullHandling}},MF=function(e,t){var n=e,r=DF(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):En(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=o0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=r0(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||s0(i,IF(n[d],d,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var f=i.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},Ro=n0,wd=Object.prototype.hasOwnProperty,NF=Array.isArray,ct={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Ro.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},FF=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},a0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},LF="utf8=%26%2310003%3B",VF="utf8=%E2%9C%93",$F=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,i=o.split(n.delimiter,s),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<i.length;++l)i[l].indexOf("utf8=")===0&&(i[l]===VF?c="utf-8":i[l]===LF&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],d=u.indexOf("]="),f=d===-1?u.indexOf("="):d+1,h,p;f===-1?(h=n.decoder(u,ct.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),ct.decoder,c,"key"),p=Ro.maybeMap(a0(u.slice(f+1),n),function(y){return n.decoder(y,ct.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=FF(p)),u.indexOf("[]=")>-1&&(p=NF(p)?[p]:p);var m=wd.call(r,h);m&&n.duplicates==="combine"?r[h]=Ro.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},RF=function(e,t,n,r){for(var o=r?t:a0(t,n),s=e.length-1;s>=0;--s){var i,a=e[s];if(a==="[]"&&n.parseArrays)i=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?i={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[],i[u]=o):c!=="__proto__"&&(i[c]=o)}o=i}return o},jF=function(t,n,r,o){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&i.exec(s),c=l?s.slice(0,l.index):s,u=[];if(c){if(!r.plainObjects&&wd.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(s))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&wd.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),RF(u,n,r,o)}},BF=function(t){if(!t)return ct;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.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"?ct.charset:t.charset,r=typeof t.duplicates>"u"?ct.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:ct.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ct.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ct.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ct.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ct.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ct.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ct.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:ct.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:ct.decoder,delimiter:typeof t.delimiter=="string"||Ro.isRegExp(t.delimiter)?t.delimiter:ct.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ct.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ct.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ct.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ct.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ct.strictNullHandling}},zF=function(e,t){var n=BF(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?$F(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=jF(a,r[a],n,typeof e=="string");o=Ro.merge(o,l,n)}return n.allowSparse===!0?o:Ro.compact(o)},WF=MF,HF=zF,UF=gd,GF={formats:UF,parse:HF,stringify:WF},Pe;(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 s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Pe||(Pe={}));var l0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(l0||(l0={}));const ne=Pe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Lr=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}},G=Pe.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(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):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,Pe.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 Us=(e,t)=>{let n;switch(e.code){case G.invalid_type:e.received===ne.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case G.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Pe.jsonStringifyReplacer)}`;break;case G.unrecognized_keys:n=`Unrecognized key(s) in object: ${Pe.joinValues(e.keys,", ")}`;break;case G.invalid_union:n="Invalid input";break;case G.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Pe.joinValues(e.options)}`;break;case G.invalid_enum_value:n=`Invalid enum value. Expected ${Pe.joinValues(e.options)}, received '${e.received}'`;break;case G.invalid_arguments:n="Invalid function arguments";break;case G.invalid_return_type:n="Invalid function return type";break;case G.invalid_date:n="Invalid date";break;case G.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}"`:Pe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case G.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 G.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 G.custom:n="Invalid input";break;case G.invalid_intersection_types:n="Intersection results could not be merged";break;case G.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case G.not_finite:n="Number must be finite";break;default:n=t.defaultError,Pe.assertNever(e)}return{message:n}};let YF=Us;function xd(){return YF}const Sd=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}};function J(e,t){const n=xd(),r=Sd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Us?void 0:Us].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 s=await o.key,i=await o.value;r.push({key:s,value:i})}return Lt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return me;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const me=Object.freeze({status:"aborted"}),Gs=e=>({status:"dirty",value:e}),zt=e=>({status:"valid",value:e}),c0=e=>e.status==="aborted",u0=e=>e.status==="dirty",Ia=e=>e.status==="valid",Da=e=>typeof Promise<"u"&&e instanceof Promise;function Ma(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 d0(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 ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ae||(ae={}));var Ys,qs;class Cn{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 f0=(e,t)=>{if(Ia(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:(i,a)=>{var l,c;const{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:i.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 Lr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Lr(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:Lr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Da(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:Lr(t)},s=this._parseSync({data:t,path:o.path,parent:o});return f0(o,s)}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:Lr(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Da(o)?o:Promise.resolve(o));return f0(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:G.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!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 $n({schema:this,typeName:he.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Rn.create(this,this._def)}nullable(){return Rr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ln.create(this,this._def)}promise(){return Xs.create(this,this._def)}or(t){return La.create([this,t],this._def)}and(t){return Va.create(this,t,this._def)}transform(t){return new $n({...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 g0({typeName:he.ZodBranded,type:this,...ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Wa({...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 Ha.create(this,t)}readonly(){return Ua.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const qF=/^c[^\s-]{8,}$/i,KF=/^[0-9a-z]+$/,ZF=/^[0-9A-HJKMNP-TV-Z]{26}$/,XF=/^[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,QF=/^[a-z0-9_-]{21}$/i,JF=/^[-+]?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)?)??$/,eL=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,tL="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Td;const nL=/^(?:(?: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])$/,rL=/^(([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})))$/,oL=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,h0="((\\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])))",sL=new RegExp(`^${h0}$`);function p0(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(`^${p0(e)}$`)}function aL(e){let t=`${h0}T${p0(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 lL(e,t){return!!((t==="v4"||!t)&&nL.test(e)||(t==="v6"||!t)&&rL.test(e))}class Fn extends xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ne.string){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:ne.string,received:s.parsedType}),me}const r=new Lt;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?J(o,{code:G.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&J(o,{code:G.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")eL.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"email",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Td||(Td=new RegExp(tL,"u")),Td.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"emoji",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")XF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"uuid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")QF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"nanoid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")qF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"cuid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")KF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"cuid2",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")ZF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"ulid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),J(o,{validation:"url",code:G.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"regex",code:G.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?aL(s).test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?sL.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?iL(s).test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?JF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"duration",code:G.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?lL(t.data,s.version)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"ip",code:G.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?oL.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"base64",code:G.invalid_string,message:s.message}),r.dirty()):Pe.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:G.invalid_string,...ae.errToObj(r)})}_addCheck(t){return new Fn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ae.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ae.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ae.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,...ae.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,...ae.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ae.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ae.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ae.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ae.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ae.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ae.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ae.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ae.errToObj(n)})}nonempty(t){return this.min(1,ae.errToObj(t))}trim(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Fn({...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}}Fn.create=e=>{var t;return new Fn({checks:[],typeName:he.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};function cL(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Vr 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 s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:ne.number,received:s.parsedType}),me}let r;const o=new Lt;for(const s of this._def.checks)s.kind==="int"?Pe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:G.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?cL(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:G.not_finite,message:s.message}),o.dirty()):Pe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ae.toString(n))}setLimit(t,n,r,o){return new Vr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ae.toString(o)}]})}_addCheck(t){return new Vr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ae.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ae.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"&&Pe.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)}}Vr.create=e=>new Vr({checks:[],typeName:he.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class jo 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 s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:ne.bigint,received:s.parsedType}),me}let r;const o=new Lt;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Pe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ae.toString(n))}setLimit(t,n,r,o){return new jo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ae.toString(o)}]})}_addCheck(t){return new jo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ae.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}}jo.create=e=>{var t;return new jo({checks:[],typeName:he.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};class Ed extends xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ne.boolean){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:ne.boolean,received:r.parsedType}),me}return zt(t.data)}}Ed.create=e=>new Ed({typeName:he.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Ks extends xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ne.date){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:ne.date,received:s.parsedType}),me}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_date}),me}const r=new Lt;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Pe.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ks({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ae.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ae.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}}Ks.create=e=>new Ks({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:he.ZodDate,...ye(e)});class Cd extends xe{_parse(t){if(this._getType(t)!==ne.symbol){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:ne.symbol,received:r.parsedType}),me}return zt(t.data)}}Cd.create=e=>new Cd({typeName:he.ZodSymbol,...ye(e)});class Na extends xe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:ne.undefined,received:r.parsedType}),me}return zt(t.data)}}Na.create=e=>new Na({typeName:he.ZodUndefined,...ye(e)});class Fa extends xe{_parse(t){if(this._getType(t)!==ne.null){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:ne.null,received:r.parsedType}),me}return zt(t.data)}}Fa.create=e=>new Fa({typeName:he.ZodNull,...ye(e)});class Pd extends xe{constructor(){super(...arguments),this._any=!0}_parse(t){return zt(t.data)}}Pd.create=e=>new Pd({typeName:he.ZodAny,...ye(e)});class Bo extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return zt(t.data)}}Bo.create=e=>new Bo({typeName:he.ZodUnknown,...ye(e)});class hr extends xe{_parse(t){const n=this._getOrReturnCtx(t);return J(n,{code:G.invalid_type,expected:ne.never,received:n.parsedType}),me}}hr.create=e=>new hr({typeName:he.ZodNever,...ye(e)});class kd extends xe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:ne.void,received:r.parsedType}),me}return zt(t.data)}}kd.create=e=>new kd({typeName:he.ZodVoid,...ye(e)});class ln extends xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ne.array)return J(n,{code:G.invalid_type,expected:ne.array,received:n.parsedType}),me;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(J(n,{code:i?G.too_big:G.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?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&&(J(n,{code:G.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&&(J(n,{code:G.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((i,a)=>o.type._parseAsync(new Cn(n,i,n.path,a)))).then(i=>Lt.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Cn(n,i,n.path,a)));return Lt.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new ln({...this._def,minLength:{value:t,message:ae.toString(n)}})}max(t,n){return new ln({...this._def,maxLength:{value:t,message:ae.toString(n)}})}length(t,n){return new ln({...this._def,exactLength:{value:t,message:ae.toString(n)}})}nonempty(t){return this.min(1,t)}}ln.create=(e,t)=>new ln({type:e,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...ye(t)});function zo(e){if(e instanceof nt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Rn.create(zo(r))}return new nt({...e._def,shape:()=>t})}else return e instanceof ln?new ln({...e._def,type:zo(e.element)}):e instanceof Rn?Rn.create(zo(e.unwrap())):e instanceof Rr?Rr.create(zo(e.unwrap())):e instanceof Vn?Vn.create(e.items.map(t=>zo(t))):e}class nt 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=Pe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ne.object){const c=this._getOrReturnCtx(t);return J(c,{code:G.invalid_type,expected:ne.object,received:c.parsedType}),me}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof hr&&this._def.unknownKeys==="strip"))for(const c in o.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const u=s[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Cn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof hr){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&&(J(o,{code:G.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 Cn(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 ae.errToObj,new nt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=ae.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new nt({...this._def,unknownKeys:"strip"})}passthrough(){return new nt({...this._def,unknownKeys:"passthrough"})}extend(t){return new nt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new nt({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 nt({...this._def,catchall:t})}pick(t){const n={};return Pe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new nt({...this._def,shape:()=>n})}omit(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new nt({...this._def,shape:()=>n})}deepPartial(){return zo(this)}partial(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new nt({...this._def,shape:()=>n})}required(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Rn;)s=s._def.innerType;n[r]=s}}),new nt({...this._def,shape:()=>n})}keyof(){return m0(Pe.objectKeys(this.shape))}}nt.create=(e,t)=>new nt({shape:()=>e,unknownKeys:"strip",catchall:hr.create(),typeName:he.ZodObject,...ye(t)}),nt.strictCreate=(e,t)=>new nt({shape:()=>e,unknownKeys:"strict",catchall:hr.create(),typeName:he.ZodObject,...ye(t)}),nt.lazycreate=(e,t)=>new nt({shape:e,unknownKeys:"strip",catchall:hr.create(),typeName:he.ZodObject,...ye(t)});class La extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new en(a.ctx.common.issues));return J(n,{code:G.invalid_union,unionErrors:i}),me}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];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"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new en(l));return J(n,{code:G.invalid_union,unionErrors:a}),me}}get options(){return this._def.options}}La.create=(e,t)=>new La({options:e,typeName:he.ZodUnion,...ye(t)});const Ln=e=>e instanceof Ra?Ln(e.schema):e instanceof $n?Ln(e.innerType()):e instanceof ja?[e.value]:e instanceof $r?e.options:e instanceof Ba?Pe.objectValues(e.enum):e instanceof za?Ln(e._def.innerType):e instanceof Na?[void 0]:e instanceof Fa?[null]:e instanceof Rn?[void 0,...Ln(e.unwrap())]:e instanceof Rr?[null,...Ln(e.unwrap())]:e instanceof g0||e instanceof Ua?Ln(e.unwrap()):e instanceof Wa?Ln(e._def.innerType):[];class Od extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.object)return J(n,{code:G.invalid_type,expected:ne.object,received:n.parsedType}),me;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(J(n,{code:G.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 s of n){const i=Ln(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new Od({typeName:he.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...ye(r)})}}function _d(e,t){const n=Lr(e),r=Lr(t);if(e===t)return{valid:!0,data:e};if(n===ne.object&&r===ne.object){const o=Pe.objectKeys(t),s=Pe.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=_d(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===ne.array&&r===ne.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=_d(i,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 Va extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(c0(s)||c0(i))return me;const a=_d(s.value,i.value);return a.valid?((u0(s)||u0(i))&&n.dirty(),{status:n.value,value:a.data}):(J(r,{code:G.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(([s,i])=>o(s,i)):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}))}}Va.create=(e,t,n)=>new Va({left:e,right:t,typeName:he.ZodIntersection,...ye(n)});class Vn extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.array)return J(r,{code:G.invalid_type,expected:ne.array,received:r.parsedType}),me;if(r.data.length<this._def.items.length)return J(r,{code:G.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&r.data.length>this._def.items.length&&(J(r,{code:G.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Cn(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>Lt.mergeArray(n,i)):Lt.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Vn({...this._def,rest:t})}}Vn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Vn({items:e,typeName:he.ZodTuple,rest:null,...ye(t)})};class $a 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 J(r,{code:G.invalid_type,expected:ne.object,received:r.parsedType}),me;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Cn(r,a,r.path,a)),value:i._parse(new Cn(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 $a({keyType:t,valueType:n,typeName:he.ZodRecord,...ye(r)}):new $a({keyType:Fn.create(),valueType:t,typeName:he.ZodRecord,...ye(n)})}}class Ad 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 J(r,{code:G.invalid_type,expected:ne.map,received:r.parsedType}),me;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Cn(r,a,r.path,[c,"key"])),value:s._parse(new Cn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){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 i){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}}}}Ad.create=(e,t,n)=>new Ad({valueType:t,keyType:e,typeName:he.ZodMap,...ye(n)});class Wo extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.set)return J(r,{code:G.invalid_type,expected:ne.set,received:r.parsedType}),me;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(J(r,{code:G.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&&(J(r,{code:G.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(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)=>s._parse(new Cn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new Wo({...this._def,minSize:{value:t,message:ae.toString(n)}})}max(t,n){return new Wo({...this._def,maxSize:{value:t,message:ae.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Wo.create=(e,t)=>new Wo({valueType:e,minSize:null,maxSize:null,typeName:he.ZodSet,...ye(t)});class Zs extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.function)return J(n,{code:G.invalid_type,expected:ne.function,received:n.parsedType}),me;function r(a,l){return Sd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,xd(),Us].filter(c=>!!c),issueData:{code:G.invalid_arguments,argumentsError:l}})}function o(a,l){return Sd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,xd(),Us].filter(c=>!!c),issueData:{code:G.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Xs){const a=this;return zt(async function(...l){const c=new en([]),u=await a._def.args.parseAsync(l,s).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{const a=this;return zt(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new en([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(u,s);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 Zs({...this._def,args:Vn.create(t).rest(Bo.create())})}returns(t){return new Zs({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Zs({args:t||Vn.create([]).rest(Bo.create()),returns:n||Bo.create(),typeName:he.ZodFunction,...ye(r)})}}class Ra 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})}}Ra.create=(e,t)=>new Ra({getter:e,typeName:he.ZodLazy,...ye(t)});class ja extends xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return J(n,{received:n.data,code:G.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:t.data}}get value(){return this._def.value}}ja.create=(e,t)=>new ja({value:e,typeName:he.ZodLiteral,...ye(t)});function m0(e,t){return new $r({values:e,typeName:he.ZodEnum,...ye(t)})}class $r extends xe{constructor(){super(...arguments),Ys.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{expected:Pe.joinValues(r),received:n.parsedType,code:G.invalid_type}),me}if(Ma(this,Ys)||d0(this,Ys,new Set(this._def.values)),!Ma(this,Ys).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{received:n.data,code:G.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 $r.create(t,{...this._def,...n})}exclude(t,n=this._def){return $r.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ys=new WeakMap,$r.create=m0;class Ba extends xe{constructor(){super(...arguments),qs.set(this,void 0)}_parse(t){const n=Pe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ne.string&&r.parsedType!==ne.number){const o=Pe.objectValues(n);return J(r,{expected:Pe.joinValues(o),received:r.parsedType,code:G.invalid_type}),me}if(Ma(this,qs)||d0(this,qs,new Set(Pe.getValidEnumValues(this._def.values))),!Ma(this,qs).has(t.data)){const o=Pe.objectValues(n);return J(r,{received:r.data,code:G.invalid_enum_value,options:o}),me}return zt(t.data)}get enum(){return this._def.values}}qs=new WeakMap,Ba.create=(e,t)=>new Ba({values:e,typeName:he.ZodNativeEnum,...ye(t)});class Xs 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 J(n,{code:G.invalid_type,expected:ne.promise,received:n.parsedType}),me;const r=n.parsedType===ne.promise?n.data:Promise.resolve(n.data);return zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Xs.create=(e,t)=>new Xs({type:e,typeName:he.ZodPromise,...ye(t)});class $n 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,s={addIssue:i=>{J(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).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"?Gs(l.value):l});{if(n.value==="aborted")return me;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?me:a.status==="dirty"||n.value==="dirty"?Gs(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);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(),i(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(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ia(i))return i;const a=o.transform(i.value,s);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(i=>Ia(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);Pe.assertNever(o)}}$n.create=(e,t,n)=>new $n({schema:e,typeName:he.ZodEffects,effect:t,...ye(n)}),$n.createWithPreprocess=(e,t,n)=>new $n({schema:t,effect:{type:"preprocess",transform:e},typeName:he.ZodEffects,...ye(n)});class Rn extends xe{_parse(t){return this._getType(t)===ne.undefined?zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Rn.create=(e,t)=>new Rn({innerType:e,typeName:he.ZodOptional,...ye(t)});class Rr extends xe{_parse(t){return this._getType(t)===ne.null?zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Rr.create=(e,t)=>new Rr({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===ne.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 Wa 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 Da(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.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}}Wa.create=(e,t)=>new Wa({innerType:e,typeName:he.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ye(t)});class Id extends xe{_parse(t){if(this._getType(t)!==ne.nan){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:ne.nan,received:r.parsedType}),me}return{status:"valid",value:t.data}}}Id.create=e=>new Id({typeName:he.ZodNaN,...ye(e)});class g0 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 Ha extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?me:s.status==="dirty"?(n.dirty(),Gs(s.value)):this._def.out._parseAsync({data:s.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 Ha({in:t,out:n,typeName:he.ZodPipeline})}}class Ua extends xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Ia(o)&&(o.value=Object.freeze(o.value)),o);return Da(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ua.create=(e,t)=>new Ua({innerType:e,typeName:he.ZodReadonly,...ye(t)}),nt.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={})),Fn.create,Vr.create,Id.create,jo.create,Ed.create,Ks.create,Cd.create,Na.create,Fa.create,Pd.create,Bo.create,hr.create,kd.create,ln.create,nt.create,nt.strictCreate,La.create,Od.create,Va.create,Vn.create,$a.create,Ad.create,Wo.create,Zs.create,Ra.create,ja.create,$r.create,Ba.create,Xs.create,$n.create,Rn.create,Rr.create,$n.createWithPreprocess,Ha.create;const uL={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},y0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return GF.parse(n.toString(),uL)},v0=e=>e.replace("[",".").replace("]","").split("."),Dd=(e,t)=>v0(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o instanceof ln?o.element:o},t),Ga=e=>e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value,dL=e=>{const[t,n]=w.useState(null),r=w.useRef({}),o=(l,c)=>{const u=Dd(l,e);return{...c,name:l,id:l,error:t==null?void 0:t[l],ref:d=>{d!==null&&(r.current[l]={element:d,schema:u})}}},s=(l,c)=>{const u=Dd(l,e);return{...c,name:l,id:l,type:Pn.instance(u,Vr)?"number":(c==null?void 0:c.type)??"text",error:t==null?void 0:t[l],ref:d=>{d!==null&&(r.current[l]={element:d,schema:u})}}};w.useEffect(()=>{const l=Object.values(r.current).map(u=>{const d=u.schema.safeParse(Ga(u.element)),f=p=>{const m=u.schema.safeParse(Ga(p.target)),y=u.element,v=y.name;if(m.success)return y.setCustomValidity(""),n(b=>{const{[v]:g,...T}=b||{};return T===null||Pn.empty(T)?null:T});if(y.required){const b=m.error.issues[0].message;y.setCustomValidity(b),n(g=>({...g,[v]:b}))}},h=u.element.tagName==="INPUT"?"blur":"change";return u.element.addEventListener(h,f),{input:u,hasInitialError:u.element.required?!d.success:!1,unsubscribe:()=>u.element.removeEventListener(h,f)}});return l.some(u=>u.hasInitialError)&&n(u=>u===null?{}:u),()=>l.forEach(u=>u.unsubscribe())});const i=w.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget,d=Object.values(r.current).reduce((h,p)=>{const m=p.element,y=p.schema.safeParse(Ga(m));if(y.success)return h;const v=y.error.issues[0].message;return m.setAttribute("data-initialized","true"),{...h,[m.name]:v}},{}),f=Pn.empty(d)?null:{};n(f),l==null||l({form:u,errors:f||{}})},[]),a=w.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget;let d=y0(u);Array.from(u.elements).forEach(f=>{if(f.tagName==="SELECT"){const h=f;d=$f(d,h.name,h.value)}if(f.tagName==="INPUT"){const h=f;d=$f(d,h.name,Ga(h))}}),l({form:u,json:d,event:c,reset:()=>Wv(u)})},[]);return{input:s,select:o,onSubmit:a,errors:t,onInvalid:i,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%)",accent:"hsla(199, 89%, 54%)",disabled:"hsla(240, 4%, 33%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",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%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)"},danger:{DEFAULT:"hsla(358, 75%, 59%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(210, 40%, 98%)"},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%, 15%)"},table:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"}}},hL={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:{full:"50%",pill:"2rem",card:"0.75rem"},colors:{foreground:"hsla(217, 15%, 32%)",background:"hsla(210, 34%, 96%)",accent:"hsla(199, 89%, 54%)",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%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(210, 34%, 96%)"},input:{border:"hsla(218, 22%, 80%)",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%, 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%, 15%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"}}},pL={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>)`},Qs=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return o.concat(t(i,l,a))}return o.concat(Qs(i,t,n,a))},[]),b0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return{...o,[l]:t(i,s,a)}}return{...o,[s]:b0(i,t,n,a)}},{}),w0={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Md=(e,t)=>{const n=t.value||((o,s)=>s),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},mL={default:e=>Md(e,{result:w0.default}),dark:e=>Md(e,{result:w0.dark})},gL=(e,t)=>{const n=(i,a,l)=>({key:`--${l}`,value:`${i}`}),r=Qs(e.colors,n),o=Qs(e.spacing,n),s=Qs(e.rounded,n);return Md(r.concat(o,s),{result:i=>`html${t?`.${t}`:""} {${i}}`,value:(i,a)=>a.replace("hsla(","").replace(")","")})};te.Alert=yP,te.Autocomplete=pI,te.Button=Jo,te.ButtonGroup=u1,te.Calendar=Gg,te.Card=Yg,te.Checkbox=ov,te.ColType=$o,te.Collapse=qm,te.DatePicker=gI,te.Dropdown=ko,te.FileUpload=OD,te.Form=AD,te.Input=As,te.InputFeedback=nv,te.InputField=la,te.Modal=cI,te.Option=rv,te.Polymorph=Zr,te.Radiobox=ID,te.Select=Ir,te.Stats=i_,te.Switch=DD,te.Tab=c_,te.Table=hF,te.Tabs=a_,te.Tag=f1,te.Tooltip=uI,te.TransferList=hN,te.convertPath=v0,te.createColumns=VN,te.createDesignTokens=b0,te.createOptionCols=cd,te.createStyles=mL,te.createTheme=gL,te.css=Ct,te.defaultDarkTheme=fL,te.defaultLightTheme=hL,te.dispatchInput=Sl,te.formReset=Wv,te.formToJson=y0,te.getSchemaShape=Dd,te.isReactComponent=a1,te.isReactFC=l1,te.isSsr=ad,te.mergeRefs=xl,te.parsers=pL,te.path=Qb,te.reduceTokens=Qs,te.useForm=dL,te.usePrevious=tv,te.useReactive=qg,te.useTablePreferences=RN,te.uuid=_a,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
|
|
190
|
+
*/var Cu,Av;function YA(){if(Av)return Cu;Av=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(u){return i[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Cu=o()?Object.assign:function(s,i){for(var a,l=r(s),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Cu}var Pu,Dv;function ku(){if(Dv)return Pu;Dv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Pu=e,Pu}var Ou,Mv;function Nv(){return Mv||(Mv=1,Ou=Function.call.bind(Object.prototype.hasOwnProperty)),Ou}var Iu,Fv;function qA(){if(Fv)return Iu;Fv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ku(),n={},r=Nv();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in s)if(r(s,u)){var d;try{if(typeof s[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=s[u](i,u,l,a,null,t)}catch(p){d=p}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Iu=o,Iu}var _u,Lv;function KA(){if(Lv)return _u;Lv=1;var e=_v(),t=YA(),n=ku(),r=Nv(),o=qA(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return _u=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(P){var j=P&&(c&&P[c]||P[u]);if(typeof j=="function")return j}var f="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:w(),arrayOf:g,element:S(),elementType:T(),instanceOf:E,node:I(),objectOf:A,oneOf:k,oneOfType:D,shape:F,exact:R};function p(P,j){return P===j?P!==0||1/P===1/j:P!==P&&j!==j}function m(P,j){this.message=P,this.data=j&&typeof j=="object"?j:{},this.stack=""}m.prototype=Error.prototype;function y(P){if(process.env.NODE_ENV!=="production")var j={},Z=0;function re(U,N,B,W,$,Y,oe){if(W=W||f,Y=Y||B,oe!==n){if(l){var z=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 z.name="Invariant Violation",z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ne=W+":"+B;!j[Ne]&&Z<3&&(s("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."),j[Ne]=!0,Z++)}}return N[B]==null?U?N[B]===null?new m("The "+$+" `"+Y+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+$+" `"+Y+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:P(N,B,W,$,Y)}var J=re.bind(null,!1);return J.isRequired=re.bind(null,!0),J}function v(P){function j(Z,re,J,U,N,B){var W=Z[re],$=M(W);if($!==P){var Y=L(W);return new m("Invalid "+U+" `"+N+"` of type "+("`"+Y+"` supplied to `"+J+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return y(j)}function w(){return y(i)}function g(P){function j(Z,re,J,U,N){if(typeof P!="function")return new m("Property `"+N+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var B=Z[re];if(!Array.isArray(B)){var W=M(B);return new m("Invalid "+U+" `"+N+"` of type "+("`"+W+"` supplied to `"+J+"`, expected an array."))}for(var $=0;$<B.length;$++){var Y=P(B,$,J,U,N+"["+$+"]",n);if(Y instanceof Error)return Y}return null}return y(j)}function S(){function P(j,Z,re,J,U){var N=j[Z];if(!a(N)){var B=M(N);return new m("Invalid "+J+" `"+U+"` of type "+("`"+B+"` supplied to `"+re+"`, expected a single ReactElement."))}return null}return y(P)}function T(){function P(j,Z,re,J,U){var N=j[Z];if(!e.isValidElementType(N)){var B=M(N);return new m("Invalid "+J+" `"+U+"` of type "+("`"+B+"` supplied to `"+re+"`, expected a single ReactElement type."))}return null}return y(P)}function E(P){function j(Z,re,J,U,N){if(!(Z[re]instanceof P)){var B=P.name||f,W=G(Z[re]);return new m("Invalid "+U+" `"+N+"` of type "+("`"+W+"` supplied to `"+J+"`, expected ")+("instance of `"+B+"`."))}return null}return y(j)}function k(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function j(Z,re,J,U,N){for(var B=Z[re],W=0;W<P.length;W++)if(p(B,P[W]))return null;var $=JSON.stringify(P,function(oe,z){var Ne=L(z);return Ne==="symbol"?String(z):z});return new m("Invalid "+U+" `"+N+"` of value `"+String(B)+"` "+("supplied to `"+J+"`, expected one of "+$+"."))}return y(j)}function A(P){function j(Z,re,J,U,N){if(typeof P!="function")return new m("Property `"+N+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var B=Z[re],W=M(B);if(W!=="object")return new m("Invalid "+U+" `"+N+"` of type "+("`"+W+"` supplied to `"+J+"`, expected an object."));for(var $ in B)if(r(B,$)){var Y=P(B,$,J,U,N+"."+$,n);if(Y instanceof Error)return Y}return null}return y(j)}function D(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var j=0;j<P.length;j++){var Z=P[j];if(typeof Z!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(Z)+" at index "+j+"."),i}function re(J,U,N,B,W){for(var $=[],Y=0;Y<P.length;Y++){var oe=P[Y],z=oe(J,U,N,B,W,n);if(z==null)return null;z.data&&r(z.data,"expectedType")&&$.push(z.data.expectedType)}var Ne=$.length>0?", expected one of type ["+$.join(", ")+"]":"";return new m("Invalid "+B+" `"+W+"` supplied to "+("`"+N+"`"+Ne+"."))}return y(re)}function I(){function P(j,Z,re,J,U){return C(j[Z])?null:new m("Invalid "+J+" `"+U+"` supplied to "+("`"+re+"`, expected a ReactNode."))}return y(P)}function V(P,j,Z,re,J){return new m((P||"React class")+": "+j+" type `"+Z+"."+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function F(P){function j(Z,re,J,U,N){var B=Z[re],W=M(B);if(W!=="object")return new m("Invalid "+U+" `"+N+"` of type `"+W+"` "+("supplied to `"+J+"`, expected `object`."));for(var $ in P){var Y=P[$];if(typeof Y!="function")return V(J,U,N,$,L(Y));var oe=Y(B,$,J,U,N+"."+$,n);if(oe)return oe}return null}return y(j)}function R(P){function j(Z,re,J,U,N){var B=Z[re],W=M(B);if(W!=="object")return new m("Invalid "+U+" `"+N+"` of type `"+W+"` "+("supplied to `"+J+"`, expected `object`."));var $=t({},Z[re],P);for(var Y in $){var oe=P[Y];if(r(P,Y)&&typeof oe!="function")return V(J,U,N,Y,L(oe));if(!oe)return new m("Invalid "+U+" `"+N+"` key `"+Y+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(Z[re],null," ")+`
|
|
191
|
+
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var z=oe(B,Y,J,U,N+"."+Y,n);if(z)return z}return null}return y(j)}function C(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(C);if(P===null||a(P))return!0;var j=d(P);if(j){var Z=j.call(P),re;if(j!==P.entries){for(;!(re=Z.next()).done;)if(!C(re.value))return!1}else for(;!(re=Z.next()).done;){var J=re.value;if(J&&!C(J[1]))return!1}}else return!1;return!0;default:return!1}}function O(P,j){return P==="symbol"?!0:j?j["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&j instanceof Symbol:!1}function M(P){var j=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":O(j,P)?"symbol":j}function L(P){if(typeof P>"u"||P===null)return""+P;var j=M(P);if(j==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return j}function H(P){var j=L(P);switch(j){case"array":case"object":return"an "+j;case"boolean":case"date":case"regexp":return"a "+j;default:return j}}function G(P){return!P.constructor||!P.constructor.name?f:P.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},_u}var Au,Vv;function ZA(){if(Vv)return Au;Vv=1;var e=ku();function t(){}function n(){}return n.resetWarningCache=t,Au=function(){function r(i,a,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Au}if(process.env.NODE_ENV!=="production"){var XA=_v(),QA=!0;Eu.exports=KA()(XA.isElement,QA)}else Eu.exports=ZA()();var JA=Eu.exports;const ze=ef(JA);function Mo(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function No(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(s=c[0]&2?o.return:c[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,c[1])).done)return s;switch(o=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function $v(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function Rv(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var eD=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 Vs(e,t){var n=tD(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 tD(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=eD.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var nD=[".DS_Store","Thumbs.db"];function rD(e){return Mo(this,void 0,void 0,function(){return No(this,function(t){return ma(e)&&oD(e.dataTransfer)?[2,lD(e.dataTransfer,e.type)]:sD(e)?[2,iD(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,aD(e)]:[2,[]]})})}function oD(e){return ma(e)}function sD(e){return ma(e)&&ma(e.target)}function ma(e){return typeof e=="object"&&e!==null}function iD(e){return Du(e.target.files).map(function(t){return Vs(t)})}function aD(e){return Mo(this,void 0,void 0,function(){var t;return No(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 Vs(r)})]}})})}function lD(e,t){return Mo(this,void 0,void 0,function(){var n,r;return No(this,function(o){switch(o.label){case 0:return e.items?(n=Du(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(cD))]):[3,2];case 1:return r=o.sent(),[2,jv(Bv(r))];case 2:return[2,jv(Du(e.files).map(function(s){return Vs(s)}))]}})})}function jv(e){return e.filter(function(t){return nD.indexOf(t.name)===-1})}function Du(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function cD(e){if(typeof e.webkitGetAsEntry!="function")return zv(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Wv(t):zv(e)}function Bv(e){return e.reduce(function(t,n){return Rv(Rv([],$v(t),!1),$v(Array.isArray(n)?Bv(n):[n]),!1)},[])}function zv(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Vs(t);return Promise.resolve(n)}function uD(e){return Mo(this,void 0,void 0,function(){return No(this,function(t){return[2,e.isDirectory?Wv(e):dD(e)]})})}function Wv(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return Mo(i,void 0,void 0,function(){var l,c,u;return No(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(uD)),o.push(u),s(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function dD(e){return Mo(this,void 0,void 0,function(){return No(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=Vs(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var fD=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),s=o.replace(/\/.*$/,"");return n.some(function(i){var a=i.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):o===a})}return!0};function Hv(e){return mD(e)||pD(e)||qv(e)||hD()}function hD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
192
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mD(e){if(Array.isArray(e))return Mu(e)}function Uv(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 Gv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uv(Object(n),!0).forEach(function(r){Yv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $s(e,t){return vD(e)||yD(e,t)||qv(e,t)||gD()}function gD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
193
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qv(e,t){if(e){if(typeof e=="string")return Mu(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 Mu(e,t)}}function Mu(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 yD(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function vD(e){if(Array.isArray(e))return e}var bD="file-invalid-type",wD="file-too-large",xD="file-too-small",TD="too-many-files",SD=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:bD,message:"File type must be ".concat(n)}},Kv=function(t){return{code:wD,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Zv=function(t){return{code:xD,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},ED={code:TD,message:"Too many files"};function Xv(e,t){var n=e.type==="application/x-moz-file"||fD(e,t);return[n,n?null:SD(t)]}function Qv(e,t,n){if(Fr(e.size))if(Fr(t)&&Fr(n)){if(e.size>n)return[!1,Kv(n)];if(e.size<t)return[!1,Zv(t)]}else{if(Fr(t)&&e.size<t)return[!1,Zv(t)];if(Fr(n)&&e.size>n)return[!1,Kv(n)]}return[!0,null]}function Fr(e){return e!=null}function CD(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(l){var c=Xv(l,n),u=$s(c,1),d=u[0],f=Qv(l,r,o),h=$s(f,1),p=h[0],m=a?a(l):null;return d&&p&&!m})}function ga(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ya(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 Jv(e){e.preventDefault()}function PD(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function kD(e){return e.indexOf("Edge/")!==-1}function OD(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return PD(e)||kD(e)}function yn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t.some(function(a){return!ga(r)&&a&&a.apply(void 0,[r].concat(s)),ga(r)})}}function ID(){return"showOpenFilePicker"in window}function _D(e){if(Fr(e)){var t=Object.entries(e).filter(function(n){var r=$s(n,2),o=r[0],s=r[1],i=!0;return eb(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),i=!1),(!Array.isArray(s)||!s.every(tb))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=$s(r,2),s=o[0],i=o[1];return Gv(Gv({},n),{},Yv({},s,i))},{});return[{description:"Files",accept:t}]}return e}function AD(e){if(Fr(e))return Object.entries(e).reduce(function(t,n){var r=$s(n,2),o=r[0],s=r[1];return[].concat(Hv(t),[o],Hv(s))},[]).filter(function(t){return eb(t)||tb(t)}).join(",")}function DD(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function MD(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function eb(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function tb(e){return/^.*\.[\w]+$/.test(e)}var ND=["children"],FD=["open"],LD=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],VD=["refKey","onChange","onClick"];function $D(e){return BD(e)||jD(e)||nb(e)||RD()}function RD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
194
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BD(e){if(Array.isArray(e))return Fu(e)}function Nu(e,t){return HD(e)||WD(e,t)||nb(e,t)||zD()}function zD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
195
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nb(e,t){if(e){if(typeof e=="string")return Fu(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 Fu(e,t)}}function Fu(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 WD(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function HD(e){if(Array.isArray(e))return e}function rb(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 Qe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rb(Object(n),!0).forEach(function(r){Lu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function va(e,t){if(e==null)return{};var n=UD(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UD(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Vu=b.forwardRef(function(e,t){var n=e.children,r=va(e,ND),o=sb(r),s=o.open,i=va(o,FD);return b.useImperativeHandle(t,function(){return{open:s}},[s]),b.createElement(b.Fragment,null,n(Qe(Qe({},i),{},{open:s})))});Vu.displayName="Dropzone";var ob={disabled:!1,getFilesFromEvent:rD,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};Vu.defaultProps=ob,Vu.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 $u={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=Qe(Qe({},ob),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,y=t.onFileDialogOpen,v=t.useFsAccessApi,w=t.autoFocus,g=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,E=t.noDrag,k=t.noDragEventsBubbling,A=t.onError,D=t.validator,I=b.useMemo(function(){return AD(n)},[n]),V=b.useMemo(function(){return _D(n)},[n]),F=b.useMemo(function(){return typeof y=="function"?y:ib},[y]),R=b.useMemo(function(){return typeof m=="function"?m:ib},[m]),C=b.useRef(null),O=b.useRef(null),M=b.useReducer(GD,$u),L=Nu(M,2),H=L[0],G=L[1],P=H.isFocused,j=H.isFileDialogActive,Z=b.useRef(typeof window<"u"&&window.isSecureContext&&v&&ID()),re=function(){!Z.current&&j&&setTimeout(function(){if(O.current){var ae=O.current.files;ae.length||(G({type:"closeDialog"}),R())}},300)};b.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[O,j,R,Z]);var J=b.useRef([]),U=function(ae){C.current&&C.current.contains(ae.target)||(ae.preventDefault(),J.current=[])};b.useEffect(function(){return g&&(document.addEventListener("dragover",Jv,!1),document.addEventListener("drop",U,!1)),function(){g&&(document.removeEventListener("dragover",Jv),document.removeEventListener("drop",U))}},[C,g]),b.useEffect(function(){return!r&&w&&C.current&&C.current.focus(),function(){}},[C,w,r]);var N=b.useCallback(function(Q){A?A(Q):console.error(Q)},[A]),B=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),ke(Q),J.current=[].concat($D(J.current),[Q.target]),ya(Q)&&Promise.resolve(o(Q)).then(function(ae){if(!(ga(Q)&&!k)){var _e=ae.length,Ke=_e>0&&CD({files:ae,accept:I,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:D}),kt=_e>0&&!Ke;G({isDragAccept:Ke,isDragReject:kt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Q)}}).catch(function(ae){return N(ae)})},[o,c,N,k,I,i,s,a,l,D]),W=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),ke(Q);var ae=ya(Q);if(ae&&Q.dataTransfer)try{Q.dataTransfer.dropEffect="copy"}catch{}return ae&&d&&d(Q),!1},[d,k]),$=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),ke(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)&&(G({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ya(Q)&&u&&u(Q))},[C,u,k]),Y=b.useCallback(function(Q,ae){var _e=[],Ke=[];Q.forEach(function(kt){var Nt=Xv(kt,I),Vt=Nu(Nt,2),Hr=Vt[0],Yo=Vt[1],qo=Qv(kt,i,s),Xa=Nu(qo,2),Bd=Xa[0],zd=Xa[1],Wd=D?D(kt):null;if(Hr&&Bd&&!Wd)_e.push(kt);else{var Hd=[Yo,zd];Wd&&(Hd=Hd.concat(Wd)),Ke.push({file:kt,errors:Hd.filter(function(WL){return WL})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(kt){Ke.push({file:kt,errors:[ED]})}),_e.splice(0)),G({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)},[G,a,I,i,s,l,f,h,p,D]),oe=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),ke(Q),J.current=[],ya(Q)&&Promise.resolve(o(Q)).then(function(ae){ga(Q)&&!k||Y(ae,Q)}).catch(function(ae){return N(ae)}),G({type:"reset"})},[o,Y,N,k]),z=b.useCallback(function(){if(Z.current){G({type:"openDialog"}),F();var Q={multiple:a,types:V};window.showOpenFilePicker(Q).then(function(ae){return o(ae)}).then(function(ae){Y(ae,null),G({type:"closeDialog"})}).catch(function(ae){DD(ae)?(R(ae),G({type:"closeDialog"})):MD(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&&(G({type:"openDialog"}),F(),O.current.value=null,O.current.click())},[G,F,R,v,Y,N,V,a]),Ne=b.useCallback(function(Q){!C.current||!C.current.isEqualNode(Q.target)||(Q.key===" "||Q.key==="Enter"||Q.keyCode===32||Q.keyCode===13)&&(Q.preventDefault(),z())},[C,z]),rt=b.useCallback(function(){G({type:"focus"})},[]),He=b.useCallback(function(){G({type:"blur"})},[]),ot=b.useCallback(function(){S||(OD()?setTimeout(z,0):z())},[S,z]),de=function(ae){return r?null:ae},Ee=function(ae){return T?null:de(ae)},ce=function(ae){return E?null:de(ae)},ke=function(ae){k&&ae.stopPropagation()},ft=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,Hr=Q.onClick,Yo=Q.onDragEnter,qo=Q.onDragOver,Xa=Q.onDragLeave,Bd=Q.onDrop,zd=va(Q,LD);return Qe(Qe(Lu({onKeyDown:Ee(yn(kt,Ne)),onFocus:Ee(yn(Nt,rt)),onBlur:Ee(yn(Vt,He)),onClick:de(yn(Hr,ot)),onDragEnter:ce(yn(Yo,B)),onDragOver:ce(yn(qo,W)),onDragLeave:ce(yn(Xa,$)),onDrop:ce(yn(Bd,oe)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},_e,C),!r&&!T?{tabIndex:0}:{}),zd)}},[C,Ne,rt,He,ot,B,W,$,oe,T,E,r]),Oe=b.useCallback(function(Q){Q.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.onChange,kt=Q.onClick,Nt=va(Q,VD),Vt=Lu({accept:I,multiple:a,type:"file",style:{display:"none"},onChange:de(yn(Ke,oe)),onClick:de(yn(kt,Oe)),tabIndex:-1},_e,O);return Qe(Qe({},Vt),Nt)}},[O,n,a,oe,r]);return Qe(Qe({},H),{},{isFocused:P&&!r,getRootProps:ft,getInputProps:ht,rootRef:C,inputRef:O,open:de(z)})}function GD(e,t){switch(t.type){case"focus":return Qe(Qe({},e),{},{isFocused:!0});case"blur":return Qe(Qe({},e),{},{isFocused:!1});case"openDialog":return Qe(Qe({},$u),{},{isFileDialogActive:!0});case"closeDialog":return Qe(Qe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Qe(Qe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Qe(Qe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Qe({},$u);default:return e}}function ib(){}const YD={isImage:e=>e.type.includes("image")},qD=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(YD.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Pv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Pv(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(ns,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(to,{})})]}):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(R1,{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(ns,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(to,{className:"text-danger"})})]})},KD=e=>x.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>x.jsx(qD,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),ZD=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(KD,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(b.Fragment,{children:e.idle}),XD=x.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[x.jsx(U1,{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"})]})]}),QD=({idle:e=XD,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=b.useState([]),i=d=>{n==null||n(d),s(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=sb({onDrop:i});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(ZD,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},JD=["INPUT","SELECT"],ab=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{JD.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},eM=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})},tM=({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:pt("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]}),nM=({children:e,...t})=>{const n=b.useId(),[r,o]=b.useState(!1),s=t.checked??r,i=a=>{var u;const c=a.target.dataset.checked!=="true";o(c),(u=t==null?void 0:t.onCheck)==null||u.call(t,c)};return x.jsxs("div",{className:"flex items-center",children:[x.jsx("input",{...t,hidden:!0,type:"checkbox",checked:s,onChange:a=>o(a.target.checked)}),x.jsx("button",{type:"button",role:"switch",onClick:i,"aria-checked":s,"data-checked":s,"aria-labelledby":`${n}-label`,className:"relative duration-300 inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary transition-colors ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:x.jsx("span",{"aria-hidden":"true","data-checked":s,className:"data-[checked=false]:bg-disabled duration-300 data-[checked=true]:bg-input-switch inline-block size-5 aspect-square data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out"})}),x.jsx("span",{className:"ml-3 text-sm",id:`${n}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})})]})},ba=0,fr=1,Fo=2,lb=4;function Rs(e,t){return n=>e(t(n))}function rM(e,t){return t(e)}function cb(e,t){return n=>e(t,n)}function ub(e,t){return()=>e(t)}function wa(e,t){return t(e),e}function Ye(...e){return e}function oM(e){e()}function db(e){return()=>e}function sM(...e){return()=>{e.map(oM)}}function Ru(e){return e!==void 0}function Lr(){}function $e(e,t){return e(fr,t)}function be(e,t){e(ba,t)}function ju(e){e(Fo)}function Dt(e){return e(lb)}function ue(e,t){return $e(e,cb(t,ba))}function vn(e,t){const n=e(fr,r=>{n(),t(r)});return n}function Ce(){const e=[];return(t,n)=>{switch(t){case Fo:e.splice(0,e.length);return;case fr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case ba: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 ba:t=o;break;case lb:return t}return n(r,o)}}function iM(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case fr:return s?n===s?void 0:(r(),n=s,t=$e(e,s),t):(r(),Lr);case Fo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Yt(e){return wa(Ce(),t=>ue(e,t))}function Mt(e,t){return wa(X(t),n=>ue(e,n))}function aM(...e){return t=>e.reduceRight(rM,t)}function q(e,...t){const n=aM(...t);return(r,o)=>{switch(r){case fr:return $e(e,n(o));case Fo:ju(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 ie(e){return t=>Rs(t,e)}function bn(e){return t=>()=>t(e)}function wn(e,t){return n=>r=>n(t=e(t,r))}function Lo(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 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((s,i)=>{const a=Math.pow(2,i);$e(s,l=>{const c=n;n=n|a,t[i]=l,c!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const a=()=>s([i].concat(t));n===o?a():r=a}}function pb(...e){return function(t,n){switch(t){case fr:return sM(...e.map(r=>$e(r,n)));case Fo: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((s,i)=>{const a=Math.pow(2,i);$e(s,l=>{n[i]=l,r=r|a,r===o&&be(t,n)})}),function(s,i){switch(s){case fr:return r===o&&i(n),$e(t,i);case Fo:return ju(t);default:throw new Error(`unrecognized action ${s}`)}}}function Me(e,t=[],{singleton:n}={singleton:!0}){return{id:lM(),constructor:e,dependencies:t,singleton:n}}const lM=()=>Symbol();function cM(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const a=o(s.map(l=>n(l)));return i&&t.set(r,a),a};return n(e)}function uM(e,t){const n={},r={};let o=0;const s=e.length;for(;o<s;)r[e[o]]=1,o+=1;for(const i in t)r.hasOwnProperty(i)||(n[i]=t[i]);return n}const xa=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Bu(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),i=Object.keys(t.events||{}),a=b.createContext({});function l(v,w){v.propsReady&&be(v.propsReady,!1);for(const g of r){const S=v[t.required[g]];be(S,w[g])}for(const g of o)if(g in w){const S=v[t.optional[g]];be(S,w[g])}v.propsReady&&be(v.propsReady,!0)}function c(v){return s.reduce((w,g)=>(w[g]=S=>{const T=v[t.methods[g]];be(T,S)},w),{})}function u(v){return i.reduce((w,g)=>(w[g]=iM(v[t.events[g]]),w),{})}const d=b.forwardRef((v,w)=>{const{children:g,...S}=v,[T]=b.useState(()=>wa(cM(e),k=>l(k,S))),[E]=b.useState(ub(u,T));return xa(()=>{for(const k of i)k in S&&$e(E[k],S[k]);return()=>{Object.values(E).map(ju)}},[S,E,T]),xa(()=>{l(T,S)}),b.useImperativeHandle(w,db(c(T))),b.createElement(a.Provider,{value:T},n?b.createElement(n,uM([...r,...o,...i],S),g):g)}),f=v=>b.useCallback(cb(be,b.useContext(a)[v]),[v]),h=v=>{const g=b.useContext(a)[v],S=b.useCallback(T=>$e(g,T),[g]);return b.useSyncExternalStore(S,()=>Dt(g),()=>Dt(g))},p=v=>{const g=b.useContext(a)[v],[S,T]=b.useState(ub(Dt,g));return xa(()=>$e(g,E=>{E!==S&&T(db(E))}),[g,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];xa(()=>$e(S,w),[w,S])}}}const dM=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 fM={0:"debug",1:"log",2:"warn",3:"error"},hM=()=>typeof globalThis>"u"?window:globalThis,pr=Me(()=>{const e=X(3);return{log:X((n,r,o=1)=>{var s;const i=(s=hM().VIRTUOSO_LOG_LEVEL)!=null?s:Dt(e);o>=i&&console[fM[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function zu(e,t=!0){const n=b.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=b.useMemo(()=>new ResizeObserver(s=>{requestAnimationFrame(()=>{const i=s[0].target;i.offsetParent!==null&&e(i)})}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function xn(e,t=!0){return zu(e,t).callbackRef}function mb(e,t,n,r,o,s,i){const a=b.useCallback(l=>{const c=pM(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",f=i?i.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=i?i.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:p}),s==null||s(mM("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return zu(a,n)}function pM(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i<o;i++){const a=e.item(i);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},qt.ERROR),u===c)continue;const d=s[s.length-1];s.length===0||d.size!==u||d.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function mM(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 rn(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=Lr,o){const s=b.useRef(null),i=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,y=h?window.innerHeight:f.offsetHeight,v=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:y})};d.suppressFlushSync?v():Gd.flushSync(v),i.current!==null&&(p===i.current||p<=0||p===m-y)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);b.useEffect(()=>{const d=o||s.current;return r(o||s.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(d){const f=s.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let p,m,y;f===window?(m=Math.max(rn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,y=document.documentElement.scrollTop):(m=f.scrollHeight,p=rn(f,"height"),y=f.scrollTop);const v=m-p;if(d.top=Math.ceil(Math.max(Math.min(v,d.top),0)),gb(p,m)||d.top===y){e({scrollTop:y,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(i.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,f.scrollTo(d)}function u(d){s.current.scrollBy(d)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const Ft=Me(()=>{const e=Ce(),t=Ce(),n=X(0),r=Ce(),o=X(0),s=Ce(),i=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)),i),ue(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:d,scrollBy:f,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),js={lvl:0};function vb(e,t,n,r=js,o=js){return{k:e,v:t,lvl:n,l:r,r:o}}function We(e){return e===js}function Vo(){return js}function Wu(e,t){if(We(e))return js;const{k:n,l:r,r:o}=e;if(t===n){if(We(r))return o;if(We(o))return r;{const[s,i]=bb(r);return Ta(mt(e,{k:s,v:i,l:wb(r)}))}}else return t<n?Ta(mt(e,{l:Wu(r,t)})):Ta(mt(e,{r:Wu(o,t)}))}function Bs(e,t){if(!We(e))return t===e.k?e.v:t<e.k?Bs(e.l,t):Bs(e.r,t)}function on(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=on(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return on(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 Hu(e,t,n){if(We(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(Hu(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Hu(i,t,n))),a}function Vr(e){return We(e)?[]:[...Vr(e.l),{k:e.k,v:e.v},...Vr(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:Ta(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 Uu(e){return We(e)||e.lvl>e.r.lvl}function xb(e){return Gu(Sb(e))}function Ta(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(Uu(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(Uu(e))return Gu(mt(e,{lvl:r-1}));if(!We(n)&&!We(n.l)){const o=n.l,s=Uu(o)?n.lvl-1:n.lvl;return mt(o,{l:mt(e,{r:o.l,lvl:r-1}),r:Gu(mt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Sa(e,t,n){if(We(e))return[];const r=on(e,t)[0];return gM(Hu(e,r,n))}function Tb(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i<n;i++){const{index:a,value:l}=t(e[i]);s.push({start:r,end:a-1,value:o}),r=a,o=l}return s.push({start:r,end:1/0,value:o}),s}function gM(e){return Tb(e,({k:t,v:n})=>({index:t,value:n}))}function Gu(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 Ea(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],a=n(i,t);if(a===0)return s;if(a===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Eb(e,t,n){return e[Ea(e,t,n)]}function yM(e,t,n,r){const o=Ea(e,t,r),s=Ea(e,n,r,o);return e.slice(o,s+1)}const Yu=Me(()=>({recalcInProgress:X(!1)}),[],{singleton:!0});function vM(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 bM(e,t){let n=We(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),We(e)){e=Kt(e,0,o);continue}const a=Sa(e,s-1,i+1);if(a.some(vM(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(i>=u||o===f)&&(e=Wu(e,u)):(c=f!==o,l=!0),d>i&&i>=u&&f!==o&&(e=Kt(e,i+1,f));c&&(e=Kt(e,s,o))}return[e,n]}function wM(){return{offsetTree:[],sizeTree:Vo(),groupOffsetTree:Vo(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function qu({index:e},t){return t===e?0:t<e?-1:1}function xM({offset:e},t){return t===e?0:t<e?-1:1}function TM(e){return{index:e.index,value:e}}function SM(e,t,n,r=0){return r>0&&(t=Math.max(t,Eb(e,r,qu).offset)),Tb(yM(e,t,n,xM),TM)}function Ku(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=Ea(o,t-1,qu),a=o[l].offset;const u=on(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===on(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Sa(n,t,1/0)){const d=c-s,f=d*i+a+d*r;o.push({offset:f,size:u,index:c}),s=c,a=f,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function EM(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,qt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&We(s)&&t.length===2){const f=t[0].size,h=t[1].size;i=n.reduce((p,m)=>Kt(Kt(p,m,f),m+1,h),i)}else[i,a]=bM(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=Ku(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Kt(f,h,zs(h,l,o)),Vo()),groupIndices:n}}function zs(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=Eb(t,e,qu),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function CM(e){return typeof e.groupIndex<"u"}function Pb(e,t,n){if(CM(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(!Ca(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Ca(e){return!We(e.groupOffsetTree)}function PM(e){return Vr(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const kM={offsetHeight:"height",offsetWidth:"width"},Tn=Me(([{log:e},{recalcInProgress:t}])=>{const n=Ce(),r=Ce(),o=Mt(r,0),s=Ce(),i=Ce(),a=X(0),l=X([]),c=X(void 0),u=X(void 0),d=X((T,E)=>rn(T,kM[E])),f=X(void 0),h=X(0),p=wM(),m=Mt(q(n,we(l,e,h),wn(EM,p),qe()),p),y=Mt(q(l,qe(),wn((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,k])=>{const A=T.reduce((D,I,V)=>Kt(D,I,zs(I,E.offsetTree,k)||V),Vo());return{...E,groupIndices:T,groupOffsetTree:A}})),m),ue(q(r,we(m),pe(([T,{lastIndex:E}])=>T<E),ie(([T,{lastIndex:E,lastSize:k}])=>[{startIndex:T,endIndex:E,size:k}])),n),ue(c,u);const v=Mt(q(c,ie(T=>T===void 0)),!0);ue(q(u,pe(T=>T!==void 0&&We(Dt(m).sizeTree)),ie(T=>[{startIndex:0,endIndex:0,size:T}])),n);const w=Yt(q(n,we(m),wn(({sizes:T},[E,k])=>({changed:k!==T,sizes:k}),{changed:!1,sizes:p}),ie(T=>T.changed)));$e(q(a,wn((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(s,T+Cb(T,E));else if(T<0){const k=Dt(y);k.length>0&&(T-=Cb(-T,k)),be(i,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 g=Yt(s);ue(q(s,we(m),ie(([T,E])=>{const k=E.groupIndices.length>0,A=[],D=E.lastSize;if(k){const I=Bs(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;A.push({startIndex:O,endIndex:O,size:I}),A.push({startIndex:O+1,endIndex:O+1+M-1,size:D}),F++,V+=M+1}const R=Vr(E.sizeTree);return V!==T&&R.shift(),R.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:A,prevIndex:T,prevSize:0}).ranges}return Vr(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:D}).ranges})),n);const S=Yt(q(i,we(m,h),ie(([T,{offsetTree:E},k])=>{const A=-T;return zs(A,E,k)})));return ue(q(i,we(m,h),ie(([T,E,k])=>{if(E.groupIndices.length>0){if(We(E.sizeTree))return E;let D=Vo();const I=Dt(y);let V=0,F=0,R=0;for(;V<-T;){R=I[F];const O=I[F+1]-R-1;F++,V+=O+1}if(D=Vr(E.sizeTree).reduce((O,{k:M,v:L})=>Kt(O,Math.max(0,M+T),L),D),V!==-T){const O=Bs(E.sizeTree,R);D=Kt(D,0,O);const M=on(E.sizeTree,-T+1)[1];D=Kt(D,1,M)}return{...E,sizeTree:D,...Ku(E.offsetTree,0,D,k)}}else{const D=Vr(E.sizeTree).reduce((I,{k:V,v:F})=>Kt(I,Math.max(0,V+T),F),Vo());return{...E,sizeTree:D,...Ku(E.offsetTree,0,D,k)}}})),m),{data:f,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:S,beforeUnshiftWith:g,firstItemIndex:a,gap:h,sizes:m,listRefresh:w,statefulTotalCount:o,trackItemSizes:v,itemSize:d}},Ye(pr,Yu),{singleton:!0}),OM=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||!OM)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ws=Me(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:f}])=>{const h=Ce(),p=Ce(),m=X(0);let y=null,v=null,w=null;function g(){y&&(y(),y=null),w&&(w(),w=null),v&&(clearTimeout(v),v=null),be(o,!1)}return ue(q(h,we(e,s,t,m,l,c,f),we(r,u,d),ie(([[S,T,E,k,A,D,I,V],F,R,C])=>{const O=Ob(S),{align:M,behavior:L,offset:H}=O,G=k-1,P=Pb(O,T,G);let j=zs(P,T.offsetTree,F)+D;M==="end"?(j+=R+on(T.sizeTree,P)[1]-E+C,P===G&&(j+=I)):M==="center"?j+=(R+on(T.sizeTree,P)[1]-E+C)/2:j-=A,H&&(j+=H);const Z=re=>{g(),re?(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(g(),L==="smooth"){let re=!1;w=$e(n,J=>{re=re||J}),y=vn(a,()=>{Z(re)})}else y=vn(q(n,IM(150)),Z);return v=setTimeout(()=>{g()},1200),be(o,!0),V("scrolling from index to",{index:P,top:j,behavior:L},qt.DEBUG),{top:j,behavior:L}})),i),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},Ye(Tn,Ft,pr),{singleton:!0});function IM(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const Hs="up",Us="down",_M="none",AM={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},DM=0,Gs=Me(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=X(!1),a=X(!0),l=Ce(),c=Ce(),u=X(4),d=X(DM),f=Mt(q(pb(q(ge(t),Lo(1),bn(!0)),q(ge(t),Lo(1),bn(!1),hb(100))),qe()),!1),h=Mt(q(pb(q(s,bn(!0)),q(s,bn(!1),hb(200))),qe()),!1);ue(q(bt(ge(t),ge(d)),ie(([w,g])=>w<=g),qe()),a),ue(q(a,hr(50)),c);const p=Yt(q(bt(e,ge(n),ge(r),ge(o),ge(u)),wn((w,[{scrollTop:g,scrollHeight:S},T,E,k,A])=>{const D=g+T-S>-A,I={viewportHeight:T,scrollTop:g,scrollHeight:S};if(D){let F,R;return g>w.state.scrollTop?(F="SCROLLED_DOWN",R=w.state.scrollTop-g):(F="SIZE_DECREASED",R=w.state.scrollTop-g||w.scrollTopDelta),{atBottom:!0,state:I,atBottomBecause:F,scrollTopDelta:R}}let V;return I.scrollHeight>w.state.scrollHeight?V="SIZE_INCREASED":T<w.state.viewportHeight?V="VIEWPORT_HEIGHT_DECREASING":g<w.state.scrollTop?V="SCROLLING_UPWARDS":V="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:V,state:I}},AM),qe((w,g)=>w&&w.atBottom===g.atBottom))),m=Mt(q(e,wn((w,{scrollTop:g,scrollHeight:S,viewportHeight:T})=>{if(gb(w.scrollHeight,S))return{scrollTop:g,scrollHeight:S,jump:0,changed:!1};{const E=S-(g+T)<1;return w.scrollTop!==g&&E?{scrollHeight:S,scrollTop:g,jump:w.scrollTop-g,changed:!0}:{scrollHeight:S,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),pe(w=>w.changed),ie(w=>w.jump)),0);ue(q(p,ie(w=>w.atBottom)),i),ue(q(i,hr(50)),l);const y=X(Us);ue(q(e,ie(({scrollTop:w})=>w),qe(),wn((w,g)=>Dt(h)?{direction:w.direction,prevScrollTop:g}:{direction:g<w.prevScrollTop?Hs:Us,prevScrollTop:g},{direction:Us,prevScrollTop:0}),ie(w=>w.direction)),y),ue(q(e,hr(50),bn(_M)),y);const v=X(0);return ue(q(f,pe(w=>!w),bn(0)),v),ue(q(t,hr(100),we(f),pe(([w,g])=>!!g),wn(([w,g],[S])=>[g,S],[0,0]),ie(([w,g])=>g-w)),v),{isScrolling:f,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:y,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:v,lastJumpDueToItemResize:m}},Ye(Ft)),mr=Me(([{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(pr),{singleton:!0});function Zu(e,t){e==0?t():requestAnimationFrame(()=>Zu(e-1,t))}function Xu(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Ys=Me(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=X(!0),l=X(0),c=X(!0);return ue(q(i,we(l),pe(([u,d])=>!!d),bn(!1)),a),ue(q(i,we(l),pe(([u,d])=>!!d),bn(!1)),c),$e(q(bt(t,i),we(a,e,n,c),pe(([[,u],d,{sizeTree:f},h,p])=>u&&(!We(f)||Ru(h))&&!d&&!p),we(l)),([,u])=>{vn(s,()=>{be(c,!0)}),Zu(4,()=>{vn(r,()=>{be(a,!0)}),be(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Ye(Tn,Ft,Ws,mr),{singleton:!0});function Ib(e){return e?e==="smooth"?"smooth":"auto":!1}const MM=(e,t)=>typeof e=="function"?Ib(e(t)):t&&Ib(e),NM=Me(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,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),Lo(1)),a),we(ge(u),n,s,c),ie(([[m,y],v,w,g,S])=>{let T=y&&g,E="auto";return T&&(E=MM(v,w||S),T=T&&!!E),{totalCount:m,shouldFollow:T,followOutputBehavior:E}}),pe(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:y})=>{f&&(f(),f=null),f=vn(t,()=>{Dt(l)("following output to ",{totalCount:m},qt.DEBUG),h(y),f=null})});function p(m){const y=vn(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Dt(l)("scrolling to bottom due to increased size",{},qt.DEBUG),h("auto"))});setTimeout(y,100)}return $e(q(bt(ge(u),e,i),pe(([m,,y])=>m&&y),wn(({value:m},[,y])=>({refreshed:m===y,value:y}),{refreshed:!1,value:0}),pe(({refreshed:m})=>m),we(u,e)),([,m])=>{Dt(s)&&p(m!==!1)}),$e(d,()=>{p(Dt(u)!==!1)}),$e(bt(ge(u),r),([m,y])=>{m&&!y.atBottom&&y.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},Ye(Tn,Gs,Ws,Ys,mr,pr,Ft));function FM(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const _b=Me(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Ce(),i=Ce(),a=Yt(q(s,ie(FM)));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])=>Ca(c)),ie(([l,c,u])=>on(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),qe(),ie(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Ye(Tn,Ft));function qs(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Ab(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Pa="top",ka="bottom",Db="none";function Mb(e,t,n){return typeof e=="number"?n===Hs&&t===Pa||n===Us&&t===ka?e:0:n===Hs?t===Pa?e.main:e.reverse:t===ka?e.main:e.reverse}function Nb(e,t){return typeof e=="number"?e:e[t]||0}const Qu=Me(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Ce(),i=X(0),a=X(0),l=X(0),c=Mt(q(bt(ge(e),ge(t),ge(r),ge(s,qs),ge(l),ge(i),ge(o),ge(n),ge(a)),ie(([u,d,f,[h,p],m,y,v,w,g])=>{const S=u-w,T=y+v,E=Math.max(f-S,0);let k=Db;const A=Nb(g,Pa),D=Nb(g,ka);return h-=w,h+=f+v,p+=f+v,p-=w,h>u+T-A&&(k=Hs),p<u-E+d+D&&(k=Us),k!==Db?[Math.max(S-f-Mb(m,Pa,k)-A,0),S-E-v+d+Mb(m,ka,k)+D]:null}),pe(u=>u!=null),qe(qs)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Ye(Ft),{singleton:!0});function LM(e,t,n){if(Ca(t)){const r=kb(e,t);return[{index:on(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 Ju={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(!Ca(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=Sa(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=i.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},s.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return s}function Oa(e,t,n,r,o,s){const{lastSize:i,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const d=n-l,f=a+d*i+(d-1)*r,h=c,p=f-u;return{items:Fb(e,o,s),topItems:Fb(t,o,s),topListHeight:t.reduce((m,y)=>y.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function Lb(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=e)break;i++}const a=e+i,l=Xu(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:s[d+l]}));return Oa(c,[],a,o,n,r)}const $r=Me(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:p}])=>{const m=X([]),y=X(0),v=Ce();ue(s.topItemsIndexes,m);const w=Mt(q(bt(h,p,ge(i,qs),ge(t),ge(e),ge(u),c,ge(m),ge(r),ge(o),n),pe(([E,k,,A,,,,,,,D])=>{const I=D&&D.length!==A;return E&&!k&&!I}),ie(([,,[E,k],A,D,I,V,F,R,C,O])=>{const M=D,{sizeTree:L,offsetTree:H}=M,G=Dt(y);if(A===0)return{...Ju,totalCount:A};if(E===0&&k===0)return G===0?{...Ju,totalCount:A}:Lb(G,I,D,R,C,O||[]);if(We(L))return G>0?null:Oa(LM(Xu(I,A),M,O),[],A,C,M,R);const P=[];if(F.length>0){const U=F[0],N=F[F.length-1];let B=0;for(const W of Sa(L,U,N)){const $=W.value,Y=Math.max(W.start,U),oe=Math.min(W.end,N);for(let z=Y;z<=oe;z++)P.push({index:z,size:$,offset:B,data:O&&O[z]}),B+=$}}if(!V)return Oa([],P,A,C,M,R);const j=F.length>0?F[F.length-1]+1:0,Z=SM(H,E,k,j);if(Z.length===0)return null;const re=A-1,J=wa([],U=>{for(const N of Z){const B=N.value;let W=B.offset,$=N.start;const Y=B.size;if(B.offset<E){$+=Math.floor((E-B.offset+C)/(Y+C));const z=$-N.start;W+=z*Y+z*C}$<j&&(W+=(j-$)*Y,$=j);const oe=Math.min(N.end,re);for(let z=$;z<=oe&&!(W>=k);z++)U.push({index:z,size:Y,offset:W,data:O&&O[z]}),W+=Y+C}});return Oa(J,P,A,C,M,R)}),pe(E=>E!==null),qe()),Ju);ue(q(n,pe(Ru),ie(E=>E==null?void 0:E.length)),t),ue(q(w,ie(E=>E.topListHeight)),d),ue(d,l),ue(q(w,ie(E=>[E.top,E.bottom])),a),ue(q(w,ie(E=>E.items)),v);const g=Yt(q(w,pe(({items:E})=>E.length>0),we(t,n),pe(([{items:E},k])=>E[E.length-1].originalIndex===k-1),ie(([,E,k])=>[E-1,k]),qe(qs),ie(([E])=>E))),S=Yt(q(w,hr(200),pe(({items:E,topItems:k})=>E.length>0&&E[0].originalIndex===k.length),ie(({items:E})=>E[0].index),qe())),T=Yt(q(w,pe(({items:E})=>E.length>0),ie(({items:E})=>{let k=0,A=E.length-1;for(;E[k].type==="group"&&k<A;)k++;for(;E[A].type==="group"&&A>k;)A--;return{startIndex:E[k].index,endIndex:E[A].index}}),qe(Ab)));return{listState:w,topItemsIndexes:m,endReached:g,startReached:S,rangeChanged:T,itemsRendered:v,initialItemCount:y,...f}},Ye(Tn,_b,Qu,Ys,Ws,Gs,mr,Yu),{singleton:!0}),VM=Me(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(ue(q(a,we(s),pe(([,l])=>l!==0),we(o,e,t,r,n),ie(([[,l],c,u,d,f,h=[]])=>Lb(l,c,u,d,f,h))),i),{}),Ye(Tn,Ys,$r,mr),{singleton:!0}),Vb=Me(([{scrollVelocity:e}])=>{const t=X(!1),n=Ce(),r=X(!1);return ue(q(e,we(r,t,n),pe(([o,s])=>!!s),ie(([o,s,i,a])=>{const{exit:l,enter:c}=s;if(i){if(l(o,a))return!1}else if(c(o,a))return!0;return i}),qe()),t),$e(q(bt(t,e,n),we(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Ye(Gs),{singleton:!0}),$M=Me(([{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}},Ye($r)),$b=Me(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Ce(),i=Mt(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(i),s),{totalListHeight:i,totalListHeightChanged:s}},Ye(Ft,$r),{singleton:!0});function Rb(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const RM=Rb(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),jM=Me(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:f},{log:h},{recalcInProgress:p}])=>{const m=Yt(q(l,we(a),wn(([,v,w,g],[{items:S,totalCount:T,bottom:E,offsetBottom:k},A])=>{const D=E+k;let I=0;return w===T&&v.length>0&&S.length>0&&(S[0].originalIndex===0&&v[0].originalIndex===0||(I=D-g,I!==0&&(I+=A))),[I,S,T,D]},[0,[],0,0]),pe(([v])=>v!==0),we(t,i,r,s,h,p),pe(([,v,w,g,,,S])=>!S&&!g&&v!==0&&w===Hs),ie(([[v],,,,,w])=>(w("Upward scrolling compensation",{amount:v},qt.DEBUG),v))));function y(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,g])=>{g&&RM()?be(n,w-v):y(-v)}),$e(q(bt(Mt(o,!1),n,p),pe(([v,w,g])=>!v&&!g&&w!==0),ie(([v,w])=>w),hr(1)),y),ue(q(u,ie(v=>({top:-v}))),e),$e(q(c,we(d,f),ie(([v,{lastSize:w,groupIndices:g,sizeTree:S},T])=>{function E(k){return k*(w+T)}if(g.length===0)return E(v);{let k=0;const A=Bs(S,0);let D=0,I=0;for(;D<v;){D++,k+=A;let V=g.length===I+1?1/0:g[I+1]-g[I]-1;D+V>v&&(k-=A,V=v-D+1),D+=V,k+=E(V),I++}return k}})),v=>{be(n,v),requestAnimationFrame(()=>{be(e,{top:v}),requestAnimationFrame(()=>{be(n,0),be(p,!1)})})}),{deviation:n}},Ye(Ft,Gs,$r,Tn,pr,Yu)),BM=Me(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=X(0);return $e(q(e,we(r),pe(([,o])=>o!==0),ie(([,o])=>({top:o}))),o=>{vn(q(n,Lo(1),pe(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{be(t,o)})})}),{initialScrollTop:r}},Ye(mr,Ft,$r),{singleton:!0}),zM=Me(([{viewportHeight:e},{totalListHeight:t}])=>{const n=X(!1),r=Mt(q(bt(n,e,t),pe(([o])=>o),ie(([,o,s])=>Math.max(0,o-s)),hr(0),qe()),0);return{alignToBottom:n,paddingTopAddition:r}},Ye(Ft,$b),{singleton:!0}),ed=Me(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ce(),r=Ce(),o=Ce(),s=X(!1),i=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:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Ye(Ft)),WM=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>e<n?{...i,behavior:o,align:s??"start"}:t>r?{...i,behavior:o,align:s??"end"}:null,HM=Me(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ce();return ue(q(u,we(e,o,t,s,i,a,r),we(n),ie(([[d,f,h,p,m,y,v,w],g])=>{const{done:S,behavior:T,align:E,calculateViewLocation:k=WM,...A}=d,D=Pb(d,f,p-1),I=zs(D,f.offsetTree,g)+m+y,V=I+on(f.sizeTree,D)[1],F=w+y,R=w+h-v,C=k({itemTop:I,itemBottom:V,viewportTop:F,viewportBottom:R,locationParams:{behavior:T,align:E,...A}});return C?S&&vn(q(l,pe(O=>O===!1),Lo(Dt(l)?1:2)),S):S&&S(),C}),pe(d=>d!==null)),c),{scrollIntoView:u}},Ye(Tn,Ft,Ws,$r,pr),{singleton:!0}),UM=Me(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,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,i,d,f,r)),([h,p,m,y,v,w,g])=>{const S=PM(p.sizeTree);y&&v!==null&&w!==null&&(m=v.scrollTop-w.offsetTop),m-=g,h({ranges:S,scrollTop:m})}),ue(q(u,pe(Ru),ie(GM)),o),ue(q(s,we(u),pe(([,h])=>h!==void 0),qe(),ie(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},Ye(Tn,Ft,Ys,mr,ed));function GM(e){return{offset:e.scrollTop,index:0,align:"start"}}const YM=Me(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Ye(Qu,VM,mr,Vb,$b,BM,zM,ed,HM,pr)),jb=Me(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,y,v,{listState:w,topItemsIndexes:g,...S},{scrollToIndex:T},E,{topItemCount:k},{groupCounts:A},D])=>(ue(S.rangeChanged,D.scrollSeekRangeChanged),ue(q(D.windowViewportRect,ie(I=>I.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:g,topItemCount:k,groupCounts:A,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:w,scrollToIndex:T,trackItemSizes:o,itemSize:s,groupIndices:l,...S,...D,...m,sizes:d,...y}),Ye(Tn,Ys,Ft,UM,NM,$r,Ws,jM,$M,_b,YM)),td="-webkit-sticky",Bb="sticky",zb=Rb(()=>{if(typeof document>"u")return Bb;const e=document.createElement("div");return e.style.position=td,e.style.position===td?td:Bb});function nd(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:s}=zu(r),i=b.useCallback(()=>{r(s.current)},[r,s]);return b.useEffect(()=>{if(t){t.addEventListener("scroll",i);const a=new ResizeObserver(()=>{requestAnimationFrame(i)});return a.observe(t),()=>{t.removeEventListener("scroll",i),a.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const Ia=b.createContext(void 0),Wb=b.createContext(void 0);function rd(e){return e}const qM=Me(([e,t])=>({...e,...t}),Ye(jb,Me(()=>{const e=X(l=>`Item ${l}`),t=X(null),n=X(l=>`Group ${l}`),r=X({}),o=X(rd),s=X("div"),i=X(Lr),a=(l,c=null)=>Mt(q(r,ie(u=>u[l]),qe()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}))),KM=({height:e})=>b.createElement("div",{style:{height:e}}),ZM={position:zb(),zIndex:1,overflowAnchor:"none"},XM={overflowAnchor:"none"},Hb=b.memo(function({showTopList:t=!1}){const n=Se("listState"),r=Qt("sizeRanges"),o=Se("useWindowScroll"),s=Se("customScrollParent"),i=Qt("windowScrollContainerState"),a=Qt("scrollContainerState"),l=s||o?i:a,c=Se("itemContent"),u=Se("context"),d=Se("groupContent"),f=Se("trackItemSizes"),h=Se("itemSize"),p=Se("log"),m=Qt("gap"),{callbackRef:y}=mb(r,h,f,t?Lr:l,p,m,s),[v,w]=b.useState(0);id("deviation",C=>{v!==C&&w(C)});const g=Se("EmptyPlaceholder"),S=Se("ScrollSeekPlaceholder")||KM,T=Se("ListComponent"),E=Se("ItemComponent"),k=Se("GroupComponent"),A=Se("computeItemKey"),D=Se("isSeeking"),I=Se("groupIndices").length>0,V=Se("alignToBottom"),F=Se("initialItemFinalLocationReached"),R=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&&g?b.createElement(g,tt(g,u)):b.createElement(T,{...tt(T,u),ref:y,style:R,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(C=>{const O=C.originalIndex,M=A(O+n.firstItemIndex,C.data,u);return D?b.createElement(S,{...tt(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(k,{...tt(k,u),key:M,"data-index":O,"data-known-size":C.size,"data-item-index":C.index,style:ZM},d(C.index,u)):b.createElement(E,{...tt(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:XM},I?c(C.index,C.groupIndex,C.data,u):c(C.index,C.data,u))}))}),QM={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},$o=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),JM={width:"100%",position:zb(),top:0,zIndex:1};function tt(e,t){if(typeof e!="string")return{context:t}}function Ub(e,t){return{item:typeof e=="string"?void 0:t}}const eN=b.memo(function(){const t=Se("HeaderComponent"),n=Qt("headerHeight"),r=Se("headerFooterTag"),o=xn(b.useMemo(()=>i=>n(rn(i,"height")),[n])),s=Se("context");return t?b.createElement(r,{ref:o},b.createElement(t,tt(t,s))):null}),tN=b.memo(function(){const t=Se("FooterComponent"),n=Qt("footerHeight"),r=Se("headerFooterTag"),o=xn(b.useMemo(()=>i=>n(rn(i,"height")),[n])),s=Se("context");return t?b.createElement(r,{ref:o},b.createElement(t,tt(t,s))):null});function od({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:s,children:i,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),f=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=yb(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),b.createElement(c,{ref:h,style:{...QM,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...tt(c,f)},i)})}function sd({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:s,children:i,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),f=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:y,scrollToCallback:v}=yb(l,u,c,Lr,h);return dM(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",v),t("scrollBy",y),b.createElement(c,{style:{position:"relative",...s,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...tt(c,p)},i)})}const nN=({children:e})=>{const t=b.useContext(Ia),n=Qt("viewportHeight"),r=Qt("fixedItemHeight"),o=Se("alignToBottom"),s=xn(b.useMemo(()=>Rs(n,i=>rn(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:$o(o),ref:s,"data-viewport-type":"element"},e)},rN=({children:e})=>{const t=b.useContext(Ia),n=Qt("windowViewportRect"),r=Qt("fixedItemHeight"),o=Se("customScrollParent"),s=nd(n,o),i=Se("alignToBottom");return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:s,style:$o(i),"data-viewport-type":"window"},e)},oN=({children:e})=>{const t=Se("TopItemListComponent")||"div",n=Se("headerHeight"),r={...JM,marginTop:`${n}px`},o=Se("context");return b.createElement(t,{style:r,...tt(t,o)},e)},sN=b.memo(function(t){const n=Se("useWindowScroll"),r=Se("topItemsIndexes").length>0,o=Se("customScrollParent"),s=o||n?lN:aN,i=o||n?rN:nN;return b.createElement(s,{...t},r&&b.createElement(oN,null,b.createElement(Hb,{showTopList:!0})),b.createElement(i,null,b.createElement(eN,null),b.createElement(Hb,null),b.createElement(tN,null)))}),{Component:iN,usePublisher:Qt,useEmitterValue:Se,useEmitter:id}=Bu(qM,{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"}},sN),aN=od({usePublisher:Qt,useEmitterValue:Se,useEmitter:id}),lN=sd({usePublisher:Qt,useEmitterValue:Se,useEmitter:id}),cN=iN,Gb={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:Yb,ceil:qb,floor:_a,min:ad,max:Ks}=Math;function dN(e){return{...uN,items:e}}function Kb(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function fN(e,t){return e&&e.column===t.column&&e.row===t.row}function Aa(e,t){return e&&e.width===t.width&&e.height===t.height}const hN=Me(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,f,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:w,windowScrollTo:g},S])=>{const T=X(0),E=X(0),k=X(Gb),A=X({height:0,width:0}),D=X({height:0,width:0}),I=Ce(),V=Ce(),F=X(0),R=X(null),C=X({row:0,column:0}),O=Ce(),M=Ce(),L=X(!1),H=X(0),G=X(!0),P=X(!1);$e(q(p,we(H),pe(([N,B])=>!!B)),()=>{be(G,!1),be(E,0)}),$e(q(bt(p,G,D,A,H,P),pe(([N,B,W,$,,Y])=>N&&!B&&W.height!==0&&$.height!==0&&!Y)),([,,,,N])=>{be(P,!0),Zu(1,()=>{be(I,N)}),vn(q(r),()=>{be(n,[0,0]),be(G,!0)})}),ue(q(M,pe(N=>N!=null&&N.scrollTop>0),bn(0)),E),$e(q(p,we(M),pe(([,N])=>N!=null)),([,N])=>{N&&(be(A,N.viewport),be(D,N==null?void 0:N.item),be(C,N.gap),N.scrollTop>0&&(be(L,!0),vn(q(r,Lo(1)),B=>{be(L,!1)}),be(i,{top:N.scrollTop})))}),ue(q(A,ie(({height:N})=>N)),o),ue(q(bt(ge(A,Aa),ge(D,Aa),ge(C,(N,B)=>N&&N.column===B.column&&N.row===B.row),ge(r)),ie(([N,B,W,$])=>({viewport:N,item:B,gap:W,scrollTop:$}))),O),ue(q(bt(ge(T),t,ge(C,fN),ge(D,Aa),ge(A,Aa),ge(R),ge(E),ge(L),ge(G),ge(H)),pe(([,,,,,,,N])=>!N),ie(([N,[B,W],$,Y,oe,z,Ne,,rt,He])=>{const{row:ot,column:de}=$,{height:Ee,width:ce}=Y,{width:ke}=oe;if(Ne===0&&(N===0||ke===0))return Gb;if(ce===0){const Vt=Xu(He,N),Hr=Vt===0?Math.max(Ne-1,0):Vt;return dN(Kb(Vt,Hr,z))}const ft=Xb(ke,ce,de);let Oe,ht;rt?B===0&&W===0&&Ne>0?(Oe=0,ht=Ne-1):(Oe=ft*_a((B+ot)/(Ee+ot)),ht=ft*qb((W+ot)/(Ee+ot))-1,ht=ad(N-1,Ks(ht,ft-1)),Oe=ad(ht,Ks(0,Oe))):(Oe=0,ht=-1);const Q=Kb(Oe,ht,z),{top:ae,bottom:_e}=Zb(oe,$,Y,Q),Ke=qb(N/ft),Nt=Ke*Ee+(Ke-1)*ot-_e;return{items:Q,offsetTop:ae,offsetBottom:Nt,top:ae,bottom:_e,itemHeight:Ee,itemWidth:ce}})),k),ue(q(R,pe(N=>N!==null),ie(N=>N.length)),T),ue(q(bt(A,D,k,C),pe(([N,B,{items:W}])=>W.length>0&&B.height!==0&&N.height!==0),ie(([N,B,{items:W},$])=>{const{top:Y,bottom:oe}=Zb(N,$,B,W);return[Y,oe]}),qe(qs)),n);const j=X(!1);ue(q(r,we(j),ie(([N,B])=>B||N!==0)),j);const Z=Yt(q(ge(k),pe(({items:N})=>N.length>0),we(T,j),pe(([{items:N},B,W])=>W&&N[N.length-1].index===B-1),ie(([,N])=>N-1),qe())),re=Yt(q(ge(k),pe(({items:N})=>N.length>0&&N[0].index===0),bn(0),qe())),J=Yt(q(ge(k),we(L),pe(([{items:N},B])=>N.length>0&&!B),ie(([{items:N}])=>({startIndex:N[0].index,endIndex:N[N.length-1].index})),qe(Ab),hr(0)));ue(J,f.scrollSeekRangeChanged),ue(q(I,we(A,D,T,C),ie(([N,B,W,$,Y])=>{const oe=Ob(N),{align:z,behavior:Ne,offset:rt}=oe;let He=oe.index;He==="LAST"&&(He=$-1),He=Ks(0,He,ad($-1,He));let ot=ld(B,Y,W,He);return z==="end"?ot=Yb(ot-B.height+W.height):z==="center"&&(ot=Yb(ot-B.height/2+W.height/2)),rt&&(ot+=rt),{top:ot,behavior:Ne}})),i);const U=Mt(q(k,ie(N=>N.offsetBottom+N.bottom)),0);return ue(q(m,ie(N=>({width:N.visibleWidth,height:N.visibleHeight}))),A),{data:R,totalCount:T,viewportDimensions:A,itemDimensions:D,scrollTop:r,scrollHeight:V,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:I,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:w,deviation:F,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:C,restoreStateFrom:M,...f,initialTopMostItemIndex:H,gridState:k,totalListHeight:U,...d,startReached:re,endReached:Z,rangeChanged:J,stateChanged:O,propsReady:h,stateRestoreInProgress:L,...S}},Ye(Qu,Ft,Gs,Vb,mr,ed,pr));function Zb(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=ld(e,t,n,r[0].index),i=ld(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function ld(e,t,n,r){const o=Xb(e.width,n.width,t.column),s=_a(r/o),i=s*n.height+Ks(0,s-1)*t.row;return i>0?i+t.row:i}function Xb(e,t,n){return Ks(1,_a((e+n)/(_a(t)+n)))}const pN=Me(([e,t])=>({...e,...t}),Ye(hN,Me(()=>{const e=X(c=>`Item ${c}`),t=X({}),n=X(null),r=X("virtuoso-grid-item"),o=X("virtuoso-grid-list"),s=X(rd),i=X("div"),a=X(Lr),l=(c,u=null)=>Mt(q(t,ie(d=>d[c]),qe()),u);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),mN=b.memo(function(){const t=Je("gridState"),n=Je("listClassName"),r=Je("itemClassName"),o=Je("itemContent"),s=Je("computeItemKey"),i=Je("isSeeking"),a=sn("scrollHeight"),l=Je("ItemComponent"),c=Je("ListComponent"),u=Je("ScrollSeekPlaceholder"),d=Je("context"),f=sn("itemDimensions"),h=sn("gap"),p=Je("log"),m=Je("stateRestoreInProgress"),y=xn(b.useMemo(()=>v=>{const w=v.parentElement.parentElement.scrollHeight;a(w);const g=v.firstChild;if(g){const{width:S,height:T}=g.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:y,className:n,...tt(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(v=>{const w=s(v.index,v.data,d);return i?b.createElement(u,{key:w,...tt(u,d),index:v.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(l,{...tt(l,d),className:r,"data-index":v.index,key:w},o(v.index,v.data,d))}))}),gN=b.memo(function(){const t=Je("HeaderComponent"),n=sn("headerHeight"),r=Je("headerFooterTag"),o=xn(b.useMemo(()=>i=>n(rn(i,"height")),[n])),s=Je("context");return t?b.createElement(r,{ref:o},b.createElement(t,tt(t,s))):null}),yN=b.memo(function(){const t=Je("FooterComponent"),n=sn("footerHeight"),r=Je("headerFooterTag"),o=xn(b.useMemo(()=>i=>n(rn(i,"height")),[n])),s=Je("context");return t?b.createElement(r,{ref:o},b.createElement(t,tt(t,s))):null}),vN=({children:e})=>{const t=b.useContext(Wb),n=sn("itemDimensions"),r=sn("viewportDimensions"),o=xn(b.useMemo(()=>s=>{r(s.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:$o(!1),ref:o},e)},bN=({children:e})=>{const t=b.useContext(Wb),n=sn("windowViewportRect"),r=sn("itemDimensions"),o=Je("customScrollParent"),s=nd(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:s,style:$o(!1)},e)},wN=b.memo(function({...t}){const n=Je("useWindowScroll"),r=Je("customScrollParent"),o=r||n?TN:xN,s=r||n?bN:vN;return b.createElement(o,{...t},b.createElement(s,null,b.createElement(gN,null),b.createElement(mN,null),b.createElement(yN,null)))}),{Component:iV,usePublisher:sn,useEmitterValue:Je,useEmitter:Qb}=Bu(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=od({usePublisher:sn,useEmitterValue:Je,useEmitter:Qb}),TN=sd({usePublisher:sn,useEmitterValue:Je,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 SN=Me(([e,t])=>({...e,...t}),Ye(jb,Me(()=>{const e=X(l=>b.createElement("td",null,"Item $",l)),t=X(null),n=X(null),r=X(null),o=X({}),s=X(rd),i=X(Lr),a=(l,c=null)=>Mt(q(o,ie(u=>u[l]),qe()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),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=an("sizeRanges"),r=Re("useWindowScroll"),o=Re("customScrollParent"),s=an("windowScrollContainerState"),i=an("scrollContainerState"),a=o||r?s:i,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);cd("deviation",M=>{p!==M&&(h.current.style.marginTop=`${M}px`,m(M))});const y=Re("EmptyPlaceholder"),v=Re("ScrollSeekPlaceholder")||EN,w=Re("FillerRow")||CN,g=Re("TableBodyComponent"),S=Re("TableRowComponent"),T=Re("computeItemKey"),E=Re("isSeeking"),k=Re("paddingTopAddition"),A=Re("firstItemIndex"),D=Re("statefulTotalCount"),I=Re("context");if(D===0&&y)return b.createElement(y,tt(y,I));const V=t.offsetTop+k+p,F=t.offsetBottom,R=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+A,M.data,I);return E?b.createElement(v,{...tt(v,I),key:H,index:M.index,height:M.size,type:M.type||"item"}):b.createElement(S,{...tt(S,I),...Ub(S,M.data),key:H,"data-index":L,"data-known-size":M.size,"data-item-index":M.index,style:PN},l(M.index,M.data,I))});return b.createElement(g,{ref:f,"data-testid":"virtuoso-item-list",...tt(g,I)},[R,...O,C])}),ON=({children:e})=>{const t=b.useContext(Ia),n=an("viewportHeight"),r=an("fixedItemHeight"),o=xn(b.useMemo(()=>Rs(n,s=>rn(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:$o(!1),ref:o,"data-viewport-type":"element"},e)},IN=({children:e})=>{const t=b.useContext(Ia),n=an("windowViewportRect"),r=an("fixedItemHeight"),o=Re("customScrollParent"),s=nd(n,o);return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:s,style:$o(!1),"data-viewport-type":"window"},e)},_N=b.memo(function(t){const n=Re("useWindowScroll"),r=Re("customScrollParent"),o=an("fixedHeaderHeight"),s=an("fixedFooterHeight"),i=Re("fixedHeaderContent"),a=Re("fixedFooterContent"),l=Re("context"),c=xn(b.useMemo(()=>Rs(o,w=>rn(w,"height")),[o])),u=xn(b.useMemo(()=>Rs(s,w=>rn(w,"height")),[s])),d=r||n?MN:DN,f=r||n?IN:ON,h=Re("TableComponent"),p=Re("TableHeadComponent"),m=Re("TableFooterComponent"),y=i?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...tt(p,l)},i()):null,v=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...tt(m,l)},a()):null;return b.createElement(d,{...t},b.createElement(f,null,b.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...tt(h,l)},[y,b.createElement(kN,{key:"TableBody"}),v])))}),{Component:AN,usePublisher:an,useEmitterValue:Re,useEmitter:cd}=Bu(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),DN=od({usePublisher:an,useEmitterValue:Re,useEmitter:cd}),MN=sd({usePublisher:an,useEmitterValue:Re,useEmitter:cd}),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 s=()=>{n(o.clientHeight)};return o.addEventListener("resize",s),s(),()=>{o.removeEventListener("resize",s)}},[]),t},LN={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"})})},VN=e=>{const t=b.useRef(null),n=FN(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(Ls,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(cN,{height:n,useWindowScroll:!0,data:e.source,components:LN,itemContent:(r,o)=>x.jsx(b.Fragment,{children:x.jsx(Tv,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(ns,{children:x.jsx(kl,{})})}),x.jsx("div",{})]})};var $N=Object.defineProperty,e0=Object.getOwnPropertySymbols,RN=Object.prototype.hasOwnProperty,jN=Object.prototype.propertyIsEnumerable,t0=(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={}))RN.call(t,n)&&t0(e,n,t[n]);if(e0)for(var n of e0(t))jN.call(t,n)&&t0(e,n,t[n]);return e},ud=(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)=>Ma(ud,e,t,n,r),Ro=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||!Ro(e)&&!Ro(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)=>(Ro(e)||Array.isArray(e))&&t?e[t]:e,HN=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Da=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: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:r0,notEmpty:e=>!r0(e),in:(e,t)=>ud(t,n=>gr(e,n)),notIn:(e,t)=>s0(t,n=>!gr(e,n))},UN=e=>{if(e in o0)return o0[e];throw new Error("Linq - Symbol not found")},jo=(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},Ma=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=UN(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},GN=(e,t,n,r)=>Ma(jo,e,t,n,r),s0=(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)=>Ma(s0,e,t,n,r),i0=e=>{if(e===null)return null;const t=BN({},e);return Object.keys(t).forEach(n=>t[n]=Ro(e[n])?i0(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(Ro(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=>jo(e,(t,n,r)=>Ro(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]},l0=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),s=n.get(o)||[];s.push(r),n.set(o,s)}),Object.fromEntries(n.entries())},XN=(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 s=t(e[r],r,e);n.push(s)}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 s=t.charCodeAt(0);for(;o<=s;o+=n)r.push(String.fromCharCode(o));return Da(e)&&Da(t)?r.map(i=>Number.parseInt(i)):r},dd=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Da(e)&&Da(t)){const o=[],[s,i]=QN(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return JN(e,t,r)},eF=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?dd(r,o,1):dd(r,s,Number.parseInt(o,10))}return n0(e)&&n0(t)?dd(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},fd=(e,t,n)=>{let r=t;const o=n.length;for(let s=0;s<o;s++){const i=n[s];r=e(r,i,s,n)}return r},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 s=t[n];t[n]=t[r],t[r]=s}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)=>Ma(tF,e,t,n,r),d0=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(HN(t))},f0=(e=>(e.Asc="asc",e.Desc="desc",e))(f0||{}),rF=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.key,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),oF=(e,t)=>e.sort(rF(t)),sF=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:jo(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},iF=class Ud{constructor(t=[]){this.array=t}static Range(...t){return eF(...t)}static New(t){return new Ud(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=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=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?fd((n,r)=>n+r,0,this.array):fd((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 l0(this.array,t)}Except(t){return jo(this.array,n=>!a0(t,n))}Intersect(t){return jo(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 ud(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 fd(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:jo(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Ud(i0(this.array))}ToObject(t){return qN(this.array,t)}Sort(t){return Array.isArray(t)?oF(this.array,t):d0(this.array,t)}Unique(t){return sF(this.array,t)}},h0=iF;const p0=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t};var hd={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(y,v)=>{try{Object.keys(y).forEach(v)}catch(w){window.console.log(w)}},n=y=>y==null,r=y=>{const v=typeof y;return v==="string"||v==="number"||v==="boolean"||n(y)},o=(y,v)=>{const w=v.getItem(y);try{return JSON.parse(w)}catch{return w??null}},s=y=>Object.keys(y).reduce((v,w)=>({...v,[w]:o(w,y)}),{}),i=y=>y instanceof Date?y:typeof y=="number"?new Date(new Date*1+y*864e5):y,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(y=>y.split("=")).reduce((y,v)=>(y[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),y),{}),c=new Set,u=()=>{const y=l();c.forEach(v=>v(y))},d=[{name:"expires",parse:y=>`expires=${i(y.expires??a)}`},{name:"maxAge",parse:y=>y.maxAge?`max-age=${i(y.expires??a)}`:""},{name:"path",parse:y=>`path=${y.path??"/"}`},{name:"sameSite",parse:y=>`samesite=${y.sameSite??"strict"}`},{name:"useSecure",parse:y=>`${y.useSecure??!0?"secure":""}`},{name:"domain",parse:y=>{const v=y.domain??"";return v===""?"":`domain=${y.multiDomain?".":""}${v}`}},{name:"partitioned",parse:y=>y.partitioned?"Partitioned":""}],f={json:l,listener:y=>(c.add(y),()=>c.delete(y)),clearListeners:()=>c.clear(),has:y=>document.cookie.split(";").some(v=>v.trim().startsWith(`${y}=`)),deleteAll:()=>{document.cookie.split(";").forEach(y=>{document.cookie=y.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:y=>{const v=f.json()[y];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:y=>{document.cookie=`${encodeURIComponent(y)}=;expires=${new Date().toUTCString()}`,u()},set:(y,v,w={})=>{const g=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=d.reduce((T,E)=>{const k=E.parse(w);return k===""?T:T.concat(k)},[`${encodeURIComponent(y)}=${g}`]).join(";");document.cookie=S,u()}},h=y=>{const v=new Set,w=g=>{y().removeItem(g);const S=s(y());v.forEach(T=>T(S))};return{delete:w,listener:g=>(v.add(g),()=>v.delete(g)),clearListeners:()=>v.clear(),json:(g=!1)=>g?s(y()):y(),has:g=>{const S=y().getItem(g);return!n(S)},deleteAll:()=>{t(y(),w),v.forEach(g=>g(y()))},get:g=>o(g,y()),set:(g,S)=>{y().setItem(g,JSON.stringify(S)),v.forEach(T=>T(y()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(hd);const pd=e=>e.headerLabel??e.thead??e.id,md=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Bo=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Bo||{});const gd=e=>e.type==="number"?e.valueAsNumber:e.value,aF=e=>{let t=[];return e({add:(o,s,i)=>t.push({...i,id:o,thead:s}),remove:o=>t=t.filter(s=>s.id!==o)}),t},lF={},cF=(e,t=lF)=>{const n=fa()?null:hd.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=Wc({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)||[]},s=>{const i=a=>{const l=s.state(),c={...l,...a};return fa()||hd.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>i(a)}});return{...r,...o,name:e}},yd=(e,t,n,r={})=>{var l;const o=e.id,s=e.type??Bo.Text,i=(l=t[s])==null?void 0:l[0].value,a=n[i];return{id:da(),operation:a,label:pd(e),name:o,type:s,value:"",...r}},vd=()=>{const e=tn(),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(()=>({[Bo.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Bo.Boolean]:[t.is,t.isNot],[Bo.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},uF=e=>{const t=tn(),{operationOptions:n,operations:r}=vd(),o=()=>{const c=e.cols.at(0);e.set(u=>[...u,yd(c,n,r)])},s=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 yd(p,n,r,{value:""})}))},i=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=gd(c.target);e.set(f=>f.map(h=>h.id===u?{...h,value:d}:h))};return x.jsx(b.Fragment,{children:x.jsx(Ao,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(z1,{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(dr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:c.name,"data-id":c.id,onChange:s}),x.jsx(dr,{"data-id":c.id,onChange:i,value:c.operation.value,options:u,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Ls,{"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(to,{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(Ol,{size:14})," ",t.tableFilterNewFilter]})})]})})})},dF=({filter:e,onDelete:t,set:n})=>{const r=tn(),{operationOptions:o,operations:s}=vd(),i=l=>{const c=l.target.value,u=l.target.dataset.id||"";n(d=>d.map(f=>f.id===u?{...f,operation:s[c]}:f))},a=l=>{const c=l.target.dataset.id||"",u=gd(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(dr,{"data-id":e.id,onChange:i,options:o[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder,value:e.operation.value}),x.jsx(Ls,{"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(to,{className:"text-danger",size:14})})]})},fF=({item:e,onPointerDown:t})=>{const n=ho(0);return x.jsxs($i.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(j1,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},hF=e=>{var a;const t=md(e.cols),n=DP(),[r,o]=b.useState(((a=e.groups[0])==null?void 0:a.thead)||""),s=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(y=>y.id===u);e.setGroups(Hx(h).map((y,v)=>{const w=h[y];return{...p,groupId:da(),groupKey:u,index:v,rows:w,groupName:y}}))},i=()=>e.setGroups([]);return x.jsx(b.Fragment,{children:x.jsxs(Ao,{arrow:!1,title:"Groups",trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(H1,{size:14}),"Groups",e.groups.length>0?` - ${r}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(dr,{value:r,title:"Tipo de agrupamento",onChange:s,options:t,placeholder:"Agrupar por..."}),x.jsx(ns,{className:"mt-4",onClick:i,theme:"raw","data-id":r,children:x.jsx(to,{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(yP,{children:x.jsx($i.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(fF,{item:l,onPointerDown:c=>{n.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},pF=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.value,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),mF=(e,t)=>e.sort(pF(t)),bd=(e,t,n="asc")=>({id:da(),type:n,value:e.id,label:t}),gF=e=>{const t=tn(),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,bd(l,n.asc.label)])},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return x.jsx(b.Fragment,{children:x.jsx(Ao,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(eh,{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(dr,{options:e.options,value:l.value,onChange:s(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(dr,{onChange:i(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),x.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:x.jsx(to,{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(Ol,{size:14})," ",t.tableSortAddButton]})})]})})})},yF=e=>{const t=tn(),[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(c=>c.value!==e.col.id);const l=a.findIndex(c=>c.value===e.col.id);return l===-1?[...a,bd(e.col,n)]:(a[l]=bd(e.col,n),[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=pd(e.col);return x.jsxs("button",{"aria-labelledby":s,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:s,className:"sr-only",children:[t.tableSortDropdownTitle," ",i]}),n==="asc"?x.jsx(N1,{size:14}):null,n==="desc"?x.jsx(M1,{size:14}):null,n==="undefined"?x.jsx(eh,{size:14}):null]})},vF=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(uF,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(gF,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(hF,{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=gd(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`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,s=e+r;for(let a=o>2?o:2;a<=Math.min(t,s);a++)n.push(a);const i=t-2;return s+1!==i&&s+1<t&&n.push("_"),s<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const wF=e=>{const t=b.useId(),n=tn(),r=e.asLink||"button",o=b.useMemo(()=>bF(e.current,e.pages),[e.current,e.pages]),s=e.current<e.pages;return x.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(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:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>x.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(i=>i===null?null:x.jsx(b.Fragment,{children:typeof i=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(r,{href:i,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${i===e.current?"text-primary border-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),s?x.jsx("li",{children:x.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},xF={opacity:1},TF={opacity:.75,backgroundColor:"var(--table-border)"},SF={opacity:0,transition:{duration:.4,type:"spring"}},EF=e=>{var d;const t=tn(),n=e.filters.filter(f=>f.name===e.header.id),o=n.length>0?G1:W1,{operationOptions:s,operations:i}=vd(),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=pd(e.header);return x.jsx($i.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:x.jsx("span",{className:"flex items-center justify-between",children:x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx(Ao,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",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(dF,{onDelete:a,filter:f,set:e.setFilters})},`thead-filter-${f.id}`)),x.jsx("li",{children:x.jsxs("button",{onClick:()=>e.setFilters(f=>f.concat(yd(e.header,s,i))),type:"button",className:"text-primary flex items-center gap-1",children:[x.jsx(Ol,{size:14})," ",t.tableFilterNewFilter]})})]})}),x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),x.jsx(yF,{col:e.header,setSorters:e.setSorters,sorters:e.sorters})]})})})},CF=e=>x.jsx($i.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(Vi,{children:e.headers.map(t=>x.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=()=>Rx(40,Math.random()*90,90),kF=b.forwardRef((e,t)=>x.jsx("tbody",{...e,role:"rowgroup",className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:x.jsx(Vi,{children:e.children})})),OF=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??""}`})),IF=b.forwardRef((e,t)=>x.jsx("thead",{...e,role:"rowgroup",className:"bg-card-background shadow-xs group:sticky top-0",ref:t})),_F=b.forwardRef((e,t)=>x.jsx("tr",{...e,role:"row",ref:t,className:`table-row ${e.className??""}`})),AF=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),DF={TableHead:IF,Table:OF,TableBody:kF,TableRow:_F,TableFoot:AF},MF=[0,0,0,0,0,0,0,0,0,0],NF=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(b.Fragment,{children:r.map((s,i)=>{const a=`${i},${e}`,l=gv(t,s.id),c=s.Element;return b.createElement("td",{...s.cellProps,"data-matrix":a,role:"cell",key:`accessor-${e}-${i}`,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:`${PF()}%`}}):c?x.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):x.jsx(b.Fragment,{children:Pn.nil(l)?"":l}))})})},FF=()=>x.jsx(b.Fragment,{}),m0=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:s,sorters:i,cols:a,border:l=!0,setSorters:c,...u})=>{const d=b.useRef(null),[f,h]=b.useState(!1),p=p0(n),m=p0(u.loadingMore),y=b.useMemo(()=>{if(u.loading)return MF;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)),i.length===0?v.Select():mF(v.Select(),i)},[u.rows,e,i,u.loading]);return b.useEffect(()=>{if(d.current===null)return()=>{};const v=d.current,w=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 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(NN,{data:y,useWindowScroll:!0,components:DF,totalCount:y.length,itemContent:NF,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:f?FF:null,fixedHeaderContent:()=>x.jsx(CF,{headers:a,sorters:i,filters:e,setCols:o,setSorters:c,setFilters:s,loading:!!u.loading})}),x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),t!==null?x.jsx(wF,{...t}):null]})},LF=(e,t)=>typeof t=="function"?t(e):t,VF=e=>{const t=e.operations??!0,n=b.useMemo(()=>md(e.cols),[e.cols]),[r,o]=Wc({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},s=>{const i=a=>l=>{const c=s.state();return{...c,[a]:LF(c[a],l)}};return{cols:i("cols"),filters:i("filters"),groups:i("groups"),sorters:i("sorters")}},{postMiddleware:[s=>{var i;return(i=e.set)==null||i.call(e,s),s}]});return x.jsxs("div",{className:"relative min-w-full",children:[t?x.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?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((s,i)=>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:s,groups:r.groups,index:i,optionCols:n,options:n,rows:s.rows,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters})},`group-${s.groupId}`))})]})},wd=(e="data-[open]:bg-primary focus:bg-primary")=>`w-full outline-none px-2 py-1 rounded items-center flex justify-between text-left min-w-32 ${e} aria-expanded:opacity-80`,xd=b.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),g0=b.forwardRef(({children:e,label:t,isParent:n,...r},o)=>{const s=lr(),i=s!==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(xd),y=cr(),v=U_(),w=My(),{floatingStyles:g,refs:S,context:T}=Ms({nodeId:v,open:a,transform:!0,onOpenChange:l,whileElementsMounted:Qi,placement:i?"right-start":"bottom-start",middleware:[ta({mainAxis:i?0:4,alignmentAxis:i?-4:0}),uu(),cu()]}),E=Fs(T,{role:"menu",enabled:!0}),k=Ds(T,{bubbles:!0}),A=By(T,{enabled:!0,delay:{open:75},handleClose:yA({blockPointerEvents:!0})}),D=vu(T,{event:"mousedown",toggle:!i,ignoreMouse:i,keyboardHandlers:!0}),I=av(T,{loop:!0,activeIndex:d,virtual:!0,nested:i,allowEscape:!0,listRef:h,scrollItemIntoView:!0,onNavigate:f}),V=mA(T,{activeIndex:d,listRef:p,onMatch:a?f:void 0}),{getReferenceProps:F,getFloatingProps:R,getItemProps:C}=Ns([A,D,E,k,I,V]);return b.useEffect(()=>{if(!y)return;const O=()=>l(!1),M=L=>{L.nodeId!==v&&L.parentId===s&&l(!1)};return y.events.on("click",O),y.events.on("menuopen",M),()=>{y.events.off("click",O),y.events.off("menuopen",M)}},[y,v,s]),b.useEffect(()=>{a&&y&&y.events.emit("menuopen",{parentId:s,nodeId:v})},[y,a,v,s]),x.jsxs(G_,{id:v,children:[x.jsxs("button",{ref:Oy([S.setReference,w.ref,o]),tabIndex:i?m.activeIndex===w.index?0:-1:void 0,"data-open":a?"":void 0,"data-nested":i?"":void 0,role:i?"menuitem":void 0,"data-focus-inside":c?"":void 0,className:n?pt(r.className):wd(r.className),...F(m.getItemProps({...r,onFocus(O){var M;(M=r.onFocus)==null||M.call(r,O),u(!1),m.setHasFocusInside(!0)}})),children:[t,i&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(kl,{size:14})]})]}),x.jsx(xd.Provider,{value:{activeIndex:d,setActiveIndex:f,getItemProps:C,setHasFocusInside:u,isOpen:a},children:x.jsx(B_,{elementsRef:h,labelsRef:p,children:a&&x.jsx(As,{preserveTabOrder:!0,children:x.jsx(la,{context:T,modal:!1,initialFocus:i?-1:0,returnFocus:!i,children:x.jsx("div",{ref:S.setFloating,style:g,className:"bg-floating-background outline-none items-start border text-left shadow-xl border-floating-border flex flex-col rounded-lg",...R(),children:e})})})})})]})}),$F=b.forwardRef(({label:e,Right:t,disabled:n,...r},o)=>{const s=b.useContext(xd),i=My({label:n?null:e}),a=cr(),l=i.index===s.activeIndex;return x.jsxs("button",{...r,ref:Oy([i.ref,o]),type:"button",role:"menuitem",disabled:n,tabIndex:l?0:-1,className:wd(r.className),...s.getItemProps({onClick(c){var u;(u=r.onClick)==null||u.call(r,c),a==null||a.events.emit("click")},onFocus(c){var u;(u=r.onFocus)==null||u.call(r,c),s.setHasFocusInside(!0)}}),children:[e,t?x.jsx(t,{size:16}):null]})}),RF=b.forwardRef((e,t)=>lr()!==null?x.jsx(g0,{...e,isParent:!1,ref:t}):x.jsx(Y_,{children:x.jsx(g0,{...e,isParent:!0,ref:t})}));var jF=String.prototype.replace,BF=/%20/g,Td={RFC1738:"RFC1738",RFC3986:"RFC3986"},Sd={default:Td.RFC3986,formatters:{RFC1738:function(e){return jF.call(e,BF,"+")},RFC3986:function(e){return String(e)}},RFC1738:Td.RFC1738,RFC3986:Td.RFC3986},zF=Sd,Ed=Object.prototype.hasOwnProperty,Rr=Array.isArray,Sn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),WF=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Rr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},y0=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},HF=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)||!Ed.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=y0(t,r)),Rr(t)&&Rr(n)?(n.forEach(function(s,i){if(Ed.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return Ed.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},UF=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},GF=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}},Cd=1024,YF=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=Cd){for(var c=i.length>=Cd?i.slice(l,l+Cd):i,u=[],d=0;d<c.length;++d){var f=c.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===zF.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=Sn[f];continue}if(f<2048){u[u.length]=Sn[192|f>>6]+Sn[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=Sn[224|f>>12]+Sn[128|f>>6&63]+Sn[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=Sn[240|f>>18]+Sn[128|f>>12&63]+Sn[128|f>>6&63]+Sn[128|f&63]}a+=u.join("")}return a},qF=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return WF(n),t},KF=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},ZF=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},XF=function(t,n){return[].concat(t,n)},QF=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)},v0={arrayToObject:y0,assign:UF,combine:XF,compact:qF,decode:GF,encode:YF,isBuffer:ZF,isRegExp:KF,maybeMap:QF,merge:HF},b0=Tx,Na=v0,Zs=Sd,JF=Object.prototype.hasOwnProperty,w0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},En=Array.isArray,eL=Array.prototype.push,x0=function(e,t){eL.apply(e,En(t)?t:[t])},tL=Date.prototype.toISOString,T0=Zs.default,gt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Na.encode,encodeValuesOnly:!1,format:T0,formatter:Zs.formatters[T0],indices:!1,serializeDate:function(t){return tL.call(t)},skipNulls:!1,strictNullHandling:!1},nL=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Pd={},rL=function e(t,n,r,o,s,i,a,l,c,u,d,f,h,p,m,y,v,w){for(var g=t,S=w,T=0,E=!1;(S=S.get(Pd))!==void 0&&!E;){var k=S.get(t);if(T+=1,typeof k<"u"){if(k===T)throw new RangeError("Cyclic object value");E=!0}typeof S.get(Pd)>"u"&&(T=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&En(g)&&(g=Na.maybeMap(g,function(P){return P instanceof Date?h(P):P})),g===null){if(i)return c&&!y?c(n,gt.encoder,v,"key",p):n;g=""}if(nL(g)||Na.isBuffer(g)){if(c){var A=y?n:c(n,gt.encoder,v,"key",p);return[m(A)+"="+m(c(g,gt.encoder,v,"value",p))]}return[m(n)+"="+m(String(g))]}var D=[];if(typeof g>"u")return D;var I;if(r==="comma"&&En(g))y&&c&&(g=Na.maybeMap(g,c)),I=[{value:g.length>0?g.join(",")||null:void 0}];else if(En(u))I=u;else{var V=Object.keys(g);I=d?V.sort(d):V}var F=l?n.replace(/\./g,"%2E"):n,R=o&&En(g)&&g.length===1?F+"[]":F;if(s&&En(g)&&g.length===0)return R+"[]";for(var C=0;C<I.length;++C){var O=I[C],M=typeof O=="object"&&typeof O.value<"u"?O.value:g[O];if(!(a&&M===null)){var L=f&&l?O.replace(/\./g,"%2E"):O,H=En(g)?typeof r=="function"?r(R,L):R:R+(f?"."+L:"["+L+"]");w.set(t,T);var G=b0();G.set(Pd,w),x0(D,e(M,H,r,o,s,i,a,l,r==="comma"&&y&&En(g)?null:c,u,d,f,h,p,m,y,v,G))}}return D},oL=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=Zs.default;if(typeof t.format<"u"){if(!JF.call(Zs.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Zs.formatters[r],s=gt.filter;(typeof t.filter=="function"||En(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in w0?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=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:i,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:s,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=oL(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):En(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=w0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=b0(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||x0(i,rL(n[d],d,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var f=i.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},zo=v0,kd=Object.prototype.hasOwnProperty,iL=Array.isArray,dt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:zo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},aL=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},S0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},lL="utf8=%26%2310003%3B",cL="utf8=%E2%9C%93",uL=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,i=o.split(n.delimiter,s),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<i.length;++l)i[l].indexOf("utf8=")===0&&(i[l]===cL?c="utf-8":i[l]===lL&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],d=u.indexOf("]="),f=d===-1?u.indexOf("="):d+1,h,p;f===-1?(h=n.decoder(u,dt.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),dt.decoder,c,"key"),p=zo.maybeMap(S0(u.slice(f+1),n),function(y){return n.decoder(y,dt.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=aL(p)),u.indexOf("[]=")>-1&&(p=iL(p)?[p]:p);var m=kd.call(r,h);m&&n.duplicates==="combine"?r[h]=zo.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},dL=function(e,t,n,r){for(var o=r?t:S0(t,n),s=e.length-1;s>=0;--s){var i,a=e[s];if(a==="[]"&&n.parseArrays)i=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?i={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[],i[u]=o):c!=="__proto__"&&(i[c]=o)}o=i}return o},fL=function(t,n,r,o){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&i.exec(s),c=l?s.slice(0,l.index):s,u=[];if(c){if(!r.plainObjects&&kd.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(s))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&kd.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),dL(u,n,r,o)}},hL=function(t){if(!t)return dt;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"?dt.charset:t.charset,r=typeof t.duplicates>"u"?dt.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:dt.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:dt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:dt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:dt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:dt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:dt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:dt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:dt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:dt.decoder,delimiter:typeof t.delimiter=="string"||zo.isRegExp(t.delimiter)?t.delimiter:dt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:dt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:dt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:dt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:dt.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:dt.strictNullHandling}},pL=function(e,t){var n=hL(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?uL(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=fL(a,r[a],n,typeof e=="string");o=zo.merge(o,l,n)}return n.allowSparse===!0?o:zo.compact(o)},mL=sL,gL=pL,yL=Sd,vL={formats:yL,parse:gL,stringify:mL},Pe;(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 s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Pe||(Pe={}));var E0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(E0||(E0={}));const ne=Pe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),jr=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=Pe.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 Jt 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(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof Jt))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Pe.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()}}Jt.create=e=>new Jt(e);const Xs=(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,Pe.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:n=`Unrecognized key(s) in object: ${Pe.joinValues(e.keys,", ")}`;break;case K.invalid_union:n="Invalid input";break;case K.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Pe.joinValues(e.options)}`;break;case K.invalid_enum_value:n=`Invalid enum value. Expected ${Pe.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}"`:Pe.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,Pe.assertNever(e)}return{message:n}};let bL=Xs;function Od(){return bL}const Id=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}};function te(e,t){const n=Od(),r=Id({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Xs?void 0:Xs].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 s=await o.key,i=await o.value;r.push({key:s,value:i})}return Lt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return me;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const me=Object.freeze({status:"aborted"}),Qs=e=>({status:"dirty",value:e}),zt=e=>({status:"valid",value:e}),C0=e=>e.status==="aborted",P0=e=>e.status==="dirty",Fa=e=>e.status==="valid",La=e=>typeof Promise<"u"&&e instanceof Promise;function Va(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 k0(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 Js,ei;class Cn{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 O0=(e,t)=>{if(Fa(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 Jt(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:(i,a)=>{var l,c;const{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:i.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 jr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:jr(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:jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(La(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:jr(t)},s=this._parseSync({data:t,path:o.path,parent:o});return O0(o,s)}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:jr(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(La(o)?o:Promise.resolve(o));return O0(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:K.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!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 Wr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ln.create(this,this._def)}promise(){return ri.create(this,this._def)}or(t){return ja.create([this,t],this._def)}and(t){return Ba.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 Ga({...ye(this._def),innerType:this,defaultValue:n,typeName:he.ZodDefault})}brand(){return new D0({typeName:he.ZodBranded,type:this,...ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ya({...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 Ka.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const wL=/^c[^\s-]{8,}$/i,xL=/^[0-9a-z]+$/,TL=/^[0-9A-HJKMNP-TV-Z]{26}$/,SL=/^[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,EL=/^[a-z0-9_-]{21}$/i,CL=/^[-+]?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)?)??$/,PL=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,kL="^(\\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])$/,IL=/^(([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})))$/,_L=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,I0="((\\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])))",AL=new RegExp(`^${I0}$`);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 DL(e){return new RegExp(`^${_0(e)}$`)}function ML(e){let t=`${I0}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 NL(e,t){return!!((t==="v4"||!t)&&OL.test(e)||(t==="v6"||!t)&&IL.test(e))}class Vn extends xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ne.string){const s=this._getOrReturnCtx(t);return te(s,{code:K.invalid_type,expected:ne.string,received:s.parsedType}),me}const r=new Lt;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?te(o,{code:K.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&te(o,{code:K.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")PL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"email",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")_d||(_d=new RegExp(kL,"u")),_d.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"emoji",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")SL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"uuid",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")EL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"nanoid",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")wL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")xL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid2",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")TL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ulid",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),te(o,{validation:"url",code:K.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"regex",code:K.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?ML(s).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?AL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?DL(s).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?CL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"duration",code:K.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?NL(t.data,s.version)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ip",code:K.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?_L.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"base64",code:K.invalid_string,message:s.message}),r.dirty()):Pe.assertNever(s);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 FL(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Br 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 s=this._getOrReturnCtx(t);return te(s,{code:K.invalid_type,expected:ne.number,received:s.parsedType}),me}let r;const o=new Lt;for(const s of this._def.checks)s.kind==="int"?Pe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:K.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?FL(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_finite,message:s.message}),o.dirty()):Pe.assertNever(s);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 Br({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new Br({...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"&&Pe.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)}}Br.create=e=>new Br({checks:[],typeName:he.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Wo 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 s=this._getOrReturnCtx(t);return te(s,{code:K.invalid_type,expected:ne.bigint,received:s.parsedType}),me}let r;const o=new Lt;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Pe.assertNever(s);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 Wo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new Wo({...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}}Wo.create=e=>{var t;return new Wo({checks:[],typeName:he.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};class Ad 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 zt(t.data)}}Ad.create=e=>new Ad({typeName:he.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class ti extends xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ne.date){const s=this._getOrReturnCtx(t);return te(s,{code:K.invalid_type,expected:ne.date,received:s.parsedType}),me}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return te(s,{code:K.invalid_date}),me}const r=new Lt;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Pe.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ti({...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}}ti.create=e=>new ti({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:he.ZodDate,...ye(e)});class Dd 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 zt(t.data)}}Dd.create=e=>new Dd({typeName:he.ZodSymbol,...ye(e)});class $a 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 zt(t.data)}}$a.create=e=>new $a({typeName:he.ZodUndefined,...ye(e)});class Ra 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 zt(t.data)}}Ra.create=e=>new Ra({typeName:he.ZodNull,...ye(e)});class Md extends xe{constructor(){super(...arguments),this._any=!0}_parse(t){return zt(t.data)}}Md.create=e=>new Md({typeName:he.ZodAny,...ye(e)});class Ho extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return zt(t.data)}}Ho.create=e=>new Ho({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 Nd 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 zt(t.data)}}Nd.create=e=>new Nd({typeName:he.ZodVoid,...ye(e)});class ln 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 i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(te(n,{code:i?K.too_big:K.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?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((i,a)=>o.type._parseAsync(new Cn(n,i,n.path,a)))).then(i=>Lt.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Cn(n,i,n.path,a)));return Lt.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new ln({...this._def,minLength:{value:t,message:le.toString(n)}})}max(t,n){return new ln({...this._def,maxLength:{value:t,message:le.toString(n)}})}length(t,n){return new ln({...this._def,exactLength:{value:t,message:le.toString(n)}})}nonempty(t){return this.min(1,t)}}ln.create=(e,t)=>new ln({type:e,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...ye(t)});function Uo(e){if(e instanceof nt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Bn.create(Uo(r))}return new nt({...e._def,shape:()=>t})}else return e instanceof ln?new ln({...e._def,type:Uo(e.element)}):e instanceof Bn?Bn.create(Uo(e.unwrap())):e instanceof Wr?Wr.create(Uo(e.unwrap())):e instanceof Rn?Rn.create(e.items.map(t=>Uo(t))):e}class nt 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=Pe.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:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof yr&&this._def.unknownKeys==="strip"))for(const c in o.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const u=s[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Cn(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 Cn(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 nt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=le.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new nt({...this._def,unknownKeys:"strip"})}passthrough(){return new nt({...this._def,unknownKeys:"passthrough"})}extend(t){return new nt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new nt({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 nt({...this._def,catchall:t})}pick(t){const n={};return Pe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new nt({...this._def,shape:()=>n})}omit(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new nt({...this._def,shape:()=>n})}deepPartial(){return Uo(this)}partial(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new nt({...this._def,shape:()=>n})}required(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Bn;)s=s._def.innerType;n[r]=s}}),new nt({...this._def,shape:()=>n})}keyof(){return A0(Pe.objectKeys(this.shape))}}nt.create=(e,t)=>new nt({shape:()=>e,unknownKeys:"strip",catchall:yr.create(),typeName:he.ZodObject,...ye(t)}),nt.strictCreate=(e,t)=>new nt({shape:()=>e,unknownKeys:"strict",catchall:yr.create(),typeName:he.ZodObject,...ye(t)}),nt.lazycreate=(e,t)=>new nt({shape:e,unknownKeys:"strip",catchall:yr.create(),typeName:he.ZodObject,...ye(t)});class ja extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new Jt(a.ctx.common.issues));return te(n,{code:K.invalid_union,unionErrors:i}),me}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];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"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new Jt(l));return te(n,{code:K.invalid_union,unionErrors:a}),me}}get options(){return this._def.options}}ja.create=(e,t)=>new ja({options:e,typeName:he.ZodUnion,...ye(t)});const $n=e=>e instanceof Wa?$n(e.schema):e instanceof jn?$n(e.innerType()):e instanceof Ha?[e.value]:e instanceof zr?e.options:e instanceof Ua?Pe.objectValues(e.enum):e instanceof Ga?$n(e._def.innerType):e instanceof $a?[void 0]:e instanceof Ra?[null]:e instanceof Bn?[void 0,...$n(e.unwrap())]:e instanceof Wr?[null,...$n(e.unwrap())]:e instanceof D0||e instanceof Ka?$n(e.unwrap()):e instanceof Ya?$n(e._def.innerType):[];class Fd 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],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._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 s of n){const i=$n(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new Fd({typeName:he.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...ye(r)})}}function Ld(e,t){const n=jr(e),r=jr(t);if(e===t)return{valid:!0,data:e};if(n===ne.object&&r===ne.object){const o=Pe.objectKeys(t),s=Pe.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=Ld(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===ne.array&&r===ne.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=Ld(i,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 Ba extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(C0(s)||C0(i))return me;const a=Ld(s.value,i.value);return a.valid?((P0(s)||P0(i))&&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(([s,i])=>o(s,i)):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}))}}Ba.create=(e,t,n)=>new Ba({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!==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 s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Cn(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>Lt.mergeArray(n,i)):Lt.mergeArray(n,s)}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 za 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=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Cn(r,a,r.path,a)),value:i._parse(new Cn(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 za({keyType:t,valueType:n,typeName:he.ZodRecord,...ye(r)}):new za({keyType:Vn.create(),valueType:t,typeName:he.ZodRecord,...ye(n)})}}class Vd 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,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Cn(r,a,r.path,[c,"key"])),value:s._parse(new Cn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){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 i){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}}}}Vd.create=(e,t,n)=>new Vd({valueType:t,keyType:e,typeName:he.ZodMap,...ye(n)});class Go 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 s=this._def.valueType;function i(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)=>s._parse(new Cn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new Go({...this._def,minSize:{value:t,message:le.toString(n)}})}max(t,n){return new Go({...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)}}Go.create=(e,t)=>new Go({valueType:e,minSize:null,maxSize:null,typeName:he.ZodSet,...ye(t)});class ni 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 Id({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Od(),Xs].filter(c=>!!c),issueData:{code:K.invalid_arguments,argumentsError:l}})}function o(a,l){return Id({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Od(),Xs].filter(c=>!!c),issueData:{code:K.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof ri){const a=this;return zt(async function(...l){const c=new Jt([]),u=await a._def.args.parseAsync(l,s).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{const a=this;return zt(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new Jt([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new Jt([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ni({...this._def,args:Rn.create(t).rest(Ho.create())})}returns(t){return new ni({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ni({args:t||Rn.create([]).rest(Ho.create()),returns:n||Ho.create(),typeName:he.ZodFunction,...ye(r)})}}class Wa 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})}}Wa.create=(e,t)=>new Wa({getter:e,typeName:he.ZodLazy,...ye(t)});class Ha 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}}Ha.create=(e,t)=>new Ha({value:e,typeName:he.ZodLiteral,...ye(t)});function A0(e,t){return new zr({values:e,typeName:he.ZodEnum,...ye(t)})}class zr extends xe{constructor(){super(...arguments),Js.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{expected:Pe.joinValues(r),received:n.parsedType,code:K.invalid_type}),me}if(Va(this,Js)||k0(this,Js,new Set(this._def.values)),!Va(this,Js).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 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 zr.create(t,{...this._def,...n})}exclude(t,n=this._def){return zr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Js=new WeakMap,zr.create=A0;class Ua extends xe{constructor(){super(...arguments),ei.set(this,void 0)}_parse(t){const n=Pe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ne.string&&r.parsedType!==ne.number){const o=Pe.objectValues(n);return te(r,{expected:Pe.joinValues(o),received:r.parsedType,code:K.invalid_type}),me}if(Va(this,ei)||k0(this,ei,new Set(Pe.getValidEnumValues(this._def.values))),!Va(this,ei).has(t.data)){const o=Pe.objectValues(n);return te(r,{received:r.data,code:K.invalid_enum_value,options:o}),me}return zt(t.data)}get enum(){return this._def.values}}ei=new WeakMap,Ua.create=(e,t)=>new Ua({values:e,typeName:he.ZodNativeEnum,...ye(t)});class ri 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 zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ri.create=(e,t)=>new ri({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,s={addIssue:i=>{te(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).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"?Qs(l.value):l});{if(n.value==="aborted")return me;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?me:a.status==="dirty"||n.value==="dirty"?Qs(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);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(),i(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(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Fa(i))return i;const a=o.transform(i.value,s);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(i=>Fa(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);Pe.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)===ne.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 Wr extends xe{_parse(t){return this._getType(t)===ne.null?zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Wr.create=(e,t)=>new Wr({innerType:e,typeName:he.ZodNullable,...ye(t)});class Ga 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}}Ga.create=(e,t)=>new Ga({innerType:e,typeName:he.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ye(t)});class Ya 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 La(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Jt(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Jt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ya.create=(e,t)=>new Ya({innerType:e,typeName:he.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ye(t)});class $d 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}}}$d.create=e=>new $d({typeName:he.ZodNaN,...ye(e)});class D0 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 s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?me:s.status==="dirty"?(n.dirty(),Qs(s.value)):this._def.out._parseAsync({data:s.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 Ka extends xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Fa(o)&&(o.value=Object.freeze(o.value)),o);return La(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ka.create=(e,t)=>new Ka({innerType:e,typeName:he.ZodReadonly,...ye(t)}),nt.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,Br.create,$d.create,Wo.create,Ad.create,ti.create,Dd.create,$a.create,Ra.create,Md.create,Ho.create,yr.create,Nd.create,ln.create,nt.create,nt.strictCreate,ja.create,Fd.create,Ba.create,Rn.create,za.create,Vd.create,Go.create,ni.create,Wa.create,Ha.create,zr.create,Ua.create,ri.create,jn.create,Bn.create,Wr.create,jn.createWithPreprocess,qa.create;const LL={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},M0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return vL.parse(n.toString(),LL)},N0=e=>e.replace("[",".").replace("]","").split("."),Rd=(e,t)=>N0(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o instanceof ln?o.element:o},t),Za=e=>e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value,VL=e=>{const[t,n]=b.useState(null),r=b.useRef({}),o=(l,c)=>{const u=Rd(l,e);return{...c,name:l,id:l,error:t==null?void 0:t[l],ref:d=>{d!==null&&(r.current[l]={element:d,schema:u})}}},s=(l,c)=>{const u=Rd(l,e);return{...c,name:l,id:l,type:Pn.instance(u,Br)?"number":(c==null?void 0:c.type)??"text",error:t==null?void 0:t[l],ref:d=>{d!==null&&(r.current[l]={element:d,schema:u})}}};b.useEffect(()=>{const l=Object.values(r.current).map(u=>{const d=u.schema.safeParse(Za(u.element)),f=p=>{const m=u.schema.safeParse(Za(p.target)),y=u.element,v=y.name;if(m.success)return y.setCustomValidity(""),n(w=>{const{[v]:g,...S}=w||{};return S===null||Pn.empty(S)?null:S});if(y.required){const w=m.error.issues[0].message;y.setCustomValidity(w),n(g=>({...g,[v]:w}))}},h=u.element.tagName==="INPUT"?"blur":"change";return u.element.addEventListener(h,f),{input:u,hasInitialError:u.element.required?!d.success:!1,unsubscribe:()=>u.element.removeEventListener(h,f)}});return l.some(u=>u.hasInitialError)&&n(u=>u===null?{}:u),()=>l.forEach(u=>u.unsubscribe())});const i=b.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget,d=Object.values(r.current).reduce((h,p)=>{const m=p.element,y=p.schema.safeParse(Za(m));if(y.success)return h;const v=y.error.issues[0].message;return m.setAttribute("data-initialized","true"),{...h,[m.name]:v}},{}),f=Pn.empty(d)?null:{};n(f),l==null||l({form:u,errors:f||{}})},[]),a=b.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget;let d=M0(u);Array.from(u.elements).forEach(f=>{if(f.tagName==="SELECT"){const h=f;d=Uf(d,h.name,h.value)}if(f.tagName==="INPUT"){const h=f;d=Uf(d,h.name,Za(h))}}),l({form:u,json:d,event:c,reset:()=>ab(u)})},[]);return{input:s,select:o,onSubmit:a,errors:t,onInvalid:i,disabled:t!==null}},$L={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%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(210, 40%, 98%)"},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%, 15%)"},table:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"}}},RL={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:{full:"50%",pill:"2rem",card:"0.75rem"},colors:{foreground:"hsla(217, 15%, 32%)",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%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(210, 34%, 96%)"},input:{border:"hsla(218, 22%, 80%)",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%, 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%, 15%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"}}},jL={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>)`},oi=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return o.concat(t(i,l,a))}return o.concat(oi(i,t,n,a))},[]),F0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return{...o,[l]:t(i,s,a)}}return{...o,[s]:F0(i,t,n,a)}},{}),L0={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},jd=(e,t)=>{const n=t.value||((o,s)=>s),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},BL={default:e=>jd(e,{result:L0.default}),dark:e=>jd(e,{result:L0.dark})},zL=(e,t)=>{const n=(i,a,l)=>({key:`--${l}`,value:`${i}`}),r=oi(e.colors,n),o=oi(e.spacing,n),s=oi(e.rounded,n);return jd(r.concat(o,s),{result:i=>`html${t?`.${t}`:""} {${i}}`,value:(i,a)=>a.replace("hsla(","").replace(")","")})};ee.Alert=FP,ee.Autocomplete=$A,ee.Button=ns,ee.ButtonGroup=k1,ee.Calendar=Qg,ee.Card=Jg,ee.Checkbox=Tv,ee.ColType=Bo,ee.Collapse=eg,ee.DatePicker=jA,ee.Dropdown=Ao,ee.FileUpload=QD,ee.Form=eM,ee.Input=Ls,ee.InputFeedback=dv,ee.InputField=ua,ee.Menu=RF,ee.MenuItem=$F,ee.Modal=NA,ee.Option=xv,ee.Polymorph=eo,ee.Radiobox=tM,ee.Select=dr,ee.Stats=EI,ee.Switch=nM,ee.Tab=wA,ee.Table=VF,ee.Tabs=vA,ee.Tag=I1,ee.Tooltip=uv,ee.TransferList=VN,ee.convertPath=N0,ee.createColumns=aF,ee.createDesignTokens=F0,ee.createOptionCols=md,ee.createStyles=BL,ee.createTheme=zL,ee.css=pt,ee.defaultDarkTheme=$L,ee.defaultLightTheme=RL,ee.dispatchInput=Pl,ee.formReset=ab,ee.formToJson=M0,ee.getSchemaShape=Rd,ee.isReactComponent=E1,ee.isReactFC=C1,ee.isSsr=fa,ee.mergeRefs=Cl,ee.parsers=jL,ee.path=gv,ee.reduceTokens=oi,ee.safeRegex=Tu,ee.useForm=VL,ee.usePrevious=wv,ee.useReactive=ey,ee.useTablePreferences=cF,ee.uuid=da,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
|
|
191
196
|
//# sourceMappingURL=index.umd.js.map
|