@g4rcez/components 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +77 -117
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18002 -16413
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +77 -117
- package/dist/index.umd.js.map +1 -1
- package/dist/preset/src/styles/design-tokens.d.ts.map +1 -1
- package/dist/src/components/core/render-on-view.d.ts.map +1 -1
- package/dist/src/components/core/resizable.d.ts.map +1 -1
- package/dist/src/components/core/tag.d.ts +1 -1
- package/dist/src/components/core/tag.js +2 -2
- package/dist/src/components/display/alert.d.ts.map +1 -1
- package/dist/src/components/display/alert.js +1 -1
- package/dist/src/components/display/calendar.d.ts +7 -16
- package/dist/src/components/display/calendar.d.ts.map +1 -1
- package/dist/src/components/display/calendar.js +27 -25
- package/dist/src/components/display/card.d.ts.map +1 -1
- package/dist/src/components/display/card.js +1 -1
- package/dist/src/components/display/empty.d.ts.map +1 -1
- package/dist/src/components/display/empty.js +1 -1
- package/dist/src/components/display/list.d.ts +1 -1
- package/dist/src/components/display/list.d.ts.map +1 -1
- package/dist/src/components/display/list.js +1 -1
- package/dist/src/components/display/notifications.d.ts.map +1 -1
- package/dist/src/components/display/notifications.js +1 -1
- package/dist/src/components/display/stats.d.ts +3 -1
- package/dist/src/components/display/stats.d.ts.map +1 -1
- package/dist/src/components/display/stats.js +1 -1
- package/dist/src/components/display/step.d.ts.map +1 -1
- package/dist/src/components/display/step.js +1 -1
- package/dist/src/components/display/tabs.d.ts.map +1 -1
- package/dist/src/components/display/tabs.js +2 -2
- package/dist/src/components/display/timeline.d.ts +8 -30
- package/dist/src/components/display/timeline.d.ts.map +1 -1
- package/dist/src/components/display/timeline.js +11 -14
- package/dist/src/components/floating/dropdown.d.ts.map +1 -1
- package/dist/src/components/floating/expand.d.ts.map +1 -1
- package/dist/src/components/floating/modal.d.ts +5 -2
- package/dist/src/components/floating/modal.d.ts.map +1 -1
- package/dist/src/components/floating/modal.js +20 -14
- package/dist/src/components/floating/toolbar.d.ts.map +1 -1
- package/dist/src/components/floating/tooltip.d.ts.map +1 -1
- package/dist/src/components/form/autocomplete.d.ts.map +1 -1
- package/dist/src/components/form/autocomplete.js +4 -4
- package/dist/src/components/form/date-picker.d.ts +2 -66
- package/dist/src/components/form/date-picker.d.ts.map +1 -1
- package/dist/src/components/form/date-picker.js +3 -2
- package/dist/src/components/form/file-upload.d.ts.map +1 -1
- package/dist/src/components/form/form.d.ts +0 -1
- package/dist/src/components/form/form.d.ts.map +1 -1
- package/dist/src/components/form/form.js +0 -17
- package/dist/src/components/form/formReset.d.ts +2 -0
- package/dist/src/components/form/formReset.d.ts.map +1 -0
- package/dist/src/components/form/formReset.js +17 -0
- package/dist/src/components/form/free-text.d.ts +4 -5
- package/dist/src/components/form/free-text.d.ts.map +1 -1
- package/dist/src/components/form/input-field.d.ts.map +1 -1
- package/dist/src/components/form/input-field.js +2 -1
- package/dist/src/components/form/input.d.ts +2 -2
- package/dist/src/components/form/input.d.ts.map +1 -1
- package/dist/src/components/form/multi-select.d.ts +19 -0
- package/dist/src/components/form/multi-select.d.ts.map +1 -0
- package/dist/src/components/form/{multi-combobox.js → multi-select.js} +26 -19
- package/dist/src/components/form/radiobox.d.ts.map +1 -1
- package/dist/src/components/form/select.js +1 -1
- package/dist/src/components/form/task-list.d.ts.map +1 -1
- package/dist/src/components/form/textarea.d.ts +2 -1
- package/dist/src/components/form/textarea.d.ts.map +1 -1
- package/dist/src/components/form/transfer-list.d.ts.map +1 -1
- package/dist/src/components/index.d.ts +3 -1
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +3 -1
- package/dist/src/components/table/filter.d.ts +7 -7
- package/dist/src/components/table/filter.d.ts.map +1 -1
- package/dist/src/components/table/filter.js +1 -1
- package/dist/src/components/table/group.d.ts +3 -3
- package/dist/src/components/table/group.d.ts.map +1 -1
- package/dist/src/components/table/group.js +1 -1
- package/dist/src/components/table/index.d.ts +9 -8
- package/dist/src/components/table/index.d.ts.map +1 -1
- package/dist/src/components/table/metadata.d.ts +2 -1
- package/dist/src/components/table/metadata.d.ts.map +1 -1
- package/dist/src/components/table/pagination.d.ts.map +1 -1
- package/dist/src/components/table/pagination.js +7 -7
- package/dist/src/components/table/sort.d.ts +8 -8
- package/dist/src/components/table/sort.d.ts.map +1 -1
- package/dist/src/components/table/sort.js +2 -2
- package/dist/src/components/table/table-lib.d.ts +3 -3
- package/dist/src/components/table/table-lib.d.ts.map +1 -1
- package/dist/src/components/table/thead.d.ts +2 -2
- package/dist/src/components/table/thead.d.ts.map +1 -1
- package/dist/src/components/table/thead.js +12 -10
- package/dist/src/config/context.d.ts +17 -0
- package/dist/src/config/context.d.ts.map +1 -0
- package/dist/src/config/context.js +10 -0
- package/dist/src/config/default-translations.d.ts +59 -0
- package/dist/src/config/default-translations.d.ts.map +1 -0
- package/dist/src/config/default-translations.js +52 -0
- package/dist/src/config/default-tweaks.d.ts +7 -0
- package/dist/src/config/default-tweaks.d.ts.map +1 -0
- package/dist/src/config/default-tweaks.js +5 -0
- package/dist/src/hooks/use-click-outside.d.ts.map +1 -1
- package/dist/src/hooks/use-color-parser.d.ts +2 -0
- package/dist/src/hooks/use-color-parser.d.ts.map +1 -0
- package/dist/src/hooks/use-color-parser.js +9 -0
- package/dist/src/hooks/use-components-provider.d.ts +8 -127
- package/dist/src/hooks/use-components-provider.d.ts.map +1 -1
- package/dist/src/hooks/use-components-provider.js +5 -89
- package/dist/src/hooks/use-debounce.d.ts +1 -0
- package/dist/src/hooks/use-debounce.d.ts.map +1 -1
- package/dist/src/hooks/use-debounce.js +1 -1
- package/dist/src/hooks/use-form.d.ts +21 -4
- package/dist/src/hooks/use-form.d.ts.map +1 -1
- package/dist/src/hooks/use-hover.d.ts.map +1 -1
- package/dist/src/hooks/use-locale.d.ts +3 -0
- package/dist/src/hooks/use-locale.d.ts.map +1 -0
- package/dist/src/hooks/use-locale.js +10 -0
- package/dist/src/hooks/use-media-query.d.ts.map +1 -1
- package/dist/src/hooks/use-on-event.d.ts.map +1 -1
- package/dist/src/hooks/use-on-event.js +1 -1
- package/dist/src/hooks/use-parent.d.ts.map +1 -1
- package/dist/src/hooks/use-previous.d.ts.map +1 -1
- package/dist/src/hooks/use-previous.js +1 -1
- package/dist/src/hooks/use-reactive.d.ts +1 -1
- package/dist/src/hooks/use-reactive.d.ts.map +1 -1
- package/dist/src/hooks/use-remove-scroll.d.ts +2 -0
- package/dist/src/hooks/use-remove-scroll.d.ts.map +1 -0
- package/dist/src/hooks/use-remove-scroll.js +30 -0
- package/dist/src/hooks/use-stable-ref.d.ts +1 -1
- package/dist/src/hooks/use-stable-ref.d.ts.map +1 -1
- package/dist/src/hooks/use-swipe.d.ts +8 -0
- package/dist/src/hooks/use-swipe.d.ts.map +1 -0
- package/dist/src/hooks/use-swipe.js +16 -0
- package/dist/src/hooks/use-translations.d.ts +57 -0
- package/dist/src/hooks/use-translations.d.ts.map +1 -0
- package/dist/src/hooks/use-translations.js +9 -0
- package/dist/src/hooks/use-tweaks.d.ts +3 -0
- package/dist/src/hooks/use-tweaks.d.ts.map +1 -0
- package/dist/src/hooks/use-tweaks.js +9 -0
- package/dist/src/index.d.ts +12 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +11 -5
- package/dist/src/lib/dict.d.ts +2 -2
- package/dist/src/lib/dict.d.ts.map +1 -1
- package/dist/src/lib/dict.js +8 -6
- package/dist/src/lib/dom.d.ts +4 -3
- package/dist/src/lib/dom.d.ts.map +1 -1
- package/dist/src/lib/dom.js +2 -1
- package/dist/src/lib/fns.d.ts +3 -2
- package/dist/src/lib/fns.d.ts.map +1 -1
- package/dist/src/styles/design-tokens.d.ts.map +1 -1
- package/dist/src/types.d.ts +9 -2
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +36 -26
- package/dist/src/components/form/multi-combobox.d.ts +0 -24
- package/dist/src/components/form/multi-combobox.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,237 +1,197 @@
|
|
|
1
|
-
"use strict";var Xw=Object.defineProperty;var Qw=(e,t,n)=>t in e?Xw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ae=(e,t,n)=>Qw(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),w=require("react/jsx-runtime"),pi=require("react-dom");function wy(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 R=wy(x),gi=wy(pi);function Sy(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=Sy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Jw(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Sy(e))&&(r&&(r+=" "),r+=t);return r}var uh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function e1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t1(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 n1=Error,r1=EvalError,o1=RangeError,s1=ReferenceError,Ty=SyntaxError,yi=TypeError,i1=URIError,a1=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},dh=typeof Symbol<"u"&&Symbol,l1=a1,c1=function(){return typeof dh!="function"||typeof Symbol!="function"||typeof dh("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:l1()},Wl={__proto__:null,foo:{}},u1=Object,d1=function(){return{__proto__:Wl}.foo===Wl.foo&&!(Wl instanceof u1)},f1="Function.prototype.bind called on incompatible ",h1=Object.prototype.toString,m1=Math.max,p1="[object Function]",fh=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},g1=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},y1=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},v1=function(t){var n=this;if(typeof n!="function"||h1.apply(n)!==p1)throw new TypeError(f1+n);for(var r=g1(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,fh(r,arguments));return Object(u)===u?u:this}return n.apply(t,fh(r,arguments))},i=m1(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+y1(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},b1=v1,fd=Function.prototype.bind||b1,x1=Function.prototype.call,w1=Object.prototype.hasOwnProperty,S1=fd,T1=S1.call(x1,w1),Re,E1=n1,C1=r1,R1=o1,P1=s1,Do=Ty,Co=yi,k1=i1,Ey=Function,zl=function(e){try{return Ey('"use strict"; return ('+e+").constructor;")()}catch{}},Nr=Object.getOwnPropertyDescriptor;if(Nr)try{Nr({},"")}catch{Nr=null}var Hl=function(){throw new Co},I1=Nr?function(){try{return arguments.callee,Hl}catch{try{return Nr(arguments,"callee").get}catch{return Hl}}}():Hl,so=c1(),A1=d1(),St=Object.getPrototypeOf||(A1?function(e){return e.__proto__}:null),po={},O1=typeof Uint8Array>"u"||!St?Re:St(Uint8Array),jr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Re:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Re:ArrayBuffer,"%ArrayIteratorPrototype%":so&&St?St([][Symbol.iterator]()):Re,"%AsyncFromSyncIteratorPrototype%":Re,"%AsyncFunction%":po,"%AsyncGenerator%":po,"%AsyncGeneratorFunction%":po,"%AsyncIteratorPrototype%":po,"%Atomics%":typeof Atomics>"u"?Re:Atomics,"%BigInt%":typeof BigInt>"u"?Re:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Re:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Re:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Re:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":E1,"%eval%":eval,"%EvalError%":C1,"%Float32Array%":typeof Float32Array>"u"?Re:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Re:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Re:FinalizationRegistry,"%Function%":Ey,"%GeneratorFunction%":po,"%Int8Array%":typeof Int8Array>"u"?Re:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Re:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Re:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":so&&St?St(St([][Symbol.iterator]())):Re,"%JSON%":typeof JSON=="object"?JSON:Re,"%Map%":typeof Map>"u"?Re:Map,"%MapIteratorPrototype%":typeof Map>"u"||!so||!St?Re:St(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Re:Promise,"%Proxy%":typeof Proxy>"u"?Re:Proxy,"%RangeError%":R1,"%ReferenceError%":P1,"%Reflect%":typeof Reflect>"u"?Re:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Re:Set,"%SetIteratorPrototype%":typeof Set>"u"||!so||!St?Re:St(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Re:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":so&&St?St(""[Symbol.iterator]()):Re,"%Symbol%":so?Symbol:Re,"%SyntaxError%":Do,"%ThrowTypeError%":I1,"%TypedArray%":O1,"%TypeError%":Co,"%Uint8Array%":typeof Uint8Array>"u"?Re:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Re:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Re:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Re:Uint32Array,"%URIError%":k1,"%WeakMap%":typeof WeakMap>"u"?Re:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Re:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Re:WeakSet};if(St)try{null.error}catch(e){var _1=St(St(e));jr["%Error.prototype%"]=_1}var M1=function e(t){var n;if(t==="%AsyncFunction%")n=zl("async function () {}");else if(t==="%GeneratorFunction%")n=zl("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=zl("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&St&&(n=St(o.prototype))}return jr[t]=n,n},hh={__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"]},vi=fd,ba=T1,D1=vi.call(Function.call,Array.prototype.concat),N1=vi.call(Function.apply,Array.prototype.splice),mh=vi.call(Function.call,String.prototype.replace),xa=vi.call(Function.call,String.prototype.slice),j1=vi.call(Function.call,RegExp.prototype.exec),L1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F1=/\\(\\)?/g,V1=function(t){var n=xa(t,0,1),r=xa(t,-1);if(n==="%"&&r!=="%")throw new Do("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Do("invalid intrinsic syntax, expected opening `%`");var o=[];return mh(t,L1,function(s,i,a,l){o[o.length]=a?mh(l,F1,"$1"):i||s}),o},$1=function(t,n){var r=t,o;if(ba(hh,r)&&(o=hh[r],r="%"+o[0]+"%"),ba(jr,r)){var s=jr[r];if(s===po&&(s=M1(r)),typeof s>"u"&&!n)throw new Co("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new Do("intrinsic "+t+" does not exist!")},ts=function(t,n){if(typeof t!="string"||t.length===0)throw new Co("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Co('"allowMissing" argument must be a boolean');if(j1(/^%?[^%]*%?$/,t)===null)throw new Do("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=V1(t),o=r.length>0?r[0]:"",s=$1("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],N1(r,D1([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=xa(f,0,1),p=xa(f,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new Do("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,i="%"+o+"%",ba(jr,i))a=jr[i];else if(a!=null){if(!(f in a)){if(!n)throw new Co("base intrinsic for "+t+" exists, but the property is not available.");return}if(Nr&&u+1>=r.length){var m=Nr(a,f);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else d=ba(a,f),a=a[f];d&&!l&&(jr[i]=a)}}return a},Cy={exports:{}},Ul,ph;function hd(){if(ph)return Ul;ph=1;var e=ts,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Ul=t,Ul}var B1=ts,ia=B1("%Object.getOwnPropertyDescriptor%",!0);if(ia)try{ia([],"length")}catch{ia=null}var Ry=ia,gh=hd(),W1=Ty,io=yi,yh=Ry,z1=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new io("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new io("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new io("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new io("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new io("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new io("`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=!!yh&&yh(t,n);if(gh)gh(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 W1("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},eu=hd(),Py=function(){return!!eu};Py.hasArrayLengthDefineBug=function(){if(!eu)return null;try{return eu([],"length",{value:1}).length!==1}catch{return!0}};var H1=Py,U1=ts,vh=z1,G1=H1(),bh=Ry,xh=yi,Y1=U1("%Math.floor%"),q1=function(t,n){if(typeof t!="function")throw new xh("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Y1(n)!==n)throw new xh("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&bh){var i=bh(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(G1?vh(t,"length",n,!0,!0):vh(t,"length",n)),t};(function(e){var t=fd,n=ts,r=q1,o=yi,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=hd(),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})(Cy);var K1=Cy.exports,ky=ts,Iy=K1,Z1=Iy(ky("String.prototype.indexOf")),X1=function(t,n){var r=ky(t,!!n);return typeof r=="function"&&Z1(t,".prototype.")>-1?Iy(r):r};const Q1={},J1=Object.freeze(Object.defineProperty({__proto__:null,default:Q1},Symbol.toStringTag,{value:"Module"})),eS=t1(J1);var md=typeof Map=="function"&&Map.prototype,Gl=Object.getOwnPropertyDescriptor&&md?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,wa=md&&Gl&&typeof Gl.get=="function"?Gl.get:null,wh=md&&Map.prototype.forEach,pd=typeof Set=="function"&&Set.prototype,Yl=Object.getOwnPropertyDescriptor&&pd?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Sa=pd&&Yl&&typeof Yl.get=="function"?Yl.get:null,Sh=pd&&Set.prototype.forEach,tS=typeof WeakMap=="function"&&WeakMap.prototype,Ms=tS?WeakMap.prototype.has:null,nS=typeof WeakSet=="function"&&WeakSet.prototype,Ds=nS?WeakSet.prototype.has:null,rS=typeof WeakRef=="function"&&WeakRef.prototype,Th=rS?WeakRef.prototype.deref:null,oS=Boolean.prototype.valueOf,sS=Object.prototype.toString,iS=Function.prototype.toString,aS=String.prototype.match,gd=String.prototype.slice,tr=String.prototype.replace,lS=String.prototype.toUpperCase,Eh=String.prototype.toLowerCase,Ay=RegExp.prototype.test,Ch=Array.prototype.concat,bn=Array.prototype.join,cS=Array.prototype.slice,Rh=Math.floor,tu=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ql=Object.getOwnPropertySymbols,nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,No=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Nt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===No||!0)?Symbol.toStringTag:null,Oy=Object.prototype.propertyIsEnumerable,Ph=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function kh(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Ay.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Rh(-e):Rh(e);if(r!==e){var o=String(r),s=gd.call(t,o.length+1);return tr.call(o,n,"$&_")+"."+tr.call(tr.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return tr.call(t,n,"$&_")}var ru=eS,Ih=ru.custom,Ah=My(Ih)?Ih:null,uS=function e(t,n,r,o){var s=n||{};if(Qn(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Qn(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=Qn(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(Qn(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(Qn(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 Ny(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?kh(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?kh(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 ou(t)?"[Array]":"[Object]";var d=kS(s,r);if(typeof o>"u")o=[];else if(Dy(o,t)>=0)return"[Circular]";function f(L,P,O){if(P&&(o=cS.call(o),o.push(P)),O){var j={depth:s.depth};return Qn(s,"quoteStyle")&&(j.quoteStyle=s.quoteStyle),e(L,j,r+1,o)}return e(L,s,r+1,o)}if(typeof t=="function"&&!Oh(t)){var h=bS(t),p=Fi(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+bn.call(p,", ")+" }":"")}if(My(t)){var m=No?tr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):nu.call(t);return typeof t=="object"&&!No?xs(m):m}if(CS(t)){for(var v="<"+Eh.call(String(t.nodeName)),b=t.attributes||[],y=0;y<b.length;y++)v+=" "+b[y].name+"="+_y(dS(b[y].value),"double",s);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+Eh.call(String(t.nodeName))+">",v}if(ou(t)){if(t.length===0)return"[]";var g=Fi(t,f);return d&&!PS(g)?"["+su(g,d)+"]":"[ "+bn.call(g,", ")+" ]"}if(hS(t)){var T=Fi(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!Oy.call(t,"cause")?"{ ["+String(t)+"] "+bn.call(Ch.call("[cause]: "+f(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+bn.call(T,", ")+" }"}if(typeof t=="object"&&i){if(Ah&&typeof t[Ah]=="function"&&ru)return ru(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(xS(t)){var S=[];return wh&&wh.call(t,function(L,P){S.push(f(P,t,!0)+" => "+f(L,t))}),_h("Map",wa.call(t),S,d)}if(TS(t)){var E=[];return Sh&&Sh.call(t,function(L){E.push(f(L,t))}),_h("Set",Sa.call(t),E,d)}if(wS(t))return Kl("WeakMap");if(ES(t))return Kl("WeakSet");if(SS(t))return Kl("WeakRef");if(pS(t))return xs(f(Number(t)));if(yS(t))return xs(f(tu.call(t)));if(gS(t))return xs(oS.call(t));if(mS(t))return xs(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof uh<"u"&&t===uh)return"{ [object globalThis] }";if(!fS(t)&&!Oh(t)){var C=Fi(t,f),k=Ph?Ph(t)===Object.prototype:t instanceof Object||t.constructor===Object,I=t instanceof Object?"":"null prototype",A=!k&&Nt&&Object(t)===t&&Nt in t?gd.call(dr(t),8,-1):I?"Object":"",N=k||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",M=N+(A||I?"["+bn.call(Ch.call([],A||[],I||[]),": ")+"] ":"");return C.length===0?M+"{}":d?M+"{"+su(C,d)+"}":M+"{ "+bn.call(C,", ")+" }"}return String(t)};function _y(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function dS(e){return tr.call(String(e),/"/g,""")}function ou(e){return dr(e)==="[object Array]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function fS(e){return dr(e)==="[object Date]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function Oh(e){return dr(e)==="[object RegExp]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function hS(e){return dr(e)==="[object Error]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function mS(e){return dr(e)==="[object String]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function pS(e){return dr(e)==="[object Number]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function gS(e){return dr(e)==="[object Boolean]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function My(e){if(No)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!nu)return!1;try{return nu.call(e),!0}catch{}return!1}function yS(e){if(!e||typeof e!="object"||!tu)return!1;try{return tu.call(e),!0}catch{}return!1}var vS=Object.prototype.hasOwnProperty||function(e){return e in this};function Qn(e,t){return vS.call(e,t)}function dr(e){return sS.call(e)}function bS(e){if(e.name)return e.name;var t=aS.call(iS.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Dy(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 xS(e){if(!wa||!e||typeof e!="object")return!1;try{wa.call(e);try{Sa.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function wS(e){if(!Ms||!e||typeof e!="object")return!1;try{Ms.call(e,Ms);try{Ds.call(e,Ds)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function SS(e){if(!Th||!e||typeof e!="object")return!1;try{return Th.call(e),!0}catch{}return!1}function TS(e){if(!Sa||!e||typeof e!="object")return!1;try{Sa.call(e);try{wa.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function ES(e){if(!Ds||!e||typeof e!="object")return!1;try{Ds.call(e,Ds);try{Ms.call(e,Ms)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function CS(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Ny(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Ny(gd.call(e,0,t.maxStringLength),t)+r}var o=tr.call(tr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,RS);return _y(o,"single",t)}function RS(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":"")+lS.call(t.toString(16))}function xs(e){return"Object("+e+")"}function Kl(e){return e+" { ? }"}function _h(e,t,n,r){var o=r?su(n,r):bn.call(n,", ");return e+" ("+t+") {"+o+"}"}function PS(e){for(var t=0;t<e.length;t++)if(Dy(e[t],`
|
|
2
|
-
`)>=0)return!1;return!0}function
|
|
3
|
-
`+
|
|
4
|
-
`+t.prev}function Fi(e,t){var n=ou(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Qn(e,o)?t(e[o],e):""}var s=typeof ql=="function"?ql(e):[],i;if(No){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)Qn(e,l)&&(n&&String(Number(l))===l&&l<e.length||No&&i["$"+l]instanceof Symbol||(Ay.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof ql=="function")for(var c=0;c<s.length;c++)Oy.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var jy=ts,ns=X1,IS=uS,AS=yi,Vi=jy("%WeakMap%",!0),$i=jy("%Map%",!0),OS=ns("WeakMap.prototype.get",!0),_S=ns("WeakMap.prototype.set",!0),MS=ns("WeakMap.prototype.has",!0),DS=ns("Map.prototype.get",!0),NS=ns("Map.prototype.set",!0),jS=ns("Map.prototype.has",!0),yd=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},LS=function(e,t){var n=yd(e,t);return n&&n.value},FS=function(e,t,n){var r=yd(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},VS=function(e,t){return!!yd(e,t)},$S=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new AS("Side channel does not contain "+IS(s))},get:function(s){if(Vi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return OS(t,s)}else if($i){if(n)return DS(n,s)}else if(r)return LS(r,s)},has:function(s){if(Vi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return MS(t,s)}else if($i){if(n)return jS(n,s)}else if(r)return VS(r,s);return!1},set:function(s,i){Vi&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new Vi),_S(t,s,i)):$i?(n||(n=new $i),NS(n,s,i)):(r||(r={key:{},next:null}),FS(r,s,i))}};return o},Mh=e=>Array.isArray(e),Zl=e=>e===void 0,Xl=e=>e===null,BS=Function.bind.call(Function.call,Object.prototype.toString),WS=e=>!!e&&BS(e)==="[object Error]"||e instanceof Error,Ly=(e,t)=>e instanceof t,zS=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},HS=e=>Object.prototype.toString.call(e)==="[object Date]"&&Ly(e,Date),it={array:Mh,date:HS,empty:e=>Xl(e)||Zl(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:Ly,isError:WS,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Xl(e)||Zl(e),null:Xl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Mh(e)&&typeof e=="object",primitive:zS,string:e=>typeof e=="string",undefined:Zl},US=e=>Object.keys(e),wr=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((s,i)=>s&&s[i],e);return o===void 0?n:o};const vd="-";function GS(e){const t=qS(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(vd);return a[0]===""&&a.length!==1&&a.shift(),Fy(a,t)||YS(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Fy(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Fy(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(vd);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Dh=/^\[(.+)\]$/;function YS(e){if(Dh.test(e)){const t=Dh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function qS(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return ZS(Object.entries(e.classGroups),n).forEach(([s,i])=>{iu(i,r,s,t)}),r}function iu(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Nh(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(KS(o)){iu(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{iu(i,Nh(t,s),n,r)})})}function Nh(e,t){let n=e;return t.split(vd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function KS(e){return e.isThemeGetter}function ZS(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 XS(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 Vy="!";function QS(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 v=0;v<a.length;v++){let b=a[v];if(c===0){if(b===o&&(r||a.slice(v,v+s)===t)){l.push(a.slice(u,v)),u=v+s;continue}if(b==="/"){d=v;continue}}b==="["?c++:b==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(Vy),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 JS(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 eT(e){return{cache:XS(e.cacheSize),parseClassName:QS(e),...GS(e)}}const tT=/\s+/;function nT(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(tT).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=JS(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Vy: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 rT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=$y(t))&&(r&&(r+=" "),r+=n);return r}function $y(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=$y(e[r]))&&(n&&(n+=" "),n+=t);return n}function oT(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=eT(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=nT(l,n);return o(l,u),u}return function(){return s(rT.apply(null,arguments))}}function Ze(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const By=/^\[(?:([a-z-]+):)?(.+)\]$/i,sT=/^\d+\/\d+$/,iT=new Set(["px","full","screen"]),aT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lT=/\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$/,cT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,uT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Ln(e){return Or(e)||iT.has(e)||sT.test(e)}function qn(e){return rs(e,"length",bT)}function Or(e){return!!e&&!Number.isNaN(Number(e))}function Bi(e){return rs(e,"number",Or)}function ws(e){return!!e&&Number.isInteger(Number(e))}function fT(e){return e.endsWith("%")&&Or(e.slice(0,-1))}function we(e){return By.test(e)}function Kn(e){return aT.test(e)}const hT=new Set(["length","size","percentage"]);function mT(e){return rs(e,hT,Wy)}function pT(e){return rs(e,"position",Wy)}const gT=new Set(["image","url"]);function yT(e){return rs(e,gT,wT)}function vT(e){return rs(e,"",xT)}function Ss(){return!0}function rs(e,t,n){const r=By.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function bT(e){return lT.test(e)&&!cT.test(e)}function Wy(){return!1}function xT(e){return uT.test(e)}function wT(e){return dT.test(e)}function ST(){const e=Ze("colors"),t=Ze("spacing"),n=Ze("blur"),r=Ze("brightness"),o=Ze("borderColor"),s=Ze("borderRadius"),i=Ze("borderSpacing"),a=Ze("borderWidth"),l=Ze("contrast"),c=Ze("grayscale"),u=Ze("hueRotate"),d=Ze("invert"),f=Ze("gap"),h=Ze("gradientColorStops"),p=Ze("gradientColorStopPositions"),m=Ze("inset"),v=Ze("margin"),b=Ze("opacity"),y=Ze("padding"),g=Ze("saturate"),T=Ze("scale"),S=Ze("sepia"),E=Ze("skew"),C=Ze("space"),k=Ze("translate"),I=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto",we,t],M=()=>[we,t],L=()=>["",Ln,qn],P=()=>["auto",Or,we],O=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],D=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",we],_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[Or,Bi],K=()=>[Or,we];return{cacheSize:500,separator:":",theme:{colors:[Ss],spacing:[Ln,qn],blur:["none","",Kn,we],brightness:$(),borderColor:[e],borderRadius:["none","","full",Kn,we],borderSpacing:M(),borderWidth:L(),contrast:$(),grayscale:H(),hueRotate:K(),invert:H(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[fT,qn],inset:N(),margin:N(),opacity:$(),padding:M(),saturate:$(),scale:$(),sepia:H(),skew:K(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",we]}],container:["container"],columns:[{columns:[Kn]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...O(),we]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],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",ws,we]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",we]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",ws,we]}],"grid-cols":[{"grid-cols":[Ss]}],"col-start-end":[{col:["auto",{span:["full",ws,we]},we]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[Ss]}],"row-start-end":[{row:["auto",{span:[ws,we]},we]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",we]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",we]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...V()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...V(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...V(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[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",we,t]}],"min-w":[{"min-w":[we,t,"min","max","fit"]}],"max-w":[{"max-w":[we,t,"none","full","min","max","fit","prose",{screen:[Kn]},Kn]}],h:[{h:[we,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[we,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[we,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[we,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Kn,qn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Bi]}],"font-family":[{font:[Ss]}],"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",we]}],"line-clamp":[{"line-clamp":["none",Or,Bi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ln,we]}],"list-image":[{"list-image":["none",we]}],"list-style-type":[{list:["none","disc","decimal",we]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ln,qn]}],"underline-offset":[{"underline-offset":["auto",Ln,we]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we]}],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",we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...O(),pT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},yT]}],"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":[b]}],"border-style":[{border:[...j(),"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":[b]}],"divide-style":[{divide:j()}],"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:["",...j()]}],"outline-offset":[{"outline-offset":[Ln,we]}],"outline-w":[{outline:[Ln,qn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Ln,qn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Kn,vT]}],"shadow-color":[{shadow:[Ss]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...D(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":D()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Kn,we]}],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":[b]}],"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",we]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",we]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",we]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[ws,we]}],"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",we]}],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",we]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ln,qn,Bi]}],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 TT=oT(ST),bd=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},ET=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),CT=e=>it.function(e),Me=(...e)=>TT(Jw(e)),xd=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},bi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Jt=(e,t=2)=>e.toString(16).padStart(t,"0"),xi=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${Jt(t,4)+Jt(n,3)}-${Jt(r[0])+Jt(r[1])}-${Jt(r[2])+Jt(r[3])}-${Jt(r[4])+Jt(r[5])}-${Jt(r[6])+Jt(r[7])+Jt(r[8])+Jt(r[9])}`},jh=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Lh={basic:/[,[\]]+?/,extend:/[,[\].]+?/},wd=(e,t)=>{const n=jh(t,Lh.basic,e)||jh(t,Lh.extend,e);return n===void 0||n===e?void 0:n},Ta=()=>typeof window>"u",au=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),zy=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,s=e.slice(o,o+t);s.length>0&&n.push(s)}return n},RT=e=>!e,Sd=()=>{};function Hy(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=Hy(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function PT(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Hy(e))&&(r&&(r+=" "),r+=t);return r}const Fh=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Vh=PT,os=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Vh(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=Fh(u)||Fh(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[m,v]=p;return Array.isArray(v)?v.includes({...s,...a}[m]):{...s,...a}[m]===v})?[...c,d,f]:c},[]);return Vh(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},kT="span",ss=x.forwardRef(function(t,n){const r=t.as||kT;return w.jsx(r,{ref:n,...t,as:void 0})}),IT=os("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-primary text-primary-foreground",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),jo=x.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 w.jsxs(ss,{...l,ref:c,type:s,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Me(IT({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),Ys=e=>{const t=x.useRef(e);return x.useEffect(()=>{t.current=e},[e]),t};function AT(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const OT=({children:e,...t})=>{const n=Ys(t.onIntersection),r=x.useRef(null),[o,s]=x.useState(()=>r.current===null?!1:AT(r.current));return x.useLayoutEffect(()=>{const i=r.current;if(i===null)return;const a=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),s(d=>c.isIntersecting?!0:d)});return a.observe(i),()=>a.disconnect()},[]),w.jsx("div",{...t,ref:r,children:o?e:null})},_T=os("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",main:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),MT=os("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),Td=x.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:s,size:i,...a},l){return w.jsxs(ss,{...a,ref:l,"data-theme":s,"data-component":"tag",as:a.as??"span",className:Me(MT({size:i,theme:s}),t),children:[n?w.jsx("span",{className:_T({theme:n})}):null,r,a.children]})}),qs=x.createContext({});function hn(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const ml=x.createContext(null),Lo=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class DT extends R.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function NT({children:e,isPresent:t,anchorX:n}){const r=x.useId(),o=x.useRef(null),s=x.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=x.useContext(Lo);return x.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:u,right:d}=s.current;if(t||!o.current||!a||!l)return;const f=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const h=document.createElement("style");return i&&(h.nonce=i),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
|
|
1
|
+
"use strict";var _1=Object.defineProperty;var M1=(e,t,n)=>t in e?_1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var de=(e,t,n)=>M1(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),x=require("react/jsx-runtime"),ca=require("react-dom");function dy(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const A=dy(E),Gs=dy(ca);function fy(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=fy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function py(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=fy(e))&&(r&&(r+=" "),r+=t);return r}const Ap=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ip=py,Xo=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ip(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const p=Ap(u)||Ap(d);return o[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(h=>{let[y,m]=h;return Array.isArray(m)?m.includes({...i,...s}[y]):{...i,...s}[y]===m})?[...c,d,p]:c},[]);return Ip(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};var Op=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function D1(e){if(Object.prototype.hasOwnProperty.call(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 Ol,_p;function Qo(){return _p||(_p=1,Ol=TypeError),Ol}const j1={},N1=Object.freeze(Object.defineProperty({__proto__:null,default:j1},Symbol.toStringTag,{value:"Module"})),F1=D1(N1);var _l,Mp;function Ys(){if(Mp)return _l;Mp=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,p=typeof WeakRef=="function"&&WeakRef.prototype,f=p?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,y=Object.prototype.toString,m=Function.prototype.toString,v=String.prototype.match,g=String.prototype.slice,b=String.prototype.replace,S=String.prototype.toUpperCase,T=String.prototype.toLowerCase,w=RegExp.prototype.test,C=Array.prototype.concat,R=Array.prototype.join,I=Array.prototype.slice,P=Math.floor,j=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,k=typeof Symbol=="function"&&typeof Symbol.iterator=="object",M=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===k||!0)?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,L=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(H){return H.__proto__}:null);function _(H,q){if(H===1/0||H===-1/0||H!==H||H&&H>-1e3&&H<1e3||w.call(/e/,q))return q;var Le=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof H=="number"){var Xe=H<0?-P(-H):P(H);if(Xe!==H){var rt=String(Xe),Oe=g.call(q,rt.length+1);return b.call(rt,Le,"$&_")+"."+b.call(b.call(Oe,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(q,Le,"$&_")}var z=F1,O=z.custom,B=ke(O)?O:null,Q={__proto__:null,double:'"',single:"'"},re={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};_l=function H(q,Le,Xe,rt){var Oe=Le||{};if(G(Oe,"quoteStyle")&&!G(Q,Oe.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(Oe,"maxStringLength")&&(typeof Oe.maxStringLength=="number"?Oe.maxStringLength<0&&Oe.maxStringLength!==1/0:Oe.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var er=G(Oe,"customInspect")?Oe.customInspect:!0;if(typeof er!="boolean"&&er!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(Oe,"indent")&&Oe.indent!==null&&Oe.indent!==" "&&!(parseInt(Oe.indent,10)===Oe.indent&&Oe.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(Oe,"numericSeparator")&&typeof Oe.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Cr=Oe.numericSeparator;if(typeof q>"u")return"undefined";if(q===null)return"null";if(typeof q=="boolean")return q?"true":"false";if(typeof q=="string")return Ge(q,Oe);if(typeof q=="number"){if(q===0)return 1/0/q>0?"0":"-0";var Zt=String(q);return Cr?_(q,Zt):Zt}if(typeof q=="bigint"){var tr=String(q)+"n";return Cr?_(q,tr):tr}var El=typeof Oe.depth>"u"?5:Oe.depth;if(typeof Xe>"u"&&(Xe=0),Xe>=El&&El>0&&typeof q=="object")return Y(q)?"[Array]":"[Object]";var ao=Xn(Oe,Xe);if(typeof rt>"u")rt=[];else if(X(rt,q)>=0)return"[Circular]";function pn(so,Ra,O1){if(Ra&&(rt=I.call(rt),rt.push(Ra)),O1){var Pp={depth:Oe.depth};return G(Oe,"quoteStyle")&&(Pp.quoteStyle=Oe.quoteStyle),H(so,Pp,Xe+1,rt)}return H(so,Oe,Xe+1,rt)}if(typeof q=="function"&&!W(q)){var wp=ie(q),Tp=Jn(q,pn);return"[Function"+(wp?": "+wp:" (anonymous)")+"]"+(Tp.length>0?" { "+R.call(Tp,", ")+" }":"")}if(ke(q)){var Sp=k?b.call(String(q),/^(Symbol\(.*\))_[^)]*$/,"$1"):V.call(q);return typeof q=="object"&&!k?ct(Sp):Sp}if(Me(q)){for(var hi="<"+T.call(String(q.nodeName)),Cl=q.attributes||[],ka=0;ka<Cl.length;ka++)hi+=" "+Cl[ka].name+"="+J(K(Cl[ka].value),"double",Oe);return hi+=">",q.childNodes&&q.childNodes.length&&(hi+="..."),hi+="</"+T.call(String(q.nodeName))+">",hi}if(Y(q)){if(q.length===0)return"[]";var kl=Jn(q,pn);return ao&&!Sn(kl)?"["+Qn(kl,ao)+"]":"[ "+R.call(kl,", ")+" ]"}if(Z(q)){var Rl=Jn(q,pn);return!("cause"in Error.prototype)&&"cause"in q&&!D.call(q,"cause")?"{ ["+String(q)+"] "+R.call(C.call("[cause]: "+pn(q.cause),Rl),", ")+" }":Rl.length===0?"["+String(q)+"]":"{ ["+String(q)+"] "+R.call(Rl,", ")+" }"}if(typeof q=="object"&&er){if(B&&typeof q[B]=="function"&&z)return z(q,{depth:El-Xe});if(er!=="symbol"&&typeof q.inspect=="function")return q.inspect()}if(ue(q)){var Ep=[];return r&&r.call(q,function(so,Ra){Ep.push(pn(Ra,q,!0)+" => "+pn(so,q))}),fn("Map",n.call(q),Ep,ao)}if(te(q)){var Cp=[];return s&&s.call(q,function(so){Cp.push(pn(so,q))}),fn("Set",a.call(q),Cp,ao)}if(ge(q))return _t("WeakMap");if(le(q))return _t("WeakSet");if(be(q))return _t("WeakRef");if($(q))return ct(pn(Number(q)));if(Ae(q))return ct(pn(j.call(q)));if(ye(q))return ct(h.call(q));if(oe(q))return ct(pn(String(q)));if(typeof window<"u"&&q===window)return"{ [object Window] }";if(typeof globalThis<"u"&&q===globalThis||typeof Op<"u"&&q===Op)return"{ [object globalThis] }";if(!F(q)&&!W(q)){var Pl=Jn(q,pn),kp=L?L(q)===Object.prototype:q instanceof Object||q.constructor===Object,Al=q instanceof Object?"":"null prototype",Rp=!kp&&M&&Object(q)===q&&M in q?g.call(ae(q),8,-1):Al?"Object":"",I1=kp||typeof q.constructor!="function"?"":q.constructor.name?q.constructor.name+" ":"",Il=I1+(Rp||Al?"["+R.call(C.call([],Rp||[],Al||[]),": ")+"] ":"");return Pl.length===0?Il+"{}":ao?Il+"{"+Qn(Pl,ao)+"}":Il+"{ "+R.call(Pl,", ")+" }"}return String(q)};function J(H,q,Le){var Xe=Le.quoteStyle||q,rt=Q[Xe];return rt+H+rt}function K(H){return b.call(String(H),/"/g,""")}function U(H){return!M||!(typeof H=="object"&&(M in H||typeof H[M]<"u"))}function Y(H){return ae(H)==="[object Array]"&&U(H)}function F(H){return ae(H)==="[object Date]"&&U(H)}function W(H){return ae(H)==="[object RegExp]"&&U(H)}function Z(H){return ae(H)==="[object Error]"&&U(H)}function oe(H){return ae(H)==="[object String]"&&U(H)}function $(H){return ae(H)==="[object Number]"&&U(H)}function ye(H){return ae(H)==="[object Boolean]"&&U(H)}function ke(H){if(k)return H&&typeof H=="object"&&H instanceof Symbol;if(typeof H=="symbol")return!0;if(!H||typeof H!="object"||!V)return!1;try{return V.call(H),!0}catch{}return!1}function Ae(H){if(!H||typeof H!="object"||!j)return!1;try{return j.call(H),!0}catch{}return!1}var Ie=Object.prototype.hasOwnProperty||function(H){return H in this};function G(H,q){return Ie.call(H,q)}function ae(H){return y.call(H)}function ie(H){if(H.name)return H.name;var q=v.call(m.call(H),/^function\s*([\w$]+)/);return q?q[1]:null}function X(H,q){if(H.indexOf)return H.indexOf(q);for(var Le=0,Xe=H.length;Le<Xe;Le++)if(H[Le]===q)return Le;return-1}function ue(H){if(!n||!H||typeof H!="object")return!1;try{n.call(H);try{a.call(H)}catch{return!0}return H instanceof Map}catch{}return!1}function ge(H){if(!c||!H||typeof H!="object")return!1;try{c.call(H,c);try{d.call(H,d)}catch{return!0}return H instanceof WeakMap}catch{}return!1}function be(H){if(!f||!H||typeof H!="object")return!1;try{return f.call(H),!0}catch{}return!1}function te(H){if(!a||!H||typeof H!="object")return!1;try{a.call(H);try{n.call(H)}catch{return!0}return H instanceof Set}catch{}return!1}function le(H){if(!d||!H||typeof H!="object")return!1;try{d.call(H,d);try{c.call(H,c)}catch{return!0}return H instanceof WeakSet}catch{}return!1}function Me(H){return!H||typeof H!="object"?!1:typeof HTMLElement<"u"&&H instanceof HTMLElement?!0:typeof H.nodeName=="string"&&typeof H.getAttribute=="function"}function Ge(H,q){if(H.length>q.maxStringLength){var Le=H.length-q.maxStringLength,Xe="... "+Le+" more character"+(Le>1?"s":"");return Ge(g.call(H,0,q.maxStringLength),q)+Xe}var rt=re[q.quoteStyle||"single"];rt.lastIndex=0;var Oe=b.call(b.call(H,rt,"\\$1"),/[\x00-\x1f]/g,xt);return J(Oe,"single",q)}function xt(H){var q=H.charCodeAt(0),Le={8:"b",9:"t",10:"n",12:"f",13:"r"}[q];return Le?"\\"+Le:"\\x"+(q<16?"0":"")+S.call(q.toString(16))}function ct(H){return"Object("+H+")"}function _t(H){return H+" { ? }"}function fn(H,q,Le,Xe){var rt=Xe?Qn(Le,Xe):R.call(Le,", ");return H+" ("+q+") {"+rt+"}"}function Sn(H){for(var q=0;q<H.length;q++)if(X(H[q],`
|
|
2
|
+
`)>=0)return!1;return!0}function Xn(H,q){var Le;if(H.indent===" ")Le=" ";else if(typeof H.indent=="number"&&H.indent>0)Le=R.call(Array(H.indent+1)," ");else return null;return{base:Le,prev:R.call(Array(q+1),Le)}}function Qn(H,q){if(H.length===0)return"";var Le=`
|
|
3
|
+
`+q.prev+q.base;return Le+R.call(H,","+Le)+`
|
|
4
|
+
`+q.prev}function Jn(H,q){var Le=Y(H),Xe=[];if(Le){Xe.length=H.length;for(var rt=0;rt<H.length;rt++)Xe[rt]=G(H,rt)?q(H[rt],H):""}var Oe=typeof N=="function"?N(H):[],er;if(k){er={};for(var Cr=0;Cr<Oe.length;Cr++)er["$"+Oe[Cr]]=Oe[Cr]}for(var Zt in H)G(H,Zt)&&(Le&&String(Number(Zt))===Zt&&Zt<H.length||k&&er["$"+Zt]instanceof Symbol||(w.call(/[^\w$]/,Zt)?Xe.push(q(Zt,H)+": "+q(H[Zt],H)):Xe.push(Zt+": "+q(H[Zt],H))));if(typeof N=="function")for(var tr=0;tr<Oe.length;tr++)D.call(H,Oe[tr])&&Xe.push("["+q(Oe[tr])+"]: "+q(H[Oe[tr]],H));return Xe}return _l}var Ml,Dp;function L1(){if(Dp)return Ml;Dp=1;var e=Ys(),t=Qo(),n=function(s,l,c){for(var u=s,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=s.next,s.next=d),d},r=function(s,l){if(s){var c=n(s,l);return c&&c.value}},o=function(s,l,c){var u=n(s,l);u?u.value=c:s.next={key:l,next:s.next,value:c}},i=function(s,l){return s?!!n(s,l):!1},a=function(s,l){if(s)return n(s,l,!0)};return Ml=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,p=a(l,u);return p&&d&&d===p&&(l=void 0),!!p},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},Ml}var Dl,jp;function my(){return jp||(jp=1,Dl=Object),Dl}var jl,Np;function V1(){return Np||(Np=1,jl=Error),jl}var Nl,Fp;function z1(){return Fp||(Fp=1,Nl=EvalError),Nl}var Fl,Lp;function $1(){return Lp||(Lp=1,Fl=RangeError),Fl}var Ll,Vp;function B1(){return Vp||(Vp=1,Ll=ReferenceError),Ll}var Vl,zp;function H1(){return zp||(zp=1,Vl=SyntaxError),Vl}var zl,$p;function W1(){return $p||($p=1,zl=URIError),zl}var $l,Bp;function q1(){return Bp||(Bp=1,$l=Math.abs),$l}var Bl,Hp;function U1(){return Hp||(Hp=1,Bl=Math.floor),Bl}var Hl,Wp;function G1(){return Wp||(Wp=1,Hl=Math.max),Hl}var Wl,qp;function Y1(){return qp||(qp=1,Wl=Math.min),Wl}var ql,Up;function K1(){return Up||(Up=1,ql=Math.pow),ql}var Ul,Gp;function Z1(){return Gp||(Gp=1,Ul=Math.round),Ul}var Gl,Yp;function X1(){return Yp||(Yp=1,Gl=Number.isNaN||function(t){return t!==t}),Gl}var Yl,Kp;function Q1(){if(Kp)return Yl;Kp=1;var e=X1();return Yl=function(n){return e(n)||n===0?n:n<0?-1:1},Yl}var Kl,Zp;function J1(){return Zp||(Zp=1,Kl=Object.getOwnPropertyDescriptor),Kl}var Zl,Xp;function gy(){if(Xp)return Zl;Xp=1;var e=J1();if(e)try{e([],"length")}catch{e=null}return Zl=e,Zl}var Xl,Qp;function eT(){if(Qp)return Xl;Qp=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Xl=e,Xl}var Ql,Jp;function tT(){return Jp||(Jp=1,Ql=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(var i 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 a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0}),Ql}var Jl,eh;function nT(){if(eh)return Jl;eh=1;var e=typeof Symbol<"u"&&Symbol,t=tT();return Jl=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Jl}var ec,th;function vy(){return th||(th=1,ec=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),ec}var tc,nh;function yy(){if(nh)return tc;nh=1;var e=my();return tc=e.getPrototypeOf||null,tc}var nc,rh;function rT(){if(rh)return nc;rh=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var p=0;p<c.length;p+=1)u[p+l.length]=c[p];return u},i=function(l,c){for(var u=[],d=c,p=0;d<l.length;d+=1,p+=1)u[p]=l[d];return u},a=function(s,l){for(var c="",u=0;u<s.length;u+=1)c+=s[u],u+1<s.length&&(c+=l);return c};return nc=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,p=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),h=[],y=0;y<f;y++)h[y]="$"+y;if(d=Function("binder","return function ("+a(h,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var m=function(){};m.prototype=c.prototype,d.prototype=new m,m.prototype=null}return d},nc}var rc,oh;function Ks(){if(oh)return rc;oh=1;var e=rT();return rc=Function.prototype.bind||e,rc}var oc,ih;function Id(){return ih||(ih=1,oc=Function.prototype.call),oc}var ic,ah;function xy(){return ah||(ah=1,ic=Function.prototype.apply),ic}var ac,sh;function oT(){return sh||(sh=1,ac=typeof Reflect<"u"&&Reflect&&Reflect.apply),ac}var sc,lh;function iT(){if(lh)return sc;lh=1;var e=Ks(),t=xy(),n=Id(),r=oT();return sc=r||e.call(n,t),sc}var lc,ch;function by(){if(ch)return lc;ch=1;var e=Ks(),t=Qo(),n=Id(),r=iT();return lc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},lc}var cc,uh;function aT(){if(uh)return cc;uh=1;var e=by(),t=gy(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return cc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,cc}var uc,dh;function sT(){if(dh)return uc;dh=1;var e=vy(),t=yy(),n=aT();return uc=e?function(o){return e(o)}:t?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return t(o)}:n?function(o){return n(o)}:null,uc}var dc,fh;function lT(){if(fh)return dc;fh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Ks();return dc=n.call(e,t),dc}var fc,ph;function Od(){if(ph)return fc;ph=1;var e,t=my(),n=V1(),r=z1(),o=$1(),i=B1(),a=H1(),s=Qo(),l=W1(),c=q1(),u=U1(),d=G1(),p=Y1(),f=K1(),h=Z1(),y=Q1(),m=Function,v=function(W){try{return m('"use strict"; return ('+W+").constructor;")()}catch{}},g=gy(),b=eT(),S=function(){throw new s},T=g?function(){try{return arguments.callee,S}catch{try{return g(arguments,"callee").get}catch{return S}}}():S,w=nT()(),C=sT(),R=yy(),I=vy(),P=xy(),j=Id(),N={},V=typeof Uint8Array>"u"||!C?e:C(Uint8Array),k={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":w&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":N,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!w||!C?e:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":g,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!w||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&C?C(""[Symbol.iterator]()):e,"%Symbol%":w?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":T,"%TypedArray%":V,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":j,"%Function.prototype.apply%":P,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":R,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":h,"%Math.sign%":y,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch(W){var M=C(C(W));k["%Error.prototype%"]=M}var D=function W(Z){var oe;if(Z==="%AsyncFunction%")oe=v("async function () {}");else if(Z==="%GeneratorFunction%")oe=v("function* () {}");else if(Z==="%AsyncGeneratorFunction%")oe=v("async function* () {}");else if(Z==="%AsyncGenerator%"){var $=W("%AsyncGeneratorFunction%");$&&(oe=$.prototype)}else if(Z==="%AsyncIteratorPrototype%"){var ye=W("%AsyncGenerator%");ye&&C&&(oe=C(ye.prototype))}return k[Z]=oe,oe},L={__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"]},_=Ks(),z=lT(),O=_.call(j,Array.prototype.concat),B=_.call(P,Array.prototype.splice),Q=_.call(j,String.prototype.replace),re=_.call(j,String.prototype.slice),J=_.call(j,RegExp.prototype.exec),K=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,Y=function(Z){var oe=re(Z,0,1),$=re(Z,-1);if(oe==="%"&&$!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if($==="%"&&oe!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ye=[];return Q(Z,K,function(ke,Ae,Ie,G){ye[ye.length]=Ie?Q(G,U,"$1"):Ae||ke}),ye},F=function(Z,oe){var $=Z,ye;if(z(L,$)&&(ye=L[$],$="%"+ye[0]+"%"),z(k,$)){var ke=k[$];if(ke===N&&(ke=D($)),typeof ke>"u"&&!oe)throw new s("intrinsic "+Z+" exists, but is not available. Please file an issue!");return{alias:ye,name:$,value:ke}}throw new a("intrinsic "+Z+" does not exist!")};return fc=function(Z,oe){if(typeof Z!="string"||Z.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof oe!="boolean")throw new s('"allowMissing" argument must be a boolean');if(J(/^%?[^%]*%?$/,Z)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var $=Y(Z),ye=$.length>0?$[0]:"",ke=F("%"+ye+"%",oe),Ae=ke.name,Ie=ke.value,G=!1,ae=ke.alias;ae&&(ye=ae[0],B($,O([0,1],ae)));for(var ie=1,X=!0;ie<$.length;ie+=1){var ue=$[ie],ge=re(ue,0,1),be=re(ue,-1);if((ge==='"'||ge==="'"||ge==="`"||be==='"'||be==="'"||be==="`")&&ge!==be)throw new a("property names with quotes must have matching quotes");if((ue==="constructor"||!X)&&(G=!0),ye+="."+ue,Ae="%"+ye+"%",z(k,Ae))Ie=k[Ae];else if(Ie!=null){if(!(ue in Ie)){if(!oe)throw new s("base intrinsic for "+Z+" exists, but the property is not available.");return}if(g&&ie+1>=$.length){var te=g(Ie,ue);X=!!te,X&&"get"in te&&!("originalValue"in te.get)?Ie=te.get:Ie=Ie[ue]}else X=z(Ie,ue),Ie=Ie[ue];X&&!G&&(k[Ae]=Ie)}}return Ie},fc}var pc,hh;function wy(){if(hh)return pc;hh=1;var e=Od(),t=by(),n=t([e("%String.prototype.indexOf%")]);return pc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},pc}var hc,mh;function Ty(){if(mh)return hc;mh=1;var e=Od(),t=wy(),n=Ys(),r=Qo(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return hc=!!o&&function(){var d,p={assert:function(f){if(!p.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var h=l(d,f);return c(d)===0&&(d=void 0),h}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,h){d||(d=new o),a(d,f,h)}};return p},hc}var mc,gh;function cT(){if(gh)return mc;gh=1;var e=Od(),t=wy(),n=Ys(),r=Ty(),o=Qo(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return mc=i?function(){var d,p,f={assert:function(h){if(!f.has(h))throw new o("Side channel does not contain "+n(h))},delete:function(h){if(i&&h&&(typeof h=="object"||typeof h=="function")){if(d)return c(d,h)}else if(r&&p)return p.delete(h);return!1},get:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?a(d,h):p&&p.get(h)},has:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?l(d,h):!!p&&p.has(h)},set:function(h,y){i&&h&&(typeof h=="object"||typeof h=="function")?(d||(d=new i),s(d,h,y)):r&&(p||(p=r()),p.set(h,y))}};return f}:r,mc}var gc,vh;function uT(){if(vh)return gc;vh=1;var e=Qo(),t=Ys(),n=L1(),r=Ty(),o=cT(),i=o||r||n;return gc=function(){var s,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!s&&s.delete(c)},get:function(c){return s&&s.get(c)},has:function(c){return!!s&&s.has(c)},set:function(c,u){s||(s=i()),s.set(c,u)}};return l},gc}var yh=e=>Array.isArray(e),vc=e=>e===void 0,yc=e=>e===null,dT=Function.bind.call(Function.call,Object.prototype.toString),fT=e=>!!e&&dT(e)==="[object Error]"||e instanceof Error,Sy=(e,t)=>e instanceof t,pT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},hT=e=>Object.prototype.toString.call(e)==="[object Date]"&&Sy(e,Date),ht={array:yh,date:hT,empty:e=>yc(e)||vc(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:Sy,isError:fT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>yc(e)||vc(e),null:yc,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!yh(e)&&typeof e=="object",primitive:pT,string:e=>typeof e=="string",undefined:vc},mT=e=>Object.keys(e),kr=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,a)=>i&&i[a],e);return o===void 0?n:o};const _d="-",gT=e=>{const t=yT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(_d);return s[0]===""&&s.length!==1&&s.shift(),Ey(s,t)||vT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},Ey=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ey(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(_d);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},xh=/^\[(.+)\]$/,vT=e=>{if(xh.test(e)){const t=xh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},yT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Su(n[o],r,o,t);return r},Su=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:bh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(xT(o)){Su(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Su(a,bh(t,i),n,r)})})},bh=(e,t)=>{let n=e;return t.split(_d).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},xT=e=>e.isThemeGetter,bT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},Eu="!",Cu=":",wT=Cu.length,TT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let h=0;h<o.length;h++){let y=o[h];if(a===0&&s===0){if(y===Cu){i.push(o.slice(l,h)),l=h+wT;continue}if(y==="/"){c=h;continue}}y==="["?a++:y==="]"?a--:y==="("?s++:y===")"&&s--}const u=i.length===0?o:o.substring(l),d=ST(u),p=d!==u,f=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+Cu,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},ST=e=>e.endsWith(Eu)?e.substring(0,e.length-1):e.startsWith(Eu)?e.substring(1):e,ET=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let i=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...i.sort(),a),i=[]):i.push(a)}),o.push(...i.sort()),o}},CT=e=>({cache:bT(e.cacheSize),parseClassName:TT(e),sortModifiers:ET(e),...gT(e)}),kT=/\s+/,RT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(kT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:y}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let m=!!y,v=r(m?h.substring(0,y):h);if(!v){if(!m){l=u+(l.length>0?" "+l:l);continue}if(v=r(h),!v){l=u+(l.length>0?" "+l:l);continue}m=!1}const g=i(p).join(":"),b=f?g+Eu:g,S=b+v;if(a.includes(S))continue;a.push(S);const T=o(v,m);for(let w=0;w<T.length;++w){const C=T[w];a.push(b+C)}l=u+(l.length>0?" "+l:l)}return l};function PT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Cy(t))&&(r&&(r+=" "),r+=n);return r}const Cy=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Cy(e[r]))&&(n&&(n+=" "),n+=t);return n};function AT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=CT(c),r=n.cache.get,o=n.cache.set,i=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=RT(l,n);return o(l,u),u}return function(){return i(PT.apply(null,arguments))}}const At=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ky=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ry=/^\((?:(\w[\w-]*):)?(.+)\)$/i,IT=/^\d+\/\d+$/,OT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_T=/\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$/,MT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,DT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,lo=e=>IT.test(e),Fe=e=>!!e&&!Number.isNaN(Number(e)),Rr=e=>!!e&&Number.isInteger(Number(e)),wh=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),nr=e=>OT.test(e),NT=()=>!0,FT=e=>_T.test(e)&&!MT.test(e),Md=()=>!1,LT=e=>DT.test(e),VT=e=>jT.test(e),zT=e=>!he(e)&&!me(e),$T=e=>Jo(e,Iy,Md),he=e=>ky.test(e),Pr=e=>Jo(e,Oy,FT),xc=e=>Jo(e,QT,Fe),BT=e=>Jo(e,Py,Md),HT=e=>Jo(e,Ay,VT),WT=e=>Jo(e,Md,LT),me=e=>Ry.test(e),Pa=e=>ei(e,Oy),qT=e=>ei(e,JT),UT=e=>ei(e,Py),GT=e=>ei(e,Iy),YT=e=>ei(e,Ay),KT=e=>ei(e,eS,!0),Jo=(e,t,n)=>{const r=ky.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ei=(e,t,n=!1)=>{const r=Ry.exec(e);return r?r[1]?t(r[1]):n:!1},Py=e=>e==="position",ZT=new Set(["image","url"]),Ay=e=>ZT.has(e),XT=new Set(["length","size","percentage"]),Iy=e=>XT.has(e),Oy=e=>e==="length",QT=e=>e==="number",JT=e=>e==="family-name",eS=e=>e==="shadow",tS=()=>{const e=At("color"),t=At("font"),n=At("text"),r=At("font-weight"),o=At("tracking"),i=At("leading"),a=At("breakpoint"),s=At("container"),l=At("spacing"),c=At("radius"),u=At("shadow"),d=At("inset-shadow"),p=At("drop-shadow"),f=At("blur"),h=At("perspective"),y=At("aspect"),m=At("ease"),v=At("animate"),g=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],S=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],w=()=>[me,he,l],C=()=>[lo,"full","auto",...w()],R=()=>[Rr,"none","subgrid",me,he],I=()=>["auto",{span:["full",Rr,me,he]},me,he],P=()=>[Rr,"auto",me,he],j=()=>["auto","min","max","fr",me,he],N=()=>["start","end","center","between","around","evenly","stretch","baseline"],V=()=>["start","end","center","stretch"],k=()=>["auto",...w()],M=()=>[lo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],D=()=>[e,me,he],L=()=>[wh,Pr],_=()=>["","none","full",c,me,he],z=()=>["",Fe,Pa,Pr],O=()=>["solid","dashed","dotted","double"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["","none",f,me,he],re=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",me,he],J=()=>["none",Fe,me,he],K=()=>["none",Fe,me,he],U=()=>[Fe,me,he],Y=()=>[lo,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[nr],breakpoint:[nr],color:[NT],container:[nr],"drop-shadow":[nr],ease:["in","out","in-out"],font:[zT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[nr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[nr],shadow:[nr],spacing:["px",Fe],text:[nr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",lo,he,me,y]}],container:["container"],columns:[{columns:[Fe,he,me,s]}],"break-after":[{"break-after":g()}],"break-before":[{"break-before":g()}],"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"],sr:["sr-only","not-sr-only"],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:[...b(),he,me]}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[Rr,"auto",me,he]}],basis:[{basis:[lo,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,lo,"auto","initial","none",he]}],grow:[{grow:["",Fe,me,he]}],shrink:[{shrink:["",Fe,me,he]}],order:[{order:[Rr,"first","last","none",me,he]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...V(),"baseline"]}],"align-self":[{self:["auto",...V(),"baseline"]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],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:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[s,"screen",...M()]}],"min-w":[{"min-w":[s,"screen","none",...M()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...M()]}],h:[{h:["screen",...M()]}],"min-h":[{"min-h":["screen","none",...M()]}],"max-h":[{"max-h":["screen",...M()]}],"font-size":[{text:["base",n,Pa,Pr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,me,xc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",wh,he]}],"font-family":[{font:[qT,he,t]}],"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-fractions"],tracking:[{tracking:[o,me,he]}],"line-clamp":[{"line-clamp":[Fe,"none",me,xc]}],leading:[{leading:[i,...w()]}],"list-image":[{"list-image":["none",me,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",me,Pr]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Fe,"auto",me,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,he]}],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",me,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...b(),UT,BT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",GT,$T]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Rr,me,he],radial:["",me,he],conic:[Rr,me,he]},YT,HT]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:_()}],"rounded-s":[{"rounded-s":_()}],"rounded-e":[{"rounded-e":_()}],"rounded-t":[{"rounded-t":_()}],"rounded-r":[{"rounded-r":_()}],"rounded-b":[{"rounded-b":_()}],"rounded-l":[{"rounded-l":_()}],"rounded-ss":[{"rounded-ss":_()}],"rounded-se":[{"rounded-se":_()}],"rounded-ee":[{"rounded-ee":_()}],"rounded-es":[{"rounded-es":_()}],"rounded-tl":[{"rounded-tl":_()}],"rounded-tr":[{"rounded-tr":_()}],"rounded-br":[{"rounded-br":_()}],"rounded-bl":[{"rounded-bl":_()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...O(),"hidden","none"]}],"divide-style":[{divide:[...O(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...O(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,me,he]}],"outline-w":[{outline:["",Fe,Pa,Pr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,KT,WT]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",me,he,d]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Fe,Pr]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":D()}],opacity:[{opacity:[Fe,me,he]}],"mix-blend":[{"mix-blend":[...B(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none",me,he]}],blur:[{blur:Q()}],brightness:[{brightness:[Fe,me,he]}],contrast:[{contrast:[Fe,me,he]}],"drop-shadow":[{"drop-shadow":["","none",p,me,he]}],grayscale:[{grayscale:["",Fe,me,he]}],"hue-rotate":[{"hue-rotate":[Fe,me,he]}],invert:[{invert:["",Fe,me,he]}],saturate:[{saturate:[Fe,me,he]}],sepia:[{sepia:["",Fe,me,he]}],"backdrop-filter":[{"backdrop-filter":["","none",me,he]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,me,he]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,me,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,me,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,me,he]}],"backdrop-invert":[{"backdrop-invert":["",Fe,me,he]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,me,he]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,me,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,me,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",me,he]}],ease:[{ease:["linear","initial",m,me,he]}],delay:[{delay:[Fe,me,he]}],animate:[{animate:["none",v,me,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,me,he]}],"perspective-origin":[{"perspective-origin":re()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:K()}],"scale-x":[{"scale-x":K()}],"scale-y":[{"scale-y":K()}],"scale-z":[{"scale-z":K()}],"scale-3d":["scale-3d"],skew:[{skew:U()}],"skew-x":[{"skew-x":U()}],"skew-y":[{"skew-y":U()}],transform:[{transform:[me,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:re()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Y()}],"translate-x":[{"translate-x":Y()}],"translate-y":[{"translate-y":Y()}],"translate-z":[{"translate-z":Y()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",me,he]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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",me,he]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[Fe,Pa,Pr,xc]}],stroke:[{stroke:["none",...D()]}],"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-s","border-color-e","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},nS=AT(tS),Dd=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},rS=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),oS=e=>ht.function(e),ze=(...e)=>nS(py(e)),_y=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},ua=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},My=e=>e.scrollHeight>e.clientHeight,iS="span",cn=E.forwardRef(function(t,n){const r=t.as||iS;return x.jsx(r,{ref:n,...t,as:void 0})}),aS=Xo("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-primary text-primary-foreground",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Ao=E.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:a,rounded:s,...l},c){const u=r||l.disabled;return x.jsxs(cn,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:ze(aS({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),zi=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function sS(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const lS=({children:e,...t})=>{const n=zi(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:sS(r.current));return E.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),i(d=>c.isIntersecting?!0:d)});return s.observe(a),()=>s.disconnect()},[]),x.jsx("div",{...t,ref:r,children:o?e:null})},cS=Xo("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",primary:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),uS=Xo("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),jd=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return x.jsxs(cn,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:ze(uS({size:a,theme:i}),t),children:[n?x.jsx("span",{"aria-hidden":"true",className:cS({theme:n})}):null,r,s.children]})}),$i=E.createContext({});function bn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Nd=typeof window<"u",Zs=Nd?E.useLayoutEffect:E.useEffect,Xs=E.createContext(null),Io=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class dS extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function fS({children:e,isPresent:t,anchorX:n}){const r=E.useId(),o=E.useRef(null),i=E.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=E.useContext(Io);return E.useInsertionEffect(()=>{const{width:s,height:l,top:c,left:u,right:d}=i.current;if(t||!o.current||!s||!l)return;const p=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const f=document.createElement("style");return a&&(f.nonce=a),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
|
|
5
5
|
[data-motion-pop-id="${r}"] {
|
|
6
6
|
position: absolute !important;
|
|
7
|
-
width: ${
|
|
7
|
+
width: ${s}px !important;
|
|
8
8
|
height: ${l}px !important;
|
|
9
|
-
${
|
|
9
|
+
${p}px !important;
|
|
10
10
|
top: ${c}px !important;
|
|
11
11
|
}
|
|
12
|
-
`),()=>{document.head.removeChild(h)}},[t]),w.jsx(DT,{isPresent:t,childRef:o,sizeRef:s,children:R.cloneElement(e,{ref:o})})}const jT=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i,anchorX:a})=>{const l=hn(LT),c=x.useId(),u=x.useCallback(f=>{l.set(f,!0);for(const h of l.values())if(!h)return;r&&r()},[l,r]),d=x.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:f=>(l.set(f,!1),()=>l.delete(f))}),s?[Math.random(),u]:[n,u]);return x.useMemo(()=>{l.forEach((f,h)=>l.set(h,!1))},[n]),R.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),i==="popLayout"&&(e=w.jsx(NT,{isPresent:n,anchorX:a,children:e})),w.jsx(ml.Provider,{value:d,children:e})};function LT(){return new Map}function Uy(e=!0){const t=x.useContext(ml);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=x.useId();x.useEffect(()=>{if(e)return o(s)},[e]);const i=x.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const Wi=e=>e.key||"";function $h(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const Ed=typeof window<"u",pl=Ed?x.useLayoutEffect:x.useEffect,fr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:i=!1,anchorX:a="left"})=>{const[l,c]=Uy(i),u=x.useMemo(()=>$h(e),[e]),d=i&&!l?[]:u.map(Wi),f=x.useRef(!0),h=x.useRef(u),p=hn(()=>new Map),[m,v]=x.useState(u),[b,y]=x.useState(u);pl(()=>{f.current=!1,h.current=u;for(let S=0;S<b.length;S++){const E=Wi(b[S]);d.includes(E)?p.delete(E):p.get(E)!==!0&&p.set(E,!1)}},[b,d.length,d.join("-")]);const g=[];if(u!==m){let S=[...u];for(let E=0;E<b.length;E++){const C=b[E],k=Wi(C);d.includes(k)||(S.splice(E,0,C),g.push(C))}return s==="wait"&&g.length&&(S=g),y($h(S)),v(u),null}process.env.NODE_ENV!=="production"&&s==="wait"&&b.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.`);const{forceRender:T}=x.useContext(qs);return w.jsx(w.Fragment,{children:b.map(S=>{const E=Wi(S),C=i&&!l?!1:u===b||d.includes(E),k=()=>{if(p.has(E))p.set(E,!0);else return;let I=!0;p.forEach(A=>{A||(I=!1)}),I&&(T==null||T(),y(h.current),i&&(c==null||c()),r&&r())};return w.jsx(jT,{isPresent:C,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,onExitComplete:C?void 0:k,anchorX:a,children:S},E)})})},FT=x.createContext(null);function VT(){const e=x.useRef(!1);return pl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}const Ht=e=>e;let is=Ht,on=Ht;process.env.NODE_ENV!=="production"&&(is=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},on=(e,t)=>{if(!e)throw new Error(t)});const $T={skipAnimations:!1,useManualTiming:!1},zi=["read","resolveKeyframes","update","preRender","render","postRender"],Bh={value:null,addProjectionMetrics:null};function BT(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,h=!1)=>{const m=h&&o?n:r;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),t&&Bh.value&&Bh.value.frameloop[t].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const WT=40;function Gy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=zi.reduce((b,y)=>(b[y]=BT(s,t?y:void 0),b),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const b=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,WT),1),o.timestamp=b,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:zi.reduce((b,y)=>{const g=i[y];return b[y]=(T,S=!1,E=!1)=>(n||p(),g.schedule(T,S,E)),b},{}),cancel:b=>{for(let y=0;y<zi.length;y++)i[zi[y]].cancel(b)},state:o,steps:i}}const{schedule:Ue,cancel:Bn,state:Pt,steps:Ql}=Gy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ht,!0);function zT(){const e=VT(),[t,n]=x.useState(0),r=x.useCallback(()=>{e.current&&n(t+1)},[t]);return[x.useCallback(()=>Ue.postRender(r),[r]),t]}const HT=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Wh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(HT);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 Yy=e=>e===!0,UT=e=>Yy(e===!0)||e==="id",GT=({children:e,id:t,inherit:n=!0})=>{const r=x.useContext(qs),o=x.useContext(FT),[s,i]=zT(),a=x.useRef(null),l=r.id||o;a.current===null&&(UT(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:Yy(n)&&r.group||Wh()});const c=x.useMemo(()=>({...a.current,forceRender:s}),[i]);return w.jsx(qs.Provider,{value:c,children:e})},qy=x.createContext({strict:!1}),zh={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"]},Fo={};for(const e in zh)Fo[e]={isEnabled:t=>zh[e].some(n=>!!t[n])};function YT(e){for(const t in e)Fo[t]={...Fo[t],...e[t]}}const qT=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 Ea(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||qT.has(e)}let Ky=e=>!Ea(e);function Zy(e){e&&(Ky=t=>t.startsWith("on")?!Ea(t):e(t))}try{Zy(require("@emotion/is-prop-valid").default)}catch{}function KT(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Ky(o)||n===!0&&Ea(o)||!t&&!Ea(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function ZT({children:e,isValidProp:t,...n}){t&&Zy(t),n={...x.useContext(Lo),...n},n.isStatic=hn(()=>n.isStatic);const r=x.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return w.jsx(Lo.Provider,{value:r,children:e})}const Hh=new Set;function gl(e,t,n){e||Hh.has(t)||(console.warn(t),Hh.add(t))}function XT(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&gl(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const yl=x.createContext({});function vl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ks(e){return typeof e=="string"||Array.isArray(e)}const Cd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Rd=["initial",...Cd];function bl(e){return vl(e.animate)||Rd.some(t=>Ks(e[t]))}function Xy(e){return!!(bl(e)||e.variants)}function QT(e,t){if(bl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ks(n)?n:void 0,animate:Ks(r)?r:void 0}}return e.inherit!==!1?t:{}}function JT(e){const{initial:t,animate:n}=QT(e,x.useContext(yl));return x.useMemo(()=>({initial:t,animate:n}),[Uh(t),Uh(n)])}function Uh(e){return Array.isArray(e)?e.join(" "):e}const eE=Symbol.for("motionComponentSymbol");function yo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function tE(e,t,n){return x.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):yo(n)&&(n.current=r))},[t])}const Pd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),nE="framerAppearId",Qy="data-"+Pd(nE),{schedule:kd,cancel:x$}=Gy(queueMicrotask,!1),Jy=x.createContext({});function rE(e,t,n,r,o){var s,i;const{visualElement:a}=x.useContext(yl),l=x.useContext(qy),c=x.useContext(ml),u=x.useContext(Lo).reducedMotion,d=x.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,h=x.useContext(Jy);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&oE(d.current,n,o,h);const p=x.useRef(!1);x.useInsertionEffect(()=>{f&&p.current&&f.update(n,c)});const m=n[Qy],v=x.useRef(!!m&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,m))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,m)));return pl(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),kd.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),x.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),v.current=!1))}),f}function oE(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:ev(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&yo(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function ev(e){if(e)return e.options.allowProjection!==!1?e.projection:ev(e.parent)}function sE({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var s,i;e&&YT(e);function a(c,u){let d;const f={...x.useContext(Lo),...c,layoutId:iE(c)},{isStatic:h}=f,p=JT(c),m=r(c,h);if(!h&&Ed){aE(f,e);const v=lE(f);d=v.MeasureLayout,p.visualElement=rE(o,m,f,t,v.ProjectionNode)}return w.jsxs(yl.Provider,{value:p,children:[d&&p.visualElement?w.jsx(d,{visualElement:p.visualElement,...f}):null,n(o,c,tE(m,p.visualElement,u),m,h,p.visualElement)]})}a.displayName=`motion.${typeof o=="string"?o:`create(${(i=(s=o.displayName)!==null&&s!==void 0?s:o.name)!==null&&i!==void 0?i:""})`}`;const l=x.forwardRef(a);return l[eE]=o,l}function iE({layoutId:e}){const t=x.useContext(qs).id;return t&&e!==void 0?t+"-"+e:e}function aE(e,t){const n=x.useContext(qy).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?is(!1,r):on(!1,r)}}function lE(e){const{drag:t,layout:n}=Fo;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}}const tv=e=>t=>typeof t=="string"&&t.startsWith(e),Id=tv("--"),cE=tv("var(--"),Ad=e=>cE(e)?uE.test(e.split("/*")[0].trim()):!1,uE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Zs={};function dE(e){for(const t in e)Zs[t]=e[t],Id(t)&&(Zs[t].isCSSVariable=!0)}const as=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qr=new Set(as);function nv(e,{layout:t,layoutId:n}){return qr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Zs[e]||e==="opacity")}const wt=e=>!!(e&&e.getVelocity),rv=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Wn=(e,t,n)=>n>t?t:n<e?e:n,ls={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Xs={...ls,transform:e=>Wn(0,1,e)},Hi={...ls,default:1},wi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Xn=wi("deg"),Pn=wi("%"),me=wi("px"),fE=wi("vh"),hE=wi("vw"),Gh={...Pn,parse:e=>Pn.parse(e)/100,transform:e=>Pn.transform(e*100)},mE={borderWidth:me,borderTopWidth:me,borderRightWidth:me,borderBottomWidth:me,borderLeftWidth:me,borderRadius:me,radius:me,borderTopLeftRadius:me,borderTopRightRadius:me,borderBottomRightRadius:me,borderBottomLeftRadius:me,width:me,maxWidth:me,height:me,maxHeight:me,top:me,right:me,bottom:me,left:me,padding:me,paddingTop:me,paddingRight:me,paddingBottom:me,paddingLeft:me,margin:me,marginTop:me,marginRight:me,marginBottom:me,marginLeft:me,backgroundPositionX:me,backgroundPositionY:me},pE={rotate:Xn,rotateX:Xn,rotateY:Xn,rotateZ:Xn,scale:Hi,scaleX:Hi,scaleY:Hi,scaleZ:Hi,skew:Xn,skewX:Xn,skewY:Xn,distance:me,translateX:me,translateY:me,translateZ:me,x:me,y:me,z:me,perspective:me,transformPerspective:me,opacity:Xs,originX:Gh,originY:Gh,originZ:me},Yh={...ls,transform:Math.round},Od={...mE,...pE,zIndex:Yh,size:me,fillOpacity:Xs,strokeOpacity:Xs,numOctaves:Yh},gE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},yE=as.length;function vE(e,t,n){let r="",o=!0;for(let s=0;s<yE;s++){const i=as[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=rv(a,Od[i]);if(!l){o=!1;const u=gE[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function _d(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(qr.has(l)){i=!0;continue}else if(Id(l)){o[l]=c;continue}else{const u=rv(c,Od[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=vE(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}const Md=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ov(e,t,n){for(const r in t)!wt(t[r])&&!nv(r,n)&&(e[r]=t[r])}function bE({transformTemplate:e},t){return x.useMemo(()=>{const n=Md();return _d(n,t,e),Object.assign({},n.vars,n.style)},[t])}function xE(e,t){const n=e.style||{},r={};return ov(r,n,e),Object.assign(r,bE(e,t)),r}function wE(e,t){const n={},r=xE(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 SE=["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 Dd(e){return typeof e!="string"||e.includes("-")?!1:!!(SE.indexOf(e)>-1||/[A-Z]/u.test(e))}const TE={offset:"stroke-dashoffset",array:"stroke-dasharray"},EE={offset:"strokeDashoffset",array:"strokeDasharray"};function CE(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?TE:EE;e[s.offset]=me.transform(-r);const i=me.transform(t),a=me.transform(n);e[s.array]=`${i} ${a}`}function qh(e,t,n){return typeof e=="string"?e:me.transform(t+n*e)}function RE(e,t,n){const r=qh(t,e.x,e.width),o=qh(n,e.y,e.height);return`${r} ${o}`}function Nd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(_d(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=RE(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&&CE(f,i,a,l,!1)}const sv=()=>({...Md(),attrs:{}}),jd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function PE(e,t,n,r){const o=x.useMemo(()=>{const s=sv();return Nd(s,t,jd(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};ov(s,e.style,e),o.style={...s,...o.style}}return o}function kE(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Dd(n)?PE:wE)(r,s,i,n),c=KT(r,typeof n=="string",e),u=n!==x.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=x.useMemo(()=>wt(d)?d.get():d,[d]);return x.createElement(n,{...u,children:f})}}function Kh(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ld(e,t,n,r){if(typeof t=="function"){const[o,s]=Kh(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]=Kh(r);t=t(n!==void 0?n:e.custom,o,s)}return t}const lu=e=>Array.isArray(e),IE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),AE=e=>lu(e)?e[e.length-1]||0:e;function aa(e){const t=wt(e)?e.get():e;return IE(t)?t.toValue():t}function OE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){const i={latestValues:_E(r,o,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const iv=e=>(t,n)=>{const r=x.useContext(yl),o=x.useContext(ml),s=()=>OE(e,t,r,o);return n?s():hn(s)};function _E(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=aa(s[f]);let{initial:i,animate:a}=e;const l=bl(e),c=Xy(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!vl(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=Ld(e,f[h]);if(p){const{transitionEnd:m,transition:v,...b}=p;for(const y in b){let g=b[y];if(Array.isArray(g)){const T=u?g.length-1:0;g=g[T]}g!==null&&(o[y]=g)}for(const y in m)o[y]=m[y]}}}return o}function Fd(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(wt(o[i])||t.style&&wt(t.style[i])||nv(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 s}const ME={useVisualState:iv({scrapeMotionValuesFromProps:Fd,createRenderState:Md})};function av(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function lv(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 cv=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 uv(e,t,n,r){lv(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(cv.has(o)?o:Pd(o),t.attrs[o])}function dv(e,t,n){const r=Fd(e,t,n);for(const o in e)if(wt(e[o])||wt(t[o])){const s=as.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const Zh=["x","y","width","height","cx","cy","r"],DE={useVisualState:iv({scrapeMotionValuesFromProps:dv,createRenderState:sv,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in o)if(qr.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<Zh.length;a++){const l=Zh[a];e[l]!==t[l]&&(i=!0)}i&&Ue.read(()=>{av(n,r),Ue.render(()=>{Nd(r,o,jd(n.tagName),e.transformTemplate),uv(n,r)})})}})};function NE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...Dd(r)?DE:ME,preloadedFeatures:e,useRender:kE(o),createVisualElement:t,Component:r};return sE(i)}}function Qs(e,t,n){const r=e.getProps();return Ld(r,t,n!==void 0?n:r.custom,e)}function Vd(e,t){return e?e[t]||e.default||e:void 0}const fv=new Set(["width","height","top","left","right","bottom",...as]);let la;function jE(){la=void 0}const kn={now:()=>(la===void 0&&kn.set(Pt.isProcessing||$T.useManualTiming?Pt.timestamp:performance.now()),la),set:e=>{la=e,queueMicrotask(jE)}};function $d(e,t){e.indexOf(t)===-1&&e.push(t)}function xl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function LE([...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}class Bd{constructor(){this.subscriptions=[]}add(t){return $d(this.subscriptions,t),()=>xl(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}}function hv(e,t){return t?e*(1e3/t):0}const Xh=30,FE=e=>!isNaN(parseFloat(e)),Ns={current:void 0};class VE{constructor(t,n={}){this.version="12.4.7",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=kn.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=kn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=FE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&gl(!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 Bd);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ue.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 Ns.current&&Ns.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=kn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Xh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Xh);return hv(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 Vo(e,t){return new VE(e,t)}function $E(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Vo(n))}function BE(e,t){const n=Qs(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=AE(s[i]);$E(e,i,a)}}function WE(e){return!!(wt(e)&&e.add)}function cu(e,t){const n=e.getValue("willChange");if(WE(n))return n.add(t)}function mv(e){return e.props[Qy]}function Wd(e){let t;return()=>(t===void 0&&(t=e()),t)}const zE=Wd(()=>window.ScrollTimeline!==void 0);class HE{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}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,n){const r=this.animations.map(o=>{if(zE()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,s)=>{o&&o(),this.animations[s].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 startTime(){return this.getAll("startTime")}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]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class pv extends HE{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const un=e=>e*1e3,In=e=>e/1e3;function wl(e){return typeof e=="function"}function Qh(e,t){e.timeline=t,e.onfinish=null}const zd=e=>Array.isArray(e)&&typeof e[0]=="number",UE={linearEasing:void 0};function GE(e,t){const n=Wd(e);return()=>{var r;return(r=UE[t])!==null&&r!==void 0?r:n()}}const Ca=GE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},gv=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=e(Vr(0,o-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function yv(e){return!!(typeof e=="function"&&Ca()||!e||typeof e=="string"&&(e in uu||Ca())||zd(e)||Array.isArray(e)&&e.every(yv))}const Ps=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,uu={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 vv(e,t){if(e)return typeof e=="function"&&Ca()?gv(e,t):zd(e)?Ps(e):Array.isArray(e)?e.map(n=>vv(n,t)||uu.easeOut):uu[e]}const bv=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,YE=1e-7,qE=12;function KE(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=bv(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>YE&&++a<qE);return i}function Si(e,t,n,r){if(e===t&&n===r)return Ht;const o=s=>KE(s,0,1,e,n);return s=>s===0||s===1?s:bv(o(s),t,r)}const xv=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,wv=e=>t=>1-e(1-t),Sv=Si(.33,1.53,.69,.99),Hd=wv(Sv),Tv=xv(Hd),Ev=e=>(e*=2)<1?.5*Hd(e):.5*(2-Math.pow(2,-10*(e-1))),Ud=e=>1-Math.sin(Math.acos(e)),Cv=wv(Ud),Rv=xv(Ud),Pv=e=>/^0[^.\s]+$/u.test(e);function ZE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Pv(e):!0}const js=e=>Math.round(e*1e5)/1e5,Gd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function XE(e){return e==null}const QE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Yd=(e,t)=>n=>!!(typeof n=="string"&&QE.test(n)&&n.startsWith(e)||t&&!XE(n)&&Object.prototype.hasOwnProperty.call(n,t)),kv=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(Gd);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},JE=e=>Wn(0,255,e),Jl={...ls,transform:e=>Math.round(JE(e))},_r={test:Yd("rgb","red"),parse:kv("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Jl.transform(e)+", "+Jl.transform(t)+", "+Jl.transform(n)+", "+js(Xs.transform(r))+")"};function eC(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 du={test:Yd("#"),parse:eC,transform:_r.transform},vo={test:Yd("hsl","hue"),parse:kv("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pn.transform(js(t))+", "+Pn.transform(js(n))+", "+js(Xs.transform(r))+")"},Ot={test:e=>_r.test(e)||du.test(e)||vo.test(e),parse:e=>_r.test(e)?_r.parse(e):vo.test(e)?vo.parse(e):du.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?_r.transform(e):vo.transform(e)},tC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function nC(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Gd))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(tC))===null||n===void 0?void 0:n.length)||0)>0}const Iv="number",Av="color",rC="var",oC="var(",Jh="${}",sC=/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 Js(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(sC,l=>(Ot.test(l)?(r.color.push(s),o.push(Av),n.push(Ot.parse(l))):l.startsWith(oC)?(r.var.push(s),o.push(rC),n.push(l)):(r.number.push(s),o.push(Iv),n.push(parseFloat(l))),++s,Jh)).split(Jh);return{values:n,split:a,indexes:r,types:o}}function Ov(e){return Js(e).values}function _v(e){const{split:t,types:n}=Js(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===Iv?s+=js(o[i]):a===Av?s+=Ot.transform(o[i]):s+=o[i]}return s}}const iC=e=>typeof e=="number"?0:e;function aC(e){const t=Ov(e);return _v(e)(t.map(iC))}const sr={test:nC,parse:Ov,createTransformer:_v,getAnimatableNone:aC},lC=new Set(["brightness","contrast","saturate","opacity"]);function cC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Gd)||[];if(!r)return e;const o=n.replace(r,"");let s=lC.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const uC=/\b([a-z-]*)\(.*?\)/gu,fu={...sr,getAnimatableNone:e=>{const t=e.match(uC);return t?t.map(cC).join(" "):e}},dC={...Od,color:Ot,backgroundColor:Ot,outlineColor:Ot,fill:Ot,stroke:Ot,borderColor:Ot,borderTopColor:Ot,borderRightColor:Ot,borderBottomColor:Ot,borderLeftColor:Ot,filter:fu,WebkitFilter:fu},qd=e=>dC[e];function Mv(e,t){let n=qd(e);return n!==fu&&(n=sr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const fC=new Set(["auto","none","0"]);function hC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!fC.has(s)&&Js(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Mv(n,o)}const em=e=>e===ls||e===me,tm=(e,t)=>parseFloat(e.split(", ")[t]),nm=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return tm(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?tm(s[1],e):0}},mC=new Set(["x","y","z"]),pC=as.filter(e=>!mC.has(e));function gC(e){const t=[];return pC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const $o={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:nm(4,13),y:nm(5,14)};$o.translateX=$o.x;$o.translateY=$o.y;const Lr=new Set;let hu=!1,mu=!1;function Dv(){if(mu){const e=Array.from(Lr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=gC(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)})}mu=!1,hu=!1,Lr.forEach(e=>e.complete()),Lr.clear()}function Nv(){Lr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(mu=!0)})}function yC(){Nv(),Dv()}class Kd{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?(Lr.add(this),hu||(hu=!0,Ue.read(Nv),Ue.resolveKeyframes(Dv))):(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),Lr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Lr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const jv=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),vC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bC(e){const t=vC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const xC=4;function Lv(e,t,n=1){on(n<=xC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=bC(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return jv(i)?parseFloat(i):i}return Ad(o)?Lv(o,t,n+1):o}const Fv=e=>t=>t.test(e),wC={test:e=>e==="auto",parse:e=>e},Vv=[ls,me,Pn,Xn,hE,fE,wC],rm=e=>Vv.find(Fv(e));class $v extends Kd{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Ad(c))){const u=Lv(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!fv.has(r)||t.length!==2)return;const[o,s]=t,i=rm(o),a=rm(s);if(i!==a)if(em(i)&&em(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++)ZE(t[o])&&r.push(o);r.length&&hC(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=$o[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||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=$o[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()}}const om=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(sr.test(e)||e==="0")&&!e.startsWith("url("));function SC(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 TC(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=om(o,t),a=om(s,t);return is(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:SC(e)||(n==="spring"||wl(n))&&r}const EC=e=>e!==null;function Sl(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(EC),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const CC=40;class Bv{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.createdAt=kn.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>CC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&yC(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=kn.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!TC(t,r,o,s))if(i)this.options.duration=0;else{l&&l(Sl(t,this.options,n)),a&&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)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Ra=2e4;function Zd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ra;)t+=n,r=e.next(t);return t>=Ra?1/0:t}const Qe=(e,t,n)=>e+(t-e)*n;function ec(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 RC({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=ec(l,a,e+1/3),s=ec(l,a,e),i=ec(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function Pa(e,t){return n=>n>0?t:e}const tc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},PC=[du,_r,vo],kC=e=>PC.find(t=>t.test(e));function sm(e){const t=kC(e);if(is(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===vo&&(n=RC(n)),n}const im=(e,t)=>{const n=sm(e),r=sm(t);if(!n||!r)return Pa(e,t);const o={...n};return s=>(o.red=tc(n.red,r.red,s),o.green=tc(n.green,r.green,s),o.blue=tc(n.blue,r.blue,s),o.alpha=Qe(n.alpha,r.alpha,s),_r.transform(o))},IC=(e,t)=>n=>t(e(n)),Ti=(...e)=>e.reduce(IC),pu=new Set(["none","hidden"]);function AC(e,t){return pu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function OC(e,t){return n=>Qe(e,t,n)}function Xd(e){return typeof e=="number"?OC:typeof e=="string"?Ad(e)?Pa:Ot.test(e)?im:DC:Array.isArray(e)?Wv:typeof e=="object"?Ot.test(e)?im:_C:Pa}function Wv(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Xd(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function _C(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Xd(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function MC(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 DC=(e,t)=>{const n=sr.createTransformer(t),r=Js(e),o=Js(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?pu.has(e)&&!o.values.length||pu.has(t)&&!r.values.length?AC(e,t):Ti(Wv(MC(r,o),o.values),n):(is(!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.`),Pa(e,t))};function zv(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Qe(e,t,n):Xd(e)(e,t)}const NC=5;function Hv(e,t,n){const r=Math.max(t-NC,0);return hv(n-e(r),t-r)}const rt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},nc=.001;function jC({duration:e=rt.duration,bounce:t=rt.bounce,velocity:n=rt.velocity,mass:r=rt.mass}){let o,s;is(e<=un(rt.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Wn(rt.minDamping,rt.maxDamping,i),e=Wn(rt.minDuration,rt.maxDuration,In(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=gu(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=gu(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=FC(o,s,a);if(e=un(e),isNaN(l))return{stiffness:rt.stiffness,damping:rt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const LC=12;function FC(e,t,n){let r=n;for(let o=1;o<LC;o++)r=r-e(r)/t(r);return r}function gu(e,t){return e*Math.sqrt(1-t*t)}const VC=["duration","bounce"],$C=["stiffness","damping","mass"];function am(e,t){return t.some(n=>e[n]!==void 0)}function BC(e){let t={velocity:rt.velocity,stiffness:rt.stiffness,damping:rt.damping,mass:rt.mass,isResolvedFromDuration:!1,...e};if(!am(e,$C)&&am(e,VC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Wn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:rt.mass,stiffness:o,damping:s}}else{const n=jC(e);t={...t,...n,mass:rt.mass},t.isResolvedFromDuration=!0}return t}function Qd(e=rt.visualDuration,t=rt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=BC({...n,velocity:-In(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(l*u)),v=i-s,b=In(Math.sqrt(l/u)),y=Math.abs(v)<5;r||(r=y?rt.restSpeed.granular:rt.restSpeed.default),o||(o=y?rt.restDelta.granular:rt.restDelta.default);let g;if(m<1){const S=gu(b,m);g=E=>{const C=Math.exp(-m*b*E);return i-C*((p+m*b*v)/S*Math.sin(S*E)+v*Math.cos(S*E))}}else if(m===1)g=S=>i-Math.exp(-b*S)*(v+(p+b*v)*S);else{const S=b*Math.sqrt(m*m-1);g=E=>{const C=Math.exp(-m*b*E),k=Math.min(S*E,300);return i-C*((p+m*b*v)*Math.sinh(k)+S*v*Math.cosh(k))/S}}const T={calculatedDuration:h&&d||null,next:S=>{const E=g(S);if(h)a.done=S>=d;else{let C=0;m<1&&(C=S===0?un(p):Hv(g,S,E));const k=Math.abs(C)<=r,I=Math.abs(i-E)<=o;a.done=k&&I}return a.value=a.done?i:E,a},toString:()=>{const S=Math.min(Zd(T),Ra),E=gv(C=>T.next(S*C).value,S,30);return S+"ms "+E}};return T}function lm({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 v=d+m,b=i===void 0?v:i(v);b!==v&&(m=b-d);const y=k=>-m*Math.exp(-k/r),g=k=>b+y(k),T=k=>{const I=y(k),A=g(k);f.done=Math.abs(I)<=c,f.value=f.done?b:A};let S,E;const C=k=>{h(f.value)&&(S=k,E=Qd({keyframes:[f.value,p(f.value)],velocity:Hv(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 WC=Si(.42,0,1,1),zC=Si(0,0,.58,1),Uv=Si(.42,0,.58,1),Gv=e=>Array.isArray(e)&&typeof e[0]!="number",cm={linear:Ht,easeIn:WC,easeInOut:Uv,easeOut:zC,circIn:Ud,circInOut:Rv,circOut:Cv,backIn:Hd,backInOut:Tv,backOut:Sv,anticipate:Ev},yu=e=>{if(zd(e)){on(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Si(t,n,r,o)}else if(typeof e=="string")return on(cm[e]!==void 0,`Invalid easing type '${e}'`),cm[e];return e};function HC(e,t,n){const r=[],o=n||zv,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]||Ht:t;a=Ti(l,a)}r.push(a)}return r}function Yv(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(on(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=HC(t,r,o),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Vr(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Wn(e[0],e[s-1],u)):c}function qv(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Vr(0,t,r);e.push(Qe(n,1,o))}}function Kv(e){const t=[0];return qv(t,e.length-1),t}function UC(e,t){return e.map(n=>n*t)}function GC(e,t){return e.map(()=>t||Uv).splice(0,e.length-1)}function Ls({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Gv(r)?r.map(yu):yu(r),s={done:!1,value:t[0]},i=UC(n&&n.length===t.length?n:Kv(t),e),a=Yv(i,t,{ease:Array.isArray(o)?o:GC(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const YC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ue.update(t,!0),stop:()=>Bn(t),now:()=>Pt.isProcessing?Pt.timestamp:kn.now()}},qC={decay:lm,inertia:lm,tween:Ls,keyframes:Ls,spring:Qd},KC=e=>e/100;class Jd extends Bv{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:s}=this.options,i=(o==null?void 0:o.KeyframeResolver)||Kd,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(s,a,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=wl(n)?n:qC[n]||Ls;let l,c;process.env.NODE_ENV!=="production"&&a!==Ls&&on(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==Ls&&typeof t[0]!="number"&&(l=Ti(KC,zv(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=Zd(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:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const b=this.currentTime-f*(this.speed>=0?1:-1),y=this.speed>=0?b<0:b>u;this.currentTime=Math.max(b,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),A=k%1;!A&&k>=1&&(A=1),A===1&&I--,I=Math.min(I,h+1),!!(I%2)&&(p==="reverse"?(A=1-A,m&&(A-=m/d)):p==="mirror"&&(T=i)),g=Wn(0,1,A)*d}const S=y?{done:!1,value:l[0]}:T.next(g);a&&(S.value=a(S.value));let{done:E}=S;!y&&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=Sl(l,this.options,o)),v&&v(S.value),C&&this.finish(),S}get duration(){const{resolved:t}=this;return t?In(t.calculatedDuration):0}get time(){return In(this.currentTime)}set time(t){t=un(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=In(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=YC,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),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 ZC=new Set(["opacity","clipPath","filter","transform"]);function XC(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=vv(a,o);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 QC=Wd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ka=10,JC=2e4;function eR(e){return wl(e.type)||e.type==="spring"||!yv(e.ease)}function tR(e,t){const n=new Jd({...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<JC;)r=n.sample(s),o.push(r.value),s+=ka;return{times:void 0,keyframes:o,duration:s-ka,ease:"linear"}}const Zv={anticipate:Ev,backInOut:Tv,circInOut:Rv};function nR(e){return e in Zv}class um extends Bv{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:s}=this.options;this.resolver=new $v(s,(i,a)=>this.onKeyframesResolved(i,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&Ca()&&nR(s)&&(s=Zv[s]),eR(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,element:p,...m}=this.options,v=tR(t,m);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,o=v.times,s=v.ease,i="keyframes"}const u=XC(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Qh(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(Sl(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:i,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return In(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return In(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=un(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}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ht;const{animation:r}=n;Qh(r,t)}return Ht}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;this.resolveFinishedPromise(),this.updateFinishedPromise();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,element:f,...h}=this.options,p=new Jd({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),m=un(this.time);c.setWithVelocity(p.sample(m-ka).value,p.sample(m).value,ka)}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;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return QC()&&r&&ZC.has(r)&&!l&&!c&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}const rR={type:"spring",stiffness:500,damping:25,restSpeed:10},oR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),sR={type:"keyframes",duration:.8},iR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},aR=(e,{keyframes:t})=>t.length>2?sR:qr.has(e)?e.startsWith("scale")?oR(t[1]):rR:iR;function lR({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}const ef=(e,t,n,r={},o,s)=>i=>{const a=Vd(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-un(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};lR(a)||(u={...u,...aR(e,u)}),u.duration&&(u.duration=un(u.duration)),u.repeatDelay&&(u.repeatDelay=un(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),d&&!s&&t.get()!==void 0){const f=Sl(u.keyframes,a);if(f!==void 0)return Ue.update(()=>{u.onUpdate(f),u.onComplete()}),new pv([])}return!s&&um.supports(u)?new um(u):new Jd(u)};function cR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function tf(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&&cR(u,d))continue;const p={delay:n,...Vd(i||{},d)};let m=!1;if(window.MotionHandoffAnimation){const b=mv(e);if(b){const y=window.MotionHandoffAnimation(b,d,Ue);y!==null&&(p.startTime=y,m=!0)}}cu(e,d),f.start(ef(d,f,h,e.shouldReduceMotion&&fv.has(d)?{type:!1}:p,e,m));const v=f.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{Ue.update(()=>{a&&BE(e,a)})}),c}function vu(e,t,n={}){var r;const o=Qs(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(tf(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return uR(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 uR(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(dR).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(vu(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function dR(e,t){return e.sortNodePosition(t)}function fR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>vu(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=vu(e,t,n);else{const o=typeof t=="function"?Qs(e,t,n.custom):t;r=Promise.all(tf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Xv(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}const hR=Rd.length;function Qv(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Qv(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<hR;n++){const r=Rd[n],o=e.props[r];(Ks(o)||o===!1)&&(t[r]=o)}return t}const mR=[...Cd].reverse(),pR=Cd.length;function gR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>fR(e,n,r)))}function yR(e){let t=gR(e),n=dm(),r=!0;const o=l=>(c,u)=>{var d;const f=Qs(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{props:c}=e,u=Qv(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let v=0;v<pR;v++){const b=mR[v],y=n[b],g=c[b]!==void 0?c[b]:u[b],T=Ks(g),S=b===l?y.isActive:null;S===!1&&(p=v);let E=g===u[b]&&g!==c[b]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),y.protectedKeys={...h},!y.isActive&&S===null||!g&&!y.prevProp||vl(g)||typeof g=="boolean")continue;const C=vR(y.prevProp,g);let k=C||b===l&&y.isActive&&!E&&T||v>p&&T,I=!1;const A=Array.isArray(g)?g:[g];let N=A.reduce(o(b),{});S===!1&&(N={});const{prevResolvedValues:M={}}=y,L={...M,...N},P=D=>{k=!0,f.has(D)&&(I=!0,f.delete(D)),y.needsAnimating[D]=!0;const V=e.getValue(D);V&&(V.liveStyle=!1)};for(const D in L){const V=N[D],H=M[D];if(h.hasOwnProperty(D))continue;let _=!1;lu(V)&&lu(H)?_=!Xv(V,H):_=V!==H,_?V!=null?P(D):f.add(D):V!==void 0&&f.has(D)?P(D):y.protectedKeys[D]=!0}y.prevProp=g,y.prevResolvedValues=N,y.isActive&&(h={...h,...N}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(E&&C)||I)&&d.push(...A.map(D=>({animation:D,options:{type:b}})))}if(f.size){const v={};if(typeof c.initial!="boolean"){const b=Qs(e,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(v.transition=b.transition)}f.forEach(b=>{const y=e.getBaseTarget(b),g=e.getValue(b);g&&(g.liveStyle=!0),v[b]=y??null}),d.push({animation:v})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=dm(),r=!0}}}function vR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Xv(t,e):!1}function Sr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function dm(){return{animate:Sr(!0),whileInView:Sr(),whileHover:Sr(),whileTap:Sr(),whileDrag:Sr(),whileFocus:Sr(),exit:Sr()}}class hr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class bR extends hr{constructor(t){super(t),t.animationState||(t.animationState=yR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();vl(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 xR=0;class wR extends hr{constructor(){super(...arguments),this.id=xR++}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,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const SR={animation:{Feature:bR},exit:{Feature:wR}},an={x:!1,y:!1};function Jv(){return an.x||an.y}function TR(e){return e==="x"||e==="y"?an[e]?null:(an[e]=!0,()=>{an[e]=!1}):an.x||an.y?null:(an.x=an.y=!0,()=>{an.x=an.y=!1})}function ei(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const nf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ei(e){return{point:{x:e.pageX,y:e.pageY}}}const ER=e=>t=>nf(t)&&e(t,Ei(t));function bo(e,t,n,r){return ei(e,t,ER(n),r)}function eb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function CR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function RR(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}}const tb=1e-4,PR=1-tb,kR=1+tb,nb=.01,IR=0-nb,AR=0+nb;function Ft(e){return e.max-e.min}function OR(e,t,n){return Math.abs(e-t)<=n}function fm(e,t,n,r=.5){e.origin=r,e.originPoint=Qe(t.min,t.max,e.origin),e.scale=Ft(n)/Ft(t),e.translate=Qe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=PR&&e.scale<=kR||isNaN(e.scale))&&(e.scale=1),(e.translate>=IR&&e.translate<=AR||isNaN(e.translate))&&(e.translate=0)}function Fs(e,t,n,r){fm(e.x,t.x,n.x,r?r.originX:void 0),fm(e.y,t.y,n.y,r?r.originY:void 0)}function hm(e,t,n){e.min=n.min+t.min,e.max=e.min+Ft(t)}function _R(e,t,n){hm(e.x,t.x,n.x),hm(e.y,t.y,n.y)}function mm(e,t,n){e.min=t.min-n.min,e.max=e.min+Ft(t)}function Vs(e,t,n){mm(e.x,t.x,n.x),mm(e.y,t.y,n.y)}const pm=()=>({translate:0,scale:1,origin:0,originPoint:0}),xo=()=>({x:pm(),y:pm()}),gm=()=>({min:0,max:0}),st=()=>({x:gm(),y:gm()});function tn(e){return[e("x"),e("y")]}function rc(e){return e===void 0||e===1}function bu({scale:e,scaleX:t,scaleY:n}){return!rc(e)||!rc(t)||!rc(n)}function Er(e){return bu(e)||rb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function rb(e){return ym(e.x)||ym(e.y)}function ym(e){return e&&e!=="0%"}function Ia(e,t,n){const r=e-n,o=t*r;return n+o}function vm(e,t,n,r,o){return o!==void 0&&(e=Ia(e,o,r)),Ia(e,n,r)+t}function xu(e,t=0,n=1,r,o){e.min=vm(e.min,t,n,r,o),e.max=vm(e.max,t,n,r,o)}function ob(e,{x:t,y:n}){xu(e.x,t.translate,t.scale,t.originPoint),xu(e.y,n.translate,n.scale,n.originPoint)}const bm=.999999999999,xm=1.0000000000001;function MR(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&&So(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,ob(e,i)),r&&Er(s.latestValues)&&So(e,s.latestValues))}t.x<xm&&t.x>bm&&(t.x=1),t.y<xm&&t.y>bm&&(t.y=1)}function wo(e,t){e.min=e.min+t,e.max=e.max+t}function wm(e,t,n,r,o=.5){const s=Qe(e.min,e.max,o);xu(e,t,n,s,r)}function So(e,t){wm(e.x,t.x,t.scaleX,t.scale,t.originX),wm(e.y,t.y,t.scaleY,t.scale,t.originY)}function sb(e,t){return eb(RR(e.getBoundingClientRect(),t))}function DR(e,t,n){const r=sb(e,n),{scroll:o}=t;return o&&(wo(r.x,o.offset.x),wo(r.y,o.offset.y)),r}function Aa(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const Sm=(e,t)=>Math.abs(e-t);function NR(e,t){const n=Sm(e.x,t.x),r=Sm(e.y,t.y);return Math.sqrt(n**2+r**2)}class ib{constructor(t,n,{transformPagePoint:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=sc(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=NR(u.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:h}=u,{timestamp:p}=Pt;this.history.push({...h,timestamp:p});const{onStart:m,onMove:v}=this.handlers;d||(m&&m(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{if(u.target instanceof Element&&u.target.hasPointerCapture&&u.pointerId!==void 0)try{if(!u.target.hasPointerCapture(u.pointerId))return}catch{}this.lastMoveEvent=u,this.lastMoveEventInfo=oc(d,this.transformPagePoint),Ue.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{Aa(u,"release"),this.end();const{onEnd:f,onSessionEnd:h,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=sc(u.type==="pointercancel"||u.type==="lostpointercapture"?this.lastMoveEventInfo:oc(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,m),h&&h(u,m)},!nf(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r;const s=Ei(t),i=oc(s,this.transformPagePoint),{point:a}=i,{timestamp:l}=Pt;this.history=[{...a,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,sc(i,this.history)),Aa(t,"set"),this.removeListeners=Ti(bo(t.currentTarget,"pointermove",this.handlePointerMove),bo(t.currentTarget,"pointerup",this.handlePointerUp),bo(t.currentTarget,"pointercancel",this.handlePointerUp),bo(t.currentTarget,"lostpointercapture",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Bn(this.updatePoint)}}function oc(e,t){return t?{point:t(e.point)}:e}function Tm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sc({point:e},t){return{point:e,delta:Tm(e,ab(t)),offset:Tm(e,jR(t)),velocity:LR(t,.1)}}function jR(e){return e[0]}function ab(e){return e[e.length-1]}function LR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ab(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>un(t)));)n--;if(!r)return{x:0,y:0};const s=In(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}function FR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Qe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Qe(n,e,r.max):Math.min(e,n)),e}function Em(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 VR(e,{top:t,left:n,bottom:r,right:o}){return{x:Em(e.x,n,o),y:Em(e.y,t,r)}}function Cm(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 $R(e,t){return{x:Cm(e.x,t.x),y:Cm(e.y,t.y)}}function BR(e,t){let n=.5;const r=Ft(e),o=Ft(t);return o>r?n=Vr(t.min,t.max-r,e.min):r>o&&(n=Vr(e.min,e.max-o,t.min)),Wn(0,1,n)}function WR(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 wu=.35;function zR(e=wu){return e===!1?e=0:e===!0&&(e=wu),{x:Rm(e,"left","right"),y:Rm(e,"top","bottom")}}function Rm(e,t,n){return{min:Pm(e,t),max:Pm(e,n)}}function Pm(e,t){return typeof e=="number"?e:e[t]||0}const HR=new WeakMap;class UR{constructor(t){this.openDragLock=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(Ei(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:h,onDragStart:p}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=TR(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),tn(v=>{let b=this.getAxisMotionValue(v).get()||0;if(Pn.test(b)){const{projection:y}=this.visualElement;if(y&&y.layout){const g=y.layout.layoutBox[v];g&&(b=Ft(g)*(parseFloat(b)/100))}}this.originPoint[v]=b}),p&&Ue.postRender(()=>p(u,d)),cu(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=d;if(h&&this.currentDirection===null){this.currentDirection=GR(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>tn(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 ib(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&Ue.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Ui(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=FR(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&&yo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=VR(o.layoutBox,n):this.constraints=!1,this.elastic=zR(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&tn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=WR(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!yo(t))return!1;const r=t.current;on(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=DR(r,o.root,this.visualElement.getTransformPagePoint());let i=$R(o.layout.layoutBox,s);if(n){const a=n(CR(i));this.hasMutatedConstraints=!!a,a&&(i=eb(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=tn(u=>{if(!Ui(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 cu(this.visualElement,t),r.start(ef(t,r,0,n,this.visualElement,!1))}stopAnimation(){tn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){tn(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){tn(n=>{const{drag:r}=this.getProps();if(!Ui(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-Qe(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!yo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};tn(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=BR({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(),tn(i=>{if(!Ui(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Qe(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;HR.set(this.visualElement,this);const t=this.visualElement.current,n=bo(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();yo(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()),Ue.read(r);const i=ei(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(tn(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=wu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function Ui(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function GR(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class YR extends hr{constructor(t){super(t),this.removeGroupControls=Ht,this.removeListeners=Ht,this.controls=new UR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ht}unmount(){this.removeGroupControls(),this.removeListeners()}}const km=e=>(t,n)=>{e&&Ue.postRender(()=>e(t,n))};class qR extends hr{constructor(){super(...arguments),this.removePointerDownListener=Ht}onPointerDown(t){this.session=new ib(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:km(t),onStart:km(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&Ue.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=bo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ca={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Im(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ts={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(me.test(e))e=parseFloat(e);else return e;const n=Im(e,t.target.x),r=Im(e,t.target.y);return`${n}% ${r}%`}},KR={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=sr.parse(e);if(o.length>5)return r;const s=sr.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=Qe(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 ZR extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;dE(XR),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()})),ca.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()||Ue.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),kd.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 lb(e){const[t,n]=Uy(),r=x.useContext(qs);return w.jsx(ZR,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(Jy),isPresent:t,safeToRemove:n})}const XR={borderRadius:{...Ts,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ts,borderTopRightRadius:Ts,borderBottomLeftRadius:Ts,borderBottomRightRadius:Ts,boxShadow:KR};function cb(e,t,n){const r=wt(e)?e:Vo(e);return r.start(ef("",r,t,n)),r.animation}function ub(e){return e instanceof SVGElement&&e.tagName!=="svg"}const QR=(e,t)=>e.depth-t.depth;class JR{constructor(){this.children=[],this.isDirty=!1}add(t){$d(this.children,t),this.isDirty=!0}remove(t){xl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(QR),this.isDirty=!1,this.children.forEach(t)}}function eP(e,t){const n=kn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Bn(r),e(s-t))};return Ue.read(r,!0),()=>Bn(r)}const db=["TopLeft","TopRight","BottomLeft","BottomRight"],tP=db.length,Am=e=>typeof e=="string"?parseFloat(e):e,Om=e=>typeof e=="number"||me.test(e);function nP(e,t,n,r,o,s){o?(e.opacity=Qe(0,n.opacity!==void 0?n.opacity:1,rP(r)),e.opacityExit=Qe(t.opacity!==void 0?t.opacity:1,0,oP(r))):s&&(e.opacity=Qe(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<tP;i++){const a=`border${db[i]}Radius`;let l=_m(t,a),c=_m(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Om(l)===Om(c)?(e[a]=Math.max(Qe(Am(l),Am(c),r),0),(Pn.test(c)||Pn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Qe(t.rotate||0,n.rotate||0,r))}function _m(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const rP=fb(0,.5,Cv),oP=fb(.5,.95,Ht);function fb(e,t,n){return r=>r<e?0:r>t?1:n(Vr(e,t,r))}function Mm(e,t){e.min=t.min,e.max=t.max}function en(e,t){Mm(e.x,t.x),Mm(e.y,t.y)}function Dm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Nm(e,t,n,r,o){return e-=t,e=Ia(e,1/n,r),o!==void 0&&(e=Ia(e,1/o,r)),e}function sP(e,t=0,n=1,r=.5,o,s=e,i=e){if(Pn.test(t)&&(t=parseFloat(t),t=Qe(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Qe(s.min,s.max,r);e===s&&(a-=t),e.min=Nm(e.min,t,n,a,o),e.max=Nm(e.max,t,n,a,o)}function jm(e,t,[n,r,o],s,i){sP(e,t[n],t[r],t[o],t.scale,s,i)}const iP=["x","scaleX","originX"],aP=["y","scaleY","originY"];function Lm(e,t,n,r){jm(e.x,t,iP,n?n.x:void 0,r?r.x:void 0),jm(e.y,t,aP,n?n.y:void 0,r?r.y:void 0)}function Fm(e){return e.translate===0&&e.scale===1}function hb(e){return Fm(e.x)&&Fm(e.y)}function Vm(e,t){return e.min===t.min&&e.max===t.max}function lP(e,t){return Vm(e.x,t.x)&&Vm(e.y,t.y)}function $m(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function mb(e,t){return $m(e.x,t.x)&&$m(e.y,t.y)}function Bm(e){return Ft(e.x)/Ft(e.y)}function Wm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class cP{constructor(){this.members=[]}add(t){$d(this.members,t),t.scheduleRender()}remove(t){if(xl(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 uP(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 ic=["","X","Y","Z"],dP={visibility:"hidden"},zm=1e3;let fP=0;function ac(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function pb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=mv(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ue,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&pb(r)}function gb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=fP++,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,this.nodes.forEach(pP),this.nodes.forEach(xP),this.nodes.forEach(wP),this.nodes.forEach(gP)},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 JR)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Bd),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=ub(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=eP(f,250),ca.hasAnimatedSinceResize&&(ca.hasAnimatedSinceResize=!1,this.nodes.forEach(Um))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||RP,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=u.getProps(),y=!this.targetLayout||!mb(this.targetLayout,p),g=!f&&h;if(this.options.layoutRoot||this.resumeFrom||g||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const T={...Vd(m,"layout"),onPlay:v,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||Um(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,Bn(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(SP),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.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&pb(this),!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(Hm);return}this.isUpdating||this.nodes.forEach(vP),this.isUpdating=!1,this.nodes.forEach(bP),this.nodes.forEach(hP),this.nodes.forEach(mP),this.clearAllSnapshots();const a=kn.now();Pt.delta=Wn(0,1e3/60,a-Pt.timestamp),Pt.timestamp=a,Pt.isProcessing=!0,Ql.update.process(Pt),Ql.preRender.process(Pt),Ql.render.process(Pt),Pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,kd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yP),this.sharedNodes.forEach(TP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ue.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ue.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ft(this.snapshot.measuredBox.x)&&!Ft(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}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);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!hb(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Er(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)),PP(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return st();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(kP))){const{scroll:u}=this.root;u&&(wo(l.x,u.offset.x),wo(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=st();if(en(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&en(l,i),wo(l.x,d.offset.x),wo(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=st();en(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&&So(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Er(u.latestValues)&&So(l,u.latestValues)}return Er(this.latestValues)&&So(l,this.latestValues),l}removeTransform(i){const a=st();en(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Er(c.latestValues))continue;bu(c.latestValues)&&c.updateSnapshot();const u=st(),d=c.measurePageBox();en(u,d),Lm(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Er(this.latestValues)&&Lm(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Pt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Pt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),Vs(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),en(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=st(),this.targetWithTransforms=st()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_R(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):en(this.target,this.layout.layoutBox),ob(this.target,this.targetDelta)):en(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(),Vs(this.relativeTargetOrigin,this.target,h.target),en(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||bu(this.parent.latestValues)||rb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Pt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;en(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;MR(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():(Dm(this.prevProjectionDelta.x,this.projectionDelta.x),Dm(this.prevProjectionDelta.y,this.projectionDelta.y)),Fs(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Wm(this.projectionDelta.x,this.prevProjectionDelta.x)||!Wm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=xo(),this.projectionDelta=xo(),this.projectionDeltaWithTransform=xo()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=xo();(!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,v=this.getStack(),b=!v||v.members.length<=1,y=!!(m&&!b&&this.options.crossfade===!0&&!this.path.some(CP));this.animationProgress=0;let g;this.mixTargetDelta=T=>{const S=T/1e3;Gm(d.x,i.x,S),Gm(d.y,i.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vs(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),EP(this.relativeTarget,this.relativeTargetOrigin,f,S),g&&lP(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=st()),en(g,this.relativeTarget)),m&&(this.animationValues=u,nP(u,c,this.latestValues,S,y,b)),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&&(Bn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ue.update(()=>{ca.hasAnimatedSinceResize=!0,this.currentAnimation=cb(0,zm,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},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(zm),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&&yb(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||st();const d=Ft(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=Ft(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}en(a,l),So(a,u),Fs(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new cP),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&&ac("z",i,c,this.animationValues);for(let u=0;u<ic.length;u++)ac(`rotate${ic[u]}`,i,c,this.animationValues),ac(`skew${ic[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 dP;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=aa(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=aa(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Er(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=uP(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 Zs){if(f[m]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:y}=Zs[m],g=c.transform==="none"?f[m]:v(f[m],d);if(b){const T=b.length;for(let S=0;S<T;S++)c[b[S]]=g}else y?this.options.visualElement.renderState.vars[m]=g:c[m]=g}return this.options.layoutId&&(c.pointerEvents=d===this?aa(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(Hm),this.root.sharedNodes.clear()}}}function hP(e){e.updateLayout()}function mP(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"?tn(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=Ft(f);f.min=r[d].min,f.max=f.min+h}):yb(s,n.layoutBox,r)&&tn(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=Ft(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=xo();Fs(a,r,n.layoutBox);const l=xo();i?Fs(l,e.applyTransform(o,!0),n.measuredBox):Fs(l,r,n.layoutBox);const c=!hb(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();Vs(p,n.layoutBox,f.layoutBox);const m=st();Vs(m,r,h.layoutBox),mb(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,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function pP(e){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 gP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yP(e){e.clearSnapshot()}function Hm(e){e.clearMeasurements()}function vP(e){e.isLayoutDirty=!1}function bP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Um(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function xP(e){e.resolveTargetDelta()}function wP(e){e.calcProjection()}function SP(e){e.resetSkewAndRotation()}function TP(e){e.removeLeadSnapshot()}function Gm(e,t,n){e.translate=Qe(t.translate,0,n),e.scale=Qe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ym(e,t,n,r){e.min=Qe(t.min,n.min,r),e.max=Qe(t.max,n.max,r)}function EP(e,t,n,r){Ym(e.x,t.x,n.x,r),Ym(e.y,t.y,n.y,r)}function CP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const RP={duration:.45,ease:[.4,0,.1,1]},qm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Km=qm("applewebkit/")&&!qm("chrome/")?Math.round:Ht;function Zm(e){e.min=Km(e.min),e.max=Km(e.max)}function PP(e){Zm(e.x),Zm(e.y)}function yb(e,t,n){return e==="position"||e==="preserve-aspect"&&!OR(Bm(t),Bm(n),.2)}function kP(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const IP=gb({attachResizeListener:(e,t)=>ei(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),lc={current:void 0},vb=gb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!lc.current){const e=new IP({});e.mount(window),e.setOptions({layoutScroll:!0}),lc.current=e}return lc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),AP={pan:{Feature:qR},drag:{Feature:YR,ProjectionNode:vb,MeasureLayout:lb}};function bb(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const s=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function xb(e,t){const n=bb(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Xm(e){return!(e.pointerType==="touch"||Jv())}function OP(e,t,n={}){const[r,o,s]=xb(e,n),i=a=>{if(!Xm(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Xm(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}function Qm(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&Ue.postRender(()=>s(t,Ei(t)))}class _P extends hr{mount(){const{current:t}=this.node;t&&(this.unmount=OP(t,(n,r)=>(Qm(this.node,r,"Start"),o=>Qm(this.node,o,"End"))))}unmount(){}}class MP extends hr{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=Ti(ei(this.node.current,"focus",()=>this.onFocus()),ei(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const wb=(e,t)=>t?e===t?!0:wb(e,t.parentElement):!1,DP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function NP(e){return DP.has(e.tagName)||e.tabIndex!==-1}const ks=new WeakSet;function Jm(e){return t=>{t.key==="Enter"&&e(t)}}function cc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const jP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Jm(()=>{if(ks.has(n))return;cc(n,"down");const o=Jm(()=>{cc(n,"up")}),s=()=>cc(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function ep(e){return nf(e)&&!Jv()}function LP(e,t,n={}){const[r,o,s]=xb(e,n),i=a=>{const l=a.currentTarget;if(!l||!ep(a)||ks.has(l))return;ks.add(l),Aa(a,"set");const c=t(l,a),u=(h,p)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),Aa(h,"release"),!(!ep(h)||!ks.has(l))&&(ks.delete(l),typeof c=="function"&&c(h,{success:p}))},d=h=>{(h.isTrusted?FP(h,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(h,!1):u(h,!(l instanceof Element)||wb(l,h.target))},f=h=>{u(h,!1)};l.addEventListener("pointerup",d,o),l.addEventListener("pointercancel",f,o),l.addEventListener("lostpointercapture",f,o)};return r.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!NP(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,o),l&&a.addEventListener("focus",c=>jP(c,o),o)}),s}function FP(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}function tp(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&Ue.postRender(()=>s(t,Ei(t)))}class VP extends hr{mount(){const{current:t}=this.node;t&&(this.unmount=LP(t,(n,r)=>(tp(this.node,r,"Start"),(o,{success:s})=>tp(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Su=new WeakMap,uc=new WeakMap,$P=e=>{const t=Su.get(e.target);t&&t(e)},BP=e=>{e.forEach($P)};function WP({root:e,...t}){const n=e||document;uc.has(n)||uc.set(n,{});const r=uc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(BP,{root:e,...t})),r[o]}function zP(e,t,n){const r=WP(t);return Su.set(e,n),r.observe(e),()=>{Su.delete(e),r.unobserve(e)}}const HP={some:0,all:1};class UP extends hr{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:HP[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 zP(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(GP(t,n))&&this.startObserver()}unmount(){}}function GP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const YP={inView:{Feature:UP},tap:{Feature:VP},focus:{Feature:MP},hover:{Feature:_P}},qP={layout:{ProjectionNode:vb,MeasureLayout:lb}},Tu={current:null},Sb={current:!1};function KP(){if(Sb.current=!0,!!Ed)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Tu.current=e.matches;e.addListener(t),t()}else Tu.current=!1}const ZP=[...Vv,Ot,sr],XP=e=>ZP.find(Fv(e)),ti=new WeakMap;function QP(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"&&gl(o.version==="12.4.7",`Attempting to mix Motion versions ${o.version} with 12.4.7 may not work as expected.`);else if(wt(s))e.addValue(r,Vo(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,Vo(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const np=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Tb{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Kd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=kn.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,Ue.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,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=bl(n),this.isVariantNode=Xy(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];l[h]!==void 0&&wt(p)&&p.set(l[h],!1)}}mount(t){this.current=t,ti.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)),Sb.current||KP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Tu.current,process.env.NODE_ENV!=="production"&&gl(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(){this.projection&&this.projection.unmount(),Bn(this.notifyUpdate),Bn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),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){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=qr.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Ue.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Fo){const n=Fo[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<np.length;r++){const o=np[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=QP(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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}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=Vo(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"&&(jv(o)||Pv(o))?o=parseFloat(o):!XP(o)&&sr.test(n)&&(o=Mv(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=Ld(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 Bd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Eb extends Tb{constructor(){super(...arguments),this.KeyframeResolver=$v}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]}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}`)}))}}function JP(e){return window.getComputedStyle(e)}class Cb extends Eb{constructor(){super(...arguments),this.type="html",this.renderInstance=lv}readValueFromInstance(t,n){if(qr.has(n)){const r=qd(n);return r&&r.default||0}else{const r=JP(t),o=(Id(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return sb(t,n)}build(t,n,r){_d(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Fd(t,n,r)}}class Rb extends Eb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=st,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&av(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(qr.has(n)){const r=qd(n);return r&&r.default||0}return n=cv.has(n)?n:Pd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return dv(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ue.postRender(this.updateDimensions)}build(t,n,r){Nd(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){uv(t,n,r,o)}mount(t){this.isSVGTag=jd(t.tagName),super.mount(t)}}const ek=(e,t)=>Dd(e)?new Rb(t):new Cb(t,{allowProjection:e!==x.Fragment}),tk=NE({...SR,...YP,...AP,...qP},ek),ct=XT(tk);function $r(e){const t=hn(()=>Vo(e)),{isStatic:n}=x.useContext(Lo);if(n){const[,r]=x.useState(e);x.useEffect(()=>t.on("change",r),[])}return t}function Pb(e,t){const n=$r(t()),r=()=>n.set(t());return r(),pl(()=>{const o=()=>Ue.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),Bn(r)}}),n}const nk=e=>e&&typeof e=="object"&&e.mix,rk=e=>nk(e)?e.mix:void 0;function ok(...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=Yv(o,s,{mixer:rk(s[0]),...i});return t?a(r):a}function sk(e){Ns.current=[],e();const t=Pb(Ns.current,e);return Ns.current=void 0,t}function ik(e,t,n,r){if(typeof e=="function")return sk(e);const o=typeof t=="function"?t:ok(t,n,r);return Array.isArray(e)?rp(e,o):rp([e],([s])=>o(s))}function rp(e,t){const n=hn(()=>[]);return Pb(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function ak(e){return x.useEffect(()=>()=>e(),[])}function lk(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Zd(r),Ra);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:In(o)}}const ck=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function kb(e,t){return Gv(e)?e[ck(0,e.length,t)]:e}function rf(e){return typeof e=="object"&&!Array.isArray(e)}function Ib(e,t,n,r){return typeof e=="string"&&rf(t)?bb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function uk(e,t,n){return e*(t+1)}function op(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function dk(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(xl(e,o),r--)}}function fk(e,t,n,r,o,s){dk(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Qe(o,s,r[i]),easing:kb(n,i)})}function hk(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function mk(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const pk="easeInOut",gk=20;function yk(e,{defaultTransition:t={},...n}={},r,o){const s=t.duration||.3,i=new Map,a=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let h=0;h<e.length;h++){const p=e[h];if(typeof p=="string"){c.set(p,d);continue}else if(!Array.isArray(p)){c.set(p.name,op(d,p.at,u,c));continue}let[m,v,b={}]=p;b.at!==void 0&&(d=op(d,b.at,u,c));let y=0;const g=(T,S,E,C=0,k=0)=>{const I=vk(T),{delay:A=0,times:N=Kv(I),type:M="keyframes",repeat:L,repeatType:P,repeatDelay:O=0,...j}=S;let{ease:D=t.ease||"easeOut",duration:V}=S;const H=typeof A=="function"?A(C,k):A,_=I.length,$=wl(M)?M:o==null?void 0:o[M];if(_<=2&&$){let G=100;if(_===2&&wk(I)){const z=I[1]-I[0];G=Math.abs(z)}const F={...j};V!==void 0&&(F.duration=un(V));const B=lk(F,G,$);D=B.ease,V=B.duration}V??(V=s);const K=d+H;N.length===1&&N[0]===0&&(N[1]=1);const re=N.length-I.length;if(re>0&&qv(N,re),I.length===1&&I.unshift(null),L){on(L<gk,"Repeat count too high, must be less than 20"),V=uk(V,L);const G=[...I],F=[...N];D=Array.isArray(D)?[...D]:[D];const B=[...D];for(let z=0;z<L;z++){I.push(...G);for(let Y=0;Y<G.length;Y++)N.push(F[Y]+(z+1)),D.push(Y===0?"linear":kb(B,Y-1))}hk(N,L)}const ee=K+V;fk(E,I,D,N,K,ee),y=Math.max(H+V,y),f=Math.max(ee,f)};if(wt(m)){const T=sp(m,a);g(v,b,ip("default",T))}else{const T=Ib(m,v,r,l),S=T.length;for(let E=0;E<S;E++){v=v,b=b;const C=T[E],k=sp(C,a);for(const I in v)g(v[I],bk(b,I),ip(I,k),E,S)}}u=d,d+=y}return a.forEach((h,p)=>{for(const m in h){const v=h[m];v.sort(mk);const b=[],y=[],g=[];for(let S=0;S<v.length;S++){const{at:E,value:C,easing:k}=v[S];b.push(C),y.push(Vr(0,f,E)),g.push(k||"easeOut")}y[0]!==0&&(y.unshift(0),b.unshift(b[0]),g.unshift(pk)),y[y.length-1]!==1&&(y.push(1),b.push(null)),i.has(p)||i.set(p,{keyframes:{},transition:{}});const T=i.get(p);T.keyframes[m]=b,T.transition[m]={...t,duration:f,ease:g,times:y,...n}}}),i}function sp(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function ip(e,t){return t[e]||(t[e]=[]),t[e]}function vk(e){return Array.isArray(e)?e:[e]}function bk(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const xk=e=>typeof e=="number",wk=e=>e.every(xk);function Sk(e,t){return e in t}class Tk extends Tb{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(Sk(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return st()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function Ek(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=ub(e)?new Rb(t):new Cb(t);n.mount(e),ti.set(e,n)}function Ck(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new Tk(t);n.mount(e),ti.set(e,n)}function Rk(e,t){return wt(e)||typeof e=="number"||typeof e=="string"&&!rf(t)}function Ab(e,t,n,r){const o=[];if(Rk(e,t))o.push(cb(e,rf(t)&&t.default||t,n&&(n.default||n)));else{const s=Ib(e,t,r),i=s.length;on(!!i,"No valid elements provided.");for(let a=0;a<i;a++){const l=s[a],c=l instanceof Element?Ek:Ck;ti.has(l)||c(l);const u=ti.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,i)),o.push(...tf(u,{...t,transition:d},{}))}}return o}function Pk(e,t,n){const r=[];return yk(e,t,n,{spring:Qd}).forEach(({keyframes:s,transition:i},a)=>{r.push(...Ab(a,s,i))}),r}function kk(e){return Array.isArray(e)&&e.some(Array.isArray)}function Ik(e){function t(n,r,o){let s=[];kk(n)?s=Pk(n,r,e):s=Ab(n,r,o,e);const i=new pv(s);return e&&e.animations.push(i),i}return t}function Ak(){const e=hn(()=>({current:null,animations:[]})),t=hn(()=>Ik(e));return ak(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class Ok{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 _k=()=>new Ok;function Mk(){return hn(_k)}function Dk(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function Nk(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:Dk(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=yu(r)(l/c)*c}return t+l}}const Ob=x.createContext(null);function jk(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=Qe(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?LE(e,o,o+s):e}function Lk({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=hn(()=>ct[t]),l=[],c=x.useRef(!1);on(!!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(Vk)},updateOrder:(d,f,h)=>{if(c.current)return;const p=jk(l,d,f,h);l!==p&&(c.current=!0,r(p.map(Fk).filter(m=>o.indexOf(m)!==-1)))}};return x.useEffect(()=>{c.current=!1}),w.jsx(a,{...s,ref:i,ignoreStrict:!0,children:w.jsx(Ob.Provider,{value:u,children:e})})}const _b=x.forwardRef(Lk);function Fk(e){return e.value}function Vk(e,t){return e.layout.min-t.layout.min}function ap(e,t=0){return wt(e)?e:$r(t)}function $k({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=hn(()=>ct[r]),c=x.useContext(Ob),u={x:ap(t.x),y:ap(t.y)},d=ik([u.x,u.y],([m,v])=>m||v?1:"unset");on(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:h,updateOrder:p}=c;return w.jsx(l,{drag:f,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:s,onDrag:(m,v)=>{const{velocity:b}=v;b[f]&&p(n,u[f].get(),b[f]),o&&o(m,v)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const Mb=x.forwardRef($k);/**
|
|
13
|
-
* @license lucide-react v0.
|
|
12
|
+
`),()=>{document.head.removeChild(f)}},[t]),x.jsx(dS,{isPresent:t,childRef:o,sizeRef:i,children:A.cloneElement(e,{ref:o})})}const pS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=bn(hS),c=E.useId(),u=E.useCallback(p=>{l.set(p,!0);for(const f of l.values())if(!f)return;r&&r()},[l,r]),d=E.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:p=>(l.set(p,!1),()=>l.delete(p))}),i?[Math.random(),u]:[n,u]);return E.useMemo(()=>{l.forEach((p,f)=>l.set(f,!1))},[n]),A.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=x.jsx(fS,{isPresent:n,anchorX:s,children:e})),x.jsx(Xs.Provider,{value:d,children:e})};function hS(){return new Map}function Dy(e=!0){const t=E.useContext(Xs);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=E.useId();E.useEffect(()=>{if(e)return o(i)},[e]);const a=E.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Aa=e=>e.key||"";function Th(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const vr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=Dy(a),u=E.useMemo(()=>Th(e),[e]),d=a&&!l?[]:u.map(Aa),p=E.useRef(!0),f=E.useRef(u),h=bn(()=>new Map),[y,m]=E.useState(u),[v,g]=E.useState(u);Zs(()=>{p.current=!1,f.current=u;for(let T=0;T<v.length;T++){const w=Aa(v[T]);d.includes(w)?h.delete(w):h.get(w)!==!0&&h.set(w,!1)}},[v,d.length,d.join("-")]);const b=[];if(u!==y){let T=[...u];for(let w=0;w<v.length;w++){const C=v[w],R=Aa(C);d.includes(R)||(T.splice(w,0,C),b.push(C))}return i==="wait"&&b.length&&(T=b),g(Th(T)),m(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&v.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.`);const{forceRender:S}=E.useContext($i);return x.jsx(x.Fragment,{children:v.map(T=>{const w=Aa(T),C=a&&!l?!1:u===v||d.includes(w),R=()=>{if(h.has(w))h.set(w,!0);else return;let I=!0;h.forEach(P=>{P||(I=!1)}),I&&(S==null||S(),g(f.current),a&&(c==null||c()),r&&r())};return x.jsx(pS,{isPresent:C,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:C?void 0:R,anchorX:s,children:T},w)})})},mS=E.createContext(null),Gt=e=>e;let ti=Gt,dn=Gt;process.env.NODE_ENV!=="production"&&(ti=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},dn=(e,t)=>{if(!e)throw new Error(t)});const gS={useManualTiming:!1},Ia=["read","resolveKeyframes","update","preRender","render","postRender"];function vS(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,p=!1)=>{const h=p&&o?n:r;return d&&a.add(u),h.has(u)||h.add(u),u},cancel:u=>{r.delete(u),a.delete(u)},process:u=>{if(s=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const yS=40;function jy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Ia.reduce((v,g)=>(v[g]=vS(i),v),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:p}=a,f=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,yS),1),o.timestamp=v,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},h=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:Ia.reduce((v,g)=>{const b=a[g];return v[g]=(S,T=!1,w=!1)=>(n||h(),b.schedule(S,T,w)),v},{}),cancel:v=>{for(let g=0;g<Ia.length;g++)a[Ia[g]].cancel(v)},state:o,steps:a}}const{schedule:Je,cancel:Wn,state:Mt,steps:bc}=jy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Gt,!0);function xS(){const e=E.useRef(!1);return Zs(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function bS(){const e=xS(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>Je.postRender(r),[r]),t]}const wS=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Sh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(wS);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 Ny=e=>e===!0,TS=e=>Ny(e===!0)||e==="id",SS=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext($i),o=E.useContext(mS),[i,a]=bS(),s=E.useRef(null),l=r.id||o;s.current===null&&(TS(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:Ny(n)&&r.group||Sh()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return x.jsx($i.Provider,{value:c,children:e})},Fy=E.createContext({strict:!1}),Eh={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 Eh)Oo[e]={isEnabled:t=>Eh[e].some(n=>!!t[n])};function ES(e){for(const t in e)Oo[t]={...Oo[t],...e[t]}}const CS=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 is(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||CS.has(e)}let Ly=e=>!is(e);function Vy(e){e&&(Ly=t=>t.startsWith("on")?!is(t):e(t))}try{Vy(require("@emotion/is-prop-valid").default)}catch{}function kS(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Ly(o)||n===!0&&is(o)||!t&&!is(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function RS({children:e,isValidProp:t,...n}){t&&Vy(t),n={...E.useContext(Io),...n},n.isStatic=bn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(Io.Provider,{value:r,children:e})}const Ch=new Set;function Qs(e,t,n){e||Ch.has(t)||(console.warn(t),Ch.add(t))}function PS(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Qs(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Js=E.createContext({});function el(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Bi(e){return typeof e=="string"||Array.isArray(e)}const Fd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ld=["initial",...Fd];function tl(e){return el(e.animate)||Ld.some(t=>Bi(e[t]))}function zy(e){return!!(tl(e)||e.variants)}function AS(e,t){if(tl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Bi(n)?n:void 0,animate:Bi(r)?r:void 0}}return e.inherit!==!1?t:{}}function IS(e){const{initial:t,animate:n}=AS(e,E.useContext(Js));return E.useMemo(()=>({initial:t,animate:n}),[kh(t),kh(n)])}function kh(e){return Array.isArray(e)?e.join(" "):e}const OS=Symbol.for("motionComponentSymbol");function go(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function _S(e,t,n){return E.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):go(n)&&(n.current=r))},[t])}const{schedule:Vd}=jy(queueMicrotask,!1),zd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),MS="framerAppearId",$y="data-"+zd(MS),By=E.createContext({});function DS(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(Js),l=E.useContext(Fy),c=E.useContext(Xs),u=E.useContext(Io).reducedMotion,d=E.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const p=d.current,f=E.useContext(By);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&jS(d.current,n,o,f);const h=E.useRef(!1);E.useInsertionEffect(()=>{p&&h.current&&p.update(n,c)});const y=n[$y],m=E.useRef(!!y&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,y))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,y)));return Zs(()=>{p&&(h.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Vd.render(p.render),m.current&&p.animationState&&p.animationState.animateChanges())}),E.useEffect(()=>{p&&(!m.current&&p.animationState&&p.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,y)}),m.current=!1))}),p}function jS(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Hy(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&go(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Hy(e){if(e)return e.options.allowProjection!==!1?e.projection:Hy(e.parent)}function NS({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&ES(e);function s(c,u){let d;const p={...E.useContext(Io),...c,layoutId:FS(c)},{isStatic:f}=p,h=IS(c),y=r(c,f);if(!f&&Nd){LS(p,e);const m=VS(p);d=m.MeasureLayout,h.visualElement=DS(o,y,p,t,m.ProjectionNode)}return x.jsxs(Js.Provider,{value:h,children:[d&&h.visualElement?x.jsx(d,{visualElement:h.visualElement,...p}):null,n(o,c,_S(y,h.visualElement,u),y,f,h.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${(a=(i=o.displayName)!==null&&i!==void 0?i:o.name)!==null&&a!==void 0?a:""})`}`;const l=E.forwardRef(s);return l[OS]=o,l}function FS({layoutId:e}){const t=E.useContext($i).id;return t&&e!==void 0?t+"-"+e:e}function LS(e,t){const n=E.useContext(Fy).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?ti(!1,r):dn(!1,r)}}function VS(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}}const Wy=e=>t=>typeof t=="string"&&t.startsWith(e),$d=Wy("--"),zS=Wy("var(--"),Bd=e=>zS(e)?$S.test(e.split("/*")[0].trim()):!1,$S=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Hi={};function BS(e){for(const t in e)Hi[t]=e[t],$d(t)&&(Hi[t].isCSSVariable=!0)}const ni=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xr=new Set(ni);function qy(e,{layout:t,layoutId:n}){return Xr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Hi[e]||e==="opacity")}const Pt=e=>!!(e&&e.getVelocity),Uy=(e,t)=>t&&typeof e=="number"?t.transform(e):e,qn=(e,t,n)=>n>t?t:n<e?e:n,ri={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Wi={...ri,transform:e=>qn(0,1,e)},Oa={...ri,default:1},da=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),or=da("deg"),On=da("%"),we=da("px"),HS=da("vh"),WS=da("vw"),Rh={...On,parse:e=>On.parse(e)/100,transform:e=>On.transform(e*100)},qS={borderWidth:we,borderTopWidth:we,borderRightWidth:we,borderBottomWidth:we,borderLeftWidth:we,borderRadius:we,radius:we,borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomRightRadius:we,borderBottomLeftRadius:we,width:we,maxWidth:we,height:we,maxHeight:we,top:we,right:we,bottom:we,left:we,padding:we,paddingTop:we,paddingRight:we,paddingBottom:we,paddingLeft:we,margin:we,marginTop:we,marginRight:we,marginBottom:we,marginLeft:we,backgroundPositionX:we,backgroundPositionY:we},US={rotate:or,rotateX:or,rotateY:or,rotateZ:or,scale:Oa,scaleX:Oa,scaleY:Oa,scaleZ:Oa,skew:or,skewX:or,skewY:or,distance:we,translateX:we,translateY:we,translateZ:we,x:we,y:we,z:we,perspective:we,transformPerspective:we,opacity:Wi,originX:Rh,originY:Rh,originZ:we},Ph={...ri,transform:Math.round},Hd={...qS,...US,zIndex:Ph,size:we,fillOpacity:Wi,strokeOpacity:Wi,numOctaves:Ph},GS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},YS=ni.length;function KS(e,t,n){let r="",o=!0;for(let i=0;i<YS;i++){const a=ni[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(a.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const c=Uy(s,Hd[a]);if(!l){o=!1;const u=GS[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Wd(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const l in t){const c=t[l];if(Xr.has(l)){a=!0;continue}else if($d(l)){o[l]=c;continue}else{const u=Uy(c,Hd[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=KS(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}const qd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Gy(e,t,n){for(const r in t)!Pt(t[r])&&!qy(r,n)&&(e[r]=t[r])}function ZS({transformTemplate:e},t){return E.useMemo(()=>{const n=qd();return Wd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function XS(e,t){const n=e.style||{},r={};return Gy(r,n,e),Object.assign(r,ZS(e,t)),r}function QS(e,t){const n={},r=XS(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 JS=["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 Ud(e){return typeof e!="string"||e.includes("-")?!1:!!(JS.indexOf(e)>-1||/[A-Z]/u.test(e))}const eE={offset:"stroke-dashoffset",array:"stroke-dasharray"},tE={offset:"strokeDashoffset",array:"strokeDasharray"};function nE(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?eE:tE;e[i.offset]=we.transform(-r);const a=we.transform(t),s=we.transform(n);e[i.array]=`${a} ${s}`}function Ah(e,t,n){return typeof e=="string"?e:we.transform(t+n*e)}function rE(e,t,n){const r=Ah(t,e.x,e.width),o=Ah(n,e.y,e.height);return`${r} ${o}`}function Gd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(Wd(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:f,dimensions:h}=e;p.transform&&(h&&(f.transform=p.transform),delete p.transform),h&&(o!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=rE(h,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&nE(p,a,s,l,!1)}const Yy=()=>({...qd(),attrs:{}}),Yd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function oE(e,t,n,r){const o=E.useMemo(()=>{const i=Yy();return Gd(i,t,Yd(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Gy(i,e.style,e),o.style={...i,...o.style}}return o}function iE(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(Ud(n)?oE:QS)(r,i,a,n),c=kS(r,typeof n=="string",e),u=n!==E.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=E.useMemo(()=>Pt(d)?d.get():d,[d]);return E.createElement(n,{...u,children:p})}}function Ih(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Kd(e,t,n,r){if(typeof t=="function"){const[o,i]=Ih(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Ih(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const ku=e=>Array.isArray(e),aE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),sE=e=>ku(e)?e[e.length-1]||0:e;function Za(e){const t=Pt(e)?e.get():e;return aE(t)?t.toValue():t}function lE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:cE(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const Ky=e=>(t,n)=>{const r=E.useContext(Js),o=E.useContext(Xs),i=()=>lE(e,t,r,o);return n?i():bn(i)};function cE(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=Za(i[p]);let{initial:a,animate:s}=e;const l=tl(e),c=zy(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!el(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const h=Kd(e,p[f]);if(h){const{transitionEnd:y,transition:m,...v}=h;for(const g in v){let b=v[g];if(Array.isArray(b)){const S=u?b.length-1:0;b=b[S]}b!==null&&(o[g]=b)}for(const g in y)o[g]=y[g]}}}return o}function Zd(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(Pt(o[a])||t.style&&Pt(t.style[a])||qy(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[a]=o[a]);return i}const uE={useVisualState:Ky({scrapeMotionValuesFromProps:Zd,createRenderState:qd})};function Zy(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function Xy(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Qy=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 Jy(e,t,n,r){Xy(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Qy.has(o)?o:zd(o),t.attrs[o])}function ex(e,t,n){const r=Zd(e,t,n);for(const o in e)if(Pt(e[o])||Pt(t[o])){const i=ni.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const Oh=["x","y","width","height","cx","cy","r"],dE={useVisualState:Ky({scrapeMotionValuesFromProps:ex,createRenderState:Yy,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const s in o)if(Xr.has(s)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let s=0;s<Oh.length;s++){const l=Oh[s];e[l]!==t[l]&&(a=!0)}a&&Je.read(()=>{Zy(n,r),Je.render(()=>{Gd(r,o,Yd(n.tagName),e.transformTemplate),Jy(n,r)})})}})};function fE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...Ud(r)?dE:uE,preloadedFeatures:e,useRender:iE(o),createVisualElement:t,Component:r};return NS(a)}}function qi(e,t,n){const r=e.getProps();return Kd(r,t,n!==void 0?n:r.custom,e)}function Xd(e,t){return e?e[t]||e.default||e:void 0}const tx=new Set(["width","height","top","left","right","bottom",...ni]);function Qd(e,t){e.indexOf(t)===-1&&e.push(t)}function nl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function pE([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}class Jd{constructor(){this.subscriptions=[]}add(t){return Qd(this.subscriptions,t),()=>nl(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function nx(e,t){return t?e*(1e3/t):0}let Xa;function hE(){Xa=void 0}const _n={now:()=>(Xa===void 0&&_n.set(Mt.isProcessing||gS.useManualTiming?Mt.timestamp:performance.now()),Xa),set:e=>{Xa=e,queueMicrotask(hE)}},_h=30,mE=e=>!isNaN(parseFloat(e)),ki={current:void 0};class gE{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=_n.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=_n.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=mE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Qs(!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 Jd);const r=this.events[t].add(n);return t==="change"?()=>{r(),Je.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 ki.current&&ki.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=_n.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>_h)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,_h);return nx(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 _o(e,t){return new gE(e,t)}function vE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,_o(n))}function yE(e,t){const n=qi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=sE(i[a]);vE(e,a,s)}}function xE(e){return!!(Pt(e)&&e.add)}function Ru(e,t){const n=e.getValue("willChange");if(xE(n))return n.add(t)}function rx(e){return e.props[$y]}function ef(e){let t;return()=>(t===void 0&&(t=e()),t)}const bE=ef(()=>window.ScrollTimeline!==void 0);class wE{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}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,n){const r=this.animations.map(o=>{if(bE()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].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 startTime(){return this.getAll("startTime")}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]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class ox extends wE{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const yn=e=>e*1e3,Mn=e=>e/1e3;function rl(e){return typeof e=="function"}function Mh(e,t){e.timeline=t,e.onfinish=null}const tf=e=>Array.isArray(e)&&typeof e[0]=="number",TE={linearEasing:void 0};function SE(e,t){const n=ef(e);return()=>{var r;return(r=TE[t])!==null&&r!==void 0?r:n()}}const as=SE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Hr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},ix=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(Hr(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function ax(e){return!!(typeof e=="function"&&as()||!e||typeof e=="string"&&(e in Pu||as())||tf(e)||Array.isArray(e)&&e.every(ax))}const xi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Pu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xi([0,.65,.55,1]),circOut:xi([.55,0,1,.45]),backIn:xi([.31,.01,.66,-.59]),backOut:xi([.33,1.53,.69,.99])};function sx(e,t){if(e)return typeof e=="function"&&as()?ix(e,t):tf(e)?xi(e):Array.isArray(e)?e.map(n=>sx(n,t)||Pu.easeOut):Pu[e]}const lx=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,EE=1e-7,CE=12;function kE(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=lx(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>EE&&++s<CE);return a}function fa(e,t,n,r){if(e===t&&n===r)return Gt;const o=i=>kE(i,0,1,e,n);return i=>i===0||i===1?i:lx(o(i),t,r)}const cx=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ux=e=>t=>1-e(1-t),dx=fa(.33,1.53,.69,.99),nf=ux(dx),fx=cx(nf),px=e=>(e*=2)<1?.5*nf(e):.5*(2-Math.pow(2,-10*(e-1))),rf=e=>1-Math.sin(Math.acos(e)),hx=ux(rf),mx=cx(rf),gx=e=>/^0[^.\s]+$/u.test(e);function RE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||gx(e):!0}const Ri=e=>Math.round(e*1e5)/1e5,of=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function PE(e){return e==null}const AE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,af=(e,t)=>n=>!!(typeof n=="string"&&AE.test(n)&&n.startsWith(e)||t&&!PE(n)&&Object.prototype.hasOwnProperty.call(n,t)),vx=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(of);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},IE=e=>qn(0,255,e),wc={...ri,transform:e=>Math.round(IE(e))},Nr={test:af("rgb","red"),parse:vx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+wc.transform(e)+", "+wc.transform(t)+", "+wc.transform(n)+", "+Ri(Wi.transform(r))+")"};function OE(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 Au={test:af("#"),parse:OE,transform:Nr.transform},vo={test:af("hsl","hue"),parse:vx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+On.transform(Ri(t))+", "+On.transform(Ri(n))+", "+Ri(Wi.transform(r))+")"},Nt={test:e=>Nr.test(e)||Au.test(e)||vo.test(e),parse:e=>Nr.test(e)?Nr.parse(e):vo.test(e)?vo.parse(e):Au.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Nr.transform(e):vo.transform(e)},_E=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ME(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(of))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(_E))===null||n===void 0?void 0:n.length)||0)>0}const yx="number",xx="color",DE="var",jE="var(",Dh="${}",NE=/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 Ui(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(NE,l=>(Nt.test(l)?(r.color.push(i),o.push(xx),n.push(Nt.parse(l))):l.startsWith(jE)?(r.var.push(i),o.push(DE),n.push(l)):(r.number.push(i),o.push(yx),n.push(parseFloat(l))),++i,Dh)).split(Dh);return{values:n,split:s,indexes:r,types:o}}function bx(e){return Ui(e).values}function wx(e){const{split:t,types:n}=Ui(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const s=n[a];s===yx?i+=Ri(o[a]):s===xx?i+=Nt.transform(o[a]):i+=o[a]}return i}}const FE=e=>typeof e=="number"?0:e;function LE(e){const t=bx(e);return wx(e)(t.map(FE))}const dr={test:ME,parse:bx,createTransformer:wx,getAnimatableNone:LE},VE=new Set(["brightness","contrast","saturate","opacity"]);function zE(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(of)||[];if(!r)return e;const o=n.replace(r,"");let i=VE.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const $E=/\b([a-z-]*)\(.*?\)/gu,Iu={...dr,getAnimatableNone:e=>{const t=e.match($E);return t?t.map(zE).join(" "):e}},BE={...Hd,color:Nt,backgroundColor:Nt,outlineColor:Nt,fill:Nt,stroke:Nt,borderColor:Nt,borderTopColor:Nt,borderRightColor:Nt,borderBottomColor:Nt,borderLeftColor:Nt,filter:Iu,WebkitFilter:Iu},Tx=e=>BE[e];function Sx(e,t){let n=Tx(e);return n!==Iu&&(n=dr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const HE=new Set(["auto","none","0"]);function WE(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!HE.has(i)&&Ui(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=Sx(n,o)}const Fr=e=>e*180/Math.PI,Ou=e=>{const t=Fr(Math.atan2(e[1],e[0]));return _u(t)},qE={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ou,rotateZ:Ou,skewX:e=>Fr(Math.atan(e[1])),skewY:e=>Fr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},_u=e=>(e=e%360,e<0&&(e+=360),e),jh=Ou,Nh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Fh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),UE={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Nh,scaleY:Fh,scale:e=>(Nh(e)+Fh(e))/2,rotateX:e=>_u(Fr(Math.atan2(e[6],e[5]))),rotateY:e=>_u(Fr(Math.atan2(-e[2],e[0]))),rotateZ:jh,rotate:jh,skewX:e=>Fr(Math.atan(e[4])),skewY:e=>Fr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Lh(e){return e.includes("scale")?1:0}function Mu(e,t){if(!e||e==="none")return Lh(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=UE,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=qE,o=s}if(!o)return Lh(t);const i=r[t],a=o[1].split(",").map(YE);return typeof i=="function"?i(a):a[i]}const GE=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Mu(n,t)};function YE(e){return parseFloat(e.trim())}const Vh=e=>e===ri||e===we,KE=new Set(["x","y","z"]),ZE=ni.filter(e=>!KE.has(e));function XE(e){const t=[];return ZE.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Mo={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:(e,{transform:t})=>Mu(t,"x"),y:(e,{transform:t})=>Mu(t,"y")};Mo.translateX=Mo.x;Mo.translateY=Mo.y;const $r=new Set;let Du=!1,ju=!1;function Ex(){if(ju){const e=Array.from($r).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=XE(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{var s;(s=r.getValue(i))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ju=!1,Du=!1,$r.forEach(e=>e.complete()),$r.clear()}function Cx(){$r.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ju=!0)})}function QE(){Cx(),Ex()}class sf{constructor(t,n,r,o,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?($r.add(this),Du||(Du=!0,Je.read(Cx),Je.resolveKeyframes(Ex))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=o==null?void 0:o.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const l=r.readValue(n,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),o&&a===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),$r.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,$r.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const kx=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),JE=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function eC(e){const t=JE.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const tC=4;function Rx(e,t,n=1){dn(n<=tC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=eC(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return kx(a)?parseFloat(a):a}return Bd(o)?Rx(o,t,n+1):o}const Px=e=>t=>t.test(e),nC={test:e=>e==="auto",parse:e=>e},Ax=[ri,we,On,or,WS,HS,nC],zh=e=>Ax.find(Px(e));class Ix extends sf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Bd(c))){const u=Rx(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!tx.has(r)||t.length!==2)return;const[o,i]=t,a=zh(o),s=zh(i);if(a!==s)if(Vh(a)&&Vh(s))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++)RE(t[o])&&r.push(o);r.length&&WE(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Mo[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||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=o.length-1,s=o[a];o[a]=Mo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const $h=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(dr.test(e)||e==="0")&&!e.startsWith("url("));function rC(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 oC(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=$h(o,t),s=$h(i,t);return ti(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!s?!1:rC(e)||(n==="spring"||rl(n))&&r}const iC=e=>e!==null;function ol(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(iC),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const aC=40;class Ox{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=_n.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>aC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&QE(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=_n.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!oC(t,r,o,i))if(a)this.options.duration=0;else{l&&l(ol(t,this.options,n)),s&&s(),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)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ss=2e4;function lf(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ss;)t+=n,r=e.next(t);return t>=ss?1/0:t}const ot=(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 sC({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;o=Tc(l,s,e+1/3),i=Tc(l,s,e),a=Tc(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function ls(e,t){return n=>n>0?t:e}const Sc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},lC=[Au,Nr,vo],cC=e=>lC.find(t=>t.test(e));function Bh(e){const t=cC(e);if(ti(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===vo&&(n=sC(n)),n}const Hh=(e,t)=>{const n=Bh(e),r=Bh(t);if(!n||!r)return ls(e,t);const o={...n};return i=>(o.red=Sc(n.red,r.red,i),o.green=Sc(n.green,r.green,i),o.blue=Sc(n.blue,r.blue,i),o.alpha=ot(n.alpha,r.alpha,i),Nr.transform(o))},uC=(e,t)=>n=>t(e(n)),pa=(...e)=>e.reduce(uC),Nu=new Set(["none","hidden"]);function dC(e,t){return Nu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function fC(e,t){return n=>ot(e,t,n)}function cf(e){return typeof e=="number"?fC:typeof e=="string"?Bd(e)?ls:Nt.test(e)?Hh:mC:Array.isArray(e)?_x:typeof e=="object"?Nt.test(e)?Hh:pC:ls}function _x(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>cf(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function pC(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=cf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function hC(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=(n=e.values[s])!==null&&n!==void 0?n:0;r[i]=l,o[a]++}return r}const mC=(e,t)=>{const n=dr.createTransformer(t),r=Ui(e),o=Ui(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?Nu.has(e)&&!o.values.length||Nu.has(t)&&!r.values.length?dC(e,t):pa(_x(hC(r,o),o.values),n):(ti(!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.`),ls(e,t))};function Mx(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ot(e,t,n):cf(e)(e,t)}const gC=5;function Dx(e,t,n){const r=Math.max(t-gC,0);return nx(n-e(r),t-r)}const dt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Wh=.001;function vC({duration:e=dt.duration,bounce:t=dt.bounce,velocity:n=dt.velocity,mass:r=dt.mass}){let o,i;ti(e<=yn(dt.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=qn(dt.minDamping,dt.maxDamping,a),e=qn(dt.minDuration,dt.maxDuration,Mn(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=Fu(c,a),h=Math.exp(-d);return Wh-p/f*h},i=c=>{const d=c*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,h=Math.exp(-d),y=Fu(Math.pow(c,2),a);return(-o(c)+Wh>0?-1:1)*((p-f)*h)/y}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=xC(o,i,s);if(e=yn(e),isNaN(l))return{stiffness:dt.stiffness,damping:dt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const yC=12;function xC(e,t,n){let r=n;for(let o=1;o<yC;o++)r=r-e(r)/t(r);return r}function Fu(e,t){return e*Math.sqrt(1-t*t)}const bC=["duration","bounce"],wC=["stiffness","damping","mass"];function qh(e,t){return t.some(n=>e[n]!==void 0)}function TC(e){let t={velocity:dt.velocity,stiffness:dt.stiffness,damping:dt.damping,mass:dt.mass,isResolvedFromDuration:!1,...e};if(!qh(e,wC)&&qh(e,bC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*qn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:dt.mass,stiffness:o,damping:i}}else{const n=vC(e);t={...t,...n,mass:dt.mass},t.isResolvedFromDuration=!0}return t}function uf(e=dt.visualDuration,t=dt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:f}=TC({...n,velocity:-Mn(n.velocity||0)}),h=p||0,y=c/(2*Math.sqrt(l*u)),m=a-i,v=Mn(Math.sqrt(l/u)),g=Math.abs(m)<5;r||(r=g?dt.restSpeed.granular:dt.restSpeed.default),o||(o=g?dt.restDelta.granular:dt.restDelta.default);let b;if(y<1){const T=Fu(v,y);b=w=>{const C=Math.exp(-y*v*w);return a-C*((h+y*v*m)/T*Math.sin(T*w)+m*Math.cos(T*w))}}else if(y===1)b=T=>a-Math.exp(-v*T)*(m+(h+v*m)*T);else{const T=v*Math.sqrt(y*y-1);b=w=>{const C=Math.exp(-y*v*w),R=Math.min(T*w,300);return a-C*((h+y*v*m)*Math.sinh(R)+T*m*Math.cosh(R))/T}}const S={calculatedDuration:f&&d||null,next:T=>{const w=b(T);if(f)s.done=T>=d;else{let C=0;y<1&&(C=T===0?yn(h):Dx(b,T,w));const R=Math.abs(C)<=r,I=Math.abs(a-w)<=o;s.done=R&&I}return s.value=s.done?a:w,s},toString:()=>{const T=Math.min(lf(S),ss),w=ix(C=>S.next(T*C).value,T,30);return T+"ms "+w}};return S}function Uh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=R=>s!==void 0&&R<s||l!==void 0&&R>l,h=R=>s===void 0?l:l===void 0||Math.abs(s-R)<Math.abs(l-R)?s:l;let y=n*t;const m=d+y,v=a===void 0?m:a(m);v!==m&&(y=v-d);const g=R=>-y*Math.exp(-R/r),b=R=>v+g(R),S=R=>{const I=g(R),P=b(R);p.done=Math.abs(I)<=c,p.value=p.done?v:P};let T,w;const C=R=>{f(p.value)&&(T=R,w=uf({keyframes:[p.value,h(p.value)],velocity:Dx(b,R,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:R=>{let I=!1;return!w&&T===void 0&&(I=!0,S(R),C(R)),T!==void 0&&R>=T?w.next(R-T):(!I&&S(R),p)}}}const SC=fa(.42,0,1,1),EC=fa(0,0,.58,1),jx=fa(.42,0,.58,1),Nx=e=>Array.isArray(e)&&typeof e[0]!="number",Gh={linear:Gt,easeIn:SC,easeInOut:jx,easeOut:EC,circIn:rf,circInOut:mx,circOut:hx,backIn:nf,backInOut:fx,backOut:dx,anticipate:px},Lu=e=>{if(tf(e)){dn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return fa(t,n,r,o)}else if(typeof e=="string")return dn(Gh[e]!==void 0,`Invalid easing type '${e}'`),Gh[e];return e};function CC(e,t,n){const r=[],o=n||Mx,i=e.length-1;for(let a=0;a<i;a++){let s=o(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||Gt:t;s=pa(l,s)}r.push(s)}return r}function Fx(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(dn(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=CC(t,r,o),l=s.length,c=u=>{if(a&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const p=Hr(e[d],e[d+1],u);return s[d](p)};return n?u=>c(qn(e[0],e[i-1],u)):c}function Lx(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Hr(0,t,r);e.push(ot(n,1,o))}}function Vx(e){const t=[0];return Lx(t,e.length-1),t}function kC(e,t){return e.map(n=>n*t)}function RC(e,t){return e.map(()=>t||jx).splice(0,e.length-1)}function Pi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Nx(r)?r.map(Lu):Lu(r),i={done:!1,value:t[0]},a=kC(n&&n.length===t.length?n:Vx(t),e),s=Fx(a,t,{ease:Array.isArray(o)?o:RC(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const PC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Je.update(t,!0),stop:()=>Wn(t),now:()=>Mt.isProcessing?Mt.timestamp:_n.now()}},AC={decay:Uh,inertia:Uh,tween:Pi,keyframes:Pi,spring:uf},IC=e=>e/100;class df extends Ox{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||sf,s=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new a(i,s,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=this.options,s=rl(n)?n:AC[n]||Pi;let l,c;process.env.NODE_ENV!=="production"&&s!==Pi&&dn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==Pi&&typeof t[0]!="number"&&(l=pa(IC,Mx(t[0],t[1])),t=[0,100]);const u=s({...this.options,keyframes:t});i==="mirror"&&(c=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=lf(u));const{calculatedDuration:d}=u,p=d+o,f=p*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:p,totalDuration:f}}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:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:f,repeatType:h,repeatDelay:y,onUpdate:m}=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-p*(this.speed>=0?1:-1),g=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let b=this.currentTime,S=i;if(f){const R=Math.min(this.currentTime,u)/d;let I=Math.floor(R),P=R%1;!P&&R>=1&&(P=1),P===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(h==="reverse"?(P=1-P,y&&(P-=y/d)):h==="mirror"&&(S=a)),b=qn(0,1,P)*d}const T=g?{done:!1,value:l[0]}:S.next(b);s&&(T.value=s(T.value));let{done:w}=T;!g&&c!==null&&(w=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return C&&o!==void 0&&(T.value=ol(l,this.options,o)),m&&m(T.value),C&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Mn(t.calculatedDuration):0}get time(){return Mn(this.currentTime)}set time(t){t=yn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Mn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=PC,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),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 OC=new Set(["opacity","clipPath","filter","transform"]);function _C(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=sx(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"})}const MC=ef(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),cs=10,DC=2e4;function jC(e){return rl(e.type)||e.type==="spring"||!ax(e.ease)}function NC(e,t){const n=new df({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<DC;)r=n.sample(i),o.push(r.value),i+=cs;return{times:void 0,keyframes:o,duration:i-cs,ease:"linear"}}const zx={anticipate:px,backInOut:fx,circInOut:mx};function FC(e){return e in zx}class Yh extends Ox{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new Ix(i,(a,s)=>this.onKeyframesResolved(a,s),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:s,name:l,startTime:c}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof i=="string"&&as()&&FC(i)&&(i=zx[i]),jC(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:h,...y}=this.options,m=NC(t,y);t=m.keyframes,t.length===1&&(t[1]=t[0]),r=m.duration,o=m.times,i=m.ease,a="keyframes"}const u=_C(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Mh(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(ol(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Mn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Mn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=yn(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}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Gt;const{animation:r}=n;Mh(r,t)}return Gt}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;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:p,...f}=this.options,h=new df({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),y=yn(this.time);c.setWithVelocity(h.sample(y-cs).value,h.sample(y).value,cs)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:a,type:s}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return MC()&&r&&OC.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const LC={type:"spring",stiffness:500,damping:25,restSpeed:10},VC=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),zC={type:"keyframes",duration:.8},$C={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},BC=(e,{keyframes:t})=>t.length>2?zC:Xr.has(e)?e.startsWith("scale")?VC(t[1]):LC:$C;function HC({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const ff=(e,t,n,r={},o,i)=>a=>{const s=Xd(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-yn(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};HC(s)||(u={...u,...BC(e,u)}),u.duration&&(u.duration=yn(u.duration)),u.repeatDelay&&(u.repeatDelay=yn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=ol(u.keyframes,s);if(p!==void 0)return Je.update(()=>{u.onUpdate(p),u.onComplete()}),new ox([])}return!i&&Yh.supports(u)?new Yh(u):new df(u)};function WC({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function pf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const p=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),f=l[d];if(f===void 0||u&&WC(u,d))continue;const h={delay:n,...Xd(a||{},d)};let y=!1;if(window.MotionHandoffAnimation){const v=rx(e);if(v){const g=window.MotionHandoffAnimation(v,d,Je);g!==null&&(h.startTime=g,y=!0)}}Ru(e,d),p.start(ff(d,p,f,e.shouldReduceMotion&&tx.has(d)?{type:!1}:h,e,y));const m=p.animation;m&&c.push(m)}return s&&Promise.all(c).then(()=>{Je.update(()=>{s&&yE(e,s)})}),c}function Vu(e,t,n={}){var r;const o=qi(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(pf(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return qC(e,t,u+c,d,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[a,s]:[s,a];return c().then(()=>u())}else return Promise.all([a(),s(n.delay)])}function qC(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(UC).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(Vu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function UC(e,t){return e.sortNodePosition(t)}function GC(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Vu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Vu(e,t,n);else{const o=typeof t=="function"?qi(e,t,n.custom):t;r=Promise.all(pf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function $x(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}const YC=Ld.length;function Bx(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Bx(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<YC;n++){const r=Ld[n],o=e.props[r];(Bi(o)||o===!1)&&(t[r]=o)}return t}const KC=[...Fd].reverse(),ZC=Fd.length;function XC(e){return t=>Promise.all(t.map(({animation:n,options:r})=>GC(e,n,r)))}function QC(e){let t=XC(e),n=Kh(),r=!0;const o=l=>(c,u)=>{var d;const p=qi(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:f,transitionEnd:h,...y}=p;c={...c,...y,...h}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=Bx(e.parent)||{},d=[],p=new Set;let f={},h=1/0;for(let m=0;m<ZC;m++){const v=KC[m],g=n[v],b=c[v]!==void 0?c[v]:u[v],S=Bi(b),T=v===l?g.isActive:null;T===!1&&(h=m);let w=b===u[v]&&b!==c[v]&&S;if(w&&r&&e.manuallyAnimateOnMount&&(w=!1),g.protectedKeys={...f},!g.isActive&&T===null||!b&&!g.prevProp||el(b)||typeof b=="boolean")continue;const C=JC(g.prevProp,b);let R=C||v===l&&g.isActive&&!w&&S||m>h&&S,I=!1;const P=Array.isArray(b)?b:[b];let j=P.reduce(o(v),{});T===!1&&(j={});const{prevResolvedValues:N={}}=g,V={...N,...j},k=L=>{R=!0,p.has(L)&&(I=!0,p.delete(L)),g.needsAnimating[L]=!0;const _=e.getValue(L);_&&(_.liveStyle=!1)};for(const L in V){const _=j[L],z=N[L];if(f.hasOwnProperty(L))continue;let O=!1;ku(_)&&ku(z)?O=!$x(_,z):O=_!==z,O?_!=null?k(L):p.add(L):_!==void 0&&p.has(L)?k(L):g.protectedKeys[L]=!0}g.prevProp=b,g.prevResolvedValues=j,g.isActive&&(f={...f,...j}),r&&e.blockInitialAnimation&&(R=!1),R&&(!(w&&C)||I)&&d.push(...P.map(L=>({animation:L,options:{type:v}})))}if(p.size){const m={};if(typeof c.initial!="boolean"){const v=qi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(m.transition=v.transition)}p.forEach(v=>{const g=e.getBaseTarget(v),b=e.getValue(v);b&&(b.liveStyle=!0),m[v]=g??null}),d.push({animation:m})}let y=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(d):Promise.resolve()}function s(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(p=>{var f;return(f=p.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=a(l);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Kh(),r=!0}}}function JC(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!$x(t,e):!1}function Ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Kh(){return{animate:Ar(!0),whileInView:Ar(),whileHover:Ar(),whileTap:Ar(),whileDrag:Ar(),whileFocus:Ar(),exit:Ar()}}class yr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class ek extends yr{constructor(t){super(t),t.animationState||(t.animationState=QC(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();el(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 tk=0;class nk extends yr{constructor(){super(...arguments),this.id=tk++}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,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const rk={animation:{Feature:ek},exit:{Feature:nk}},mn={x:!1,y:!1};function Hx(){return mn.x||mn.y}function ok(e){return e==="x"||e==="y"?mn[e]?null:(mn[e]=!0,()=>{mn[e]=!1}):mn.x||mn.y?null:(mn.x=mn.y=!0,()=>{mn.x=mn.y=!1})}function Gi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const hf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ha(e){return{point:{x:e.pageX,y:e.pageY}}}const ik=e=>t=>hf(t)&&e(t,ha(t));function Ai(e,t,n,r){return Gi(e,t,ik(n),r)}function Wx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ak({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function sk(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}}const qx=1e-4,lk=1-qx,ck=1+qx,Ux=.01,uk=0-Ux,dk=0+Ux;function $t(e){return e.max-e.min}function fk(e,t,n){return Math.abs(e-t)<=n}function Zh(e,t,n,r=.5){e.origin=r,e.originPoint=ot(t.min,t.max,e.origin),e.scale=$t(n)/$t(t),e.translate=ot(n.min,n.max,e.origin)-e.originPoint,(e.scale>=lk&&e.scale<=ck||isNaN(e.scale))&&(e.scale=1),(e.translate>=uk&&e.translate<=dk||isNaN(e.translate))&&(e.translate=0)}function Ii(e,t,n,r){Zh(e.x,t.x,n.x,r?r.originX:void 0),Zh(e.y,t.y,n.y,r?r.originY:void 0)}function Xh(e,t,n){e.min=n.min+t.min,e.max=e.min+$t(t)}function pk(e,t,n){Xh(e.x,t.x,n.x),Xh(e.y,t.y,n.y)}function Qh(e,t,n){e.min=t.min-n.min,e.max=e.min+$t(t)}function Oi(e,t,n){Qh(e.x,t.x,n.x),Qh(e.y,t.y,n.y)}const Jh=()=>({translate:0,scale:1,origin:0,originPoint:0}),yo=()=>({x:Jh(),y:Jh()}),em=()=>({min:0,max:0}),pt=()=>({x:em(),y:em()});function an(e){return[e("x"),e("y")]}function Ec(e){return e===void 0||e===1}function zu({scale:e,scaleX:t,scaleY:n}){return!Ec(e)||!Ec(t)||!Ec(n)}function Or(e){return zu(e)||Gx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Gx(e){return tm(e.x)||tm(e.y)}function tm(e){return e&&e!=="0%"}function us(e,t,n){const r=e-n,o=t*r;return n+o}function nm(e,t,n,r,o){return o!==void 0&&(e=us(e,o,r)),us(e,n,r)+t}function $u(e,t=0,n=1,r,o){e.min=nm(e.min,t,n,r,o),e.max=nm(e.max,t,n,r,o)}function Yx(e,{x:t,y:n}){$u(e.x,t.translate,t.scale,t.originPoint),$u(e.y,n.translate,n.scale,n.originPoint)}const rm=.999999999999,om=1.0000000000001;function hk(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&bo(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Yx(e,a)),r&&Or(i.latestValues)&&bo(e,i.latestValues))}t.x<om&&t.x>rm&&(t.x=1),t.y<om&&t.y>rm&&(t.y=1)}function xo(e,t){e.min=e.min+t,e.max=e.max+t}function im(e,t,n,r,o=.5){const i=ot(e.min,e.max,o);$u(e,t,n,i,r)}function bo(e,t){im(e.x,t.x,t.scaleX,t.scale,t.originX),im(e.y,t.y,t.scaleY,t.scale,t.originY)}function Kx(e,t){return Wx(sk(e.getBoundingClientRect(),t))}function mk(e,t,n){const r=Kx(e,n),{scroll:o}=t;return o&&(xo(r.x,o.offset.x),xo(r.y,o.offset.y)),r}const Zx=({current:e})=>e?e.ownerDocument.defaultView:null,am=(e,t)=>Math.abs(e-t);function gk(e,t){const n=am(e.x,t.x),r=am(e.y,t.y);return Math.sqrt(n**2+r**2)}class Xx{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=kc(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=gk(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:h}=d,{timestamp:y}=Mt;this.history.push({...h,timestamp:y});const{onStart:m,onMove:v}=this.handlers;p||(m&&m(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Cc(p,this.transformPagePoint),Je.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:h,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=kc(d.type==="pointercancel"?this.lastMoveEventInfo:Cc(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,m),h&&h(d,m)},!hf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=ha(t),s=Cc(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Mt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,kc(s,this.history)),this.removeListeners=pa(Ai(this.contextWindow,"pointermove",this.handlePointerMove),Ai(this.contextWindow,"pointerup",this.handlePointerUp),Ai(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Wn(this.updatePoint)}}function Cc(e,t){return t?{point:t(e.point)}:e}function sm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function kc({point:e},t){return{point:e,delta:sm(e,Qx(t)),offset:sm(e,vk(t)),velocity:yk(t,.1)}}function vk(e){return e[0]}function Qx(e){return e[e.length-1]}function yk(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Qx(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>yn(t)));)n--;if(!r)return{x:0,y:0};const i=Mn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function xk(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ot(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ot(n,e,r.max):Math.min(e,n)),e}function lm(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 bk(e,{top:t,left:n,bottom:r,right:o}){return{x:lm(e.x,n,o),y:lm(e.y,t,r)}}function cm(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 wk(e,t){return{x:cm(e.x,t.x),y:cm(e.y,t.y)}}function Tk(e,t){let n=.5;const r=$t(e),o=$t(t);return o>r?n=Hr(t.min,t.max-r,e.min):r>o&&(n=Hr(e.min,e.max-o,t.min)),qn(0,1,n)}function Sk(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 Bu=.35;function Ek(e=Bu){return e===!1?e=0:e===!0&&(e=Bu),{x:um(e,"left","right"),y:um(e,"top","bottom")}}function um(e,t,n){return{min:dm(e,t),max:dm(e,n)}}function dm(e,t){return typeof e=="number"?e:e[t]||0}const Ck=new WeakMap;class kk{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=pt(),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(ha(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:h}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ok(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),an(m=>{let v=this.getAxisMotionValue(m).get()||0;if(On.test(v)){const{projection:g}=this.visualElement;if(g&&g.layout){const b=g.layout.layoutBox[m];b&&(v=$t(b)*(parseFloat(v)/100))}}this.originPoint[m]=v}),h&&Je.postRender(()=>h(u,d)),Ru(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:h,onDrag:y}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:m}=d;if(f&&this.currentDirection===null){this.currentDirection=Rk(m),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",d.point,m),this.updateAxis("y",d.point,m),this.visualElement.render(),y&&y(u,d)},s=(u,d)=>this.stop(u,d),l=()=>an(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 Xx(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Zx(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&Je.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.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!_a(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=xk(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&go(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=bk(o.layoutBox,n):this.constraints=!1,this.elastic=Ek(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&an(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=Sk(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!go(t))return!1;const r=t.current;dn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=mk(r,o.root,this.visualElement.getTransformPagePoint());let a=wk(o.layout.layoutBox,i);if(n){const s=n(ak(a));this.hasMutatedConstraints=!!s,s&&(a=Wx(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=an(u=>{if(!_a(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const p=o?200:1e6,f=o?40:1e7,h={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,h)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ru(this.visualElement,t),r.start(ff(t,r,0,n,this.visualElement,!1))}stopAnimation(){an(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){an(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){an(n=>{const{drag:r}=this.getProps();if(!_a(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n];i.set(t[n]-ot(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!go(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};an(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=Tk({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),an(a=>{if(!_a(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(ot(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;Ck.set(this.visualElement,this);const t=this.visualElement.current,n=Ai(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();go(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Je.read(r);const a=Gi(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(an(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{a(),n(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=Bu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function _a(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Rk(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Pk extends yr{constructor(t){super(t),this.removeGroupControls=Gt,this.removeListeners=Gt,this.controls=new kk(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Gt}unmount(){this.removeGroupControls(),this.removeListeners()}}const fm=e=>(t,n)=>{e&&Je.postRender(()=>e(t,n))};class Ak extends yr{constructor(){super(...arguments),this.removePointerDownListener=Gt}onPointerDown(t){this.session=new Xx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Zx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:fm(t),onStart:fm(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&Je.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Ai(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Qa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const mi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(we.test(e))e=parseFloat(e);else return e;const n=pm(e,t.target.x),r=pm(e,t.target.y);return`${n}% ${r}%`}},Ik={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=dr.parse(e);if(o.length>5)return r;const i=dr.createTransformer(e),a=typeof o[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=ot(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}};class Ok extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;BS(_k),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Qa.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||Je.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Vd.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 Jx(e){const[t,n]=Dy(),r=E.useContext($i);return x.jsx(Ok,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(By),isPresent:t,safeToRemove:n})}const _k={borderRadius:{...mi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mi,borderTopRightRadius:mi,borderBottomLeftRadius:mi,borderBottomRightRadius:mi,boxShadow:Ik};function eb(e,t,n){const r=Pt(e)?e:_o(e);return r.start(ff("",r,t,n)),r.animation}function tb(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Mk=(e,t)=>e.depth-t.depth;class Dk{constructor(){this.children=[],this.isDirty=!1}add(t){Qd(this.children,t),this.isDirty=!0}remove(t){nl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Mk),this.isDirty=!1,this.children.forEach(t)}}function jk(e,t){const n=_n.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Wn(r),e(i-t))};return Je.read(r,!0),()=>Wn(r)}const nb=["TopLeft","TopRight","BottomLeft","BottomRight"],Nk=nb.length,hm=e=>typeof e=="string"?parseFloat(e):e,mm=e=>typeof e=="number"||we.test(e);function Fk(e,t,n,r,o,i){o?(e.opacity=ot(0,n.opacity!==void 0?n.opacity:1,Lk(r)),e.opacityExit=ot(t.opacity!==void 0?t.opacity:1,0,Vk(r))):i&&(e.opacity=ot(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<Nk;a++){const s=`border${nb[a]}Radius`;let l=gm(t,s),c=gm(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||mm(l)===mm(c)?(e[s]=Math.max(ot(hm(l),hm(c),r),0),(On.test(c)||On.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=ot(t.rotate||0,n.rotate||0,r))}function gm(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Lk=rb(0,.5,hx),Vk=rb(.5,.95,Gt);function rb(e,t,n){return r=>r<e?0:r>t?1:n(Hr(e,t,r))}function vm(e,t){e.min=t.min,e.max=t.max}function rn(e,t){vm(e.x,t.x),vm(e.y,t.y)}function ym(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=us(e,1/n,r),o!==void 0&&(e=us(e,1/o,r)),e}function zk(e,t=0,n=1,r=.5,o,i=e,a=e){if(On.test(t)&&(t=parseFloat(t),t=ot(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=ot(i.min,i.max,r);e===i&&(s-=t),e.min=xm(e.min,t,n,s,o),e.max=xm(e.max,t,n,s,o)}function bm(e,t,[n,r,o],i,a){zk(e,t[n],t[r],t[o],t.scale,i,a)}const $k=["x","scaleX","originX"],Bk=["y","scaleY","originY"];function wm(e,t,n,r){bm(e.x,t,$k,n?n.x:void 0,r?r.x:void 0),bm(e.y,t,Bk,n?n.y:void 0,r?r.y:void 0)}function Tm(e){return e.translate===0&&e.scale===1}function ob(e){return Tm(e.x)&&Tm(e.y)}function Sm(e,t){return e.min===t.min&&e.max===t.max}function Hk(e,t){return Sm(e.x,t.x)&&Sm(e.y,t.y)}function Em(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ib(e,t){return Em(e.x,t.x)&&Em(e.y,t.y)}function Cm(e){return $t(e.x)/$t(e.y)}function km(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Wk{constructor(){this.members=[]}add(t){Qd(this.members,t),t.scheduleRender()}remove(t){if(nl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function qk(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:p,skewX:f,skewY:h}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),h&&(r+=`skewY(${h}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const Rc=["","X","Y","Z"],Uk={visibility:"hidden"},Rm=1e3;let Gk=0;function Pc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ab(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=rx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Je,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ab(r)}function sb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=Gk++,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,this.nodes.forEach(Zk),this.nodes.forEach(tR),this.nodes.forEach(nR),this.nodes.forEach(Xk)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Dk)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Jd),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l&&l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=tb(a),this.instance=a;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=jk(p,250),Qa.hasAnimatedSinceResize&&(Qa.hasAnimatedSinceResize=!1,this.nodes.forEach(Am))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||sR,{onLayoutAnimationStart:m,onLayoutAnimationComplete:v}=u.getProps(),g=!this.targetLayout||!ib(this.targetLayout,h),b=!p&&f;if(this.options.layoutRoot||this.resumeFrom||b||p&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const S={...Xd(y,"layout"),onPlay:m,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||Am(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Wn(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(rR),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ab(this),!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:s,layout:l}=this.options;if(s===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Pm);return}this.isUpdating||this.nodes.forEach(Jk),this.isUpdating=!1,this.nodes.forEach(eR),this.nodes.forEach(Yk),this.nodes.forEach(Kk),this.clearAllSnapshots();const s=_n.now();Mt.delta=qn(0,1e3/60,s-Mt.timestamp),Mt.timestamp=s,Mt.isProcessing=!0,bc.update.process(Mt),bc.preRender.process(Mt),bc.render.process(Mt),Mt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Qk),this.sharedNodes.forEach(oR)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Je.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Je.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!$t(this.snapshot.measuredBox.x)&&!$t(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}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 a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=pt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!ob(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&(s||Or(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return a&&(l=this.removeTransform(l)),lR(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return pt();const l=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(cR))){const{scroll:u}=this.root;u&&(xo(l.x,u.offset.x),xo(l.y,u.offset.y))}return l}removeElementScroll(a){var s;const l=pt();if(rn(l,a),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:p}=u;u!==this.root&&d&&p.layoutScroll&&(d.wasRoot&&rn(l,a),xo(l.x,d.offset.x),xo(l.y,d.offset.y))}return l}applyTransform(a,s=!1){const l=pt();rn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&bo(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Or(u.latestValues)&&bo(l,u.latestValues)}return Or(this.latestValues)&&bo(l,this.latestValues),l}removeTransform(a){const s=pt();rn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Or(c.latestValues))continue;zu(c.latestValues)&&c.updateSnapshot();const u=pt(),d=c.measurePageBox();rn(u,d),wm(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Or(this.latestValues)&&wm(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Mt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var s;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(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:p}=this.options;if(!(!this.layout||!(d||p))){if(this.resolvedRelativeTargetAt=Mt.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=pt(),this.relativeTargetOrigin=pt(),Oi(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=pt(),this.targetWithTransforms=pt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),pk(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rn(this.target,this.layout.layoutBox),Yx(this.target,this.targetDelta)):rn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=pt(),this.relativeTargetOrigin=pt(),Oi(this.relativeTargetOrigin,this.target,f.target),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||zu(this.parent.latestValues)||Gx(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 a;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Mt.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;rn(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;hk(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=pt());const{target:h}=s;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ym(this.prevProjectionDelta.x,this.projectionDelta.x),ym(this.prevProjectionDelta.y,this.projectionDelta.y)),Ii(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!km(this.projectionDelta.x,this.prevProjectionDelta.x)||!km(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=yo(),this.projectionDelta=yo(),this.projectionDeltaWithTransform=yo()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=yo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=pt(),f=l?l.source:void 0,h=this.layout?this.layout.source:void 0,y=f!==h,m=this.getStack(),v=!m||m.members.length<=1,g=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(aR));this.animationProgress=0;let b;this.mixTargetDelta=S=>{const T=S/1e3;Im(d.x,a.x,T),Im(d.y,a.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Oi(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),iR(this.relativeTarget,this.relativeTargetOrigin,p,T),b&&Hk(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=pt()),rn(b,this.relativeTarget)),y&&(this.animationValues=u,Fk(u,c,this.latestValues,T,g,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Wn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Je.update(()=>{Qa.hasAnimatedSinceResize=!0,this.currentAnimation=eb(0,Rm,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Rm),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:u}=a;if(!(!s||!l||!c)){if(this!==a&&this.layout&&c&&lb(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||pt();const d=$t(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=$t(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}rn(s,l),bo(s,u),Ii(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Wk),this.sharedNodes.get(a).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const c={};l.z&&Pc("z",a,c,this.animationValues);for(let u=0;u<Rc.length;u++)Pc(`rotate${Rc[u]}`,a,c,this.animationValues),Pc(`skew${Rc[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}getProjectionStyles(a){var s,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Uk;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Za(a==null?void 0:a.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=Za(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Or(this.latestValues)&&(y.transform=u?u({},""):"none",this.hasProjected=!1),y}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=qk(this.projectionDeltaWithTransform,this.treeScale,p),u&&(c.transform=u(p,c.transform));const{x:f,y:h}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(s=p.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const y in Hi){if(p[y]===void 0)continue;const{correct:m,applyTo:v,isCSSVariable:g}=Hi[y],b=c.transform==="none"?p[y]:m(p[y],d);if(v){const S=v.length;for(let T=0;T<S;T++)c[v[T]]=b}else g?this.options.visualElement.renderState.vars[y]=b:c[y]=b}return this.options.layoutId&&(c.pointerEvents=d===this?Za(a==null?void 0:a.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(Pm),this.root.sharedNodes.clear()}}}function Yk(e){e.updateLayout()}function Kk(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=n.source!==e.layout.source;i==="size"?an(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=$t(p);p.min=r[d].min,p.max=p.min+f}):lb(i,n.layoutBox,r)&&an(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=$t(r[d]);p.max=p.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const s=yo();Ii(s,r,n.layoutBox);const l=yo();a?Ii(l,e.applyTransform(o,!0),n.measuredBox):Ii(l,r,n.layoutBox);const c=!ob(s);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:f}=d;if(p&&f){const h=pt();Oi(h,n.layoutBox,p.layoutBox);const y=pt();Oi(y,r,f.layoutBox),ib(h,y)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=h,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Zk(e){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 Xk(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Qk(e){e.clearSnapshot()}function Pm(e){e.clearMeasurements()}function Jk(e){e.isLayoutDirty=!1}function eR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Am(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tR(e){e.resolveTargetDelta()}function nR(e){e.calcProjection()}function rR(e){e.resetSkewAndRotation()}function oR(e){e.removeLeadSnapshot()}function Im(e,t,n){e.translate=ot(t.translate,0,n),e.scale=ot(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Om(e,t,n,r){e.min=ot(t.min,n.min,r),e.max=ot(t.max,n.max,r)}function iR(e,t,n,r){Om(e.x,t.x,n.x,r),Om(e.y,t.y,n.y,r)}function aR(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const sR={duration:.45,ease:[.4,0,.1,1]},_m=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Mm=_m("applewebkit/")&&!_m("chrome/")?Math.round:Gt;function Dm(e){e.min=Mm(e.min),e.max=Mm(e.max)}function lR(e){Dm(e.x),Dm(e.y)}function lb(e,t,n){return e==="position"||e==="preserve-aspect"&&!fk(Cm(t),Cm(n),.2)}function cR(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const uR=sb({attachResizeListener:(e,t)=>Gi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ac={current:void 0},cb=sb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ac.current){const e=new uR({});e.mount(window),e.setOptions({layoutScroll:!0}),Ac.current=e}return Ac.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),dR={pan:{Feature:Ak},drag:{Feature:Pk,ProjectionNode:cb,MeasureLayout:Jx}};function ub(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const i=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function db(e,t){const n=ub(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function jm(e){return!(e.pointerType==="touch"||Hx())}function fR(e,t,n={}){const[r,o,i]=db(e,n),a=s=>{if(!jm(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{jm(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function Nm(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&Je.postRender(()=>i(t,ha(t)))}class pR extends yr{mount(){const{current:t}=this.node;t&&(this.unmount=fR(t,(n,r)=>(Nm(this.node,r,"Start"),o=>Nm(this.node,o,"End"))))}unmount(){}}class hR extends yr{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=pa(Gi(this.node.current,"focus",()=>this.onFocus()),Gi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const fb=(e,t)=>t?e===t?!0:fb(e,t.parentElement):!1,mR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function gR(e){return mR.has(e.tagName)||e.tabIndex!==-1}const bi=new WeakSet;function Fm(e){return t=>{t.key==="Enter"&&e(t)}}function Ic(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const vR=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Fm(()=>{if(bi.has(n))return;Ic(n,"down");const o=Fm(()=>{Ic(n,"up")}),i=()=>Ic(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Lm(e){return hf(e)&&!Hx()}function yR(e,t,n={}){const[r,o,i]=db(e,n),a=s=>{const l=s.currentTarget;if(!Lm(s)||bi.has(l))return;bi.add(l);const c=t(l,s),u=(f,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!Lm(f)||!bi.has(l))&&(bi.delete(l),typeof c=="function"&&c(f,{success:h}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||fb(l,f.target))},p=f=>{u(f,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",p,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),s instanceof HTMLElement&&(s.addEventListener("focus",c=>vR(c,o)),!gR(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function Vm(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&Je.postRender(()=>i(t,ha(t)))}class xR extends yr{mount(){const{current:t}=this.node;t&&(this.unmount=yR(t,(n,r)=>(Vm(this.node,r,"Start"),(o,{success:i})=>Vm(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Hu=new WeakMap,Oc=new WeakMap,bR=e=>{const t=Hu.get(e.target);t&&t(e)},wR=e=>{e.forEach(bR)};function TR({root:e,...t}){const n=e||document;Oc.has(n)||Oc.set(n,{});const r=Oc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(wR,{root:e,...t})),r[o]}function SR(e,t,n){const r=TR(t);return Hu.set(e,n),r.observe(e),()=>{Hu.delete(e),r.unobserve(e)}}const ER={some:0,all:1};class CR extends yr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:ER[o]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),p=c?u:d;p&&p(l)};return SR(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(kR(t,n))&&this.startObserver()}unmount(){}}function kR({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const RR={inView:{Feature:CR},tap:{Feature:xR},focus:{Feature:hR},hover:{Feature:pR}},PR={layout:{ProjectionNode:cb,MeasureLayout:Jx}},Wu={current:null},pb={current:!1};function AR(){if(pb.current=!0,!!Nd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Wu.current=e.matches;e.addListener(t),t()}else Wu.current=!1}const IR=[...Ax,Nt,dr],OR=e=>IR.find(Px(e)),Yi=new WeakMap;function _R(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Pt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Qs(o.version==="12.6.2",`Attempting to mix Motion versions ${o.version} with 12.6.2 may not work as expected.`);else if(Pt(i))e.addValue(r,_o(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,_o(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const zm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class hb{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=sf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=_n.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Je.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=a;this.onUpdate=u,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=s,this.blockInitialAnimation=!!i,this.isControllingVariants=tl(n),this.isVariantNode=zy(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in p){const h=p[f];l[f]!==void 0&&Pt(h)&&h.set(l[f],!1)}}mount(t){this.current=t,Yi.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)),pb.current||AR(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Wu.current,process.env.NODE_ENV!=="production"&&Qs(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(){this.projection&&this.projection.unmount(),Wn(this.notifyUpdate),Wn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),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){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Xr.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Je.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Oo){const n=Oo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):pt()}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<zm.length;r++){const o=zm[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=_R(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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}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=_o(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"&&(kx(o)||gx(o))?o=parseFloat(o):!OR(o)&&dr.test(n)&&(o=Sx(t,n)),this.setBaseTarget(t,Pt(o)?o.get():o)),Pt(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 a=Kd(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Pt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Jd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class mb extends hb{constructor(){super(...arguments),this.KeyframeResolver=Ix}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]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Pt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function MR(e){return window.getComputedStyle(e)}class gb extends mb{constructor(){super(...arguments),this.type="html",this.renderInstance=Xy}readValueFromInstance(t,n){if(Xr.has(n))return GE(t,n);{const r=MR(t),o=($d(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Kx(t,n)}build(t,n,r){Wd(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Zd(t,n,r)}}class vb extends mb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=pt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Zy(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Xr.has(n)){const r=Tx(n);return r&&r.default||0}return n=Qy.has(n)?n:zd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ex(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Je.postRender(this.updateDimensions)}build(t,n,r){Gd(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Jy(t,n,r,o)}mount(t){this.isSVGTag=Yd(t.tagName),super.mount(t)}}const DR=(e,t)=>Ud(e)?new vb(t):new gb(t,{allowProjection:e!==E.Fragment}),jR=fE({...rk,...RR,...dR,...PR},DR),vt=PS(jR);function NR(e){return E.useEffect(()=>()=>e(),[])}function Do(e){const t=bn(()=>_o(e)),{isStatic:n}=E.useContext(Io);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function yb(e,t){const n=Do(t()),r=()=>n.set(t());return r(),Zs(()=>{const o=()=>Je.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Wn(r)}}),n}const FR=e=>e&&typeof e=="object"&&e.mix,LR=e=>FR(e)?e.mix:void 0;function VR(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],a=e[3+n],s=Fx(o,i,{mixer:LR(i[0]),...a});return t?s(r):s}function zR(e){ki.current=[],e();const t=yb(ki.current,e);return ki.current=void 0,t}function $R(e,t,n,r){if(typeof e=="function")return zR(e);const o=typeof t=="function"?t:VR(t,n,r);return Array.isArray(e)?$m(e,o):$m([e],([i])=>o(i))}function $m(e,t){const n=bn(()=>[]);return yb(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function BR(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(lf(r),ss);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Mn(o)}}const HR=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function xb(e,t){return Nx(e)?e[HR(0,e.length,t)]:e}function mf(e){return typeof e=="object"&&!Array.isArray(e)}function bb(e,t,n,r){return typeof e=="string"&&mf(t)?ub(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function WR(e,t,n){return e*(t+1)}function Bm(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function qR(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(nl(e,o),r--)}}function UR(e,t,n,r,o,i){qR(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:ot(o,i,r[a]),easing:xb(n,a)})}function GR(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function YR(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const KR="easeInOut",ZR=20;function XR(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,l={},c=new Map;let u=0,d=0,p=0;for(let f=0;f<e.length;f++){const h=e[f];if(typeof h=="string"){c.set(h,d);continue}else if(!Array.isArray(h)){c.set(h.name,Bm(d,h.at,u,c));continue}let[y,m,v={}]=h;v.at!==void 0&&(d=Bm(d,v.at,u,c));let g=0;const b=(S,T,w,C=0,R=0)=>{const I=QR(S),{delay:P=0,times:j=Vx(I),type:N="keyframes",repeat:V,repeatType:k,repeatDelay:M=0,...D}=T;let{ease:L=t.ease||"easeOut",duration:_}=T;const z=typeof P=="function"?P(C,R):P,O=I.length,B=rl(N)?N:o==null?void 0:o[N];if(O<=2&&B){let K=100;if(O===2&&tP(I)){const F=I[1]-I[0];K=Math.abs(F)}const U={...D};_!==void 0&&(U.duration=yn(_));const Y=BR(U,K,B);L=Y.ease,_=Y.duration}_??(_=i);const Q=d+z;j.length===1&&j[0]===0&&(j[1]=1);const re=j.length-I.length;if(re>0&&Lx(j,re),I.length===1&&I.unshift(null),V){dn(V<ZR,"Repeat count too high, must be less than 20"),_=WR(_,V);const K=[...I],U=[...j];L=Array.isArray(L)?[...L]:[L];const Y=[...L];for(let F=0;F<V;F++){I.push(...K);for(let W=0;W<K.length;W++)j.push(U[W]+(F+1)),L.push(W===0?"linear":xb(Y,W-1))}GR(j,V)}const J=Q+_;UR(w,I,L,j,Q,J),g=Math.max(z+_,g),p=Math.max(J,p)};if(Pt(y)){const S=Hm(y,s);b(m,v,Wm("default",S))}else{const S=bb(y,m,r,l),T=S.length;for(let w=0;w<T;w++){m=m,v=v;const C=S[w],R=Hm(C,s);for(const I in m)b(m[I],JR(v,I),Wm(I,R),w,T)}}u=d,d+=g}return s.forEach((f,h)=>{for(const y in f){const m=f[y];m.sort(YR);const v=[],g=[],b=[];for(let T=0;T<m.length;T++){const{at:w,value:C,easing:R}=m[T];v.push(C),g.push(Hr(0,p,w)),b.push(R||"easeOut")}g[0]!==0&&(g.unshift(0),v.unshift(v[0]),b.unshift(KR)),g[g.length-1]!==1&&(g.push(1),v.push(null)),a.has(h)||a.set(h,{keyframes:{},transition:{}});const S=a.get(h);S.keyframes[y]=v,S.transition[y]={...t,duration:p,ease:b,times:g,...n}}}),a}function Hm(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Wm(e,t){return t[e]||(t[e]=[]),t[e]}function QR(e){return Array.isArray(e)?e:[e]}function JR(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const eP=e=>typeof e=="number",tP=e=>e.every(eP);function nP(e,t){return e in t}class rP extends hb{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(nP(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return pt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function oP(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=tb(e)?new vb(t):new gb(t);n.mount(e),Yi.set(e,n)}function iP(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new rP(t);n.mount(e),Yi.set(e,n)}function aP(e,t){return Pt(e)||typeof e=="number"||typeof e=="string"&&!mf(t)}function wb(e,t,n,r){const o=[];if(aP(e,t))o.push(eb(e,mf(t)&&t.default||t,n&&(n.default||n)));else{const i=bb(e,t,r),a=i.length;dn(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?oP:iP;Yi.has(l)||c(l);const u=Yi.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...pf(u,{...t,transition:d},{}))}}return o}function sP(e,t,n){const r=[];return XR(e,t,n,{spring:uf}).forEach(({keyframes:i,transition:a},s)=>{r.push(...wb(s,i,a))}),r}function lP(e){return Array.isArray(e)&&e.some(Array.isArray)}function cP(e){function t(n,r,o){let i=[];lP(n)?i=sP(n,r,e):i=wb(n,r,o,e);const a=new ox(i);return e&&e.animations.push(a),a}return t}function uP(){const e=bn(()=>({current:null,animations:[]})),t=bn(()=>cP(e));return NR(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class dP{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 fP=()=>new dP;function pP(){return bn(fP)}function hP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function mP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:hP(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Lu(r)(l/c)*c}return t+l}}const Tb=E.createContext(null);function gP(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,a=e[o+i];if(!a)return e;const s=e[o],l=a.layout,c=ot(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?pE(e,o,o+i):e}function vP({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=bn(()=>vt[t]),l=[],c=E.useRef(!1);dn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,p)=>{const f=l.findIndex(h=>d===h.value);f!==-1?l[f].layout=p[n]:l.push({value:d,layout:p[n]}),l.sort(xP)},updateOrder:(d,p,f)=>{if(c.current)return;const h=gP(l,d,p,f);l!==h&&(c.current=!0,r(h.map(yP).filter(y=>o.indexOf(y)!==-1)))}};return E.useEffect(()=>{c.current=!1}),x.jsx(s,{...i,ref:a,ignoreStrict:!0,children:x.jsx(Tb.Provider,{value:u,children:e})})}const Sb=E.forwardRef(vP);function yP(e){return e.value}function xP(e,t){return e.layout.min-t.layout.min}function qm(e,t=0){return Pt(e)?e:Do(t)}function bP({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=bn(()=>vt[r]),c=E.useContext(Tb),u={x:qm(t.x),y:qm(t.y)},d=$R([u.x,u.y],([y,m])=>y||m?1:"unset");dn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:h}=c;return x.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(y,m)=>{const{velocity:v}=m;v[p]&&h(n,u[p].get(),v[p]),o&&o(y,m)},onLayoutMeasure:y=>f(n,y),ref:s,ignoreStrict:!0,children:e})}const Eb=E.forwardRef(bP);/**
|
|
13
|
+
* @license lucide-react v0.485.0 - ISC
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the ISC license.
|
|
16
16
|
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/const
|
|
18
|
-
* @license lucide-react v0.
|
|
17
|
+
*/const wP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),TP=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Um=e=>{const t=TP(e);return t.charAt(0).toUpperCase()+t.slice(1)},Cb=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
18
|
+
* @license lucide-react v0.485.0 - ISC
|
|
19
19
|
*
|
|
20
20
|
* This source code is licensed under the ISC license.
|
|
21
21
|
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/var
|
|
23
|
-
* @license lucide-react v0.
|
|
22
|
+
*/var SP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
23
|
+
* @license lucide-react v0.485.0 - ISC
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/const
|
|
28
|
-
* @license lucide-react v0.
|
|
27
|
+
*/const EP=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>E.createElement("svg",{ref:l,...SP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Cb("lucide",o),...s},[...a.map(([c,u])=>E.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
|
|
28
|
+
* @license lucide-react v0.485.0 - ISC
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the ISC license.
|
|
31
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/const
|
|
33
|
-
* @license lucide-react v0.
|
|
32
|
+
*/const Et=(e,t)=>{const n=E.forwardRef(({className:r,...o},i)=>E.createElement(EP,{ref:i,iconNode:t,className:Cb(`lucide-${wP(Um(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Um(e),n};/**
|
|
33
|
+
* @license lucide-react v0.485.0 - ISC
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the ISC license.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/const
|
|
38
|
-
* @license lucide-react v0.
|
|
37
|
+
*/const CP=[["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"}]],kP=Et("arrow-down-0-1",CP);/**
|
|
38
|
+
* @license lucide-react v0.485.0 - ISC
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the ISC license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const
|
|
43
|
-
* @license lucide-react v0.
|
|
42
|
+
*/const RP=[["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"}]],PP=Et("arrow-up-0-1",RP);/**
|
|
43
|
+
* @license lucide-react v0.485.0 - ISC
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const
|
|
48
|
-
* @license lucide-react v0.
|
|
47
|
+
*/const AP=[["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"}]],kb=Et("arrow-up-down",AP);/**
|
|
48
|
+
* @license lucide-react v0.485.0 - ISC
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const
|
|
53
|
-
* @license lucide-react v0.
|
|
52
|
+
*/const IP=[["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"}]],OP=Et("calendar",IP);/**
|
|
53
|
+
* @license lucide-react v0.485.0 - ISC
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const
|
|
58
|
-
* @license lucide-react v0.
|
|
57
|
+
*/const _P=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],gf=Et("chevron-down",_P);/**
|
|
58
|
+
* @license lucide-react v0.485.0 - ISC
|
|
59
59
|
*
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const
|
|
63
|
-
* @license lucide-react v0.
|
|
62
|
+
*/const MP=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],DP=Et("chevron-left",MP);/**
|
|
63
|
+
* @license lucide-react v0.485.0 - ISC
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the ISC license.
|
|
66
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const
|
|
68
|
-
* @license lucide-react v0.
|
|
67
|
+
*/const jP=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],vf=Et("chevron-right",jP);/**
|
|
68
|
+
* @license lucide-react v0.485.0 - ISC
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const
|
|
73
|
-
* @license lucide-react v0.
|
|
72
|
+
*/const NP=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Rb=Et("circle-check-big",NP);/**
|
|
73
|
+
* @license lucide-react v0.485.0 - ISC
|
|
74
74
|
*
|
|
75
75
|
* This source code is licensed under the ISC license.
|
|
76
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const
|
|
78
|
-
* @license lucide-react v0.
|
|
77
|
+
*/const FP=[["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"}]],LP=Et("circle-x",FP);/**
|
|
78
|
+
* @license lucide-react v0.485.0 - ISC
|
|
79
79
|
*
|
|
80
80
|
* This source code is licensed under the ISC license.
|
|
81
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const
|
|
83
|
-
* @license lucide-react v0.
|
|
82
|
+
*/const VP=[["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"}]],Pb=Et("file",VP);/**
|
|
83
|
+
* @license lucide-react v0.485.0 - ISC
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the ISC license.
|
|
86
86
|
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const
|
|
88
|
-
* @license lucide-react v0.
|
|
87
|
+
*/const zP=[["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"}]],$P=Et("grip-vertical",zP);/**
|
|
88
|
+
* @license lucide-react v0.485.0 - ISC
|
|
89
89
|
*
|
|
90
90
|
* This source code is licensed under the ISC license.
|
|
91
91
|
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const
|
|
93
|
-
* @license lucide-react v0.
|
|
92
|
+
*/const BP=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Ab=Et("info",BP);/**
|
|
93
|
+
* @license lucide-react v0.485.0 - ISC
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const
|
|
98
|
-
* @license lucide-react v0.
|
|
97
|
+
*/const HP=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]],WP=Et("list-filter",HP);/**
|
|
98
|
+
* @license lucide-react v0.485.0 - ISC
|
|
99
99
|
*
|
|
100
100
|
* This source code is licensed under the ISC license.
|
|
101
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const
|
|
103
|
-
* @license lucide-react v0.
|
|
102
|
+
*/const qP=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],yf=Et("plus",qP);/**
|
|
103
|
+
* @license lucide-react v0.485.0 - ISC
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the ISC license.
|
|
106
106
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const
|
|
108
|
-
* @license lucide-react v0.
|
|
107
|
+
*/const UP=[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],GP=Et("search-check",UP);/**
|
|
108
|
+
* @license lucide-react v0.485.0 - ISC
|
|
109
109
|
*
|
|
110
110
|
* This source code is licensed under the ISC license.
|
|
111
111
|
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const
|
|
113
|
-
* @license lucide-react v0.
|
|
112
|
+
*/const YP=[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],KP=Et("search-x",YP);/**
|
|
113
|
+
* @license lucide-react v0.485.0 - ISC
|
|
114
114
|
*
|
|
115
115
|
* This source code is licensed under the ISC license.
|
|
116
116
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const
|
|
118
|
-
* @license lucide-react v0.
|
|
117
|
+
*/const ZP=[["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"}]],jo=Et("trash-2",ZP);/**
|
|
118
|
+
* @license lucide-react v0.485.0 - ISC
|
|
119
119
|
*
|
|
120
120
|
* This source code is licensed under the ISC license.
|
|
121
121
|
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const
|
|
123
|
-
* @license lucide-react v0.
|
|
122
|
+
*/const XP=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],QP=Et("triangle-alert",XP);/**
|
|
123
|
+
* @license lucide-react v0.485.0 - ISC
|
|
124
124
|
*
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const
|
|
128
|
-
* @license lucide-react v0.
|
|
127
|
+
*/const JP=[["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"}]],eA=Et("ungroup",JP);/**
|
|
128
|
+
* @license lucide-react v0.485.0 - ISC
|
|
129
129
|
*
|
|
130
130
|
* This source code is licensed under the ISC license.
|
|
131
131
|
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const
|
|
133
|
-
* @license lucide-react v0.
|
|
132
|
+
*/const tA=[["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"}]],nA=Et("upload",tA);/**
|
|
133
|
+
* @license lucide-react v0.485.0 - ISC
|
|
134
134
|
*
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const lf=yt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),lp={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},nI={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Vb=e=>w.jsx(ct.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:lp,exit:lp.false,transition:nI,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Me("aria-hidden:pointer-events-none",e.className),children:e.children}),rI=os("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),oI=x.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:s=!0,...i},a){const l=()=>o==null?void 0:o(!1);return w.jsx("div",{"data-open":!!s,"aria-hidden":!s,"data-component":"alert",className:Me("isolate w-full",s?"pointer-events-auto":"pointer-events-none"),children:w.jsx(Vb,{"data-open":!!s,open:!!s,children:w.jsxs(ss,{...i,ref:a,role:"alert","data-theme":n,as:i.as??"div",className:Me(rI({theme:n}),t),children:[w.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?w.jsx(jb,{size:20}):null,!r&&n==="info"?w.jsx(Fb,{size:20}):null,!r&&n==="danger"?w.jsx(Jk,{size:20}):null,r,w.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,o!==void 0&&s?w.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:w.jsx(lf,{size:20})}):null]})})})});function De(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Xe(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function cs(e,t){const n=De(e);return isNaN(t)?Xe(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Tl(e,t){const n=De(e);if(isNaN(t))return Xe(e,NaN);if(!t)return n;const r=n.getDate(),o=Xe(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 $b=6048e5,sI=864e5,iI=6e4,aI=36e5,lI=1e3;let cI={};function Kr(){return cI}function On(e,t){var a,l,c,u;const n=Kr(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=De(e),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Wo(e){return On(e,{weekStartsOn:1})}function Bb(e){const t=De(e),n=t.getFullYear(),r=Xe(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=Wo(r),s=Xe(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=Wo(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function zo(e){const t=De(e);return t.setHours(0,0,0,0),t}function Oa(e){const t=De(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function uI(e,t){const n=zo(e),r=zo(t),o=+n-Oa(n),s=+r-Oa(r);return Math.round((o-s)/sI)}function dI(e){const t=Bb(e),n=Xe(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Wo(n)}function Wb(e,t){const n=t*7;return cs(e,n)}function zb(e,t){return Tl(e,t*12)}function fI(e){return Xe(e,Date.now())}function hI(e,t){const n=zo(e),r=zo(t);return+n==+r}function mI(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Hb(e){if(!mI(e)&&typeof e!="number")return!1;const t=De(e);return!isNaN(Number(t))}function Ub(e,t){const n=De(e.start),r=De(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(De(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function Gb(e){const t=De(e);return t.setDate(1),t.setHours(0,0,0,0),t}function pI(e){const t=De(e),n=Xe(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function gI(e,t){var a,l;const n=Kr(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=De(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 yI={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"}},vI=(e,t,n)=>{let r;const o=yI[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 dc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const bI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},xI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},wI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},SI={date:dc({formats:bI,defaultWidth:"full"}),time:dc({formats:xI,defaultWidth:"full"}),dateTime:dc({formats:wI,defaultWidth:"full"})},TI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},EI=(e,t,n,r)=>TI[e];function Es(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 CI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},RI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},PI={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"]},kI={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"]},II={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"}},AI={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"}},OI=(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"},_I={ordinalNumber:OI,era:Es({values:CI,defaultWidth:"wide"}),quarter:Es({values:RI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Es({values:PI,defaultWidth:"wide"}),day:Es({values:kI,defaultWidth:"wide"}),dayPeriod:Es({values:II,defaultWidth:"wide",formattingValues:AI,defaultFormattingWidth:"wide"})};function Cs(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)?DI(a,d=>d.test(i)):MI(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 MI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function DI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function NI(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 jI=/^(\d+)(th|st|nd|rd)?/i,LI=/\d+/i,FI={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},VI={any:[/^b/i,/^(a|c)/i]},$I={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},BI={any:[/1/i,/2/i,/3/i,/4/i]},WI={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},zI={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]},HI={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},UI={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},GI={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},YI={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}},qI={ordinalNumber:NI({matchPattern:jI,parsePattern:LI,valueCallback:e=>parseInt(e,10)}),era:Cs({matchPatterns:FI,defaultMatchWidth:"wide",parsePatterns:VI,defaultParseWidth:"any"}),quarter:Cs({matchPatterns:$I,defaultMatchWidth:"wide",parsePatterns:BI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Cs({matchPatterns:WI,defaultMatchWidth:"wide",parsePatterns:zI,defaultParseWidth:"any"}),day:Cs({matchPatterns:HI,defaultMatchWidth:"wide",parsePatterns:UI,defaultParseWidth:"any"}),dayPeriod:Cs({matchPatterns:GI,defaultMatchWidth:"any",parsePatterns:YI,defaultParseWidth:"any"})},Yb={code:"en-US",formatDistance:vI,formatLong:SI,formatRelative:EI,localize:_I,match:qI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function KI(e){const t=De(e);return uI(t,pI(t))+1}function qb(e){const t=De(e),n=+Wo(t)-+dI(t);return Math.round(n/$b)+1}function cf(e,t){var u,d,f,h;const n=De(e),r=n.getFullYear(),o=Kr(),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=Xe(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=On(i,t),l=Xe(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=On(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function ZI(e,t){var a,l,c,u;const n=Kr(),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=cf(e,t),s=Xe(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),On(s,t)}function Kb(e,t){const n=De(e),r=+On(n,t)-+ZI(n,t);return Math.round(r/$b)+1}function We(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Zn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return We(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):We(n+1,2)},d(e,t){return We(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 We(e.getHours()%12||12,t.length)},H(e,t){return We(e.getHours(),t.length)},m(e,t){return We(e.getMinutes(),t.length)},s(e,t){return We(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return We(o,t.length)}},ao={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},cp={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 Zn.y(e,t)},Y:function(e,t,n,r){const o=cf(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return We(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):We(s,t.length)},R:function(e,t){const n=Bb(e);return We(n,t.length)},u:function(e,t){const n=e.getFullYear();return We(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 We(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 We(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 Zn.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 We(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=Kb(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):We(o,t.length)},I:function(e,t,n){const r=qb(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):We(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Zn.d(e,t)},D:function(e,t,n){const r=KI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):We(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 We(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 We(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 We(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=ao.noon:r===0?o=ao.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=ao.evening:r>=12?o=ao.afternoon:r>=4?o=ao.morning:o=ao.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 Zn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Zn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):We(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):We(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Zn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Zn.s(e,t)},S:function(e,t){return Zn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return dp(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 dp(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"+up(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"+up(r,":");case"zzzz":default:return"GMT"+Cr(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return We(r,t.length)},T:function(e,t,n){const r=e.getTime();return We(r,t.length)}};function up(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+We(s,2)}function dp(e,t){return e%60===0?(e>0?"-":"+")+We(Math.abs(e)/60,2):Cr(e,t)}function Cr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=We(Math.trunc(r/60),2),s=We(r%60,2);return n+o+t+s}const fp=(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"})}},Zb=(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"})}},XI=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return fp(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}}",fp(r,t)).replace("{{time}}",Zb(o,t))},Eu={p:Zb,P:XI},QI=/^D+$/,JI=/^Y+$/,eA=["D","DD","YY","YYYY"];function Xb(e){return QI.test(e)}function Qb(e){return JI.test(e)}function Cu(e,t,n){const r=tA(e,t,n);if(console.warn(r),eA.includes(e))throw new RangeError(r)}function tA(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 nA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,oA=/^'([^]*?)'?$/,sA=/''/g,iA=/[a-zA-Z]/;function aA(e,t,n){var u,d,f,h;const r=Kr(),o=r.locale??Yb,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=De(e);if(!Hb(a))throw new RangeError("Invalid time value");let l=t.match(rA).map(p=>{const m=p[0];if(m==="p"||m==="P"){const v=Eu[m];return v(p,o.formatLong)}return p}).join("").match(nA).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:lA(p)};if(cp[m])return{isToken:!0,value:p};if(m.match(iA))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;(Qb(m)||Xb(m))&&Cu(m,t,String(e));const v=cp[m[0]];return v(a,m,o.localize,c)}).join("")}function lA(e){const t=e.match(oA);return t?t[1].replace(sA,"'"):e}function cA(){return Object.assign({},Kr())}function uA(e){let n=De(e).getDay();return n===0&&(n=7),n}function dA(e,t){const n=De(e),r=De(t);return n.getTime()>r.getTime()}function fA(e,t){const n=De(e),r=De(t);return+n<+r}function hA(e,t){const n=t instanceof Date?Xe(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 mA=10;class Jb{constructor(){ae(this,"subPriority",0)}validate(t,n){return!0}}class pA extends Jb{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 gA extends Jb{constructor(){super(...arguments);ae(this,"priority",mA);ae(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Xe(n,hA(n,Date))}}class Ne{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new pA(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class yA extends Ne{constructor(){super(...arguments);ae(this,"priority",140);ae(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 mt={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}/},wn={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 pt(e,t){return e&&{value:t(e.value),rest:e.rest}}function ot(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Sn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*aI+s*iI+i*lI),rest:t.slice(n[0].length)}}function e0(e){return ot(mt.anyDigitsSigned,e)}function dt(e,t){switch(e){case 1:return ot(mt.singleDigit,t);case 2:return ot(mt.twoDigits,t);case 3:return ot(mt.threeDigits,t);case 4:return ot(mt.fourDigits,t);default:return ot(new RegExp("^\\d{1,"+e+"}"),t)}}function _a(e,t){switch(e){case 1:return ot(mt.singleDigitSigned,t);case 2:return ot(mt.twoDigitsSigned,t);case 3:return ot(mt.threeDigitsSigned,t);case 4:return ot(mt.fourDigitsSigned,t);default:return ot(new RegExp("^-?\\d{1,"+e+"}"),t)}}function uf(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 t0(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 n0(e){return e%400===0||e%4===0&&e%100!==0}class vA extends Ne{constructor(){super(...arguments);ae(this,"priority",130);ae(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 pt(dt(4,n),s);case"yo":return pt(o.ordinalNumber(n,{unit:"year"}),s);default:return pt(dt(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=t0(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 bA extends Ne{constructor(){super(...arguments);ae(this,"priority",130);ae(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 pt(dt(4,n),s);case"Yo":return pt(o.ordinalNumber(n,{unit:"year"}),s);default:return pt(dt(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=cf(n,s);if(o.isTwoDigitYear){const l=t0(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),On(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),On(n,s)}}class xA extends Ne{constructor(){super(...arguments);ae(this,"priority",130);ae(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return _a(r==="R"?4:r.length,n)}set(n,r,o){const s=Xe(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),Wo(s)}}class wA extends Ne{constructor(){super(...arguments);ae(this,"priority",130);ae(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return _a(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class SA extends Ne{constructor(){super(...arguments);ae(this,"priority",120);ae(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 dt(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 TA extends Ne{constructor(){super(...arguments);ae(this,"priority",120);ae(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 dt(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 EA extends Ne{constructor(){super(...arguments);ae(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ae(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return pt(ot(mt.month,n),s);case"MM":return pt(dt(2,n),s);case"Mo":return pt(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 CA extends Ne{constructor(){super(...arguments);ae(this,"priority",110);ae(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 pt(ot(mt.month,n),s);case"LL":return pt(dt(2,n),s);case"Lo":return pt(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 RA(e,t,n){const r=De(e),o=Kb(r,n)-t;return r.setDate(r.getDate()-o*7),r}class PA extends Ne{constructor(){super(...arguments);ae(this,"priority",100);ae(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return ot(mt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return dt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return On(RA(n,o,s),s)}}function kA(e,t){const n=De(e),r=qb(n)-t;return n.setDate(n.getDate()-r*7),n}class IA extends Ne{constructor(){super(...arguments);ae(this,"priority",100);ae(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 ot(mt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return dt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Wo(kA(n,o))}}const AA=[31,28,31,30,31,30,31,31,30,31,30,31],OA=[31,29,31,30,31,30,31,31,30,31,30,31];class _A extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(this,"subPriority",1);ae(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return ot(mt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return dt(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=n0(o),i=n.getMonth();return s?r>=1&&r<=OA[i]:r>=1&&r<=AA[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class MA extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(this,"subpriority",1);ae(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 ot(mt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return dt(r.length,n)}}validate(n,r){const o=n.getFullYear();return n0(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 df(e,t,n){var d,f,h,p;const r=Kr(),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=De(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 cs(s,u)}class DA extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(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=df(n,o,s),n.setHours(0,0,0,0),n}}class NA extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(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 pt(dt(r.length,n),i);case"eo":return pt(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=df(n,o,s),n.setHours(0,0,0,0),n}}class jA extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(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 pt(dt(r.length,n),i);case"co":return pt(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=df(n,o,s),n.setHours(0,0,0,0),n}}function LA(e,t){const n=De(e),r=uA(n),o=t-r;return cs(n,o)}class FA extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(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 dt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return pt(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 pt(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return pt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return pt(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=LA(n,o),n.setHours(0,0,0,0),n}}class VA extends Ne{constructor(){super(...arguments);ae(this,"priority",80);ae(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(uf(o),0,0,0),n}}class $A extends Ne{constructor(){super(...arguments);ae(this,"priority",80);ae(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(uf(o),0,0,0),n}}class BA extends Ne{constructor(){super(...arguments);ae(this,"priority",80);ae(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(uf(o),0,0,0),n}}class WA extends Ne{constructor(){super(...arguments);ae(this,"priority",70);ae(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return ot(mt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return dt(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 zA extends Ne{constructor(){super(...arguments);ae(this,"priority",70);ae(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return ot(mt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return dt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class HA extends Ne{constructor(){super(...arguments);ae(this,"priority",70);ae(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return ot(mt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return dt(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 UA extends Ne{constructor(){super(...arguments);ae(this,"priority",70);ae(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return ot(mt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return dt(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 GA extends Ne{constructor(){super(...arguments);ae(this,"priority",60);ae(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return ot(mt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return dt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class YA extends Ne{constructor(){super(...arguments);ae(this,"priority",50);ae(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return ot(mt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return dt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class qA extends Ne{constructor(){super(...arguments);ae(this,"priority",30);ae(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return pt(dt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class KA extends Ne{constructor(){super(...arguments);ae(this,"priority",10);ae(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return Sn(wn.basicOptionalMinutes,n);case"XX":return Sn(wn.basic,n);case"XXXX":return Sn(wn.basicOptionalSeconds,n);case"XXXXX":return Sn(wn.extendedOptionalSeconds,n);case"XXX":default:return Sn(wn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Xe(n,n.getTime()-Oa(n)-o)}}class ZA extends Ne{constructor(){super(...arguments);ae(this,"priority",10);ae(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return Sn(wn.basicOptionalMinutes,n);case"xx":return Sn(wn.basic,n);case"xxxx":return Sn(wn.basicOptionalSeconds,n);case"xxxxx":return Sn(wn.extendedOptionalSeconds,n);case"xxx":default:return Sn(wn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Xe(n,n.getTime()-Oa(n)-o)}}class XA extends Ne{constructor(){super(...arguments);ae(this,"priority",40);ae(this,"incompatibleTokens","*")}parse(n){return e0(n)}set(n,r,o){return[Xe(n,o*1e3),{timestampIsSet:!0}]}}class QA extends Ne{constructor(){super(...arguments);ae(this,"priority",20);ae(this,"incompatibleTokens","*")}parse(n){return e0(n)}set(n,r,o){return[Xe(n,o),{timestampIsSet:!0}]}}const JA={G:new yA,y:new vA,Y:new bA,R:new xA,u:new wA,Q:new SA,q:new TA,M:new EA,L:new CA,w:new PA,I:new IA,d:new _A,D:new MA,E:new DA,e:new NA,c:new jA,i:new FA,a:new VA,b:new $A,B:new BA,h:new WA,H:new zA,K:new HA,k:new UA,m:new GA,s:new YA,S:new qA,X:new KA,x:new ZA,t:new XA,T:new QA},eO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nO=/^'([^]*?)'?$/,rO=/''/g,oO=/\S/,sO=/[a-zA-Z]/;function iO(e,t,n,r){var m,v,b,y;const o=cA(),s=o.locale??Yb,i=o.firstWeekContainsDate??((v=(m=o.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??1,a=o.weekStartsOn??((y=(b=o.locale)==null?void 0:b.options)==null?void 0:y.weekStartsOn)??0;if(t==="")return e===""?De(n):Xe(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new gA],u=t.match(tO).map(g=>{const T=g[0];if(T in Eu){const S=Eu[T];return S(g,s.formatLong)}return g}).join("").match(eO),d=[];for(let g of u){Qb(g)&&Cu(g,t,e),Xb(g)&&Cu(g,t,e);const T=g[0],S=JA[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 Xe(n,NaN);c.push(C.setter),e=C.rest}else{if(T.match(sO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(g==="''"?g="'":T==="'"&&(g=aO(g)),e.indexOf(g)===0)e=e.slice(g.length);else return Xe(n,NaN)}}if(e.length>0&&oO.test(e))return Xe(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=De(n);if(isNaN(h.getTime()))return Xe(n,NaN);const p={};for(const g of f){if(!g.validate(h,l))return Xe(n,NaN);const T=g.set(h,p,l);Array.isArray(T)?(h=T[0],Object.assign(p,T[1])):h=T}return Xe(n,h)}function aO(e){return e.match(nO)[1].replace(rO,"'")}function lO(e,t){const n=De(e),r=De(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function cO(e){return hI(e,fI(e))}function uO(e,t){return cs(e,-t)}function r0(e,t){return Tl(e,-t)}function dO(e,t){return Wb(e,-t)}function fO(e,t){return zb(e,-t)}var gt=function(){return gt=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},gt.apply(this,arguments)};function ff(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 Ru(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}var ni=function(e){return e.replace(new RegExp(" ","g")," ")},o0=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)},hO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},s0=function(e,t,n){var r=e.length-2,o=hO(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},i0=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Ma=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},mO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},fc=function(e){var t=x.useRef(e);return x.useEffect(function(){t.current=e},[e]),t},pO=function(e){return e==="money"||e==="currency"},gO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return gt(gt({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Gi=function(e,t){var n=o0(i0(e),t.fraction.length),r="".concat(t.currency).concat(s0(n,t.group,t.decimal));return ni(r)},yO=x.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=ff(e,["locale","currency","currencyDisplay","mask","onChange"]),u=x.useRef(null);x.useImperativeHandle(t,function(){return u.current});var d=x.useMemo(function(){var p=gO(r,s,a);return p.currency=ni("".concat(p.currency.trim()," ")),p.literal=ni(p.literal.trim()),p},[r,s]),f=function(p){var m=Gi(p.target.value,d),v=Ma(m);p.target.value=m,p.target.setAttribute("data-number",v.toString()),l==null||l(p),v!==0&&(u.current.selectionEnd=m.length)};x.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=Gi(p,d),v=Ma(m);u.current.value=m,u.current.setAttribute("data-number",v.toString());var b=new InputEvent("change",{});l==null||l(gt(gt({},b),{target:u.current,currentTarget:u.current})),v!==0&&(u.current.selectionEnd=m.length)}}},[d]);var h=c.defaultValue?Gi(c.defaultValue,d):void 0;return x.createElement("input",gt({},c,{value:typeof c.value=="string"?Gi(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),vO=1,bO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},xO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return gt(gt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Yi=function(e,t){var n=o0(i0(e),t.fraction.length),r="".concat(s0(n,t.group,t.decimal)," ").concat(t.percentSign);return ni(r)},wO=x.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=ff(e,["locale","mask","onChange","onKeyUp"]),a=x.useRef(null),l=Ru(x.useState(function(){var b,y;return(y=(b=i.value)===null||b===void 0?void 0:b.toString())!==null&&y!==void 0?y:""}),2),c=l[0],u=l[1];x.useImperativeHandle(t,function(){return a.current}),x.useEffect(function(){var b,y=Number.parseFloat("".concat((b=i.value)!==null&&b!==void 0?b:"0")).toFixed(d.fraction.length);u(Yi(y,d))},[i.value]);var d=x.useMemo(function(){var b=xO(r);return b.percentSign=ni("".concat(b.percentSign)),b},[r]),f=c.length-d.percentSign.length-vO,h=function(b){var y,g=a.current;g&&(g.setSelectionRange(f,f),b&&((y=i.onFocus)===null||y===void 0||y.call(i,b)))},p=function(b){var y=b.currentTarget;if(y.selectionStart!==null){var g=y.selectionStart,T=y.selectionEnd,S=g!==T,E=f<g;!S&&E&&h()}s==null||s(b)},m=function(b){var y=Yi(b.target.value,d),g=Ma(y);u(y),b.target.value=y,b.target.setAttribute("data-number",g.toString()),o==null||o(b)};x.useEffect(function(){if(a.current!==null){var b=a.current.value;if(b!==""){var y=Yi(b,d),g=Ma(y);u(y),a.current.value=y,a.current.setAttribute("data-number",g.toString());var T=new InputEvent("change",{});o==null||o(gt(gt({},T),{target:a.current,currentTarget:a.current}))}}},[]),x.useEffect(function(){return h()},[c]);var v=i.defaultValue?Yi(i.defaultValue,d):void 0;return x.createElement("input",gt({},i,{defaultValue:v,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),Is={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},SO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=Da[s];i===void 0?r.push(s.replace(Is.dots,"\\.").replace(Is.openParenthesis,"\\(").replace(Is.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Is.leadingBars,"\\")},$s=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Pu(o,n);var s=SO(o);return n?"^".concat(s,"$"):s},TO=function(e){return e.replace(Is.escape,"\\$&")},Pu=function(e,t){var n=e.map(function(r){return typeof r=="string"?TO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Da={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]/}},EO=/\d/,hp="(dd) 9dddd-dddd",mp="(dd) dddd-dddd",pp="ddd.ddd.ddd-dd",gp="dd.ddd.ddd/dddd-dd",ua=function(e){return e.replace(/\D/g,"")},CO=["2",/[0-3]/,":",/[0-5]/,/\d/],RO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Wt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:pp,isoDate:"dddd-dd-dd",cnpj:gp,telephone:mp,cellphone:hp,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ua(e).length<=11?pp:gp},int:function(e){return e===void 0&&(e=""),EO.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=ua(e);return t.length<11?mp:hp},time:function(e){var t=ua(e),n=t[0];return n==="2"?CO:RO}},zt=function(e,t,n){var r;return n===void 0&&(n={}),gt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:$s(e,"",!0),infinity:n.infinity},n)},jt={cellTelephone:zt(Wt.cellTelephone,"tel"),cellphone:zt(Wt.cellphone,"tel"),cep:zt(Wt.cep,"decimal"),cnpj:zt(Wt.cnpj,"decimal"),color:zt(Wt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:zt(Wt.cpf,"decimal"),cpfCnpj:zt(Wt.cpfCnpj,"decimal",{transform:ua}),creditCard:zt(Wt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:zt(Wt.date,"decimal"),int:zt(Wt.int,"decimal",{pattern:"[0-9]+"}),isoDate:zt(Wt.isoDate,"decimal"),telephone:zt(Wt.telephone,"tel"),time:zt(Wt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:zt(Wt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function yp(e,t,n,r){var o,s;r===void 0&&(r=Da);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 vp=function(e){return e},PO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp($s(e,n,t));return r.test(n)};function kO(e){var t=x.useRef(e);return x.useEffect(function(){t.current=e},[e]),t.current}var IO=x.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=ff(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=x.useRef(null);x.useImperativeHandle(t,function(){return p.current});var m=fc(a),v=fc(d),b=fc(u),y=x.useRef(PO(u,s,h.value||h.defaultValue)),g=f??"input",T=Ru(x.useState(""),2),S=T[0],E=T[1],C=kO(S),k=x.useCallback(function(O,j){var D,V,H=(D=O??j)!==null&&D!==void 0?D:"";if(u===void 0)return H;var _=(V=H==null?void 0:H.toString())!==null&&V!==void 0?V:"";return yp(_,typeof u=="function"?u(_):u,i??vp,c??Da)},[i,u,c]),I=Ru(x.useState(function(){return k(h.value,h.defaultValue)}),2),A=I[0],N=I[1],M=k(h.defaultValue,h.defaultValue),L=x.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var O=u(A);return Array.isArray(O)?Pu(O,s):$s(u,A,s)}return typeof u=="string"?$s(u,A,s):Pu(u,s)},[l,A,s,u]);x.useEffect(function(){if(h.value!==void 0){var O=k(h.value,h.defaultValue);N(O),p.current!==null&&(p.current.value=O)}},[h.value,u,i,h.defaultValue]);var P=function(O){var j,D,V,H,_,$=O.currentTarget,K=O.target.value;if(b.current===void 0)return N(K),(j=v.current)===null||j===void 0||j.call(v,K),(D=m.current)===null||D===void 0||D.call(m,O),d==null?void 0:d(K);var re=new RegExp($s(b.current,K,s)),ee=(V=$.selectionEnd)!==null&&V!==void 0?V:0,G=function(Q,ue,U){if(Q.type!=="number")return Q.setSelectionRange(ue,U)};if(r&&y.current&&K.length>=A.length)return $.value=A,G($,ee-1,ee-1);var F=!1;K.length<C.length&&(y.current=!1,F=!0),re.test(K)&&(y.current=!0);var B=ee,z=K[B-1],Y=yp(K,typeof b.current=="function"?b.current(K):b.current,i??vp,c??Da);for($.value=Y,N(Y);B<Y.length&&Y.charAt(B-1)!==z;)B+=1;F?G($,ee,ee):G($,B,B),O.target.value=Y,E(Y),(H=v.current)===null||H===void 0||H.call(v,Y),(_=m.current)===null||_===void 0||_.call(m,O)};return x.createElement(g,gt({},h,{ref:p,pattern:L,onChange:P,defaultValue:bp(h.defaultValue)?M:void 0,value:bp(h.value)?k(h.value,h.value):h.value}))}),bp=function(e){return typeof e=="string"},a0=x.forwardRef(function(e,t){return pO(e.mask)?x.createElement(yO,gt({},e,{mask:void 0,ref:t})):bO(e.mask)?x.createElement(wO,gt({},e,{mask:void 0,ref:t})):x.createElement(IO,gt({},e,{ref:t}))}),Gt=function(e){return function(t){return x.createElement(a0,gt({},e,t))}};Gt(jt.cellTelephone);Gt(jt.cellphone);Gt(jt.cep);Gt(jt.cnpj);Gt(jt.color);Gt(jt.cpf);Gt(jt.cpfCnpj);Gt(jt.creditCard);Gt(jt.date);Gt(jt.int);Gt(jt.isoDate);Gt(jt.telephone);Gt(jt.time);Gt(jt.uuid);var l0=x.forwardRef(function(t,n){var r=x.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&mO(jt,t.mask)?jt[t.mask]:{mask:t.mask}},[t.mask]),o=gt(gt({},t),r);return x.createElement(a0,gt({},o,{ref:n}))}),hc={},mc={exports:{}},pc={};/**
|
|
137
|
+
*/const rA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xf=Et("x",rA),Gm={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},oA={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Ib=e=>x.jsx(vt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:Gm,exit:Gm.false,transition:oA,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:ze("aria-hidden:pointer-events-none",e.className),children:e.children}),iA=Xo("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),aA=E.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o==null?void 0:o(!1);return x.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:ze("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:x.jsx(Ib,{"data-open":!!i,open:!!i,children:x.jsxs(cn,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:ze(iA({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(Rb,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?x.jsx(Ab,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?x.jsx(QP,{"aria-hidden":"true",size:20}):null,r,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?x.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:x.jsx(xf,{size:20})}):null]})})})}),Ob=6048e5,sA=864e5,lA=6e4,cA=36e5,uA=1e3,Ym=Symbol.for("constructDateFrom");function nt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ym in e?e[Ym](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ze(e,t){return nt(t||e,e)}function il(e,t,n){const r=Ze(e,n==null?void 0:n.in);return isNaN(t)?nt((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function _b(e,t,n){const r=Ze(e,n==null?void 0:n.in);if(isNaN(t))return nt(e,NaN);if(!t)return r;const o=r.getDate(),i=nt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function wo(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=Ze(e,n==null?void 0:n.in),d=o||r?_b(u,o+r*12):u,p=a||i?il(d,a+i*7):d,f=l+s*60,y=(c+f*60)*1e3;return nt(e,+p+y)}let dA={};function Qr(){return dA}function jn(e,t){var s,l,c,u;const n=Qr(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Ze(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function No(e,t){return jn(e,{...t,weekStartsOn:1})}function Mb(e,t){const n=Ze(e,t==null?void 0:t.in),r=n.getFullYear(),o=nt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=No(o),a=nt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=No(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function ds(e){const t=Ze(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 al(e,...t){const n=nt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Fo(e,t){const n=Ze(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function fA(e,t,n){const[r,o]=al(n==null?void 0:n.in,e,t),i=Fo(r),a=Fo(o),s=+i-ds(i),l=+a-ds(a);return Math.round((s-l)/sA)}function pA(e,t){const n=Mb(e,t),r=nt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),No(r)}function hA(e){return nt(e,Date.now())}function mA(e,t,n){const[r,o]=al(n==null?void 0:n.in,e,t);return+Fo(r)==+Fo(o)}function gA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Db(e){return!(!gA(e)&&typeof e!="number"||isNaN(+Ze(e)))}function vA(e,t){const[n,r]=al(e,t.start,t.end);return{start:n,end:r}}function jb(e,t){const{start:n,end:r}=vA(t==null?void 0:t.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0);let s=1;const l=[];for(;+a<=i;)l.push(nt(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function Nb(e,t){const n=Ze(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function yA(e,t){const n=Ze(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function xA(e,t){var s,l;const n=Qr(),r=n.weekStartsOn??((l=(s=n.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=Ze(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}const bA={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"}},wA=(e,t,n)=>{let r;const o=bA[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 _c(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const TA={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},SA={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},EA={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},CA={date:_c({formats:TA,defaultWidth:"full"}),time:_c({formats:SA,defaultWidth:"full"}),dateTime:_c({formats:EA,defaultWidth:"full"})},kA={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},RA=(e,t,n,r)=>kA[e];function gi(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const PA={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},AA={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},IA={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"]},OA={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"]},_A={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"}},MA={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"}},DA=(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"},jA={ordinalNumber:DA,era:gi({values:PA,defaultWidth:"wide"}),quarter:gi({values:AA,defaultWidth:"wide",argumentCallback:e=>e-1}),month:gi({values:IA,defaultWidth:"wide"}),day:gi({values:OA,defaultWidth:"wide"}),dayPeriod:gi({values:_A,defaultWidth:"wide",formattingValues:MA,defaultFormattingWidth:"wide"})};function vi(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?FA(s,d=>d.test(a)):NA(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function NA(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function FA(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function LA(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(o.length);return{value:a,rest:s}}}const VA=/^(\d+)(th|st|nd|rd)?/i,zA=/\d+/i,$A={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},BA={any:[/^b/i,/^(a|c)/i]},HA={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},WA={any:[/1/i,/2/i,/3/i,/4/i]},qA={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},UA={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]},GA={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},YA={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]},KA={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},ZA={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}},XA={ordinalNumber:LA({matchPattern:VA,parsePattern:zA,valueCallback:e=>parseInt(e,10)}),era:vi({matchPatterns:$A,defaultMatchWidth:"wide",parsePatterns:BA,defaultParseWidth:"any"}),quarter:vi({matchPatterns:HA,defaultMatchWidth:"wide",parsePatterns:WA,defaultParseWidth:"any",valueCallback:e=>e+1}),month:vi({matchPatterns:qA,defaultMatchWidth:"wide",parsePatterns:UA,defaultParseWidth:"any"}),day:vi({matchPatterns:GA,defaultMatchWidth:"wide",parsePatterns:YA,defaultParseWidth:"any"}),dayPeriod:vi({matchPatterns:KA,defaultMatchWidth:"any",parsePatterns:ZA,defaultParseWidth:"any"})},Fb={code:"en-US",formatDistance:wA,formatLong:CA,formatRelative:RA,localize:jA,match:XA,options:{weekStartsOn:0,firstWeekContainsDate:1}};function QA(e,t){const n=Ze(e,t==null?void 0:t.in);return fA(n,yA(n))+1}function Lb(e,t){const n=Ze(e,t==null?void 0:t.in),r=+No(n)-+pA(n);return Math.round(r/Ob)+1}function bf(e,t){var u,d,p,f;const n=Ze(e,t==null?void 0:t.in),r=n.getFullYear(),o=Qr(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(p=o.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,a=nt((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=jn(a,t),l=nt((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=jn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function JA(e,t){var s,l,c,u;const n=Qr(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=bf(e,t),i=nt((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),jn(i,t)}function Vb(e,t){const n=Ze(e,t==null?void 0:t.in),r=+jn(n,t)-+JA(n,t);return Math.round(r/Ob)+1}function Ye(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const rr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ye(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ye(n+1,2)},d(e,t){return Ye(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 Ye(e.getHours()%12||12,t.length)},H(e,t){return Ye(e.getHours(),t.length)},m(e,t){return Ye(e.getMinutes(),t.length)},s(e,t){return Ye(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ye(o,t.length)}},co={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Km={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 rr.y(e,t)},Y:function(e,t,n,r){const o=bf(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return Ye(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ye(i,t.length)},R:function(e,t){const n=Mb(e);return Ye(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ye(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 Ye(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 Ye(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 rr.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 Ye(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=Vb(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ye(o,t.length)},I:function(e,t,n){const r=Lb(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ye(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):rr.d(e,t)},D:function(e,t,n){const r=QA(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ye(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Ye(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Ye(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Ye(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=co.noon:r===0?o=co.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=co.evening:r>=12?o=co.afternoon:r>=4?o=co.morning:o=co.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 rr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):rr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ye(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ye(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):rr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):rr.s(e,t)},S:function(e,t){return rr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Xm(r);case"XXXX":case"XX":return _r(r);case"XXXXX":case"XXX":default:return _r(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Xm(r);case"xxxx":case"xx":return _r(r);case"xxxxx":case"xxx":default:return _r(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Zm(r,":");case"OOOO":default:return"GMT"+_r(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Zm(r,":");case"zzzz":default:return"GMT"+_r(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ye(r,t.length)},T:function(e,t,n){return Ye(+e,t.length)}};function Zm(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+Ye(i,2)}function Xm(e,t){return e%60===0?(e>0?"-":"+")+Ye(Math.abs(e)/60,2):_r(e,t)}function _r(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ye(Math.trunc(r/60),2),i=Ye(r%60,2);return n+o+t+i}const Qm=(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"})}},zb=(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"})}},eI=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Qm(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Qm(r,t)).replace("{{time}}",zb(o,t))},qu={p:zb,P:eI},tI=/^D+$/,nI=/^Y+$/,rI=["D","DD","YY","YYYY"];function $b(e){return tI.test(e)}function Bb(e){return nI.test(e)}function Uu(e,t,n){const r=oI(e,t,n);if(console.warn(r),rI.includes(e))throw new RangeError(r)}function oI(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 iI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,aI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,sI=/^'([^]*?)'?$/,lI=/''/g,cI=/[a-zA-Z]/;function uI(e,t,n){var u,d,p,f;const r=Qr(),o=r.locale??Fb,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,a=r.weekStartsOn??((f=(p=r.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??0,s=Ze(e,n==null?void 0:n.in);if(!Db(s))throw new RangeError("Invalid time value");let l=t.match(aI).map(h=>{const y=h[0];if(y==="p"||y==="P"){const m=qu[y];return m(h,o.formatLong)}return h}).join("").match(iI).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const y=h[0];if(y==="'")return{isToken:!1,value:dI(h)};if(Km[y])return{isToken:!0,value:h};if(y.match(cI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:h}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(h=>{if(!h.isToken)return h.value;const y=h.value;(Bb(y)||$b(y))&&Uu(y,t,String(e));const m=Km[y[0]];return m(s,y,o.localize,c)}).join("")}function dI(e){const t=e.match(sI);return t?t[1].replace(lI,"'"):e}function fI(){return Object.assign({},Qr())}function pI(e,t){const n=Ze(e,t==null?void 0:t.in).getDay();return n===0?7:n}function hI(e,t){return+Ze(e)>+Ze(t)}function mI(e,t){return+Ze(e)<+Ze(t)}function gI(e,t){const n=vI(t)?new t(0):nt(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function vI(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const yI=10;class Hb{constructor(){de(this,"subPriority",0)}validate(t,n){return!0}}class xI extends Hb{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class bI extends Hb{constructor(n,r){super();de(this,"priority",yI);de(this,"subPriority",-1);this.context=n||(o=>nt(r,o))}set(n,r){return r.timestampIsSet?n:nt(n,gI(n,this.context))}}class He{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new xI(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class wI extends He{constructor(){super(...arguments);de(this,"priority",140);de(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 wt={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}/},kn={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 Tt(e,t){return e&&{value:t(e.value),rest:e.rest}}function ft(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Rn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*cA+i*lA+a*uA),rest:t.slice(n[0].length)}}function Wb(e){return ft(wt.anyDigitsSigned,e)}function yt(e,t){switch(e){case 1:return ft(wt.singleDigit,t);case 2:return ft(wt.twoDigits,t);case 3:return ft(wt.threeDigits,t);case 4:return ft(wt.fourDigits,t);default:return ft(new RegExp("^\\d{1,"+e+"}"),t)}}function fs(e,t){switch(e){case 1:return ft(wt.singleDigitSigned,t);case 2:return ft(wt.twoDigitsSigned,t);case 3:return ft(wt.threeDigitsSigned,t);case 4:return ft(wt.fourDigitsSigned,t);default:return ft(new RegExp("^-?\\d{1,"+e+"}"),t)}}function wf(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 qb(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,a=Math.trunc(i/100)*100,s=e>=i%100;o=e+a-(s?100:0)}return n?o:1-o}function Ub(e){return e%400===0||e%4===0&&e%100!==0}class TI extends He{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="yy"});switch(r){case"y":return Tt(yt(4,n),i);case"yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(yt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const s=qb(o.year,i);return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}}class SI extends He{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="YY"});switch(r){case"Y":return Tt(yt(4,n),i);case"Yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(yt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const a=bf(n,i);if(o.isTwoDigitYear){const l=qb(o.year,a);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),jn(n,i)}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),jn(n,i)}}class EI extends He{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return fs(r==="R"?4:r.length,n)}set(n,r,o){const i=nt(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),No(i)}}class CI extends He{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return fs(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class kI extends He{constructor(){super(...arguments);de(this,"priority",120);de(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 yt(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 RI extends He{constructor(){super(...arguments);de(this,"priority",120);de(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 yt(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 PI extends He{constructor(){super(...arguments);de(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);de(this,"priority",110)}parse(n,r,o){const i=a=>a-1;switch(r){case"M":return Tt(ft(wt.month,n),i);case"MM":return Tt(yt(2,n),i);case"Mo":return Tt(o.ordinalNumber(n,{unit:"month"}),i);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class AI extends He{constructor(){super(...arguments);de(this,"priority",110);de(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const i=a=>a-1;switch(r){case"L":return Tt(ft(wt.month,n),i);case"LL":return Tt(yt(2,n),i);case"Lo":return Tt(o.ordinalNumber(n,{unit:"month"}),i);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function II(e,t,n){const r=Ze(e,n==null?void 0:n.in),o=Vb(r,n)-t;return r.setDate(r.getDate()-o*7),Ze(r,n==null?void 0:n.in)}class OI extends He{constructor(){super(...arguments);de(this,"priority",100);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return ft(wt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return jn(II(n,o,i),i)}}function _I(e,t,n){const r=Ze(e,n==null?void 0:n.in),o=Lb(r,n)-t;return r.setDate(r.getDate()-o*7),r}class MI extends He{constructor(){super(...arguments);de(this,"priority",100);de(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 ft(wt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return No(_I(n,o))}}const DI=[31,28,31,30,31,30,31,31,30,31,30,31],jI=[31,29,31,30,31,30,31,31,30,31,30,31];class NI extends He{constructor(){super(...arguments);de(this,"priority",90);de(this,"subPriority",1);de(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return ft(wt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return yt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=Ub(o),a=n.getMonth();return i?r>=1&&r<=jI[a]:r>=1&&r<=DI[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class FI extends He{constructor(){super(...arguments);de(this,"priority",90);de(this,"subpriority",1);de(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 ft(wt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return yt(r.length,n)}}validate(n,r){const o=n.getFullYear();return Ub(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 Tf(e,t,n){var d,p,f,h;const r=Qr(),o=(n==null?void 0:n.weekStartsOn)??((p=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,i=Ze(e,n==null?void 0:n.in),a=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(a+c)%7:(l+c)%7-(a+c)%7;return il(i,u,n)}class LI extends He{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Tf(n,o,i),n.setHours(0,0,0,0),n}}class VI extends He{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,i){const a=s=>{const l=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return Tt(yt(r.length,n),a);case"eo":return Tt(o.ordinalNumber(n,{unit:"day"}),a);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Tf(n,o,i),n.setHours(0,0,0,0),n}}class zI extends He{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,i){const a=s=>{const l=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return Tt(yt(r.length,n),a);case"co":return Tt(o.ordinalNumber(n,{unit:"day"}),a);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Tf(n,o,i),n.setHours(0,0,0,0),n}}function $I(e,t,n){const r=Ze(e,n==null?void 0:n.in),o=pI(r,n),i=t-o;return il(r,i,n)}class BI extends He{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const i=a=>a===0?7:a;switch(r){case"i":case"ii":return yt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return Tt(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiii":return Tt(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Tt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return Tt(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=$I(n,o),n.setHours(0,0,0,0),n}}class HI extends He{constructor(){super(...arguments);de(this,"priority",80);de(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(wf(o),0,0,0),n}}class WI extends He{constructor(){super(...arguments);de(this,"priority",80);de(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(wf(o),0,0,0),n}}class qI extends He{constructor(){super(...arguments);de(this,"priority",80);de(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(wf(o),0,0,0),n}}class UI extends He{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return ft(wt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class GI extends He{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return ft(wt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class YI extends He{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return ft(wt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return yt(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 KI extends He{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return ft(wt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return yt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class ZI extends He{constructor(){super(...arguments);de(this,"priority",60);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return ft(wt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class XI extends He{constructor(){super(...arguments);de(this,"priority",50);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return ft(wt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return yt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class QI extends He{constructor(){super(...arguments);de(this,"priority",30);de(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return Tt(yt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class JI extends He{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return Rn(kn.basicOptionalMinutes,n);case"XX":return Rn(kn.basic,n);case"XXXX":return Rn(kn.basicOptionalSeconds,n);case"XXXXX":return Rn(kn.extendedOptionalSeconds,n);case"XXX":default:return Rn(kn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:nt(n,n.getTime()-ds(n)-o)}}class eO extends He{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return Rn(kn.basicOptionalMinutes,n);case"xx":return Rn(kn.basic,n);case"xxxx":return Rn(kn.basicOptionalSeconds,n);case"xxxxx":return Rn(kn.extendedOptionalSeconds,n);case"xxx":default:return Rn(kn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:nt(n,n.getTime()-ds(n)-o)}}class tO extends He{constructor(){super(...arguments);de(this,"priority",40);de(this,"incompatibleTokens","*")}parse(n){return Wb(n)}set(n,r,o){return[nt(n,o*1e3),{timestampIsSet:!0}]}}class nO extends He{constructor(){super(...arguments);de(this,"priority",20);de(this,"incompatibleTokens","*")}parse(n){return Wb(n)}set(n,r,o){return[nt(n,o),{timestampIsSet:!0}]}}const rO={G:new wI,y:new TI,Y:new SI,R:new EI,u:new CI,Q:new kI,q:new RI,M:new PI,L:new AI,w:new OI,I:new MI,d:new NI,D:new FI,E:new LI,e:new VI,c:new zI,i:new BI,a:new HI,b:new WI,B:new qI,h:new UI,H:new GI,K:new YI,k:new KI,m:new ZI,s:new XI,S:new QI,X:new JI,x:new eO,t:new tO,T:new nO},oO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,iO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,aO=/^'([^]*?)'?$/,sO=/''/g,lO=/\S/,cO=/[a-zA-Z]/;function uO(e,t,n,r){var m,v,g,b;const o=()=>nt(n,NaN),i=fI(),a=i.locale??Fb,s=i.firstWeekContainsDate??((v=(m=i.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??1,l=i.weekStartsOn??((b=(g=i.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)??0;if(!t)return e?o():Ze(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new bI(r==null?void 0:r.in,n)],d=t.match(iO).map(S=>{const T=S[0];if(T in qu){const w=qu[T];return w(S,a.formatLong)}return S}).join("").match(oO),p=[];for(let S of d){Bb(S)&&Uu(S,t,e),$b(S)&&Uu(S,t,e);const T=S[0],w=rO[T];if(w){const{incompatibleTokens:C}=w;if(Array.isArray(C)){const I=p.find(P=>C.includes(P.token)||P.token===T);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${S}\` at the same time`)}else if(w.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${S}\` and any other token at the same time`);p.push({token:T,fullToken:S});const R=w.run(e,S,a.match,c);if(!R)return o();u.push(R.setter),e=R.rest}else{if(T.match(cO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(S==="''"?S="'":T==="'"&&(S=dO(S)),e.indexOf(S)===0)e=e.slice(S.length);else return o()}}if(e.length>0&&lO.test(e))return o();const f=u.map(S=>S.priority).sort((S,T)=>T-S).filter((S,T,w)=>w.indexOf(S)===T).map(S=>u.filter(T=>T.priority===S).sort((T,w)=>w.subPriority-T.subPriority)).map(S=>S[0]);let h=Ze(n,r==null?void 0:r.in);if(isNaN(+h))return o();const y={};for(const S of f){if(!S.validate(h,c))return o();const T=S.set(h,y,c);Array.isArray(T)?(h=T[0],Object.assign(y,T[1])):h=T}return h}function dO(e){return e.match(aO)[1].replace(sO,"'")}function fO(e,t,n){const[r,o]=al(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function pO(e,t){return mA(nt(e,e),hA(e))}function hO(e,t,n){return il(e,-t,n)}function mO(e,t,n){const r=Ze(e,n==null?void 0:n.in);return isNaN(+r)?nt(e,NaN):(r.setFullYear(t),r)}function gO(e,t,n){return _b(e,-t,n)}function wi(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=gO(e,o+r*12,n),d=hO(u,a+i*7,n),p=l+s*60,h=(c+p*60)*1e3;return nt(e,+d-h)}var St=function(){return St=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},St.apply(this,arguments)};function Sf(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 Gu(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}var Ki=function(e){return e.replace(new RegExp(" ","g")," ")},Gb=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)},vO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Yb=function(e,t,n){var r=e.length-2,o=vO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Kb=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ps=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},yO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Mc=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},xO=function(e){return e==="money"||e==="currency"},bO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return St(St({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Ma=function(e,t){var n=Gb(Kb(e),t.fraction.length),r="".concat(t.currency).concat(Yb(n,t.group,t.decimal));return Ki(r)},wO=E.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,a=e.currencyDisplay,s=a===void 0?"symbol":a;e.mask;var l=e.onChange,c=Sf(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var h=bO(r,i,s);return h.currency=Ki("".concat(h.currency.trim()," ")),h.literal=Ki(h.literal.trim()),h},[r,i]),p=function(h){var y=Ma(h.target.value,d),m=ps(y);h.target.value=y,h.target.setAttribute("data-number",m.toString()),l==null||l(h),m!==0&&(u.current.selectionEnd=y.length)};E.useEffect(function(){if(u.current!==null){var h=u.current.value;if(h!==""){var y=Ma(h,d),m=ps(y);u.current.value=y,u.current.setAttribute("data-number",m.toString());var v=new InputEvent("change",{});l==null||l(St(St({},v),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=y.length)}}},[d]);var f=c.defaultValue?Ma(c.defaultValue,d):void 0;return E.createElement("input",St({},c,{value:typeof c.value=="string"?Ma(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),TO=1,SO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},EO=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:""})},Da=function(e,t){var n=Gb(Kb(e),t.fraction.length),r="".concat(Yb(n,t.group,t.decimal)," ").concat(t.percentSign);return Ki(r)},CO=E.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,a=Sf(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),l=Gu(E.useState(function(){var v,g;return(g=(v=a.value)===null||v===void 0?void 0:v.toString())!==null&&g!==void 0?g:""}),2),c=l[0],u=l[1];E.useImperativeHandle(t,function(){return s.current}),E.useEffect(function(){var v,g=Number.parseFloat("".concat((v=a.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(Da(g,d))},[a.value]);var d=E.useMemo(function(){var v=EO(r);return v.percentSign=Ki("".concat(v.percentSign)),v},[r]),p=c.length-d.percentSign.length-TO,f=function(v){var g,b=s.current;b&&(b.setSelectionRange(p,p),v&&((g=a.onFocus)===null||g===void 0||g.call(a,v)))},h=function(v){var g=v.currentTarget;if(g.selectionStart!==null){var b=g.selectionStart,S=g.selectionEnd,T=b!==S,w=p<b;!T&&w&&f()}i==null||i(v)},y=function(v){var g=Da(v.target.value,d),b=ps(g);u(g),v.target.value=g,v.target.setAttribute("data-number",b.toString()),o==null||o(v)};E.useEffect(function(){if(s.current!==null){var v=s.current.value;if(v!==""){var g=Da(v,d),b=ps(g);u(g),s.current.value=g,s.current.setAttribute("data-number",b.toString());var S=new InputEvent("change",{});o==null||o(St(St({},S),{target:s.current,currentTarget:s.current}))}}},[]),E.useEffect(function(){return f()},[c]);var m=a.defaultValue?Da(a.defaultValue,d):void 0;return E.createElement("input",St({},a,{defaultValue:m,inputMode:"decimal",onChange:y,onFocus:f,onKeyUp:h,ref:s,type:"text"}))}),Ti={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},kO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=hs[i];a===void 0?r.push(i.replace(Ti.dots,"\\.").replace(Ti.openParenthesis,"\\(").replace(Ti.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ti.leadingBars,"\\")},_i=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Yu(o,n);var i=kO(o);return n?"^".concat(i,"$"):i},RO=function(e){return e.replace(Ti.escape,"\\$&")},Yu=function(e,t){var n=e.map(function(r){return typeof r=="string"?RO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},hs={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]/}},PO=/\d/,Jm="(dd) 9dddd-dddd",eg="(dd) dddd-dddd",tg="ddd.ddd.ddd-dd",ng="dd.ddd.ddd/dddd-dd",Ja=function(e){return e.replace(/\D/g,"")},AO=["2",/[0-3]/,":",/[0-5]/,/\d/],IO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],qt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:tg,isoDate:"dddd-dd-dd",cnpj:ng,telephone:eg,cellphone:Jm,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Ja(e).length<=11?tg:ng},int:function(e){return e===void 0&&(e=""),PO.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=Ja(e);return t.length<11?eg:Jm},time:function(e){var t=Ja(e),n=t[0];return n==="2"?AO:IO}},Ut=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:_i(e,"",!0),infinity:n.infinity},n)},zt={cellTelephone:Ut(qt.cellTelephone,"tel"),cellphone:Ut(qt.cellphone,"tel"),cep:Ut(qt.cep,"decimal"),cnpj:Ut(qt.cnpj,"decimal"),color:Ut(qt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Ut(qt.cpf,"decimal"),cpfCnpj:Ut(qt.cpfCnpj,"decimal",{transform:Ja}),creditCard:Ut(qt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Ut(qt.date,"decimal"),int:Ut(qt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Ut(qt.isoDate,"decimal"),telephone:Ut(qt.telephone,"tel"),time:Ut(qt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Ut(qt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function rg(e,t,n,r){var o,i;r===void 0&&(r=hs);for(var a=n(e),s="",l=0,c=0;l<t.length&&c<a.length;){var u=t[l],d=u instanceof RegExp?u:r[u],p=a[c];if(d===void 0){s+=u,p===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(p)&&(s+=(i=(o=f.parse)===null||o===void 0?void 0:o.call(f,p))!==null&&i!==void 0?i:p),c+=1,l+=1}return s}var og=function(e){return e},OO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(_i(e,n,t));return r.test(n)};function _O(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var MO=E.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,a=e.transform,s=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,p=e.as,f=Sf(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),h=E.useRef(null);E.useImperativeHandle(t,function(){return h.current});var y=Mc(s),m=Mc(d),v=Mc(u),g=E.useRef(OO(u,i,f.value||f.defaultValue)),b=p??"input",S=Gu(E.useState(""),2),T=S[0],w=S[1],C=_O(T),R=E.useCallback(function(M,D){var L,_,z=(L=M??D)!==null&&L!==void 0?L:"";if(u===void 0)return z;var O=(_=z==null?void 0:z.toString())!==null&&_!==void 0?_:"";return rg(O,typeof u=="function"?u(O):u,a??og,c??hs)},[a,u,c]),I=Gu(E.useState(function(){return R(f.value,f.defaultValue)}),2),P=I[0],j=I[1],N=R(f.defaultValue,f.defaultValue),V=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var M=u(P);return Array.isArray(M)?Yu(M,i):_i(u,P,i)}return typeof u=="string"?_i(u,P,i):Yu(u,i)},[l,P,i,u]);E.useEffect(function(){if(f.value!==void 0){var M=R(f.value,f.defaultValue);j(M),h.current!==null&&(h.current.value=M)}},[f.value,u,a,f.defaultValue]);var k=function(M){var D,L,_,z,O,B=M.currentTarget,Q=M.target.value;if(v.current===void 0)return j(Q),(D=m.current)===null||D===void 0||D.call(m,Q),(L=y.current)===null||L===void 0||L.call(y,M),d==null?void 0:d(Q);var re=new RegExp(_i(v.current,Q,i)),J=(_=B.selectionEnd)!==null&&_!==void 0?_:0,K=function(Z,oe,$){if(Z.type!=="number")return Z.setSelectionRange(oe,$)};if(r&&g.current&&Q.length>=P.length)return B.value=P,K(B,J-1,J-1);var U=!1;Q.length<C.length&&(g.current=!1,U=!0),re.test(Q)&&(g.current=!0);var Y=J,F=Q[Y-1],W=rg(Q,typeof v.current=="function"?v.current(Q):v.current,a??og,c??hs);for(B.value=W,j(W);Y<W.length&&W.charAt(Y-1)!==F;)Y+=1;U?K(B,J,J):K(B,Y,Y),M.target.value=W,w(W),(z=m.current)===null||z===void 0||z.call(m,W),(O=y.current)===null||O===void 0||O.call(y,M)};return E.createElement(b,St({},f,{ref:h,pattern:V,onChange:k,defaultValue:ig(f.defaultValue)?N:void 0,value:ig(f.value)?R(f.value,f.value):f.value}))}),ig=function(e){return typeof e=="string"},Zb=E.forwardRef(function(e,t){return xO(e.mask)?E.createElement(wO,St({},e,{mask:void 0,ref:t})):SO(e.mask)?E.createElement(CO,St({},e,{mask:void 0,ref:t})):E.createElement(MO,St({},e,{ref:t}))}),Kt=function(e){return function(t){return E.createElement(Zb,St({},e,t))}};Kt(zt.cellTelephone);Kt(zt.cellphone);Kt(zt.cep);Kt(zt.cnpj);Kt(zt.color);Kt(zt.cpf);Kt(zt.cpfCnpj);Kt(zt.creditCard);Kt(zt.date);Kt(zt.int);Kt(zt.isoDate);Kt(zt.telephone);Kt(zt.time);Kt(zt.uuid);var Xb=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&yO(zt,t.mask)?zt[t.mask]:{mask:t.mask}},[t.mask]),o=St(St({},t),r);return E.createElement(Zb,St({},o,{ref:n}))}),ja={exports:{}},Dc={},Na={exports:{}},jc={};/**
|
|
138
138
|
* @license React
|
|
139
|
-
* use-sync-external-store-shim.production.
|
|
139
|
+
* use-sync-external-store-shim.production.js
|
|
140
140
|
*
|
|
141
|
-
* Copyright (c)
|
|
141
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
142
142
|
*
|
|
143
143
|
* This source code is licensed under the MIT license found in the
|
|
144
144
|
* LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/var
|
|
145
|
+
*/var ag;function DO(){if(ag)return jc;ag=1;var e=E;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,p){var f=p(),h=r({inst:{value:f,getSnapshot:p}}),y=h[0].inst,m=h[1];return i(function(){y.value=f,y.getSnapshot=p,l(y)&&m({inst:y})},[d,f,p]),o(function(){return l(y)&&m({inst:y}),d(function(){l(y)&&m({inst:y})})},[d]),a(f),f}function l(d){var p=d.getSnapshot;d=d.value;try{var f=p();return!n(d,f)}catch{return!0}}function c(d,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return jc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,jc}var Nc={};/**
|
|
146
146
|
* @license React
|
|
147
147
|
* use-sync-external-store-shim.development.js
|
|
148
148
|
*
|
|
149
|
-
* Copyright (c)
|
|
149
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
150
150
|
*
|
|
151
151
|
* This source code is licensed under the MIT license found in the
|
|
152
152
|
* LICENSE file in the root directory of this source tree.
|
|
153
|
-
*/var
|
|
153
|
+
*/var sg;function jO(){return sg||(sg=1,process.env.NODE_ENV!=="production"&&function(){function e(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}function t(f,h){u||o.startTransition===void 0||(u=!0,console.error("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 y=h();if(!d){var m=h();i(y,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}m=a({inst:{value:y,getSnapshot:h}});var v=m[0].inst,g=m[1];return l(function(){v.value=y,v.getSnapshot=h,n(v)&&g({inst:v})},[f,y,h]),s(function(){return n(v)&&g({inst:v}),f(function(){n(v)&&g({inst:v})})},[f]),c(y),y}function n(f){var h=f.getSnapshot;f=f.value;try{var y=h();return!i(f,y)}catch{return!0}}function r(f,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=E,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Nc.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Nc}var lg;function Qb(){return lg||(lg=1,process.env.NODE_ENV==="production"?Na.exports=DO():Na.exports=jO()),Na.exports}/**
|
|
154
154
|
* @license React
|
|
155
|
-
* use-sync-external-store-shim/with-selector.production.
|
|
155
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
156
156
|
*
|
|
157
|
-
* Copyright (c)
|
|
157
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
158
158
|
*
|
|
159
159
|
* This source code is licensed under the MIT license found in the
|
|
160
160
|
* LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/var
|
|
161
|
+
*/var cg;function NO(){if(cg)return Dc;cg=1;var e=E,t=Qb();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Dc.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var h=i(null);if(h.current===null){var y={hasValue:!1,value:null};h.current=y}else y=h.current;h=s(function(){function v(w){if(!g){if(g=!0,b=w,w=p(w),f!==void 0&&y.hasValue){var C=y.value;if(f(C,w))return S=C}return S=w}if(C=S,r(b,w))return C;var R=p(w);return f!==void 0&&f(C,R)?(b=w,C):(b=w,S=R)}var g=!1,b,S,T=d===void 0?null:d;return[function(){return v(u())},T===null?void 0:function(){return v(T())}]},[u,d,p,f]);var m=o(c,h[0],h[1]);return a(function(){y.hasValue=!0,y.value=m},[m]),l(m),m},Dc}var Fc={};/**
|
|
162
162
|
* @license React
|
|
163
163
|
* use-sync-external-store-shim/with-selector.development.js
|
|
164
164
|
*
|
|
165
|
-
* Copyright (c)
|
|
165
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
166
166
|
*
|
|
167
167
|
* This source code is licensed under the MIT license found in the
|
|
168
168
|
* LICENSE file in the root directory of this source tree.
|
|
169
|
-
*/var Rp;function MO(){return Rp||(Rp=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=x,t=c0();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),v;m.current===null?(v={hasValue:!1,value:null},m.current=v):v=m.current;var b=a(function(){var S=!1,E,C,k=function(M){if(!S){S=!0,E=M;var L=h(M);if(p!==void 0&&v.hasValue){var P=v.value;if(p(P,L))return C=P,P}return C=L,L}var O=E,j=C;if(r(O,M))return j;var D=h(M);return p!==void 0&&p(j,D)?j:(E=M,C=D,D)},I=f===void 0?null:f,A=function(){return k(d())},N=I===null?void 0:function(){return k(I())};return[A,N]},[d,f,h,p]),y=b[0],g=b[1],T=o(u,y,g);return i(function(){v.hasValue=!0,v.value=T},[T]),l(T),T}Cp.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Cp}process.env.NODE_ENV==="production"?_O():MO();const lo=e=>{const t=x.useRef(e??{});return x.useEffect(()=>void(t.current=e),[e]),t},DO=e=>{const t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current},NO=e=>Object.entries(e),u0=e=>e instanceof Promise,d0=(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),jO=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,d)=>n(f=>d0(u,f,s,d));return u0(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))},LO=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>d0(c,u,s,o.current));return u0(a)?a.then(c=>l(c)):l(a)},hf=(e,t,n)=>{const[r,o]=x.useState(()=>e),s=lo(r),i=lo((n==null?void 0:n.props)??{}),a=lo(t),l=lo((n==null?void 0:n.postMiddleware)??[]),c=lo((n==null?void 0:n.interceptor)??[]),u=x.useRef(e),d=DO(r),f=lo(d),h=x.useRef(null);x.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(v=>{v(r,d,m)})},[r,l,d]);const[p]=x.useState(()=>{const m=()=>i.current,v=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>f.current});return NO(v).reduce((b,[y,g])=>({...b,[y]:n!=null&&n.debug?jO(y,g,o,m,h,c.current):LO(y,g,o,m,h,c.current)}),{})});return[r,p,i.current]},FO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function VO(e,t){return x.useRef(FO(e,t)).current}const El={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>)`},To=(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(To(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)}},{}),Pp={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Na=(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)},$O={default:e=>Na(e,{result:Pp.default}),dark:e=>Na(e,{result:Pp.dark})},mf=(e,t)=>{const n=a=>(l,c,u)=>{const d={key:`--${u}`,value:`${l}`};return a?a(d):d},r=To(e.colors,n(t==null?void 0:t.colors)),o=To(e.spacing,n(t==null?void 0:t.spacing)),s=To(e.rounded,n(t==null?void 0:t.rounded)),i=e.custom?To(e.custom,n(t==null?void 0:t.customTokens)):[];return r.concat(o,s,i)},BO=(e,t)=>Na(mf(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),WO=(e,t)=>mf(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),zO=(e,t)=>Na(mf(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),h0={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},m0={base:"1rem",lg:"1.5rem",sm:"0.75rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},HO={name:"dark",rounded:h0,spacing:m0,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",muted:"hsla(0, 0%, 12%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 27%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 33%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},UO={rounded:h0,spacing:m0,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"},colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 88%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(221, 10%, 90%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},GO=HO,YO=UO,pf={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>w.jsxs(x.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To",calendarToday:"Today",calendarBackMonth:"Back month",calendarNextMonth:"Next month",calendarMonthLabel:"Month",multiComboboxSelectedLabel:"Selected",multiComboboxInnerPlaceholder:"Search..."},gf={input:{iconFeedback:!0}},Ci=x.createContext({tweaks:gf,parser:El.hsla,map:pf,locale:void 0}),qO=e=>{const t=x.useMemo(()=>({locale:e.locale,tweaks:{...gf,...e.tweaks},parser:e.parser||El.hsla,map:{...pf,...e.map}}),[e]);return w.jsx(Ci.Provider,{value:t,children:e.children})},yf=e=>{if(e)return e;const t=x.useContext(Ci);if(t)return t.locale||e},Ct=()=>{const e=x.useContext(Ci);return e?e.map:pf},KO=()=>{const e=x.useContext(Ci);return e?e.parser:El.hsla},ZO=()=>{const e=x.useContext(Ci);return e?e.tweaks:gf},XO={type:"spring",bounce:.3,duration:.6},kp=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),p0={middle:{x:"0%",opacity:1},enter:kp(1),exit:kp(-1)},Ip={exit:{visibility:"hidden"}},QO=e=>{const t=On(Gb(e));return Ub({start:t,end:cs(t,41)})},g0=(e,t)=>e.toLocaleDateString(t,{month:"long"}),JO=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const s=Gb(new Date(1970,o,1).setMonth(o)),i=g0(s,n);return w.jsx("option",{value:i,"data-index":o,children:i},`${e}-${i}`)}),gc={ArrowLeft:(e,t)=>t==="days"?uO(e,1):r0(e,1),ArrowRight:(e,t)=>t==="days"?cs(e,1):Tl(e,1),ArrowUp:(e,t)=>t==="days"?dO(e,1):fO(e,1),ArrowDown:(e,t)=>t==="days"?Wb(e,1):zb(e,1)},Ap=(e,t,n,r=0)=>{const o=n.toISOString(),s=()=>{var i;if(e!=null&&e.dataset.focustrap){const a=(i=t.current)==null?void 0:i.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>a==null?void 0:a.focus({preventScroll:!1}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!1})}};r===0&&s(),setTimeout(s,r)},Tr=e=>e.getFullYear().toString().padStart(4,"0"),e_=(e,t,n)=>e===void 0||n===void 0?!1:dA(t,e)&&fA(t,n),t_=e=>{var n;const t=Ct();return w.jsx(ct.tbody,{layout:!0,variants:p0,custom:e.direction,onKeyDown:e.onKeyDown,className:Me((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var i,a,l;const s=it.function((i=e.styles)==null?void 0:i.week)?(a=e.styles)==null?void 0:a.week(r):(l=e.styles)==null?void 0:l.week;return w.jsx("tr",{className:s,children:r.map(c=>{var b,y,g,T,S,E,C,k,I,A,N,M,L,P,O,j,D,V;const u=c.toISOString(),d=e.rangeMode?u===((y=(b=e.range)==null?void 0:b.to)==null?void 0:y.toISOString())||u===((T=(g=e.range)==null?void 0:g.from)==null?void 0:T.toISOString()):u===((S=e.date)==null?void 0:S.toISOString()),f=cO(c)&&e.markToday,h=((E=e.disabledDate)==null?void 0:E.call(e,c))||!1,p=lO(c,e.stateDate),m=!p||h,v=e.rangeMode?e_((C=e.range)==null?void 0:C.from,c,(k=e.range)==null?void 0:k.to):!1;return w.jsxs("td",{align:"center",className:Me("relative",it.function((I=e.styles)==null?void 0:I.dayFrame)?(A=e.styles)==null?void 0:A.dayFrame(c):(N=e.styles)==null?void 0:N.dayFrame),children:[w.jsxs("button",{type:"button","data-date":u,disabled:h,"data-samemonth":p,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Me(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${f?"text-emphasis":""} ${m?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,v&&e.markRange?"size-10 border border-dashed border-card-border":"",it.function((M=e.styles)==null?void 0:M.day)?(L=e.styles)==null?void 0:L.day(c):(P=e.styles)==null?void 0:P.day),children:[c.getDate(),d&&((O=e.stateRange.from)==null?void 0:O.toISOString())===u?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs text-foreground",children:((j=e.labelRange)==null?void 0:j.from)??t.calendarFromDate})}):null,d&&((D=e.stateRange.to)==null?void 0:D.toISOString())===u?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs text-foreground",children:((V=e.labelRange)==null?void 0:V.to)??t.calendarToDate})}):null]}),e.RenderOnDay?w.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},y0=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:s=!0,onChangeMonth:i,onChangeYear:a,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,...f})=>{const h=x.useRef(xi()),p=Ct(),m=yf(o),v=x.useRef(null),{date:b,range:y}=f,g=b||new Date,T=x.useRef(null),[S,E]=hf({date:g,isAnimating:!1,year:Tr(g),direction:void 0,range:{from:y==null?void 0:y.from,to:y==null?void 0:y.to},months:JO(h.current,g,m),selectMode:l?"from":void 0,week:Ub({start:On(g),end:gI(g)})},L=>({onChangeYear:P=>({year:P}),setToday:()=>({date:zo(new Date)}),onExitComplete:()=>(Ap(T.current||null,v,L.state().date,200),T.current=null,{isAnimating:!1}),date:P=>{const O=P(L.state().date);return{date:O,year:Tr(O)}},nextMonth:P=>{T.current=P.currentTarget;const O=L.state();if(O.isAnimating)return O;const j=Tl(O.date,1);return{date:j,isAnimating:!0,direction:1,year:Tr(j)}},previousMonth:P=>{T.current=P.currentTarget;const O=L.state();if(O.isAnimating)return O;const j=r0(O.date,1);return{date:j,isAnimating:!0,direction:-1,year:Tr(j)}},onSelectDate:P=>{const O=L.state(),j=P.currentTarget.dataset.range==="true",D=P.currentTarget.dataset.date||"",V=new Date(D);return{date:V,year:Tr(V),selectMode:O.selectMode===void 0?void 0:O.selectMode==="from"?"to":"from",range:j?{from:O.selectMode==="from"?V:O.range.from,to:O.selectMode==="to"?V:O.range.to}:O.range}},onChangeMonth:P=>{const O=P.target.value,D=Array.from(P.target.options).find(H=>H.value===O),V=L.state();if(D){const H=D.dataset.index||"",_=new Date(L.state().date);return _.setMonth(+H),{...V,date:_,year:Tr(_)}}return V},onKeyDown:P=>{const O=P.key,j=L.state();if(O in gc){(O==="ArrowUp"||O==="ArrowDown")&&P.preventDefault();const D=L.state().date,V=it.keyof(gc,O)?gc[O](D,P.shiftKey?"month":"days"):null;if(V!==null)return Ap(P.target,v,V),{...j,date:V,year:Tr(V)}}return L.state()}}),{props:{onChangeMonth:i,onChangeYear:a},postMiddleware:[(L,P,O)=>{var D,V;return(O.method==="onChangeMonth"||O.method==="previousMonth"||O.method==="nextMonth")&&((V=(D=O.props).onChangeMonth)==null||V.call(D,L.date)),L},(L,P,O)=>{var D,V;return O.method==="onChangeYear"&&((V=(D=O.props).onChangeYear)==null||V.call(D,L.date)),L},(L,P,O)=>{const j=O.method==="onSelectDate"||O.method==="setToday"||O.method==="onKeyDown";return l&&j&&t?(c==null||c(L.range),L):(j&&t&&(c==null||c(L.date)),L)}]}),C=QO(S.date),k=zy(C,7),I=S.date.toISOString(),A=g0(S.date,m);x.useEffect(()=>{t||c==null||c(S.date)},[I]);const N=VO(L=>{E.date(P=>{const O=new Date(P);return O.setFullYear(+L),O})},1200),M=L=>{const P=L.currentTarget.value;E.onChangeYear(P),a==null||a(new Date(P)),N(P)};return w.jsx(ZT,{transition:XO,children:w.jsxs("div",{"data-component":"calendar",ref:v,className:Me("relative overflow-hidden",it.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[w.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:w.jsx(fr,{initial:!1,mode:"popLayout",custom:S.direction,onExitComplete:E.onExitComplete,children:w.jsxs(ct.div,{initial:"enter",animate:"middle",exit:"exit",children:[w.jsxs("header",{className:"relative flex justify-between",children:[w.jsx(ct.button,{layout:!0,type:"button","data-focustrap":"prev",variants:Ip,onClick:E.previousMonth,title:p.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:w.jsx(Yk,{className:"h-4 w-4"})}),w.jsx(ct.span,{layout:!0,variants:p0,custom:S.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:w.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[w.jsx("select",{"aria-label":p.calendarMonthLabel,value:A,onChange:E.onChangeMonth,style:{width:`${A.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:S.months}),w.jsx(l0,{mask:"int",maxLength:4,placeholder:"YYYY",value:S.year,onChange:M,style:{width:`${S.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),w.jsx(ct.button,{layout:!0,type:"button","data-focustrap":"next",variants:Ip,onClick:E.nextMonth,title:p.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:w.jsx(sf,{className:"h-4 w-4"})}),w.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),w.jsxs(ct.table,{className:"mt-2 table min-w-full table-auto border-0",children:[w.jsx("thead",{children:w.jsx("tr",{children:S.week.map(L=>w.jsx("th",{role:"columnheader",className:Me("py-2 text-sm font-medium capitalize",it.function(u==null?void 0:u.weekDay)?u.weekDay(L):u==null?void 0:u.weekDay),children:L.toLocaleDateString(m,{weekday:"short"})},L.toString()))})}),w.jsx(t_,{zip:k,range:y,styles:u,date:b||null,dispatch:E,markRange:d,markToday:s,rangeMode:l,stateDate:S.date,labelRange:n,stateRange:S.range,RenderOnDay:e,direction:S.direction,disabledDate:r,onKeyDown:E.onKeyDown})]})]},A)})}),w.jsx("footer",{className:"mt-2 text-center text-primary",children:w.jsx("button",{className:"transition-transform duration-300 hover:scale-105",type:"button",onClick:E.setToday,children:p.calendarToday})})]})})},v0=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:s=null,className:i="",...a})=>w.jsxs(ss,{...a,as:r,"data-componen":"card",className:Me("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?w.jsx("header",{className:Me("mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",n),children:t}):s,w.jsx("div",{className:Me("min-w-full px-8",i),children:e})]}),b0=e=>{const t=e.Icon??Lb,n=Ct();return w.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[w.jsx(t,{size:64,className:"text-disabled"}),w.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function n_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function x0(...e){return t=>e.forEach(n=>n_(n,t))}function Br(...e){return R.useCallback(x0(...e),e)}function w0(e,t=[]){let n=[];function r(s,i){const a=R.createContext(i),l=n.length;n=[...n,i];function c(d){const{scope:f,children:h,...p}=d,m=(f==null?void 0:f[e][l])||a,v=R.useMemo(()=>p,Object.values(p));return w.jsx(m.Provider,{value:v,children:h})}function u(d,f){const h=(f==null?void 0:f[e][l])||a,p=R.useContext(h);if(p)return p;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,u]}const o=()=>{const s=n.map(i=>R.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return R.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,r_(o,...t)]}function r_(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...a,...d}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Ho=R.forwardRef((e,t)=>{const{children:n,...r}=e,o=R.Children.toArray(n),s=o.find(s_);if(s){const i=s.props.children,a=o.map(l=>l===s?R.Children.count(i)>1?R.Children.only(null):R.isValidElement(i)?i.props.children:null:l);return w.jsx(ku,{...r,ref:t,children:R.isValidElement(i)?R.cloneElement(i,void 0,a):null})}return w.jsx(ku,{...r,ref:t,children:n})});Ho.displayName="Slot";var ku=R.forwardRef((e,t)=>{const{children:n,...r}=e;if(R.isValidElement(n)){const o=a_(n);return R.cloneElement(n,{...i_(r,n.props),ref:t?x0(t,o):o})}return R.Children.count(n)>1?R.Children.only(null):null});ku.displayName="SlotClone";var o_=({children:e})=>w.jsx(w.Fragment,{children:e});function s_(e){return R.isValidElement(e)&&e.type===o_}function i_(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 a_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function l_(e){const t=e+"CollectionProvider",[n,r]=w0(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:p,children:m}=h,v=x.useRef(null),b=x.useRef(new Map).current;return w.jsx(o,{scope:p,itemMap:b,collectionRef:v,children:m})};i.displayName=t;const a=e+"CollectionSlot",l=x.forwardRef((h,p)=>{const{scope:m,children:v}=h,b=s(a,m),y=Br(p,b.collectionRef);return w.jsx(Ho,{ref:y,children:v})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=x.forwardRef((h,p)=>{const{scope:m,children:v,...b}=h,y=x.useRef(null),g=Br(p,y),T=s(c,m);return x.useEffect(()=>(T.itemMap.set(y,{ref:y,...b}),()=>void T.itemMap.delete(y))),w.jsx(Ho,{[u]:"",ref:g,children:v})});d.displayName=c;function f(h){const p=s(e+"CollectionConsumer",h);return x.useCallback(()=>{const v=p.collectionRef.current;if(!v)return[];const b=Array.from(v.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((T,S)=>b.indexOf(T.ref.current)-b.indexOf(S.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:i,Slot:l,ItemSlot:d},f,r]}var c_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Nn=c_.reduce((e,t)=>{const n=R.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?Ho:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function S0(e,t){e&&gi.flushSync(()=>e.dispatchEvent(t))}function zn(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function u_(e,t=globalThis==null?void 0:globalThis.document){const n=zn(e);R.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var d_="DismissableLayer",Iu="dismissableLayer.update",f_="dismissableLayer.pointerDownOutside",h_="dismissableLayer.focusOutside",Op,T0=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),E0=R.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=R.useContext(T0),[u,d]=R.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=R.useState({}),p=Br(t,C=>d(C)),m=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),y=u?m.indexOf(u):-1,g=c.layersWithOutsidePointerEventsDisabled.size>0,T=y>=b,S=p_(C=>{const k=C.target,I=[...c.branches].some(A=>A.contains(k));!T||I||(o==null||o(C),i==null||i(C),C.defaultPrevented||a==null||a())},f),E=g_(C=>{const k=C.target;[...c.branches].some(A=>A.contains(k))||(s==null||s(C),i==null||i(C),C.defaultPrevented||a==null||a())},f);return u_(C=>{y===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},f),R.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Op=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),_p(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Op)}},[u,f,n,c]),R.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),_p())},[u,c]),R.useEffect(()=>{const C=()=>h({});return document.addEventListener(Iu,C),()=>document.removeEventListener(Iu,C)},[]),w.jsx(Nn.div,{...l,ref:p,style:{pointerEvents:g?T?"auto":"none":void 0,...e.style},onFocusCapture:qt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:qt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:qt(e.onPointerDownCapture,S.onPointerDownCapture)})});E0.displayName=d_;var m_="DismissableLayerBranch",C0=R.forwardRef((e,t)=>{const n=R.useContext(T0),r=R.useRef(null),o=Br(t,r);return R.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),w.jsx(Nn.div,{...e,ref:o})});C0.displayName=m_;function p_(e,t=globalThis==null?void 0:globalThis.document){const n=zn(e),r=R.useRef(!1),o=R.useRef(()=>{});return R.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){R0(f_,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function g_(e,t=globalThis==null?void 0:globalThis.document){const n=zn(e),r=R.useRef(!1);return R.useEffect(()=>{const o=s=>{s.target&&!r.current&&R0(h_,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function _p(){const e=new CustomEvent(Iu);document.dispatchEvent(e)}function R0(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?S0(o,s):o.dispatchEvent(s)}var y_=E0,v_=C0,ja=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},b_="Portal",P0=R.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=R.useState(!1);ja(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?pi.createPortal(w.jsx(Nn.div,{...r,ref:t}),i):null});P0.displayName=b_;function x_(e,t){return R.useReducer((n,r)=>t[n][r]??n,e)}var k0=e=>{const{present:t,children:n}=e,r=w_(t),o=typeof n=="function"?n({present:r.isPresent}):R.Children.only(n),s=Br(r.ref,S_(o));return typeof n=="function"||r.isPresent?R.cloneElement(o,{ref:s}):null};k0.displayName="Presence";function w_(e){const[t,n]=R.useState(),r=R.useRef({}),o=R.useRef(e),s=R.useRef("none"),i=e?"mounted":"unmounted",[a,l]=x_(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const c=qi(r.current);s.current=a==="mounted"?c:"none"},[a]),ja(()=>{const c=r.current,u=o.current;if(u!==e){const f=s.current,h=qi(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ja(()=>{if(t){const c=d=>{const h=qi(r.current).includes(d.animationName);d.target===t&&h&&gi.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(s.current=qi(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:R.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function qi(e){return(e==null?void 0:e.animationName)||"none"}function S_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function T_({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=E_({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=zn(n),l=R.useCallback(c=>{if(s){const d=typeof c=="function"?c(e):c;d!==e&&a(d)}else o(c)},[s,e,o,a]);return[i,l]}function E_({defaultProp:e,onChange:t}){const n=R.useState(e),[r]=n,o=R.useRef(r),s=zn(t);return R.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var C_="VisuallyHidden",vf=R.forwardRef((e,t)=>w.jsx(Nn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));vf.displayName=C_;var bf="ToastProvider",[xf,R_,P_]=l_("Toast"),[I0,S$]=w0("Toast",[P_]),[k_,Cl]=I0(bf),A0=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[a,l]=R.useState(null),[c,u]=R.useState(0),d=R.useRef(!1),f=R.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${bf}\`. Expected non-empty \`string\`.`),w.jsx(xf.Provider,{scope:t,children:w.jsx(k_,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:R.useCallback(()=>u(h=>h+1),[]),onToastRemove:R.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};A0.displayName=bf;var O0="ToastViewport",I_=["F8"],Au="toast.viewportPause",Ou="toast.viewportResume",_0=R.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=I_,label:o="Notifications ({hotkey})",...s}=e,i=Cl(O0,n),a=R_(n),l=R.useRef(null),c=R.useRef(null),u=R.useRef(null),d=R.useRef(null),f=Br(t,d,i.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=i.toastCount>0;R.useEffect(()=>{const v=b=>{var g;r.every(T=>b[T]||b.code===T)&&((g=d.current)==null||g.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),R.useEffect(()=>{const v=l.current,b=d.current;if(p&&v&&b){const y=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(Au);b.dispatchEvent(E),i.isClosePausedRef.current=!0}},g=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(Ou);b.dispatchEvent(E),i.isClosePausedRef.current=!1}},T=E=>{!v.contains(E.relatedTarget)&&g()},S=()=>{v.contains(document.activeElement)||g()};return v.addEventListener("focusin",y),v.addEventListener("focusout",T),v.addEventListener("pointermove",y),v.addEventListener("pointerleave",S),window.addEventListener("blur",y),window.addEventListener("focus",g),()=>{v.removeEventListener("focusin",y),v.removeEventListener("focusout",T),v.removeEventListener("pointermove",y),v.removeEventListener("pointerleave",S),window.removeEventListener("blur",y),window.removeEventListener("focus",g)}}},[p,i.isClosePausedRef]);const m=R.useCallback(({tabbingDirection:v})=>{const y=a().map(g=>{const T=g.ref.current,S=[T,...z_(T)];return v==="forwards"?S:S.reverse()});return(v==="forwards"?y.reverse():y).flat()},[a]);return R.useEffect(()=>{const v=d.current;if(v){const b=y=>{var S,E,C;const g=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!g){const k=document.activeElement,I=y.shiftKey;if(y.target===v&&I){(S=c.current)==null||S.focus();return}const M=m({tabbingDirection:I?"backwards":"forwards"}),L=M.findIndex(P=>P===k);yc(M.slice(L+1))?y.preventDefault():I?(E=c.current)==null||E.focus():(C=u.current)==null||C.focus()}};return v.addEventListener("keydown",b),()=>v.removeEventListener("keydown",b)}},[a,m]),w.jsxs(v_,{ref:l,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&w.jsx(_u,{ref:c,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"forwards"});yc(v)}}),w.jsx(xf.Slot,{scope:n,children:w.jsx(Nn.ol,{tabIndex:-1,...s,ref:f})}),p&&w.jsx(_u,{ref:u,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"backwards"});yc(v)}})]})});_0.displayName=O0;var M0="ToastFocusProxy",_u=R.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=Cl(M0,n);return w.jsx(vf,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=s.viewport)!=null&&c.contains(a))&&r()}})});_u.displayName=M0;var Rl="Toast",A_="toast.swipeStart",O_="toast.swipeMove",__="toast.swipeCancel",M_="toast.swipeEnd",D0=R.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a=!0,l]=T_({prop:r,defaultProp:o,onChange:s});return w.jsx(k0,{present:n||a,children:w.jsx(j_,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:zn(e.onPause),onResume:zn(e.onResume),onSwipeStart:qt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:qt(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:qt(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:qt(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});D0.displayName=Rl;var[D_,N_]=I0(Rl,{onClose(){}}),j_=R.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...p}=e,m=Cl(Rl,n),[v,b]=R.useState(null),y=Br(t,P=>b(P)),g=R.useRef(null),T=R.useRef(null),S=o||m.duration,E=R.useRef(0),C=R.useRef(S),k=R.useRef(0),{onToastAdd:I,onToastRemove:A}=m,N=zn(()=>{var O;(v==null?void 0:v.contains(document.activeElement))&&((O=m.viewport)==null||O.focus()),i()}),M=R.useCallback(P=>{!P||P===1/0||(window.clearTimeout(k.current),E.current=new Date().getTime(),k.current=window.setTimeout(N,P))},[N]);R.useEffect(()=>{const P=m.viewport;if(P){const O=()=>{M(C.current),c==null||c()},j=()=>{const D=new Date().getTime()-E.current;C.current=C.current-D,window.clearTimeout(k.current),l==null||l()};return P.addEventListener(Au,j),P.addEventListener(Ou,O),()=>{P.removeEventListener(Au,j),P.removeEventListener(Ou,O)}}},[m.viewport,S,l,c,M]),R.useEffect(()=>{s&&!m.isClosePausedRef.current&&M(S)},[s,S,m.isClosePausedRef,M]),R.useEffect(()=>(I(),()=>A()),[I,A]);const L=R.useMemo(()=>v?$0(v):null,[v]);return m.viewport?w.jsxs(w.Fragment,{children:[L&&w.jsx(L_,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),w.jsx(D_,{scope:n,onClose:N,children:gi.createPortal(w.jsx(xf.ItemSlot,{scope:n,children:w.jsx(y_,{asChild:!0,onEscapeKeyDown:qt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||N(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(Nn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...p,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:qt(e.onKeyDown,P=>{P.key==="Escape"&&(a==null||a(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,N()))}),onPointerDown:qt(e.onPointerDown,P=>{P.button===0&&(g.current={x:P.clientX,y:P.clientY})}),onPointerMove:qt(e.onPointerMove,P=>{if(!g.current)return;const O=P.clientX-g.current.x,j=P.clientY-g.current.y,D=!!T.current,V=["left","right"].includes(m.swipeDirection),H=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,_=V?H(0,O):0,$=V?0:H(0,j),K=P.pointerType==="touch"?10:2,re={x:_,y:$},ee={originalEvent:P,delta:re};D?(T.current=re,Ki(O_,d,ee,{discrete:!1})):Mp(re,m.swipeDirection,K)?(T.current=re,Ki(A_,u,ee,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(O)>K||Math.abs(j)>K)&&(g.current=null)}),onPointerUp:qt(e.onPointerUp,P=>{const O=T.current,j=P.target;if(j.hasPointerCapture(P.pointerId)&&j.releasePointerCapture(P.pointerId),T.current=null,g.current=null,O){const D=P.currentTarget,V={originalEvent:P,delta:O};Mp(O,m.swipeDirection,m.swipeThreshold)?Ki(M_,h,V,{discrete:!0}):Ki(__,f,V,{discrete:!0}),D.addEventListener("click",H=>H.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),L_=e=>{const{__scopeToast:t,children:n,...r}=e,o=Cl(Rl,t),[s,i]=R.useState(!1),[a,l]=R.useState(!1);return B_(()=>i(!0)),R.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:w.jsx(P0,{asChild:!0,children:w.jsx(vf,{...r,children:s&&w.jsxs(w.Fragment,{children:[o.label," ",n]})})})},F_="ToastTitle",N0=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(Nn.div,{...r,ref:t})});N0.displayName=F_;var V_="ToastDescription",j0=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(Nn.div,{...r,ref:t})});j0.displayName=V_;var L0="ToastAction",$_=R.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?w.jsx(V0,{altText:n,asChild:!0,children:w.jsx(wf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${L0}\`. Expected non-empty \`string\`.`),null)});$_.displayName=L0;var F0="ToastClose",wf=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=N_(F0,n);return w.jsx(V0,{asChild:!0,children:w.jsx(Nn.button,{type:"button",...r,ref:t,onClick:qt(e.onClick,o.onClose)})})});wf.displayName=F0;var V0=R.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return w.jsx(Nn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function $0(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),W_(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...$0(r))}}),t}function Ki(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?S0(o,s):o.dispatchEvent(s)}var Mp=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function B_(e=()=>{}){const t=zn(e);ja(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function W_(e){return e.nodeType===e.ELEMENT_NODE}function z_(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var H_=A0,U_=_0,G_=D0,Y_=N0,q_=j0,K_=wf;const Z_=e=>{const[t,n]=x.useState(!1),r=()=>n(!0),o=()=>n(!1);return x.useEffect(()=>{const s=e.current;if(s)return s.addEventListener("mouseenter",r),s.addEventListener("mouseleave",o),()=>{s.removeEventListener("mouseenter",r),s.removeEventListener("mouseleave",o)}},[]),t},X_=os("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),B0=x.createContext(()=>{throw new Error("Not implemented")}),Q_=()=>x.useContext(B0),Dp={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}},J_=x.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,s=t.hover?"hover":t.isLast?"isLast":"other",i=X_({theme:t.theme||"default"});return w.jsx(G_,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:w.jsx(ct.li,{layout:!0,layoutScroll:!0,animate:s,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:Dp[t.reversedIndex]||Dp.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:w.jsxs("div",{className:i,children:[w.jsxs("div",{className:"flex flex-col p-4",children:[t.title?w.jsx(Y_,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,w.jsx(q_,{className:"select-text truncate",children:t.text})]}),r?w.jsx(K_,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:w.jsx(lf,{className:"h-5 w-5"})}):null]})})})});function eM({children:e,max:t=5,duration:n=5e3}){const r=x.useRef(null),o=Z_(r),[s,i]=x.useState([]),a=x.useCallback(()=>i([]),[]);x.useEffect(()=>()=>a(),[a]);const l=x.useCallback((c,u)=>{const d=window.crypto.randomUUID();return i(h=>{const p=[...h,{...u,id:d,text:c}];return p.length>t?p.slice(p.length-t,p.length+1):p}),{clear:a,close:()=>i(h=>h.filter(p=>p.id!==d))}},[t]);return w.jsxs(H_,{duration:n,swipeThreshold:150,children:[w.jsx(B0.Provider,{value:l,children:e}),w.jsx(fr,{presenceAffectsLayout:!0,mode:"popLayout",children:s.map((c,u,d)=>{const f=()=>i(h=>h.filter(p=>p.id!==c.id));return x.createElement(J_,{...c,key:c.id,hover:o,index:u,onClose:f,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),w.jsx(U_,{ref:r,"data-items":s.length,style:{justifyContent:"start",height:`${(o?s.length:Math.min(1,s.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const tM=e=>w.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[w.jsxs("header",{className:"p-6 items-start flex gap-4",children:[w.jsx("div",{className:Me("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:w.jsx("div",{children:w.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),w.jsxs("div",{className:"flex flex-col gap-1",children:[w.jsx("header",{children:w.jsx("h3",{className:"text-base leading-none",children:e.title})}),w.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?w.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),W0=(e,t)=>{const[n,r]=x.useState(()=>t||e);return x.useEffect(()=>{r(e)},[e]),[n,r]},z0=x.createContext(""),nM=e=>{const[t,n]=W0(e.active),r=$r(0),o=$r(0),s=x.useRef(null),i=e.useHash?"a":"button";x.useEffect(()=>{const u=s.current;if(u===null)return;const d=m=>{if(!m)return;const v=m.getBoundingClientRect();o.set(v.width),r.set(m.offsetLeft)},f=()=>{const m=u.querySelector("li[data-active=true]");return void d(m)};window.addEventListener("resize",f);let h=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(h=u.querySelector(`li[data-id="${p}"]`),n(p)),h===null){h=u.querySelector("li[data-id]");const m=h.getAttribute("data-id")||"";n(m)}return d(h),()=>window.removeEventListener("resize",f)},[]);const a=Ys(e.onChange);x.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=x.Children.toArray(e.children),c=u=>{const d=u.currentTarget,f=d.getBoundingClientRect();o.set(f.width),r.set(d.offsetLeft),n(d.dataset.id||"")};return w.jsx(z0.Provider,{value:t,children:w.jsx(v0,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:w.jsx("header",{ref:s,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:w.jsx("nav",{className:"min-w-0",children:w.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:l.map(u=>{const d=u.props;return w.jsx("li",{"data-id":d.id,"data-active":t===d.id,className:"w-full border-b-2 transition-all border-card-border data-[active=true]:border-primary data-[active=true]:text-primary",children:w.jsx(i,{"data-id":d.id,onClick:c,"aria-current":"page",href:e.useHash?`#${d.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:d.title})},`tab-header-${d.id}`)})})})}),children:e.children})})},rM=()=>x.useContext(z0),oM=e=>{const t=rM();return w.jsx(x.Fragment,{children:e.id===t?e.children:null})};function mr(e){return H0(e)?(e.nodeName||"").toLowerCase():"#document"}function Vt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yn(e){var t;return(t=(H0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function H0(e){return e instanceof Node||e instanceof Vt(e).Node}function He(e){return e instanceof Element||e instanceof Vt(e).Element}function ht(e){return e instanceof HTMLElement||e instanceof Vt(e).HTMLElement}function Mu(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vt(e).ShadowRoot}function Ri(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function sM(e){return["table","td","th"].includes(mr(e))}function Pl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Sf(e){const t=Tf(),n=He(e)?Qt(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 iM(e){let t=Hn(e);for(;ht(t)&&!ir(t);){if(Sf(t))return t;if(Pl(t))return null;t=Hn(t)}return null}function Tf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ir(e){return["html","body","#document"].includes(mr(e))}function Qt(e){return Vt(e).getComputedStyle(e)}function kl(e){return He(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hn(e){if(mr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Mu(e)&&e.host||Yn(e);return Mu(t)?t.host:t}function U0(e){const t=Hn(e);return ir(t)?e.ownerDocument?e.ownerDocument.body:e.body:ht(t)&&Ri(t)?t:U0(t)}function rr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=U0(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Vt(o);if(s){const a=Du(i);return t.concat(i,i.visualViewport||[],Ri(o)?o:[],a&&n?rr(a):[])}return t.concat(o,rr(o,[],n))}function Du(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ln(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 at(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Mu(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ef(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function G0(){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 Y0(e){return e.mozInputSource===0&&e.isTrusted?!0:Nu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Cf(e){return aM()?!1:!Nu()&&e.width===0&&e.height===0||Nu()&&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 Rf(){return/apple/i.test(navigator.vendor)}function Nu(){const e=/android/i;return e.test(Ef())||e.test(G0())}function q0(){return Ef().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function aM(){return G0().includes("jsdom/")}function Uo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function lM(e){return"nativeEvent"in e}function cM(e){return e.matches("html,body")}function Tt(e){return(e==null?void 0:e.ownerDocument)||document}function vc(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 Tn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const uM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Pf(e){return ht(e)&&e.matches(uM)}function kt(e){e.preventDefault(),e.stopPropagation()}function K0(e){return e?e.getAttribute("role")==="combobox"&&Pf(e):!1}const Cn=Math.min,Yt=Math.max,La=Math.round,Eo=Math.floor,ar=e=>({x:e,y:e}),dM={left:"right",right:"left",bottom:"top",top:"bottom"},fM={start:"end",end:"start"};function ju(e,t,n){return Yt(e,Cn(t,n))}function us(e,t){return typeof e=="function"?e(t):e}function lr(e){return e.split("-")[0]}function ds(e){return e.split("-")[1]}function Z0(e){return e==="x"?"y":"x"}function kf(e){return e==="y"?"height":"width"}function Wr(e){return["top","bottom"].includes(lr(e))?"y":"x"}function If(e){return Z0(Wr(e))}function hM(e,t,n){n===void 0&&(n=!1);const r=ds(e),o=If(e),s=kf(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Fa(i)),[i,Fa(i)]}function mM(e){const t=Fa(e);return[Lu(e),t,Lu(t)]}function Lu(e){return e.replace(/start|end/g,t=>fM[t])}function pM(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 gM(e,t,n,r){const o=ds(e);let s=pM(lr(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Lu)))),s}function Fa(e){return e.replace(/left|right|bottom|top/g,t=>dM[t])}function yM(e){return{top:0,right:0,bottom:0,left:0,...e}}function X0(e){return typeof e!="number"?yM(e):{top:e,right:e,bottom:e,left:e}}function Va(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 ug;function FO(){return ug||(ug=1,process.env.NODE_ENV!=="production"&&function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=E,n=Qb(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Fc.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var h=i(null);if(h.current===null){var y={hasValue:!1,value:null};h.current=y}else y=h.current;h=s(function(){function v(w){if(!g){if(g=!0,b=w,w=p(w),f!==void 0&&y.hasValue){var C=y.value;if(f(C,w))return S=C}return S=w}if(C=S,r(b,w))return C;var R=p(w);return f!==void 0&&f(C,R)?(b=w,C):(b=w,S=R)}var g=!1,b,S,T=d===void 0?null:d;return[function(){return v(u())},T===null?void 0:function(){return v(T())}]},[u,d,p,f]);var m=o(c,h[0],h[1]);return a(function(){y.hasValue=!0,y.value=m},[m]),l(m),m},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Fc}var dg;function LO(){return dg||(dg=1,process.env.NODE_ENV==="production"?ja.exports=NO():ja.exports=FO()),ja.exports}LO();var Lo=function(){return Lo=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Lo.apply(this,arguments)};function Mi(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function Jb(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var uo=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},VO=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},zO=function(e){return Object.entries(e)},e0=function(e){return e instanceof Promise},t0=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},Lo(Lo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},$O=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=performance.now(),c=t.apply(void 0,Jb([],Mi(a),!1)),u=function(d,p){return n(function(f){return t0(d,f,i,p)})};return e0(c)?c.then(function(d){o.current={method:e,props:r(),time:performance.now()-l},u(d,o.current)}):(o.current={method:e,props:r(),time:performance.now()-l},void u(c,o.current))}},BO=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,Jb([],Mi(a),!1)),c=function(u){return n(function(d){return t0(u,d,i,o.current)})};return e0(l)?l.then(function(u){return c(u)}):c(l)}},Ef=function(e,t,n){var r,o,i,a=Mi(E.useState(function(){return e}),2),s=a[0],l=a[1],c=uo(s),u=uo((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=uo(t),p=uo((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=uo((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),h=E.useRef(e),y=VO(s),m=uo(y),v=E.useRef(null);E.useEffect(function(){if(v.current!==null){var S=v.current;p.current.forEach(function(T){T(s,y,S)})}},[s,p,y]);var g=Mi(E.useState(function(){var S=function(){return u.current},T=d.current({props:S,state:function(){return c.current},initialState:h.current,previousState:function(){return m.current}});return zO(T).reduce(function(w,C){var R,I=Mi(C,2),P=I[0],j=I[1];return Lo(Lo({},w),(R={},R[P]=n!=null&&n.debug?$O(P,j,l,S,v,f.current):BO(P,j,l,S,v,f.current),R))},{})}),1),b=g[0];return[s,b,u.current]};const HO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function WO(e,t){return E.useRef(HO(e,t)).current}const sl={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>)`},To=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(a,l,s))}return o.concat(To(a,t,n,s))},[]),n0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(a,i,s)}}return{...o,[i]:n0(a,t,n,s)}},{}),fg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ms=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},qO={default:e=>ms(e,{result:fg.default}),dark:e=>ms(e,{result:fg.dark})},Cf=(e,t)=>{const n=s=>(l,c,u)=>{const d={key:`--${u}`,value:`${l}`};return s?s(d):d},r=To(e.colors,n(t==null?void 0:t.colors)),o=To(e.spacing,n(t==null?void 0:t.spacing)),i=To(e.rounded,n(t==null?void 0:t.rounded)),a=e.custom?To(e.custom,n(t==null?void 0:t.customTokens)):[];return r.concat(o,i,a)},UO=(e,t)=>ms(Cf(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),GO=(e,t)=>Cf(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),YO=(e,t)=>ms(Cf(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ll={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>x.jsxs(E.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To",calendarToday:"Today",calendarBackMonth:"Back month",calendarNextMonth:"Next month",calendarMonthLabel:"Month",multiSelectSelectedLabel:"Selected",multiSelectInnerPlaceholder:"Search..."},cl={input:{iconFeedback:!0}},oi=E.createContext({tweaks:cl,parser:sl.hsla,map:ll,locale:void 0}),kf=e=>{const t=E.useContext(oi);if(e)return e;if(t)return t.locale||e};function KO(e,t){const n=E.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const s=i.changedTouches[0].clientX-n.current;Math.abs(s)>t&&e(i,s>0?"right":"left"),n.current=null}}}const Ot=()=>{const e=E.useContext(oi);return e?e.map:ll},on=(e,t=2)=>e.toString(16).padStart(t,"0"),ma=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${on(t,4)+on(n,3)}-${on(r[0])+on(r[1])}-${on(r[2])+on(r[3])}-${on(r[4])+on(r[5])}-${on(r[6])+on(r[7])+on(r[8])+on(r[9])}`},pg=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),hg={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Rf=(e,t)=>{const n=pg(t,hg.basic,e)||pg(t,hg.extend,e);return n===void 0||n===e?void 0:n},Zi=()=>typeof window>"u",Ku=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r0=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,i=e.slice(o,o+t);i.length>0&&n.push(i)}return n},ZO=e=>!e,Pf=()=>{},XO={type:"spring",bounce:.3,duration:.6},mg=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),o0={enter:mg(1),exit:mg(-1),middle:{x:"0%",opacity:1}},gg={exit:{visibility:"hidden"}},QO=e=>{const t=jn(Nb(e));return jb({start:t,end:wo(t,{days:41})})},i0=(e,t)=>e.toLocaleDateString(t,{month:"long"}),JO=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=Nb(new Date(1970,o,1).setMonth(o)),a=i0(i,n);return x.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Lc={ArrowLeft:(e,t)=>t==="days"?wi(e,{days:1}):wi(e,{months:1}),ArrowRight:(e,t)=>t==="days"?wo(e,{days:1}):wo(e,{months:1}),ArrowUp:(e,t)=>t==="days"?wi(e,{weeks:1}):wi(e,{years:1}),ArrowDown:(e,t)=>t==="days"?wo(e,{weeks:1}):wo(e,{years:1})},vg=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var a;if(e!=null&&e.dataset.focustrap){const s=(a=t.current)==null?void 0:a.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>s==null?void 0:s.focus({preventScroll:!1}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},Ir=e=>e.getFullYear().toString().padStart(4,"0"),e_=(e,t,n)=>e===void 0||n===void 0?!1:hI(t,e)&&mI(t,n),t_=e=>{var n;const t=Ot();return x.jsx(vt.tbody,{layout:!0,variants:o0,custom:e.direction,onKeyDown:e.onKeyDown,className:ze((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=ht.function((a=e.styles)==null?void 0:a.week)?(s=e.styles)==null?void 0:s.week(r):(l=e.styles)==null?void 0:l.week;return x.jsx("tr",{className:i,children:r.map(c=>{var v,g,b,S,T,w,C,R,I,P,j,N,V,k,M,D,L,_;const u=c.toISOString(),d=e.rangeMode?u===((g=(v=e.range)==null?void 0:v.to)==null?void 0:g.toISOString())||u===((S=(b=e.range)==null?void 0:b.from)==null?void 0:S.toISOString()):u===((T=e.date)==null?void 0:T.toISOString()),p=pO(c)&&e.markToday,f=((w=e.disabledDate)==null?void 0:w.call(e,c))||!1,h=fO(c,e.stateDate),y=!h||f,m=e.rangeMode?e_((C=e.range)==null?void 0:C.from,c,(R=e.range)==null?void 0:R.to):!1;return x.jsxs("td",{align:"center",className:ze("relative",ht.function((I=e.styles)==null?void 0:I.dayFrame)?(P=e.styles)==null?void 0:P.dayFrame(c):(j=e.styles)==null?void 0:j.dayFrame),children:[x.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":h,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:ze(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${p?"text-emphasis":""} ${y?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,m&&e.markRange?"size-10 border border-dashed border-card-border":"",ht.function((N=e.styles)==null?void 0:N.day)?(V=e.styles)==null?void 0:V.day(c):(k=e.styles)==null?void 0:k.day),children:[c.getDate(),d&&((M=e.stateRange.from)==null?void 0:M.toISOString())===u?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((D=e.labelRange)==null?void 0:D.from)??t.calendarFromDate})}):null,d&&((L=e.stateRange.to)==null?void 0:L.toISOString())===u?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((_=e.labelRange)==null?void 0:_.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},n_=()=>Fo(new Date),a0=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,...p})=>{const f=E.useRef(ma()),h=Ot(),y=kf(o),m=E.useRef(null),{date:v,range:g}=p,b=v||new Date,S=E.useRef(null),[T,w]=Ef({date:b,isAnimating:!1,year:Ir(b),direction:void 0,range:{from:g==null?void 0:g.from,to:g==null?void 0:g.to},months:JO(f.current,b,y),selectMode:l?"from":void 0,week:jb({start:jn(b),end:xA(b)})},k=>({onChangeYear:M=>({year:M}),onExitComplete:()=>(vg(S.current||null,m,k.state().date,200),S.current=null,{isAnimating:!1}),date:M=>{const D=M(k.state().date);return{date:D,year:Ir(D)}},nextMonth:M=>{M&&(S.current=M.currentTarget);const D=k.state();if(D.isAnimating)return D;const L=wo(D.date,{months:1});return{date:L,isAnimating:!0,direction:1,year:Ir(L)}},previousMonth:M=>{M&&(S.current=M.currentTarget);const D=k.state();if(D.isAnimating)return D;const L=wi(D.date,{months:1});return{date:L,isAnimating:!0,direction:-1,year:Ir(L)}},onSelectDate:M=>{const D=k.state(),L=M.currentTarget.dataset.range==="true",_=M.currentTarget.dataset.date||"",z=new Date(_);return{date:z,year:Ir(z),selectMode:D.selectMode===void 0?void 0:D.selectMode==="from"?"to":"from",range:L?{from:D.selectMode==="from"?z:D.range.from,to:D.selectMode==="to"?z:D.range.to}:D.range}},onChangeMonth:M=>{const D=M.target.value,_=Array.from(M.target.options).find(O=>O.value===D),z=k.state();if(_){const O=_.dataset.index||"",B=new Date(k.state().date);return B.setMonth(+O),{...z,date:B,year:Ir(B)}}return z},onKeyDown:M=>{const D=M.key,L=k.state();if(D in Lc){(D==="ArrowUp"||D==="ArrowDown")&&M.preventDefault();const _=k.state().date,z=ht.keyof(Lc,D)?Lc[D](_,M.shiftKey?"month":"days"):null;if(z!==null)return vg(M.target,m,z),{...L,date:z,year:Ir(z)}}return k.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(k,M,D)=>{var _,z;return(D.method==="onChangeMonth"||D.method==="previousMonth"||D.method==="nextMonth")&&((z=(_=D.props).onChangeMonth)==null||z.call(_,k.date)),k},(k,M,D)=>{var _,z;return D.method==="onChangeYear"&&((z=(_=D.props).onChangeYear)==null||z.call(_,k.date)),k},(k,M,D)=>{const L=D.method==="onSelectDate"||D.method==="setToday"||D.method==="onKeyDown";return l&&L&&t?(c==null||c(k.range),k):(L&&t&&(c==null||c(k.date)),k)}]}),C=QO(T.date),R=r0(C,7),I=T.date.toISOString(),P=i0(T.date,y);E.useEffect(()=>{t||c==null||c(T.date)},[I,t]);const j=WO(k=>w.date(M=>mO(new Date(M),+k)),1200),N=k=>{const M=k.currentTarget.value;w.onChangeYear(M),s==null||s(new Date(M)),j(M)},V=KO((k,M)=>(k.preventDefault(),M==="right"?w.previousMonth():w.nextMonth()),10);return x.jsx(RS,{transition:XO,children:x.jsxs("div",{ref:m,"data-component":"calendar",onTouchEnd:V.onTouchEnd,onTouchStart:V.onTouchStart,className:ze("relative overflow-hidden",ht.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(vr,{initial:!1,mode:"popLayout",custom:T.direction,onExitComplete:w.onExitComplete,children:x.jsxs(vt.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(vt.button,{layout:!0,type:"button","data-focustrap":"prev",variants:gg,onClick:w.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(DP,{className:"h-4 w-4"})}),x.jsx(vt.span,{layout:!0,variants:o0,custom:T.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{value:P,onChange:w.onChangeMonth,"aria-label":h.calendarMonthLabel,style:{width:`${P.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:T.months}),x.jsx(Xb,{mask:"int",maxLength:4,placeholder:"YYYY",value:T.year,onChange:N,style:{width:`${T.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(vt.button,{layout:!0,type:"button","data-focustrap":"next",variants:gg,onClick:w.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(vf,{className:"h-4 w-4"})}),x.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),x.jsxs(vt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:T.week.map(k=>x.jsx("th",{role:"columnheader",className:ze("py-2 text-sm font-medium capitalize",ht.function(u==null?void 0:u.weekDay)?u.weekDay(k):u==null?void 0:u.weekDay),children:k.toLocaleDateString(y,{weekday:"short"})},k.toString()))})}),x.jsx(t_,{zip:R,range:g,styles:u,date:v||null,dispatch:w,markRange:d,markToday:i,rangeMode:l,stateDate:T.date,labelRange:n,stateRange:T.range,RenderOnDay:e,direction:T.direction,disabledDate:r,onKeyDown:w.onKeyDown})]})]},P)})}),x.jsx("footer",{className:"mt-2 text-center text-primary",children:x.jsx("button",{type:"button",onClick:()=>w.date(n_),className:"transition-transform duration-300 hover:scale-105",children:h.calendarToday})})]})})},s0=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>x.jsxs(cn,{...s,as:r,"data-componen":"card",className:ze("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?x.jsx("header",{className:ze("mb-2 w-full border-b border-card-border lg:px-8 px-4 pb-4 text-xl font-medium",n),children:t}):i,x.jsx("div",{className:ze("min-w-full lg:px-8 px-4",a),children:e})]}),l0=e=>{const t=e.Icon??Pb,n=Ot();return x.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[x.jsx(t,{size:64,className:"text-disabled"}),x.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function yg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function c0(...e){return t=>{let n=!1;const r=e.map(o=>{const i=yg(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():yg(e[o],null)}}}}function Wr(...e){return A.useCallback(c0(...e),e)}function u0(e,t=[]){let n=[];function r(i,a){const s=A.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...h}=d,y=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,m=A.useMemo(()=>h,Object.values(h));return x.jsx(y.Provider,{value:m,children:f})};c.displayName=i+"Provider";function u(d,p){var y;const f=((y=p==null?void 0:p[e])==null?void 0:y[l])||s,h=A.useContext(f);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>A.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return A.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,r_(o,...t)]}function r_(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Vo=A.forwardRef((e,t)=>{const{children:n,...r}=e,o=A.Children.toArray(n),i=o.find(i_);if(i){const a=i.props.children,s=o.map(l=>l===i?A.Children.count(a)>1?A.Children.only(null):A.isValidElement(a)?a.props.children:null:l);return x.jsx(Zu,{...r,ref:t,children:A.isValidElement(a)?A.cloneElement(a,void 0,s):null})}return x.jsx(Zu,{...r,ref:t,children:n})});Vo.displayName="Slot";var Zu=A.forwardRef((e,t)=>{const{children:n,...r}=e;if(A.isValidElement(n)){const o=s_(n),i=a_(r,n.props);return n.type!==A.Fragment&&(i.ref=t?c0(t,o):o),A.cloneElement(n,i)}return A.Children.count(n)>1?A.Children.only(null):null});Zu.displayName="SlotClone";var o_=({children:e})=>x.jsx(x.Fragment,{children:e});function i_(e){return A.isValidElement(e)&&e.type===o_}function a_(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function s_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function l_(e){const t=e+"CollectionProvider",[n,r]=u0(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:h,children:y}=f,m=E.useRef(null),v=E.useRef(new Map).current;return x.jsx(o,{scope:h,itemMap:v,collectionRef:m,children:y})};a.displayName=t;const s=e+"CollectionSlot",l=E.forwardRef((f,h)=>{const{scope:y,children:m}=f,v=i(s,y),g=Wr(h,v.collectionRef);return x.jsx(Vo,{ref:g,children:m})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,h)=>{const{scope:y,children:m,...v}=f,g=E.useRef(null),b=Wr(h,g),S=i(c,y);return E.useEffect(()=>(S.itemMap.set(g,{ref:g,...v}),()=>void S.itemMap.delete(g))),x.jsx(Vo,{[u]:"",ref:b,children:m})});d.displayName=c;function p(f){const h=i(e+"CollectionConsumer",f);return E.useCallback(()=>{const m=h.collectionRef.current;if(!m)return[];const v=Array.from(m.querySelectorAll(`[${u}]`));return Array.from(h.itemMap.values()).sort((S,T)=>v.indexOf(S.ref.current)-v.indexOf(T.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,r]}var c_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Vn=c_.reduce((e,t)=>{const n=A.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Vo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function d0(e,t){e&&Gs.flushSync(()=>e.dispatchEvent(t))}function Un(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function u_(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e);A.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var d_="DismissableLayer",Xu="dismissableLayer.update",f_="dismissableLayer.pointerDownOutside",p_="dismissableLayer.focusOutside",xg,f0=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),p0=A.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=A.useContext(f0),[u,d]=A.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=A.useState({}),h=Wr(t,C=>d(C)),y=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(m),g=u?y.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,S=g>=v,T=m_(C=>{const R=C.target,I=[...c.branches].some(P=>P.contains(R));!S||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),w=g_(C=>{const R=C.target;[...c.branches].some(P=>P.contains(R))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return u_(C=>{g===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),A.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(xg=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),bg(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=xg)}},[u,p,n,c]),A.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),bg())},[u,c]),A.useEffect(()=>{const C=()=>f({});return document.addEventListener(Xu,C),()=>document.removeEventListener(Xu,C)},[]),x.jsx(Vn.div,{...l,ref:h,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:Qt(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Qt(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Qt(e.onPointerDownCapture,T.onPointerDownCapture)})});p0.displayName=d_;var h_="DismissableLayerBranch",h0=A.forwardRef((e,t)=>{const n=A.useContext(f0),r=A.useRef(null),o=Wr(t,r);return A.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(Vn.div,{...e,ref:o})});h0.displayName=h_;function m_(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e),r=A.useRef(!1),o=A.useRef(()=>{});return A.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){m0(f_,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function g_(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e),r=A.useRef(!1);return A.useEffect(()=>{const o=i=>{i.target&&!r.current&&m0(p_,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bg(){const e=new CustomEvent(Xu);document.dispatchEvent(e)}function m0(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?d0(o,i):o.dispatchEvent(i)}var v_=p0,y_=h0,gs=globalThis!=null&&globalThis.document?A.useLayoutEffect:()=>{},x_="Portal",g0=A.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=A.useState(!1);gs(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ca.createPortal(x.jsx(Vn.div,{...r,ref:t}),a):null});g0.displayName=x_;function b_(e,t){return A.useReducer((n,r)=>t[n][r]??n,e)}var v0=e=>{const{present:t,children:n}=e,r=w_(t),o=typeof n=="function"?n({present:r.isPresent}):A.Children.only(n),i=Wr(r.ref,T_(o));return typeof n=="function"||r.isPresent?A.cloneElement(o,{ref:i}):null};v0.displayName="Presence";function w_(e){const[t,n]=A.useState(),r=A.useRef({}),o=A.useRef(e),i=A.useRef("none"),a=e?"mounted":"unmounted",[s,l]=b_(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{const c=Fa(r.current);i.current=s==="mounted"?c:"none"},[s]),gs(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=Fa(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),gs(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const y=Fa(r.current).includes(f.animationName);if(f.target===t&&y&&(l("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},p=f=>{f.target===t&&(i.current=Fa(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:A.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Fa(e){return(e==null?void 0:e.animationName)||"none"}function T_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function S_({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=E_({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Un(n),l=A.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function E_({defaultProp:e,onChange:t}){const n=A.useState(e),[r]=n,o=A.useRef(r),i=Un(t);return A.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var C_="VisuallyHidden",Af=A.forwardRef((e,t)=>x.jsx(Vn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Af.displayName=C_;var If="ToastProvider",[Of,k_,R_]=l_("Toast"),[y0,AV]=u0("Toast",[R_]),[P_,ul]=y0(If),x0=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=A.useState(null),[c,u]=A.useState(0),d=A.useRef(!1),p=A.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${If}\`. Expected non-empty \`string\`.`),x.jsx(Of.Provider,{scope:t,children:x.jsx(P_,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:A.useCallback(()=>u(f=>f+1),[]),onToastRemove:A.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};x0.displayName=If;var b0="ToastViewport",A_=["F8"],Qu="toast.viewportPause",Ju="toast.viewportResume",w0=A.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=A_,label:o="Notifications ({hotkey})",...i}=e,a=ul(b0,n),s=k_(n),l=A.useRef(null),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),p=Wr(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a.toastCount>0;A.useEffect(()=>{const m=v=>{var b;r.length!==0&&r.every(S=>v[S]||v.code===S)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[r]),A.useEffect(()=>{const m=l.current,v=d.current;if(h&&m&&v){const g=()=>{if(!a.isClosePausedRef.current){const w=new CustomEvent(Qu);v.dispatchEvent(w),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const w=new CustomEvent(Ju);v.dispatchEvent(w),a.isClosePausedRef.current=!1}},S=w=>{!m.contains(w.relatedTarget)&&b()},T=()=>{m.contains(document.activeElement)||b()};return m.addEventListener("focusin",g),m.addEventListener("focusout",S),m.addEventListener("pointermove",g),m.addEventListener("pointerleave",T),window.addEventListener("blur",g),window.addEventListener("focus",b),()=>{m.removeEventListener("focusin",g),m.removeEventListener("focusout",S),m.removeEventListener("pointermove",g),m.removeEventListener("pointerleave",T),window.removeEventListener("blur",g),window.removeEventListener("focus",b)}}},[h,a.isClosePausedRef]);const y=A.useCallback(({tabbingDirection:m})=>{const g=s().map(b=>{const S=b.ref.current,T=[S,...H_(S)];return m==="forwards"?T:T.reverse()});return(m==="forwards"?g.reverse():g).flat()},[s]);return A.useEffect(()=>{const m=d.current;if(m){const v=g=>{var T,w,C;const b=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!b){const R=document.activeElement,I=g.shiftKey;if(g.target===m&&I){(T=c.current)==null||T.focus();return}const N=y({tabbingDirection:I?"backwards":"forwards"}),V=N.findIndex(k=>k===R);Vc(N.slice(V+1))?g.preventDefault():I?(w=c.current)==null||w.focus():(C=u.current)==null||C.focus()}};return m.addEventListener("keydown",v),()=>m.removeEventListener("keydown",v)}},[s,y]),x.jsxs(y_,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&x.jsx(ed,{ref:c,onFocusFromOutsideViewport:()=>{const m=y({tabbingDirection:"forwards"});Vc(m)}}),x.jsx(Of.Slot,{scope:n,children:x.jsx(Vn.ol,{tabIndex:-1,...i,ref:p})}),h&&x.jsx(ed,{ref:u,onFocusFromOutsideViewport:()=>{const m=y({tabbingDirection:"backwards"});Vc(m)}})]})});w0.displayName=b0;var T0="ToastFocusProxy",ed=A.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=ul(T0,n);return x.jsx(Af,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&r()}})});ed.displayName=T0;var dl="Toast",I_="toast.swipeStart",O_="toast.swipeMove",__="toast.swipeCancel",M_="toast.swipeEnd",S0=A.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=S_({prop:r,defaultProp:o,onChange:i});return x.jsx(v0,{present:n||s,children:x.jsx(N_,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Un(e.onPause),onResume:Un(e.onResume),onSwipeStart:Qt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Qt(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Qt(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Qt(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});S0.displayName=dl;var[D_,j_]=y0(dl,{onClose(){}}),N_=A.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...h}=e,y=ul(dl,n),[m,v]=A.useState(null),g=Wr(t,k=>v(k)),b=A.useRef(null),S=A.useRef(null),T=o||y.duration,w=A.useRef(0),C=A.useRef(T),R=A.useRef(0),{onToastAdd:I,onToastRemove:P}=y,j=Un(()=>{var M;(m==null?void 0:m.contains(document.activeElement))&&((M=y.viewport)==null||M.focus()),a()}),N=A.useCallback(k=>{!k||k===1/0||(window.clearTimeout(R.current),w.current=new Date().getTime(),R.current=window.setTimeout(j,k))},[j]);A.useEffect(()=>{const k=y.viewport;if(k){const M=()=>{N(C.current),c==null||c()},D=()=>{const L=new Date().getTime()-w.current;C.current=C.current-L,window.clearTimeout(R.current),l==null||l()};return k.addEventListener(Qu,D),k.addEventListener(Ju,M),()=>{k.removeEventListener(Qu,D),k.removeEventListener(Ju,M)}}},[y.viewport,T,l,c,N]),A.useEffect(()=>{i&&!y.isClosePausedRef.current&&N(T)},[i,T,y.isClosePausedRef,N]),A.useEffect(()=>(I(),()=>P()),[I,P]);const V=A.useMemo(()=>m?A0(m):null,[m]);return y.viewport?x.jsxs(x.Fragment,{children:[V&&x.jsx(F_,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),x.jsx(D_,{scope:n,onClose:j,children:Gs.createPortal(x.jsx(Of.ItemSlot,{scope:n,children:x.jsx(v_,{asChild:!0,onEscapeKeyDown:Qt(s,()=>{y.isFocusedToastEscapeKeyDownRef.current||j(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(Vn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection,...h,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Qt(e.onKeyDown,k=>{k.key==="Escape"&&(s==null||s(k.nativeEvent),k.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,j()))}),onPointerDown:Qt(e.onPointerDown,k=>{k.button===0&&(b.current={x:k.clientX,y:k.clientY})}),onPointerMove:Qt(e.onPointerMove,k=>{if(!b.current)return;const M=k.clientX-b.current.x,D=k.clientY-b.current.y,L=!!S.current,_=["left","right"].includes(y.swipeDirection),z=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,O=_?z(0,M):0,B=_?0:z(0,D),Q=k.pointerType==="touch"?10:2,re={x:O,y:B},J={originalEvent:k,delta:re};L?(S.current=re,La(O_,d,J,{discrete:!1})):wg(re,y.swipeDirection,Q)?(S.current=re,La(I_,u,J,{discrete:!1}),k.target.setPointerCapture(k.pointerId)):(Math.abs(M)>Q||Math.abs(D)>Q)&&(b.current=null)}),onPointerUp:Qt(e.onPointerUp,k=>{const M=S.current,D=k.target;if(D.hasPointerCapture(k.pointerId)&&D.releasePointerCapture(k.pointerId),S.current=null,b.current=null,M){const L=k.currentTarget,_={originalEvent:k,delta:M};wg(M,y.swipeDirection,y.swipeThreshold)?La(M_,f,_,{discrete:!0}):La(__,p,_,{discrete:!0}),L.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),F_=e=>{const{__scopeToast:t,children:n,...r}=e,o=ul(dl,t),[i,a]=A.useState(!1),[s,l]=A.useState(!1);return $_(()=>a(!0)),A.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:x.jsx(g0,{asChild:!0,children:x.jsx(Af,{...r,children:i&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},L_="ToastTitle",E0=A.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(Vn.div,{...r,ref:t})});E0.displayName=L_;var V_="ToastDescription",C0=A.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(Vn.div,{...r,ref:t})});C0.displayName=V_;var k0="ToastAction",z_=A.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(P0,{altText:n,asChild:!0,children:x.jsx(_f,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${k0}\`. Expected non-empty \`string\`.`),null)});z_.displayName=k0;var R0="ToastClose",_f=A.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=j_(R0,n);return x.jsx(P0,{asChild:!0,children:x.jsx(Vn.button,{type:"button",...r,ref:t,onClick:Qt(e.onClick,o.onClose)})})});_f.displayName=R0;var P0=A.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(Vn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function A0(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),B_(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...A0(r))}}),t}function La(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?d0(o,i):o.dispatchEvent(i)}var wg=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function $_(e=()=>{}){const t=Un(e);gs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function B_(e){return e.nodeType===e.ELEMENT_NODE}function H_(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Vc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var W_=x0,q_=w0,U_=S0,G_=E0,Y_=C0,K_=_f;const Z_=e=>{const[t,n]=E.useState(!1),r=()=>n(!0),o=()=>n(!1);return E.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},X_=Xo("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),I0=E.createContext(()=>{throw new Error("Not implemented")}),Q_=()=>E.useContext(I0),Tg={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}},J_=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=X_({theme:t.theme||"default"});return x.jsx(U_,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:x.jsx(vt.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:Tg[t.reversedIndex]||Tg.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:x.jsxs("div",{className:a,children:[x.jsxs("div",{className:"flex flex-col p-4",children:[t.title?x.jsx(G_,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(Y_,{className:"select-text truncate",children:t.text})]}),r?x.jsx(K_,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(xf,{className:"h-5 w-5"})}):null]})})})});function eM({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=Z_(r),[i,a]=E.useState([]),s=E.useCallback(()=>a([]),[]);E.useEffect(()=>s,[s]);const l=E.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const h=[...f,{...u,id:d,text:c}];return h.length>t?h.slice(h.length-t,h.length+1):h}),{clear:s,close:()=>a(f=>f.filter(h=>h.id!==d))}},[t]);return x.jsxs(W_,{duration:n,swipeThreshold:150,children:[x.jsx(I0.Provider,{value:l,children:e}),x.jsx(vr,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(h=>h.id!==c.id));return E.createElement(J_,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),x.jsx(q_,{ref:r,"data-items":i.length,style:{justifyContent:"start",height:`${(o?i.length:Math.min(1,i.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const tM=e=>x.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow",children:[x.jsxs("header",{className:"flex items-start gap-4 p-6",children:[x.jsx("div",{className:ze("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:x.jsx("div",{children:x.jsx(e.Icon,{className:"aspect-square size-10 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]}),O0=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},_0=E.createContext(""),nM=e=>{const[t,n]=O0(e.active),r=Do(0),o=Do(0),i=E.useRef(null);E.useEffect(()=>{const c=i.current;if(c===null)return;const u=h=>{if(!h)return;const y=h.getBoundingClientRect();o.set(y.width),r.set(h.offsetLeft)},d=()=>{const h=c.querySelector("li[data-active=true]");return void u(h)};window.addEventListener("resize",d);let p=c.querySelector("li[data-active=true]");const f=window.location.hash.replace(/^#/,"");if(e.active===""&&f!==""&&(p=c.querySelector(`li[data-id="${f}"]`),n(f)),p===null){p=c.querySelector("li[data-id]");const h=p.getAttribute("data-id")||"";n(h)}return u(p),()=>window.removeEventListener("resize",d)},[]);const a=zi(e.onChange);E.useEffect(()=>{a.current&&a.current(t)},[a,t]);const s=E.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(_0.Provider,{value:t,children:x.jsx(s0,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:x.jsx("header",{ref:i,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:x.jsx("nav",{className:"min-w-0",children:x.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:s.map(c=>{const u=c.props;return x.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"w-full border-b-2 transition-all border-card-border data-[active=true]:border-primary data-[active=true]:text-primary",children:x.jsx(cn,{onClick:l,"data-id":u.id,"aria-current":"page",as:e.useHash?"a":"button",href:e.useHash?`#${u.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:u.title})},`tab-header-${u.id}`)})})})}),children:e.children})})},rM=()=>E.useContext(_0),oM=e=>{const t=rM();return x.jsx(E.Fragment,{children:e.id===t?e.children:null})},fl=e=>x.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[x.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),x.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});fl.Icon=function(t){return x.jsx("header",{...t,className:ze("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})};fl.Body=function(t){return x.jsx(cn,{...t,className:ze("min-w-0 flex-1",t.className),children:t.children})};fl.Right=function(t){return x.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:x.jsx(cn,{...t,type:"button"})})};const iM=e=>x.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function pl(){return typeof window<"u"}function xr(e){return M0(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zn(e){var t;return(t=(M0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function M0(e){return pl()?e instanceof Node||e instanceof Bt(e).Node:!1}function Qe(e){return pl()?e instanceof Element||e instanceof Bt(e).Element:!1}function bt(e){return pl()?e instanceof HTMLElement||e instanceof Bt(e).HTMLElement:!1}function td(e){return!pl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function ga(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=nn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function aM(e){return["table","td","th"].includes(xr(e))}function hl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Mf(e){const t=Df(),n=Qe(e)?nn(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function sM(e){let t=Gn(e);for(;bt(t)&&!fr(t);){if(Mf(t))return t;if(hl(t))return null;t=Gn(t)}return null}function Df(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function fr(e){return["html","body","#document"].includes(xr(e))}function nn(e){return Bt(e).getComputedStyle(e)}function ml(e){return Qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gn(e){if(xr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||td(e)&&e.host||Zn(e);return td(t)?t.host:t}function D0(e){const t=Gn(e);return fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:bt(t)&&ga(t)?t:D0(t)}function cr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=D0(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Bt(o);if(i){const s=nd(a);return t.concat(a,a.visualViewport||[],ga(o)?o:[],s&&n?cr(s):[])}return t.concat(o,cr(o,[],n))}function nd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gn(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 mt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&td(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function jf(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function j0(){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 N0(e){return e.mozInputSource===0&&e.isTrusted?!0:rd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Nf(e){return lM()?!1:!rd()&&e.width===0&&e.height===0||rd()&&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 Ff(){return/apple/i.test(navigator.vendor)}function rd(){const e=/android/i;return e.test(jf())||e.test(j0())}function F0(){return jf().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function lM(){return j0().includes("jsdom/")}function zo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function cM(e){return"nativeEvent"in e}function uM(e){return e.matches("html,body")}function It(e){return(e==null?void 0:e.ownerDocument)||document}function zc(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 Pn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const dM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Lf(e){return bt(e)&&e.matches(dM)}function Dt(e){e.preventDefault(),e.stopPropagation()}function L0(e){return e?e.getAttribute("role")==="combobox"&&Lf(e):!1}const An=Math.min,Xt=Math.max,vs=Math.round,So=Math.floor,pr=e=>({x:e,y:e}),fM={left:"right",right:"left",bottom:"top",top:"bottom"},pM={start:"end",end:"start"};function od(e,t,n){return Xt(e,An(t,n))}function ii(e,t){return typeof e=="function"?e(t):e}function hr(e){return e.split("-")[0]}function ai(e){return e.split("-")[1]}function V0(e){return e==="x"?"y":"x"}function Vf(e){return e==="y"?"height":"width"}function qr(e){return["top","bottom"].includes(hr(e))?"y":"x"}function zf(e){return V0(qr(e))}function hM(e,t,n){n===void 0&&(n=!1);const r=ai(e),o=zf(e),i=Vf(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ys(a)),[a,ys(a)]}function mM(e){const t=ys(e);return[id(e),t,id(t)]}function id(e){return e.replace(/start|end/g,t=>pM[t])}function gM(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function vM(e,t,n,r){const o=ai(e);let i=gM(hr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(id)))),i}function ys(e){return e.replace(/left|right|bottom|top/g,t=>fM[t])}function yM(e){return{top:0,right:0,bottom:0,left:0,...e}}function z0(e){return typeof e!="number"?yM(e):{top:e,right:e,bottom:e,left:e}}function xs(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
|
|
170
170
|
* tabbable 6.2.0
|
|
171
171
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
172
|
-
*/var vM=["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])"],$a=vM.join(","),Q0=typeof Element>"u",Go=Q0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ba=!Q0&&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},Wa=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},bM=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},xM=function(t,n,r){if(Wa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll($a));return n&&Go.call(t,$a)&&o.unshift(t),o=o.filter(r),o},wM=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Wa(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=Go.call(i,$a);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!Wa(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},J0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ex=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||bM(t))&&!J0(t)?0:t.tabIndex},SM=function(t,n){var r=ex(t);return r<0&&n&&!J0(t)?0:r},TM=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},tx=function(t){return t.tagName==="INPUT"},EM=function(t){return tx(t)&&t.type==="hidden"},CM=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},RM=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},PM=function(t){if(!t.name)return!0;var n=t.form||Ba(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=RM(o,t.form);return!s||s===t},kM=function(t){return tx(t)&&t.type==="radio"},IM=function(t){return kM(t)&&!PM(t)},AM=function(t){var n,r=t&&Ba(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=Ba(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},Np=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},OM=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=Go.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Go.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=Ba(t);if(l&&!l.shadowRoot&&o(l)===!0)return Np(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(AM(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Np(t);return!1},_M=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 Go.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},MM=function(t,n){return!(n.disabled||Wa(n)||EM(n)||OM(n,t)||CM(n)||_M(n))},Fu=function(t,n){return!(IM(n)||ex(n)<0||!MM(t,n))},DM=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},NM=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=SM(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(TM).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},ri=function(t,n){n=n||{};var r;return n.getShadowRoot?r=wM([t],n.includeContainer,{filter:Fu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:DM}):r=xM(t,n.includeContainer,Fu.bind(null,n)),NM(r)},jM=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Go.call(t,$a)===!1?!1:Fu(n,t)};function jp(e,t,n){let{reference:r,floating:o}=e;const s=Wr(t),i=If(t),a=kf(i),l=lr(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(ds(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}const LM=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}=jp(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:v,fn:b}=a[m],{x:y,y:g,data:T,reset:S}=await b({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=y??u,d=g??d,h={...h,[v]:{...h[v],...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}=jp(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function Af(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}=us(t,e),p=X0(h),v=a[f?d==="floating"?"reference":"floating":d],b=Va(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=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=Va(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:g,strategy:l}):y);return{top:(b.top-S.top+p.top)/T.y,bottom:(S.bottom-b.bottom+p.bottom)/T.y,left:(b.left-S.left+p.left)/T.x,right:(S.right-b.right+p.right)/T.x}}const FM=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}=us(e,t)||{};if(c==null)return{};const d=X0(u),f={x:n,y:r},h=If(o),p=kf(h),m=await i.getDimensions(c),v=h==="y",b=v?"top":"left",y=v?"bottom":"right",g=v?"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,A=Cn(d[b],I),N=Cn(d[y],I),M=A,L=C-m[p]-N,P=C/2-m[p]/2+k,O=ju(M,P,L),j=!l.arrow&&ds(o)!=null&&P!==O&&s.reference[p]/2-(P<M?A:N)-m[p]/2<0,D=j?P<M?P-M:P-L:0;return{[h]:f[h]+D,data:{[h]:O,centerOffset:P-O-D,...j&&{alignmentOffset:D}},reset:j}}}),VM=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,...v}=us(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=lr(o),y=Wr(a),g=lr(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(g||!m?[Fa(a)]:mM(a)),E=p!=="none";!f&&E&&S.push(...gM(a,m,p,T));const C=[a,...S],k=await Af(t,v),I=[];let A=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[b]),d){const P=hM(o,i,T);I.push(k[P[0]],k[P[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every(P=>P<=0)){var N,M;const P=(((N=s.flip)==null?void 0:N.index)||0)+1,O=C[P];if(O)return{data:{index:P,overflows:A},reset:{placement:O}};let j=(M=A.filter(D=>D.overflows[0]<=0).sort((D,V)=>D.overflows[1]-V.overflows[1])[0])==null?void 0:M.placement;if(!j)switch(h){case"bestFit":{var L;const D=(L=A.filter(V=>{if(E){const H=Wr(V.placement);return H===y||H==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(H=>H>0).reduce((H,_)=>H+_,0)]).sort((V,H)=>V[1]-H[1])[0])==null?void 0:L[0];D&&(j=D);break}case"initialPlacement":j=a;break}if(o!==j)return{reset:{placement:j}}}return{}}}};async function $M(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=lr(n),a=ds(n),l=Wr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=us(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 BM=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 $M(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}}}}},WM=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:v=>{let{x:b,y}=v;return{x:b,y}}},...l}=us(e,t),c={x:n,y:r},u=await Af(t,l),d=Wr(lr(o)),f=Z0(d);let h=c[f],p=c[d];if(s){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",y=h+u[v],g=h-u[b];h=ju(y,h,g)}if(i){const v=d==="y"?"top":"left",b=d==="y"?"bottom":"right",y=p+u[v],g=p-u[b];p=ju(y,p,g)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},zM=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}=us(e,t),l=await Af(t,a),c=lr(n),u=ds(n),d=Wr(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 v=h-l.top-l.bottom,b=f-l.left-l.right,y=Cn(h-l[p],v),g=Cn(f-l[m],b),T=!t.middlewareData.shift;let S=y,E=g;if(d?E=u||T?Cn(g,b):b:S=u||T?Cn(y,v):v,T&&!u){const k=Yt(l.left,0),I=Yt(l.right,0),A=Yt(l.top,0),N=Yt(l.bottom,0);d?E=f-2*(k!==0||I!==0?k+I:Yt(l.left,l.right)):S=h-2*(A!==0||N!==0?A+N:Yt(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 nx(e){const t=Qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ht(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=La(n)!==s||La(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Of(e){return He(e)?e:e.contextElement}function Ro(e){const t=Of(e);if(!ht(t))return ar(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=nx(t);let i=(s?La(n.width):n.width)/r,a=(s?La(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const HM=ar(0);function rx(e){const t=Vt(e);return!Tf()||!t.visualViewport?HM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function UM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vt(e)?!1:t}function zr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Of(e);let i=ar(1);t&&(r?He(r)&&(i=Ro(r)):i=Ro(e));const a=UM(s,n,r)?rx(s):ar(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=Vt(s),h=r&&He(r)?Vt(r):r;let p=f,m=Du(p);for(;m&&r&&h!==p;){const v=Ro(m),b=m.getBoundingClientRect(),y=Qt(m),g=b.left+(m.clientLeft+parseFloat(y.paddingLeft))*v.x,T=b.top+(m.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=g,c+=T,p=Vt(m),m=Du(p)}}return Va({width:u,height:d,x:l,y:c})}function GM(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Yn(r),a=t?Pl(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=ar(1);const u=ar(0),d=ht(r);if((d||!d&&!s)&&((mr(r)!=="body"||Ri(i))&&(l=kl(r)),ht(r))){const f=zr(r);c=Ro(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 YM(e){return Array.from(e.getClientRects())}function ox(e){return zr(Yn(e)).left+kl(e).scrollLeft}function qM(e){const t=Yn(e),n=kl(e),r=e.ownerDocument.body,o=Yt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Yt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ox(e);const a=-n.scrollTop;return Qt(r).direction==="rtl"&&(i+=Yt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function KM(e,t){const n=Vt(e),r=Yn(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=Tf();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function ZM(e,t){const n=zr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ht(e)?Ro(e):ar(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 Lp(e,t,n){let r;if(t==="viewport")r=KM(e,n);else if(t==="document")r=qM(Yn(e));else if(He(t))r=ZM(t,n);else{const o=rx(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Va(r)}function sx(e,t){const n=Hn(e);return n===t||!He(n)||ir(n)?!1:Qt(n).position==="fixed"||sx(n,t)}function XM(e,t){const n=t.get(e);if(n)return n;let r=rr(e,[],!1).filter(a=>He(a)&&mr(a)!=="body"),o=null;const s=Qt(e).position==="fixed";let i=s?Hn(e):e;for(;He(i)&&!ir(i);){const a=Qt(i),l=Sf(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ri(i)&&!l&&sx(e,i))?r=r.filter(u=>u!==i):o=a,i=Hn(i)}return t.set(e,r),r}function QM(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Pl(t)?[]:XM(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=Lp(t,u,o);return c.top=Yt(d.top,c.top),c.right=Cn(d.right,c.right),c.bottom=Cn(d.bottom,c.bottom),c.left=Yt(d.left,c.left),c},Lp(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function JM(e){const{width:t,height:n}=nx(e);return{width:t,height:n}}function eD(e,t,n){const r=ht(t),o=Yn(t),s=n==="fixed",i=zr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=ar(0);if(r||!r&&!s)if((mr(t)!=="body"||Ri(o))&&(a=kl(t)),r){const d=zr(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=ox(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 bc(e){return Qt(e).position==="static"}function Fp(e,t){return!ht(e)||Qt(e).position==="fixed"?null:t?t(e):e.offsetParent}function ix(e,t){const n=Vt(e);if(Pl(e))return n;if(!ht(e)){let o=Hn(e);for(;o&&!ir(o);){if(He(o)&&!bc(o))return o;o=Hn(o)}return n}let r=Fp(e,t);for(;r&&sM(r)&&bc(r);)r=Fp(r,t);return r&&ir(r)&&bc(r)&&!Sf(r)?n:r||iM(e)||n}const tD=async function(e){const t=this.getOffsetParent||ix,n=this.getDimensions,r=await n(e.floating);return{reference:eD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nD(e){return Qt(e).direction==="rtl"}const rD={convertOffsetParentRelativeRectToViewportRelativeRect:GM,getDocumentElement:Yn,getClippingRect:QM,getOffsetParent:ix,getElementRects:tD,getClientRects:YM,getDimensions:JM,getScale:Ro,isElement:He,isRTL:nD};function oD(e,t){let n=null,r;const o=Yn(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=Eo(u),p=Eo(o.clientWidth-(c+d)),m=Eo(o.clientHeight-(u+f)),v=Eo(c),y={rootMargin:-h+"px "+-p+"px "+-m+"px "+-v+"px",threshold:Yt(0,Cn(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,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,y)}n.observe(e)}return i(!0),s}function Pi(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=Of(e),u=o||s?[...c?rr(c):[],...rr(t)]:[];u.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const d=c&&a?oD(c,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(b=>{let[y]=b;y&&y.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?zr(e):null;l&&v();function v(){const b=zr(e);m&&(b.x!==m.x||b.y!==m.y||b.width!==m.width||b.height!==m.height)&&n(),m=b,p=requestAnimationFrame(v)}return n(),()=>{var b;u.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d==null||d(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const sD=BM,iD=WM,aD=VM,lD=zM,Vp=FM,cD=(e,t,n)=>{const r=new Map,o={platform:rD,...n},s={...o.platform,_c:r};return LM(e,t,{...o,platform:s})};var da=typeof document<"u"?x.useLayoutEffect:x.useEffect;function za(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(!za(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)&&!za(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ax(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $p(e,t){const n=ax(e);return Math.round(t*n)/n}function Bp(e){const t=R.useRef(e);return da(()=>{t.current=e}),t}function uD(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]=R.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=R.useState(r);za(f,r)||h(r);const[p,m]=R.useState(null),[v,b]=R.useState(null),y=R.useCallback(D=>{D!==E.current&&(E.current=D,m(D))},[]),g=R.useCallback(D=>{D!==C.current&&(C.current=D,b(D))},[]),T=s||p,S=i||v,E=R.useRef(null),C=R.useRef(null),k=R.useRef(u),I=l!=null,A=Bp(l),N=Bp(o),M=R.useCallback(()=>{if(!E.current||!C.current)return;const D={placement:t,strategy:n,middleware:f};N.current&&(D.platform=N.current),cD(E.current,C.current,D).then(V=>{const H={...V,isPositioned:!0};L.current&&!za(k.current,H)&&(k.current=H,gi.flushSync(()=>{d(H)}))})},[f,t,n,N]);da(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(D=>({...D,isPositioned:!1})))},[c]);const L=R.useRef(!1);da(()=>(L.current=!0,()=>{L.current=!1}),[]),da(()=>{if(T&&(E.current=T),S&&(C.current=S),T&&S){if(A.current)return A.current(T,S,M);M()}},[T,S,M,A,I]);const P=R.useMemo(()=>({reference:E,floating:C,setReference:y,setFloating:g}),[y,g]),O=R.useMemo(()=>({reference:T,floating:S}),[T,S]),j=R.useMemo(()=>{const D={position:n,left:0,top:0};if(!O.floating)return D;const V=$p(O.floating,u.x),H=$p(O.floating,u.y);return a?{...D,transform:"translate("+V+"px, "+H+"px)",...ax(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:H}},[n,a,O.floating,u.x,u.y]);return R.useMemo(()=>({...u,update:M,refs:P,elements:O,floatingStyles:j}),[u,M,P,O,j])}const dD=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?Vp({element:r.current,padding:o}).fn(n):{}:r?Vp({element:r,padding:o}).fn(n):{}}}},ki=(e,t)=>({...sD(e),options:[e,t]}),_f=(e,t)=>({...iD(e),options:[e,t]}),Mf=(e,t)=>({...aD(e),options:[e,t]}),lx=(e,t)=>({...lD(e),options:[e,t]}),cx=(e,t)=>({...dD(e),options:[e,t]});function Vu(e){return R.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const ux={...R},fD=ux.useInsertionEffect,hD=fD||(e=>e());function xt(e){const t=R.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return hD(()=>{t.current=e}),R.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 Df="ArrowUp",Ii="ArrowDown",Yo="ArrowLeft",fs="ArrowRight";function Zi(e,t,n){return Math.floor(e/t)!==n}function Bs(e,t){return t<0||t>=e.current.length}function xc(e,t){return _t(e,{disabledIndices:t})}function Wp(e,t){return _t(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function _t(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount: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&&fa(i,a,o));return a}function mD(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===Df){if(u&&kt(n),c===-1)d=l;else if(d=_t(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}Bs(e,d)&&(d=c)}if(n.key===Ii&&(u&&kt(n),c===-1?d=a:(d=_t(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(d=_t(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),Bs(e,d)&&(d=c)),r==="both"){const f=Eo(c/s);n.key===fs&&(u&&kt(n),c%s!==s-1?(d=_t(e,{startingIndex:c,disabledIndices:i}),o&&Zi(d,s,f)&&(d=_t(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(d=_t(e,{startingIndex:c-c%s-1,disabledIndices:i})),Zi(d,s,f)&&(d=c)),n.key===Yo&&(u&&kt(n),c%s!==0?(d=_t(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&Zi(d,s,f)&&(d=_t(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(d=_t(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),Zi(d,s,f)&&(d=c));const h=Eo(l/s)===f;Bs(e,d)&&(o&&h?d=n.key===Yo?l:_t(e,{startingIndex:c-c%s-1,disabledIndices:i}):d=c)}return d}function pD(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 gD(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 yD(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function fa(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 zp=0;function Jn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(zp);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():zp=requestAnimationFrame(s)}var Ae=typeof document<"u"?x.useLayoutEffect:x.useEffect;function vD(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 bD(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 dx=R.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function xD(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,s]=R.useState(()=>new Map),i=R.useCallback(l=>{s(c=>new Map(c).set(l,null))},[]),a=R.useCallback(l=>{s(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Ae(()=>{const l=new Map(o);Array.from(l.keys()).sort(vD).forEach((u,d)=>{l.set(u,d)}),bD(o,l)||s(l)},[o]),R.createElement(dx.Provider,{value:R.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function fx(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=R.useContext(dx),[a,l]=R.useState(null),c=R.useRef(null),u=R.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 Ae(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ae(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),R.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function qo(){return qo=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},qo.apply(this,arguments)}let Hp=!1,wD=0;const Up=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+wD++;function SD(){const[e,t]=R.useState(()=>Hp?Up():void 0);return Ae(()=>{e==null&&t(Up())},[]),R.useEffect(()=>{Hp=!0},[]),e}const TD=ux.useId,hs=TD||SD;let oi;process.env.NODE_ENV!=="production"&&(oi=new Set);function ha(){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=oi)!=null&&e.has(o))){var s;(s=oi)==null||s.add(o),console.warn(o)}}function ED(){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=oi)!=null&&e.has(o))){var s;(s=oi)==null||s.add(o),console.error(o)}}const hx=R.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||ha("The `ref` prop is required for `FloatingArrow`."));const v=hs(),[b,y]=R.useState(!1);if(Ae(()=>{if(!o)return;Qt(o).direction==="rtl"&&y(!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,A=C==="top"||C==="bottom",N=u&&k==="end"?"bottom":"top";let M=u&&k==="end"?"right":"left";u&&b&&(M=k==="end"?"left":"right");const L=(s==null?void 0:s.x)!=null?u||s.x:"",P=(s==null?void 0:s.y)!=null?u||s.y:"",O=f||"M0,0"+(" H"+i)+(" L"+(i-S)+","+(a-E))+(" Q"+i/2+","+a+" "+S+","+(a-E))+" Z",j={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return R.createElement("svg",qo({},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",[M]:L,[N]:P,[C]:A||I?"100%":"calc(100% - "+g/2+"px)",transform:""+j+(h??""),...p}}),g>0&&R.createElement("path",{clipPath:"url(#"+v+")",fill:"none",stroke:d,strokeWidth:g+(f?0:1),d:O}),R.createElement("path",{stroke:g&&!f?m.fill:"none",d:O}),R.createElement("clipPath",{id:v},R.createElement("rect",{x:-T,y:T*(I?-1:1),width:i+g,height:i})))});function mx(){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 px=R.createContext(null),gx=R.createContext(null),pr=()=>{var e;return((e=R.useContext(px))==null?void 0:e.id)||null},gr=()=>R.useContext(gx);function CD(e){const t=hs(),n=gr(),o=pr();return Ae(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function RD(e){const{children:t,id:n}=e,r=pr();return R.createElement(px.Provider,{value:R.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function PD(e){const{children:t}=e,n=R.useRef([]),r=R.useCallback(i=>{n.current=[...n.current,i]},[]),o=R.useCallback(i=>{n.current=n.current.filter(a=>a!==i)},[]),s=R.useState(()=>mx())[0];return R.createElement(gx.Provider,{value:R.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function cr(e){return"data-floating-ui-"+e}function It(e){const t=x.useRef(e);return Ae(()=>{t.current=e}),t}const Gp=cr("safe-polygon");function wc(e,t,n){return n&&!Uo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function yx(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=gr(),p=pr(),m=It(c),v=It(l),b=It(n),y=R.useRef(),g=R.useRef(-1),T=R.useRef(),S=R.useRef(-1),E=R.useRef(!0),C=R.useRef(!1),k=R.useRef(()=>{}),I=R.useCallback(()=>{var O;const j=(O=o.current.openEvent)==null?void 0:O.type;return(j==null?void 0:j.includes("mouse"))&&j!=="mousedown"},[o]);R.useEffect(()=>{if(!a)return;function O(j){let{open:D}=j;D||(clearTimeout(g.current),clearTimeout(S.current),E.current=!0)}return s.on("openchange",O),()=>{s.off("openchange",O)}},[a,s]),R.useEffect(()=>{if(!a||!m.current||!n)return;function O(D){I()&&r(!1,D,"hover")}const j=Tt(i.floating).documentElement;return j.addEventListener("mouseleave",O),()=>{j.removeEventListener("mouseleave",O)}},[i.floating,n,r,a,m,I]);const A=R.useCallback(function(O,j,D){j===void 0&&(j=!0),D===void 0&&(D="hover");const V=wc(v.current,"close",y.current);V&&!T.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,O,D),V)):j&&(clearTimeout(g.current),r(!1,O,D))},[v,r]),N=xt(()=>{k.current(),T.current=void 0}),M=xt(()=>{if(C.current){const O=Tt(i.floating).body;O.style.pointerEvents="",O.removeAttribute(Gp),C.current=!1}});R.useEffect(()=>{if(!a)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function j(_){if(clearTimeout(g.current),E.current=!1,u&&!Uo(y.current)||d>0&&!wc(v.current,"open"))return;const $=wc(v.current,"open",y.current);$?g.current=window.setTimeout(()=>{b.current||r(!0,_,"hover")},$):r(!0,_,"hover")}function D(_){if(O())return;k.current();const $=Tt(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:_.clientX,y:_.clientY,onClose(){M(),N(),A(_,!0,"safe-polygon")}});const re=T.current;$.addEventListener("mousemove",re),k.current=()=>{$.removeEventListener("mousemove",re)};return}(y.current==="touch"?!at(i.floating,_.relatedTarget):!0)&&A(_)}function V(_){O()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:_.clientX,y:_.clientY,onClose(){M(),N(),A(_)}})(_))}if(He(i.domReference)){var H;const _=i.domReference;return n&&_.addEventListener("mouseleave",V),(H=i.floating)==null||H.addEventListener("mouseleave",V),f&&_.addEventListener("mousemove",j,{once:!0}),_.addEventListener("mouseenter",j),_.addEventListener("mouseleave",D),()=>{var $;n&&_.removeEventListener("mouseleave",V),($=i.floating)==null||$.removeEventListener("mouseleave",V),f&&_.removeEventListener("mousemove",j),_.removeEventListener("mouseenter",j),_.removeEventListener("mouseleave",D)}}},[i,a,e,u,d,f,A,N,M,r,n,b,h,v,m,o]),Ae(()=>{var O;if(a&&n&&(O=m.current)!=null&&O.__options.blockPointerEvents&&I()){const D=Tt(i.floating).body;D.setAttribute(Gp,""),D.style.pointerEvents="none",C.current=!0;const V=i.floating;if(He(i.domReference)&&V){var j;const H=i.domReference,_=h==null||(j=h.nodesRef.current.find($=>$.id===p))==null||(j=j.context)==null?void 0:j.elements.floating;return _&&(_.style.pointerEvents=""),H.style.pointerEvents="auto",V.style.pointerEvents="auto",()=>{H.style.pointerEvents="",V.style.pointerEvents=""}}}},[a,n,p,i,h,m,I]),Ae(()=>{n||(y.current=void 0,N(),M())},[n,N,M]),R.useEffect(()=>()=>{N(),clearTimeout(g.current),clearTimeout(S.current),M()},[a,i.domReference,N,M]);const L=R.useMemo(()=>{function O(j){y.current=j.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(j){const{nativeEvent:D}=j;function V(){!E.current&&!b.current&&r(!0,D,"hover")}u&&!Uo(y.current)||n||d===0||(clearTimeout(S.current),y.current==="touch"?V():S.current=window.setTimeout(V,d))}}},[u,r,n,b,d]),P=R.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(O){A(O.nativeEvent,!1)}}),[A]);return R.useMemo(()=>a?{reference:L,floating:P}:{},[a,L,P])}function kD(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 Fr(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 ID(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),Fr(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let co=new WeakMap,Xi=new WeakSet,Qi={},Sc=0;const AD=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,vx=e=>e&&(e.host||vx(e.parentNode)),OD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=vx(n);return e.contains(r)?r:null}).filter(n=>n!=null);function _D(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=OD(t,e),a=new Set,l=new Set(i),c=[];Qi[o]||(Qi[o]=new WeakMap);const u=Qi[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(mr(p)!=="script")if(a.has(p))f(p);else{const m=s?p.getAttribute(s):null,v=m!==null&&m!=="false",b=(co.get(p)||0)+1,y=(u.get(p)||0)+1;co.set(p,b),u.set(p,y),c.push(p),b===1&&v&&Xi.add(p),y===1&&p.setAttribute(o,""),!v&&s&&p.setAttribute(s,"true")}})}return Sc++,()=>{c.forEach(h=>{const p=(co.get(h)||0)-1,m=(u.get(h)||0)-1;co.set(h,p),u.set(h,m),p||(!Xi.has(h)&&s&&h.removeAttribute(s),Xi.delete(h)),m||h.removeAttribute(o)}),Sc--,Sc||(co=new WeakMap,co=new WeakMap,Xi=new WeakSet,Qi={})}}function Yp(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Tt(e[0]).body;return _D(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Ko=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function bx(e,t){const n=ri(e,Ko());t==="prev"&&n.reverse();const r=n.indexOf(ln(Tt(e)));return n.slice(r+1)[0]}function xx(){return bx(document.body,"next")}function wx(){return bx(document.body,"prev")}function Ws(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!at(n,r)}function MD(e){ri(e,Ko()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function DD(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 ND(e,t,n){const r=e.indexOf(t);function o(i){const a=cr("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||at(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const Nf={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 jD;function qp(e){e.key==="Tab"&&(e.target,clearTimeout(jD))}const Ha=R.forwardRef(function(t,n){const[r,o]=R.useState();Ae(()=>(Rf()&&o("button"),document.addEventListener("keydown",qp),()=>{document.removeEventListener("keydown",qp)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[cr("focus-guard")]:"",style:Nf};return R.createElement("span",qo({},t,s))}),Sx=R.createContext(null),Kp=cr("portal");function LD(e){e===void 0&&(e={});const{id:t,root:n}=e,r=hs(),o=Tx(),[s,i]=R.useState(null),a=R.useRef(null);return Ae(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),Ae(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Kp,""),l.appendChild(c),a.current=c,i(c)},[t,r]),Ae(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!He(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(Kp,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function Zr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=LD({id:n,root:r}),[i,a]=R.useState(null),l=R.useRef(null),c=R.useRef(null),u=R.useRef(null),d=R.useRef(null),f=!!i&&!i.modal&&i.open&&o&&!!(r||s);return R.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function h(p){s&&Ws(p)&&(p.type==="focusin"?DD:MD)(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]),R.createElement(Sx.Provider,{value:R.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s])},f&&s&&R.createElement(Ha,{"data-type":"outside",ref:l,onFocus:h=>{if(Ws(h,s)){var p;(p=u.current)==null||p.focus()}else{const m=wx()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),f&&s&&R.createElement("span",{"aria-owns":s.id,style:Nf}),s&&gi.createPortal(t,s),f&&s&&R.createElement(Ha,{"data-type":"outside",ref:c,onFocus:h=>{if(Ws(h,s)){var p;(p=d.current)==null||p.focus()}else{const m=xx()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,h.nativeEvent))}}}))}const Tx=()=>R.useContext(Sx),Zp=20;let Rr=[];function Tc(e){Rr=Rr.filter(n=>n.isConnected);let t=e;if(!(!t||mr(t)==="body")){if(!jM(t,Ko())){const n=ri(t,Ko())[0];n&&(t=n)}Rr.push(t),Rr.length>Zp&&(Rr=Rr.slice(-Zp))}}function Xp(){return Rr.slice().reverse().find(e=>e.isConnected)}const FD=R.forwardRef(function(t,n){return R.createElement("button",qo({},t,{type:"button",ref:n,tabIndex:-1,style:Nf}))});function ms(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:v,dataRef:b,floatingId:y,elements:{domReference:g,floating:T}}=t,S=typeof i=="number"&&i<0,E=K0(g)&&S,C=AD()?s:!0,k=It(o),I=It(i),A=It(a),N=gr(),M=Tx(),L=R.useRef(null),P=R.useRef(null),O=R.useRef(!1),j=R.useRef(!1),D=R.useRef(-1),V=M!=null,H=T==null?void 0:T.firstElementChild,_=(H==null?void 0:H.id)===y?H:T,$=xt(function(G){return G===void 0&&(G=_),G?ri(G,Ko()):[]}),K=xt(G=>{const F=$(G);return k.current.map(B=>g&&B==="reference"?g:_&&B==="floating"?_:F).filter(Boolean).flat()});R.useEffect(()=>{if(r||!c)return;function G(B){if(B.key==="Tab"){at(_,ln(Tt(_)))&&$().length===0&&!E&&kt(B);const z=K(),Y=Tn(B);k.current[0]==="reference"&&Y===g&&(kt(B),B.shiftKey?Jn(z[z.length-1]):Jn(z[1])),k.current[1]==="floating"&&Y===_&&B.shiftKey&&(kt(B),Jn(z[0]))}}const F=Tt(_);return F.addEventListener("keydown",G),()=>{F.removeEventListener("keydown",G)}},[r,g,_,c,k,E,$,K]),R.useEffect(()=>{if(r||!T)return;function G(F){const B=Tn(F),Y=$().indexOf(B);Y!==-1&&(D.current=Y)}return T.addEventListener("focusin",G),()=>{T.removeEventListener("focusin",G)}},[r,T,$]),R.useEffect(()=>{if(r||!d)return;function G(){j.current=!0,setTimeout(()=>{j.current=!1})}function F(B){const z=B.relatedTarget;queueMicrotask(()=>{const Y=!(at(g,z)||at(T,z)||at(z,T)||at(M==null?void 0:M.portalNode,z)||z!=null&&z.hasAttribute(cr("focus-guard"))||N&&(Fr(N.nodesRef.current,p).find(Q=>{var ue,U;return at((ue=Q.context)==null?void 0:ue.elements.floating,z)||at((U=Q.context)==null?void 0:U.elements.domReference,z)})||kD(N.nodesRef.current,p).find(Q=>{var ue,U;return((ue=Q.context)==null?void 0:ue.elements.floating)===z||((U=Q.context)==null?void 0:U.elements.domReference)===z})));if(l&&Y&&ln(Tt(_))===Tt(_).body){ht(_)&&(_==null||_.focus());const Q=D.current,ue=$(),U=ue[Q]||ue[ue.length-1]||_;ht(U)&&U.focus()}(E||!c)&&z&&Y&&!j.current&&z!==Xp()&&(O.current=!0,m(!1,B))})}if(T&&ht(g))return g.addEventListener("focusout",F),g.addEventListener("pointerdown",G),T.addEventListener("focusout",F),()=>{g.removeEventListener("focusout",F),g.removeEventListener("pointerdown",G),T.removeEventListener("focusout",F)}},[r,g,T,_,c,p,N,M,m,d,l,$,E]),R.useEffect(()=>{var G;if(r)return;const F=Array.from((M==null||(G=M.portalNode)==null?void 0:G.querySelectorAll("["+cr("portal")+"]"))||[]);if(T){const B=[T,...F,L.current,P.current,k.current.includes("reference")||E?g:null].filter(Y=>Y!=null),z=c||E?Yp(B,C,!C):Yp(B);return()=>{z()}}},[r,g,T,c,k,M,E,C]),Ae(()=>{if(r||!ht(_))return;const G=Tt(_),F=ln(G);queueMicrotask(()=>{const B=K(_),z=I.current,Y=(typeof z=="number"?B[z]:z.current)||_,Q=at(_,F);!S&&!Q&&f&&Jn(Y,{preventScroll:Y===_})})},[r,f,_,S,K,I]),Ae(()=>{if(r||!_)return;let G=!1;const F=Tt(_),B=ln(F);let Y=b.current.openEvent;const Q=h.domReference.current;Tc(B);function ue(U){let{open:ke,reason:qe,event:Le,nested:Te}=U;ke&&(Y=Le),qe==="escape-key"&&h.domReference.current&&Tc(h.domReference.current),qe==="hover"&&Le.type==="mouseleave"&&(O.current=!0),qe==="outside-press"&&(Te?(O.current=!1,G=!0):O.current=!(Y0(Le)||Cf(Le)))}return v.on("openchange",ue),()=>{v.off("openchange",ue);const U=ln(F),ke=at(T,U)||N&&Fr(N.nodesRef.current,p).some(q=>{var se;return at((se=q.context)==null?void 0:se.elements.floating,U)});(ke||Y&&["click","mousedown"].includes(Y.type))&&h.domReference.current&&Tc(h.domReference.current);const Le=Q||B,Te=ri(Tt(Le).body,Ko());queueMicrotask(()=>{let q=Xp();!q&&ht(Le)&&T&&(q=ND(Te,Le,T)),A.current&&!O.current&&ht(q)&&(!(q!==U&&U!==F.body)||ke)&&q.focus({preventScroll:G})})}},[r,T,_,A,b,h,v,N,p]),Ae(()=>{if(!r&&M)return M.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:m,refs:h}),()=>{M.setFocusManagerState(null)}},[r,M,c,f,m,h,d]),Ae(()=>{if(r||!_||typeof MutationObserver!="function"||S)return;const G=()=>{const B=_.getAttribute("tabindex"),z=$(),Y=ln(Tt(T)),Q=z.indexOf(Y);Q!==-1&&(D.current=Q),k.current.includes("floating")||Y!==h.domReference.current&&z.length===0?B!=="0"&&_.setAttribute("tabindex","0"):B!=="-1"&&_.setAttribute("tabindex","-1")};G();const F=new MutationObserver(G);return F.observe(_,{childList:!0,subtree:!0,attributes:!0}),()=>{F.disconnect()}},[r,T,_,h,k,$,S]);function re(G){return r||!u||!c?null:R.createElement(FD,{ref:G==="start"?L:P,onClick:F=>m(!1,F.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&C&&(c?!E:!0)&&(V||c);return R.createElement(R.Fragment,null,ee&&R.createElement(Ha,{"data-type":"inside",ref:M==null?void 0:M.beforeInsideRef,onFocus:G=>{if(c){const B=K();Jn(o[0]==="reference"?B[0]:B[B.length-1])}else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(O.current=!1,Ws(G,M.portalNode)){const B=xx()||g;B==null||B.focus()}else{var F;(F=M.beforeOutsideRef.current)==null||F.focus()}}}),!E&&re("start"),n,re("end"),ee&&R.createElement(Ha,{"data-type":"inside",ref:M==null?void 0:M.afterInsideRef,onFocus:G=>{if(c)Jn(K()[0]);else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(d&&(O.current=!0),Ws(G,M.portalNode)){const B=wx()||g;B==null||B.focus()}else{var F;(F=M.afterOutsideRef.current)==null||F.focus()}}}))}const Ec=new Set,VD=R.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=hs();return Ae(()=>{if(!r)return;Ec.add(s);const i=/iP(hone|ad|od)|iOS/.test(Ef()),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,v=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(v))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{Ec.delete(s),Ec.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[s,r]),R.createElement("div",qo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Qp(e){return ht(e.target)&&e.target.tagName==="BUTTON"}function Jp(e){return Pf(e)}function Ai(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=R.useRef(),f=R.useRef(!1),h=R.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(Uo(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}Uo(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||Qp(p))&&(p.key===" "&&!Jp(s)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Qp(p)||Jp(s)||p.key===" "&&f.current&&(f.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return R.useMemo(()=>i?{reference:h}:{},[i,h])}function $D(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var s;const i=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((s=t.dataRef.current.openEvent)==null?void 0:s.type)||"")&&t.pointerType!=="touch";let u=i.width,d=i.height,f=i.x,h=i.y;return n==null&&t.x&&a&&(n=i.x-t.x),r==null&&t.y&&l&&(r=i.y-t.y),f-=n||0,h-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?i.width:0,d=t.axis==="x"?i.height:0,f=a&&t.x!=null?t.x:f,h=l&&t.y!=null?t.y:h):o&&!c&&(d=t.axis==="x"?i.height:d,u=t.axis==="y"?i.width:u),o=!0,{width:u,height:d,x:f,y:h,top:h,right:f+u,bottom:h+d,left:f}}}}function eg(e){return e!=null&&e.clientX!=null}function BD(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:s},refs:i}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=R.useRef(!1),f=R.useRef(null),[h,p]=R.useState(),[m,v]=R.useState([]),b=xt((E,C)=>{d.current||r.current.openEvent&&!eg(r.current.openEvent)||i.setPositionReference($D(s,{x:E,y:C,axis:l,dataRef:r,pointerType:h}))}),y=xt(E=>{c!=null||u!=null||(n?f.current||v([]):b(E.clientX,E.clientY))}),g=Uo(h)?o:n,T=R.useCallback(()=>{if(!g||!a||c!=null||u!=null)return;const E=Vt(o);function C(k){const I=Tn(k);at(o,I)?(E.removeEventListener("mousemove",C),f.current=null):b(k.clientX,k.clientY)}if(!r.current.openEvent||eg(r.current.openEvent)){E.addEventListener("mousemove",C);const k=()=>{E.removeEventListener("mousemove",C),f.current=null};return f.current=k,k}i.setPositionReference(s)},[g,a,c,u,o,r,i,s,b]);R.useEffect(()=>T(),[T,m]),R.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),R.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),Ae(()=>{a&&(c!=null||u!=null)&&(d.current=!1,b(c,u))},[a,c,u,b]);const S=R.useMemo(()=>{function E(C){let{pointerType:k}=C;p(k)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:y,onMouseEnter:y}},[y]);return R.useMemo(()=>a?{reference:S}:{},[a,S])}const WD={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},zD={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},tg=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 Xr(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=gr(),v=xt(typeof l=="function"?l:()=>!1),b=typeof l=="function"?v:l,y=R.useRef(!1),g=R.useRef(!1),{escapeKey:T,outsidePress:S}=tg(h),{escapeKey:E,outsidePress:C}=tg(p),k=xt(P=>{var O;if(!n||!i||!a||P.key!=="Escape")return;const j=(O=s.current.floatingContext)==null?void 0:O.nodeId,D=m?Fr(m.nodesRef.current,j):[];if(!T&&(P.stopPropagation(),D.length>0)){let V=!0;if(D.forEach(H=>{var _;if((_=H.context)!=null&&_.open&&!H.context.dataRef.current.__escapeKeyBubbles){V=!1;return}}),!V)return}r(!1,lM(P)?P.nativeEvent:P,"escape-key")}),I=xt(P=>{var O;const j=()=>{var D;k(P),(D=Tn(P))==null||D.removeEventListener("keydown",j)};(O=Tn(P))==null||O.addEventListener("keydown",j)}),A=xt(P=>{var O;const j=y.current;y.current=!1;const D=g.current;if(g.current=!1,c==="click"&&D||j||typeof b=="function"&&!b(P))return;const V=Tn(P),H="["+cr("inert")+"]",_=Tt(o.floating).querySelectorAll(H);let $=He(V)?V:null;for(;$&&!ir($);){const G=Hn($);if(ir(G)||!He(G))break;$=G}if(_.length&&He(V)&&!cM(V)&&!at(V,o.floating)&&Array.from(_).every(G=>!at($,G)))return;if(ht(V)&&L){const G=V.clientWidth>0&&V.scrollWidth>V.clientWidth,F=V.clientHeight>0&&V.scrollHeight>V.clientHeight;let B=F&&P.offsetX>V.clientWidth;if(F&&Qt(V).direction==="rtl"&&(B=P.offsetX<=V.offsetWidth-V.clientWidth),B||G&&P.offsetY>V.clientHeight)return}const K=(O=s.current.floatingContext)==null?void 0:O.nodeId,re=m&&Fr(m.nodesRef.current,K).some(G=>{var F;return vc(P,(F=G.context)==null?void 0:F.elements.floating)});if(vc(P,o.floating)||vc(P,o.domReference)||re)return;const ee=m?Fr(m.nodesRef.current,K):[];if(ee.length>0){let G=!0;if(ee.forEach(F=>{var B;if((B=F.context)!=null&&B.open&&!F.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,P,"outside-press")}),N=xt(P=>{var O;const j=()=>{var D;A(P),(D=Tn(P))==null||D.removeEventListener(c,j)};(O=Tn(P))==null||O.addEventListener(c,j)});R.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=T,s.current.__outsidePressBubbles=S;function P(D){r(!1,D,"ancestor-scroll")}const O=Tt(o.floating);a&&O.addEventListener("keydown",E?I:k,E),b&&O.addEventListener(c,C?N:A,C);let j=[];return f&&(He(o.domReference)&&(j=rr(o.domReference)),He(o.floating)&&(j=j.concat(rr(o.floating))),!He(o.reference)&&o.reference&&o.reference.contextElement&&(j=j.concat(rr(o.reference.contextElement)))),j=j.filter(D=>{var V;return D!==((V=O.defaultView)==null?void 0:V.visualViewport)}),j.forEach(D=>{D.addEventListener("scroll",P,{passive:!0})}),()=>{a&&O.removeEventListener("keydown",E?I:k,E),b&&O.removeEventListener(c,C?N:A,C),j.forEach(D=>{D.removeEventListener("scroll",P)})}},[s,o,a,b,c,n,r,f,i,T,S,k,E,I,A,C,N]),R.useEffect(()=>{y.current=!1},[b,c]);const M=R.useMemo(()=>({onKeyDown:k,[WD[d]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[k,r,u,d]),L=R.useMemo(()=>({onKeyDown:k,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[zD[c]]:()=>{y.current=!0}}),[k,c]);return R.useMemo(()=>i?{reference:M,floating:L}:{},[i,M,L])}function HD(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=hs(),s=R.useRef({}),[i]=R.useState(()=>mx()),a=pr()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!He(h)&&ED("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]=R.useState(r.reference),u=xt((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=R.useMemo(()=>({setPositionReference:c}),[]),f=R.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return R.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[t,u,f,i,o,d])}function Qr(e){e===void 0&&(e={});const{nodeId:t}=e,n=HD({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=R.useState(null),[a,l]=R.useState(null),u=(o==null?void 0:o.reference)||s,d=R.useRef(null),f=gr();Ae(()=>{u&&(d.current=u)},[u]);const h=uD({...e,elements:{...o,...a&&{reference:a}}}),p=R.useCallback(g=>{const T=He(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(T),h.refs.setReference(T)},[h.refs]),m=R.useCallback(g=>{(He(g)||g===null)&&(d.current=g,i(g)),(He(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!He(g))&&h.refs.setReference(g)},[h.refs]),v=R.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),b=R.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),y=R.useMemo(()=>({...h,...r,refs:v,elements:b,nodeId:t}),[h,v,b,t,r]);return Ae(()=>{r.dataRef.current.floatingContext=y;const g=f==null?void 0:f.nodesRef.current.find(T=>T.id===t);g&&(g.context=y)}),R.useMemo(()=>({...h,context:y,refs:v,elements:b}),[h,v,b,y])}function UD(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=R.useRef(!1),u=R.useRef(),d=R.useRef(!0);R.useEffect(()=>{if(!a)return;const h=Vt(i.domReference);function p(){!n&&ht(i.domReference)&&i.domReference===ln(Tt(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]),R.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]),R.useEffect(()=>()=>{clearTimeout(u.current)},[]);const f=R.useMemo(()=>({onPointerDown(h){Cf(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=Tn(h.nativeEvent);if(l&&He(p))try{if(Rf()&&q0())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!Pf(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,v=He(p)&&p.hasAttribute(cr("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var b;const y=ln(i.domReference?i.domReference.ownerDocument:document);!p&&y===i.domReference||at((b=s.current.floatingContext)==null?void 0:b.refs.floating.current,y)||at(i.domReference,y)||v||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return R.useMemo(()=>a?{reference:f}:{},[a,f])}const ng="active",rg="selected";function Cc(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[ng]:i,[rg]: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&&[ng,rg].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(v=>v(...p)).find(v=>v!==void 0)}}}else i[c]=u}),i),{})}}function Jr(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=R.useCallback(a=>Cc(a,e,"reference"),t),s=R.useCallback(a=>Cc(a,e,"floating"),n),i=R.useCallback(a=>Cc(a,e,"item"),r);return R.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let og=!1;function Il(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function sg(e,t){return Il(t,e===Df||e===Ii,e===Yo||e===fs)}function Rc(e,t,n){return Il(t,e===Ii,n?e===Yo:e===fs)||e==="Enter"||e===" "||e===""}function GD(e,t,n){return Il(t,n?e===Yo:e===fs,e===Ii)}function ig(e,t,n){return Il(t,n?e===fs:e===Yo,e===Df)}function jf(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:v=!0,openOnArrowKeyDown:b=!0,disabledIndices:y=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||ha("`useListNavigation` looping must be enabled to allow escaping."),p||ha("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&T>1&&ha("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=pr(),A=gr(),N=xt(a),M=R.useRef(m),L=R.useRef(c??-1),P=R.useRef(null),O=R.useRef(!0),j=R.useRef(N),D=R.useRef(!!o.floating),V=R.useRef(n),H=R.useRef(!1),_=R.useRef(!1),$=It(y),K=It(n),re=It(S),ee=It(o.floating),G=It(c),[F,B]=R.useState(),[z,Y]=R.useState(),Q=xt(function(q,se,W){W===void 0&&(W=!1);function J(ce){p?(B(ce.id),A==null||A.events.emit("virtualfocus",ce),E&&(E.current=ce)):Jn(ce,{preventScroll:!0,sync:q0()&&Rf()?og||H.current:!1})}const pe=q.current[se.current];pe&&J(pe),requestAnimationFrame(()=>{const ce=q.current[se.current]||pe;if(!ce)return;pe||J(ce);const Fe=re.current;Fe&&U&&(W||!O.current)&&(ce.scrollIntoView==null||ce.scrollIntoView(typeof Fe=="boolean"?{block:"nearest",inline:"nearest"}:Fe))})});Ae(()=>{document.createElement("div").focus({get preventScroll(){return og=!0,!1}})},[]),Ae(()=>{l&&(n&&o.floating?M.current&&c!=null&&(_.current=!0,L.current=c,N(c)):D.current&&(L.current=-1,j.current(null)))},[l,n,o.floating,c,N]),Ae(()=>{if(l&&n&&o.floating)if(i==null){if(H.current=!1,G.current!=null)return;if(D.current&&(L.current=-1,Q(s,L)),(!V.current||!D.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let q=0;const se=()=>{s.current[0]==null?(q<2&&(q?requestAnimationFrame:queueMicrotask)(se),q++):(L.current=P.current==null||Rc(P.current,g,h)||f?xc(s,$.current):Wp(s,$.current),P.current=null,N(L.current))};se()}}else Bs(s,i)||(L.current=i,Q(s,L,_.current),_.current=!1)},[l,n,o.floating,i,G,f,s,g,h,N,Q,$]),Ae(()=>{var q;if(!l||o.floating||!A||p||!D.current)return;const se=A.nodesRef.current,W=(q=se.find(ce=>ce.id===I))==null||(q=q.context)==null?void 0:q.elements.floating,J=ln(Tt(o.floating)),pe=se.some(ce=>ce.context&&at(ce.context.elements.floating,J));W&&!pe&&O.current&&W.focus({preventScroll:!0})},[l,o.floating,A,I,p]),Ae(()=>{if(!l||!A||!p||I)return;function q(se){Y(se.id),E&&(E.current=se)}return A.events.on("virtualfocus",q),()=>{A.events.off("virtualfocus",q)}},[l,A,p,I,E]),Ae(()=>{j.current=N,D.current=!!o.floating}),Ae(()=>{n||(P.current=null)},[n]),Ae(()=>{V.current=n},[n]);const ue=i!=null,U=R.useMemo(()=>{function q(W){if(!n)return;const J=s.current.indexOf(W);J!==-1&&N(J)}return{onFocus(W){let{currentTarget:J}=W;q(J)},onClick:W=>{let{currentTarget:J}=W;return J.focus({preventScroll:!0})},...v&&{onMouseMove(W){let{currentTarget:J}=W;q(J)},onPointerLeave(W){let{pointerType:J}=W;!O.current||J==="touch"||(L.current=-1,Q(s,L),N(null),p||Jn(ee.current,{preventScroll:!0}))}}}},[n,ee,Q,v,s,N,p]),ke=xt(q=>{if(O.current=!1,H.current=!0,!K.current&&q.currentTarget===ee.current)return;if(f&&ig(q.key,g,h)){kt(q),r(!1,q.nativeEvent,"list-navigation"),ht(o.domReference)&&!p&&o.domReference.focus();return}const se=L.current,W=xc(s,y),J=Wp(s,y);if(q.key==="Home"&&(kt(q),L.current=W,N(L.current)),q.key==="End"&&(kt(q),L.current=J,N(L.current)),T>1){const pe=C||Array.from({length:s.current.length},()=>({width:1,height:1})),ce=pD(pe,T,k),Fe=ce.findIndex(ie=>ie!=null&&!fa(s.current,ie,y)),te=ce.reduce((ie,_e,Ke)=>_e!=null&&!fa(s.current,_e,y)?Ke:ie,-1);if(L.current=ce[mD({current:ce.map(ie=>ie!=null?s.current[ie]:null)},{event:q,orientation:g,loop:d,cols:T,disabledIndices:yD([...y||s.current.map((ie,_e)=>fa(s.current,_e)?_e:void 0),void 0],ce),minIndex:Fe,maxIndex:te,prevIndex:gD(L.current>J?W:L.current,pe,ce,T,q.key===Ii?"bl":q.key===fs?"tr":"tl"),stopEvent:!0})],N(L.current),g==="both")return}if(sg(q.key,g)){if(kt(q),n&&!p&&ln(q.currentTarget.ownerDocument)===q.currentTarget){L.current=Rc(q.key,g,h)?W:J,N(L.current);return}Rc(q.key,g,h)?d?L.current=se>=J?u&&se!==s.current.length?-1:W:_t(s,{startingIndex:se,disabledIndices:y}):L.current=Math.min(J,_t(s,{startingIndex:se,disabledIndices:y})):d?L.current=se<=W?u&&se!==-1?s.current.length:J:_t(s,{startingIndex:se,decrement:!0,disabledIndices:y}):L.current=Math.max(W,_t(s,{startingIndex:se,decrement:!0,disabledIndices:y})),Bs(s,L.current)?N(null):N(L.current)}}),qe=R.useMemo(()=>p&&n&&ue&&{"aria-activedescendant":z||F},[p,n,ue,z,F]),Le=R.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!K0(o.domReference)&&qe,onKeyDown:ke,onPointerMove(){O.current=!0}}),[qe,ke,o.domReference,g]),Te=R.useMemo(()=>{function q(W){m==="auto"&&Y0(W.nativeEvent)&&(M.current=!0)}function se(W){M.current=m,m==="auto"&&Cf(W.nativeEvent)&&(M.current=!0)}return{...qe,onKeyDown(W){O.current=!1;const J=W.key.indexOf("Arrow")===0,pe=GD(W.key,g,h),ce=ig(W.key,g,h),Fe=sg(W.key,g),te=(f?pe:Fe)||W.key==="Enter"||W.key.trim()==="";if(p&&n){const Rt=A==null?void 0:A.nodesRef.current.find(Lt=>Lt.parentId==null),At=A&&Rt?ID(A.nodesRef.current,Rt.id):null;if(J&&At&&E){const Lt=new KeyboardEvent("keydown",{key:W.key,bubbles:!0});if(pe||ce){var ie,_e;const xr=((ie=At.context)==null?void 0:ie.elements.domReference)===W.currentTarget,ro=ce&&!xr?(_e=At.context)==null?void 0:_e.elements.domReference:pe?s.current.find(oo=>(oo==null?void 0:oo.id)===F):null;ro&&(kt(W),ro.dispatchEvent(Lt),Y(void 0))}if(Fe&&At.context&&At.context.open&&At.parentId&&W.currentTarget!==At.context.elements.domReference){var Ke;kt(W),(Ke=At.context.elements.domReference)==null||Ke.dispatchEvent(Lt);return}}return ke(W)}if(!(!n&&!b&&J)){if(te&&(P.current=f&&Fe?null:W.key),f){pe&&(kt(W),n?(L.current=xc(s,$.current),N(L.current)):r(!0,W.nativeEvent,"list-navigation"));return}Fe&&(c!=null&&(L.current=c),kt(W),!n&&b?r(!0,W.nativeEvent,"list-navigation"):ke(W),n&&N(L.current))}},onFocus(){n&&!p&&N(null)},onPointerDown:se,onMouseDown:q,onClick:q}},[F,qe,ke,$,m,s,f,N,r,n,b,g,h,c,A,p,E]);return R.useMemo(()=>l?{reference:Te,floating:Le,item:U}:{},[l,Te,Le,U])}const YD=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function eo(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=YD.get(i))!=null?n:i,l=hs(),u=pr()!=null,d=R.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=R.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=R.useCallback(p=>{let{active:m,selected:v}=p;const b={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...b,"aria-selected":m&&v};case"combobox":return{...b,...m&&{"aria-selected":!0}}}return{}},[o,i]);return R.useMemo(()=>s?{reference:d,floating:f,item:h}:{},[s,d,f,h])}const ag=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function uo(e,t){return typeof e=="function"?e(t):e}function qD(e,t){const[n,r]=R.useState(e);return e&&!n&&r(!0),R.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function KD(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]=R.useState("unmounted"),c=qD(n,i);return!c&&a==="close"&&l("unmounted"),Ae(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function Ex(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=R.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]=R.useState(()=>({...uo(s,c),...uo(n,c)})),{isMounted:m,status:v}=KD(e,{duration:i}),b=It(n),y=It(r),g=It(o),T=It(s);return Ae(()=>{const S=uo(b.current,c),E=uo(g.current,c),C=uo(T.current,c),k=uo(y.current,c)||Object.keys(S).reduce((I,A)=>(I[A]="",I),{});if(v==="initial"&&p(I=>({transitionProperty:I.transitionProperty,...C,...S})),v==="open"&&p({transitionProperty:Object.keys(k).map(ag).join(","),transitionDuration:d+"ms",...C,...k}),v==="close"){const I=E||S;p({transitionProperty:Object.keys(I).map(ag).join(","),transitionDuration:f+"ms",...C,...I})}},[f,g,b,y,T,d,v,c]),{isMounted:m,styles:h}}function ZD(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=R.useRef(),m=R.useRef(""),v=R.useRef((n=h??i)!=null?n:-1),b=R.useRef(null),y=xt(a),g=xt(l),T=It(u),S=It(f);Ae(()=>{r&&(clearTimeout(p.current),b.current=null,m.current="")},[r]),Ae(()=>{if(r&&m.current===""){var A;v.current=(A=h??i)!=null?A:-1}},[r,h,i]);const E=xt(A=>{A?o.current.typing||(o.current.typing=A,g(A)):o.current.typing&&(o.current.typing=A,g(A))}),C=xt(A=>{function N(j,D,V){const H=T.current?T.current(D,V):D.find(_=>(_==null?void 0:_.toLocaleLowerCase().indexOf(V.toLocaleLowerCase()))===0);return H?j.indexOf(H):-1}const M=s.current;if(m.current.length>0&&m.current[0]!==" "&&(N(M,M,m.current)===-1?E(!1):A.key===" "&&kt(A)),M==null||S.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(kt(A),E(!0)),M.every(j=>{var D,V;return j?((D=j[0])==null?void 0:D.toLocaleLowerCase())!==((V=j[1])==null?void 0:V.toLocaleLowerCase()):!0})&&m.current===A.key&&(m.current="",v.current=b.current),m.current+=A.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",v.current=b.current,E(!1)},d);const P=v.current,O=N(M,[...M.slice((P||0)+1),...M.slice(0,(P||0)+1)],m.current);O!==-1?(y(O),b.current=O):A.key!==" "&&(m.current="",E(!1))}),k=R.useMemo(()=>({onKeyDown:C}),[C]),I=R.useMemo(()=>({onKeyDown:C,onKeyUp(A){A.key===" "&&E(!1)}}),[C,E]);return R.useMemo(()=>c?{reference:k,floating:I}:{},[c,k,I])}function lg(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 XD(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Cx(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,v=f-a,y=Math.sqrt(m*m+v*v)/p;return i=d,a=f,l=h,y}const u=d=>{let{x:f,y:h,placement:p,elements:m,onClose:v,nodeId:b,tree:y}=d;return function(T){function S(){clearTimeout(o),v()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||f==null||h==null)return;const{clientX:E,clientY:C}=T,k=[E,C],I=Tn(T),A=T.type==="mouseleave",N=at(m.floating,I),M=at(m.domReference,I),L=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),O=p.split("-")[0],j=f>P.right-P.width/2,D=h>P.bottom-P.height/2,V=XD(k,L),H=P.width>L.width,_=P.height>L.height,$=(H?L:P).left,K=(H?L:P).right,re=(_?L:P).top,ee=(_?L:P).bottom;if(N&&(s=!0,!A))return;if(M&&(s=!1),M&&!A){s=!0;return}if(A&&He(T.relatedTarget)&&at(m.floating,T.relatedTarget)||y&&Fr(y.nodesRef.current,b).some(B=>{let{context:z}=B;return z==null?void 0:z.open}))return;if(O==="top"&&h>=L.bottom-1||O==="bottom"&&h<=L.top+1||O==="left"&&f>=L.right-1||O==="right"&&f<=L.left+1)return S();let G=[];switch(O){case"top":G=[[$,L.top+1],[$,P.bottom-1],[K,P.bottom-1],[K,L.top+1]];break;case"bottom":G=[[$,P.top+1],[$,L.bottom-1],[K,L.bottom-1],[K,P.top+1]];break;case"left":G=[[P.right-1,ee],[P.right-1,re],[L.left+1,re],[L.left+1,ee]];break;case"right":G=[[L.right-1,ee],[L.right-1,re],[P.left+1,re],[P.left+1,ee]];break}function F(B){let[z,Y]=B;switch(O){case"top":{const Q=[H?z+t/2:j?z+t*4:z-t*4,Y+t+1],ue=[H?z-t/2:j?z+t*4:z-t*4,Y+t+1],U=[[P.left,j||H?P.bottom-t:P.top],[P.right,j?H?P.bottom-t:P.top:P.bottom-t]];return[Q,ue,...U]}case"bottom":{const Q=[H?z+t/2:j?z+t*4:z-t*4,Y-t],ue=[H?z-t/2:j?z+t*4:z-t*4,Y-t],U=[[P.left,j||H?P.top+t:P.bottom],[P.right,j?H?P.top+t:P.bottom:P.top+t]];return[Q,ue,...U]}case"left":{const Q=[z+t+1,_?Y+t/2:D?Y+t*4:Y-t*4],ue=[z+t+1,_?Y-t/2:D?Y+t*4:Y-t*4];return[...[[D||_?P.right-t:P.left,P.top],[D?_?P.right-t:P.left:P.right-t,P.bottom]],Q,ue]}case"right":{const Q=[z-t,_?Y+t/2:D?Y+t*4:Y-t*4],ue=[z-t,_?Y-t/2:D?Y+t*4:Y-t*4],U=[[D||_?P.left+t:P.right,P.top],[D?_?P.left+t:P.right:P.left+t,P.bottom]];return[Q,ue,...U]}}}if(!lg([E,C],G)){if(s&&!V)return S();if(!A&&r){const B=c(T.clientX,T.clientY);if(B!==null&&B<.1)return S()}lg([E,C],F([f,h]))?!s&&r&&(o=window.setTimeout(S,40)):S()}}};return u.__options={blockPointerEvents:n},u}const ps=e=>{const t=x.useId(),[n,r]=x.useState(e.open),o=x.useRef(null),s=x.useMemo(()=>[ki(10),Mf({fallbackAxisSideDirection:"end"}),_f(),cx({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=Qr({open:n,middleware:s,transform:!0,whileElementsMounted:Pi,onOpenChange:(p,m)=>{var b;const v=m==null?void 0:m.relatedTarget;v&&v.dataset.floating==="true"&&!p||(r(p),(b=e.onChange)==null||b.call(e,p))}}),c=Ai(l),u=Xr(l),d=eo(l),{getReferenceProps:f,getFloatingProps:h}=Jr([c,u,d]);return w.jsxs(x.Fragment,{children:[w.jsx("button",{ref:i.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&w.jsx(Zr,{preserveTabOrder:!0,id:`${t}-portal`,children:w.jsx(ms,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:w.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-6 shadow-2xl",ref:i.setFloating,style:a,"aria-labelledby":t,...h(),children:[w.jsx(hx,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),w.jsx("header",{className:"mb-2",children:w.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},QD=e=>{const t=x.useRef(null),n=x.useId(),r=`${n}:wrapper`,o=`${n}:title`,[s,i]=x.useState(!1),{context:a,refs:l}=Qr({transform:!0,open:s!==null,nodeId:n,onOpenChange:i,strategy:"absolute"}),c=Ai(a),u=eo(a),d=Xr(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:h}=Jr([c,u,d]);return w.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[w.jsx(jo,{...h(e),as:ct.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>i(!0),children:w.jsx(ct.span,{layoutId:o,children:e.trigger})}),w.jsx(fr,{children:s?w.jsx(Zr,{root:t,children:w.jsx(ms,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:w.jsx(ct.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Rx=300,JD=500,Px=(e="")=>Me("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),$u=x.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),cg=x.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o,floatingClassName:s="",label:i,...a},l)=>{const[c,u]=x.useState(r??!1),[d,f]=x.useState(!1),[h,p]=x.useState(null),m=x.useRef([]),v=x.useRef([]),b=x.useContext($u),y=pr(),g=gr(),T=CD(),S=fx(),E=y!==null,{floatingStyles:C,refs:k,context:I}=Qr({nodeId:T,open:c,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:Pi,placement:E?"right":"bottom-start",middleware:[ki({mainAxis:E?0:4,alignmentAxis:E?-4:0}),Mf(),_f()]}),A=eo(I,{role:"menu",enabled:!0}),N=Xr(I,{bubbles:!0}),M=yx(I,{move:!1,enabled:n,delay:{open:Rx},handleClose:Cx({blockPointerEvents:!0})}),L=Ai(I,{event:"mousedown",toggle:!E,ignoreMouse:E,keyboardHandlers:!0}),P=jf(I,{loop:!0,listRef:m,activeIndex:h,nested:E,onNavigate:p}),O=ZD(I,{activeIndex:h,listRef:v,resetMs:JD,onMatch:c?p:void 0}),{getReferenceProps:j,getFloatingProps:D,getItemProps:V}=Jr([M,L,A,N,P,O]);x.useEffect(()=>{if(!g)return;function _(){u(!1)}function $(K){K.nodeId!==T&&K.parentId===y&&u(!1)}return g.events.on("click",_),g.events.on("menuopen",$),()=>{g.events.off("click",_),g.events.off("menuopen",$)}},[g,T,y]),x.useEffect(()=>{c&&g&&g.events.emit("menuopen",{parentId:y,nodeId:T})},[g,c,T,y]);const H=o?a.className:Me(Px(a.className));return w.jsxs(RD,{id:T,children:[w.jsx(x.Fragment,{children:a.asChild?w.jsx(Ho,{...j(b.getItemProps({...a,onFocus(_){var $;($=a.onFocus)==null||$.call(a,_),f(!1),b.setHasFocusInside(!0)}})),children:i,ref:Vu([k.setReference,S.ref,l]),tabIndex:E?b.activeIndex===S.index?0:-1:void 0,"data-open":c?"":void 0,"data-nested":E?"":void 0,role:E?"menuitem":void 0,"data-focus-inside":d?"":void 0,className:H}):w.jsxs("button",{type:"button",className:H,"data-open":c?"":void 0,"data-nested":E?"":void 0,role:E?"menuitem":void 0,"data-focus-inside":d?"":void 0,ref:Vu([k.setReference,S.ref,l]),tabIndex:E?b.activeIndex===S.index?0:-1:void 0,...j(b.getItemProps({...a,onFocus(_){var $;($=a.onFocus)==null||$.call(a,_),f(!1),b.setHasFocusInside(!0)}})),children:[i,E&&w.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[w.jsx("span",{className:"sr-only",children:"Next menu"}),w.jsx(sf,{size:14})]})]})}),w.jsx($u.Provider,{value:{activeIndex:h,setActiveIndex:p,getItemProps:V,setHasFocusInside:f,isOpen:c},children:w.jsx(xD,{elementsRef:m,labelsRef:v,children:c&&w.jsx(Zr,{preserveTabOrder:!0,children:w.jsx(ms,{context:I,modal:!1,initialFocus:E?-1:0,returnFocus:!E,children:w.jsx(t,{...D(),ref:k.setFloating,style:{...a.style,...C},className:Me("isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",s),children:e})})})})})]})}),eN=x.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},s)=>{const i=x.useContext($u),a=fx({label:n?null:e}),l=gr(),c=a.index===i.activeIndex;return w.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":i.isOpen,tabIndex:c?0:-1,ref:Vu([a.ref,s]),className:Px(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...i.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),i.setHasFocusInside(!0)}}),children:[r,t?w.jsx(t,{size:16}):null]})}),tN=x.forwardRef((e,t)=>pr()!==null?w.jsx(cg,{...e,isParent:!1,ref:t}):w.jsx(PD,{children:w.jsx(cg,{...e,isParent:!0,ref:t})}));var En=function(){return En=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},En.apply(this,arguments)};function kx(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 gs(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 ys(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 ug(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 Bu(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var ma="right-scroll-bar-position",pa="width-before-scroll-bar",nN="with-scroll-bars-hidden",rN="--removed-body-scroll-bar-size";function Pc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function oN(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var sN=typeof window<"u"?R.useLayoutEffect:R.useEffect,dg=new WeakMap;function iN(e,t){var n=oN(null,function(r){return e.forEach(function(o){return Pc(o,r)})});return sN(function(){var r=dg.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Pc(a,null)}),s.forEach(function(a){o.has(a)||Pc(a,i)})}dg.set(n,e)},[e]),n}function aN(e){return e}function lN(e,t){t===void 0&&(t=aN);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var u=i;i=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),n}}}};return o}function cN(e){e===void 0&&(e={});var t=lN(null);return t.options=En({async:!0,ssr:!1},e),t}var Ix=function(e){var t=e.sideCar,n=kx(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return R.createElement(r,En({},n))};Ix.isSideCarExport=!0;function uN(e,t){return e.useMedium(t),Ix}var Ax=cN(),kc=function(){},Al=R.forwardRef(function(e,t){var n=R.useRef(null),r=R.useState({onScrollCapture:kc,onWheelCapture:kc,onTouchMoveCapture:kc}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,h=e.noIsolation,p=e.inert,m=e.allowPinchZoom,v=e.as,b=v===void 0?"div":v,y=e.gapMode,g=kx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=f,S=iN([n,t]),E=En(En({},g),o);return R.createElement(R.Fragment,null,u&&R.createElement(T,{sideCar:Ax,removeScrollBar:c,shards:d,noIsolation:h,inert:p,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:y}),i?R.cloneElement(R.Children.only(a),En(En({},E),{ref:S})):R.createElement(b,En({},E,{className:l,ref:S}),a))});Al.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Al.classNames={fullWidth:pa,zeroRight:ma};var dN=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function fN(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=dN();return t&&e.setAttribute("nonce",t),e}function hN(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mN(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var pN=function(){var e=0,t=null;return{add:function(n){e==0&&(t=fN())&&(hN(t,n),mN(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gN=function(){var e=pN();return function(t,n){R.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ox=function(){var e=gN(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},yN={left:0,top:0,right:0,gap:0},Ic=function(e){return parseInt(e||"",10)||0},vN=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ic(n),Ic(r),Ic(o)]},bN=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return yN;var t=vN(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},xN=Ox(),Po="data-scroll-locked",wN=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
173
|
-
.`.concat(nN,` {
|
|
174
|
-
overflow: hidden `).concat(r,`;
|
|
175
|
-
padding-right: `).concat(a,"px ").concat(r,`;
|
|
176
|
-
}
|
|
177
|
-
body[`).concat(Po,`] {
|
|
178
|
-
overflow: hidden `).concat(r,`;
|
|
179
|
-
overscroll-behavior: contain;
|
|
180
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
181
|
-
padding-left: `.concat(o,`px;
|
|
182
|
-
padding-top: `).concat(s,`px;
|
|
183
|
-
padding-right: `).concat(i,`px;
|
|
184
|
-
margin-left:0;
|
|
185
|
-
margin-top:0;
|
|
186
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
187
|
-
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.`).concat(ma,` {
|
|
191
|
-
right: `).concat(a,"px ").concat(r,`;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.`).concat(pa,` {
|
|
195
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.`).concat(ma," .").concat(ma,` {
|
|
199
|
-
right: 0 `).concat(r,`;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.`).concat(pa," .").concat(pa,` {
|
|
203
|
-
margin-right: 0 `).concat(r,`;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
body[`).concat(Po,`] {
|
|
207
|
-
`).concat(rN,": ").concat(a,`px;
|
|
208
|
-
}
|
|
209
|
-
`)},fg=function(){var e=parseInt(document.body.getAttribute(Po)||"0",10);return isFinite(e)?e:0},SN=function(){R.useEffect(function(){return document.body.setAttribute(Po,(fg()+1).toString()),function(){var e=fg()-1;e<=0?document.body.removeAttribute(Po):document.body.setAttribute(Po,e.toString())}},[])},TN=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;SN();var s=R.useMemo(function(){return bN(o)},[o]);return R.createElement(xN,{styles:wN(s,!t,o,n?"":"!important")})},Wu=!1;if(typeof window<"u")try{var Ji=Object.defineProperty({},"passive",{get:function(){return Wu=!0,!0}});window.addEventListener("test",Ji,Ji),window.removeEventListener("test",Ji,Ji)}catch{Wu=!1}var fo=Wu?{passive:!1}:!1,EN=function(e){return e.tagName==="TEXTAREA"},_x=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!EN(e)&&n[t]==="visible")},CN=function(e){return _x(e,"overflowY")},RN=function(e){return _x(e,"overflowX")},hg=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Mx(e,r);if(o){var s=Dx(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},PN=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},kN=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Mx=function(e,t){return e==="v"?CN(t):RN(t)},Dx=function(e,t){return e==="v"?PN(t):kN(t)},IN=function(e,t){return e==="h"&&t==="rtl"?-1:1},AN=function(e,t,n,r,o){var s=IN(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),c=!1,u=i>0,d=0,f=0;do{var h=Dx(e,a),p=h[0],m=h[1],v=h[2],b=m-v-s*p;(p||b)&&Mx(e,a)&&(d+=b,f+=p),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&(Math.abs(d)<1||!o)||!u&&(Math.abs(f)<1||!o))&&(c=!0),c},ea=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},mg=function(e){return[e.deltaX,e.deltaY]},pg=function(e){return e&&"current"in e?e.current:e},ON=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_N=function(e){return`
|
|
210
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
211
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
212
|
-
`)},MN=0,ho=[];function DN(e){var t=R.useRef([]),n=R.useRef([0,0]),r=R.useRef(),o=R.useState(MN++)[0],s=R.useState(Ox)[0],i=R.useRef(e);R.useEffect(function(){i.current=e},[e]),R.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Bu([e.lockRef.current],(e.shards||[]).map(pg),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=R.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var b=ea(m),y=n.current,g="deltaX"in m?m.deltaX:y[0]-b[0],T="deltaY"in m?m.deltaY:y[1]-b[1],S,E=m.target,C=Math.abs(g)>Math.abs(T)?"h":"v";if("touches"in m&&C==="h"&&E.type==="range")return!1;var k=hg(C,E);if(!k)return!0;if(k?S=C:(S=C==="v"?"h":"v",k=hg(C,E)),!k)return!1;if(!r.current&&"changedTouches"in m&&(g||T)&&(r.current=S),!S)return!0;var I=r.current||S;return AN(I,v,m,I==="h"?g:T,!0)},[]),l=R.useCallback(function(m){var v=m;if(!(!ho.length||ho[ho.length-1]!==s)){var b="deltaY"in v?mg(v):ea(v),y=t.current.filter(function(S){return S.name===v.type&&(S.target===v.target||v.target===S.shadowParent)&&ON(S.delta,b)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var g=(i.current.shards||[]).map(pg).filter(Boolean).filter(function(S){return S.contains(v.target)}),T=g.length>0?a(v,g[0]):!i.current.noIsolation;T&&v.cancelable&&v.preventDefault()}}},[]),c=R.useCallback(function(m,v,b,y){var g={name:m,delta:v,target:b,should:y,shadowParent:NN(b)};t.current.push(g),setTimeout(function(){t.current=t.current.filter(function(T){return T!==g})},1)},[]),u=R.useCallback(function(m){n.current=ea(m),r.current=void 0},[]),d=R.useCallback(function(m){c(m.type,mg(m),m.target,a(m,e.lockRef.current))},[]),f=R.useCallback(function(m){c(m.type,ea(m),m.target,a(m,e.lockRef.current))},[]);R.useEffect(function(){return ho.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,fo),document.addEventListener("touchmove",l,fo),document.addEventListener("touchstart",u,fo),function(){ho=ho.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,fo),document.removeEventListener("touchmove",l,fo),document.removeEventListener("touchstart",u,fo)}},[]);var h=e.removeScrollBar,p=e.inert;return R.createElement(R.Fragment,null,p?R.createElement(s,{styles:_N(o)}):null,h?R.createElement(TN,{gapMode:e.gapMode}):null)}function NN(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const jN=uN(Ax,DN);var Nx=R.forwardRef(function(e,t){return R.createElement(Al,En({},e,{ref:t,sideCar:jN}))});Nx.classNames=Al.classNames;const LN=(e,t)=>Ta()?t:window.matchMedia(e).matches,FN=(e,t=!0)=>{const[n,r]=x.useState(t);return x.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(LN(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},cn="600ms",VN={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:cn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:cn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:cn}},$N={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:cn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:cn}},Ac={drawer:e=>e==="left"?VN:$N,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:cn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:cn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:cn,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:cn},enter:{opacity:1,scale:[1.05,1],animationDuration:cn},exit:{opacity:0,scale:.97,animationDuration:cn}}},BN=os("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 h-[85vh] max-h-[85vh] max-h-[85svh] pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),WN={top:0,left:0,right:0,bottom:-1},zN=e=>e*.62,HN=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+d))}const s=e.parent.current.getBoundingClientRect(),i=e.value.get()||s.height,a=Math.abs(i-r.delta.y),l=zN(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return w.jsx(ct.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:WN,whileDrag:{cursor:"grabbing"},className:Me("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?w.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Oc={drawer:"right",sheet:"none",dialog:"none"},UN=({open:e,title:t,footer:n,asChild:r,trigger:o,children:s,layoutId:i,onChange:a,className:l,resizer:c=!0,closable:u=!0,forceType:d=!1,overlayClassName:f="",type:h="dialog",position:p,overlayClickClose:m=!1,ariaTitle:v,...b})=>{const y=x.useId(),g=x.useId(),T=FN("(min-width: 64rem)"),S=h!=="dialog",E=T?h==="drawer"?p:Oc[h]:d?Oc[h]:Oc.sheet,C=T||d?Ac[h]:Ac.sheet,k=typeof C=="function"?C(E):C,I=T||d?h:"sheet",{refs:A,context:N}=Qr({open:e,onOpenChange:a}),M=Ai(N),L=eo(N),P=Xr(N,{escapeKey:!0,referencePress:!0,outsidePress:m}),{getReferenceProps:O,getFloatingProps:j}=Jr([M,L,P]),D=o,V=$r(void 0),H=()=>a(!1);return w.jsxs(x.Fragment,{children:[o?w.jsx(x.Fragment,{children:r?w.jsx(Ho,{ref:A.setReference,...O({layoutId:i}),children:D}):w.jsx(ct.button,{ref:A.setReference,...O(),layoutId:i,type:"button",children:D})}):null,w.jsx(Zr,{children:w.jsx(fr,{mode:"wait",presenceAffectsLayout:!0,children:e?w.jsx(Nx,{enabled:!0,forwardProps:!0,removeScrollBar:!0,inert:!0,noIsolation:!0,children:w.jsx(VD,{lockScroll:!0,className:Me(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${I==="drawer"?"":"flex items-start justify-center p-10"}`,f),children:w.jsx(ms,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:N,children:w.jsxs(ct.div,{...b,exit:"exit",animate:"enter",initial:"initial",variants:k,"data-component":"modal",ref:A.setFloating,"aria-modal":e,layoutId:i,className:Me(BN({position:E,type:I}),l),style:I==="drawer"?{width:V}:{height:V},...t?{"aria-labelledby":y,"aria-describedby":g}:{"aria-label":v},...j(),children:[t?w.jsx("header",{className:"relative w-full",children:t?w.jsx("h2",{id:y,className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,w.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:s}),n?w.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:n}):null,u?w.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:w.jsx("button",{type:"button",onClick:H,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:w.jsx(lf,{})})}):null,S&&c?w.jsx(HN,{onChange:a,parent:A.floating,position:E,sheet:I==="sheet",value:V}):null]})})})}):null})})]})},GN=e=>w.jsx(ct.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),jx=({as:e,title:t,children:n,placement:r,open:o,focus:s=!0,hover:i=!0,enabled:a=!0,popover:l=!0,followCursor:c=!1,onChange:u=Sd,...d})=>{const[f,h]=x.useState(o??!1),p=x.useRef(null),m=e||"span",v=M=>{h(M),u==null||u(M)},{refs:b,floatingStyles:y,context:g}=Qr({open:f,placement:r,transform:!0,strategy:"absolute",whileElementsMounted:Pi,onOpenChange:o?void 0:v,middleware:[_f(),ki(5),Mf({fallbackAxisSideDirection:"start"}),cx({padding:5,element:p})]}),T=yx(g,{move:!0,delay:{open:Rx},enabled:a?i:!1,handleClose:l?Cx():null}),S=UD(g,{enabled:a?s:!1}),E=Ai(g,{enabled:a?l:!1}),C=Xr(g,{enabled:a}),k=eo(g,{role:"tooltip",enabled:a}),I=BD(g,{enabled:!!a&&!!c}),{getReferenceProps:A,getFloatingProps:N}=Jr([k,C,I,s?S:void 0,i?T:void 0,l?E:void 0]);return x.useEffect(()=>h(o===void 0?!1:o),[o]),w.jsxs(x.Fragment,{children:[w.jsx(m,{ref:b.setReference,...A(d),children:t}),f&&w.jsx(Zr,{preserveTabOrder:!0,children:w.jsxs(ss,{...N(),ref:b.setFloating,style:y,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[w.jsx(hx,{ref:p,context:g,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),n]})})]})};class Ua{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++)Ua.getDescendantProperty(a[l],s,r);else s&&Ua.getDescendantProperty(a,s,r)}else r.push(t);return r}}class Mr{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=Mr.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=Ua.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=Mr.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=Mr.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 Mr.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 Ol=0,yr=1,vs=2,Lx=4;function si(e,t){return n=>e(t(n))}function YN(e,t){return t(e)}function Fx(e,t){return n=>e(t,n)}function gg(e,t){return()=>e(t)}function _l(e,t){return t(e),e}function et(...e){return e}function qN(e){e()}function yg(e){return()=>e}function KN(...e){return()=>{e.map(qN)}}function Lf(e){return e!==void 0}function to(){}function ze(e,t){return e(yr,t)}function Se(e,t){e(Ol,t)}function Ff(e){e(vs)}function Mt(e){return e(Lx)}function he(e,t){return ze(e,Fx(t,Ol))}function _n(e,t){const n=e(yr,r=>{n(),t(r)});return n}function Ie(){const e=[];return(t,n)=>{switch(t){case vs:e.splice(0,e.length);return;case yr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case Ol:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function ne(e){let t=e;const n=Ie();return(r,o)=>{switch(r){case yr:o(t);break;case Ol:t=o;break;case Lx:return t}return n(r,o)}}function ZN(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case yr:return s?n===s?void 0:(r(),n=s,t=ze(e,s),t):(r(),to);case vs:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Zt(e){return _l(Ie(),t=>he(e,t))}function Dt(e,t){return _l(ne(t),n=>he(e,n))}function XN(...e){return t=>e.reduceRight(YN,t)}function Z(e,...t){const n=XN(...t);return(r,o)=>{switch(r){case yr:return ze(e,n(o));case vs:Ff(e);return}}}function Vx(e,t){return e===t}function Je(e=Vx){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ye(e){return t=>n=>{e(n)&&t(n)}}function de(e){return t=>si(t,e)}function xn(e){return t=>()=>t(e)}function Rn(e,t){return n=>r=>n(t=e(t,r))}function Zo(e){return t=>n=>{e>0?e--:t(n)}}function nr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function vg(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Ee(...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);ze(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 bg(...e){return function(t,n){switch(t){case yr:return KN(...e.map(r=>ze(r,n)));case vs:return;default:throw new Error(`unrecognized action ${t}`)}}}function be(e,t=Vx){return Z(e,Je(t))}function Et(...e){const t=Ie(),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);ze(s,l=>{n[i]=l,r=r|a,r===o&&Se(t,n)})}),function(s,i){switch(s){case yr:return r===o&&i(n),ze(t,i);case vs:return Ff(t);default:throw new Error(`unrecognized action ${s}`)}}}function je(e,t=[],{singleton:n}={singleton:!0}){return{id:QN(),constructor:e,dependencies:t,singleton:n}}const QN=()=>Symbol();function JN(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 ej(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 ta=typeof document<"u"?x.useLayoutEffect:x.useEffect;function Vf(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=x.createContext({});function l(b,y){b.propsReady&&Se(b.propsReady,!1);for(const g of r){const T=b[t.required[g]];Se(T,y[g])}for(const g of o)if(g in y){const T=b[t.optional[g]];Se(T,y[g])}b.propsReady&&Se(b.propsReady,!0)}function c(b){return s.reduce((y,g)=>(y[g]=T=>{const S=b[t.methods[g]];Se(S,T)},y),{})}function u(b){return i.reduce((y,g)=>(y[g]=ZN(b[t.events[g]]),y),{})}const d=x.forwardRef((b,y)=>{const{children:g,...T}=b,[S]=x.useState(()=>_l(JN(e),C=>l(C,T))),[E]=x.useState(gg(u,S));return ta(()=>{for(const C of i)C in T&&ze(E[C],T[C]);return()=>{Object.values(E).map(Ff)}},[T,E,S]),ta(()=>{l(S,T)}),x.useImperativeHandle(y,yg(c(S))),x.createElement(a.Provider,{value:S},n?x.createElement(n,ej([...r,...o,...i],T),g):g)}),f=b=>x.useCallback(Fx(Se,x.useContext(a)[b]),[b]),h=b=>{const g=x.useContext(a)[b],T=x.useCallback(S=>ze(g,S),[g]);return x.useSyncExternalStore(T,()=>Mt(g),()=>Mt(g))},p=b=>{const g=x.useContext(a)[b],[T,S]=x.useState(gg(Mt,g));return ta(()=>ze(g,E=>{E!==T&&S(yg(E))}),[g,T]),T},m=x.version.startsWith("18")?h:p;return{Component:d,usePublisher:f,useEmitterValue:m,useEmitter:(b,y)=>{const T=x.useContext(a)[b];ta(()=>ze(T,y),[y,T])}}}const tj=typeof document<"u"?x.useLayoutEffect:x.useEffect,nj=tj;var Xt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Xt||{});const rj={0:"debug",1:"log",2:"warn",3:"error"},oj=()=>typeof globalThis>"u"?window:globalThis,vr=je(()=>{const e=ne(3);return{log:ne((n,r,o=1)=>{var s;const i=(s=oj().VIRTUOSO_LOG_LEVEL)!=null?s:Mt(e);o>=i&&console[rj[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function $f(e,t=!0){const n=x.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=x.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 Mn(e,t=!0){return $f(e,t).callbackRef}function $x(e,t,n,r,o,s,i){const a=x.useCallback(l=>{const c=sj(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(ij("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return $f(a,n)}function sj(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},Xt.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 ij(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Xt.WARN),t==="normal"?0:parseInt(t??"0",10)}function mn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Bx(e,t){return Math.abs(e-t)<1.01}function Wx(e,t,n,r=to,o){const s=x.useRef(null),i=x.useRef(null),a=x.useRef(null),l=x.useCallback(d=>{const f=d.target,h=f===window||f===document,p=h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,m=h?document.documentElement.scrollHeight:f.scrollHeight,v=h?window.innerHeight:f.offsetHeight,b=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:v})};d.suppressFlushSync?b():pi.flushSync(b),i.current!==null&&(p===i.current||p<=0||p===m-v)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);x.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,v;f===window?(m=Math.max(mn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,v=document.documentElement.scrollTop):(m=f.scrollHeight,p=mn(f,"height"),v=f.scrollTop);const b=m-p;if(d.top=Math.ceil(Math.max(Math.min(b,d.top),0)),Bx(p,m)||d.top===v){e({scrollTop:v,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 Bt=je(()=>{const e=Ie(),t=Ie(),n=ne(0),r=Ie(),o=ne(0),s=Ie(),i=Ie(),a=ne(0),l=ne(0),c=ne(0),u=ne(0),d=Ie(),f=Ie(),h=ne(!1);return he(Z(e,de(({scrollTop:p})=>p)),t),he(Z(e,de(({scrollHeight:p})=>p)),i),he(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}),ii={lvl:0};function zx(e,t,n,r=ii,o=ii){return{k:e,v:t,lvl:n,l:r,r:o}}function Ye(e){return e===ii}function ko(){return ii}function zu(e,t){if(Ye(e))return ii;const{k:n,l:r,r:o}=e;if(t===n){if(Ye(r))return o;if(Ye(o))return r;{const[s,i]=Hx(r);return ga(bt(e,{k:s,v:i,l:Ux(r)}))}}else return t<n?ga(bt(e,{l:zu(r,t)})):ga(bt(e,{r:zu(o,t)}))}function ai(e,t){if(!Ye(e))return t===e.k?e.v:t<e.k?ai(e.l,t):ai(e.r,t)}function pn(e,t,n="k"){if(Ye(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=pn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return pn(e.l,t,n)}function Kt(e,t,n){return Ye(e)?zx(t,n,1):t===e.k?bt(e,{k:t,v:n}):t<e.k?xg(bt(e,{l:Kt(e.l,t,n)})):xg(bt(e,{r:Kt(e.r,t,n)}))}function Hu(e,t,n){if(Ye(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 Dr(e){return Ye(e)?[]:[...Dr(e.l),{k:e.k,v:e.v},...Dr(e.r)]}function Hx(e){return Ye(e.r)?[e.k,e.v]:Hx(e.r)}function Ux(e){return Ye(e.r)?e.l:ga(bt(e,{r:Ux(e.r)}))}function bt(e,t){return zx(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 _c(e){return Ye(e)||e.lvl>e.r.lvl}function xg(e){return Uu(Yx(e))}function ga(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(_c(t))return Yx(bt(e,{lvl:r-1}));if(!Ye(t)&&!Ye(t.r))return bt(t.r,{l:bt(t,{r:t.r.l}),r:bt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(_c(e))return Uu(bt(e,{lvl:r-1}));if(!Ye(n)&&!Ye(n.l)){const o=n.l,s=_c(o)?n.lvl-1:n.lvl;return bt(o,{l:bt(e,{r:o.l,lvl:r-1}),r:Uu(bt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Ml(e,t,n){if(Ye(e))return[];const r=pn(e,t)[0];return aj(Hu(e,r,n))}function Gx(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 aj(e){return Gx(e,({k:t,v:n})=>({index:t,value:n}))}function Uu(e){const{r:t,lvl:n}=e;return!Ye(t)&&!Ye(t.r)&&t.lvl===n&&t.r.lvl===n?bt(t,{l:bt(e,{r:t.l}),lvl:n+1}):e}function Yx(e){const{l:t}=e;return!Ye(t)&&t.lvl===e.lvl?bt(t,{r:bt(e,{l:t.r})}):e}function Ga(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 qx(e,t,n){return e[Ga(e,t,n)]}function lj(e,t,n,r){const o=Ga(e,t,r),s=Ga(e,n,r,o);return e.slice(o,s+1)}const Bf=je(()=>({recalcInProgress:ne(!1)}),[],{singleton:!0});function cj(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 wg(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 uj(e,t){let n=Ye(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),Ye(e)){e=Kt(e,0,o);continue}const a=Ml(e,s-1,i+1);if(a.some(cj(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(i>=u||o===f)&&(e=zu(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 dj(){return{offsetTree:[],sizeTree:ko(),groupOffsetTree:ko(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Wf({index:e},t){return t===e?0:t<e?-1:1}function fj({offset:e},t){return t===e?0:t<e?-1:1}function hj(e){return{index:e.index,value:e}}function mj(e,t,n,r=0){return r>0&&(t=Math.max(t,qx(e,r,Wf).offset)),Gx(lj(e,t,n,fj),hj)}function Gu(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=Ga(o,t-1,Wf),a=o[l].offset;const u=pn(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===pn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Ml(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 pj(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Xt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Ye(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]=uj(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=Gu(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Kt(f,h,li(h,l,o)),ko()),groupIndices:n}}function li(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=qx(t,e,Wf),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function gj(e){return typeof e.groupIndex<"u"}function Kx(e,t,n){if(gj(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Zx(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Zx(e,t){if(!Dl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Dl(e){return!Ye(e.groupOffsetTree)}function yj(e){return Dr(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 vj={offsetHeight:"height",offsetWidth:"width"},jn=je(([{log:e},{recalcInProgress:t}])=>{const n=Ie(),r=Ie(),o=Dt(r,0),s=Ie(),i=Ie(),a=ne(0),l=ne([]),c=ne(void 0),u=ne(void 0),d=ne((S,E)=>mn(S,vj[E])),f=ne(void 0),h=ne(0),p=dj(),m=Dt(Z(n,Ee(l,e,h),Rn(pj,p),Je()),p),v=Dt(Z(l,Je(),Rn((S,E)=>({prev:S.current,current:E}),{prev:[],current:[]}),de(({prev:S})=>S)),[]);he(Z(l,ye(S=>S.length>0),Ee(m,h),de(([S,E,C])=>{const k=S.reduce((I,A,N)=>Kt(I,A,li(A,E.offsetTree,C)||N),ko());return{...E,groupIndices:S,groupOffsetTree:k}})),m),he(Z(r,Ee(m),ye(([S,{lastIndex:E}])=>S<E),de(([S,{lastIndex:E,lastSize:C}])=>[{startIndex:S,endIndex:E,size:C}])),n),he(c,u);const b=Dt(Z(c,de(S=>S===void 0)),!0);he(Z(u,ye(S=>S!==void 0&&Ye(Mt(m).sizeTree)),de(S=>[{startIndex:0,endIndex:0,size:S}])),n);const y=Zt(Z(n,Ee(m),Rn(({sizes:S},[E,C])=>({changed:C!==S,sizes:C}),{changed:!1,sizes:p}),de(S=>S.changed)));ze(Z(a,Rn((S,E)=>({diff:S.prev-E,prev:E}),{diff:0,prev:0}),de(S=>S.diff)),S=>{const{groupIndices:E}=Mt(m);if(S>0)Se(t,!0),Se(s,S+wg(S,E));else if(S<0){const C=Mt(v);C.length>0&&(S-=wg(-S,C)),Se(i,S)}}),ze(Z(a,Ee(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},Xt.ERROR)});const g=Zt(s);he(Z(s,Ee(m),de(([S,E])=>{const C=E.groupIndices.length>0,k=[],I=E.lastSize;if(C){const A=ai(E.sizeTree,0);let N=0,M=0;for(;N<S;){const O=E.groupIndices[M],j=E.groupIndices.length===M+1?1/0:E.groupIndices[M+1]-O-1;k.push({startIndex:O,endIndex:O,size:A}),k.push({startIndex:O+1,endIndex:O+1+j-1,size:I}),M++,N+=j+1}const L=Dr(E.sizeTree);return N!==S&&L.shift(),L.reduce((O,{k:j,v:D})=>{let V=O.ranges;return O.prevSize!==0&&(V=[...O.ranges,{startIndex:O.prevIndex,endIndex:j+S-1,size:O.prevSize}]),{ranges:V,prevIndex:j+S,prevSize:D}},{ranges:k,prevIndex:S,prevSize:0}).ranges}return Dr(E.sizeTree).reduce((A,{k:N,v:M})=>({ranges:[...A.ranges,{startIndex:A.prevIndex,endIndex:N+S-1,size:A.prevSize}],prevIndex:N+S,prevSize:M}),{ranges:[],prevIndex:0,prevSize:I}).ranges})),n);const T=Zt(Z(i,Ee(m,h),de(([S,{offsetTree:E},C])=>{const k=-S;return li(k,E,C)})));return he(Z(i,Ee(m,h),de(([S,E,C])=>{if(E.groupIndices.length>0){if(Ye(E.sizeTree))return E;let I=ko();const A=Mt(v);let N=0,M=0,L=0;for(;N<-S;){L=A[M];const O=A[M+1]-L-1;M++,N+=O+1}if(I=Dr(E.sizeTree).reduce((O,{k:j,v:D})=>Kt(O,Math.max(0,j+S),D),I),N!==-S){const O=ai(E.sizeTree,L);I=Kt(I,0,O);const j=pn(E.sizeTree,-S+1)[1];I=Kt(I,1,j)}return{...E,sizeTree:I,...Gu(E.offsetTree,0,I,C)}}else{const I=Dr(E.sizeTree).reduce((A,{k:N,v:M})=>Kt(A,Math.max(0,N+S),M),ko());return{...E,sizeTree:I,...Gu(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:y,statefulTotalCount:o,trackItemSizes:b,itemSize:d}},et(vr,Bf),{singleton:!0}),bj=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Xx(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!bj)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Oi=je(([{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=Ie(),p=Ie(),m=ne(0);let v=null,b=null,y=null;function g(){v&&(v(),v=null),y&&(y(),y=null),b&&(clearTimeout(b),b=null),Se(o,!1)}return he(Z(h,Ee(e,s,t,m,l,c,f),Ee(r,u,d),de(([[T,S,E,C,k,I,A,N],M,L,P])=>{const O=Xx(T),{align:j,behavior:D,offset:V}=O,H=C-1,_=Kx(O,S,H);let $=li(_,S.offsetTree,M)+I;j==="end"?($+=L+pn(S.sizeTree,_)[1]-E+P,_===H&&($+=A)):j==="center"?$+=(L+pn(S.sizeTree,_)[1]-E+P)/2:$-=k,V&&($+=V);const K=re=>{g(),re?(N("retrying to scroll to",{location:T},Xt.DEBUG),Se(h,T)):(Se(p,!0),N("list did not change, scroll successful",{},Xt.DEBUG))};if(g(),D==="smooth"){let re=!1;y=ze(n,ee=>{re=re||ee}),v=_n(a,()=>{K(re)})}else v=_n(Z(n,xj(150)),K);return b=setTimeout(()=>{g()},1200),Se(o,!0),N("scrolling from index to",{index:_,top:$,behavior:D},Xt.DEBUG),{top:$,behavior:D}})),i),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},et(jn,Bt,vr),{singleton:!0});function xj(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const ci="up",zs="down",wj="none",Sj={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},Tj=0,_i=je(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=ne(!1),a=ne(!0),l=Ie(),c=Ie(),u=ne(4),d=ne(Tj),f=Dt(Z(bg(Z(be(t),Zo(1),xn(!0)),Z(be(t),Zo(1),xn(!1),vg(100))),Je()),!1),h=Dt(Z(bg(Z(s,xn(!0)),Z(s,xn(!1),vg(200))),Je()),!1);he(Z(Et(be(t),be(d)),de(([y,g])=>y<=g),Je()),a),he(Z(a,nr(50)),c);const p=Zt(Z(Et(e,be(n),be(r),be(o),be(u)),Rn((y,[{scrollTop:g,scrollHeight:T},S,E,C,k])=>{const I=g+S-T>-k,A={viewportHeight:S,scrollTop:g,scrollHeight:T};if(I){let M,L;return g>y.state.scrollTop?(M="SCROLLED_DOWN",L=y.state.scrollTop-g):(M="SIZE_DECREASED",L=y.state.scrollTop-g||y.scrollTopDelta),{atBottom:!0,state:A,atBottomBecause:M,scrollTopDelta:L}}let N;return A.scrollHeight>y.state.scrollHeight?N="SIZE_INCREASED":S<y.state.viewportHeight?N="VIEWPORT_HEIGHT_DECREASING":g<y.state.scrollTop?N="SCROLLING_UPWARDS":N="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:N,state:A}},Sj),Je((y,g)=>y&&y.atBottom===g.atBottom))),m=Dt(Z(e,Rn((y,{scrollTop:g,scrollHeight:T,viewportHeight:S})=>{if(Bx(y.scrollHeight,T))return{scrollTop:g,scrollHeight:T,jump:0,changed:!1};{const E=T-(g+S)<1;return y.scrollTop!==g&&E?{scrollHeight:T,scrollTop:g,jump:y.scrollTop-g,changed:!0}:{scrollHeight:T,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),ye(y=>y.changed),de(y=>y.jump)),0);he(Z(p,de(y=>y.atBottom)),i),he(Z(i,nr(50)),l);const v=ne(zs);he(Z(e,de(({scrollTop:y})=>y),Je(),Rn((y,g)=>Mt(h)?{direction:y.direction,prevScrollTop:g}:{direction:g<y.prevScrollTop?ci:zs,prevScrollTop:g},{direction:zs,prevScrollTop:0}),de(y=>y.direction)),v),he(Z(e,nr(50),xn(wj)),v);const b=ne(0);return he(Z(f,ye(y=>!y),xn(0)),b),he(Z(t,nr(100),Ee(f),ye(([y,g])=>!!g),Rn(([y,g],[T])=>[g,T],[0,0]),de(([y,g])=>g-y)),b),{isScrolling:f,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:v,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:b,lastJumpDueToItemResize:m}},et(Bt)),br=je(([{log:e}])=>{const t=ne(!1),n=Zt(Z(t,ye(r=>r),Je()));return ze(t,r=>{r&&Mt(e)("props updated",{},Xt.DEBUG)}),{propsReady:t,didMount:n}},et(vr),{singleton:!0});function zf(e,t){e==0?t():requestAnimationFrame(()=>zf(e-1,t))}function Hf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Mi=je(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=ne(!0),l=ne(0),c=ne(!0);return he(Z(i,Ee(l),ye(([u,d])=>!!d),xn(!1)),a),he(Z(i,Ee(l),ye(([u,d])=>!!d),xn(!1)),c),ze(Z(Et(t,i),Ee(a,e,n,c),ye(([[,u],d,{sizeTree:f},h,p])=>u&&(!Ye(f)||Lf(h))&&!d&&!p),Ee(l)),([,u])=>{_n(s,()=>{Se(c,!0)}),zf(4,()=>{_n(r,()=>{Se(a,!0)}),Se(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},et(jn,Bt,Oi,br),{singleton:!0});function Sg(e){return e?e==="smooth"?"smooth":"auto":!1}const Ej=(e,t)=>typeof e=="function"?Sg(e(t)):t&&Sg(e),Cj=je(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=ne(!1),d=Ie();let f=null;function h(m){Se(o,{index:"LAST",align:"end",behavior:m})}ze(Z(Et(Z(be(e),Zo(1)),a),Ee(be(u),n,s,c),de(([[m,v],b,y,g,T])=>{let S=v&&g,E="auto";return S&&(E=Ej(b,y||T),S=S&&!!E),{totalCount:m,shouldFollow:S,followOutputBehavior:E}}),ye(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:v})=>{f&&(f(),f=null),f=_n(t,()=>{Mt(l)("following output to ",{totalCount:m},Xt.DEBUG),h(v),f=null})});function p(m){const v=_n(r,b=>{m&&!b.atBottom&&b.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Mt(l)("scrolling to bottom due to increased size",{},Xt.DEBUG),h("auto"))});setTimeout(v,100)}return ze(Z(Et(be(u),e,i),ye(([m,,v])=>m&&v),Rn(({value:m},[,v])=>({refreshed:m===v,value:v}),{refreshed:!1,value:0}),ye(({refreshed:m})=>m),Ee(u,e)),([,m])=>{Mt(s)&&p(m!==!1)}),ze(d,()=>{p(Mt(u)!==!1)}),ze(Et(be(u),r),([m,v])=>{m&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},et(jn,_i,Oi,Mi,br,vr,Bt));function Rj(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Qx=je(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Ie(),i=Ie(),a=Zt(Z(s,de(Rj)));return he(Z(a,de(l=>l.totalCount)),e),he(Z(a,de(l=>l.groupIndices)),t),he(Z(Et(r,n,o),ye(([l,c])=>Dl(c)),de(([l,c,u])=>pn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Je(),de(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},et(jn,Bt));function ui(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Jx(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Ya="top",qa="bottom",Tg="none";function Eg(e,t,n){return typeof e=="number"?n===ci&&t===Ya||n===zs&&t===qa?e:0:n===ci?t===Ya?e.main:e.reverse:t===qa?e.main:e.reverse}function Cg(e,t){return typeof e=="number"?e:e[t]||0}const Uf=je(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Ie(),i=ne(0),a=ne(0),l=ne(0),c=Dt(Z(Et(be(e),be(t),be(r),be(s,ui),be(l),be(i),be(o),be(n),be(a)),de(([u,d,f,[h,p],m,v,b,y,g])=>{const T=u-y,S=v+b,E=Math.max(f-T,0);let C=Tg;const k=Cg(g,Ya),I=Cg(g,qa);return h-=y,h+=f+b,p+=f+b,p-=y,h>u+S-k&&(C=ci),p<u-E+d+I&&(C=zs),C!==Tg?[Math.max(T-f-Eg(m,Ya,C)-k,0),T-E-b+d+Eg(m,qa,C)+I]:null}),ye(u=>u!=null),Je(ui)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},et(Bt),{singleton:!0});function Pj(e,t,n){if(Dl(t)){const r=Zx(e,t);return[{index:pn(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 Mc={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Rg(e,t,n){if(e.length===0)return[];if(!Dl(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=Ml(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 ya(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:Rg(e,o,s),topItems:Rg(t,o,s),topListHeight:t.reduce((m,v)=>v.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function ew(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=Hf(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:s[d+l]}));return ya(c,[],a,o,n,r)}const no=je(([{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=ne([]),v=ne(0),b=Ie();he(s.topItemsIndexes,m);const y=Dt(Z(Et(h,p,be(i,ui),be(t),be(e),be(u),c,be(m),be(r),be(o),n),ye(([E,C,,k,,,,,,,I])=>{const A=I&&I.length!==k;return E&&!C&&!A}),de(([,,[E,C],k,I,A,N,M,L,P,O])=>{const j=I,{sizeTree:D,offsetTree:V}=j,H=Mt(v);if(k===0)return{...Mc,totalCount:k};if(E===0&&C===0)return H===0?{...Mc,totalCount:k}:ew(H,A,I,L,P,O||[]);if(Ye(D))return H>0?null:ya(Pj(Hf(A,k),j,O),[],k,P,j,L);const _=[];if(M.length>0){const G=M[0],F=M[M.length-1];let B=0;for(const z of Ml(D,G,F)){const Y=z.value,Q=Math.max(z.start,G),ue=Math.min(z.end,F);for(let U=Q;U<=ue;U++)_.push({index:U,size:Y,offset:B,data:O&&O[U]}),B+=Y}}if(!N)return ya([],_,k,P,j,L);const $=M.length>0?M[M.length-1]+1:0,K=mj(V,E,C,$);if(K.length===0)return null;const re=k-1,ee=_l([],G=>{for(const F of K){const B=F.value;let z=B.offset,Y=F.start;const Q=B.size;if(B.offset<E){Y+=Math.floor((E-B.offset+P)/(Q+P));const U=Y-F.start;z+=U*Q+U*P}Y<$&&(z+=($-Y)*Q,Y=$);const ue=Math.min(F.end,re);for(let U=Y;U<=ue&&!(z>=C);U++)G.push({index:U,size:Q,offset:z,data:O&&O[U]}),z+=Q+P}});return ya(ee,_,k,P,j,L)}),ye(E=>E!==null),Je()),Mc);he(Z(n,ye(Lf),de(E=>E==null?void 0:E.length)),t),he(Z(y,de(E=>E.topListHeight)),d),he(d,l),he(Z(y,de(E=>[E.top,E.bottom])),a),he(Z(y,de(E=>E.items)),b);const g=Zt(Z(y,ye(({items:E})=>E.length>0),Ee(t,n),ye(([{items:E},C])=>E[E.length-1].originalIndex===C-1),de(([,E,C])=>[E-1,C]),Je(ui),de(([E])=>E))),T=Zt(Z(y,nr(200),ye(({items:E,topItems:C})=>E.length>0&&E[0].originalIndex===C.length),de(({items:E})=>E[0].index),Je())),S=Zt(Z(y,ye(({items:E})=>E.length>0),de(({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}}),Je(Jx)));return{listState:y,topItemsIndexes:m,endReached:g,startReached:T,rangeChanged:S,itemsRendered:b,initialItemCount:v,...f}},et(jn,Qx,Uf,Mi,Oi,_i,br,Bf),{singleton:!0}),kj=je(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(he(Z(a,Ee(s),ye(([,l])=>l!==0),Ee(o,e,t,r,n),de(([[,l],c,u,d,f,h=[]])=>ew(l,c,u,d,f,h))),i),{}),et(jn,Mi,no,br),{singleton:!0}),tw=je(([{scrollVelocity:e}])=>{const t=ne(!1),n=Ie(),r=ne(!1);return he(Z(e,Ee(r,t,n),ye(([o,s])=>!!s),de(([o,s,i,a])=>{const{exit:l,enter:c}=s;if(i){if(l(o,a))return!1}else if(c(o,a))return!0;return i}),Je()),t),ze(Z(Et(t,e,n),Ee(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},et(_i),{singleton:!0}),Ij=je(([{topItemsIndexes:e}])=>{const t=ne(0);return he(Z(t,ye(n=>n>0),de(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},et(no)),nw=je(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Ie(),i=Dt(Z(Et(e,r,t,n,o),de(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return he(be(i),s),{totalListHeight:i,totalListHeightChanged:s}},et(Bt,no),{singleton:!0});function rw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const Aj=rw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),Oj=je(([{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=Zt(Z(l,Ee(a),Rn(([,b,y,g],[{items:T,totalCount:S,bottom:E,offsetBottom:C},k])=>{const I=E+C;let A=0;return y===S&&b.length>0&&T.length>0&&(T[0].originalIndex===0&&b[0].originalIndex===0||(A=I-g,A!==0&&(A+=k))),[A,T,S,I]},[0,[],0,0]),ye(([b])=>b!==0),Ee(t,i,r,s,h,p),ye(([,b,y,g,,,T])=>!T&&!g&&b!==0&&y===ci),de(([[b],,,,,y])=>(y("Upward scrolling compensation",{amount:b},Xt.DEBUG),b))));function v(b){b>0?(Se(e,{top:-b,behavior:"auto"}),Se(n,0)):(Se(n,0),Se(e,{top:-b,behavior:"auto"}))}return ze(Z(m,Ee(n,o)),([b,y,g])=>{g&&Aj()?Se(n,y-b):v(-b)}),ze(Z(Et(Dt(o,!1),n,p),ye(([b,y,g])=>!b&&!g&&y!==0),de(([b,y])=>y),nr(1)),v),he(Z(u,de(b=>({top:-b}))),e),ze(Z(c,Ee(d,f),de(([b,{lastSize:y,groupIndices:g,sizeTree:T},S])=>{function E(C){return C*(y+S)}if(g.length===0)return E(b);{let C=0;const k=ai(T,0);let I=0,A=0;for(;I<b;){I++,C+=k;let N=g.length===A+1?1/0:g[A+1]-g[A]-1;I+N>b&&(C-=k,N=b-I+1),I+=N,C+=E(N),A++}return C}})),b=>{Se(n,b),requestAnimationFrame(()=>{Se(e,{top:b}),requestAnimationFrame(()=>{Se(n,0),Se(p,!1)})})}),{deviation:n}},et(Bt,_i,no,jn,vr,Bf)),_j=je(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ne(0);return ze(Z(e,Ee(r),ye(([,o])=>o!==0),de(([,o])=>({top:o}))),o=>{_n(Z(n,Zo(1),ye(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{Se(t,o)})})}),{initialScrollTop:r}},et(br,Bt,no),{singleton:!0}),Mj=je(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ne(!1),r=Dt(Z(Et(n,e,t),ye(([o])=>o),de(([,o,s])=>Math.max(0,o-s)),nr(0),Je()),0);return{alignToBottom:n,paddingTopAddition:r}},et(Bt,nw),{singleton:!0}),Gf=je(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ie(),r=Ie(),o=Ie(),s=ne(!1),i=ne(void 0);return he(Z(Et(n,r),de(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),he(Z(e,Ee(r),de(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},et(Bt)),Dj=({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,Nj=je(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ie();return he(Z(u,Ee(e,o,t,s,i,a,r),Ee(n),de(([[d,f,h,p,m,v,b,y],g])=>{const{done:T,behavior:S,align:E,calculateViewLocation:C=Dj,...k}=d,I=Kx(d,f,p-1),A=li(I,f.offsetTree,g)+m+v,N=A+pn(f.sizeTree,I)[1],M=y+v,L=y+h-b,P=C({itemTop:A,itemBottom:N,viewportTop:M,viewportBottom:L,locationParams:{behavior:S,align:E,...k}});return P?T&&_n(Z(l,ye(O=>O===!1),Zo(Mt(l)?1:2)),T):T&&T(),P}),ye(d=>d!==null)),c),{scrollIntoView:u}},et(jn,Bt,Oi,no,vr),{singleton:!0}),jj=je(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ie(),u=ne(void 0),d=ne(null),f=ne(null);return he(a,d),he(l,f),ze(Z(c,Ee(e,n,i,d,f,r)),([h,p,m,v,b,y,g])=>{const T=yj(p.sizeTree);v&&b!==null&&y!==null&&(m=b.scrollTop-y.offsetTop),m-=g,h({ranges:T,scrollTop:m})}),he(Z(u,ye(Lf),de(Lj)),o),he(Z(s,Ee(u),ye(([,h])=>h!==void 0),Je(),de(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},et(jn,Bt,Mi,br,Gf));function Lj(e){return{offset:e.scrollTop,index:0,align:"start"}}const Fj=je(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),et(Uf,kj,br,tw,nw,_j,Mj,Gf,Nj,vr)),ow=je(([{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,v,b,{listState:y,topItemsIndexes:g,...T},{scrollToIndex:S},E,{topItemCount:C},{groupCounts:k},I])=>(he(T.rangeChanged,I.scrollSeekRangeChanged),he(Z(I.windowViewportRect,de(A=>A.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,...b,statefulTotalCount:c,listState:y,scrollToIndex:S,trackItemSizes:o,itemSize:s,groupIndices:l,...T,...I,...m,sizes:d,...v}),et(jn,Mi,Bt,jj,Cj,no,Oi,Oj,Ij,Qx,Fj)),Dc="-webkit-sticky",Pg="sticky",sw=rw(()=>{if(typeof document>"u")return Pg;const e=document.createElement("div");return e.style.position=Dc,e.style.position===Dc?Dc:Pg});function Yf(e,t){const n=x.useRef(null),r=x.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}=$f(r),i=x.useCallback(()=>{r(s.current)},[r,s]);return x.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 Nl=x.createContext(void 0),iw=x.createContext(void 0);function qf(e){return e}const Vj=je(()=>{const e=ne(l=>`Item ${l}`),t=ne(null),n=ne(l=>`Group ${l}`),r=ne({}),o=ne(qf),s=ne("div"),i=ne(to),a=(l,c=null)=>Dt(Z(r,de(u=>u[l]),Je()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}),$j=je(([e,t])=>({...e,...t}),et(ow,Vj)),Bj=({height:e})=>x.createElement("div",{style:{height:e}}),Wj={position:sw(),zIndex:1,overflowAnchor:"none"},zj={overflowAnchor:"none"},kg=x.memo(function({showTopList:t=!1}){const n=Pe("listState"),r=nn("sizeRanges"),o=Pe("useWindowScroll"),s=Pe("customScrollParent"),i=nn("windowScrollContainerState"),a=nn("scrollContainerState"),l=s||o?i:a,c=Pe("itemContent"),u=Pe("context"),d=Pe("groupContent"),f=Pe("trackItemSizes"),h=Pe("itemSize"),p=Pe("log"),m=nn("gap"),{callbackRef:v}=$x(r,h,f,t?to:l,p,m,s),[b,y]=x.useState(0);Xf("deviation",P=>{b!==P&&y(P)});const g=Pe("EmptyPlaceholder"),T=Pe("ScrollSeekPlaceholder")||Bj,S=Pe("ListComponent"),E=Pe("ItemComponent"),C=Pe("GroupComponent"),k=Pe("computeItemKey"),I=Pe("isSeeking"),A=Pe("groupIndices").length>0,N=Pe("alignToBottom"),M=Pe("initialItemFinalLocationReached"),L=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:b!==0?b:N?"auto":0,...M?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?x.createElement(g,ut(g,u)):x.createElement(S,{...ut(S,u),ref:v,style:L,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(P=>{const O=P.originalIndex,j=k(O+n.firstItemIndex,P.data,u);return I?x.createElement(T,{...ut(T,u),key:j,index:P.index,height:P.size,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?x.createElement(C,{...ut(C,u),key:j,"data-index":O,"data-known-size":P.size,"data-item-index":P.index,style:Wj},d(P.index,u)):x.createElement(E,{...ut(E,u),...aw(E,P.data),key:j,"data-index":O,"data-known-size":P.size,"data-item-index":P.index,"data-item-group-index":P.groupIndex,style:zj},A?c(P.index,P.groupIndex,P.data,u):c(P.index,P.data,u))}))}),Hj={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},bs=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),Uj={width:"100%",position:sw(),top:0,zIndex:1};function ut(e,t){if(typeof e!="string")return{context:t}}function aw(e,t){return{item:typeof e=="string"?void 0:t}}const Gj=x.memo(function(){const t=Pe("HeaderComponent"),n=nn("headerHeight"),r=Pe("headerFooterTag"),o=Mn(x.useMemo(()=>i=>n(mn(i,"height")),[n])),s=Pe("context");return t?x.createElement(r,{ref:o},x.createElement(t,ut(t,s))):null}),Yj=x.memo(function(){const t=Pe("FooterComponent"),n=nn("footerHeight"),r=Pe("headerFooterTag"),o=Mn(x.useMemo(()=>i=>n(mn(i,"height")),[n])),s=Pe("context");return t?x.createElement(r,{ref:o},x.createElement(t,ut(t,s))):null});function Kf({usePublisher:e,useEmitter:t,useEmitterValue:n}){return x.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}=Wx(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),x.createElement(c,{ref:h,style:{...Hj,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...ut(c,f)},i)})}function Zf({usePublisher:e,useEmitter:t,useEmitterValue:n}){return x.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:v,scrollToCallback:b}=Wx(l,u,c,to,h);return nj(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",b),t("scrollBy",v),x.createElement(c,{style:{position:"relative",...s,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...ut(c,p)},i)})}const qj=({children:e})=>{const t=x.useContext(Nl),n=nn("viewportHeight"),r=nn("fixedItemHeight"),o=Pe("alignToBottom"),s=Mn(x.useMemo(()=>si(n,i=>mn(i,"height")),[n]));return x.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.createElement("div",{style:bs(o),ref:s,"data-viewport-type":"element"},e)},Kj=({children:e})=>{const t=x.useContext(Nl),n=nn("windowViewportRect"),r=nn("fixedItemHeight"),o=Pe("customScrollParent"),s=Yf(n,o),i=Pe("alignToBottom");return x.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.createElement("div",{ref:s,style:bs(i),"data-viewport-type":"window"},e)},Zj=({children:e})=>{const t=Pe("TopItemListComponent")||"div",n=Pe("headerHeight"),r={...Uj,marginTop:`${n}px`},o=Pe("context");return x.createElement(t,{style:r,...ut(t,o)},e)},Xj=x.memo(function(t){const n=Pe("useWindowScroll"),r=Pe("topItemsIndexes").length>0,o=Pe("customScrollParent"),s=o||n?eL:Jj,i=o||n?Kj:qj;return x.createElement(s,{...t},r&&x.createElement(Zj,null,x.createElement(kg,{showTopList:!0})),x.createElement(i,null,x.createElement(Gj,null),x.createElement(kg,null),x.createElement(Yj,null)))}),{Component:Qj,usePublisher:nn,useEmitterValue:Pe,useEmitter:Xf}=Vf($j,{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"}},Xj),Jj=Kf({usePublisher:nn,useEmitterValue:Pe,useEmitter:Xf}),eL=Zf({usePublisher:nn,useEmitterValue:Pe,useEmitter:Xf}),Qf=Qj,Ig={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},tL={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Ag,ceil:Og,floor:Ka,min:Nc,max:Hs}=Math;function nL(e){return{...tL,items:e}}function _g(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 rL(e,t){return e&&e.column===t.column&&e.row===t.row}function na(e,t){return e&&e.width===t.width&&e.height===t.height}const oL=je(([{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:v,customScrollParent:b,windowScrollContainerState:y,windowScrollTo:g},T])=>{const S=ne(0),E=ne(0),C=ne(Ig),k=ne({height:0,width:0}),I=ne({height:0,width:0}),A=Ie(),N=Ie(),M=ne(0),L=ne(null),P=ne({row:0,column:0}),O=Ie(),j=Ie(),D=ne(!1),V=ne(0),H=ne(!0),_=ne(!1);ze(Z(p,Ee(V),ye(([F,B])=>!!B)),()=>{Se(H,!1),Se(E,0)}),ze(Z(Et(p,H,I,k,V,_),ye(([F,B,z,Y,,Q])=>F&&!B&&z.height!==0&&Y.height!==0&&!Q)),([,,,,F])=>{Se(_,!0),zf(1,()=>{Se(A,F)}),_n(Z(r),()=>{Se(n,[0,0]),Se(H,!0)})}),he(Z(j,ye(F=>F!=null&&F.scrollTop>0),xn(0)),E),ze(Z(p,Ee(j),ye(([,F])=>F!=null)),([,F])=>{F&&(Se(k,F.viewport),Se(I,F==null?void 0:F.item),Se(P,F.gap),F.scrollTop>0&&(Se(D,!0),_n(Z(r,Zo(1)),B=>{Se(D,!1)}),Se(i,{top:F.scrollTop})))}),he(Z(k,de(({height:F})=>F)),o),he(Z(Et(be(k,na),be(I,na),be(P,(F,B)=>F&&F.column===B.column&&F.row===B.row),be(r)),de(([F,B,z,Y])=>({viewport:F,item:B,gap:z,scrollTop:Y}))),O),he(Z(Et(be(S),t,be(P,rL),be(I,na),be(k,na),be(L),be(E),be(D),be(H),be(V)),ye(([,,,,,,,F])=>!F),de(([F,[B,z],Y,Q,ue,U,ke,,qe,Le])=>{const{row:Te,column:q}=Y,{height:se,width:W}=Q,{width:J}=ue;if(ke===0&&(F===0||J===0))return Ig;if(W===0){const Lt=Hf(Le,F),xr=Lt===0?Math.max(ke-1,0):Lt;return nL(_g(Lt,xr,U))}const pe=lw(J,W,q);let ce,Fe;qe?B===0&&z===0&&ke>0?(ce=0,Fe=ke-1):(ce=pe*Ka((B+Te)/(se+Te)),Fe=pe*Og((z+Te)/(se+Te))-1,Fe=Nc(F-1,Hs(Fe,pe-1)),ce=Nc(Fe,Hs(0,ce))):(ce=0,Fe=-1);const te=_g(ce,Fe,U),{top:ie,bottom:_e}=Mg(ue,Y,Q,te),Ke=Og(F/pe),At=Ke*se+(Ke-1)*Te-_e;return{items:te,offsetTop:ie,offsetBottom:At,top:ie,bottom:_e,itemHeight:se,itemWidth:W}})),C),he(Z(L,ye(F=>F!==null),de(F=>F.length)),S),he(Z(Et(k,I,C,P),ye(([F,B,{items:z}])=>z.length>0&&B.height!==0&&F.height!==0),de(([F,B,{items:z},Y])=>{const{top:Q,bottom:ue}=Mg(F,Y,B,z);return[Q,ue]}),Je(ui)),n);const $=ne(!1);he(Z(r,Ee($),de(([F,B])=>B||F!==0)),$);const K=Zt(Z(be(C),ye(({items:F})=>F.length>0),Ee(S,$),ye(([{items:F},B,z])=>z&&F[F.length-1].index===B-1),de(([,F])=>F-1),Je())),re=Zt(Z(be(C),ye(({items:F})=>F.length>0&&F[0].index===0),xn(0),Je())),ee=Zt(Z(be(C),Ee(D),ye(([{items:F},B])=>F.length>0&&!B),de(([{items:F}])=>({startIndex:F[0].index,endIndex:F[F.length-1].index})),Je(Jx),nr(0)));he(ee,f.scrollSeekRangeChanged),he(Z(A,Ee(k,I,S,P),de(([F,B,z,Y,Q])=>{const ue=Xx(F),{align:U,behavior:ke,offset:qe}=ue;let Le=ue.index;Le==="LAST"&&(Le=Y-1),Le=Hs(0,Le,Nc(Y-1,Le));let Te=Yu(B,Q,z,Le);return U==="end"?Te=Ag(Te-B.height+z.height):U==="center"&&(Te=Ag(Te-B.height/2+z.height/2)),qe&&(Te+=qe),{top:Te,behavior:ke}})),i);const G=Dt(Z(C,de(F=>F.offsetBottom+F.bottom)),0);return he(Z(m,de(F=>({width:F.visibleWidth,height:F.visibleHeight}))),k),{data:L,totalCount:S,viewportDimensions:k,itemDimensions:I,scrollTop:r,scrollHeight:N,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:A,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:v,customScrollParent:b,windowScrollContainerState:y,deviation:M,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:P,restoreStateFrom:j,...f,initialTopMostItemIndex:V,gridState:C,totalListHeight:G,...d,startReached:re,endReached:K,rangeChanged:ee,stateChanged:O,propsReady:h,stateRestoreInProgress:D,...T}},et(Uf,Bt,_i,tw,br,Gf,vr));function Mg(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Yu(e,t,n,r[0].index),i=Yu(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Yu(e,t,n,r){const o=lw(e.width,n.width,t.column),s=Ka(r/o),i=s*n.height+Hs(0,s-1)*t.row;return i>0?i+t.row:i}function lw(e,t,n){return Hs(1,Ka((e+n)/(Ka(t)+n)))}const sL=je(()=>{const e=ne(c=>`Item ${c}`),t=ne({}),n=ne(null),r=ne("virtuoso-grid-item"),o=ne("virtuoso-grid-list"),s=ne(qf),i=ne("div"),a=ne(to),l=(c,u=null)=>Dt(Z(t,de(d=>d[c]),Je()),u);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),iL=je(([e,t])=>({...e,...t}),et(oL,sL)),aL=x.memo(function(){const t=nt("gridState"),n=nt("listClassName"),r=nt("itemClassName"),o=nt("itemContent"),s=nt("computeItemKey"),i=nt("isSeeking"),a=dn("scrollHeight"),l=nt("ItemComponent"),c=nt("ListComponent"),u=nt("ScrollSeekPlaceholder"),d=nt("context"),f=dn("itemDimensions"),h=dn("gap"),p=nt("log"),m=nt("stateRestoreInProgress"),v=Mn(x.useMemo(()=>b=>{const y=b.parentElement.parentElement.scrollHeight;a(y);const g=b.firstChild;if(g){const{width:T,height:S}=g.getBoundingClientRect();f({width:T,height:S})}h({row:Dg("row-gap",getComputedStyle(b).rowGap,p),column:Dg("column-gap",getComputedStyle(b).columnGap,p)})},[a,f,h,p]));return m?null:x.createElement(c,{ref:v,className:n,...ut(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(b=>{const y=s(b.index,b.data,d);return i?x.createElement(u,{key:y,...ut(u,d),index:b.index,height:t.itemHeight,width:t.itemWidth}):x.createElement(l,{...ut(l,d),className:r,"data-index":b.index,key:y},o(b.index,b.data,d))}))}),lL=x.memo(function(){const t=nt("HeaderComponent"),n=dn("headerHeight"),r=nt("headerFooterTag"),o=Mn(x.useMemo(()=>i=>n(mn(i,"height")),[n])),s=nt("context");return t?x.createElement(r,{ref:o},x.createElement(t,ut(t,s))):null}),cL=x.memo(function(){const t=nt("FooterComponent"),n=dn("footerHeight"),r=nt("headerFooterTag"),o=Mn(x.useMemo(()=>i=>n(mn(i,"height")),[n])),s=nt("context");return t?x.createElement(r,{ref:o},x.createElement(t,ut(t,s))):null}),uL=({children:e})=>{const t=x.useContext(iw),n=dn("itemDimensions"),r=dn("viewportDimensions"),o=Mn(x.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]));return x.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),x.createElement("div",{style:bs(!1),ref:o},e)},dL=({children:e})=>{const t=x.useContext(iw),n=dn("windowViewportRect"),r=dn("itemDimensions"),o=nt("customScrollParent"),s=Yf(n,o);return x.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),x.createElement("div",{ref:s,style:bs(!1)},e)},fL=x.memo(function({...t}){const n=nt("useWindowScroll"),r=nt("customScrollParent"),o=r||n?mL:hL,s=r||n?dL:uL;return x.createElement(o,{...t},x.createElement(s,null,x.createElement(lL,null),x.createElement(aL,null),x.createElement(cL,null)))}),{Component:T$,usePublisher:dn,useEmitterValue:nt,useEmitter:cw}=Vf(iL,{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"}},fL),hL=Kf({usePublisher:dn,useEmitterValue:nt,useEmitter:cw}),mL=Zf({usePublisher:dn,useEmitterValue:nt,useEmitter:cw});function Dg(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Xt.WARN),t==="normal"?0:parseInt(t??"0",10)}const pL=je(()=>{const e=ne(l=>x.createElement("td",null,"Item $",l)),t=ne(null),n=ne(null),r=ne(null),o=ne({}),s=ne(qf),i=ne(to),a=(l,c=null)=>Dt(Z(o,de(u=>u[l]),Je()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}),gL=je(([e,t])=>({...e,...t}),et(ow,pL)),yL=({height:e})=>x.createElement("tr",null,x.createElement("td",{style:{height:e}})),vL=({height:e})=>x.createElement("tr",null,x.createElement("td",{style:{height:e,padding:0,border:0}})),bL={overflowAnchor:"none"},xL=x.memo(function(){const t=Be("listState"),n=fn("sizeRanges"),r=Be("useWindowScroll"),o=Be("customScrollParent"),s=fn("windowScrollContainerState"),i=fn("scrollContainerState"),a=o||r?s:i,l=Be("itemContent"),c=Be("trackItemSizes"),u=Be("itemSize"),d=Be("log"),{callbackRef:f,ref:h}=$x(n,u,c,a,d,void 0,o),[p,m]=x.useState(0);Jf("deviation",j=>{p!==j&&(h.current.style.marginTop=`${j}px`,m(j))});const v=Be("EmptyPlaceholder"),b=Be("ScrollSeekPlaceholder")||yL,y=Be("FillerRow")||vL,g=Be("TableBodyComponent"),T=Be("TableRowComponent"),S=Be("computeItemKey"),E=Be("isSeeking"),C=Be("paddingTopAddition"),k=Be("firstItemIndex"),I=Be("statefulTotalCount"),A=Be("context");if(I===0&&v)return x.createElement(v,ut(v,A));const N=t.offsetTop+C+p,M=t.offsetBottom,L=N>0?x.createElement(y,{height:N,key:"padding-top",context:A}):null,P=M>0?x.createElement(y,{height:M,key:"padding-bottom",context:A}):null,O=t.items.map(j=>{const D=j.originalIndex,V=S(D+k,j.data,A);return E?x.createElement(b,{...ut(b,A),key:V,index:j.index,height:j.size,type:j.type||"item"}):x.createElement(T,{...ut(T,A),...aw(T,j.data),key:V,"data-index":D,"data-known-size":j.size,"data-item-index":j.index,style:bL},l(j.index,j.data,A))});return x.createElement(g,{ref:f,"data-testid":"virtuoso-item-list",...ut(g,A)},[L,...O,P])}),wL=({children:e})=>{const t=x.useContext(Nl),n=fn("viewportHeight"),r=fn("fixedItemHeight"),o=Mn(x.useMemo(()=>si(n,s=>mn(s,"height")),[n]));return x.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.createElement("div",{style:bs(!1),ref:o,"data-viewport-type":"element"},e)},SL=({children:e})=>{const t=x.useContext(Nl),n=fn("windowViewportRect"),r=fn("fixedItemHeight"),o=Be("customScrollParent"),s=Yf(n,o);return x.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.createElement("div",{ref:s,style:bs(!1),"data-viewport-type":"window"},e)},TL=x.memo(function(t){const n=Be("useWindowScroll"),r=Be("customScrollParent"),o=fn("fixedHeaderHeight"),s=fn("fixedFooterHeight"),i=Be("fixedHeaderContent"),a=Be("fixedFooterContent"),l=Be("context"),c=Mn(x.useMemo(()=>si(o,y=>mn(y,"height")),[o])),u=Mn(x.useMemo(()=>si(s,y=>mn(y,"height")),[s])),d=r||n?RL:CL,f=r||n?SL:wL,h=Be("TableComponent"),p=Be("TableHeadComponent"),m=Be("TableFooterComponent"),v=i?x.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...ut(p,l)},i()):null,b=a?x.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...ut(m,l)},a()):null;return x.createElement(d,{...t},x.createElement(f,null,x.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...ut(h,l)},[v,x.createElement(xL,{key:"TableBody"}),b])))}),{Component:EL,usePublisher:fn,useEmitterValue:Be,useEmitter:Jf}=Vf(gL,{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"}},TL),CL=Kf({usePublisher:fn,useEmitterValue:Be,useEmitter:Jf}),RL=Zf({usePublisher:fn,useEmitterValue:Be,useEmitter:Jf}),PL=EL,uw=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>w.jsxs("div",{className:Me("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:w.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[s,e||r?w.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?w.jsx(jx,{as:"button",type:"button","aria-description":r,title:w.jsxs("span",{className:"cursor-help",children:[w.jsx("span",{className:"sr-only",children:r}),w.jsx(Fb,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:w.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?w.jsxs(x.Fragment,{children:[w.jsx(jb,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),w.jsx(qk,{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]}),Di=x.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:s,right:i,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:h,title:p,componentName:m,placeholder:v,hideLeft:b=!1,required:y,disabled:g,reportStatus:T},S)=>{const E=ZO(),C=T!==void 0?T:E.input.iconFeedback,k=d??h,I=Ct(),A=e??I.inputOptionalLabel;return w.jsxs("fieldset",{ref:S,form:u,disabled:g,"data-error":!!c,"aria-disabled":g,"data-component":m,"data-interactive":!!s,className:Me("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[w.jsxs("label",{form:u,htmlFor:k,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[w.jsx(uw,{info:a,hideLeft:b,reportStatus:C,title:p,placeholder:v,children:A||n?w.jsxs(x.Fragment,{children:[y?null:w.jsx("span",{"aria-disabled":g,className:"text-opacity-70 aria-disabled:text-disabled",children:A}),n?w.jsx(x.Fragment,{children:n}):null]}):null}),w.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,children:[t?w.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,i?w.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:i}):null]})]}),w.jsx("p",{className:"mt-input-gap hidden flex-shrink-0 flex-grow-0 whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:inline-block group-error:inline-block group-error:text-danger",children:c}),w.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),kL=e=>w.jsx(x.Fragment,{children:e.children}),IL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},AL={caseSensitive:!1,sort:!1},OL=[],_L=x.forwardRef(function(t,n){return w.jsx(ct.ul,{...t,ref:n,className:"w-full rounded-lg border-b border-tooltip-border last:border-transparent",children:w.jsx(fr,{children:t.children})})}),ML=x.forwardRef(function({item:t,context:n,...r},o){return w.jsx(ct.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),DL={List:_L,Item:ML},mo=320,jc=40,NL=x.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,emptyMessage:o,interactive:s,rightLabel:i,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,required:h=!1,...p},m)=>{const v=x.useRef(null),b=x.useRef(null),y=p.value??p.defaultValue??"",g=Ct(),[T,S]=x.useState(()=>Math.min(mo,jc*e.length)),[E,C]=x.useState(!1),[k,I]=x.useState(""),[A,N]=x.useState(y),[M,L]=x.useState(()=>{var q;return((q=e.find(se=>se.value===y))==null?void 0:q.label)??y}),[P,O]=x.useState(null),j=x.useRef(OL),D=t&&k!==""?[{value:k,label:k,"data-dynamic":"true"},...e]:e,V=new Mr(D,["value","label"],AL).search(k),H=()=>{C(!1),S(0)},_=V.filter(q=>q.hidden!==!0),$=t?void 0:`^(${e.map(q=>`${au(q.value)}${q.label?"|"+au(q.label):""}`).join("|")})$`;x.useEffect(()=>{if(p.value){const q=e.find(se=>se.value===p.value);N((q==null?void 0:q.label)??p.value)}},[p.value]),x.useEffect(()=>{E||S(0)},[E]),x.useEffect(()=>{if(!E)return;const q=G.floating;if(q.current===null)return;let se=0;Array.from(q.current.querySelectorAll("li")).slice(0,Math.min(V.length,10)).forEach(pe=>{const ce=pe.getBoundingClientRect();se+=ce.height});const J=Math.min(se,mo);S(J)},[k,E]);const{x:K,y:re,strategy:ee,refs:G,context:F}=Qr({open:E,transform:!0,strategy:"absolute",onOpenChange:C,whileElementsMounted:Pi,middleware:[ki(4),lx({padding:10,elementContext:"reference",apply(q){var ce;const se=(ce=v.current)==null?void 0:ce.getBoundingClientRect().width,W=q.elements.floating.querySelector("ul"),J=(W==null?void 0:W.getBoundingClientRect().height)||0,pe=Math.min(J<jc?mo:J,mo);pi.flushSync(()=>setTimeout(()=>{const Fe=(W==null?void 0:W.getBoundingClientRect().height)??0;return Fe<jc?void S(pe):void S(Math.min(Fe,mo))},50)),Object.assign(q.elements.floating.style,{width:`${se}px`,maxWidth:`${se}px`,maxHeight:`${mo}`})}})]}),B=Ex(F,IL),{getReferenceProps:z,getFloatingProps:Y,getItemProps:Q}=Jr([eo(F,{role:"listbox"}),Xr(F),jf(F,{cols:0,listRef:j,loop:!0,virtual:!0,allowEscape:!0,activeIndex:P,selectedIndex:P,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:q=>O(se=>q??se)})]);x.useEffect(()=>{const q=G.reference.current;if(q)return bi(q)},[]);const ue=(q,se)=>{N(q.value);const W=G.reference.current;if(!W)return;W==null||W.setAttribute("data-value",q.value),W.value=q.value;const J=new Event("change",{bubbles:!1,cancelable:!0});W.dispatchEvent(J),p.onChange&&p.onChange(J),L(q.label??""),H(),I(""),O(se)},U=q=>{var W;const se=q.target.value;return I(se),!E&&se===""?C(!0):(q.target.name=p.name||"",se?C(!0):(W=p.onChange)==null?void 0:W.call(p,q))},ke=()=>{var q;C(!0),I(""),(q=G.reference.current)==null||q.focus()},qe=()=>{C(!0),I("")},Le=()=>{var q;(q=G.reference.current)==null||q.setAttribute("data-value",""),I(""),N(""),L(""),xd(G.reference.current),H()},Te=p.id||p.name;return w.jsxs(Di,{...p,left:d,error:f,ref:v,form:p.form,name:p.name,feedback:n,hideLeft:c,required:h,title:p.title,container:l,rightLabel:i,interactive:s,id:p.name||p.id,optionalText:a,componentName:"autocomplete",labelClassName:r,placeholder:p.placeholder,right:w.jsxs("span",{className:"flex items-center gap-0.5",children:[w.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:ke,children:[w.jsx(of,{size:20}),w.jsx("span",{className:"sr-only",children:g.inputCaretDown})]}),A?w.jsx("button",{type:"button",onClick:Le,className:"p-2 transition-colors link:text-danger md:p-1",children:w.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[w.jsx("input",{"data-shadow":"true",...z({...p,onChange:U,onFocus:qe,pattern:$,ref:G.setReference,name:`${Te}-shadow`,id:`${Te}-shadow`,onClick:q=>q.currentTarget.focus(),onKeyDown(q){var se,W;if(q.key==="ArrowDown"){let J=P+1;return J>V.length-1&&(J=0),(se=b.current)==null||se.scrollIntoView({index:J}),O(J)}if(q.key==="ArrowUp"){let J=P-1;return J<0&&(J=V.length-1),(W=b.current)==null||W.scrollIntoView({index:J}),O(J)}if(q.key==="Escape")return q.currentTarget.blur(),H();if(q.key==="Enter"){if(P!==null&&V[P])return q.preventDefault(),ue(V[P],P);if(V.length===1)return q.preventDefault(),ue(V[0],0)}}}),"data-value":A,"data-error":!!f,"data-name":Te,"data-target":Te,required:h,value:E?k:M||A,"aria-autocomplete":"list",autoComplete:"off",className:Me("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",p.className)}),w.jsx("input",{id:Te,name:Te,type:"hidden","data-origin":Te,ref:m,required:h,defaultValue:p.value||A||void 0}),w.jsx(Zr,{preserveTabOrder:!0,children:E?w.jsx(ms,{guards:!0,returnFocus:!1,context:F,initialFocus:-1,visuallyHiddenDismiss:!0,children:w.jsxs("ul",{...Y({ref:G.setFloating,style:{...B.styles,position:ee,left:(K??0)+(A?26:18),top:re??0}}),"data-floating":"true",className:"isolate z-floating m-0 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[V.length===0?w.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:w.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:o||g.autocompleteEmpty})}):null,w.jsx(Qf,{ref:b,data:_,components:DL,hidden:_.length===0,className:"rounded-lg border-floating-border bg-floating-background p-0 text-foreground",style:{height:T},itemContent:(q,se)=>{const W=se.Render??kL,J=A===se.value||A===se.label,pe=P===q,ce=se.label??se.value;return w.jsx("button",{"data-value":se.value,...Q({ref:Fe=>void(j.current[q]=Fe),role:"option",type:"button","aria-checked":J,"aria-current":J,"aria-selected":J,"aria-busy":se.disabled,onClick:()=>ue(se,q),className:`cursor-pointer w-full p-2 text-left ${J?"bg-primary-hover text-primary-foreground":""} ${pe?"bg-floating-hover text-floating-foreground":""}`}),children:w.jsx(W,{...p,label:se.label,value:se.value,children:ce})})}})]})}):null})]})});class Io extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof Io&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}delete(t){const n=super.delete(t);return this.list=Array.from(this.entries())??[],n}map(t){return this.list.map(n=>t(n[1]))}clone(){return new Io(this)}}const eh=x.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:s,container:i,...a},l)=>w.jsxs("label",{"data-task":t,"data-component":"checkbox","data-disabled":a.disabled,"aria-disabled":a.disabled,className:Me("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",i),children:[w.jsx("input",{...a,ref:l,type:"checkbox","data-task":t,className:Me("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",o)}),e,w.jsx("span",{"data-name":"checkbox-label",className:Me("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),jL=e=>w.jsx(x.Fragment,{children:e.children}),LL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},FL={caseSensitive:!1,sort:!1},Ng=[],VL=x.forwardRef(function(t,n){return w.jsx(ct.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:w.jsx(fr,{children:t.children})})}),$L=x.forwardRef(function({item:t,context:n,...r},o){return w.jsx(ct.li,{...r,ref:o,className:"last:rounded-t-lg"})}),BL={List:VL,Item:$L},WL=e=>{const t=Ct(),n=x.useRef(null),r=x.Children.count(e.children),[o,s]=x.useState(!1);return x.useEffect(()=>{if(n.current===null)return;const i=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return s(!1);if(l>i.width)return s(!0)},[r]),w.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?w.jsxs(Td,{size:"small","data-multicounter":"true",children:[r," ",t.multiComboboxSelectedLabel]}):e.children})},zL=x.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:s,interactive:i,emptyMessage:a,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:h=!1,dynamicOption:p=!1,...m},v)=>{const b=x.useMemo(()=>new Io(r.map(W=>[W.value,W])),[r]),y=x.useRef(null),g=x.useRef(null),T=m.value??m.defaultValue??Ng,S=Ct(),[E,C]=x.useState(0),[k,I]=x.useState(!1),[A,N]=x.useState(""),[M,L]=x.useState(()=>{const W=new Io;return T.forEach(J=>{const pe=b.get(J);return pe?W.set(J,pe):void 0}),W}),P=x.useMemo(()=>Array.from(M.keys()),[M]),[O,j]=x.useState(()=>{const W=new Set(T);return r.reduce((J,pe)=>W.has(pe.value)?[...J,pe.label??pe.value]:J,[])??T}),[D,V]=x.useState(null),H=x.useRef(Ng),_=p&&A!==""?[{value:A,label:A,"data-dynamic":"true"},...r]:r,$=new Mr(_,["value","label"],FL).search(A);x.useEffect(()=>{k||C(0)},[k]),x.useEffect(()=>{m.value&&L(new Io(m.value.map(W=>[W,b.get(W)])))},[m.value,b]);const{x:K,y:re,strategy:ee,refs:G,context:F}=Qr({open:k,transform:!0,strategy:"absolute",onOpenChange:I,whileElementsMounted:Pi,middleware:[ki(4),lx({padding:10,elementContext:"reference",apply(W){var ce;const J=(ce=y.current)==null?void 0:ce.getBoundingClientRect().width,pe=360;pi.flushSync(()=>setTimeout(()=>C(pe),200)),Object.assign(W.elements.floating.style,{width:`${J}px`,maxWidth:`${J}px`,maxHeight:`${pe}px`,height:`${pe}px`})}})]}),B=Ex(F,LL),{getReferenceProps:z,getFloatingProps:Y,getItemProps:Q}=Jr([eo(F,{role:"listbox"}),Xr(F),jf(F,{cols:0,listRef:H,loop:!0,virtual:!0,allowEscape:!0,activeIndex:D,selectedIndex:D,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:W=>V(J=>W??J)})]);x.useEffect(()=>{const W=G.reference.current;if(W)return bi(W)},[]);const ue=(W,J)=>{const pe=M.clone();M.has(W.value)?pe.delete(W.value):pe.set(W.value,W),L(pe);const ce=G.reference.current;if(!ce)return;ce==null||ce.setAttribute("data-value",W.value),ce.value=Array.from(pe.values());const Fe=new Event("change",{bubbles:!1,cancelable:!0});ce.dispatchEvent(Fe),m.onChange&&m.onChange(Fe),j(te=>te.concat(W.label??"")),N(""),V(J)},U=W=>{const J=W.target.value;return N(J),!k&&J===""?I(!0):(W.target.name=m.name||"",J?I(!0):void 0)},ke=()=>{var W;I(!0),N(""),(W=G.reference.current)==null||W.focus()},qe=()=>{I(!0),N("")},Le=()=>{var W;(W=G.reference.current)==null||W.setAttribute("data-value",""),N(""),xd(G.reference.current),I(!1)},Te=m.id||m.name,q=M.map(W=>w.jsx(Td,{size:"small",children:W.label??W.value},`multicombobox-${W.value}-x`)),se=$.filter(W=>W.hidden!==!0);return w.jsxs(Di,{...m,left:e,error:t,ref:y,form:m.form,name:m.name,feedback:d,hideLeft:f,required:h,title:m.title,container:o,rightLabel:s,interactive:i,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:w.jsxs("span",{className:"flex items-center gap-0.5",children:[w.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:ke,children:[w.jsx(of,{size:20}),w.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),M?w.jsx("button",{type:"button",onClick:Le,className:"transition-colors link:text-danger",children:w.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[w.jsx("button",{...z({...m,onFocus:qe,id:`${Te}-shadow`,name:`${Te}-shadow`,ref:G.setReference}),type:"button","data-name":Te,"data-target":Te,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":P.join(","),value:k?A:O||M,className:Me("input placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","truncate overflow-ellipsis",m.className),children:w.jsx(WL,{label:c,children:q})}),w.jsx("input",{id:Te,name:Te,type:"hidden","data-origin":Te,ref:v,required:h,defaultValue:m.value||P||void 0}),w.jsx(Zr,{preserveTabOrder:!0,children:k?w.jsx(ms,{guards:!0,returnFocus:!1,context:F,initialFocus:-1,visuallyHiddenDismiss:!0,children:w.jsxs("div",{...Y({ref:G.setFloating,style:{...B.styles,position:ee,left:(K??0)+(M?26:18),top:re??0}}),"data-floating":"true",className:"isolate z-floating m-0 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[w.jsx("input",{autoFocus:!0,value:A,onChange:U,title:m.title,placeholder:S.multiComboboxInnerPlaceholder,onKeyDown:W=>{var J,pe;if(W.key==="ArrowDown"){let ce=D+1;return ce>$.length-1&&(ce=0),(J=g.current)==null||J.scrollIntoView({index:ce}),V(ce)}if(W.key==="ArrowUp"){let ce=D-1;return ce<0&&(ce=$.length-1),(pe=g.current)==null||pe.scrollIntoView({index:ce}),V(ce)}if(W.key==="Escape")return W.currentTarget.blur(),I(!1);if(W.key==="Enter"){if(D!==null&&$[D])return W.preventDefault(),ue($[D],D);if($.length===1)return W.preventDefault(),ue($[0],0)}},className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary"}),$.length===0?w.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:w.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:a||S.autocompleteEmpty})}):null,w.jsx(Qf,{ref:g,data:se,components:BL,hidden:se.length===0,style:{height:M.size===0?E-49:E-86},className:"border-floating-border bg-floating-background p-0 text-foreground",itemContent:(W,J)=>{const pe=J.Render??jL,ce=M.has(J.value)||M.has(J.label??""),Fe=D===W,te=J.label??J.value;return w.jsx("button",{"data-value":J.value,...Q({ref:ie=>void(H.current[W]=ie),role:"option",type:"button","aria-checked":ce,"aria-current":ce,"aria-selected":ce,"aria-busy":J.disabled,onClick:()=>ue(J,W)}),className:`w-full cursor-pointer p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${ce||Fe?"bg-floating-hover text-floating-foreground":""}`,children:w.jsx(eh,{onChange:Sd,checked:ce,"aria-checked":ce,onClick:ie=>(ie.stopPropagation(),void ie.preventDefault()),children:w.jsx(pe,{...m,label:J.label,value:J.value,children:te})})})}}),M.size===0?null:w.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:q})]})}):null})]})}),dw=(e,t,n,r)=>x.forwardRef(({info:s,left:i,next:a,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:h,type:p="text",labelClassName:m,feedback:v=null,hideLeft:b=!1,...y},g)=>{const T=e,S=y.id??y.name,E=x.useRef(null);return x.useEffect(()=>{if(E.current===null)return;const C=E.current,k=bi(E.current),I=r==null?void 0:r(C),A=N=>{const M=N;if(M.key==="Enter"&&C.enterKeyHint==="next"){const L=C.getAttribute("data-next");if(L){const P=document.getElementById(L);if(P)return P.focus(),void M.preventDefault()}}};return C.addEventListener("keydown",A),()=>{I==null||I(),k(),C.removeEventListener("keydown",A)}},[]),w.jsx(Di,{...n,info:s,left:i,error:l,right:c,form:y.form,name:y.name,feedback:v,hideLeft:b,title:y.title,container:u,rightLabel:d,disabled:y.disabled,interactive:f,required:y.required,componentName:t,id:y.name||y.id,optionalText:h,labelClassName:m,placeholder:y.placeholder,children:w.jsx(T,{...n,...y,id:S,name:S,type:p,"data-next":a,"aria-busy":y.disabled,"aria-disabled":y.disabled,"aria-readonly":y.readOnly,ref:bd(g,E),className:Me("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",y.className)})})}),Ni=dw(l0,"input",{type:"text"}),jg=new Date(1970,11,31),Lc={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Lg={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},HL={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")},Fc=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},UL=x.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=t||yf(),l=x.useId(),c=Ct(),u=x.useMemo(()=>new Intl.DateTimeFormat(a),[a]),[d,f]=x.useState(e||void 0),[h,p]=x.useState(!1),m=Fc(u,jg).flatMap(C=>it.keyof(Lc,C.type)?Lc[C.type](C.value):[]),v=Fc(u,jg).reduce((C,k)=>C+(it.keyof(Lg,k.type)?Lg[k.type](k.value):""),""),[b,y]=x.useState(d?Fc(u,d).reduce((C,k)=>C+(it.keyof(Lc,k.type)?HL[k.type](d,k.value):""),""):""),g=C=>{const k=C.target.value;if(y(k),m.length===k.length&&m.every((A,N)=>{const M=k.charAt(N);return typeof A=="string"?M===A:A.test(M)})){const A=zo(iO(k,v,new Date));return f(A),r==null?void 0:r(A)}return f(void 0),r==null?void 0:r(void 0)},T=C=>(f(C),r==null||r(C),y(C?aA(C,v):"")),S=Hb(d),E=S?d.toISOString():void 0;return w.jsx(Ni,{...s,mask:m,value:b,id:void 0,name:void 0,className:"uppercase","data-value":E,formNoValidate:!h,"data-target":s.name,"data-component":"date-picker",onChange:g,required:s.required??!0,error:h?void 0:s.error,placeholder:s.placeholder??v,right:w.jsxs(x.Fragment,{children:[w.jsx("input",{"data-origin":s.name,defaultValue:E,form:s.form,hidden:!0,id:s.name,name:s.name,ref:i,type:"date"}),w.jsx(ps,{open:h,onChange:p,trigger:w.jsxs("span",{"aria-labelledby":l,children:[w.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),w.jsx(Gk,{})]}),buttonProps:{"aria-describedby":l},children:w.jsx(y0,{...s,locale:a,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:S?d:void 0})})]})})}),GL=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],YL=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],qL=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],KL=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Fg=(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 Vg(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?KL:qL:t.binary?YL:GL,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=Fg(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=Fg(Number(e),t.locale,i),c=n[a];return s+l+r+c}var qu={exports:{}},ra={exports:{}},Ve={};/** @license React v16.13.1
|
|
172
|
+
*/var xM=["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])"],bs=xM.join(","),$0=typeof Element>"u",$o=$0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ws=!$0&&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},Ts=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},bM=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},wM=function(t,n,r){if(Ts(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(bs));return n&&$o.call(t,bs)&&o.unshift(t),o=o.filter(r),o},TM=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ts(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=$o.call(a,bs);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Ts(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},B0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},H0=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||bM(t))&&!B0(t)?0:t.tabIndex},SM=function(t,n){var r=H0(t);return r<0&&n&&!B0(t)?0:r},EM=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},W0=function(t){return t.tagName==="INPUT"},CM=function(t){return W0(t)&&t.type==="hidden"},kM=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},RM=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},PM=function(t){if(!t.name)return!0;var n=t.form||ws(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},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(a){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",a.message),!1}var i=RM(o,t.form);return!i||i===t},AM=function(t){return W0(t)&&t.type==="radio"},IM=function(t){return AM(t)&&!PM(t)},OM=function(t){var n,r=t&&ws(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=ws(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},Sg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},_M=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=$o.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if($o.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=ws(t);if(l&&!l.shadowRoot&&o(l)===!0)return Sg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(OM(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Sg(t);return!1},MM=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 $o.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},DM=function(t,n){return!(n.disabled||Ts(n)||CM(n)||_M(n,t)||kM(n)||MM(n))},ad=function(t,n){return!(IM(n)||H0(n)<0||!DM(t,n))},jM=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},NM=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=SM(s,a),c=a?e(o.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:c})}),r.sort(EM).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Xi=function(t,n){n=n||{};var r;return n.getShadowRoot?r=TM([t],n.includeContainer,{filter:ad.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:jM}):r=wM(t,n.includeContainer,ad.bind(null,n)),NM(r)},FM=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return $o.call(t,bs)===!1?!1:ad(n,t)};function Eg(e,t,n){let{reference:r,floating:o}=e;const i=qr(t),a=zf(t),s=Vf(a),l=hr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(ai(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const LM=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Eg(c,r,l),p=r,f={},h=0;for(let y=0;y<s.length;y++){const{name:m,fn:v}=s[y],{x:g,y:b,data:S,reset:T}=await v({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=g??u,d=b??d,f={...f,[m]:{...f[m],...S}},T&&h<=50&&(h++,typeof T=="object"&&(T.placement&&(p=T.placement),T.rects&&(c=T.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:d}=Eg(c,p,l)),y=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function $f(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=ii(t,e),h=z0(f),m=s[p?d==="floating"?"reference":"floating":d],v=xs(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),g=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},T=xs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:b,strategy:l}):g);return{top:(v.top-T.top+h.top)/S.y,bottom:(T.bottom-v.bottom+h.bottom)/S.y,left:(v.left-T.left+h.left)/S.x,right:(T.right-v.right+h.right)/S.x}}const VM=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=ii(e,t)||{};if(c==null)return{};const d=z0(u),p={x:n,y:r},f=zf(o),h=Vf(f),y=await a.getDimensions(c),m=f==="y",v=m?"top":"left",g=m?"bottom":"right",b=m?"clientHeight":"clientWidth",S=i.reference[h]+i.reference[f]-p[f]-i.floating[h],T=p[f]-i.reference[f],w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=w?w[b]:0;(!C||!await(a.isElement==null?void 0:a.isElement(w)))&&(C=s.floating[b]||i.floating[h]);const R=S/2-T/2,I=C/2-y[h]/2-1,P=An(d[v],I),j=An(d[g],I),N=P,V=C-y[h]-j,k=C/2-y[h]/2+R,M=od(N,k,V),D=!l.arrow&&ai(o)!=null&&k!==M&&i.reference[h]/2-(k<N?P:j)-y[h]/2<0,L=D?k<N?k-N:k-V:0;return{[f]:p[f]+L,data:{[f]:M,centerOffset:k-M-L,...D&&{alignmentOffset:L}},reset:D}}}),zM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:y=!0,...m}=ii(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=hr(o),g=qr(s),b=hr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=p||(b||!y?[ys(s)]:mM(s)),w=h!=="none";!p&&w&&T.push(...vM(s,y,h,S));const C=[s,...T],R=await $f(t,m),I=[];let P=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(R[v]),d){const k=hM(o,a,S);I.push(R[k[0]],R[k[1]])}if(P=[...P,{placement:o,overflows:I}],!I.every(k=>k<=0)){var j,N;const k=(((j=i.flip)==null?void 0:j.index)||0)+1,M=C[k];if(M)return{data:{index:k,overflows:P},reset:{placement:M}};let D=(N=P.filter(L=>L.overflows[0]<=0).sort((L,_)=>L.overflows[1]-_.overflows[1])[0])==null?void 0:N.placement;if(!D)switch(f){case"bestFit":{var V;const L=(V=P.filter(_=>{if(w){const z=qr(_.placement);return z===g||z==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(z=>z>0).reduce((z,O)=>z+O,0)]).sort((_,z)=>_[1]-z[1])[0])==null?void 0:V[0];L&&(D=L);break}case"initialPlacement":D=s;break}if(o!==D)return{reset:{placement:D}}}return{}}}};async function $M(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=hr(n),s=ai(n),l=qr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=ii(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof h=="number"&&(f=s==="end"?h*-1:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const BM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await $M(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},HM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:m=>{let{x:v,y:g}=m;return{x:v,y:g}}},...l}=ii(e,t),c={x:n,y:r},u=await $f(t,l),d=qr(hr(o)),p=V0(d);let f=c[p],h=c[d];if(i){const m=p==="y"?"top":"left",v=p==="y"?"bottom":"right",g=f+u[m],b=f-u[v];f=od(g,f,b)}if(a){const m=d==="y"?"top":"left",v=d==="y"?"bottom":"right",g=h+u[m],b=h-u[v];h=od(g,h,b)}const y=s.fn({...t,[p]:f,[d]:h});return{...y,data:{x:y.x-n,y:y.y-r}}}}},WM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=ii(e,t),l=await $f(t,s),c=hr(n),u=ai(n),d=qr(n)==="y",{width:p,height:f}=r.floating;let h,y;c==="top"||c==="bottom"?(h=c,y=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(y=c,h=u==="end"?"top":"bottom");const m=f-l.top-l.bottom,v=p-l.left-l.right,g=An(f-l[h],m),b=An(p-l[y],v),S=!t.middlewareData.shift;let T=g,w=b;if(d?w=u||S?An(b,v):v:T=u||S?An(g,m):m,S&&!u){const R=Xt(l.left,0),I=Xt(l.right,0),P=Xt(l.top,0),j=Xt(l.bottom,0);d?w=p-2*(R!==0||I!==0?R+I:Xt(l.left,l.right)):T=f-2*(P!==0||j!==0?P+j:Xt(l.top,l.bottom))}await a({...t,availableWidth:w,availableHeight:T});const C=await o.getDimensions(i.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function q0(e){const t=nn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=bt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=vs(n)!==i||vs(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Bf(e){return Qe(e)?e:e.contextElement}function Eo(e){const t=Bf(e);if(!bt(t))return pr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=q0(t);let a=(i?vs(n.width):n.width)/r,s=(i?vs(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const qM=pr(0);function U0(e){const t=Bt(e);return!Df()||!t.visualViewport?qM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function UM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function Ur(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Bf(e);let a=pr(1);t&&(r?Qe(r)&&(a=Eo(r)):a=Eo(e));const s=UM(i,n,r)?U0(i):pr(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=Bt(i),f=r&&Qe(r)?Bt(r):r;let h=p,y=nd(h);for(;y&&r&&f!==h;){const m=Eo(y),v=y.getBoundingClientRect(),g=nn(y),b=v.left+(y.clientLeft+parseFloat(g.paddingLeft))*m.x,S=v.top+(y.clientTop+parseFloat(g.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=b,c+=S,h=Bt(y),y=nd(h)}}return xs({width:u,height:d,x:l,y:c})}function GM(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Zn(r),s=t?hl(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=pr(1);const u=pr(0),d=bt(r);if((d||!d&&!i)&&((xr(r)!=="body"||ga(a))&&(l=ml(r)),bt(r))){const p=Ur(r);c=Eo(r),u.x=p.x+r.clientLeft,u.y=p.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 YM(e){return Array.from(e.getClientRects())}function G0(e){return Ur(Zn(e)).left+ml(e).scrollLeft}function KM(e){const t=Zn(e),n=ml(e),r=e.ownerDocument.body,o=Xt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Xt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+G0(e);const s=-n.scrollTop;return nn(r).direction==="rtl"&&(a+=Xt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function ZM(e,t){const n=Bt(e),r=Zn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=Df();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function XM(e,t){const n=Ur(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=bt(e)?Eo(e):pr(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function Cg(e,t,n){let r;if(t==="viewport")r=ZM(e,n);else if(t==="document")r=KM(Zn(e));else if(Qe(t))r=XM(t,n);else{const o=U0(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return xs(r)}function Y0(e,t){const n=Gn(e);return n===t||!Qe(n)||fr(n)?!1:nn(n).position==="fixed"||Y0(n,t)}function QM(e,t){const n=t.get(e);if(n)return n;let r=cr(e,[],!1).filter(s=>Qe(s)&&xr(s)!=="body"),o=null;const i=nn(e).position==="fixed";let a=i?Gn(e):e;for(;Qe(a)&&!fr(a);){const s=nn(a),l=Mf(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ga(a)&&!l&&Y0(e,a))?r=r.filter(u=>u!==a):o=s,a=Gn(a)}return t.set(e,r),r}function JM(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?hl(t)?[]:QM(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=Cg(t,u,o);return c.top=Xt(d.top,c.top),c.right=An(d.right,c.right),c.bottom=An(d.bottom,c.bottom),c.left=Xt(d.left,c.left),c},Cg(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function eD(e){const{width:t,height:n}=q0(e);return{width:t,height:n}}function tD(e,t,n){const r=bt(t),o=Zn(t),i=n==="fixed",a=Ur(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=pr(0);if(r||!r&&!i)if((xr(t)!=="body"||ga(o))&&(s=ml(t)),r){const d=Ur(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=G0(o));const c=a.left+s.scrollLeft-l.x,u=a.top+s.scrollTop-l.y;return{x:c,y:u,width:a.width,height:a.height}}function $c(e){return nn(e).position==="static"}function kg(e,t){return!bt(e)||nn(e).position==="fixed"?null:t?t(e):e.offsetParent}function K0(e,t){const n=Bt(e);if(hl(e))return n;if(!bt(e)){let o=Gn(e);for(;o&&!fr(o);){if(Qe(o)&&!$c(o))return o;o=Gn(o)}return n}let r=kg(e,t);for(;r&&aM(r)&&$c(r);)r=kg(r,t);return r&&fr(r)&&$c(r)&&!Mf(r)?n:r||sM(e)||n}const nD=async function(e){const t=this.getOffsetParent||K0,n=this.getDimensions,r=await n(e.floating);return{reference:tD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function rD(e){return nn(e).direction==="rtl"}const oD={convertOffsetParentRelativeRectToViewportRelativeRect:GM,getDocumentElement:Zn,getClippingRect:JM,getOffsetParent:K0,getElementRects:nD,getClientRects:YM,getDimensions:eD,getScale:Eo,isElement:Qe,isRTL:rD};function iD(e,t){let n=null,r;const o=Zn(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f=So(u),h=So(o.clientWidth-(c+d)),y=So(o.clientHeight-(u+p)),m=So(c),g={rootMargin:-f+"px "+-h+"px "+-y+"px "+-m+"px",threshold:Xt(0,An(1,l))||1};let b=!0;function S(T){const w=T[0].intersectionRatio;if(w!==l){if(!b)return a();w?a(!1,w):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(S,{...g,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,g)}n.observe(e)}return a(!0),i}function va(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Bf(e),u=o||i?[...c?cr(c):[],...cr(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?iD(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(v=>{let[g]=v;g&&g.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let h,y=l?Ur(e):null;l&&m();function m(){const v=Ur(e);y&&(v.x!==y.x||v.y!==y.y||v.width!==y.width||v.height!==y.height)&&n(),y=v,h=requestAnimationFrame(m)}return n(),()=>{var v;u.forEach(g=>{o&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),d==null||d(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const aD=BM,sD=HM,lD=zM,cD=WM,Rg=VM,uD=(e,t,n)=>{const r=new Map,o={platform:oD,...n},i={...o.platform,_c:r};return LM(e,t,{...o,platform:i})};var es=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ss(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(!Ss(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ss(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Z0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Pg(e,t){const n=Z0(e);return Math.round(t*n)/n}function Bc(e){const t=A.useRef(e);return es(()=>{t.current=e}),t}function dD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=A.useState(r);Ss(p,r)||f(r);const[h,y]=A.useState(null),[m,v]=A.useState(null),g=A.useCallback(_=>{_!==w.current&&(w.current=_,y(_))},[]),b=A.useCallback(_=>{_!==C.current&&(C.current=_,v(_))},[]),S=i||h,T=a||m,w=A.useRef(null),C=A.useRef(null),R=A.useRef(u),I=l!=null,P=Bc(l),j=Bc(o),N=Bc(c),V=A.useCallback(()=>{if(!w.current||!C.current)return;const _={placement:t,strategy:n,middleware:p};j.current&&(_.platform=j.current),uD(w.current,C.current,_).then(z=>{const O={...z,isPositioned:N.current!==!1};k.current&&!Ss(R.current,O)&&(R.current=O,Gs.flushSync(()=>{d(O)}))})},[p,t,n,j,N]);es(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(_=>({..._,isPositioned:!1})))},[c]);const k=A.useRef(!1);es(()=>(k.current=!0,()=>{k.current=!1}),[]),es(()=>{if(S&&(w.current=S),T&&(C.current=T),S&&T){if(P.current)return P.current(S,T,V);V()}},[S,T,V,P,I]);const M=A.useMemo(()=>({reference:w,floating:C,setReference:g,setFloating:b}),[g,b]),D=A.useMemo(()=>({reference:S,floating:T}),[S,T]),L=A.useMemo(()=>{const _={position:n,left:0,top:0};if(!D.floating)return _;const z=Pg(D.floating,u.x),O=Pg(D.floating,u.y);return s?{..._,transform:"translate("+z+"px, "+O+"px)",...Z0(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:O}},[n,s,D.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:V,refs:M,elements:D,floatingStyles:L}),[u,V,M,D,L])}const fD=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?Rg({element:r.current,padding:o}).fn(n):{}:r?Rg({element:r,padding:o}).fn(n):{}}}},ya=(e,t)=>({...aD(e),options:[e,t]}),Hf=(e,t)=>({...sD(e),options:[e,t]}),Wf=(e,t)=>({...lD(e),options:[e,t]}),X0=(e,t)=>({...cD(e),options:[e,t]}),Q0=(e,t)=>({...fD(e),options:[e,t]});function sd(e){return A.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const J0={...A},pD=J0.useInsertionEffect,hD=pD||(e=>e());function kt(e){const t=A.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return hD(()=>{t.current=e}),A.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const qf="ArrowUp",xa="ArrowDown",Bo="ArrowLeft",si="ArrowRight";function Va(e,t,n){return Math.floor(e/t)!==n}function Di(e,t){return t<0||t>=e.current.length}function Hc(e,t){return Ft(e,{disabledIndices:t})}function Ag(e,t){return Ft(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ft(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=r?-i:i;while(s>=0&&s<=a.length-1&&ts(a,s,o));return s}function mD(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===qf){if(u&&Dt(n),c===-1)d=l;else if(d=Ft(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||d<0)){const p=c%i,f=l%i,h=l-(f-p);f===p?d=l:d=f>p?h:h-i}Di(e,d)&&(d=c)}if(n.key===xa&&(u&&Dt(n),c===-1?d=s:(d=Ft(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=Ft(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),Di(e,d)&&(d=c)),r==="both"){const p=So(c/i);n.key===si&&(u&&Dt(n),c%i!==i-1?(d=Ft(e,{startingIndex:c,disabledIndices:a}),o&&Va(d,i,p)&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a})),Va(d,i,p)&&(d=c)),n.key===Bo&&(u&&Dt(n),c%i!==0?(d=Ft(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Va(d,i,p)&&(d=Ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Va(d,i,p)&&(d=c));const f=So(l/i)===p;Di(e,d)&&(o&&f?d=n.key===Bo?l:Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function gD(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:l}=i;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<s;d++)for(let p=0;p<l;p++)u.push(o+d+p*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function vD(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function yD(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ts(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 Ig=0;function ir(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Ig);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Ig=requestAnimationFrame(i)}var $e=typeof document<"u"?E.useLayoutEffect:E.useEffect;function xD(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 bD(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 ew=A.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function wD(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=A.useState(()=>new Map),a=A.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=A.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return $e(()=>{const l=new Map(o);Array.from(l.keys()).sort(xD).forEach((u,d)=>{l.set(u,d)}),bD(o,l)||i(l)},[o]),A.createElement(ew.Provider,{value:A.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function tw(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=A.useContext(ew),[s,l]=A.useState(null),c=A.useRef(null),u=A.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d==null?void 0:d.textContent)!=null?p:null}},[s,i,a,t]);return $e(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),$e(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),A.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function Ho(){return Ho=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},Ho.apply(this,arguments)}let Og=!1,TD=0;const _g=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+TD++;function SD(){const[e,t]=A.useState(()=>Og?_g():void 0);return $e(()=>{e==null&&t(_g())},[]),A.useEffect(()=>{Og=!0},[]),e}const ED=J0.useId,li=ED||SD;let Qi;process.env.NODE_ENV!=="production"&&(Qi=new Set);function ns(){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=Qi)!=null&&e.has(o))){var i;(i=Qi)==null||i.add(o),console.warn(o)}}function CD(){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=Qi)!=null&&e.has(o))){var i;(i=Qi)==null||i.add(o),console.error(o)}}const nw=A.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...h}={},...y}=t;process.env.NODE_ENV!=="production"&&(n||ns("The `ref` prop is required for `FloatingArrow`."));const m=li(),[v,g]=A.useState(!1);if($e(()=>{if(!o)return;nn(o).direction==="rtl"&&g(!0)},[o]),!o)return null;const b=c*2,S=b/2,T=a/2*(l/-8+1),w=s/2*l/4,[C,R]=r.split("-"),I=!!p,P=C==="top"||C==="bottom",j=u&&R==="end"?"bottom":"top";let N=u&&R==="end"?"right":"left";u&&v&&(N=R==="end"?"left":"right");const V=(i==null?void 0:i.x)!=null?u||i.x:"",k=(i==null?void 0:i.y)!=null?u||i.y:"",M=p||"M0,0"+(" H"+a)+(" L"+(a-T)+","+(s-w))+(" Q"+a/2+","+s+" "+T+","+(s-w))+" Z",D={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return A.createElement("svg",Ho({},y,{"aria-hidden":!0,ref:n,width:I?a:a+b,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[N]:V,[j]:k,[C]:P||I?"100%":"calc(100% - "+b/2+"px)",transform:""+D+(f??""),...h}}),b>0&&A.createElement("path",{clipPath:"url(#"+m+")",fill:"none",stroke:d,strokeWidth:b+(p?0:1),d:M}),A.createElement("path",{stroke:b&&!p?y.fill:"none",d:M}),A.createElement("clipPath",{id:m},A.createElement("rect",{x:-S,y:S*(I?-1:1),width:a+b,height:a})))});function rw(){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 ow=A.createContext(null),iw=A.createContext(null),br=()=>{var e;return((e=A.useContext(ow))==null?void 0:e.id)||null},wr=()=>A.useContext(iw);function kD(e){const t=li(),n=wr(),o=br();return $e(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function RD(e){const{children:t,id:n}=e,r=br();return A.createElement(ow.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function PD(e){const{children:t}=e,n=A.useRef([]),r=A.useCallback(a=>{n.current=[...n.current,a]},[]),o=A.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=A.useState(()=>rw())[0];return A.createElement(iw.Provider,{value:A.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function mr(e){return"data-floating-ui-"+e}function jt(e){const t=E.useRef(e);return $e(()=>{t.current=e}),t}const Mg=mr("safe-polygon");function Wc(e,t,n){return n&&!zo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function aw(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:p=!0}=t,f=wr(),h=br(),y=jt(c),m=jt(l),v=jt(n),g=A.useRef(),b=A.useRef(-1),S=A.useRef(),T=A.useRef(-1),w=A.useRef(!0),C=A.useRef(!1),R=A.useRef(()=>{}),I=A.useCallback(()=>{var M;const D=(M=o.current.openEvent)==null?void 0:M.type;return(D==null?void 0:D.includes("mouse"))&&D!=="mousedown"},[o]);A.useEffect(()=>{if(!s)return;function M(D){let{open:L}=D;L||(clearTimeout(b.current),clearTimeout(T.current),w.current=!0)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[s,i]),A.useEffect(()=>{if(!s||!y.current||!n)return;function M(L){I()&&r(!1,L,"hover")}const D=It(a.floating).documentElement;return D.addEventListener("mouseleave",M),()=>{D.removeEventListener("mouseleave",M)}},[a.floating,n,r,s,y,I]);const P=A.useCallback(function(M,D,L){D===void 0&&(D=!0),L===void 0&&(L="hover");const _=Wc(m.current,"close",g.current);_&&!S.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>r(!1,M,L),_)):D&&(clearTimeout(b.current),r(!1,M,L))},[m,r]),j=kt(()=>{R.current(),S.current=void 0}),N=kt(()=>{if(C.current){const M=It(a.floating).body;M.style.pointerEvents="",M.removeAttribute(Mg),C.current=!1}});A.useEffect(()=>{if(!s)return;function M(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function D(O){if(clearTimeout(b.current),w.current=!1,u&&!zo(g.current)||d>0&&!Wc(m.current,"open"))return;const B=Wc(m.current,"open",g.current);B?b.current=window.setTimeout(()=>{v.current||r(!0,O,"hover")},B):r(!0,O,"hover")}function L(O){if(M())return;R.current();const B=It(a.floating);if(clearTimeout(T.current),y.current&&o.current.floatingContext){n||clearTimeout(b.current),S.current=y.current({...o.current.floatingContext,tree:f,x:O.clientX,y:O.clientY,onClose(){N(),j(),P(O,!0,"safe-polygon")}});const re=S.current;B.addEventListener("mousemove",re),R.current=()=>{B.removeEventListener("mousemove",re)};return}(g.current==="touch"?!mt(a.floating,O.relatedTarget):!0)&&P(O)}function _(O){M()||o.current.floatingContext&&(y.current==null||y.current({...o.current.floatingContext,tree:f,x:O.clientX,y:O.clientY,onClose(){N(),j(),P(O)}})(O))}if(Qe(a.domReference)){var z;const O=a.domReference;return n&&O.addEventListener("mouseleave",_),(z=a.floating)==null||z.addEventListener("mouseleave",_),p&&O.addEventListener("mousemove",D,{once:!0}),O.addEventListener("mouseenter",D),O.addEventListener("mouseleave",L),()=>{var B;n&&O.removeEventListener("mouseleave",_),(B=a.floating)==null||B.removeEventListener("mouseleave",_),p&&O.removeEventListener("mousemove",D),O.removeEventListener("mouseenter",D),O.removeEventListener("mouseleave",L)}}},[a,s,e,u,d,p,P,j,N,r,n,v,f,m,y,o]),$e(()=>{var M;if(s&&n&&(M=y.current)!=null&&M.__options.blockPointerEvents&&I()){const L=It(a.floating).body;L.setAttribute(Mg,""),L.style.pointerEvents="none",C.current=!0;const _=a.floating;if(Qe(a.domReference)&&_){var D;const z=a.domReference,O=f==null||(D=f.nodesRef.current.find(B=>B.id===h))==null||(D=D.context)==null?void 0:D.elements.floating;return O&&(O.style.pointerEvents=""),z.style.pointerEvents="auto",_.style.pointerEvents="auto",()=>{z.style.pointerEvents="",_.style.pointerEvents=""}}}},[s,n,h,a,f,y,I]),$e(()=>{n||(g.current=void 0,j(),N())},[n,j,N]),A.useEffect(()=>()=>{j(),clearTimeout(b.current),clearTimeout(T.current),N()},[s,a.domReference,j,N]);const V=A.useMemo(()=>{function M(D){g.current=D.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(D){const{nativeEvent:L}=D;function _(){!w.current&&!v.current&&r(!0,L,"hover")}u&&!zo(g.current)||n||d===0||(clearTimeout(T.current),g.current==="touch"?_():T.current=window.setTimeout(_,d))}}},[u,r,n,v,d]),k=A.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(M){P(M.nativeEvent,!1)}}),[P]);return A.useMemo(()=>s?{reference:V,floating:k}:{},[s,V,k])}function AD(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Br(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function ID(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Br(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let fo=new WeakMap,za=new WeakSet,$a={},qc=0;const OD=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,sw=e=>e&&(e.host||sw(e.parentNode)),_D=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=sw(n);return e.contains(r)?r:null}).filter(n=>n!=null);function MD(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=_D(t,e),s=new Set,l=new Set(a),c=[];$a[o]||($a[o]=new WeakMap);const u=$a[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,h=>{if(xr(h)!=="script")if(s.has(h))p(h);else{const y=i?h.getAttribute(i):null,m=y!==null&&y!=="false",v=(fo.get(h)||0)+1,g=(u.get(h)||0)+1;fo.set(h,v),u.set(h,g),c.push(h),v===1&&m&&za.add(h),g===1&&h.setAttribute(o,""),!m&&i&&h.setAttribute(i,"true")}})}return qc++,()=>{c.forEach(f=>{const h=(fo.get(f)||0)-1,y=(u.get(f)||0)-1;fo.set(f,h),u.set(f,y),h||(!za.has(f)&&i&&f.removeAttribute(i),za.delete(f)),y||f.removeAttribute(o)}),qc--,qc||(fo=new WeakMap,fo=new WeakMap,za=new WeakSet,$a={})}}function Dg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=It(e[0]).body;return MD(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Wo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function lw(e,t){const n=Xi(e,Wo());t==="prev"&&n.reverse();const r=n.indexOf(gn(It(e)));return n.slice(r+1)[0]}function cw(){return lw(document.body,"next")}function uw(){return lw(document.body,"prev")}function ji(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!mt(n,r)}function DD(e){Xi(e,Wo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function jD(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function ND(e,t,n){const r=e.indexOf(t);function o(a){const s=mr("focus-guard");let l=r+(a?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(s)||mt(n,c));)a?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const Uf={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 FD;function jg(e){e.key==="Tab"&&(e.target,clearTimeout(FD))}const Es=A.forwardRef(function(t,n){const[r,o]=A.useState();$e(()=>(Ff()&&o("button"),document.addEventListener("keydown",jg),()=>{document.removeEventListener("keydown",jg)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[mr("focus-guard")]:"",style:Uf};return A.createElement("span",Ho({},t,i))}),dw=A.createContext(null),Ng=mr("portal");function LD(e){e===void 0&&(e={});const{id:t,root:n}=e,r=li(),o=fw(),[i,a]=A.useState(null),s=A.useRef(null);return $e(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),$e(()=>{if(!r||s.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Ng,""),l.appendChild(c),s.current=c,a(c)},[t,r]),$e(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Qe(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(Ng,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function Jr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=LD({id:n,root:r}),[a,s]=A.useState(null),l=A.useRef(null),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return A.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(h){i&&ji(h)&&(h.type==="focusin"?jD:DD)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),A.createElement(dw.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&A.createElement(Es,{"data-type":"outside",ref:l,onFocus:f=>{if(ji(f,i)){var h;(h=u.current)==null||h.focus()}else{const y=uw()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus()}}}),p&&i&&A.createElement("span",{"aria-owns":i.id,style:Uf}),i&&Gs.createPortal(t,i),p&&i&&A.createElement(Es,{"data-type":"outside",ref:c,onFocus:f=>{if(ji(f,i)){var h;(h=d.current)==null||h.focus()}else{const y=cw()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const fw=()=>A.useContext(dw),VD=20;let Mr=[];function Uc(e){Mr=Mr.filter(n=>n.isConnected);let t=e;if(!(!t||xr(t)==="body")){if(!FM(t,Wo())){const n=Xi(t,Wo())[0];n&&(t=n)}Mr.push(t),Mr.length>VD&&(Mr=Mr.slice(-20))}}function Fg(){return Mr.slice().reverse().find(e=>e.isConnected)}const zD=A.forwardRef(function(t,n){return A.createElement("button",Ho({},t,{type:"button",ref:n,tabIndex:-1,style:Uf}))});function ci(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:f,nodeId:h,onOpenChange:y,events:m,dataRef:v,floatingId:g,elements:{domReference:b,floating:S}}=t,T=typeof a=="number"&&a<0,w=L0(b)&&T,C=OD()?i:!0,R=jt(o),I=jt(a),P=jt(s),j=wr(),N=fw(),V=A.useRef(null),k=A.useRef(null),M=A.useRef(!1),D=A.useRef(!1),L=A.useRef(-1),_=N!=null,z=S==null?void 0:S.firstElementChild,O=(z==null?void 0:z.id)===g?z:S,B=kt(function(K){return K===void 0&&(K=O),K?Xi(K,Wo()):[]}),Q=kt(K=>{const U=B(K);return R.current.map(Y=>b&&Y==="reference"?b:O&&Y==="floating"?O:U).filter(Boolean).flat()});A.useEffect(()=>{if(r||!c)return;function K(Y){if(Y.key==="Tab"){mt(O,gn(It(O)))&&B().length===0&&!w&&Dt(Y);const F=Q(),W=Pn(Y);R.current[0]==="reference"&&W===b&&(Dt(Y),Y.shiftKey?ir(F[F.length-1]):ir(F[1])),R.current[1]==="floating"&&W===O&&Y.shiftKey&&(Dt(Y),ir(F[0]))}}const U=It(O);return U.addEventListener("keydown",K),()=>{U.removeEventListener("keydown",K)}},[r,b,O,c,R,w,B,Q]),A.useEffect(()=>{if(r||!S)return;function K(U){const Y=Pn(U),W=B().indexOf(Y);W!==-1&&(L.current=W)}return S.addEventListener("focusin",K),()=>{S.removeEventListener("focusin",K)}},[r,S,B]),A.useEffect(()=>{if(r||!d)return;function K(){D.current=!0,setTimeout(()=>{D.current=!1})}function U(Y){const F=Y.relatedTarget;queueMicrotask(()=>{const W=!(mt(b,F)||mt(S,F)||mt(F,S)||mt(N==null?void 0:N.portalNode,F)||F!=null&&F.hasAttribute(mr("focus-guard"))||j&&(Br(j.nodesRef.current,h).find(Z=>{var oe,$;return mt((oe=Z.context)==null?void 0:oe.elements.floating,F)||mt(($=Z.context)==null?void 0:$.elements.domReference,F)})||AD(j.nodesRef.current,h).find(Z=>{var oe,$;return((oe=Z.context)==null?void 0:oe.elements.floating)===F||(($=Z.context)==null?void 0:$.elements.domReference)===F})));if(l&&W&&gn(It(O))===It(O).body){bt(O)&&(O==null||O.focus());const Z=L.current,oe=B(),$=oe[Z]||oe[oe.length-1]||O;bt($)&&$.focus()}(w||!c)&&F&&W&&!D.current&&F!==Fg()&&(M.current=!0,y(!1,Y))})}if(S&&bt(b))return b.addEventListener("focusout",U),b.addEventListener("pointerdown",K),S.addEventListener("focusout",U),()=>{b.removeEventListener("focusout",U),b.removeEventListener("pointerdown",K),S.removeEventListener("focusout",U)}},[r,b,S,O,c,h,j,N,y,d,l,B,w]),A.useEffect(()=>{var K;if(r)return;const U=Array.from((N==null||(K=N.portalNode)==null?void 0:K.querySelectorAll("["+mr("portal")+"]"))||[]);if(S){const Y=[S,...U,V.current,k.current,R.current.includes("reference")||w?b:null].filter(W=>W!=null),F=c||w?Dg(Y,C,!C):Dg(Y);return()=>{F()}}},[r,b,S,c,R,N,w,C]),$e(()=>{if(r||!bt(O))return;const K=It(O),U=gn(K);queueMicrotask(()=>{const Y=Q(O),F=I.current,W=(typeof F=="number"?Y[F]:F.current)||O,Z=mt(O,U);!T&&!Z&&p&&ir(W,{preventScroll:W===O})})},[r,p,O,T,Q,I]),$e(()=>{if(r||!O)return;let K=!1;const U=It(O),Y=gn(U);let W=v.current.openEvent;const Z=f.domReference.current;Uc(Y);function oe($){let{open:ye,reason:ke,event:Ae,nested:Ie}=$;ye&&(W=Ae),ke==="escape-key"&&f.domReference.current&&Uc(f.domReference.current),ke==="hover"&&Ae.type==="mouseleave"&&(M.current=!0),ke==="outside-press"&&(Ie?(M.current=!1,K=!0):M.current=!(N0(Ae)||Nf(Ae)))}return m.on("openchange",oe),()=>{m.off("openchange",oe);const $=gn(U),ye=mt(S,$)||j&&Br(j.nodesRef.current,h).some(G=>{var ae;return mt((ae=G.context)==null?void 0:ae.elements.floating,$)});(ye||W&&["click","mousedown"].includes(W.type))&&f.domReference.current&&Uc(f.domReference.current);const Ae=Z||Y,Ie=Xi(It(Ae).body,Wo());queueMicrotask(()=>{let G=Fg();!G&&bt(Ae)&&S&&(G=ND(Ie,Ae,S)),P.current&&!M.current&&bt(G)&&(!(G!==$&&$!==U.body)||ye)&&G.focus({preventScroll:K})})}},[r,S,O,P,v,f,m,j,h]),$e(()=>{if(!r&&N)return N.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:y,refs:f}),()=>{N.setFocusManagerState(null)}},[r,N,c,p,y,f,d]),$e(()=>{if(r||!O||typeof MutationObserver!="function"||T)return;const K=()=>{const Y=O.getAttribute("tabindex"),F=B(),W=gn(It(S)),Z=F.indexOf(W);Z!==-1&&(L.current=Z),R.current.includes("floating")||W!==f.domReference.current&&F.length===0?Y!=="0"&&O.setAttribute("tabindex","0"):Y!=="-1"&&O.setAttribute("tabindex","-1")};K();const U=new MutationObserver(K);return U.observe(O,{childList:!0,subtree:!0,attributes:!0}),()=>{U.disconnect()}},[r,S,O,f,R,B,T]);function re(K){return r||!u||!c?null:A.createElement(zD,{ref:K==="start"?V:k,onClick:U=>y(!1,U.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&C&&(c?!w:!0)&&(_||c);return A.createElement(A.Fragment,null,J&&A.createElement(Es,{"data-type":"inside",ref:N==null?void 0:N.beforeInsideRef,onFocus:K=>{if(c){const Y=Q();ir(o[0]==="reference"?Y[0]:Y[Y.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(M.current=!1,ji(K,N.portalNode)){const Y=cw()||b;Y==null||Y.focus()}else{var U;(U=N.beforeOutsideRef.current)==null||U.focus()}}}),!w&&re("start"),n,re("end"),J&&A.createElement(Es,{"data-type":"inside",ref:N==null?void 0:N.afterInsideRef,onFocus:K=>{if(c)ir(Q()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(M.current=!0),ji(K,N.portalNode)){const Y=uw()||b;Y==null||Y.focus()}else{var U;(U=N.afterOutsideRef.current)==null||U.focus()}}}))}const Gc=new Set,$D=A.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=li();return $e(()=>{if(!r)return;Gc.add(i);const a=/iP(hone|ad|od)|iOS/.test(jf()),s=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=s.left?parseFloat(s.left):window.scrollX,p=s.top?parseFloat(s.top):window.scrollY;if(s.overflow="hidden",u&&(s[c]=u+"px"),a){var f,h;const y=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,m=((h=window.visualViewport)==null?void 0:h.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(p-Math.floor(m))+"px",left:-(d-Math.floor(y))+"px",right:"0"})}return()=>{Gc.delete(i),Gc.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),A.createElement("div",Ho({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Lg(e){return bt(e.target)&&e.target.tagName==="BUTTON"}function Vg(e){return Lf(e)}function ba(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=A.useRef(),p=A.useRef(!1),f=A.useMemo(()=>({onPointerDown(h){d.current=h.pointerType},onMouseDown(h){const y=d.current;h.button===0&&s!=="click"&&(zo(y,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent,"click"):(h.preventDefault(),r(!0,h.nativeEvent,"click"))))},onClick(h){const y=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}zo(y,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,h.nativeEvent,"click"):r(!0,h.nativeEvent,"click"))},onKeyDown(h){d.current=void 0,!(h.defaultPrevented||!u||Lg(h))&&(h.key===" "&&!Vg(i)&&(h.preventDefault(),p.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!u||Lg(h)||Vg(i)||h.key===" "&&p.current&&(p.current=!1,r(!(n&&l),h.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return A.useMemo(()=>a?{reference:f}:{},[a,f])}function BD(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=a.width,d=a.height,p=a.x,f=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),p-=n||0,f-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,p=s&&t.x!=null?t.x:p,f=l&&t.y!=null?t.y:f):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:p,y:f,top:f,right:p+u,bottom:f+d,left:p}}}}function zg(e){return e!=null&&e.clientX!=null}function HD(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=A.useRef(!1),p=A.useRef(null),[f,h]=A.useState(),[y,m]=A.useState([]),v=kt((w,C)=>{d.current||r.current.openEvent&&!zg(r.current.openEvent)||a.setPositionReference(BD(i,{x:w,y:C,axis:l,dataRef:r,pointerType:f}))}),g=kt(w=>{c!=null||u!=null||(n?p.current||m([]):v(w.clientX,w.clientY))}),b=zo(f)?o:n,S=A.useCallback(()=>{if(!b||!s||c!=null||u!=null)return;const w=Bt(o);function C(R){const I=Pn(R);mt(o,I)?(w.removeEventListener("mousemove",C),p.current=null):v(R.clientX,R.clientY)}if(!r.current.openEvent||zg(r.current.openEvent)){w.addEventListener("mousemove",C);const R=()=>{w.removeEventListener("mousemove",C),p.current=null};return p.current=R,R}a.setPositionReference(i)},[b,s,c,u,o,r,a,i,v]);A.useEffect(()=>S(),[S,y]),A.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),A.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),$e(()=>{s&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[s,c,u,v]);const T=A.useMemo(()=>{function w(C){let{pointerType:R}=C;h(R)}return{onPointerDown:w,onPointerEnter:w,onMouseMove:g,onMouseEnter:g}},[g]);return A.useMemo(()=>s?{reference:T}:{},[s,T])}const WD={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},qD={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},$g=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 eo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:h}=t,y=wr(),m=kt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?m:l,g=A.useRef(!1),b=A.useRef(!1),{escapeKey:S,outsidePress:T}=$g(f),{escapeKey:w,outsidePress:C}=$g(h),R=kt(k=>{var M;if(!n||!a||!s||k.key!=="Escape")return;const D=(M=i.current.floatingContext)==null?void 0:M.nodeId,L=y?Br(y.nodesRef.current,D):[];if(!S&&(k.stopPropagation(),L.length>0)){let _=!0;if(L.forEach(z=>{var O;if((O=z.context)!=null&&O.open&&!z.context.dataRef.current.__escapeKeyBubbles){_=!1;return}}),!_)return}r(!1,cM(k)?k.nativeEvent:k,"escape-key")}),I=kt(k=>{var M;const D=()=>{var L;R(k),(L=Pn(k))==null||L.removeEventListener("keydown",D)};(M=Pn(k))==null||M.addEventListener("keydown",D)}),P=kt(k=>{var M;const D=g.current;g.current=!1;const L=b.current;if(b.current=!1,c==="click"&&L||D||typeof v=="function"&&!v(k))return;const _=Pn(k),z="["+mr("inert")+"]",O=It(o.floating).querySelectorAll(z);let B=Qe(_)?_:null;for(;B&&!fr(B);){const K=Gn(B);if(fr(K)||!Qe(K))break;B=K}if(O.length&&Qe(_)&&!uM(_)&&!mt(_,o.floating)&&Array.from(O).every(K=>!mt(B,K)))return;if(bt(_)&&V){const K=_.clientWidth>0&&_.scrollWidth>_.clientWidth,U=_.clientHeight>0&&_.scrollHeight>_.clientHeight;let Y=U&&k.offsetX>_.clientWidth;if(U&&nn(_).direction==="rtl"&&(Y=k.offsetX<=_.offsetWidth-_.clientWidth),Y||K&&k.offsetY>_.clientHeight)return}const Q=(M=i.current.floatingContext)==null?void 0:M.nodeId,re=y&&Br(y.nodesRef.current,Q).some(K=>{var U;return zc(k,(U=K.context)==null?void 0:U.elements.floating)});if(zc(k,o.floating)||zc(k,o.domReference)||re)return;const J=y?Br(y.nodesRef.current,Q):[];if(J.length>0){let K=!0;if(J.forEach(U=>{var Y;if((Y=U.context)!=null&&Y.open&&!U.context.dataRef.current.__outsidePressBubbles){K=!1;return}}),!K)return}r(!1,k,"outside-press")}),j=kt(k=>{var M;const D=()=>{var L;P(k),(L=Pn(k))==null||L.removeEventListener(c,D)};(M=Pn(k))==null||M.addEventListener(c,D)});A.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=T;function k(L){r(!1,L,"ancestor-scroll")}const M=It(o.floating);s&&M.addEventListener("keydown",w?I:R,w),v&&M.addEventListener(c,C?j:P,C);let D=[];return p&&(Qe(o.domReference)&&(D=cr(o.domReference)),Qe(o.floating)&&(D=D.concat(cr(o.floating))),!Qe(o.reference)&&o.reference&&o.reference.contextElement&&(D=D.concat(cr(o.reference.contextElement)))),D=D.filter(L=>{var _;return L!==((_=M.defaultView)==null?void 0:_.visualViewport)}),D.forEach(L=>{L.addEventListener("scroll",k,{passive:!0})}),()=>{s&&M.removeEventListener("keydown",w?I:R,w),v&&M.removeEventListener(c,C?j:P,C),D.forEach(L=>{L.removeEventListener("scroll",k)})}},[i,o,s,v,c,n,r,p,a,S,T,R,w,I,P,C,j]),A.useEffect(()=>{g.current=!1},[v,c]);const N=A.useMemo(()=>({onKeyDown:R,[WD[d]]:k=>{u&&r(!1,k.nativeEvent,"reference-press")}}),[R,r,u,d]),V=A.useMemo(()=>({onKeyDown:R,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[qD[c]]:()=>{g.current=!0}}),[R,c]);return A.useMemo(()=>a?{reference:N,floating:V}:{},[a,N,V])}function UD(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=li(),i=A.useRef({}),[a]=A.useState(()=>rw()),s=br()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!Qe(f)&&CD("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=A.useState(r.reference),u=kt((f,h,y)=>{i.current.openEvent=f?h:void 0,a.emit("openchange",{open:f,event:h,reason:y,nested:s}),n==null||n(f,h,y)}),d=A.useMemo(()=>({setPositionReference:c}),[]),p=A.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return A.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function to(e){e===void 0&&(e={});const{nodeId:t}=e,n=UD({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=A.useState(null),[s,l]=A.useState(null),u=(o==null?void 0:o.reference)||i,d=A.useRef(null),p=wr();$e(()=>{u&&(d.current=u)},[u]);const f=dD({...e,elements:{...o,...s&&{reference:s}}}),h=A.useCallback(b=>{const S=Qe(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;l(S),f.refs.setReference(S)},[f.refs]),y=A.useCallback(b=>{(Qe(b)||b===null)&&(d.current=b,a(b)),(Qe(f.refs.reference.current)||f.refs.reference.current===null||b!==null&&!Qe(b))&&f.refs.setReference(b)},[f.refs]),m=A.useMemo(()=>({...f.refs,setReference:y,setPositionReference:h,domReference:d}),[f.refs,y,h]),v=A.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),g=A.useMemo(()=>({...f,...r,refs:m,elements:v,nodeId:t}),[f,m,v,t,r]);return $e(()=>{r.dataRef.current.floatingContext=g;const b=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);b&&(b.context=g)}),A.useMemo(()=>({...f,context:g,refs:m,elements:v}),[f,m,v,g])}function GD(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=A.useRef(!1),u=A.useRef(),d=A.useRef(!0);A.useEffect(()=>{if(!s)return;const f=Bt(a.domReference);function h(){!n&&bt(a.domReference)&&a.domReference===gn(It(a.domReference))&&(c.current=!0)}function y(){d.current=!0}return f.addEventListener("blur",h),f.addEventListener("keydown",y,!0),()=>{f.removeEventListener("blur",h),f.removeEventListener("keydown",y,!0)}},[a.domReference,n,s]),A.useEffect(()=>{if(!s)return;function f(h){let{reason:y}=h;(y==="reference-press"||y==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),A.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=A.useMemo(()=>({onPointerDown(f){Nf(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const h=Pn(f.nativeEvent);if(l&&Qe(h))try{if(Ff()&&F0())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!d.current&&!Lf(h))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const h=f.relatedTarget,y=f.nativeEvent,m=Qe(h)&&h.hasAttribute(mr("focus-guard"))&&h.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const g=gn(a.domReference?a.domReference.ownerDocument:document);!h&&g===a.domReference||mt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,g)||mt(a.domReference,g)||m||r(!1,y,"focus")})}}),[i,a.domReference,r,l]);return A.useMemo(()=>s?{reference:p}:{},[s,p])}const Bg="active",Hg="selected";function Yc(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Bg]:a,[Hg]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1},...i,...t.map(a=>{const s=a?a[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[c,u]=l;if(!(o&&[Bg,Hg].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),a[c]=function(){for(var p,f=arguments.length,h=new Array(f),y=0;y<f;y++)h[y]=arguments[y];return(p=r.get(c))==null?void 0:p.map(m=>m(...h)).find(m=>m!==void 0)}}}else a[c]=u}),a),{})}}function no(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),o=A.useCallback(s=>Yc(s,e,"reference"),t),i=A.useCallback(s=>Yc(s,e,"floating"),n),a=A.useCallback(s=>Yc(s,e,"item"),r);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let Wg=!1;function gl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function qg(e,t){return gl(t,e===qf||e===xa,e===Bo||e===si)}function Kc(e,t,n){return gl(t,e===xa,n?e===Bo:e===si)||e==="Enter"||e===" "||e===""}function YD(e,t,n){return gl(t,n?e===Bo:e===si,e===xa)}function Ug(e,t,n){return gl(t,n?e===si:e===Bo,e===qf)}function Gf(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:h=!1,focusItemOnOpen:y="auto",focusItemOnHover:m=!0,openOnArrowKeyDown:v=!0,disabledIndices:g=void 0,orientation:b="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:w,itemSizes:C,dense:R=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||ns("`useListNavigation` looping must be enabled to allow escaping."),h||ns("`useListNavigation` must be virtual to allow escaping.")),b==="vertical"&&S>1&&ns("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=br(),P=wr(),j=kt(s),N=A.useRef(y),V=A.useRef(c??-1),k=A.useRef(null),M=A.useRef(!0),D=A.useRef(j),L=A.useRef(!!o.floating),_=A.useRef(n),z=A.useRef(!1),O=A.useRef(!1),B=jt(g),Q=jt(n),re=jt(T),J=jt(o.floating),K=jt(c),[U,Y]=A.useState(),[F,W]=A.useState(),Z=kt(function(G,ae,ie){ie===void 0&&(ie=!1);function X(ge){h?(Y(ge.id),P==null||P.events.emit("virtualfocus",ge),w&&(w.current=ge)):ir(ge,{preventScroll:!0,sync:F0()&&Ff()?Wg||z.current:!1})}const ue=G.current[ae.current];ue&&X(ue),requestAnimationFrame(()=>{const ge=G.current[ae.current]||ue;if(!ge)return;ue||X(ge);const be=re.current;be&&$&&(ie||!M.current)&&(ge.scrollIntoView==null||ge.scrollIntoView(typeof be=="boolean"?{block:"nearest",inline:"nearest"}:be))})});$e(()=>{document.createElement("div").focus({get preventScroll(){return Wg=!0,!1}})},[]),$e(()=>{l&&(n&&o.floating?N.current&&c!=null&&(O.current=!0,V.current=c,j(c)):L.current&&(V.current=-1,D.current(null)))},[l,n,o.floating,c,j]),$e(()=>{if(l&&n&&o.floating)if(a==null){if(z.current=!1,K.current!=null)return;if(L.current&&(V.current=-1,Z(i,V)),(!_.current||!L.current)&&N.current&&(k.current!=null||N.current===!0&&k.current==null)){let G=0;const ae=()=>{i.current[0]==null?(G<2&&(G?requestAnimationFrame:queueMicrotask)(ae),G++):(V.current=k.current==null||Kc(k.current,b,f)||p?Hc(i,B.current):Ag(i,B.current),k.current=null,j(V.current))};ae()}}else Di(i,a)||(V.current=a,Z(i,V,O.current),O.current=!1)},[l,n,o.floating,a,K,p,i,b,f,j,Z,B]),$e(()=>{var G;if(!l||o.floating||!P||h||!L.current)return;const ae=P.nodesRef.current,ie=(G=ae.find(ge=>ge.id===I))==null||(G=G.context)==null?void 0:G.elements.floating,X=gn(It(o.floating)),ue=ae.some(ge=>ge.context&&mt(ge.context.elements.floating,X));ie&&!ue&&M.current&&ie.focus({preventScroll:!0})},[l,o.floating,P,I,h]),$e(()=>{if(!l||!P||!h||I)return;function G(ae){W(ae.id),w&&(w.current=ae)}return P.events.on("virtualfocus",G),()=>{P.events.off("virtualfocus",G)}},[l,P,h,I,w]),$e(()=>{D.current=j,L.current=!!o.floating}),$e(()=>{n||(k.current=null)},[n]),$e(()=>{_.current=n},[n]);const oe=a!=null,$=A.useMemo(()=>{function G(ie){if(!n)return;const X=i.current.indexOf(ie);X!==-1&&j(X)}return{onFocus(ie){let{currentTarget:X}=ie;G(X)},onClick:ie=>{let{currentTarget:X}=ie;return X.focus({preventScroll:!0})},...m&&{onMouseMove(ie){let{currentTarget:X}=ie;G(X)},onPointerLeave(ie){let{pointerType:X}=ie;!M.current||X==="touch"||(V.current=-1,Z(i,V),j(null),h||ir(J.current,{preventScroll:!0}))}}}},[n,J,Z,m,i,j,h]),ye=kt(G=>{if(M.current=!1,z.current=!0,!Q.current&&G.currentTarget===J.current)return;if(p&&Ug(G.key,b,f)){Dt(G),r(!1,G.nativeEvent,"list-navigation"),bt(o.domReference)&&!h&&o.domReference.focus();return}const ae=V.current,ie=Hc(i,g),X=Ag(i,g);if(G.key==="Home"&&(Dt(G),V.current=ie,j(V.current)),G.key==="End"&&(Dt(G),V.current=X,j(V.current)),S>1){const ue=C||Array.from({length:i.current.length},()=>({width:1,height:1})),ge=gD(ue,S,R),be=ge.findIndex(le=>le!=null&&!ts(i.current,le,g)),te=ge.reduce((le,Me,Ge)=>Me!=null&&!ts(i.current,Me,g)?Ge:le,-1);if(V.current=ge[mD({current:ge.map(le=>le!=null?i.current[le]:null)},{event:G,orientation:b,loop:d,cols:S,disabledIndices:yD([...g||i.current.map((le,Me)=>ts(i.current,Me)?Me:void 0),void 0],ge),minIndex:be,maxIndex:te,prevIndex:vD(V.current>X?ie:V.current,ue,ge,S,G.key===xa?"bl":G.key===si?"tr":"tl"),stopEvent:!0})],j(V.current),b==="both")return}if(qg(G.key,b)){if(Dt(G),n&&!h&&gn(G.currentTarget.ownerDocument)===G.currentTarget){V.current=Kc(G.key,b,f)?ie:X,j(V.current);return}Kc(G.key,b,f)?d?V.current=ae>=X?u&&ae!==i.current.length?-1:ie:Ft(i,{startingIndex:ae,disabledIndices:g}):V.current=Math.min(X,Ft(i,{startingIndex:ae,disabledIndices:g})):d?V.current=ae<=ie?u&&ae!==-1?i.current.length:X:Ft(i,{startingIndex:ae,decrement:!0,disabledIndices:g}):V.current=Math.max(ie,Ft(i,{startingIndex:ae,decrement:!0,disabledIndices:g})),Di(i,V.current)?j(null):j(V.current)}}),ke=A.useMemo(()=>h&&n&&oe&&{"aria-activedescendant":F||U},[h,n,oe,F,U]),Ae=A.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...!L0(o.domReference)&&ke,onKeyDown:ye,onPointerMove(){M.current=!0}}),[ke,ye,o.domReference,b]),Ie=A.useMemo(()=>{function G(ie){y==="auto"&&N0(ie.nativeEvent)&&(N.current=!0)}function ae(ie){N.current=y,y==="auto"&&Nf(ie.nativeEvent)&&(N.current=!0)}return{...ke,onKeyDown(ie){M.current=!1;const X=ie.key.indexOf("Arrow")===0,ue=YD(ie.key,b,f),ge=Ug(ie.key,b,f),be=qg(ie.key,b),te=(p?ue:be)||ie.key==="Enter"||ie.key.trim()==="";if(h&&n){const xt=P==null?void 0:P.nodesRef.current.find(_t=>_t.parentId==null),ct=P&&xt?ID(P.nodesRef.current,xt.id):null;if(X&&ct&&w){const _t=new KeyboardEvent("keydown",{key:ie.key,bubbles:!0});if(ue||ge){var le,Me;const fn=((le=ct.context)==null?void 0:le.elements.domReference)===ie.currentTarget,Sn=ge&&!fn?(Me=ct.context)==null?void 0:Me.elements.domReference:ue?i.current.find(Xn=>(Xn==null?void 0:Xn.id)===U):null;Sn&&(Dt(ie),Sn.dispatchEvent(_t),W(void 0))}if(be&&ct.context&&ct.context.open&&ct.parentId&&ie.currentTarget!==ct.context.elements.domReference){var Ge;Dt(ie),(Ge=ct.context.elements.domReference)==null||Ge.dispatchEvent(_t);return}}return ye(ie)}if(!(!n&&!v&&X)){if(te&&(k.current=p&&be?null:ie.key),p){ue&&(Dt(ie),n?(V.current=Hc(i,B.current),j(V.current)):r(!0,ie.nativeEvent,"list-navigation"));return}be&&(c!=null&&(V.current=c),Dt(ie),!n&&v?r(!0,ie.nativeEvent,"list-navigation"):ye(ie),n&&j(V.current))}},onFocus(){n&&!h&&j(null)},onPointerDown:ae,onMouseDown:G,onClick:G}},[U,ke,ye,B,y,i,p,j,r,n,v,b,f,c,P,h,w]);return A.useMemo(()=>l?{reference:Ie,floating:Ae,item:$}:{},[l,Ie,Ae,$])}const KD=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ro(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=KD.get(a))!=null?n:a,l=li(),u=br()!=null,d=A.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&u&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,r,l,a]),p=A.useMemo(()=>{const h={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?h:{...h,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),f=A.useCallback(h=>{let{active:y,selected:m}=h;const v={role:"option",...y&&{id:o+"-option"}};switch(a){case"select":return{...v,"aria-selected":y&&m};case"combobox":return{...v,...y&&{"aria-selected":!0}}}return{}},[o,a]);return A.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const Gg=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 ZD(e,t){const[n,r]=A.useState(e);return e&&!n&&r(!0),A.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function XD(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[s,l]=A.useState("unmounted"),c=ZD(n,a);return!c&&s==="close"&&l("unmounted"),$e(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function pw(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=A.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,h]=A.useState(()=>({...po(i,c),...po(n,c)})),{isMounted:y,status:m}=XD(e,{duration:a}),v=jt(n),g=jt(r),b=jt(o),S=jt(i);return $e(()=>{const T=po(v.current,c),w=po(b.current,c),C=po(S.current,c),R=po(g.current,c)||Object.keys(T).reduce((I,P)=>(I[P]="",I),{});if(m==="initial"&&h(I=>({transitionProperty:I.transitionProperty,...C,...T})),m==="open"&&h({transitionProperty:Object.keys(R).map(Gg).join(","),transitionDuration:d+"ms",...C,...R}),m==="close"){const I=w||T;h({transitionProperty:Object.keys(I).map(Gg).join(","),transitionDuration:p+"ms",...C,...I})}},[p,b,v,g,S,d,m,c]),{isMounted:y,styles:f}}function QD(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,h=A.useRef(),y=A.useRef(""),m=A.useRef((n=f??a)!=null?n:-1),v=A.useRef(null),g=kt(s),b=kt(l),S=jt(u),T=jt(p);$e(()=>{r&&(clearTimeout(h.current),v.current=null,y.current="")},[r]),$e(()=>{if(r&&y.current===""){var P;m.current=(P=f??a)!=null?P:-1}},[r,f,a]);const w=kt(P=>{P?o.current.typing||(o.current.typing=P,b(P)):o.current.typing&&(o.current.typing=P,b(P))}),C=kt(P=>{function j(D,L,_){const z=S.current?S.current(L,_):L.find(O=>(O==null?void 0:O.toLocaleLowerCase().indexOf(_.toLocaleLowerCase()))===0);return z?D.indexOf(z):-1}const N=i.current;if(y.current.length>0&&y.current[0]!==" "&&(j(N,N,y.current)===-1?w(!1):P.key===" "&&Dt(P)),N==null||T.current.includes(P.key)||P.key.length!==1||P.ctrlKey||P.metaKey||P.altKey)return;r&&P.key!==" "&&(Dt(P),w(!0)),N.every(D=>{var L,_;return D?((L=D[0])==null?void 0:L.toLocaleLowerCase())!==((_=D[1])==null?void 0:_.toLocaleLowerCase()):!0})&&y.current===P.key&&(y.current="",m.current=v.current),y.current+=P.key,clearTimeout(h.current),h.current=setTimeout(()=>{y.current="",m.current=v.current,w(!1)},d);const k=m.current,M=j(N,[...N.slice((k||0)+1),...N.slice(0,(k||0)+1)],y.current);M!==-1?(g(M),v.current=M):P.key!==" "&&(y.current="",w(!1))}),R=A.useMemo(()=>({onKeyDown:C}),[C]),I=A.useMemo(()=>({onKeyDown:C,onKeyUp(P){P.key===" "&&w(!1)}}),[C,w]);return A.useMemo(()=>c?{reference:R,floating:I}:{},[c,R,I])}function Yg(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let a=0,s=i-1;a<i;s=a++){const[l,c]=t[a]||[0,0],[u,d]=t[s]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function JD(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function hw(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();function c(d,p){const f=performance.now(),h=f-l;if(a===null||s===null||h===0)return a=d,s=p,l=f,null;const y=d-a,m=p-s,g=Math.sqrt(y*y+m*m)/h;return a=d,s=p,l=f,g}const u=d=>{let{x:p,y:f,placement:h,elements:y,onClose:m,nodeId:v,tree:g}=d;return function(S){function T(){clearTimeout(o),m()}if(clearTimeout(o),!y.domReference||!y.floating||h==null||p==null||f==null)return;const{clientX:w,clientY:C}=S,R=[w,C],I=Pn(S),P=S.type==="mouseleave",j=mt(y.floating,I),N=mt(y.domReference,I),V=y.domReference.getBoundingClientRect(),k=y.floating.getBoundingClientRect(),M=h.split("-")[0],D=p>k.right-k.width/2,L=f>k.bottom-k.height/2,_=JD(R,V),z=k.width>V.width,O=k.height>V.height,B=(z?V:k).left,Q=(z?V:k).right,re=(O?V:k).top,J=(O?V:k).bottom;if(j&&(i=!0,!P))return;if(N&&(i=!1),N&&!P){i=!0;return}if(P&&Qe(S.relatedTarget)&&mt(y.floating,S.relatedTarget)||g&&Br(g.nodesRef.current,v).some(Y=>{let{context:F}=Y;return F==null?void 0:F.open}))return;if(M==="top"&&f>=V.bottom-1||M==="bottom"&&f<=V.top+1||M==="left"&&p>=V.right-1||M==="right"&&p<=V.left+1)return T();let K=[];switch(M){case"top":K=[[B,V.top+1],[B,k.bottom-1],[Q,k.bottom-1],[Q,V.top+1]];break;case"bottom":K=[[B,k.top+1],[B,V.bottom-1],[Q,V.bottom-1],[Q,k.top+1]];break;case"left":K=[[k.right-1,J],[k.right-1,re],[V.left+1,re],[V.left+1,J]];break;case"right":K=[[V.right-1,J],[V.right-1,re],[k.left+1,re],[k.left+1,J]];break}function U(Y){let[F,W]=Y;switch(M){case"top":{const Z=[z?F+t/2:D?F+t*4:F-t*4,W+t+1],oe=[z?F-t/2:D?F+t*4:F-t*4,W+t+1],$=[[k.left,D||z?k.bottom-t:k.top],[k.right,D?z?k.bottom-t:k.top:k.bottom-t]];return[Z,oe,...$]}case"bottom":{const Z=[z?F+t/2:D?F+t*4:F-t*4,W-t],oe=[z?F-t/2:D?F+t*4:F-t*4,W-t],$=[[k.left,D||z?k.top+t:k.bottom],[k.right,D?z?k.top+t:k.bottom:k.top+t]];return[Z,oe,...$]}case"left":{const Z=[F+t+1,O?W+t/2:L?W+t*4:W-t*4],oe=[F+t+1,O?W-t/2:L?W+t*4:W-t*4];return[...[[L||O?k.right-t:k.left,k.top],[L?O?k.right-t:k.left:k.right-t,k.bottom]],Z,oe]}case"right":{const Z=[F-t,O?W+t/2:L?W+t*4:W-t*4],oe=[F-t,O?W-t/2:L?W+t*4:W-t*4],$=[[L||O?k.left+t:k.right,k.top],[L?O?k.left+t:k.right:k.left+t,k.bottom]];return[Z,oe,...$]}}}if(!Yg([w,C],K)){if(i&&!_)return T();if(!P&&r){const Y=c(S.clientX,S.clientY);if(Y!==null&&Y<.1)return T()}Yg([w,C],U([p,f]))?!i&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const ui=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[ya(10),Wf({fallbackAxisSideDirection:"end"}),Hf(),Q0({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=to({open:n,middleware:i,transform:!0,whileElementsMounted:va,onOpenChange:(h,y)=>{var v;const m=y==null?void 0:y.relatedTarget;m&&m.dataset.floating==="true"&&!h||(r(h),(v=e.onChange)==null||v.call(e,h))}}),c=ba(l),u=eo(l),d=ro(l),{getReferenceProps:p,getFloatingProps:f}=no([c,u,d]);return x.jsxs(E.Fragment,{children:[x.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(Jr,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(ci,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:x.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-6 shadow-2xl",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[x.jsx(nw,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),x.jsx("header",{className:"mb-2",children:x.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},ej=e=>{const t=E.useRef(null),n=E.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=E.useState(!1),{context:s,refs:l}=to({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=ba(s),u=ro(s),d=eo(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=no([c,u,d]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(Ao,{...f(e),as:vt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:x.jsx(vt.span,{layoutId:o,children:e.trigger})}),x.jsx(vr,{children:i?x.jsx(Jr,{root:t,children:x.jsx(ci,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:x.jsx(vt.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},mw=300,tj=500,gw=(e="")=>ze("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),ld=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Kg=E.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o,floatingClassName:i="",label:a,...s},l)=>{const[c,u]=E.useState(r??!1),[d,p]=E.useState(!1),[f,h]=E.useState(null),y=E.useRef([]),m=E.useRef([]),v=E.useContext(ld),g=br(),b=wr(),S=kD(),T=tw(),w=g!==null,{floatingStyles:C,refs:R,context:I}=to({nodeId:S,open:c,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:va,placement:w?"right":"bottom-start",middleware:[ya({mainAxis:w?0:4,alignmentAxis:w?-4:0}),Wf(),Hf()]}),P=ro(I,{role:"menu",enabled:!0}),j=eo(I,{bubbles:!0}),N=aw(I,{move:!1,enabled:n,delay:{open:mw},handleClose:hw({blockPointerEvents:!0})}),V=ba(I,{event:"mousedown",toggle:!w,ignoreMouse:w,keyboardHandlers:!0}),k=Gf(I,{loop:!0,listRef:y,activeIndex:f,nested:w,onNavigate:h}),M=QD(I,{activeIndex:f,listRef:m,resetMs:tj,onMatch:c?h:void 0}),{getReferenceProps:D,getFloatingProps:L,getItemProps:_}=no([N,V,P,j,k,M]);E.useEffect(()=>{if(!b)return;function O(){u(!1)}function B(Q){Q.nodeId!==S&&Q.parentId===g&&u(!1)}return b.events.on("click",O),b.events.on("menuopen",B),()=>{b.events.off("click",O),b.events.off("menuopen",B)}},[b,S,g]),E.useEffect(()=>{c&&b&&b.events.emit("menuopen",{parentId:g,nodeId:S})},[b,c,S,g]);const z=o?s.className:ze(gw(s.className));return x.jsxs(RD,{id:S,children:[x.jsx(E.Fragment,{children:s.asChild?x.jsx(Vo,{...D(v.getItemProps({...s,onFocus(O){var B;(B=s.onFocus)==null||B.call(s,O),p(!1),v.setHasFocusInside(!0)}})),children:a,ref:sd([R.setReference,T.ref,l]),tabIndex:w?v.activeIndex===T.index?0:-1:void 0,"data-open":c?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":d?"":void 0,className:z}):x.jsxs("button",{type:"button",className:z,"data-open":c?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":d?"":void 0,ref:sd([R.setReference,T.ref,l]),tabIndex:w?v.activeIndex===T.index?0:-1:void 0,...D(v.getItemProps({...s,onFocus(O){var B;(B=s.onFocus)==null||B.call(s,O),p(!1),v.setHasFocusInside(!0)}})),children:[a,w&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(vf,{size:14})]})]})}),x.jsx(ld.Provider,{value:{activeIndex:f,setActiveIndex:h,getItemProps:_,setHasFocusInside:p,isOpen:c},children:x.jsx(wD,{elementsRef:y,labelsRef:m,children:c&&x.jsx(Jr,{preserveTabOrder:!0,children:x.jsx(ci,{context:I,modal:!1,initialFocus:w?-1:0,returnFocus:!w,children:x.jsx(t,{...L(),ref:R.setFloating,style:{...s.style,...C},className:ze("isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",i),children:e})})})})})]})}),nj=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(ld),s=tw({label:n?null:e}),l=wr(),c=s.index===a.activeIndex;return x.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:sd([s.ref,i]),className:gw(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),a.setHasFocusInside(!0)}}),children:[r,t?x.jsx(t,{size:16}):null]})}),rj=E.forwardRef((e,t)=>br()!==null?x.jsx(Kg,{...e,isParent:!1,ref:t}):x.jsx(PD,{children:x.jsx(Kg,{...e,isParent:!0,ref:t})})),oj=(e,t)=>Zi()?t:window.matchMedia(e).matches,ij=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(oj(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},aj=e=>{const t=E.useRef(Zi()?"":document.documentElement.style.overflowY);E.useEffect(()=>{const n=document.documentElement;e?(t.current=document.documentElement.style.overflowY,n.style.overflowY="hidden",n.style.padding=My(n)?"0 15px 0 0":""):(n.style.padding="",document.documentElement.style.overflowY=t.current)},[e]),E.useEffect(()=>{if(!e)return;const n=new AbortController,r=document.documentElement,o=i=>i.target===r&&e?i.preventDefault():void 0;return r.addEventListener("wheel",o,{signal:n.signal,passive:!1}),r.addEventListener("scroll",o,{signal:n.signal,passive:!1}),()=>{n.abort()}},[e])},vn="600ms",sj={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:vn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:vn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:vn}},lj={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:vn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:vn}},Zc={drawer:e=>e==="left"?sj:lj,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:vn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:vn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:vn,originY:"bottom"}},dialog:{exit:{opacity:0,scale:.97,animationDuration:vn},initial:{opacity:0,scale:.95,animationDuration:vn},enter:{opacity:1,scale:[1.05,1],animationDuration:vn}}},cj=Xo("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 h-[85vh] max-h-[85vh] max-h-[85svh] pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),uj={top:0,left:0,right:0,bottom:-1},dj=e=>e*.62,fj=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x,p=Math.abs(u+d);return e.value.set(p)}const i=e.parent.current.getBoundingClientRect(),a=e.value.get()||i.height,s=Math.abs(a-r.delta.y),l=dj(window.outerHeight);return s<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(s)}};return x.jsx(vt.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:uj,whileDrag:{cursor:"grabbing"},className:ze("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?x.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Ba={drawer:"right",sheet:"none",dialog:"none"},pj=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ba.drawer:Ba[o]:t?Ba[o]:Ba.sheet},hj=({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,layoutId:a,onChange:s,className:l,resizer:c=!0,closable:u=!0,forceType:d=!1,overlayClassName:p="",type:f="dialog",position:h,overlayClickClose:y=!1,ariaTitle:m,...v})=>{aj(e);const g=E.useId(),b=E.useId(),S=ij("(min-width: 64rem)"),T=f!=="dialog",w=pj(S,d,f,h),C=S||d?Zc[f]:Zc.sheet,R=typeof C=="function"?C(w):C,I=S||d?f:"sheet",{refs:P,context:j}=to({open:e,onOpenChange:s}),N=ba(j),V=ro(j),k=eo(j,{escapeKey:!0,referencePress:!0,outsidePress:y}),{getReferenceProps:M,getFloatingProps:D}=no([N,V,k]),L=o,_=Do(void 0),z=()=>s(!1);return x.jsxs(E.Fragment,{children:[o?x.jsx(E.Fragment,{children:r?x.jsx(Vo,{ref:P.setReference,...M({layoutId:a}),children:L}):x.jsx(vt.button,{ref:P.setReference,...M(),layoutId:a,type:"button",children:L})}):null,x.jsx(Jr,{children:x.jsx(vr,{mode:"wait",presenceAffectsLayout:!0,children:e?x.jsx($D,{lockScroll:!1,className:ze(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${I==="drawer"?"":"flex items-start justify-center p-10"}`,p),children:x.jsx(ci,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:j,children:x.jsxs(vt.div,{...v,exit:"exit",animate:"enter",initial:"initial",variants:R,"data-component":"modal",ref:P.setFloating,"aria-modal":e,layoutId:a,className:ze(cj({position:w,type:I}),l),style:I==="drawer"?{width:_}:{height:_},...t?{"aria-labelledby":g,"aria-describedby":b}:{"aria-label":m},...D(),children:[t?x.jsx("header",{className:"relative w-full",children:t?x.jsx("h2",{id:g,className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,x.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:i}),n?x.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:n}):null,u?x.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:x.jsx("button",{type:"button",onClick:z,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(xf,{})})}):null,T&&c?x.jsx(fj,{onChange:s,parent:P.floating,position:w,sheet:I==="sheet",value:_}):null]})})}):null})})]})},mj=e=>x.jsx(vt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),vw=({as:e,title:t,children:n,placement:r,open:o,focus:i=!0,hover:a=!0,enabled:s=!0,popover:l=!0,followCursor:c=!1,onChange:u=Pf,...d})=>{const[p,f]=E.useState(o??!1),h=E.useRef(null),y=e||"span",m=N=>{f(N),u==null||u(N)},{refs:v,floatingStyles:g,context:b}=to({open:p,placement:r,transform:!0,strategy:"absolute",whileElementsMounted:va,onOpenChange:o?void 0:m,middleware:[Hf(),ya(5),Wf({fallbackAxisSideDirection:"start"}),Q0({padding:5,element:h})]}),S=aw(b,{move:!0,delay:{open:mw},enabled:s?a:!1,handleClose:l?hw():null}),T=GD(b,{enabled:s?i:!1}),w=ba(b,{enabled:s?l:!1}),C=eo(b,{enabled:s}),R=ro(b,{role:"tooltip",enabled:s}),I=HD(b,{enabled:!!s&&!!c}),{getReferenceProps:P,getFloatingProps:j}=no([R,C,I,i?T:void 0,a?S:void 0,l?w:void 0]);return E.useEffect(()=>f(o===void 0?!1:o),[o]),x.jsxs(E.Fragment,{children:[x.jsx(y,{ref:v.setReference,...P(d),children:t}),p&&x.jsx(Jr,{preserveTabOrder:!0,children:x.jsxs(cn,{...j(),ref:v.setFloating,style:g,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(nw,{ref:h,context:b,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),n]})})]})};class Cs{static getDescendantProperty(t,n,r=[]){let o,i,a,s,l,c;if(n){if(a=n.indexOf("."),a===-1?o=n:(o=n.slice(0,a),i=n.slice(a+1)),s=t[o],s!==null&&typeof s<"u")if(!i&&(typeof s=="string"||typeof s=="number"))r.push(s);else if(Object.prototype.toString.call(s)==="[object Array]")for(l=0,c=s.length;l<c;l++)Cs.getDescendantProperty(s[l],i,r);else i&&Cs.getDescendantProperty(s,i,r)}else r.push(t);return r}}class Lr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const i=Lr.isMatch(o,t,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const a=Cs.getDescendantProperty(o,this.keys[i]);let s=!1;for(let l=0;l<a.length;l++){const c=Lr.isMatch(a[l],t,this.options.caseSensitive);if(c){s=!0,n.push({item:o,score:c});break}}if(s)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=Lr.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 Lr.indexesOfFirstLetter(t,n).forEach((a,s)=>{let l=a+1;o[s]=[a];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[s]=!1;break}o[s].push(l),l++}}),o=o.filter(a=>a!==!1),o.length?o.sort((a,s)=>a.length===1?a[0]-s[0]:(a=a[a.length-1]-a[0],s=s[s.length-1]-s[0],a-s))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}const vl=0,Tr=1,di=2,yw=4;function Zg(e){return()=>e}function gj(e){e()}function Ji(e,t){return n=>e(t(n))}function Xg(e,t){return()=>e(t)}function xw(e,t){return n=>e(t,n)}function Yf(e){return e!==void 0}function vj(...e){return()=>{e.map(gj)}}function fi(){}function yl(e,t){return t(e),e}function yj(e,t){return t(e)}function st(...e){return e}function Ke(e,t){return e(Tr,t)}function _e(e,t){e(vl,t)}function Kf(e){e(di)}function Lt(e){return e(yw)}function xe(e,t){return Ke(e,xw(t,vl))}function Nn(e,t){const n=e(Tr,r=>{n(),t(r)});return n}function Qg(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function bw(e,t){return e===t}function it(e=bw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Se(e){return t=>n=>{e(n)&&t(n)}}function pe(e){return t=>Ji(t,e)}function Cn(e){return t=>()=>{t(e)}}function ee(e,...t){const n=xj(...t);return(r,o)=>{switch(r){case di:Kf(e);return;case Tr:return Ke(e,n(o))}}}function In(e,t){return n=>r=>{n(t=e(t,r))}}function qo(e){return t=>n=>{e>0?e--:t(n)}}function lr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function je(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Ke(i,l=>{const c=n;n=n|s,t[a]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function xj(...e){return t=>e.reduceRight(yj,t)}function bj(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case Tr:return i?n===i?void 0:(r(),n=i,t=Ke(e,i),t):(r(),fi);case di:r(),n=null;return}}}function se(e){let t=e;const n=Ve();return(r,o)=>{switch(r){case vl:t=o;break;case Tr:{o(t);break}case yw:return t}return n(r,o)}}function Vt(e,t){return yl(se(t),n=>xe(e,n))}function Ve(){const e=[];return(t,n)=>{switch(t){case vl:e.slice().forEach(r=>{r(n)});return;case di:e.splice(0,e.length);return;case Tr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function en(e){return yl(Ve(),t=>xe(e,t))}function We(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:wj(),singleton:n}}const wj=()=>Symbol();function Tj(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function Rt(...e){const t=Ve(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Ke(i,l=>{n[a]=l,r=r|s,r===o&&_e(t,n)})}),function(i,a){switch(i){case di:{Kf(t);return}case Tr:return r===o&&a(n),Ke(t,a)}}}function Ce(e,t=bw){return ee(e,it(t))}function Jg(...e){return function(t,n){switch(t){case di:return;case Tr:return vj(...e.map(r=>Ke(r,n)))}}}var tn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(tn||{});const Sj={0:"debug",3:"error",1:"log",2:"warn"},Ej=()=>typeof globalThis>"u"?window:globalThis,Sr=We(()=>{const e=se(3);return{log:se((t,n,r=1)=>{var o;const i=(o=Ej().VIRTUOSO_LOG_LEVEL)!=null?o:Lt(e);r>=i&&console[Sj[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Fn(e,t,n){return Zf(e,t,n).callbackRef}function Zf(e,t,n){const r=E.useRef(null);let o=i=>{};if(typeof ResizeObserver<"u"){const i=E.useMemo(()=>new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}),[e]);o=a=>{a&&t?(i.observe(a),r.current=a):(r.current&&i.unobserve(r.current),r.current=null)}}return{callbackRef:o,ref:r}}function ww(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=Cj(u.children,t,s?"offsetWidth":"offsetHeight",o);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const f=p.lastElementChild.dataset.viewportType==="window";let h;f&&(h=p.ownerDocument.defaultView);const y=a?s?a.scrollLeft:a.scrollTop:f?s?h.scrollX||h.document.documentElement.scrollLeft:h.scrollY||h.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,m=a?s?a.scrollWidth:a.scrollHeight:f?s?h.document.documentElement.scrollWidth:h.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,v=a?s?a.offsetWidth:a.offsetHeight:f?s?h.innerWidth:h.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:m,scrollTop:Math.max(y,0),viewportHeight:v}),i==null||i(s?ev("column-gap",getComputedStyle(u).columnGap,o):ev("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return Zf(c,n,l)}function Cj(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const s=e.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},tn.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function ev(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}function Xf(e,t,n){const r=E.useRef(null),o=E.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,p;if(t){const f=t.getBoundingClientRect(),h=c.top-f.top;p=f.height-Math.max(0,h),d=h+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;p=f.innerHeight-Math.max(0,c.top),d=c.top+f.scrollY}r.current={offsetTop:d,visibleHeight:p,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=Zf(o,!0,n),s=E.useCallback(()=>{o(a.current)},[o,a]);return E.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c==null||c.addEventListener("scroll",s),c==null||c.addEventListener("resize",s),()=>{c==null||c.removeEventListener("scroll",s),c==null||c.removeEventListener("resize",s)}}},[s,t]),i}const Wt=We(()=>{const e=Ve(),t=Ve(),n=se(0),r=Ve(),o=se(0),i=Ve(),a=Ve(),s=se(0),l=se(0),c=se(0),u=se(0),d=Ve(),p=Ve(),f=se(!1),h=se(!1),y=se(!1);return xe(ee(e,pe(({scrollTop:m})=>m)),t),xe(ee(e,pe(({scrollHeight:m})=>m)),a),xe(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:h,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:y,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),ea={lvl:0};function Tw(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function tt(e){return e===ea}function ta(e,t){if(!tt(e))return t===e.k?e.v:t<e.k?ta(e.l,t):ta(e.r,t)}function wn(e,t,n="k"){if(tt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=wn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return wn(e.l,t,n)}function Jt(e,t,n){return tt(e)?Cw(t,n,1):t===e.k?Ct(e,{k:t,v:n}):t<e.k?tv(Ct(e,{l:Jt(e.l,t,n)})):tv(Ct(e,{r:Jt(e.r,t,n)}))}function Co(){return ea}function xl(e,t,n){if(tt(e))return[];const r=wn(e,t)[0];return kj(ud(e,r,n))}function cd(e,t){if(tt(e))return ea;const{k:n,l:r,r:o}=e;if(t===n){if(tt(r))return o;if(tt(o))return r;{const[i,a]=Ew(r);return rs(Ct(e,{k:i,l:Sw(r),v:a}))}}else return t<n?rs(Ct(e,{l:cd(r,t)})):rs(Ct(e,{r:cd(o,t)}))}function Vr(e){return tt(e)?[]:[...Vr(e.l),{k:e.k,v:e.v},...Vr(e.r)]}function ud(e,t,n){if(tt(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(ud(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(ud(i,t,n))),s}function rs(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(Xc(t))return kw(Ct(e,{lvl:n-1}));if(!tt(t)&&!tt(t.r))return Ct(t.r,{l:Ct(t,{r:t.r.l}),lvl:n,r:Ct(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(Xc(e))return dd(Ct(e,{lvl:n-1}));if(!tt(r)&&!tt(r.l)){const o=r.l,i=Xc(o)?r.lvl-1:r.lvl;return Ct(o,{l:Ct(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:dd(Ct(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Ct(e,t){return Cw(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 Sw(e){return tt(e.r)?e.l:rs(Ct(e,{r:Sw(e.r)}))}function Xc(e){return tt(e)||e.lvl>e.r.lvl}function Ew(e){return tt(e.r)?[e.k,e.v]:Ew(e.r)}function Cw(e,t,n,r=ea,o=ea){return{k:e,l:r,lvl:n,r:o,v:t}}function tv(e){return dd(kw(e))}function kw(e){const{l:t}=e;return!tt(t)&&t.lvl===e.lvl?Ct(t,{r:Ct(e,{l:t.r})}):e}function dd(e){const{lvl:t,r:n}=e;return!tt(n)&&!tt(n.r)&&n.lvl===t&&n.r.lvl===t?Ct(n,{l:Ct(e,{r:n.l}),lvl:t+1}):e}function kj(e){return Tw(e,({k:t,v:n})=>({index:t,value:n}))}function Rw(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function na(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const Qf=We(()=>({recalcInProgress:se(!1)}),[],{singleton:!0});function Pw(e,t,n){return e[ks(e,t,n)]}function ks(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),a=e[i],s=n(a,t);if(s===0)return i;if(s===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Rj(e,t,n,r){const o=ks(e,t,r),i=ks(e,n,r,o);return e.slice(o,i+1)}function Tn(e,t){return Math.round(e.getBoundingClientRect()[t])}function bl(e){return!tt(e.groupOffsetTree)}function Jf({index:e},t){return t===e?0:t<e?-1:1}function Pj(){return{groupIndices:[],groupOffsetTree:Co(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Co()}}function Aj(e,t){let n=tt(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),tt(e)){e=Jt(e,0,i);continue}const s=xl(e,a-1,o+1);if(s.some(Nj(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=cd(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=Jt(e,o+1,p));c&&(e=Jt(e,a,i))}return[e,n]}function Ij(e){return typeof e.groupIndex<"u"}function Oj({offset:e},t){return t===e?0:t<e?-1:1}function ra(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=Pw(t,e,Jf),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function Aw(e,t){if(!bl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Iw(e,t,n){if(Ij(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Aw(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function _j(e,t,n,r=0){return r>0&&(t=Math.max(t,Pw(e,r,Jf).offset)),Tw(Rj(e,t,n,Oj),jj)}function Mj(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,tn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&tt(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((h,y)=>Jt(Jt(h,y,p),y+1,f),a)}else[a,s]=Aj(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=fd(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>Jt(p,f,ra(f,d,o)),Co()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function Dj(e){return Vr(e).map(({k:t,v:n},r,o)=>{const i=o[r+1];return{endIndex:i?i.k-1:1/0,size:n,startIndex:t}})}function nv(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 fd(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=ks(o,t-1,Jf),s=o[l].offset;const c=wn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===wn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of xl(n,t,1/0)){const d=c-i,p=d*a+s+d*r;o.push({index:c,offset:p,size:u}),i=c,s=p,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function jj(e){return{index:e.index,value:e}}function Nj(e){const{endIndex:t,size:n,startIndex:r}=e;return o=>o.start===r&&(o.end===t||o.end===1/0)&&o.value===n}const Fj={offsetHeight:"height",offsetWidth:"width"},zn=We(([{log:e},{recalcInProgress:t}])=>{const n=Ve(),r=Ve(),o=Vt(r,0),i=Ve(),a=Ve(),s=se(0),l=se([]),c=se(void 0),u=se(void 0),d=se((T,w)=>Tn(T,Fj[w])),p=se(void 0),f=se(0),h=Pj(),y=Vt(ee(n,je(l,e,f),In(Mj,h),it()),h),m=Vt(ee(l,it(),In((T,w)=>({current:w,prev:T.current}),{current:[],prev:[]}),pe(({prev:T})=>T)),[]);xe(ee(l,Se(T=>T.length>0),je(y,f),pe(([T,w,C])=>{const R=T.reduce((I,P,j)=>Jt(I,P,ra(P,w.offsetTree,C)||j),Co());return{...w,groupIndices:T,groupOffsetTree:R}})),y),xe(ee(r,je(y),Se(([T,{lastIndex:w}])=>T<w),pe(([T,{lastIndex:w,lastSize:C}])=>[{endIndex:w,size:C,startIndex:T}])),n),xe(c,u);const v=Vt(ee(c,pe(T=>T===void 0)),!0);xe(ee(u,Se(T=>T!==void 0&&tt(Lt(y).sizeTree)),pe(T=>[{endIndex:0,size:T,startIndex:0}])),n);const g=en(ee(n,je(y),In(({sizes:T},[w,C])=>({changed:C!==T,sizes:C}),{changed:!1,sizes:h}),pe(T=>T.changed)));Ke(ee(s,In((T,w)=>({diff:T.prev-w,prev:w}),{diff:0,prev:0}),pe(T=>T.diff)),T=>{const{groupIndices:w}=Lt(y);if(T>0)_e(t,!0),_e(i,T+nv(T,w));else if(T<0){const C=Lt(m);C.length>0&&(T-=nv(-T,C)),_e(a,T)}}),Ke(ee(s,je(e)),([T,w])=>{T<0&&w("`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:s},tn.ERROR)});const b=en(i);xe(ee(i,je(y),pe(([T,w])=>{const C=w.groupIndices.length>0,R=[],I=w.lastSize;if(C){const P=ta(w.sizeTree,0);let j=0,N=0;for(;j<T;){const k=w.groupIndices[N],M=w.groupIndices.length===N+1?1/0:w.groupIndices[N+1]-k-1;R.push({endIndex:k,size:P,startIndex:k}),R.push({endIndex:k+1+M-1,size:I,startIndex:k+1}),N++,j+=M+1}const V=Vr(w.sizeTree);return j!==T&&V.shift(),V.reduce((k,{k:M,v:D})=>{let L=k.ranges;return k.prevSize!==0&&(L=[...k.ranges,{endIndex:M+T-1,size:k.prevSize,startIndex:k.prevIndex}]),{prevIndex:M+T,prevSize:D,ranges:L}},{prevIndex:T,prevSize:0,ranges:R}).ranges}return Vr(w.sizeTree).reduce((P,{k:j,v:N})=>({prevIndex:j+T,prevSize:N,ranges:[...P.ranges,{endIndex:j+T-1,size:P.prevSize,startIndex:P.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const S=en(ee(a,je(y,f),pe(([T,{offsetTree:w},C])=>{const R=-T;return ra(R,w,C)})));return xe(ee(a,je(y,f),pe(([T,w,C])=>{if(w.groupIndices.length>0){if(tt(w.sizeTree))return w;let R=Co();const I=Lt(m);let P=0,j=0,N=0;for(;P<-T;){N=I[j];const V=I[j+1]-N-1;j++,P+=V+1}if(R=Vr(w.sizeTree).reduce((V,{k,v:M})=>Jt(V,Math.max(0,k+T),M),R),P!==-T){const V=ta(w.sizeTree,N);R=Jt(R,0,V);const k=wn(w.sizeTree,-T+1)[1];R=Jt(R,1,k)}return{...w,sizeTree:R,...fd(w.offsetTree,0,R,C)}}else{const R=Vr(w.sizeTree).reduce((I,{k:P,v:j})=>Jt(I,Math.max(0,P+T),j),Co());return{...w,sizeTree:R,...fd(w.offsetTree,0,R,C)}}})),y),{beforeUnshiftWith:b,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:g,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:y,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}},st(Sr,Qf),{singleton:!0});function Lj(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const Ow=We(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Ve(),a=Ve(),s=en(ee(i,pe(Lj)));return xe(ee(s,pe(l=>l.totalCount)),n),xe(ee(s,pe(l=>l.groupIndices)),e),xe(ee(Rt(o,t,r),Se(([l,c])=>bl(c)),pe(([l,c,u])=>wn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),it(),pe(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},st(zn,Wt)),Er=We(([{log:e}])=>{const t=se(!1),n=en(ee(t,Se(r=>r),it()));return Ke(t,r=>{r&&Lt(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},st(Sr),{singleton:!0}),Vj=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function _w(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Vj)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const wa=We(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=Ve(),h=Ve(),y=se(0);let m=null,v=null,g=null;function b(){m&&(m(),m=null),g&&(g(),g=null),v&&(clearTimeout(v),v=null),_e(l,!1)}return xe(ee(f,je(n,d,r,y,s,a,p),je(e,i,o),pe(([[S,T,w,C,R,I,P,j],N,V,k])=>{const M=_w(S),{align:D,behavior:L,offset:_}=M,z=C-1,O=Iw(M,T,z);let B=ra(O,T.offsetTree,N)+I;D==="end"?(B+=V+wn(T.sizeTree,O)[1]-w+k,O===z&&(B+=P)):D==="center"?B+=(V+wn(T.sizeTree,O)[1]-w+k)/2:B-=R,_&&(B+=_);const Q=re=>{b(),re?(j("retrying to scroll to",{location:S},tn.DEBUG),_e(f,S)):(_e(h,!0),j("list did not change, scroll successful",{},tn.DEBUG))};if(b(),L==="smooth"){let re=!1;g=Ke(t,J=>{re=re||J}),m=Nn(u,()=>{Q(re)})}else m=Nn(ee(t,zj(150)),Q);return v=setTimeout(()=>{b()},1200),_e(l,!0),j("scrolling from index to",{behavior:L,index:O,top:B},tn.DEBUG),{behavior:L,top:B}})),c),{scrollTargetReached:h,scrollToIndex:f,topListHeight:y}},st(zn,Wt,Sr),{singleton:!0});function zj(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function ep(e,t){e==0?t():requestAnimationFrame(()=>{ep(e-1,t)})}function tp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Ta=We(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=se(!0),l=se(0),c=se(!0);return xe(ee(a,je(l),Se(([u,d])=>!!d),Cn(!1)),s),xe(ee(a,je(l),Se(([u,d])=>!!d),Cn(!1)),c),Ke(ee(Rt(t,a),je(s,n,e,c),Se(([[,u],d,{sizeTree:p},f,h])=>u&&(!tt(p)||Yf(f))&&!d&&!h),je(l)),([,u])=>{Nn(o,()=>{_e(c,!0)}),ep(4,()=>{Nn(r,()=>{_e(s,!0)}),_e(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},st(zn,Wt,wa,Er),{singleton:!0});function Mw(e,t){return Math.abs(e-t)<1.01}const oa="up",Ni="down",$j="none",Bj={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Hj=0,Sa=We(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=se(!1),s=se(!0),l=Ve(),c=Ve(),u=se(4),d=se(Hj),p=Vt(ee(Jg(ee(Ce(o),qo(1),Cn(!0)),ee(Ce(o),qo(1),Cn(!1),Qg(100))),it()),!1),f=Vt(ee(Jg(ee(n,Cn(!0)),ee(n,Cn(!1),Qg(200))),it()),!1);xe(ee(Rt(Ce(o),Ce(d)),pe(([g,b])=>g<=b),it()),s),xe(ee(s,lr(50)),c);const h=en(ee(Rt(r,Ce(i),Ce(t),Ce(e),Ce(u)),In((g,[{scrollHeight:b,scrollTop:S},T,w,C,R])=>{const I=S+T-b>-R,P={scrollHeight:b,scrollTop:S,viewportHeight:T};if(I){let N,V;return S>g.state.scrollTop?(N="SCROLLED_DOWN",V=g.state.scrollTop-S):(N="SIZE_DECREASED",V=g.state.scrollTop-S||g.scrollTopDelta),{atBottom:!0,atBottomBecause:N,scrollTopDelta:V,state:P}}let j;return P.scrollHeight>g.state.scrollHeight?j="SIZE_INCREASED":T<g.state.viewportHeight?j="VIEWPORT_HEIGHT_DECREASING":S<g.state.scrollTop?j="SCROLLING_UPWARDS":j="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:j,state:P}},Bj),it((g,b)=>g&&g.atBottom===b.atBottom))),y=Vt(ee(r,In((g,{scrollHeight:b,scrollTop:S,viewportHeight:T})=>{if(Mw(g.scrollHeight,b))return{changed:!1,jump:0,scrollHeight:b,scrollTop:S};{const w=b-(S+T)<1;return g.scrollTop!==S&&w?{changed:!0,jump:g.scrollTop-S,scrollHeight:b,scrollTop:S}:{changed:!0,jump:0,scrollHeight:b,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Se(g=>g.changed),pe(g=>g.jump)),0);xe(ee(h,pe(g=>g.atBottom)),a),xe(ee(a,lr(50)),l);const m=se(Ni);xe(ee(r,pe(({scrollTop:g})=>g),it(),In((g,b)=>Lt(f)?{direction:g.direction,prevScrollTop:b}:{direction:b<g.prevScrollTop?oa:Ni,prevScrollTop:b},{direction:Ni,prevScrollTop:0}),pe(g=>g.direction)),m),xe(ee(r,lr(50),Cn($j)),m);const v=se(0);return xe(ee(p,Se(g=>!g),Cn(0)),v),xe(ee(o,lr(100),je(p),Se(([g,b])=>!!b),In(([g,b],[S])=>[b,S],[0,0]),pe(([g,b])=>b-g)),v),{atBottomState:h,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:y,scrollDirection:m,scrollVelocity:v}},st(Wt)),Rs="top",Ps="bottom",rv="none";function ov(e,t,n){return typeof e=="number"?n===oa&&t===Rs||n===Ni&&t===Ps?e:0:n===oa?t===Rs?e.main:e.reverse:t===Ps?e.main:e.reverse}function iv(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const np=We(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Ve(),a=se(0),s=se(0),l=se(0),c=Vt(ee(Rt(Ce(r),Ce(o),Ce(n),Ce(i,na),Ce(l),Ce(a),Ce(t),Ce(e),Ce(s)),pe(([u,d,p,[f,h],y,m,v,g,b])=>{const S=u-g,T=m+v,w=Math.max(p-S,0);let C=rv;const R=iv(b,Rs),I=iv(b,Ps);return f-=g,f+=p+v,h+=p+v,h-=g,f>u+T-R&&(C=oa),h<u-w+d+I&&(C=Ni),C!==rv?[Math.max(S-p-ov(y,Rs,C)-R,0),S-w-v+d+ov(y,Ps,C)+I]:null}),Se(u=>u!=null),it(na)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},st(Wt),{singleton:!0});function Wj(e,t,n){if(bl(t)){const r=Aw(e,t);return[{index:wn(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:r,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:e,offset:0,size:0}]}const Qc={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function os(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const y=e[e.length-1];u=y.offset+y.size}const d=n-a,p=s+d*l+(d-1)*r,f=c,h=p-u;return{bottom:u,firstItemIndex:i,items:av(e,o,i),offsetBottom:h,offsetTop:c,top:f,topItems:av(t,o,i),topListHeight:t.reduce((y,m)=>m.size+y,0),totalCount:n}}function Dw(e,t,n,r,o,i){let a=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-a>=e)break;a++}const s=e+a,l=tp(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return os(c,[],s,o,n,r)}function av(e,t,n){if(e.length===0)return[];if(!bl(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],a=xl(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}const oo=We(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:h}])=>{const y=se([]),m=se(0),v=Ve();xe(i.topItemsIndexes,y);const g=Vt(ee(Rt(f,h,Ce(l,na),Ce(o),Ce(r),Ce(c),u,Ce(y),Ce(t),Ce(n),e),Se(([w,C,,R,,,,,,,I])=>{const P=I&&I.length!==R;return w&&!C&&!P}),pe(([,,[w,C],R,I,P,j,N,V,k,M])=>{const D=I,{offsetTree:L,sizeTree:_}=D,z=Lt(m);if(R===0)return{...Qc,totalCount:R};if(w===0&&C===0)return z===0?{...Qc,totalCount:R}:Dw(z,P,I,V,k,M||[]);if(tt(_))return z>0?null:os(Wj(tp(P,R),D,M),[],R,k,D,V);const O=[];if(N.length>0){const K=N[0],U=N[N.length-1];let Y=0;for(const F of xl(_,K,U)){const W=F.value,Z=Math.max(F.start,K),oe=Math.min(F.end,U);for(let $=Z;$<=oe;$++)O.push({data:M==null?void 0:M[$],index:$,offset:Y,size:W}),Y+=W}}if(!j)return os([],O,R,k,D,V);const B=N.length>0?N[N.length-1]+1:0,Q=_j(L,w,C,B);if(Q.length===0)return null;const re=R-1,J=yl([],K=>{for(const U of Q){const Y=U.value;let F=Y.offset,W=U.start;const Z=Y.size;if(Y.offset<w){W+=Math.floor((w-Y.offset+k)/(Z+k));const $=W-U.start;F+=$*Z+$*k}W<B&&(F+=(B-W)*Z,W=B);const oe=Math.min(U.end,re);for(let $=W;$<=oe&&!(F>=C);$++)K.push({data:M==null?void 0:M[$],index:$,offset:F,size:Z}),F+=Z+k}});return os(J,O,R,k,D,V)}),Se(w=>w!==null),it()),Qc);xe(ee(e,Se(Yf),pe(w=>w==null?void 0:w.length)),o),xe(ee(g,pe(w=>w.topListHeight)),d),xe(d,s),xe(ee(g,pe(w=>[w.top,w.bottom])),a),xe(ee(g,pe(w=>w.items)),v);const b=en(ee(g,Se(({items:w})=>w.length>0),je(o,e),Se(([{items:w},C])=>w[w.length-1].originalIndex===C-1),pe(([,w,C])=>[w-1,C]),it(na),pe(([w])=>w))),S=en(ee(g,lr(200),Se(({items:w,topItems:C})=>w.length>0&&w[0].originalIndex===C.length),pe(({items:w})=>w[0].index),it())),T=en(ee(g,Se(({items:w})=>w.length>0),pe(({items:w})=>{let C=0,R=w.length-1;for(;w[C].type==="group"&&C<R;)C++;for(;w[R].type==="group"&&R>C;)R--;return{endIndex:w[R].index,startIndex:w[C].index}}),it(Rw)));return{endReached:b,initialItemCount:m,itemsRendered:v,listState:g,rangeChanged:T,startReached:S,topItemsIndexes:y,...p}},st(zn,Ow,np,Ta,wa,Sa,Er,Qf),{singleton:!0}),jw=We(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Ve(),a=Vt(ee(Rt(n,e,r,t,o),pe(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return xe(Ce(a),i),{totalListHeight:a,totalListHeightChanged:i}},st(Wt,oo),{singleton:!0}),qj=We(([{viewportHeight:e},{totalListHeight:t}])=>{const n=se(!1),r=Vt(ee(Rt(n,e,t),Se(([o])=>o),pe(([,o,i])=>Math.max(0,o-i)),lr(0),it()),0);return{alignToBottom:n,paddingTopAddition:r}},st(Wt,jw),{singleton:!0});function sv(e){return e?e==="smooth"?"smooth":"auto":!1}const Uj=(e,t)=>typeof e=="function"?sv(e(t)):t&&sv(e),Gj=We(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=se(!1),d=Ve();let p=null;function f(y){_e(o,{align:"end",behavior:y,index:"LAST"})}Ke(ee(Rt(ee(Ce(t),qo(1)),a),je(Ce(u),r,i,c),pe(([[y,m],v,g,b,S])=>{let T=m&&b,w="auto";return T&&(w=Uj(v,g||S),T=T&&!!w),{followOutputBehavior:w,shouldFollow:T,totalCount:y}}),Se(({shouldFollow:y})=>y)),({followOutputBehavior:y,totalCount:m})=>{p&&(p(),p=null),p=Nn(e,()=>{Lt(l)("following output to ",{totalCount:m},tn.DEBUG),f(y),p=null})});function h(y){const m=Nn(n,v=>{y&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Lt(l)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(m,100)}return Ke(ee(Rt(Ce(u),t,s),Se(([y,,m])=>y&&m),In(({value:y},[,m])=>({refreshed:y===m,value:m}),{refreshed:!1,value:0}),Se(({refreshed:y})=>y),je(u,t)),([,y])=>{Lt(i)&&h(y!==!1)}),Ke(d,()=>{h(Lt(u)!==!1)}),Ke(Rt(Ce(u),n),([y,m])=>{y&&!m.atBottom&&m.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},st(zn,Sa,wa,Ta,Er,Sr,Wt)),Yj=We(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(xe(ee(s,je(i),Se(([,l])=>l!==0),je(o,r,t,n,e),pe(([[,l],c,u,d,p,f=[]])=>Dw(l,c,u,d,p,f))),a),{}),st(zn,Ta,oo,Er),{singleton:!0}),Kj=We(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=se(0);return Ke(ee(e,je(r),Se(([,o])=>o!==0),pe(([,o])=>({top:o}))),o=>{Nn(ee(n,qo(1),Se(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{_e(t,o)})})}),{initialScrollTop:r}},st(Er,Wt,oo),{singleton:!0}),Zj=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:a})=>t<a?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,Xj=We(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Ve();return xe(ee(u,je(t,l,n,i,o,r,s),je(e),pe(([[d,p,f,h,y,m,v,g],b])=>{const{align:S,behavior:T,calculateViewLocation:w=Zj,done:C,...R}=d,I=Iw(d,p,h-1),P=ra(I,p.offsetTree,b)+y+m,j=P+wn(p.sizeTree,I)[1],N=g+m,V=g+f-v,k=w({itemBottom:j,itemTop:P,locationParams:{align:S,behavior:T,...R},viewportBottom:V,viewportTop:N});return k?C&&Nn(ee(a,Se(M=>!M),qo(Lt(a)?1:2)),C):C&&C(),k}),Se(d=>d!==null)),c),{scrollIntoView:u}},st(zn,Wt,wa,oo,Sr),{singleton:!0}),Nw=We(([{scrollVelocity:e}])=>{const t=se(!1),n=Ve(),r=se(!1);return xe(ee(e,je(r,t,n),Se(([o,i])=>!!i),pe(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),it()),t),Ke(ee(Rt(t,e,n),je(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},st(Sa),{singleton:!0}),rp=We(([{scrollContainerState:e,scrollTo:t}])=>{const n=Ve(),r=Ve(),o=Ve(),i=se(!1),a=se(void 0);return xe(ee(Rt(n,r),pe(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),xe(ee(t,je(r),pe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},st(Wt)),Qj=We(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Ve(),u=se(void 0),d=se(null),p=se(null);return xe(s,d),xe(l,p),Ke(ee(c,je(t,r,a,d,p,n)),([f,h,y,m,v,g,b])=>{const S=Dj(h.sizeTree);m&&v!==null&&g!==null&&(y=v.scrollTop-g.offsetTop),y-=b,f({ranges:S,scrollTop:y})}),xe(ee(u,Se(Yf),pe(Jj)),o),xe(ee(i,je(u),Se(([,f])=>f!==void 0),it(),pe(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},st(zn,Wt,Ta,Er,rp));function Jj(e){return{align:"start",index:0,offset:e.scrollTop}}const eN=We(([{topItemsIndexes:e}])=>{const t=se(0);return xe(ee(t,Se(n=>n>=0),pe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},st(oo));function Fw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const tN=Fw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),nN=We(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:h}])=>{const y=en(ee(l,je(a),In(([,v,g,b],[{bottom:S,items:T,offsetBottom:w,totalCount:C},R])=>{const I=S+w;let P=0;return g===C&&v.length>0&&T.length>0&&(T[0].originalIndex===0&&v[0].originalIndex===0||(P=I-b,P!==0&&(P+=R))),[P,T,C,I]},[0,[],0,0]),Se(([v])=>v!==0),je(r,s,n,o,f,h),Se(([,v,g,b,,,S])=>!S&&!b&&v!==0&&g===oa),pe(([[v],,,,,g])=>(g("Upward scrolling compensation",{amount:v},tn.DEBUG),v))));function m(v){v>0?(_e(t,{behavior:"auto",top:-v}),_e(e,0)):(_e(e,0),_e(t,{behavior:"auto",top:-v}))}return Ke(ee(y,je(e,i)),([v,g,b])=>{b&&tN()?_e(e,g-v):m(-v)}),Ke(ee(Rt(Vt(i,!1),e,h),Se(([v,g,b])=>!v&&!b&&g!==0),pe(([v,g])=>g),lr(1)),m),xe(ee(d,pe(v=>({top:-v}))),t),Ke(ee(c,je(p,u),pe(([v,{groupIndices:g,lastSize:b,sizeTree:S},T])=>{function w(C){return C*(b+T)}if(g.length===0)return w(v);{let C=0;const R=ta(S,0);let I=0,P=0;for(;I<v;){I++,C+=R;let j=g.length===P+1?1/0:g[P+1]-g[P]-1;I+j>v&&(C-=R,j=v-I+1),I+=j,C+=w(j),P++}return C}})),v=>{_e(e,v),requestAnimationFrame(()=>{_e(t,{top:v}),requestAnimationFrame(()=>{_e(e,0),_e(h,!1)})})}),{deviation:e}},st(Wt,Sa,oo,zn,Sr,Qf)),rN=We(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),st(np,Yj,Er,Nw,jw,Kj,qj,rp,Xj,Sr)),Lw=We(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:h},y,m,v,{listState:g,topItemsIndexes:b,...S},{scrollToIndex:T},w,{topItemCount:C},{groupCounts:R},I])=>(xe(S.rangeChanged,I.scrollSeekRangeChanged),xe(ee(I.windowViewportRect,pe(P=>P.visibleHeight)),y.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:R,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:h,sizeRanges:s,topItemCount:C,topItemsIndexes:b,totalCount:u,...v,groupIndices:i,itemSize:a,listState:g,scrollToIndex:T,statefulTotalCount:c,trackItemSizes:d,...S,...I,...y,sizes:l,...m}),st(zn,Ta,Wt,Qj,Gj,oo,wa,nN,eN,Ow,rN));function oN(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const a in t)Object.hasOwn(r,a)||(n[a]=t[a]);return n}const Ha=typeof document<"u"?E.useLayoutEffect:E.useEffect;function op(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=E.createContext({});function l(m,v){m.propsReady&&_e(m.propsReady,!1);for(const g of r){const b=m[t.required[g]];_e(b,v[g])}for(const g of o)if(g in v){const b=m[t.optional[g]];_e(b,v[g])}m.propsReady&&_e(m.propsReady,!0)}function c(m){return i.reduce((v,g)=>(v[g]=b=>{const S=m[t.methods[g]];_e(S,b)},v),{})}function u(m){return a.reduce((v,g)=>(v[g]=bj(m[t.events[g]]),v),{})}const d=E.forwardRef((m,v)=>{const{children:g,...b}=m,[S]=E.useState(()=>yl(Tj(e),C=>{l(C,b)})),[T]=E.useState(Xg(u,S));Ha(()=>{for(const C of a)C in b&&Ke(T[C],b[C]);return()=>{Object.values(T).map(Kf)}},[b,T,S]),Ha(()=>{l(S,b)}),E.useImperativeHandle(v,Zg(c(S)));const w=n;return x.jsx(s.Provider,{value:S,children:n?x.jsx(w,{...oN([...r,...o,...a],b),children:g}):g})}),p=m=>E.useCallback(xw(_e,E.useContext(s)[m]),[m]),f=m=>{const v=E.useContext(s)[m],g=E.useCallback(b=>Ke(v,b),[v]);return E.useSyncExternalStore(g,()=>Lt(v),()=>Lt(v))},h=m=>{const v=E.useContext(s)[m],[g,b]=E.useState(Xg(Lt,v));return Ha(()=>Ke(v,S=>{S!==g&&b(Zg(S))}),[v,g]),g},y=E.version.startsWith("18")?f:h;return{Component:d,useEmitter:(m,v)=>{const g=E.useContext(s)[m];Ha(()=>Ke(g,v),[v,g])},useEmitterValue:y,usePublisher:p}}const wl=E.createContext(void 0),Vw=E.createContext(void 0),zw=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Jc(e){return"self"in e}function iN(e){return"body"in e}function $w(e,t,n,r=fi,o,i){const a=E.useRef(null),s=E.useRef(null),l=E.useRef(null),c=E.useCallback(p=>{let f,h,y;const m=p.target;if(iN(m)||Jc(m)){const g=Jc(m)?m:m.defaultView;y=i?g.scrollX:g.scrollY,f=i?g.document.documentElement.scrollWidth:g.document.documentElement.scrollHeight,h=i?g.innerWidth:g.innerHeight}else y=i?m.scrollLeft:m.scrollTop,f=i?m.scrollWidth:m.scrollHeight,h=i?m.offsetWidth:m.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(y,0),viewportHeight:h})};p.suppressFlushSync?v():ca.flushSync(v),s.current!==null&&(y===s.current||y<=0||y===f-h)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);E.useEffect(()=>{const p=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",c,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(p){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const h=p.behavior==="smooth";let y,m,v;Jc(f)?(m=Math.max(Tn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),y=i?f.innerWidth:f.innerHeight,v=i?window.scrollX:window.scrollY):(m=f[i?"scrollWidth":"scrollHeight"],y=Tn(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const g=m-y;if(p.top=Math.ceil(Math.max(Math.min(g,p.top),0)),Mw(y,m)||p.top===v){e({scrollHeight:m,scrollTop:v,viewportHeight:y}),h&&t(!0);return}h?(s.current=p.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),f.scrollTo(p)}function d(p){i&&(p={behavior:p.behavior,left:p.top}),a.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const eu="-webkit-sticky",lv="sticky",Bw=Fw(()=>{if(typeof document>"u")return lv;const e=document.createElement("div");return e.style.position=eu,e.style.position===eu?eu:lv});function ip(e){return e}const aN=We(()=>{const e=se(l=>`Item ${l}`),t=se(null),n=se(l=>`Group ${l}`),r=se({}),o=se(ip),i=se("div"),a=se(fi),s=(l,c=null)=>Vt(ee(r,pe(u=>u[l]),it()),c);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),sN=We(([e,t])=>({...e,...t}),st(Lw,aN)),lN=({height:e})=>x.jsx("div",{style:{height:e}}),cN={overflowAnchor:"none",position:Bw(),zIndex:1},Hw={overflowAnchor:"none"},uN={...Hw,display:"inline-block",height:"100%"},cv=E.memo(function({showTopList:e=!1}){const t=Re("listState"),n=sn("sizeRanges"),r=Re("useWindowScroll"),o=Re("customScrollParent"),i=sn("windowScrollContainerState"),a=sn("scrollContainerState"),s=o||r?i:a,l=Re("itemContent"),c=Re("context"),u=Re("groupContent"),d=Re("trackItemSizes"),p=Re("itemSize"),f=Re("log"),h=sn("gap"),y=Re("horizontalDirection"),{callbackRef:m}=ww(n,p,d,e?fi:s,f,h,o,y,Re("skipAnimationFrameInResizeObserver")),[v,g]=E.useState(0);lp("deviation",k=>{v!==k&&g(k)});const b=Re("EmptyPlaceholder"),S=Re("ScrollSeekPlaceholder")||lN,T=Re("ListComponent"),w=Re("ItemComponent"),C=Re("GroupComponent"),R=Re("computeItemKey"),I=Re("isSeeking"),P=Re("groupIndices").length>0,j=Re("alignToBottom"),N=Re("initialItemFinalLocationReached"),V=e?{}:{boxSizing:"border-box",...y?{display:"inline-block",height:"100%",marginLeft:v!==0?v:j?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:j?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...N?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?x.jsx(b,{...at(b,c)}):x.jsx(T,{...at(T,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:m,style:V,children:(e?t.topItems:t.items).map(k=>{const M=k.originalIndex,D=R(M+t.firstItemIndex,k.data,c);return I?E.createElement(S,{...at(S,c),height:k.size,index:k.index,key:D,type:k.type||"item",...k.type==="group"?{}:{groupIndex:k.groupIndex}}):k.type==="group"?E.createElement(C,{...at(C,c),"data-index":M,"data-item-index":k.index,"data-known-size":k.size,key:D,style:cN},u(k.index,c)):E.createElement(w,{...at(w,c),...Ww(w,k.data),"data-index":M,"data-item-group-index":k.groupIndex,"data-item-index":k.index,"data-known-size":k.size,key:D,style:y?uN:Hw},P?l(k.index,k.groupIndex,k.data,c):l(k.index,k.data,c))})})}),dN={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},fN={outline:"none",overflowX:"auto",position:"relative"},pi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),pN={position:Bw(),top:0,width:"100%",zIndex:1};function at(e,t){if(typeof e!="string")return{context:t}}function Ww(e,t){return{item:typeof e=="string"?void 0:t}}const hN=E.memo(function(){const e=Re("HeaderComponent"),t=sn("headerHeight"),n=Re("HeaderFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,Re("skipAnimationFrameInResizeObserver")),o=Re("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...at(e,o)})}):null}),mN=E.memo(function(){const e=Re("FooterComponent"),t=sn("footerHeight"),n=Re("HeaderFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,Re("skipAnimationFrameInResizeObserver")),o=Re("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...at(e,o)})}):null});function ap({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:h}=$w(a,l,s,c,void 0,d);return e("scrollTo",h),e("scrollBy",p),x.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?fN:dN,...o},tabIndex:0,...i,...at(s,u),children:r})})}function sp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),p=t("context"),f=E.useRef(null),h=t("scrollerRef"),{scrollByCallback:y,scrollerRef:m,scrollToCallback:v}=$w(a,l,s,h,d);return zw(()=>{var g;return m.current=d||((g=f.current)==null?void 0:g.ownerDocument.defaultView),()=>{m.current=null}},[m,d]),e("windowScrollTo",v),e("scrollBy",y),x.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...at(s,p),children:r})})}const gN=({children:e})=>{const t=E.useContext(wl),n=sn("viewportHeight"),r=sn("fixedItemHeight"),o=Re("alignToBottom"),i=Re("horizontalDirection"),a=E.useMemo(()=>Ji(n,l=>Tn(l,i?"width":"height")),[n,i]),s=Fn(a,!0,Re("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:s,style:pi(o),children:e})},vN=({children:e})=>{const t=E.useContext(wl),n=sn("windowViewportRect"),r=sn("fixedItemHeight"),o=Re("customScrollParent"),i=Xf(n,o,Re("skipAnimationFrameInResizeObserver")),a=Re("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.jsx("div",{"data-viewport-type":"window",ref:i,style:pi(a),children:e})},yN=({children:e})=>{const t=Re("TopItemListComponent")||"div",n=Re("headerHeight"),r={...pN,marginTop:`${n}px`},o=Re("context");return x.jsx(t,{style:r,...at(t,o),children:e})},xN=E.memo(function(e){const t=Re("useWindowScroll"),n=Re("topItemsIndexes").length>0,r=Re("customScrollParent"),o=Re("context"),i=r||t?TN:wN,a=r||t?vN:gN;return x.jsxs(i,{...e,...at(i,o),children:[n&&x.jsx(yN,{children:x.jsx(cv,{showTopList:!0})}),x.jsxs(a,{children:[x.jsx(hN,{}),x.jsx(cv,{}),x.jsx(mN,{})]})]})}),{Component:bN,useEmitter:lp,useEmitterValue:Re,usePublisher:sn}=op(sN,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{autoscrollToBottom:"autoscrollToBottom",getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupContent:"groupContent",groupCounts:"groupCounts",headerFooterTag:"HeaderFooterTag",horizontalDirection:"horizontalDirection",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},xN),wN=ap({useEmitter:lp,useEmitterValue:Re,usePublisher:sn}),TN=sp({useEmitter:lp,useEmitterValue:Re,usePublisher:sn}),cp=bN,SN=We(()=>{const e=se(l=>x.jsxs("td",{children:["Item $",l]})),t=se(null),n=se(null),r=se(null),o=se({}),i=se(ip),a=se(fi),s=(l,c=null)=>Vt(ee(o,pe(u=>u[l]),it()),c);return{components:o,computeItemKey:i,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),EN=We(([e,t])=>({...e,...t}),st(Lw,SN)),CN=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{height:e}})}),kN=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{border:0,height:e,padding:0}})}),RN={overflowAnchor:"none"},uv=E.memo(function({showTopList:e=!1}){const t=De("listState"),n=De("computeItemKey"),r=De("firstItemIndex"),o=De("isSeeking"),i=De("ScrollSeekPlaceholder")||CN,a=De("context"),s=De("TableRowComponent"),l=De("fixedHeaderHeight"),c=De("itemContent"),u=(e?t.topItems:[]).reduce((p,f,h)=>(h===0?p.push(f.size):p.push(p[h-1]+f.size),p),[]),d=(e?t.topItems:t.items).map(p=>{const f=p.originalIndex,h=n(f+r,p.data,a),y=e?f===0?0:u[f-1]:0;return o?E.createElement(i,{...at(i,a),height:p.size,index:p.index,key:h,type:p.type||"item"}):E.createElement(s,{...at(s,a),...Ww(s,p.data),"data-index":f,"data-item-index":p.index,"data-known-size":p.size,key:h,style:e?{overflowAnchor:"none",position:"sticky",top:l+y,zIndex:2}:RN},c(p.index,p.data,a))});return x.jsx(x.Fragment,{children:d})}),PN=E.memo(function(){const e=De("listState"),t=De("topItemsIndexes").length>0,n=xn("sizeRanges"),r=De("useWindowScroll"),o=De("customScrollParent"),i=xn("windowScrollContainerState"),a=xn("scrollContainerState"),s=o||r?i:a,l=De("trackItemSizes"),c=De("itemSize"),u=De("log"),{callbackRef:d,ref:p}=ww(n,c,l,s,u,void 0,o,!1,De("skipAnimationFrameInResizeObserver")),[f,h]=E.useState(0);up("deviation",P=>{f!==P&&(p.current.style.marginTop=`${P}px`,h(P))});const y=De("EmptyPlaceholder"),m=De("FillerRow")||kN,v=De("TableBodyComponent"),g=De("paddingTopAddition"),b=De("statefulTotalCount"),S=De("context");if(b===0&&y)return x.jsx(y,{...at(y,S)});const T=(t?e.topItems:[]).reduce((P,j)=>P+j.size,0),w=e.offsetTop+g+f-T,C=e.offsetBottom,R=w>0?x.jsx(m,{context:S,height:w},"padding-top"):null,I=C>0?x.jsx(m,{context:S,height:C},"padding-bottom"):null;return x.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...at(v,S),children:[R,t&&x.jsx(uv,{showTopList:!0}),x.jsx(uv,{}),I]})}),AN=({children:e})=>{const t=E.useContext(wl),n=xn("viewportHeight"),r=xn("fixedItemHeight"),o=Fn(E.useMemo(()=>Ji(n,i=>Tn(i,"height")),[n]),!0,De("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:o,style:pi(!1),children:e})},IN=({children:e})=>{const t=E.useContext(wl),n=xn("windowViewportRect"),r=xn("fixedItemHeight"),o=De("customScrollParent"),i=Xf(n,o,De("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.jsx("div",{"data-viewport-type":"window",ref:i,style:pi(!1),children:e})},ON=E.memo(function(e){const t=De("useWindowScroll"),n=De("customScrollParent"),r=xn("fixedHeaderHeight"),o=xn("fixedFooterHeight"),i=De("fixedHeaderContent"),a=De("fixedFooterContent"),s=De("context"),l=Fn(E.useMemo(()=>Ji(r,v=>Tn(v,"height")),[r]),!0,De("skipAnimationFrameInResizeObserver")),c=Fn(E.useMemo(()=>Ji(o,v=>Tn(v,"height")),[o]),!0,De("skipAnimationFrameInResizeObserver")),u=n||t?DN:MN,d=n||t?IN:AN,p=De("TableComponent"),f=De("TableHeadComponent"),h=De("TableFooterComponent"),y=i?x.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...at(f,s),children:i()},"TableHead"):null,m=a?x.jsx(h,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...at(h,s),children:a()},"TableFoot"):null;return x.jsx(u,{...e,...at(u,s),children:x.jsx(d,{children:x.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...at(p,s),children:[y,x.jsx(PN,{},"TableBody"),m]})})})}),{Component:_N,useEmitter:up,useEmitterValue:De,usePublisher:xn}=op(EN,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedFooterContent:"fixedFooterContent",fixedHeaderContent:"fixedHeaderContent",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupCounts:"groupCounts",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},ON),MN=ap({useEmitter:up,useEmitterValue:De,usePublisher:xn}),DN=sp({useEmitter:up,useEmitterValue:De,usePublisher:xn}),jN=_N,dv={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},NN={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:fv,floor:As,max:Fi,min:tu,round:pv}=Math;function hv(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function FN(e){return{...NN,items:e}}function Wa(e,t){return e&&e.width===t.width&&e.height===t.height}function LN(e,t){return e&&e.column===t.column&&e.row===t.row}const VN=We(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:h,propsReady:y},{customScrollParent:m,useWindowScroll:v,windowScrollContainerState:g,windowScrollTo:b,windowViewportRect:S},T])=>{const w=se(0),C=se(0),R=se(dv),I=se({height:0,width:0}),P=se({height:0,width:0}),j=Ve(),N=Ve(),V=se(0),k=se(null),M=se({column:0,row:0}),D=Ve(),L=Ve(),_=se(!1),z=se(0),O=se(!0),B=se(!1),Q=se(!1);Ke(ee(h,je(z),Se(([F,W])=>!!W)),()=>{_e(O,!1)}),Ke(ee(Rt(h,O,P,I,z,B),Se(([F,W,Z,oe,,$])=>F&&!W&&Z.height!==0&&oe.height!==0&&!$)),([,,,,F])=>{_e(B,!0),ep(1,()=>{_e(j,F)}),Nn(ee(c),()=>{_e(t,[0,0]),_e(O,!0)})}),xe(ee(L,Se(F=>F!=null&&F.scrollTop>0),Cn(0)),C),Ke(ee(h,je(L),Se(([,F])=>F!=null)),([,F])=>{F&&(_e(I,F.viewport),_e(P,F.item),_e(M,F.gap),F.scrollTop>0&&(_e(_,!0),Nn(ee(c,qo(1)),W=>{_e(_,!1)}),_e(l,{top:F.scrollTop})))}),xe(ee(I,pe(({height:F})=>F)),d),xe(ee(Rt(Ce(I,Wa),Ce(P,Wa),Ce(M,(F,W)=>F&&F.column===W.column&&F.row===W.row),Ce(c)),pe(([F,W,Z,oe])=>({gap:Z,item:W,scrollTop:oe,viewport:F}))),D),xe(ee(Rt(Ce(w),r,Ce(M,LN),Ce(P,Wa),Ce(I,Wa),Ce(k),Ce(C),Ce(_),Ce(O),Ce(z)),Se(([,,,,,,,F])=>!F),pe(([F,[W,Z],oe,$,ye,ke,Ae,,Ie,G])=>{const{column:ae,row:ie}=oe,{height:X,width:ue}=$,{width:ge}=ye;if(Ae===0&&(F===0||ge===0))return dv;if(ue===0){const fn=tp(G,F),Sn=fn+Math.max(Ae-1,0);return FN(hv(fn,Sn,ke))}const be=qw(ge,ue,ae);let te,le;Ie?W===0&&Z===0&&Ae>0?(te=0,le=Ae-1):(te=be*As((W+ie)/(X+ie)),le=be*fv((Z+ie)/(X+ie))-1,le=tu(F-1,Fi(le,be-1)),te=tu(le,Fi(0,te))):(te=0,le=-1);const Me=hv(te,le,ke),{bottom:Ge,top:xt}=mv(ye,oe,$,Me),ct=fv(F/be),_t=ct*X+(ct-1)*ie-Ge;return{bottom:Ge,itemHeight:X,items:Me,itemWidth:ue,offsetBottom:_t,offsetTop:xt,top:xt}})),R),xe(ee(k,Se(F=>F!==null),pe(F=>F.length)),w),xe(ee(Rt(I,P,R,M),Se(([F,W,{items:Z}])=>Z.length>0&&W.height!==0&&F.height!==0),pe(([F,W,{items:Z},oe])=>{const{bottom:$,top:ye}=mv(F,oe,W,Z);return[ye,$]}),it(na)),t);const re=se(!1);xe(ee(c,je(re),pe(([F,W])=>W||F!==0)),re);const J=en(ee(Rt(R,w),Se(([{items:F}])=>F.length>0),je(re),Se(([[F,W],Z])=>{const oe=F.items[F.items.length-1].index===W-1;return(Z||F.bottom>0&&F.itemHeight>0&&F.offsetBottom===0&&F.items.length===W)&&oe}),pe(([[,F]])=>F-1),it())),K=en(ee(Ce(R),Se(({items:F})=>F.length>0&&F[0].index===0),Cn(0),it())),U=en(ee(Ce(R),je(_),Se(([{items:F},W])=>F.length>0&&!W),pe(([{items:F}])=>({endIndex:F[F.length-1].index,startIndex:F[0].index})),it(Rw),lr(0)));xe(U,f.scrollSeekRangeChanged),xe(ee(j,je(I,P,w,M),pe(([F,W,Z,oe,$])=>{const ye=_w(F),{align:ke,behavior:Ae,offset:Ie}=ye;let G=ye.index;G==="LAST"&&(G=oe-1),G=Fi(0,G,tu(oe-1,G));let ae=pd(W,$,Z,G);return ke==="end"?ae=pv(ae-W.height+Z.height):ke==="center"&&(ae=pv(ae-W.height/2+Z.height/2)),Ie&&(ae+=Ie),{behavior:Ae,top:ae}})),l);const Y=Vt(ee(R,pe(F=>F.offsetBottom+F.bottom)),0);return xe(ee(S,pe(F=>({height:F.visibleHeight,width:F.visibleWidth}))),I),{customScrollParent:m,data:k,deviation:V,footerHeight:o,gap:M,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:P,overscan:n,restoreStateFrom:L,scrollBy:a,scrollContainerState:s,scrollHeight:N,scrollTo:l,scrollToIndex:j,scrollTop:c,smoothScrollTargetReached:u,totalCount:w,useWindowScroll:v,viewportDimensions:I,windowScrollContainerState:g,windowScrollTo:b,windowViewportRect:S,...f,gridState:R,horizontalDirection:Q,initialTopMostItemIndex:z,totalListHeight:Y,...p,endReached:J,propsReady:y,rangeChanged:U,startReached:K,stateChanged:D,stateRestoreInProgress:_,...T}},st(np,Wt,Sa,Nw,Er,rp,Sr));function qw(e,t,n){return Fi(1,As((e+n)/(As(t)+n)))}function mv(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=pd(e,t,n,r[0].index);return{bottom:pd(e,t,n,r[r.length-1].index)+o,top:i}}function pd(e,t,n,r){const o=qw(e.width,n.width,t.column),i=As(r/o),a=i*n.height+Fi(0,i-1)*t.row;return a>0?a+t.row:a}const zN=We(()=>{const e=se(d=>`Item ${d}`),t=se({}),n=se(null),r=se("virtuoso-grid-item"),o=se("virtuoso-grid-list"),i=se(ip),a=se("div"),s=se(fi),l=(d,p=null)=>Vt(ee(t,pe(f=>f[d]),it()),p),c=se(!1),u=se(!1);return xe(Ce(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),$N=We(([e,t])=>({...e,...t}),st(VN,zN)),BN=E.memo(function(){const e=lt("gridState"),t=lt("listClassName"),n=lt("itemClassName"),r=lt("itemContent"),o=lt("computeItemKey"),i=lt("isSeeking"),a=ln("scrollHeight"),s=lt("ItemComponent"),l=lt("ListComponent"),c=lt("ScrollSeekPlaceholder"),u=lt("context"),d=ln("itemDimensions"),p=ln("gap"),f=lt("log"),h=lt("stateRestoreInProgress"),y=ln("reportReadyState"),m=Fn(E.useMemo(()=>v=>{const g=v.parentElement.parentElement.scrollHeight;a(g);const b=v.firstChild;if(b){const{height:S,width:T}=b.getBoundingClientRect();d({height:S,width:T})}p({column:gv("column-gap",getComputedStyle(v).columnGap,f),row:gv("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return zw(()=>{e.itemHeight>0&&e.itemWidth>0&&y(!0)},[e]),h?null:x.jsx(l,{className:t,ref:m,...at(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const g=o(v.index,v.data,u);return i?x.jsx(c,{...at(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},g):E.createElement(s,{...at(s,u),className:n,"data-index":v.index,key:g},r(v.index,v.data,u))})})}),HN=E.memo(function(){const e=lt("HeaderComponent"),t=ln("headerHeight"),n=lt("headerFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,!1),o=lt("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...at(e,o)})}):null}),WN=E.memo(function(){const e=lt("FooterComponent"),t=ln("footerHeight"),n=lt("headerFooterTag"),r=Fn(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,!1),o=lt("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...at(e,o)})}):null}),qN=({children:e})=>{const t=E.useContext(Vw),n=ln("itemDimensions"),r=ln("viewportDimensions"),o=Fn(E.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return E.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),x.jsx("div",{ref:o,style:pi(!1),children:e})},UN=({children:e})=>{const t=E.useContext(Vw),n=ln("windowViewportRect"),r=ln("itemDimensions"),o=lt("customScrollParent"),i=Xf(n,o,!1);return E.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),x.jsx("div",{ref:i,style:pi(!1),children:e})},GN=E.memo(function({...e}){const t=lt("useWindowScroll"),n=lt("customScrollParent"),r=n||t?KN:YN,o=n||t?UN:qN,i=lt("context");return x.jsx(r,{...e,...at(r,i),children:x.jsxs(o,{children:[x.jsx(HN,{}),x.jsx(BN,{}),x.jsx(WN,{})]})})}),{useEmitter:Uw,useEmitterValue:lt,usePublisher:ln}=op($N,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",isScrolling:"isScrolling",rangeChanged:"rangeChanged",readyStateChanged:"readyStateChanged",startReached:"startReached",stateChanged:"stateChanged"},methods:{scrollBy:"scrollBy",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",headerFooterTag:"headerFooterTag",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",itemClassName:"itemClassName",itemContent:"itemContent",listClassName:"listClassName",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",totalCount:"totalCount",useWindowScroll:"useWindowScroll"}},GN),YN=ap({useEmitter:Uw,useEmitterValue:lt,usePublisher:ln}),KN=sp({useEmitter:Uw,useEmitterValue:lt,usePublisher:ln});function gv(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}const ZN=()=>{const e=E.useContext(oi);return e?e.tweaks:cl},Gw=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>x.jsxs("div",{className:ze("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:x.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[i,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(vw,{as:"button",type:"button","aria-description":r,title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(Ab,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:x.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?x.jsxs(E.Fragment,{children:[x.jsx(Rb,{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(LP,{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]}),Ea=E.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:p="",name:f,title:h,componentName:y,placeholder:m,hideLeft:v=!1,required:g,disabled:b,reportStatus:S},T)=>{const w=ZN(),C=S!==void 0?S:w.input.iconFeedback,R=d??f,I=Ot(),P=e??I.inputOptionalLabel;return x.jsxs("fieldset",{ref:T,form:u,disabled:b,"data-error":!!c,"aria-disabled":b,"data-component":y,"data-interactive":!!i,className:ze("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[x.jsxs("label",{form:u,htmlFor:R,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[x.jsx(Gw,{info:s,hideLeft:v,reportStatus:C,title:h,placeholder:m,children:P||n?x.jsxs(E.Fragment,{children:[g?null:x.jsx("span",{"aria-disabled":b,className:"text-opacity-70 aria-disabled:text-disabled",children:P}),n?x.jsx(E.Fragment,{children:n}):null]}):null}),x.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${p}`,children:[t?x.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?x.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),x.jsx("p",{className:"mt-input-gap hidden flex-shrink-0 flex-grow-0 whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:inline-block group-error:inline-block group-error:text-danger",children:c}),x.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),XN=e=>x.jsx(E.Fragment,{children:e.children}),QN={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},JN={caseSensitive:!1,sort:!1},eF=[],tF=E.forwardRef(function(t,n){return x.jsx(vt.ul,{...t,ref:n,className:"w-full rounded-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(vr,{children:t.children})})}),nF=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(vt.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),rF={List:tF,Item:nF},ho=320,nu=40,oF=E.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,emptyMessage:o,interactive:i,rightLabel:a,optionalText:s,container:l,hideLeft:c=!1,right:u,left:d,error:p,required:f=!1,...h},y)=>{const m=E.useRef(null),v=E.useRef(null),g=h.value??h.defaultValue??"",b=Ot(),[S,T]=E.useState(()=>Math.min(ho,nu*e.length)),[w,C]=E.useState(!1),[R,I]=E.useState(""),[P,j]=E.useState(g),[N,V]=E.useState(()=>{var G;return((G=e.find(ae=>ae.value===g))==null?void 0:G.label)??g}),[k,M]=E.useState(null),D=E.useRef(eF),L=t&&R!==""?[{value:R,label:R,"data-dynamic":"true"},...e]:e,_=new Lr(L,["value","label"],JN).search(R),z=()=>{C(!1),T(0)},O=_.filter(G=>G.hidden!==!0),B=t?void 0:`^(${e.map(G=>`${Ku(G.value)}${G.label?"|"+Ku(G.label):""}`).join("|")})$`;E.useEffect(()=>{if(h.value){const G=e.find(ae=>ae.value===h.value);j((G==null?void 0:G.label)??h.value)}},[h.value]),E.useEffect(()=>{w||T(0)},[w]),E.useEffect(()=>{if(!w)return;const G=K.floating;if(G.current===null)return;let ae=0;Array.from(G.current.querySelectorAll("li")).slice(0,Math.min(_.length,10)).forEach(ue=>{const ge=ue.getBoundingClientRect();ae+=ge.height});const X=Math.min(ae,ho);T(X)},[R,w]);const{x:Q,y:re,strategy:J,refs:K,context:U}=to({open:w,transform:!0,strategy:"absolute",onOpenChange:C,whileElementsMounted:va,middleware:[ya(4),X0({padding:10,elementContext:"reference",apply(G){var ge;const ae=(ge=m.current)==null?void 0:ge.getBoundingClientRect().width,ie=G.elements.floating.querySelector("ul"),X=(ie==null?void 0:ie.getBoundingClientRect().height)||0,ue=Math.min(X<nu?ho:X,ho);ca.flushSync(()=>setTimeout(()=>{const be=(ie==null?void 0:ie.getBoundingClientRect().height)??0;return be<nu?void T(ue):void T(Math.min(be,ho))},50)),Object.assign(G.elements.floating.style,{width:`${ae}px`,maxWidth:`${ae}px`,maxHeight:`${ho}`})}})]}),Y=pw(U,QN),{getReferenceProps:F,getFloatingProps:W,getItemProps:Z}=no([ro(U,{role:"listbox"}),eo(U),Gf(U,{cols:0,listRef:D,loop:!0,virtual:!0,allowEscape:!0,activeIndex:k,selectedIndex:k,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:G=>M(ae=>G??ae)})]);E.useEffect(()=>{const G=K.reference.current;if(G)return ua(G)},[]);const oe=(G,ae)=>{j(G.value);const ie=K.reference.current;if(!ie)return;ie==null||ie.setAttribute("data-value",G.value),ie.value=G.value;const X=new Event("change",{bubbles:!1,cancelable:!0});ie.dispatchEvent(X),h.onChange&&h.onChange(X),V(G.label??""),z(),I(""),M(ae)},$=G=>{var ie;const ae=G.target.value;return I(ae),!w&&ae===""?C(!0):(G.target.name=h.name||"",ae?C(!0):(ie=h.onChange)==null?void 0:ie.call(h,G))},ye=()=>{var G;C(!0),I(""),(G=K.reference.current)==null||G.focus()},ke=()=>{C(!0),I("")},Ae=()=>{var G;(G=K.reference.current)==null||G.setAttribute("data-value",""),I(""),j(""),V(""),_y(K.reference.current),z()},Ie=h.id||h.name;return x.jsxs(Ea,{...h,left:d,error:p,ref:m,form:h.form,name:h.name,feedback:n,hideLeft:c,required:f,title:h.title,container:l,rightLabel:a,interactive:i,id:h.name||h.id,optionalText:s,componentName:"autocomplete",labelClassName:r,placeholder:h.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[u,x.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:ye,children:[x.jsx(gf,{size:20}),x.jsx("span",{className:"sr-only",children:b.inputCaretDown})]}),P?x.jsx("button",{type:"button",onClick:Ae,className:"p-2 transition-colors link:text-danger md:p-1",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",{"data-shadow":"true",...F({...h,onChange:$,onFocus:ke,pattern:B,ref:K.setReference,name:`${Ie}-shadow`,id:`${Ie}-shadow`,onClick:G=>G.currentTarget.focus(),onKeyDown(G){var ae,ie;if(G.key==="ArrowDown"){let X=k+1;return X>_.length-1&&(X=0),(ae=v.current)==null||ae.scrollIntoView({index:X}),M(X)}if(G.key==="ArrowUp"){let X=k-1;return X<0&&(X=_.length-1),(ie=v.current)==null||ie.scrollIntoView({index:X}),M(X)}if(G.key==="Escape")return G.currentTarget.blur(),z();if(G.key==="Enter"){if(k!==null&&_[k])return G.preventDefault(),oe(_[k],k);if(_.length===1)return G.preventDefault(),oe(_[0],0)}}}),"data-value":P,"data-error":!!p,"data-name":Ie,"data-target":Ie,required:f,value:w?R:N||P,"aria-autocomplete":"list",autoComplete:"off",className:ze("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",h.className)}),x.jsx("input",{id:Ie,name:Ie,type:"hidden","data-origin":Ie,ref:y,required:f,defaultValue:h.value||P||void 0}),x.jsx(Jr,{preserveTabOrder:!0,children:w?x.jsx(ci,{guards:!0,returnFocus:!1,context:U,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("ul",{...W({ref:K.setFloating,style:{...Y.styles,position:J,left:(Q??0)+(P?36:25),top:re??0}}),"data-floating":"true",className:"isolate z-floating m-0 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[_.length===0?x.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:o||b.autocompleteEmpty})}):null,x.jsx(cp,{ref:v,data:O,components:rF,hidden:O.length===0,className:"rounded-lg border-floating-border bg-floating-background p-0 text-foreground",style:{height:S},itemContent:(G,ae)=>{const ie=ae.Render??XN,X=P===ae.value||P===ae.label,ue=k===G,ge=ae.label??ae.value;return x.jsx("button",{"data-value":ae.value,...Z({ref:be=>void(D.current[G]=be),role:"option",type:"button","aria-checked":X,"aria-current":X,"aria-selected":X,"aria-busy":ae.disabled,onClick:()=>oe(ae,G),className:`cursor-pointer w-full p-2 text-left ${X?"bg-primary-hover text-primary-foreground":""} ${ue?"bg-floating-hover text-floating-foreground":""}`}),children:x.jsx(ie,{...h,label:ae.label,value:ae.value,children:ge})})}})]})}):null})]})}),dp=E.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:i,container:a,...s},l)=>x.jsxs("label",{"data-task":t,"data-component":"checkbox","data-disabled":s.disabled,"aria-disabled":s.disabled,className:ze("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",a),children:[x.jsx("input",{...s,ref:l,type:"checkbox","data-task":t,className:ze("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",o)}),e,x.jsx("span",{"data-name":"checkbox-label",className:ze("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),Yw=(e,t,n,r)=>E.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:h="text",labelClassName:y,feedback:m=null,hideLeft:v=!1,...g},b)=>{const S=e,T=g.id??g.name,w=E.useRef(null);return E.useEffect(()=>{if(w.current===null)return;const C=w.current,R=ua(w.current),I=r==null?void 0:r(C),P=j=>{const N=j;if(N.key==="Enter"&&C.enterKeyHint==="next"){const V=C.getAttribute("data-next");if(V){const k=document.getElementById(V);if(k)return k.focus(),void N.preventDefault()}}};return C.addEventListener("keydown",P),()=>{I==null||I(),R(),C.removeEventListener("keydown",P)}},[]),x.jsx(Ea,{...n,info:i,left:a,error:l,right:c,form:g.form,name:g.name,feedback:m,hideLeft:v,title:g.title,container:u,rightLabel:d,disabled:g.disabled,interactive:p,required:g.required,componentName:t,id:g.name||g.id,optionalText:f,labelClassName:y,placeholder:g.placeholder,children:x.jsx(S,{...n,...g,id:T,name:T,type:h,"data-next":s,"aria-busy":g.disabled,"aria-disabled":g.disabled,"aria-readonly":g.readOnly,ref:Dd(b,w),className:ze("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",g.className)})})}),Ca=Yw(Xb,"input",{type:"text"}),vv=new Date(1970,11,31),ru={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},yv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},iF={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")},ou=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},aF=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=kf(t),l=E.useId(),c=Ot(),u=E.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=E.useState(e||void 0),[f,h]=E.useState(!1),y=ou(u,vv).flatMap(C=>ht.keyof(ru,C.type)?ru[C.type](C.value):[]),m=ou(u,vv).reduce((C,R)=>C+(ht.keyof(yv,R.type)?yv[R.type](R.value):""),""),[v,g]=E.useState(d?ou(u,d).reduce((C,R)=>C+(ht.keyof(ru,R.type)?iF[R.type](d,R.value):""),""):""),b=C=>{const R=C.target.value;if(g(R),y.length===R.length&&y.every((P,j)=>{const N=R.charAt(j);return typeof P=="string"?N===P:P.test(N)})){const P=Fo(uO(R,m,new Date));return p(P),r==null?void 0:r(P)}return p(void 0),r==null?void 0:r(void 0)},S=C=>(p(C),r==null||r(C),g(C?uI(C,m):"")),T=Db(d),w=T?d.toISOString():void 0;return x.jsx(Ca,{...i,mask:y,value:v,id:void 0,name:void 0,className:"uppercase","data-value":w,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:b,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??m,right:x.jsxs(E.Fragment,{children:[x.jsx("input",{"data-origin":i.name,defaultValue:w,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),x.jsx(ui,{open:f,onChange:h,trigger:x.jsxs("span",{"aria-labelledby":l,children:[x.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),x.jsx(OP,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(a0,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:T?d:void 0})})]})})}),sF=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],lF=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],cF=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],uF=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],xv=(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 bv(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?uF:cF:t.binary?lF:sF,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){const u=xv(e,t.locale,a);return i+u+r+n[0]}const s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,a||(e=e.toPrecision(3));const l=xv(Number(e),t.locale,a),c=n[s];return i+l+r+c}var qa={exports:{}},Ua={exports:{}},qe={};/** @license React v16.13.1
|
|
213
173
|
* react-is.production.min.js
|
|
214
174
|
*
|
|
215
175
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
216
176
|
*
|
|
217
177
|
* This source code is licensed under the MIT license found in the
|
|
218
178
|
* LICENSE file in the root directory of this source tree.
|
|
219
|
-
*/var
|
|
179
|
+
*/var wv;function dF(){if(wv)return qe;wv=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=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,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(T){if(typeof T=="object"&&T!==null){var w=T.$$typeof;switch(w){case t:switch(T=T.type,T){case l:case c:case r:case i:case o:case d:return T;default:switch(T=T&&T.$$typeof,T){case s:case u:case h:case f:case a:return T;default:return w}}case n:return w}}}function S(T){return b(T)===c}return qe.AsyncMode=l,qe.ConcurrentMode=c,qe.ContextConsumer=s,qe.ContextProvider=a,qe.Element=t,qe.ForwardRef=u,qe.Fragment=r,qe.Lazy=h,qe.Memo=f,qe.Portal=n,qe.Profiler=i,qe.StrictMode=o,qe.Suspense=d,qe.isAsyncMode=function(T){return S(T)||b(T)===l},qe.isConcurrentMode=S,qe.isContextConsumer=function(T){return b(T)===s},qe.isContextProvider=function(T){return b(T)===a},qe.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},qe.isForwardRef=function(T){return b(T)===u},qe.isFragment=function(T){return b(T)===r},qe.isLazy=function(T){return b(T)===h},qe.isMemo=function(T){return b(T)===f},qe.isPortal=function(T){return b(T)===n},qe.isProfiler=function(T){return b(T)===i},qe.isStrictMode=function(T){return b(T)===o},qe.isSuspense=function(T){return b(T)===d},qe.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===i||T===o||T===d||T===p||typeof T=="object"&&T!==null&&(T.$$typeof===h||T.$$typeof===f||T.$$typeof===a||T.$$typeof===s||T.$$typeof===u||T.$$typeof===m||T.$$typeof===v||T.$$typeof===g||T.$$typeof===y)},qe.typeOf=b,qe}var Ue={};/** @license React v16.13.1
|
|
220
180
|
* react-is.development.js
|
|
221
181
|
*
|
|
222
182
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
223
183
|
*
|
|
224
184
|
* This source code is licensed under the MIT license found in the
|
|
225
185
|
* LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/var
|
|
186
|
+
*/var Tv;function fF(){return Tv||(Tv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=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,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b($){return typeof $=="string"||typeof $=="function"||$===r||$===c||$===i||$===o||$===d||$===p||typeof $=="object"&&$!==null&&($.$$typeof===h||$.$$typeof===f||$.$$typeof===a||$.$$typeof===s||$.$$typeof===u||$.$$typeof===m||$.$$typeof===v||$.$$typeof===g||$.$$typeof===y)}function S($){if(typeof $=="object"&&$!==null){var ye=$.$$typeof;switch(ye){case t:var ke=$.type;switch(ke){case l:case c:case r:case i:case o:case d:return ke;default:var Ae=ke&&ke.$$typeof;switch(Ae){case s:case u:case h:case f:case a:return Ae;default:return ye}}case n:return ye}}}var T=l,w=c,C=s,R=a,I=t,P=u,j=r,N=h,V=f,k=n,M=i,D=o,L=d,_=!1;function z($){return _||(_=!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.")),O($)||S($)===l}function O($){return S($)===c}function B($){return S($)===s}function Q($){return S($)===a}function re($){return typeof $=="object"&&$!==null&&$.$$typeof===t}function J($){return S($)===u}function K($){return S($)===r}function U($){return S($)===h}function Y($){return S($)===f}function F($){return S($)===n}function W($){return S($)===i}function Z($){return S($)===o}function oe($){return S($)===d}Ue.AsyncMode=T,Ue.ConcurrentMode=w,Ue.ContextConsumer=C,Ue.ContextProvider=R,Ue.Element=I,Ue.ForwardRef=P,Ue.Fragment=j,Ue.Lazy=N,Ue.Memo=V,Ue.Portal=k,Ue.Profiler=M,Ue.StrictMode=D,Ue.Suspense=L,Ue.isAsyncMode=z,Ue.isConcurrentMode=O,Ue.isContextConsumer=B,Ue.isContextProvider=Q,Ue.isElement=re,Ue.isForwardRef=J,Ue.isFragment=K,Ue.isLazy=U,Ue.isMemo=Y,Ue.isPortal=F,Ue.isProfiler=W,Ue.isStrictMode=Z,Ue.isSuspense=oe,Ue.isValidElementType=b,Ue.typeOf=S}()),Ue}var Sv;function Kw(){return Sv||(Sv=1,process.env.NODE_ENV==="production"?Ua.exports=dF():Ua.exports=fF()),Ua.exports}/*
|
|
227
187
|
object-assign
|
|
228
188
|
(c) Sindre Sorhus
|
|
229
189
|
@license MIT
|
|
230
|
-
*/var
|
|
231
|
-
Valid keys: `+JSON.stringify(Object.keys(_),null," "));var U=ue(B,Q,ee,G,F+"."+Q,n);if(U)return U}return null}return v($)}function P(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(P);if(_===null||a(_))return!0;var $=d(_);if($){var K=$.call(_),re;if($!==_.entries){for(;!(re=K.next()).done;)if(!P(re.value))return!1}else for(;!(re=K.next()).done;){var ee=re.value;if(ee&&!P(ee[1]))return!1}}else return!1;return!0;default:return!1}}function O(_,$){return _==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function j(_){var $=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":O($,_)?"symbol":$}function D(_){if(typeof _>"u"||_===null)return""+_;var $=j(_);if($==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return $}function V(_){var $=D(_);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function H(_){return!_.constructor||!_.constructor.name?f:_.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},zc}var Hc,qg;function tF(){if(qg)return Hc;qg=1;var e=th();function t(){}function n(){}return n.resetWarningCache=t,Hc=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},Hc}if(process.env.NODE_ENV!=="production"){var nF=fw(),rF=!0;qu.exports=eF()(nF.isElement,rF)}else qu.exports=tF()();var oF=qu.exports;const Ge=e1(oF);var sF=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 ji(e,t){var n=iF(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 iF(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=sF.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var aF=[".DS_Store","Thumbs.db"];function lF(e){return gs(this,void 0,void 0,function(){return ys(this,function(t){return Za(e)&&cF(e.dataTransfer)?[2,hF(e.dataTransfer,e.type)]:uF(e)?[2,dF(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,fF(e)]:[2,[]]})})}function cF(e){return Za(e)}function uF(e){return Za(e)&&Za(e.target)}function Za(e){return typeof e=="object"&&e!==null}function dF(e){return Ku(e.target.files).map(function(t){return ji(t)})}function fF(e){return gs(this,void 0,void 0,function(){var t;return ys(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 ji(r)})]}})})}function hF(e,t){return gs(this,void 0,void 0,function(){var n,r;return ys(this,function(o){switch(o.label){case 0:return e.items?(n=Ku(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(mF))]):[3,2];case 1:return r=o.sent(),[2,Kg(mw(r))];case 2:return[2,Kg(Ku(e.files).map(function(s){return ji(s)}))]}})})}function Kg(e){return e.filter(function(t){return aF.indexOf(t.name)===-1})}function Ku(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function mF(e){if(typeof e.webkitGetAsEntry!="function")return Zg(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?pw(t):Zg(e)}function mw(e){return e.reduce(function(t,n){return Bu(Bu([],ug(t),!1),ug(Array.isArray(n)?mw(n):[n]),!1)},[])}function Zg(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=ji(t);return Promise.resolve(n)}function pF(e){return gs(this,void 0,void 0,function(){return ys(this,function(t){return[2,e.isDirectory?pw(e):gF(e)]})})}function pw(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return gs(i,void 0,void 0,function(){var l,c,u;return ys(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(pF)),o.push(u),s(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function gF(e){return gs(this,void 0,void 0,function(){return ys(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=ji(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var yF=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 Xg(e){return xF(e)||bF(e)||yw(e)||vF()}function vF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
232
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
233
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
234
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
235
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sw(e,t){if(e){if(typeof e=="string")return Xu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xu(e,t)}}function Xu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qF(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 KF(e){if(Array.isArray(e))return e}function ry(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 tt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ry(Object(n),!0).forEach(function(r){Qu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ry(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qa(e,t){if(e==null)return{};var n=ZF(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 ZF(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 nh=x.forwardRef(function(e,t){var n=e.children,r=Qa(e,VF),o=Ew(r),s=o.open,i=Qa(o,$F);return x.useImperativeHandle(t,function(){return{open:s}},[s]),x.createElement(x.Fragment,null,n(tt(tt({},i),{},{open:s})))});nh.displayName="Dropzone";var Tw={disabled:!1,getFilesFromEvent:lF,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};nh.defaultProps=Tw;nh.propTypes={children:Ge.func,accept:Ge.objectOf(Ge.arrayOf(Ge.string)),multiple:Ge.bool,preventDropOnDocument:Ge.bool,noClick:Ge.bool,noKeyboard:Ge.bool,noDrag:Ge.bool,noDragEventsBubbling:Ge.bool,minSize:Ge.number,maxSize:Ge.number,maxFiles:Ge.number,disabled:Ge.bool,getFilesFromEvent:Ge.func,onFileDialogCancel:Ge.func,onFileDialogOpen:Ge.func,useFsAccessApi:Ge.bool,autoFocus:Ge.bool,onDragEnter:Ge.func,onDragLeave:Ge.func,onDragOver:Ge.func,onDrop:Ge.func,onDropAccepted:Ge.func,onDropRejected:Ge.func,onError:Ge.func,validator:Ge.func};var Ju={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Ew(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=tt(tt({},Tw),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,v=t.onFileDialogOpen,b=t.useFsAccessApi,y=t.autoFocus,g=t.preventDropOnDocument,T=t.noClick,S=t.noKeyboard,E=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,A=x.useMemo(function(){return jF(n)},[n]),N=x.useMemo(function(){return NF(n)},[n]),M=x.useMemo(function(){return typeof v=="function"?v:oy},[v]),L=x.useMemo(function(){return typeof m=="function"?m:oy},[m]),P=x.useRef(null),O=x.useRef(null),j=x.useReducer(XF,Ju),D=Uc(j,2),V=D[0],H=D[1],_=V.isFocused,$=V.isFileDialogActive,K=x.useRef(typeof window<"u"&&window.isSecureContext&&b&&DF()),re=function(){!K.current&&$&&setTimeout(function(){if(O.current){var ie=O.current.files;ie.length||(H({type:"closeDialog"}),L())}},300)};x.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[O,$,L,K]);var ee=x.useRef([]),G=function(ie){P.current&&P.current.contains(ie.target)||(ie.preventDefault(),ee.current=[])};x.useEffect(function(){return g&&(document.addEventListener("dragover",ny,!1),document.addEventListener("drop",G,!1)),function(){g&&(document.removeEventListener("dragover",ny),document.removeEventListener("drop",G))}},[P,g]),x.useEffect(function(){return!r&&y&&P.current&&P.current.focus(),function(){}},[P,y,r]);var F=x.useCallback(function(te){k?k(te):console.error(te)},[k]),B=x.useCallback(function(te){te.preventDefault(),te.persist(),J(te),ee.current=[].concat(zF(ee.current),[te.target]),oa(te)&&Promise.resolve(o(te)).then(function(ie){if(!(Xa(te)&&!C)){var _e=ie.length,Ke=_e>0&&AF({files:ie,accept:A,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:I}),Rt=_e>0&&!Ke;H({isDragAccept:Ke,isDragReject:Rt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(te)}}).catch(function(ie){return F(ie)})},[o,c,F,C,A,i,s,a,l,I]),z=x.useCallback(function(te){te.preventDefault(),te.persist(),J(te);var ie=oa(te);if(ie&&te.dataTransfer)try{te.dataTransfer.dropEffect="copy"}catch{}return ie&&d&&d(te),!1},[d,C]),Y=x.useCallback(function(te){te.preventDefault(),te.persist(),J(te);var ie=ee.current.filter(function(Ke){return P.current&&P.current.contains(Ke)}),_e=ie.indexOf(te.target);_e!==-1&&ie.splice(_e,1),ee.current=ie,!(ie.length>0)&&(H({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),oa(te)&&u&&u(te))},[P,u,C]),Q=x.useCallback(function(te,ie){var _e=[],Ke=[];te.forEach(function(Rt){var At=vw(Rt,A),Lt=Uc(At,2),xr=Lt[0],ro=Lt[1],oo=bw(Rt,i,s),Li=Uc(oo,2),Fl=Li[0],Vl=Li[1],$l=I?I(Rt):null;if(xr&&Fl&&!$l)_e.push(Rt);else{var Bl=[ro,Vl];$l&&(Bl=Bl.concat($l)),Ke.push({file:Rt,errors:Bl.filter(function(Zw){return Zw})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(Rt){Ke.push({file:Rt,errors:[IF]})}),_e.splice(0)),H({acceptedFiles:_e,fileRejections:Ke,type:"setFiles"}),f&&f(_e,Ke,ie),Ke.length>0&&p&&p(Ke,ie),_e.length>0&&h&&h(_e,ie)},[H,a,A,i,s,l,f,h,p,I]),ue=x.useCallback(function(te){te.preventDefault(),te.persist(),J(te),ee.current=[],oa(te)&&Promise.resolve(o(te)).then(function(ie){Xa(te)&&!C||Q(ie,te)}).catch(function(ie){return F(ie)}),H({type:"reset"})},[o,Q,F,C]),U=x.useCallback(function(){if(K.current){H({type:"openDialog"}),M();var te={multiple:a,types:N};window.showOpenFilePicker(te).then(function(ie){return o(ie)}).then(function(ie){Q(ie,null),H({type:"closeDialog"})}).catch(function(ie){LF(ie)?(L(ie),H({type:"closeDialog"})):FF(ie)?(K.current=!1,O.current?(O.current.value=null,O.current.click()):F(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):F(ie)});return}O.current&&(H({type:"openDialog"}),M(),O.current.value=null,O.current.click())},[H,M,L,b,Q,F,N,a]),ke=x.useCallback(function(te){!P.current||!P.current.isEqualNode(te.target)||(te.key===" "||te.key==="Enter"||te.keyCode===32||te.keyCode===13)&&(te.preventDefault(),U())},[P,U]),qe=x.useCallback(function(){H({type:"focus"})},[]),Le=x.useCallback(function(){H({type:"blur"})},[]),Te=x.useCallback(function(){T||(MF()?setTimeout(U,0):U())},[T,U]),q=function(ie){return r?null:ie},se=function(ie){return S?null:q(ie)},W=function(ie){return E?null:q(ie)},J=function(ie){C&&ie.stopPropagation()},pe=x.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=te.refKey,_e=ie===void 0?"ref":ie,Ke=te.role,Rt=te.onKeyDown,At=te.onFocus,Lt=te.onBlur,xr=te.onClick,ro=te.onDragEnter,oo=te.onDragOver,Li=te.onDragLeave,Fl=te.onDrop,Vl=Qa(te,BF);return tt(tt(Qu({onKeyDown:se(gn(Rt,ke)),onFocus:se(gn(At,qe)),onBlur:se(gn(Lt,Le)),onClick:q(gn(xr,Te)),onDragEnter:W(gn(ro,B)),onDragOver:W(gn(oo,z)),onDragLeave:W(gn(Li,Y)),onDrop:W(gn(Fl,ue)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},_e,P),!r&&!S?{tabIndex:0}:{}),Vl)}},[P,ke,qe,Le,Te,B,z,Y,ue,S,E,r]),ce=x.useCallback(function(te){te.stopPropagation()},[]),Fe=x.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=te.refKey,_e=ie===void 0?"ref":ie,Ke=te.onChange,Rt=te.onClick,At=Qa(te,WF),Lt=Qu({accept:A,multiple:a,type:"file",style:{display:"none"},onChange:q(gn(Ke,ue)),onClick:q(gn(Rt,ce)),tabIndex:-1},_e,O);return tt(tt({},Lt),At)}},[O,n,a,ue,r]);return tt(tt({},V),{},{isFocused:_&&!r,getRootProps:pe,getInputProps:Fe,rootRef:P,inputRef:O,open:q(U)})}function XF(e,t){switch(t.type){case"focus":return tt(tt({},e),{},{isFocused:!0});case"blur":return tt(tt({},e),{},{isFocused:!1});case"openDialog":return tt(tt({},Ju),{},{isFileDialogActive:!0});case"closeDialog":return tt(tt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return tt(tt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return tt(tt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return tt({},Ju);default:return e}}function oy(){}const QF={isImage:e=>e.type.includes("image")},JF=e=>{const[t,n]=x.useState({url:"",type:"",size:""});return x.useEffect(()=>{if(QF.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Vg(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Vg(e.file.size)})},[e.file]),t.type==="img"?w.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[w.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[w.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),w.jsxs("div",{className:"flex flex-col",children:[w.jsx("span",{children:e.file.name}),w.jsx("span",{children:t.size})]})]}),w.jsx(jo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(Bo,{})})]}):w.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[w.jsxs("header",{className:"flex flex-row items-center gap-4",children:[w.jsx(Lb,{size:48}),w.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[w.jsx("span",{children:e.file.name}),w.jsx("span",{children:t.size})]})]}),w.jsx(jo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(Bo,{className:"text-danger"})})]})},e2=e=>w.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>w.jsx(JF,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),t2=e=>e.isDragActive?w.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?w.jsx(e2,{onDeleteFile:e.onDeleteFile,files:e.files}):w.jsx(x.Fragment,{children:e.idle}),n2=w.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[w.jsx(tI,{size:64}),w.jsxs("p",{children:["You can drag your files or"," ",w.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),r2=({idle:e=n2,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=x.useState([]),i=d=>{n==null||n(d),s(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=Ew({onDrop:i});return w.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[w.jsx("input",{...l(r),name:r.name,id:r.name}),w.jsx(t2,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},o2=["INPUT","SELECT"],Cw=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{o2.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},s2=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return w.jsx("form",{...e,onSubmit:t})},i2=({children:e,className:t="",size:n,...r})=>w.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[w.jsx("input",{...r,type:"radio",className:Me("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),Hr=x.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:s,interactive:i,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:d,left:f,error:h,...p},m)=>{const v=Ct(),b=x.useRef(null),y=p.id??p.name;x.useImperativeHandle(m,()=>b.current),x.useEffect(()=>{if(b.current===null)return;const T=new AbortController,S=b.current,E=bi(b.current);return S.addEventListener("change",()=>S.setAttribute("data-selected","true"),{once:!0,signal:T.signal}),()=>{E(),T.abort()}},[]);const g=()=>{var T;return(T=b.current)==null?void 0:T.focus()};return w.jsx(Di,{info:n,left:f,error:h,form:p.form,name:p.name,feedback:o,hideLeft:u,required:e,title:p.title,container:c,componentName:"select",rightLabel:a,interactive:i,id:p.name||p.id,optionalText:l,labelClassName:s,placeholder:p.placeholder,right:w.jsx("label",{htmlFor:y,children:w.jsxs("button",{onClick:g,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[w.jsx(of,{size:20}),w.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})}),children:w.jsxs("select",{...p,id:y,name:y,value:p.value,required:e,ref:bd(m,b),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",title:typeof p.title=="string"?p.title:void 0,className:Me("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",p.className),children:[w.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(T=>x.createElement("option",{...T,value:T.value,children:T.label??T.value,key:`${y}-select-option-${T.value}`}))]})})}),a2=x.forwardRef(({children:e,container:t,error:n,...r},o)=>{const s=x.useId(),[i,a]=x.useState(r.checked??!1),l=i,c=x.useRef(null),u=Ys(r.onChange);x.useImperativeHandle(o,()=>c.current),x.useEffect(()=>{if(c.current!==null&&u.current){const f=h=>{h.target.checked=!h.target.checked,u.current&&u.current(h)};return c.current.addEventListener("change",f),()=>{var h;return(h=c.current)==null?void 0:h.removeEventListener("change",f)}}},[]);const d=()=>{var h,p;const f=!((h=c.current)!=null&&h.checked);a(f),(p=r==null?void 0:r.onCheck)==null||p.call(r,f),c.current!==null&&(c.current.checked=f,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return w.jsxs("fieldset",{className:Me("flex flex-col flex-wrap justify-center",t),"data-component":"switch",children:[w.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[w.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||s,onChange:f=>a(f.target.checked),ref:c,type:"checkbox"}),w.jsx("button",{type:"button",role:"switch",onClick:d,"aria-checked":l,"data-checked":l,"aria-labelledby":`${s}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:w.jsx("span",{"aria-hidden":"true","data-checked":l,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),w.jsx("label",{htmlFor:r.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:w.jsx("span",{className:"font-medium text-foreground",children:e})})]}),w.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),l2=e=>{const[t,n]=Ak();return x.useEffect(()=>{const r=t.current;if(!r)return;const o=s=>{const i=s.target,a=Array.from(r.querySelectorAll("input[data-task=true]")),l=a.every(u=>u.checked),c=a.indexOf(i);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:Nk(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),w.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},c2=dw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
|
|
236
|
-
`);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),u2=e=>{const[t,n]=x.useState(0);return x.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},d2={Item:x.forwardRef(function(t,n){return w.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:x.forwardRef(function(t,n){return w.jsx("ul",{...t,ref:n,className:"space-y-3"})})},f2=e=>{const t=x.useRef(null),n=u2(t);return w.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[w.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[w.jsx("header",{className:"border-b border-card-border pb-2"}),w.jsxs("div",{className:"px-8 space-y-2",children:[w.jsx(Ni,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),w.jsx(Qf,{height:n,useWindowScroll:!0,data:e.source,components:d2,itemContent:(r,o)=>w.jsx(x.Fragment,{children:w.jsx(eh,{children:w.jsx(e.Item,{data:o})})})})]})]}),w.jsx("div",{children:w.jsx(jo,{children:w.jsx(sf,{})})}),w.jsx("div",{})]})};var h2=Object.defineProperty,sy=Object.getOwnPropertySymbols,m2=Object.prototype.hasOwnProperty,p2=Object.prototype.propertyIsEnumerable,iy=(e,t,n)=>t in e?h2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g2=(e,t)=>{for(var n in t||(t={}))m2.call(t,n)&&iy(e,n,t[n]);if(sy)for(var n of sy(t))p2.call(t,n)&&iy(e,n,t[n]);return e},rh=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},y2=(e,t,n,r)=>jl(rh,e,t,n,r),Xo=e=>typeof e=="object",or=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Xo(e)&&!Xo(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=>or(e[r],t[r]))},v2=(e,t)=>(Xo(e)||Array.isArray(e))&&t?e[t]:e,b2=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ja=e=>/[0-9.]+/.test(e),ay=e=>["string","number"].includes(typeof e),ly=e=>e==null||(e==null?void 0:e.length)===0||e==="",cy={eq:or,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:ly,notEmpty:e=>!ly(e),in:(e,t)=>rh(t,n=>or(e,n)),notIn:(e,t)=>Rw(t,n=>!or(e,n))},x2=e=>{if(e in cy)return cy[e];throw new Error("Linq - Symbol not found")},Ao=(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},jl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=x2(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},w2=(e,t,n,r)=>jl(Ao,e,t,n,r),Rw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},S2=(e,t,n,r)=>jl(Rw,e,t,n,r),Pw=e=>{if(e===null)return null;const t=g2({},e);return Object.keys(t).forEach(n=>t[n]=Xo(e[n])?Pw(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},uy=(e,t)=>{if(Xo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(or(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(or(t,r))return!0}return!1},T2=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},E2=e=>Ao(e,(t,n,r)=>Xo(t)?n===r.findIndex(o=>or(o,t)):n===r.indexOf(t)),C2=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},kw=(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())},R2=(e,t)=>kw(e,n=>n[t]),dy=(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},P2=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},k2=(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 Ja(e)&&Ja(t)?r.map(i=>Number.parseInt(i)):r},Gc=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ja(e)&&Ja(t)){const o=[],[s,i]=P2(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return k2(e,t,r)},I2=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?Gc(r,o,1):Gc(r,s,Number.parseInt(o,10))}return ay(e)&&ay(t)?Gc(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Yc=(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},fy=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},A2=(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)},O2=(e,t,n,r)=>jl(A2,e,t,n,r),hy=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(b2(t))},Iw=(e=>(e.Asc="asc",e.Desc="desc",e))(Iw||{}),_2=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),M2=(e,t)=>e.sort(_2(t)),D2=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Ao(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},N2=class ed{constructor(t=[]){this.array=t}static Range(...t){return I2(...t)}static New(t){return new ed(t)}Where(t,n,r){return this.array=w2(this.array,t,n,r),this}Some(t,n,r){return y2(this.array,t,n,r)}All(t,n,r){return S2(this.array,t,n,r)}Reverse(){return this.array=fy(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=O2(this.array,t,n,r),this}Distinct(){return this.array=E2(this.array),this}First(t){return t===void 0?this.array[0]:C2(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?Yc((n,r)=>n+r,0,this.array):Yc((n,r)=>n+v2(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return R2(this.array,t)}GroupWith(t){return kw(this.array,t)}Except(t){return Ao(this.array,n=>!uy(t,n))}Intersect(t){return Ao(this.array,n=>uy(t,n))}OrderBy(t,n){let r;return r=t?hy(this.array,t):this.array.toSorted(),this.array=n==="desc"?fy(r):r,this}Includes(t){return rh(this.array,n=>or(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 Yc(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(dy(this.array,n=>[t,n]))}Zip(t,n){return dy(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Ao(this.array,t).length}Get(t){return this.array[t]}Clone(){return new ed(Pw(this.array))}ToObject(t){return T2(this.array,t)}Sort(t){return Array.isArray(t)?M2(this.array,t):hy(this.array,t)}Unique(t){return D2(this.array,t)}},Aw=N2,Oo={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(v,b)=>{try{Object.keys(v).forEach(b)}catch(y){window.console.log(y)}},n=v=>v==null,r=v=>{const b=typeof v;return b==="string"||b==="number"||b==="boolean"||n(v)},o=(v,b)=>{const y=b.getItem(v);try{return JSON.parse(y)}catch{return y??null}},s=v=>Object.keys(v).reduce((b,y)=>({...b,[y]:o(y,v)}),{}),i=v=>v instanceof Date?v:typeof v=="number"?new Date(new Date*1+v*864e5):v,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(v=>v.split("=")).reduce((v,b)=>(v[decodeURIComponent(b[0].trim())]=decodeURIComponent(b[1].trim()),v),{}),c=new Set,u=()=>{const v=l();c.forEach(b=>b(v))},d=[{name:"expires",parse:v=>`expires=${i(v.expires??a)}`},{name:"maxAge",parse:v=>v.maxAge?`max-age=${i(v.expires??a)}`:""},{name:"path",parse:v=>`path=${v.path??"/"}`},{name:"sameSite",parse:v=>`samesite=${v.sameSite??"strict"}`},{name:"useSecure",parse:v=>`${v.useSecure??!0?"secure":""}`},{name:"domain",parse:v=>{const b=v.domain??"";return b===""?"":`domain=${v.multiDomain?".":""}${b}`}},{name:"partitioned",parse:v=>v.partitioned?"Partitioned":""}],f={json:l,listener:v=>(c.add(v),()=>c.delete(v)),clearListeners:()=>c.clear(),has:v=>document.cookie.split(";").some(b=>b.trim().startsWith(`${v}=`)),deleteAll:()=>{document.cookie.split(";").forEach(v=>{document.cookie=v.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:v=>{const b=f.json()[v];if(n(b))return null;try{return JSON.parse(decodeURIComponent(b))}catch{return b}},delete:v=>{document.cookie=`${encodeURIComponent(v)}=;expires=${new Date().toUTCString()}`,u()},set:(v,b,y={})=>{const g=r(b)?b:encodeURIComponent(JSON.stringify(b)),T=d.reduce((S,E)=>{const C=E.parse(y);return C===""?S:S.concat(C)},[`${encodeURIComponent(v)}=${g}`]).join(";");document.cookie=T,u()}},h=v=>{const b=new Set,y=g=>{v().removeItem(g);const T=s(v());b.forEach(S=>S(T))};return{delete:y,listener:g=>(b.add(g),()=>b.delete(g)),clearListeners:()=>b.clear(),json:(g=!1)=>g?s(v()):v(),has:g=>{const T=v().getItem(g);return!n(T)},deleteAll:()=>{t(v(),y),b.forEach(g=>g(v()))},get:g=>o(g,v()),set:(g,T)=>{v().setItem(g,JSON.stringify(T)),b.forEach(S=>S(v()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(Oo);const oh=e=>e.headerLabel??e.thead??e.id,sh=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 ih=e=>e.type==="number"?e.valueAsNumber:e.value,j2=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},L2={},F2=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,s)=>{const i=r.get(o.id);return i===void 0?e[s]:i})},V2=(e,t,n=L2)=>{const r=Ta()?null:Oo.LocalStorage.get(`@components/table-${e}`)||null,[o,s]=hf({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:F2(t,r==null?void 0:r.cols)},i=>{const a=l=>{const c=i.state(),u={...c,...l};return Ta()||Oo.LocalStorage.set(`@components/table-${c.name}`,u),u};return a(i.state()),{set:l=>a(l)}});return{...o,...s,name:e}},td=(e,t,n,r={})=>{var c,u;const o=e.id,s=e.type??_o.Text,i=t[s]??[],a=((c=i.find(d=>d["data-default"]))==null?void 0:c.value)??((u=i[0])==null?void 0:u.value),l=n[a];return{id:xi(),operation:l,label:oh(e),name:o,type:s,value:"",...r}},ah=()=>{const e=Ct(),t=x.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:x.useMemo(()=>({[_o.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[_o.Boolean]:[t.is,t.isNot],[_o.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},$2=e=>{const t=Ct(),n=ah(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,td(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const h=e.cols.find(p=>u===p.id);return td(h,n.options,n.operations,{value:""})}))},s=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},i=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=ih(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return w.jsx(x.Fragment,{children:w.jsx(ps,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(Zk,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:w.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(Hr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),w.jsx(Hr,{"data-id":l.id,onChange:s,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),w.jsx(Ni,{"data-id":l.id,onChange:a,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),w.jsx("div",{className:"mt-5 flex items-center justify-center",children:w.jsx("button",{"data-id":l.id,type:"button",onClick:i,children:w.jsx(Bo,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),w.jsx("li",{children:w.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[w.jsx(af,{size:14})," ",t.tableFilterNewFilter]})})]})})})},B2=({filter:e,onDelete:t,set:n})=>{const r=Ct(),o=ah(),s=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},i=a=>{const l=a.target.dataset.id||"",c=ih(a.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return w.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[w.jsx(Hr,{"data-id":e.id,onChange:s,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),w.jsx(Ni,{"data-id":e.id,onChange:i,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),w.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:w.jsx(Bo,{className:"text-danger",size:14})})]})},W2=({item:e,onPointerDown:t})=>{const n=$r(0);return w.jsxs(Mb,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[w.jsx("button",{type:"button",className:"cursor-grab",children:w.jsx(Kk,{size:14})}),w.jsx("span",{children:e.groupName})]},e.groupId)},z2=e=>{var l;const t=Ct(),n=sh(e.cols),r=Mk(),[o,s]=x.useState(((l=e.groups[0])==null?void 0:l.thead)||""),i=c=>{var v;const u=c.target,d=u.value,f=u.options.selectedIndex,h=((v=u.options.item(f))==null?void 0:v.label)||"";s(h);const p=new Aw(e.rows).GroupBy(d),m=e.cols.find(b=>b.id===d);e.setGroups(US(p).map((b,y)=>{const g=p[b];return{...m,groupId:xi(),groupKey:d,index:y,rows:g,groupName:b}}))},a=()=>e.setGroups([]);return w.jsx(x.Fragment,{children:w.jsxs(ps,{arrow:!1,title:t.tableGroupLabel,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(eI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[w.jsxs("div",{className:"flex flex-nowrap items-center",children:[w.jsx(Hr,{value:o,title:"Tipo de agrupamento",onChange:i,options:n,placeholder:"Agrupar por..."}),w.jsx(jo,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:w.jsx(Bo,{size:16,className:"text-danger"})})]}),e.groups.length>0?w.jsxs("section",{className:"my-4",children:[w.jsx("header",{children:w.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),w.jsx(GT,{children:w.jsx(_b,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>w.jsx(W2,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},H2=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),U2=(e,t)=>e.toSorted(H2(t)),Ow=(e,t,n)=>({id:xi(),type:n,value:e.id,label:t}),G2=e=>{const t=Ct(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,Ow(l,n.asc.label,n.asc.value)])},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return w.jsx(x.Fragment,{children:w.jsx(ps,{title:t.tableSortDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(Nb,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:w.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(Hr,{options:e.options,value:l.value,onChange:s(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),w.jsx(Hr,{onChange:i(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),w.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:w.jsx(Bo,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),w.jsx("li",{children:w.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[w.jsx(af,{size:14})," ",t.tableSortAddButton]})})]})})})},Y2=e=>{const t=Ct(),[n,r]=x.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");x.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=Ow(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=oh(e.col);return w.jsxs("button",{"aria-labelledby":s,className:"isolate flex items-center",onClick:o,type:"button",children:[w.jsxs("span",{id:s,className:"sr-only",children:[t.tableSortDropdownTitle," ",i]}),n==="asc"?w.jsx(Uk,{size:14}):null,n==="desc"?w.jsx(Hk,{size:14}):null,n==="undefined"?w.jsx(Nb,{size:14}):null]})},q2=e=>w.jsx("header",{className:"min-w-full mb-1",children:w.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[w.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[w.jsx("span",{children:w.jsx($2,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),w.jsx("span",{children:w.jsx(G2,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),w.jsx("span",{children:w.jsx(z2,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),w.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>w.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[w.jsxs("span",{children:[w.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),w.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[w.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),w.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=ih(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function K2(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 Z2=e=>{const t=x.useId(),n=Ct(),r=e.asLink||"button",o=x.useMemo(()=>K2(e.current,e.pages),[e.current,e.pages]),s=e.current<e.pages;return w.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[w.jsx("p",{children:w.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?w.jsxs(x.Fragment,{children:[w.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),w.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=>w.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),w.jsx("nav",{children:w.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?w.jsx("li",{children:w.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(i=>i===null?null:w.jsx(x.Fragment,{children:typeof i=="string"?w.jsx("li",{children:"..."}):w.jsx("li",{children:w.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?w.jsx("li",{children:w.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},X2={top:0,left:0,right:0,bottom:-1},Q2=e=>{var p;const t=Ct(),n=e.filters.filter(m=>m.name===e.header.id),r=n.length>0,o=e.header.allowSort??!0,s=e.header.allowFilter??!0,i=ah(),a=r?Xk:Qk,l=m=>{const v=m.currentTarget.dataset.id||"";return e.setFilters(b=>b.filter(y=>y.id!==v))},c=x.useCallback(m=>{if(m===null)return;const v=new AbortController;return m.addEventListener("pointerdown",b=>{if(b.target.dataset.type==="resizer")return b.stopPropagation(),b.stopImmediatePropagation()},{signal:v.signal}),()=>v.abort()},[]),u=e.sorters.find(m=>e.header.id===m.value),d=u!=null&&u.type?u.type===Iw.Asc?"ascending":"descending":"none",f=oh(e.header),h=$r(void 0);return w.jsxs(Mb,{...e.header.thProps,as:"th",ref:c,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,style:{width:h},role:"columnheader","aria-sort":d,value:e.header,"aria-busy":e.loading,className:`relative hidden min-w-0 border border-b border-transparent border-b-table-border border-r-table-border font-medium first:table-cell last:border-r-transparent md:table-cell ${((p=e.header.thProps)==null?void 0:p.className)??""}`,children:[w.jsx("span",{className:"flex h-full items-center justify-between px-2 py-4",children:w.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&s?w.jsx(ps,{arrow:!0,trigger:w.jsxs("span",{children:[w.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",f]}),w.jsx(a,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:w.jsxs("span",{className:"text-lg font-medium",children:[t.tableFilterDropdownTitleUnique," ",w.jsx("span",{className:"text-primary",children:f})]}),children:n.length===0===null?null:w.jsxs("ul",{className:"font-medium",children:[n.map(m=>w.jsx("li",{className:"my-1",children:w.jsx(B2,{onDelete:l,filter:m,set:e.setFilters})},`thead-filter-${m.id}`)),w.jsx("li",{children:w.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(m=>m.concat(td(e.header,i.options,i.operations))),children:[w.jsx(af,{size:14})," ",t.tableFilterNewFilter]})})]})}):null,w.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&o?w.jsx(Y2,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),w.jsx(ct.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:X2,whileDrag:{cursor:"grabbing"},className:"absolute right-0 top-0 block h-full w-1 cursor-col-resize hover:bg-primary active:bg-primary",onDrag:(m,v)=>{const b=m.target,y=h.get()||b.getBoundingClientRect().width,g=v.delta.x;return h.set(Math.abs(y+g))}})]})},J2=e=>w.jsx(_b,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,values:e.headers,onReorder:e.setCols,className:"bg-table-header text-lg",children:w.jsx(fr,{children:e.headers.map(t=>w.jsx(Q2,{inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),_w=x.createContext({}),eV=()=>x.useContext(_w),tV=x.forwardRef(({context:e,className:t="",...n},r)=>w.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:w.jsx(fr,{children:n.children})})),nV=x.forwardRef(({context:e,className:t="",...n},r)=>w.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${t??""}`})),rV=x.forwardRef(({context:e,...t},n)=>{const r=eV(),o={...t==null?void 0:t.style,top:it.number(r.sticky)?`${r.sticky}px`:void 0};return w.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),oV=x.forwardRef(({context:e,item:t,...n},r)=>w.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),sV=x.forwardRef((e,t)=>e.context.loadingMore?w.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:w.jsx("tr",{role:"row",className:"bg-card-background",children:w.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:w.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),iV={TableHead:rV,Table:nV,TableBody:tV,TableRow:oV,TableFoot:sV},aV=[0,0,0,0,0,0,0,0,0,0],Mw=w.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),lV=(e,t,n)=>w.jsx("td",{role:"cell",colSpan:n.cols.length,className:"hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell",children:n.loading?Mw:w.jsx(b0,{})}),cV=(e,t,n)=>{const r=n.cols,o=n.loading;return w.jsx(x.Fragment,{children:r.map((s,i)=>{var d;const a=`${i},${e}`,l=wd(t,s.id),c=s.Element,u=((d=s.cellProps)==null?void 0:d.className)||"";return x.createElement("td",{...s.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${i}`,className:`hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},o?Mw:c?w.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):w.jsx(x.Fragment,{children:it.nil(l)?"":l}))})})},uV=()=>w.jsx(x.Fragment,{}),dV=[{}],my=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,onScrollEnd:i,border:a=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=x.useRef(null),[f,h]=x.useState(!1),p=Ys(i),m=Ys(u.loadingMore),v=x.useMemo(()=>{if(u.loading)return aV;if(c)return u.rows;const b=new Aw(u.rows);return t.length>0&&t.forEach(y=>y.value===""||Number.isNaN(y.value)?void 0:b.Where(y.name,y.operation.symbol,y.value)),r.length===0?b.Select():U2(b.Select(),r)},[u.rows,t,r,u.loading]);return x.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,y=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 y.observe(b),()=>y.disconnect()},[]),w.jsxs("div",{className:"min-w-full",children:[w.jsxs("div",{className:`group rounded-lg ${a?"border border-table-border":""}`,children:[w.jsx(PL,{useWindowScroll:!0,followOutput:"smooth",components:iV,totalCount:v.length,data:v.length===0?dV:v,fixedFooterContent:f?uV:null,itemContent:v.length===0?lV:cV,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>w.jsx(J2,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),w.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?w.jsx(Z2,{...l}):null]})},fV=(e,t)=>typeof t=="function"?t(e):t,sa=(e,t,n)=>e===t||n==null?void 0:n(t),hV=e=>{const t=x.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=x.useMemo(()=>sh(e.cols),[e.cols]),[o,s]=hf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:fV(u[l],c)}};return{cols:a("cols"),sorters:a("sorters"),groups:a("groups"),filters:a("filters")}},{postMiddleware:[(i,a)=>{var l;return(l=e.set)==null||l.call(e,i),sa((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),sa((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),sa((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),sa((a==null?void 0:a.cols)??[],i.cols??[],e.setCols),i}]});return w.jsx(_w.Provider,{value:t,children:w.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?w.jsx(q2,{cols:o.cols,rows:e.rows,options:r,groups:o.groups,filters:o.filters,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,o.groups.length===0?w.jsx(my,{...e,index:0,cols:o.cols,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):w.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((i,a)=>w.jsx("div",{className:"min-w-full",children:w.jsx(my,{...e,group:i,index:a,cols:o.cols,pagination:null,rows:i.rows,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${i.groupId}`))})]})})};var mV=String.prototype.replace,pV=/%20/g,qc={RFC1738:"RFC1738",RFC3986:"RFC3986"},lh={default:qc.RFC3986,formatters:{RFC1738:function(e){return mV.call(e,pV,"+")},RFC3986:function(e){return String(e)}},RFC1738:qc.RFC1738,RFC3986:qc.RFC3986},gV=lh,Kc=Object.prototype.hasOwnProperty,Ir=Array.isArray,yn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),yV=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Ir(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Dw=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},vV=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Ir(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Kc.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 Ir(t)&&!Ir(n)&&(o=Dw(t,r)),Ir(t)&&Ir(n)?(n.forEach(function(s,i){if(Kc.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 Kc.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},bV=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},xV=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}},Zc=1024,wV=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+=Zc){for(var c=i.length>=Zc?i.slice(l,l+Zc):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===gV.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=yn[f];continue}if(f<2048){u[u.length]=yn[192|f>>6]+yn[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=yn[224|f>>12]+yn[128|f>>6&63]+yn[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=yn[240|f>>18]+yn[128|f>>12&63]+yn[128|f>>6&63]+yn[128|f&63]}a+=u.join("")}return a},SV=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 yV(n),t},TV=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},EV=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},CV=function(t,n){return[].concat(t,n)},RV=function(t,n){if(Ir(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Nw={arrayToObject:Dw,assign:bV,combine:CV,compact:SV,decode:xV,encode:wV,isBuffer:EV,isRegExp:TV,maybeMap:RV,merge:vV},jw=$S,va=Nw,Us=lh,PV=Object.prototype.hasOwnProperty,Lw={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},vn=Array.isArray,kV=Array.prototype.push,Fw=function(e,t){kV.apply(e,vn(t)?t:[t])},IV=Date.prototype.toISOString,py=Us.default,vt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:va.encode,encodeValuesOnly:!1,format:py,formatter:Us.formatters[py],indices:!1,serializeDate:function(t){return IV.call(t)},skipNulls:!1,strictNullHandling:!1},AV=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Xc={},OV=function e(t,n,r,o,s,i,a,l,c,u,d,f,h,p,m,v,b,y){for(var g=t,T=y,S=0,E=!1;(T=T.get(Xc))!==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(Xc)>"u"&&(S=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&vn(g)&&(g=va.maybeMap(g,function(_){return _ instanceof Date?h(_):_})),g===null){if(i)return c&&!v?c(n,vt.encoder,b,"key",p):n;g=""}if(AV(g)||va.isBuffer(g)){if(c){var k=v?n:c(n,vt.encoder,b,"key",p);return[m(k)+"="+m(c(g,vt.encoder,b,"value",p))]}return[m(n)+"="+m(String(g))]}var I=[];if(typeof g>"u")return I;var A;if(r==="comma"&&vn(g))v&&c&&(g=va.maybeMap(g,c)),A=[{value:g.length>0?g.join(",")||null:void 0}];else if(vn(u))A=u;else{var N=Object.keys(g);A=d?N.sort(d):N}var M=l?n.replace(/\./g,"%2E"):n,L=o&&vn(g)&&g.length===1?M+"[]":M;if(s&&vn(g)&&g.length===0)return L+"[]";for(var P=0;P<A.length;++P){var O=A[P],j=typeof O=="object"&&typeof O.value<"u"?O.value:g[O];if(!(a&&j===null)){var D=f&&l?O.replace(/\./g,"%2E"):O,V=vn(g)?typeof r=="function"?r(L,D):L:L+(f?"."+D:"["+D+"]");y.set(t,S);var H=jw();H.set(Xc,y),Fw(I,e(j,V,r,o,s,i,a,l,r==="comma"&&v&&vn(g)?null:c,u,d,f,h,p,m,v,b,H))}}return I},_V=function(t){if(!t)return vt;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||vt.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=Us.default;if(typeof t.format<"u"){if(!PV.call(Us.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Us.formatters[r],s=vt.filter;(typeof t.filter=="function"||vn(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in Lw?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=vt.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:vt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:vt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:vt.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:vt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?vt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:vt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:vt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:vt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:vt.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:vt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:vt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:vt.strictNullHandling}},MV=function(e,t){var n=e,r=_V(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):vn(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=Lw[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=jw(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||Fw(i,OV(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:""},Qo=Nw,nd=Object.prototype.hasOwnProperty,DV=Array.isArray,ft={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Qo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},NV=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Vw=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},jV="utf8=%26%2310003%3B",LV="utf8=%E2%9C%93",FV=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]===LV?c="utf-8":i[l]===jV&&(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,ft.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),ft.decoder,c,"key"),p=Qo.maybeMap(Vw(u.slice(f+1),n),function(v){return n.decoder(v,ft.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=NV(p)),u.indexOf("[]=")>-1&&(p=DV(p)?[p]:p);var m=nd.call(r,h);m&&n.duplicates==="combine"?r[h]=Qo.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},VV=function(e,t,n,r){for(var o=r?t:Vw(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},$V=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&&nd.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&&nd.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),VV(u,n,r,o)}},BV=function(t){if(!t)return ft;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?ft.charset:t.charset,r=typeof t.duplicates>"u"?ft.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:ft.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ft.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ft.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ft.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ft.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ft.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ft.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:ft.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:ft.decoder,delimiter:typeof t.delimiter=="string"||Qo.isRegExp(t.delimiter)?t.delimiter:ft.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ft.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ft.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ft.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ft.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ft.strictNullHandling}},WV=function(e,t){var n=BV(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?FV(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=$V(a,r[a],n,typeof e=="string");o=Qo.merge(o,l,n)}return n.allowSparse===!0?o:Qo.compact(o)},zV=MV,HV=WV,UV=lh,GV={formats:UV,parse:HV,stringify:zV},Oe;(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})(Oe||(Oe={}));var gy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(gy||(gy={}));const le=Oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ar=e=>{switch(typeof e){case"undefined":return le.undefined;case"string":return le.string;case"number":return isNaN(e)?le.nan:le.number;case"boolean":return le.boolean;case"function":return le.function;case"bigint":return le.bigint;case"symbol":return le.symbol;case"object":return Array.isArray(e)?le.array:e===null?le.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?le.promise:typeof Map<"u"&&e instanceof Map?le.map:typeof Set<"u"&&e instanceof Set?le.set:typeof Date<"u"&&e instanceof Date?le.date:le.object;default:return le.unknown}},X=Oe.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 rn 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 rn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Oe.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()}}rn.create=e=>new rn(e);const fi=(e,t)=>{let n;switch(e.code){case X.invalid_type:e.received===le.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case X.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Oe.jsonStringifyReplacer)}`;break;case X.unrecognized_keys:n=`Unrecognized key(s) in object: ${Oe.joinValues(e.keys,", ")}`;break;case X.invalid_union:n="Invalid input";break;case X.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Oe.joinValues(e.options)}`;break;case X.invalid_enum_value:n=`Invalid enum value. Expected ${Oe.joinValues(e.options)}, received '${e.received}'`;break;case X.invalid_arguments:n="Invalid function arguments";break;case X.invalid_return_type:n="Invalid function return type";break;case X.invalid_date:n="Invalid date";break;case X.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}"`:Oe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case X.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 X.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 X.custom:n="Invalid input";break;case X.invalid_intersection_types:n="Intersection results could not be merged";break;case X.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case X.not_finite:n="Number must be finite";break;default:n=t.defaultError,Oe.assertNever(e)}return{message:n}};let YV=fi;function rd(){return YV}const od=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 oe(e,t){const n=rd(),r=od({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===fi?void 0:fi].filter(o=>!!o)});e.common.issues.push(r)}class $t{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 ve;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 $t.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 ve;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 ve=Object.freeze({status:"aborted"}),As=e=>({status:"dirty",value:e}),Ut=e=>({status:"valid",value:e}),yy=e=>e.status==="aborted",vy=e=>e.status==="dirty",el=e=>e.status==="valid",tl=e=>typeof Promise<"u"&&e instanceof Promise;function nl(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 $w(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}var fe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(fe||(fe={}));var Os,_s;class Dn{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 by=(e,t)=>{if(el(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 rn(e.common.issues);return this._error=n,this._error}}};function xe(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 Ce{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 Ar(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $t,ctx:{common:t.parent.common,data:t.data,parsedType:Ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(tl(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:Ar(t)},s=this._parseSync({data:t,path:o.path,parent:o});return by(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:Ar(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(tl(o)?o:Promise.resolve(o));return by(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:X.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 Gn({schema:this,typeName:ge.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return $n.create(this,this._def)}nullable(){return Yr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return An.create(this,this._def)}promise(){return mi.create(this,this._def)}or(t){return sl.create([this,t],this._def)}and(t){return il.create(this,t,this._def)}transform(t){return new Gn({...xe(this._def),schema:this,typeName:ge.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new dl({...xe(this._def),innerType:this,defaultValue:n,typeName:ge.ZodDefault})}brand(){return new Hw({typeName:ge.ZodBranded,type:this,...xe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new fl({...xe(this._def),innerType:this,catchValue:n,typeName:ge.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ll.create(this,t)}readonly(){return hl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const qV=/^c[^\s-]{8,}$/i,KV=/^[0-9a-z]+$/,ZV=/^[0-9A-HJKMNP-TV-Z]{26}$/,XV=/^[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,QV=/^[a-z0-9_-]{21}$/i,JV=/^[-+]?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)?)??$/,e$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,t$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Qc;const n$=/^(?:(?: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])$/,r$=/^(([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})))$/,o$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Bw="((\\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])))",s$=new RegExp(`^${Bw}$`);function Ww(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 i$(e){return new RegExp(`^${Ww(e)}$`)}function a$(e){let t=`${Bw}T${Ww(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function l$(e,t){return!!((t==="v4"||!t)&&n$.test(e)||(t==="v6"||!t)&&r$.test(e))}class Vn extends Ce{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==le.string){const s=this._getOrReturnCtx(t);return oe(s,{code:X.invalid_type,expected:le.string,received:s.parsedType}),ve}const r=new $t;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:X.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),oe(o,{code:X.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?oe(o,{code:X.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&oe(o,{code:X.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")e$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"email",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Qc||(Qc=new RegExp(t$,"u")),Qc.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"emoji",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")XV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"uuid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")QV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"nanoid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")qV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"cuid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")KV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"cuid2",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")ZV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"ulid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),oe(o,{validation:"url",code:X.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),oe(o,{validation:"regex",code:X.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),oe(o,{code:X.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),oe(o,{code:X.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),oe(o,{code:X.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?a$(s).test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:X.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?s$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:X.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?i$(s).test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:X.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?JV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"duration",code:X.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?l$(t.data,s.version)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"ip",code:X.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?o$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"base64",code:X.invalid_string,message:s.message}),r.dirty()):Oe.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:X.invalid_string,...fe.errToObj(r)})}_addCheck(t){return new Vn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...fe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...fe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...fe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...fe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...fe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...fe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...fe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...fe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...fe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...fe.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,...fe.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,...fe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...fe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...fe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...fe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...fe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...fe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...fe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...fe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...fe.errToObj(n)})}nonempty(t){return this.min(1,fe.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:ge.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...xe(e)})};function c$(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 Ur extends Ce{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)!==le.number){const s=this._getOrReturnCtx(t);return oe(s,{code:X.invalid_type,expected:le.number,received:s.parsedType}),ve}let r;const o=new $t;for(const s of this._def.checks)s.kind==="int"?Oe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:X.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),oe(r,{code:X.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),oe(r,{code:X.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?c$(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),oe(r,{code:X.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:X.not_finite,message:s.message}),o.dirty()):Oe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,r,o){return new Ur({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:fe.toString(o)}]})}_addCheck(t){return new Ur({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:fe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:fe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.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"&&Oe.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)}}Ur.create=e=>new Ur({checks:[],typeName:ge.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...xe(e)});class Jo extends Ce{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)!==le.bigint){const s=this._getOrReturnCtx(t);return oe(s,{code:X.invalid_type,expected:le.bigint,received:s.parsedType}),ve}let r;const o=new $t;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),oe(r,{code:X.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),oe(r,{code:X.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),oe(r,{code:X.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Oe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,r,o){return new Jo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:fe.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:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.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:ge.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...xe(e)})};class sd extends Ce{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==le.boolean){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.boolean,received:r.parsedType}),ve}return Ut(t.data)}}sd.create=e=>new sd({typeName:ge.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...xe(e)});class hi extends Ce{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==le.date){const s=this._getOrReturnCtx(t);return oe(s,{code:X.invalid_type,expected:le.date,received:s.parsedType}),ve}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return oe(s,{code:X.invalid_date}),ve}const r=new $t;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:X.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),oe(o,{code:X.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Oe.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new hi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:fe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:fe.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}}hi.create=e=>new hi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ge.ZodDate,...xe(e)});class id extends Ce{_parse(t){if(this._getType(t)!==le.symbol){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.symbol,received:r.parsedType}),ve}return Ut(t.data)}}id.create=e=>new id({typeName:ge.ZodSymbol,...xe(e)});class rl extends Ce{_parse(t){if(this._getType(t)!==le.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.undefined,received:r.parsedType}),ve}return Ut(t.data)}}rl.create=e=>new rl({typeName:ge.ZodUndefined,...xe(e)});class ol extends Ce{_parse(t){if(this._getType(t)!==le.null){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.null,received:r.parsedType}),ve}return Ut(t.data)}}ol.create=e=>new ol({typeName:ge.ZodNull,...xe(e)});class ad extends Ce{constructor(){super(...arguments),this._any=!0}_parse(t){return Ut(t.data)}}ad.create=e=>new ad({typeName:ge.ZodAny,...xe(e)});class Mo extends Ce{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ut(t.data)}}Mo.create=e=>new Mo({typeName:ge.ZodUnknown,...xe(e)});class ur extends Ce{_parse(t){const n=this._getOrReturnCtx(t);return oe(n,{code:X.invalid_type,expected:le.never,received:n.parsedType}),ve}}ur.create=e=>new ur({typeName:ge.ZodNever,...xe(e)});class ld extends Ce{_parse(t){if(this._getType(t)!==le.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.void,received:r.parsedType}),ve}return Ut(t.data)}}ld.create=e=>new ld({typeName:ge.ZodVoid,...xe(e)});class An extends Ce{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==le.array)return oe(n,{code:X.invalid_type,expected:le.array,received:n.parsedType}),ve;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(oe(n,{code:i?X.too_big:X.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&&(oe(n,{code:X.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&&(oe(n,{code:X.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 Dn(n,i,n.path,a)))).then(i=>$t.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Dn(n,i,n.path,a)));return $t.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new An({...this._def,minLength:{value:t,message:fe.toString(n)}})}max(t,n){return new An({...this._def,maxLength:{value:t,message:fe.toString(n)}})}length(t,n){return new An({...this._def,exactLength:{value:t,message:fe.toString(n)}})}nonempty(t){return this.min(1,t)}}An.create=(e,t)=>new An({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ge.ZodArray,...xe(t)});function go(e){if(e instanceof lt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=$n.create(go(r))}return new lt({...e._def,shape:()=>t})}else return e instanceof An?new An({...e._def,type:go(e.element)}):e instanceof $n?$n.create(go(e.unwrap())):e instanceof Yr?Yr.create(go(e.unwrap())):e instanceof Un?Un.create(e.items.map(t=>go(t))):e}class lt extends Ce{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=Oe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==le.object){const c=this._getOrReturnCtx(t);return oe(c,{code:X.invalid_type,expected:le.object,received:c.parsedType}),ve}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof ur&&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 Dn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof ur){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&&(oe(o,{code:X.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 Dn(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=>$t.mergeObjectSync(r,c)):$t.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return fe.errToObj,new lt({...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=fe.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new lt({...this._def,unknownKeys:"strip"})}passthrough(){return new lt({...this._def,unknownKeys:"passthrough"})}extend(t){return new lt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new lt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ge.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new lt({...this._def,catchall:t})}pick(t){const n={};return Oe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new lt({...this._def,shape:()=>n})}omit(t){const n={};return Oe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new lt({...this._def,shape:()=>n})}deepPartial(){return go(this)}partial(t){const n={};return Oe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new lt({...this._def,shape:()=>n})}required(t){const n={};return Oe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof $n;)s=s._def.innerType;n[r]=s}}),new lt({...this._def,shape:()=>n})}keyof(){return zw(Oe.objectKeys(this.shape))}}lt.create=(e,t)=>new lt({shape:()=>e,unknownKeys:"strip",catchall:ur.create(),typeName:ge.ZodObject,...xe(t)});lt.strictCreate=(e,t)=>new lt({shape:()=>e,unknownKeys:"strict",catchall:ur.create(),typeName:ge.ZodObject,...xe(t)});lt.lazycreate=(e,t)=>new lt({shape:e,unknownKeys:"strip",catchall:ur.create(),typeName:ge.ZodObject,...xe(t)});class sl extends Ce{_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 rn(a.ctx.common.issues));return oe(n,{code:X.invalid_union,unionErrors:i}),ve}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 rn(l));return oe(n,{code:X.invalid_union,unionErrors:a}),ve}}get options(){return this._def.options}}sl.create=(e,t)=>new sl({options:e,typeName:ge.ZodUnion,...xe(t)});const Fn=e=>e instanceof ll?Fn(e.schema):e instanceof Gn?Fn(e.innerType()):e instanceof cl?[e.value]:e instanceof Gr?e.options:e instanceof ul?Oe.objectValues(e.enum):e instanceof dl?Fn(e._def.innerType):e instanceof rl?[void 0]:e instanceof ol?[null]:e instanceof $n?[void 0,...Fn(e.unwrap())]:e instanceof Yr?[null,...Fn(e.unwrap())]:e instanceof Hw||e instanceof hl?Fn(e.unwrap()):e instanceof fl?Fn(e._def.innerType):[];class ch extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==le.object)return oe(n,{code:X.invalid_type,expected:le.object,received:n.parsedType}),ve;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}):(oe(n,{code:X.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ve)}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=Fn(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 ch({typeName:ge.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...xe(r)})}}function cd(e,t){const n=Ar(e),r=Ar(t);if(e===t)return{valid:!0,data:e};if(n===le.object&&r===le.object){const o=Oe.objectKeys(t),s=Oe.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=cd(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===le.array&&r===le.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=cd(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===le.date&&r===le.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class il extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(yy(s)||yy(i))return ve;const a=cd(s.value,i.value);return a.valid?((vy(s)||vy(i))&&n.dirty(),{status:n.value,value:a.data}):(oe(r,{code:X.invalid_intersection_types}),ve)};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}))}}il.create=(e,t,n)=>new il({left:e,right:t,typeName:ge.ZodIntersection,...xe(n)});class Un extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==le.array)return oe(r,{code:X.invalid_type,expected:le.array,received:r.parsedType}),ve;if(r.data.length<this._def.items.length)return oe(r,{code:X.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ve;!this._def.rest&&r.data.length>this._def.items.length&&(oe(r,{code:X.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 Dn(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>$t.mergeArray(n,i)):$t.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Un({...this._def,rest:t})}}Un.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Un({items:e,typeName:ge.ZodTuple,rest:null,...xe(t)})};class al extends Ce{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!==le.object)return oe(r,{code:X.invalid_type,expected:le.object,received:r.parsedType}),ve;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Dn(r,a,r.path,a)),value:i._parse(new Dn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?$t.mergeObjectAsync(n,o):$t.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ce?new al({keyType:t,valueType:n,typeName:ge.ZodRecord,...xe(r)}):new al({keyType:Vn.create(),valueType:t,typeName:ge.ZodRecord,...xe(n)})}}class ud extends Ce{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!==le.map)return oe(r,{code:X.invalid_type,expected:le.map,received:r.parsedType}),ve;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Dn(r,a,r.path,[c,"key"])),value:s._parse(new Dn(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 ve;(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 ve;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}ud.create=(e,t,n)=>new ud({valueType:t,keyType:e,typeName:ge.ZodMap,...xe(n)});class es extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==le.set)return oe(r,{code:X.invalid_type,expected:le.set,received:r.parsedType}),ve;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(oe(r,{code:X.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&&(oe(r,{code:X.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 ve;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 Dn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new es({...this._def,minSize:{value:t,message:fe.toString(n)}})}max(t,n){return new es({...this._def,maxSize:{value:t,message:fe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}es.create=(e,t)=>new es({valueType:e,minSize:null,maxSize:null,typeName:ge.ZodSet,...xe(t)});class Gs extends Ce{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==le.function)return oe(n,{code:X.invalid_type,expected:le.function,received:n.parsedType}),ve;function r(a,l){return od({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,rd(),fi].filter(c=>!!c),issueData:{code:X.invalid_arguments,argumentsError:l}})}function o(a,l){return od({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,rd(),fi].filter(c=>!!c),issueData:{code:X.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof mi){const a=this;return Ut(async function(...l){const c=new rn([]),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 Ut(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new rn([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new rn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Gs({...this._def,args:Un.create(t).rest(Mo.create())})}returns(t){return new Gs({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Gs({args:t||Un.create([]).rest(Mo.create()),returns:n||Mo.create(),typeName:ge.ZodFunction,...xe(r)})}}class ll extends Ce{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})}}ll.create=(e,t)=>new ll({getter:e,typeName:ge.ZodLazy,...xe(t)});class cl extends Ce{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return oe(n,{received:n.data,code:X.invalid_literal,expected:this._def.value}),ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}cl.create=(e,t)=>new cl({value:e,typeName:ge.ZodLiteral,...xe(t)});function zw(e,t){return new Gr({values:e,typeName:ge.ZodEnum,...xe(t)})}class Gr extends Ce{constructor(){super(...arguments),Os.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{expected:Oe.joinValues(r),received:n.parsedType,code:X.invalid_type}),ve}if(nl(this,Os)||$w(this,Os,new Set(this._def.values)),!nl(this,Os).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{received:n.data,code:X.invalid_enum_value,options:r}),ve}return Ut(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 Gr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Gr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Os=new WeakMap;Gr.create=zw;class ul extends Ce{constructor(){super(...arguments),_s.set(this,void 0)}_parse(t){const n=Oe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==le.string&&r.parsedType!==le.number){const o=Oe.objectValues(n);return oe(r,{expected:Oe.joinValues(o),received:r.parsedType,code:X.invalid_type}),ve}if(nl(this,_s)||$w(this,_s,new Set(Oe.getValidEnumValues(this._def.values))),!nl(this,_s).has(t.data)){const o=Oe.objectValues(n);return oe(r,{received:r.data,code:X.invalid_enum_value,options:o}),ve}return Ut(t.data)}get enum(){return this._def.values}}_s=new WeakMap;ul.create=(e,t)=>new ul({values:e,typeName:ge.ZodNativeEnum,...xe(t)});class mi extends Ce{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==le.promise&&n.common.async===!1)return oe(n,{code:X.invalid_type,expected:le.promise,received:n.parsedType}),ve;const r=n.parsedType===le.promise?n.data:Promise.resolve(n.data);return Ut(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}mi.create=(e,t)=>new mi({type:e,typeName:ge.ZodPromise,...xe(t)});class Gn extends Ce{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ge.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=>{oe(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 ve;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?ve:l.status==="dirty"||n.value==="dirty"?As(l.value):l});{if(n.value==="aborted")return ve;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?ve:a.status==="dirty"||n.value==="dirty"?As(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"?ve:(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"?ve:(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(!el(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=>el(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);Oe.assertNever(o)}}Gn.create=(e,t,n)=>new Gn({schema:e,typeName:ge.ZodEffects,effect:t,...xe(n)});Gn.createWithPreprocess=(e,t,n)=>new Gn({schema:t,effect:{type:"preprocess",transform:e},typeName:ge.ZodEffects,...xe(n)});class $n extends Ce{_parse(t){return this._getType(t)===le.undefined?Ut(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}$n.create=(e,t)=>new $n({innerType:e,typeName:ge.ZodOptional,...xe(t)});class Yr extends Ce{_parse(t){return this._getType(t)===le.null?Ut(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Yr.create=(e,t)=>new Yr({innerType:e,typeName:ge.ZodNullable,...xe(t)});class dl extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===le.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}dl.create=(e,t)=>new dl({innerType:e,typeName:ge.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...xe(t)});class fl extends Ce{_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 tl(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new rn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new rn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}fl.create=(e,t)=>new fl({innerType:e,typeName:ge.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...xe(t)});class dd extends Ce{_parse(t){if(this._getType(t)!==le.nan){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.nan,received:r.parsedType}),ve}return{status:"valid",value:t.data}}}dd.create=e=>new dd({typeName:ge.ZodNaN,...xe(e)});class Hw extends Ce{_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 Ll extends Ce{_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"?ve:s.status==="dirty"?(n.dirty(),As(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"?ve: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 Ll({in:t,out:n,typeName:ge.ZodPipeline})}}class hl extends Ce{_parse(t){const n=this._def.innerType._parse(t),r=o=>(el(o)&&(o.value=Object.freeze(o.value)),o);return tl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}hl.create=(e,t)=>new hl({innerType:e,typeName:ge.ZodReadonly,...xe(t)});lt.lazycreate;var ge;(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"})(ge||(ge={}));Vn.create;Ur.create;dd.create;Jo.create;sd.create;hi.create;id.create;rl.create;ol.create;ad.create;Mo.create;ur.create;ld.create;An.create;lt.create;lt.strictCreate;sl.create;ch.create;il.create;Un.create;al.create;ud.create;es.create;Gs.create;ll.create;cl.create;Gr.create;ul.create;mi.create;Gn.create;$n.create;Yr.create;Gn.createWithPreprocess;Ll.create;const u$=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},d$=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const s=t[o];if(o===r)e[s]=n;else{if(!(s in e)||typeof e[s]!="object"){const i=t[o+1];e[s]=isNaN(Number(i))?{}:[]}e=e[s]}}},Uw=e=>e.replace(/\[(\d+)]/g,".$1").split("."),sn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):Uw(t),o=structuredClone(e);return d$(o,r,n),o},f$=(e,t)=>e.localeCompare(t),Rs={},Gw=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return Yw(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=Gw(e._def.innerType);return t==="ZodArray"?n??[]:n}},Yw=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,Gw(n)])),qw=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],s=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof s=="object"&&s!==null&&!Array.isArray(s)?n[r]=qw(s,o):n[r]=o||s)}return n},h$={sort:f$,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},Kw=e=>{const t=new FormData(e),n=new URLSearchParams(t);return GV.parse(n.toString(),h$)},Pr=(e,t)=>Uw(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),er=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Jc=e=>{const t=e.dataset.target;if(!t)return er(e);const n=document.querySelector(`[data-origin="${t}"]`);return er(n||e)},m$={state:{},loading:!1,useOnChange:!1},xy=e=>e.dataset.target||e.name,p$=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=Oo.LocalStorage.get(t);return u$(n)?n:{}},clear:()=>void Oo.LocalStorage.delete(t),set:n=>Oo.LocalStorage.set(t,n)}},g$=(e,t,n=m$)=>{const[r,o]=x.useState(null),s=x.useRef({}),[i,a]=x.useState(()=>it.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??Yw(e)??{}),l=x.useCallback(y=>{var I;const g=y.target,T=y.currentTarget;if(g.dataset.optional==="true")return;const E=xy(g),C=Jc(g)||(T?er(T):""),k=Pr(E,e);if(g.setAttribute("data-initialized","true"),k){const A=k.safeParse(C),N=A.success?void 0:((I=A.error.issues[0])==null?void 0:I.message)??"";o(M=>sn(M??{},E,N))}},[]),c=x.useCallback(y=>g=>{const T=g.currentTarget,S=Object.values(s.current).reduce((C,k)=>{var L;const I=k.element,A=k.schema.safeParse(er(I));if(I.dataset.ignore==="ignore"||A.success)return C;const N=(L=A.error.issues[0])==null?void 0:L.message;I.setAttribute("data-initialized","true");const M=I.dataset.name||I.name||"";return sn(C,M,N)},{}),E=it.empty(S)?null:S;o(E),console.error(E),y==null||y({form:T,errors:E||{}})},[]),u=(y,g=Rs)=>{const T=Pr(y,e),S=E=>{var k;if(!E)return;const C=E instanceof Date?E.toISOString():E.target.value;a(I=>sn(I,y,C)),(k=g==null?void 0:g.onChange)==null||k.call(g,E)};return{...g,loading:n.loading,name:y,id:y,onChange:S,form:t,date:it.string(i[y])?new Date(i[y]):i[y],required:g.required??!T.isOptional(),error:r==null?void 0:r[y],ref:E=>{E!==null&&(s.current[y]={element:E,schema:T})}}},d=(y,g=Rs)=>{const T=Pr(y,e);return{...g,name:y,id:y,onChange:E=>{var k;const C=E.target.value;a(I=>sn(I,y,C)),(k=g==null?void 0:g.onChange)==null||k.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:wr(r,y,void 0),value:wr(i,y,void 0)||"",required:g.required??!T.isOptional(),ref:E=>E!==null?s.current[y]={element:E,schema:T}:void 0}},f=(y,g=Rs)=>{const T=Pr(y,e);return{...g,name:y,id:y,onChange:E=>{var k;const C=E.target.checked;a(I=>sn(I??{},y,C)),(k=g==null?void 0:g.onChange)==null||k.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:wr(r,y,void 0),required:g.required??!T.isOptional(),ref:E=>E!==null?void(s.current[y]={element:E,schema:T}):void 0}},h=(y,g=Rs)=>{const T=Pr(y,e),S=E=>{var k,I;(k=E.persist)==null||k.call(E);const C=E.target.value;(I=g==null?void 0:g.onChange)==null||I.call(g,E),a(A=>sn(A,y,C))};return{...g,loading:n.loading,name:y,id:y,onChange:S,form:t,onInvalid:l,error:wr(r,y,void 0),required:g.required??!T.isOptional(),value:wr(i,y,void 0)||(g==null?void 0:g.value)||"",type:it.instance(T,Ur)?"number":(g==null?void 0:g.type)??"text",ref:E=>E===null?void 0:s.current[y]={element:E,schema:T}}},p=(y,g=Rs)=>{const T=Pr(y,e),S=T._def.typeName==="ZodNumber";return{...g,name:y,id:y,onChange:C=>{var I,A;(I=C.persist)==null||I.call(C);const k=S?C.target.valueAsNumber:C.target.value;(A=g==null?void 0:g.onChange)==null||A.call(g,C),a(N=>sn(N,y,k))},form:t,loading:n.loading,onInvalid:l,error:wr(r,y,void 0),required:g.required??!T.isOptional(),type:S?"number":(g==null?void 0:g.type)??"text",value:wr(i,y,void 0)||(g==null?void 0:g.value)||"",ref:C=>C===null?void 0:void(s.current[y]={element:C,schema:T})}};x.useEffect(()=>{const y=Object.values(s.current).map(T=>{const S=T.element.dataset.origin?document.querySelector(`[data-target="${T.element.name}"]`):T.element,E=T.schema.safeParse(er(S)),C=N=>{var j;const M=xy(N.target);if(!M)return!1;const L=N.target,P=Jc(N.target)||(N.relatedTarget?er(N.relatedTarget):""),O=T.schema.safeParse(P);if(L.setAttribute("value",P),O.success)return S.setCustomValidity(""),o(D=>{if(it.null(D))return null;const V=sn(D,M,void 0);return it.empty(D)||it.nil(D)||it.empty(V)?null:V}),!1;if(S.required){const D=((j=O.error.issues[0])==null?void 0:j.message)||"";S.setCustomValidity(D),o(V=>{if(it.null(V))return null;const H=sn(V,M,D||void 0);return it.empty(H)?null:H})}return!1},k=new AbortController,I=S.getAttribute("data-trigger")||"blur";S.addEventListener(I,C,{signal:k.signal});const A=S.dataset.shadow?!1:S.required?!E.success:!1;return{input:T,hasInitialError:A,unsubscribe:()=>k.abort()}});return y.some(T=>T.hasInitialError)&&o(T=>T===null?{}:T),()=>y.forEach(T=>T.unsubscribe())});const m=y=>g=>{var A;g.preventDefault();const T=g.currentTarget;let S=Kw(T);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(T.elements)).forEach(N=>{if(N.tagName==="SELECT"){const M=N;S=sn(S,M.name,M.value)}if(N.tagName==="INPUT"){const M=N,L=Jc(M)||(M?er(M):"");S=sn(S,M.dataset.target||M.name,L)}});const C=qw(S,i),k=e.safeParse(C),I=()=>{var N;Cw(T),(N=n.interceptor)==null||N.clear()};if(k.success){const N=JSON.stringify(k.data);return T.setAttribute("data-json",N),(A=n.interceptor)==null||A.clear(),y==null?void 0:y(g,{form:T,event:g,reset:I,errors:[],success:!0,data:k.data,json:k.data})}return console.group("useForm error"),console.info(k),console.info(k.error.issues),console.error(k.error),console.groupEnd(),T.reportValidity(),y==null?void 0:y(g,{form:T,json:S,event:g,reset:I,data:S,success:!1,errors:k.error.issues.map(N=>({message:N.message,path:N.path.map(M=>String(M))}))})},v=y=>wd(i,y)||"",b=y=>({...y,id:t,name:t});return x.useEffect(()=>{var y;n.interceptor&&((y=n.interceptor)==null||y.set(i))},[i]),{get:v,input:p,state:i,errors:r,select:d,checkbox:f,onSubmit:m,setState:a,textarea:h,onInvalid:c,controller:b,datepicker:u,name:t,disabled:r!==null}},y$=e=>e?JSON.parse(e.getAttribute("data-json")):{},v$=e=>{const t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current};exports.Alert=oI;exports.Autocomplete=NL;exports.Button=jo;exports.Calendar=y0;exports.Card=v0;exports.Checkbox=eh;exports.ColType=_o;exports.Collapse=Vb;exports.ComponentsProvider=qO;exports.DatePicker=UL;exports.Dropdown=ps;exports.Empty=b0;exports.Expand=QD;exports.FileUpload=r2;exports.Form=s2;exports.Input=Ni;exports.InputFeedback=uw;exports.InputField=Di;exports.Menu=tN;exports.MenuItem=eN;exports.Modal=UN;exports.MultiCombobox=zL;exports.Notifications=eM;exports.Polymorph=ss;exports.Radiobox=i2;exports.RenderOnView=OT;exports.Select=Hr;exports.Stats=tM;exports.Switch=a2;exports.Tab=oM;exports.Table=hV;exports.Tabs=nM;exports.Tag=Td;exports.TaskList=l2;exports.Textarea=c2;exports.Toolbar=GN;exports.Tooltip=jx;exports.TransferList=f2;exports.createColumns=j2;exports.createCssProperties=WO;exports.createDesignTokens=f0;exports.createFormStorage=p$;exports.createOptionCols=sh;exports.createStyles=$O;exports.createTheme=BO;exports.createTokenStyles=zO;exports.css=Me;exports.defaultDarkTheme=GO;exports.defaultLightTheme=YO;exports.dispatchInput=xd;exports.formReset=Cw;exports.formToJson=Kw;exports.getJsonForm=y$;exports.getSchemaShape=Pr;exports.initializeInputDataset=bi;exports.isReactComponent=ET;exports.isReactFC=CT;exports.isSsr=Ta;exports.mergeRefs=bd;exports.negate=RT;exports.noop=Sd;exports.parsers=El;exports.path=wd;exports.reduceTokens=To;exports.safeRegex=au;exports.splitInto=zy;exports.useColorParser=KO;exports.useForm=g$;exports.useLocale=yf;exports.useNotification=Q_;exports.usePrevious=v$;exports.useReactive=W0;exports.useTablePreferences=V2;exports.useTranslations=Ct;exports.uuid=xi;
|
|
190
|
+
*/var iu,Ev;function pF(){if(Ev)return iu;Ev=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(u){return a[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 iu=o()?Object.assign:function(i,a){for(var s,l=r(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){c=e(s);for(var p=0;p<c.length;p++)n.call(s,c[p])&&(l[c[p]]=s[c[p]])}}return l},iu}var au,Cv;function fp(){if(Cv)return au;Cv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return au=e,au}var su,kv;function Zw(){return kv||(kv=1,su=Function.call.bind(Object.prototype.hasOwnProperty)),su}var lu,Rv;function hF(){if(Rv)return lu;Rv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=fp(),n={},r=Zw();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var p=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}d=i[u](a,u,l,s,null,t)}catch(h){d=h}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+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 f=c?c():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},lu=o,lu}var cu,Pv;function mF(){if(Pv)return cu;Pv=1;var e=Kw(),t=pF(),n=fp(),r=Zw(),o=hF(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return cu=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(O){var B=O&&(c&&O[c]||O[u]);if(typeof B=="function")return B}var p="<<anonymous>>",f={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:g(),arrayOf:b,element:S(),elementType:T(),instanceOf:w,node:P(),objectOf:R,oneOf:C,oneOfType:I,shape:N,exact:V};function h(O,B){return O===B?O!==0||1/O===1/B:O!==O&&B!==B}function y(O,B){this.message=O,this.data=B&&typeof B=="object"?B:{},this.stack=""}y.prototype=Error.prototype;function m(O){if(process.env.NODE_ENV!=="production")var B={},Q=0;function re(K,U,Y,F,W,Z,oe){if(F=F||p,Z=Z||Y,oe!==n){if(l){var $=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw $.name="Invariant Violation",$}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ye=F+":"+Y;!B[ye]&&Q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+F+"`. 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."),B[ye]=!0,Q++)}}return U[Y]==null?K?U[Y]===null?new y("The "+W+" `"+Z+"` is marked as required "+("in `"+F+"`, but its value is `null`.")):new y("The "+W+" `"+Z+"` is marked as required in "+("`"+F+"`, but its value is `undefined`.")):null:O(U,Y,F,W,Z)}var J=re.bind(null,!1);return J.isRequired=re.bind(null,!0),J}function v(O){function B(Q,re,J,K,U,Y){var F=Q[re],W=D(F);if(W!==O){var Z=L(F);return new y("Invalid "+K+" `"+U+"` of type "+("`"+Z+"` supplied to `"+J+"`, expected ")+("`"+O+"`."),{expectedType:O})}return null}return m(B)}function g(){return m(a)}function b(O){function B(Q,re,J,K,U){if(typeof O!="function")return new y("Property `"+U+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var Y=Q[re];if(!Array.isArray(Y)){var F=D(Y);return new y("Invalid "+K+" `"+U+"` of type "+("`"+F+"` supplied to `"+J+"`, expected an array."))}for(var W=0;W<Y.length;W++){var Z=O(Y,W,J,K,U+"["+W+"]",n);if(Z instanceof Error)return Z}return null}return m(B)}function S(){function O(B,Q,re,J,K){var U=B[Q];if(!s(U)){var Y=D(U);return new y("Invalid "+J+" `"+K+"` of type "+("`"+Y+"` supplied to `"+re+"`, expected a single ReactElement."))}return null}return m(O)}function T(){function O(B,Q,re,J,K){var U=B[Q];if(!e.isValidElementType(U)){var Y=D(U);return new y("Invalid "+J+" `"+K+"` of type "+("`"+Y+"` supplied to `"+re+"`, expected a single ReactElement type."))}return null}return m(O)}function w(O){function B(Q,re,J,K,U){if(!(Q[re]instanceof O)){var Y=O.name||p,F=z(Q[re]);return new y("Invalid "+K+" `"+U+"` of type "+("`"+F+"` supplied to `"+J+"`, expected ")+("instance of `"+Y+"`."))}return null}return m(B)}function C(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function B(Q,re,J,K,U){for(var Y=Q[re],F=0;F<O.length;F++)if(h(Y,O[F]))return null;var W=JSON.stringify(O,function(oe,$){var ye=L($);return ye==="symbol"?String($):$});return new y("Invalid "+K+" `"+U+"` of value `"+String(Y)+"` "+("supplied to `"+J+"`, expected one of "+W+"."))}return m(B)}function R(O){function B(Q,re,J,K,U){if(typeof O!="function")return new y("Property `"+U+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var Y=Q[re],F=D(Y);if(F!=="object")return new y("Invalid "+K+" `"+U+"` of type "+("`"+F+"` supplied to `"+J+"`, expected an object."));for(var W in Y)if(r(Y,W)){var Z=O(Y,W,J,K,U+"."+W,n);if(Z instanceof Error)return Z}return null}return m(B)}function I(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<O.length;B++){var Q=O[B];if(typeof Q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+_(Q)+" at index "+B+"."),a}function re(J,K,U,Y,F){for(var W=[],Z=0;Z<O.length;Z++){var oe=O[Z],$=oe(J,K,U,Y,F,n);if($==null)return null;$.data&&r($.data,"expectedType")&&W.push($.data.expectedType)}var ye=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new y("Invalid "+Y+" `"+F+"` supplied to "+("`"+U+"`"+ye+"."))}return m(re)}function P(){function O(B,Q,re,J,K){return k(B[Q])?null:new y("Invalid "+J+" `"+K+"` supplied to "+("`"+re+"`, expected a ReactNode."))}return m(O)}function j(O,B,Q,re,J){return new y((O||"React class")+": "+B+" type `"+Q+"."+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function N(O){function B(Q,re,J,K,U){var Y=Q[re],F=D(Y);if(F!=="object")return new y("Invalid "+K+" `"+U+"` of type `"+F+"` "+("supplied to `"+J+"`, expected `object`."));for(var W in O){var Z=O[W];if(typeof Z!="function")return j(J,K,U,W,L(Z));var oe=Z(Y,W,J,K,U+"."+W,n);if(oe)return oe}return null}return m(B)}function V(O){function B(Q,re,J,K,U){var Y=Q[re],F=D(Y);if(F!=="object")return new y("Invalid "+K+" `"+U+"` of type `"+F+"` "+("supplied to `"+J+"`, expected `object`."));var W=t({},Q[re],O);for(var Z in W){var oe=O[Z];if(r(O,Z)&&typeof oe!="function")return j(J,K,U,Z,L(oe));if(!oe)return new y("Invalid "+K+" `"+U+"` key `"+Z+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(Q[re],null," ")+`
|
|
191
|
+
Valid keys: `+JSON.stringify(Object.keys(O),null," "));var $=oe(Y,Z,J,K,U+"."+Z,n);if($)return $}return null}return m(B)}function k(O){switch(typeof O){case"number":case"string":case"undefined":return!0;case"boolean":return!O;case"object":if(Array.isArray(O))return O.every(k);if(O===null||s(O))return!0;var B=d(O);if(B){var Q=B.call(O),re;if(B!==O.entries){for(;!(re=Q.next()).done;)if(!k(re.value))return!1}else for(;!(re=Q.next()).done;){var J=re.value;if(J&&!k(J[1]))return!1}}else return!1;return!0;default:return!1}}function M(O,B){return O==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function D(O){var B=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":M(B,O)?"symbol":B}function L(O){if(typeof O>"u"||O===null)return""+O;var B=D(O);if(B==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return B}function _(O){var B=L(O);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function z(O){return!O.constructor||!O.constructor.name?p:O.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},cu}var uu,Av;function gF(){if(Av)return uu;Av=1;var e=fp();function t(){}function n(){}return n.resetWarningCache=t,uu=function(){function r(a,s,l,c,u,d){if(d!==e){var p=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 p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},uu}var Iv;function vF(){if(Iv)return qa.exports;if(Iv=1,process.env.NODE_ENV!=="production"){var e=Kw(),t=!0;qa.exports=mF()(e.isElement,t)}else qa.exports=gF()();return qa.exports}var yF=vF();const et=hy(yF);function io(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}const xF=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Uo(e,t,n){const r=bF(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Ov(r,"path",i),Ov(r,"relativePath",i),r}function bF(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=xF.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Ov(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const wF=[".DS_Store","Thumbs.db"];function TF(e){return io(this,void 0,void 0,function*(){return Is(e)&&SF(e.dataTransfer)?RF(e.dataTransfer,e.type):EF(e)?CF(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?kF(e):[]})}function SF(e){return Is(e)}function EF(e){return Is(e)&&Is(e.target)}function Is(e){return typeof e=="object"&&e!==null}function CF(e){return hd(e.target.files).map(t=>Uo(t))}function kF(e){return io(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Uo(n))})}function RF(e,t){return io(this,void 0,void 0,function*(){if(e.items){const n=hd(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(PF));return _v(Xw(r))}return _v(hd(e.files).map(n=>Uo(n)))})}function _v(e){return e.filter(t=>wF.indexOf(t.name)===-1)}function hd(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function PF(e){if(typeof e.webkitGetAsEntry!="function")return Mv(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Qw(t):Mv(e,t)}function Xw(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Xw(n):[n]],[])}function Mv(e,t){return io(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const a=yield i.getFile();return a.handle=i,Uo(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Uo(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function AF(e){return io(this,void 0,void 0,function*(){return e.isDirectory?Qw(e):IF(e)})}function Qw(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>io(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(AF));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function IF(e){return io(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Uo(r,e.fullPath);t(o)},r=>{n(r)})})})}var Ga={},Dv;function OF(){return Dv||(Dv=1,Ga.__esModule=!0,Ga.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0}),Ga}var _F=OF();const du=hy(_F);function jv(e){return jF(e)||DF(e)||e1(e)||MF()}function MF(){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 DF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jF(e){if(Array.isArray(e))return md(e)}function Nv(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 Fv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nv(Object(n),!0).forEach(function(r){Jw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ia(e,t){return LF(e)||FF(e,t)||e1(e,t)||NF()}function NF(){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 e1(e,t){if(e){if(typeof e=="string")return md(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 md(e,t)}}function md(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function FF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function LF(e){if(Array.isArray(e))return e}var VF=typeof du=="function"?du:du.default,zF="file-invalid-type",$F="file-too-large",BF="file-too-small",HF="too-many-files",WF=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:zF,message:"File type must be ".concat(r)}},Lv=function(t){return{code:$F,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Vv=function(t){return{code:BF,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},qF={code:HF,message:"Too many files"};function t1(e,t){var n=e.type==="application/x-moz-file"||VF(e,t);return[n,n?null:WF(t)]}function n1(e,t,n){if(jr(e.size))if(jr(t)&&jr(n)){if(e.size>n)return[!1,Lv(n)];if(e.size<t)return[!1,Vv(t)]}else{if(jr(t)&&e.size<t)return[!1,Vv(t)];if(jr(n)&&e.size>n)return[!1,Lv(n)]}return[!0,null]}function jr(e){return e!=null}function UF(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(l){var c=t1(l,n),u=ia(c,1),d=u[0],p=n1(l,r,o),f=ia(p,1),h=f[0],y=s?s(l):null;return d&&h&&!y})}function Os(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 zv(e){e.preventDefault()}function GF(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function YF(e){return e.indexOf("Edge/")!==-1}function KF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return GF(e)||YF(e)}function En(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!Os(r)&&s&&s.apply(void 0,[r].concat(i)),Os(r)})}}function ZF(){return"showOpenFilePicker"in window}function XF(e){if(jr(e)){var t=Object.entries(e).filter(function(n){var r=ia(n,2),o=r[0],i=r[1],a=!0;return r1(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.')),a=!1),(!Array.isArray(i)||!i.every(o1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=ia(r,2),i=o[0],a=o[1];return Fv(Fv({},n),{},Jw({},i,a))},{});return[{description:"Files",accept:t}]}return e}function QF(e){if(jr(e))return Object.entries(e).reduce(function(t,n){var r=ia(n,2),o=r[0],i=r[1];return[].concat(jv(t),[o],jv(i))},[]).filter(function(t){return r1(t)||o1(t)}).join(",")}function JF(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function eL(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function r1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function o1(e){return/^.*\.[\w]+$/.test(e)}var tL=["children"],nL=["open"],rL=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],oL=["refKey","onChange","onClick"];function iL(e){return lL(e)||sL(e)||i1(e)||aL()}function aL(){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 sL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lL(e){if(Array.isArray(e))return gd(e)}function fu(e,t){return dL(e)||uL(e,t)||i1(e,t)||cL()}function cL(){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 i1(e,t){if(e){if(typeof e=="string")return gd(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 gd(e,t)}}function gd(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 uL(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function dL(e){if(Array.isArray(e))return e}function $v(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 ut(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$v(Object(n),!0).forEach(function(r){vd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$v(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vd(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){if(e==null)return{};var n=fL(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fL(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var pp=E.forwardRef(function(e,t){var n=e.children,r=_s(e,tL),o=s1(r),i=o.open,a=_s(o,nL);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(ut(ut({},a),{},{open:i})))});pp.displayName="Dropzone";var a1={disabled:!1,getFilesFromEvent:TF,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};pp.defaultProps=a1;pp.propTypes={children:et.func,accept:et.objectOf(et.arrayOf(et.string)),multiple:et.bool,preventDropOnDocument:et.bool,noClick:et.bool,noKeyboard:et.bool,noDrag:et.bool,noDragEventsBubbling:et.bool,minSize:et.number,maxSize:et.number,maxFiles:et.number,disabled:et.bool,getFilesFromEvent:et.func,onFileDialogCancel:et.func,onFileDialogOpen:et.func,useFsAccessApi:et.bool,autoFocus:et.bool,onDragEnter:et.func,onDragLeave:et.func,onDragOver:et.func,onDrop:et.func,onDropAccepted:et.func,onDropRejected:et.func,onError:et.func,validator:et.func};var yd={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function s1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ut(ut({},a1),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,h=t.onDropRejected,y=t.onFileDialogCancel,m=t.onFileDialogOpen,v=t.useFsAccessApi,g=t.autoFocus,b=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,w=t.noDrag,C=t.noDragEventsBubbling,R=t.onError,I=t.validator,P=E.useMemo(function(){return QF(n)},[n]),j=E.useMemo(function(){return XF(n)},[n]),N=E.useMemo(function(){return typeof m=="function"?m:Bv},[m]),V=E.useMemo(function(){return typeof y=="function"?y:Bv},[y]),k=E.useRef(null),M=E.useRef(null),D=E.useReducer(pL,yd),L=fu(D,2),_=L[0],z=L[1],O=_.isFocused,B=_.isFileDialogActive,Q=E.useRef(typeof window<"u"&&window.isSecureContext&&v&&ZF()),re=function(){!Q.current&&B&&setTimeout(function(){if(M.current){var le=M.current.files;le.length||(z({type:"closeDialog"}),V())}},300)};E.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[M,B,V,Q]);var J=E.useRef([]),K=function(le){k.current&&k.current.contains(le.target)||(le.preventDefault(),J.current=[])};E.useEffect(function(){return b&&(document.addEventListener("dragover",zv,!1),document.addEventListener("drop",K,!1)),function(){b&&(document.removeEventListener("dragover",zv),document.removeEventListener("drop",K))}},[k,b]),E.useEffect(function(){return!r&&g&&k.current&&k.current.focus(),function(){}},[k,g,r]);var U=E.useCallback(function(te){R?R(te):console.error(te)},[R]),Y=E.useCallback(function(te){te.preventDefault(),te.persist(),X(te),J.current=[].concat(iL(J.current),[te.target]),Ya(te)&&Promise.resolve(o(te)).then(function(le){if(!(Os(te)&&!C)){var Me=le.length,Ge=Me>0&&UF({files:le,accept:P,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),xt=Me>0&&!Ge;z({isDragAccept:Ge,isDragReject:xt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(te)}}).catch(function(le){return U(le)})},[o,c,U,C,P,a,i,s,l,I]),F=E.useCallback(function(te){te.preventDefault(),te.persist(),X(te);var le=Ya(te);if(le&&te.dataTransfer)try{te.dataTransfer.dropEffect="copy"}catch{}return le&&d&&d(te),!1},[d,C]),W=E.useCallback(function(te){te.preventDefault(),te.persist(),X(te);var le=J.current.filter(function(Ge){return k.current&&k.current.contains(Ge)}),Me=le.indexOf(te.target);Me!==-1&&le.splice(Me,1),J.current=le,!(le.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ya(te)&&u&&u(te))},[k,u,C]),Z=E.useCallback(function(te,le){var Me=[],Ge=[];te.forEach(function(xt){var ct=t1(xt,P),_t=fu(ct,2),fn=_t[0],Sn=_t[1],Xn=n1(xt,a,i),Qn=fu(Xn,2),Jn=Qn[0],H=Qn[1],q=I?I(xt):null;if(fn&&Jn&&!q)Me.push(xt);else{var Le=[Sn,H];q&&(Le=Le.concat(q)),Ge.push({file:xt,errors:Le.filter(function(Xe){return Xe})})}}),(!s&&Me.length>1||s&&l>=1&&Me.length>l)&&(Me.forEach(function(xt){Ge.push({file:xt,errors:[qF]})}),Me.splice(0)),z({acceptedFiles:Me,fileRejections:Ge,isDragReject:Ge.length>0,type:"setFiles"}),p&&p(Me,Ge,le),Ge.length>0&&h&&h(Ge,le),Me.length>0&&f&&f(Me,le)},[z,s,P,a,i,l,p,f,h,I]),oe=E.useCallback(function(te){te.preventDefault(),te.persist(),X(te),J.current=[],Ya(te)&&Promise.resolve(o(te)).then(function(le){Os(te)&&!C||Z(le,te)}).catch(function(le){return U(le)}),z({type:"reset"})},[o,Z,U,C]),$=E.useCallback(function(){if(Q.current){z({type:"openDialog"}),N();var te={multiple:s,types:j};window.showOpenFilePicker(te).then(function(le){return o(le)}).then(function(le){Z(le,null),z({type:"closeDialog"})}).catch(function(le){JF(le)?(V(le),z({type:"closeDialog"})):eL(le)?(Q.current=!1,M.current?(M.current.value=null,M.current.click()):U(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."))):U(le)});return}M.current&&(z({type:"openDialog"}),N(),M.current.value=null,M.current.click())},[z,N,V,v,Z,U,j,s]),ye=E.useCallback(function(te){!k.current||!k.current.isEqualNode(te.target)||(te.key===" "||te.key==="Enter"||te.keyCode===32||te.keyCode===13)&&(te.preventDefault(),$())},[k,$]),ke=E.useCallback(function(){z({type:"focus"})},[]),Ae=E.useCallback(function(){z({type:"blur"})},[]),Ie=E.useCallback(function(){S||(KF()?setTimeout($,0):$())},[S,$]),G=function(le){return r?null:le},ae=function(le){return T?null:G(le)},ie=function(le){return w?null:G(le)},X=function(le){C&&le.stopPropagation()},ue=E.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=te.refKey,Me=le===void 0?"ref":le,Ge=te.role,xt=te.onKeyDown,ct=te.onFocus,_t=te.onBlur,fn=te.onClick,Sn=te.onDragEnter,Xn=te.onDragOver,Qn=te.onDragLeave,Jn=te.onDrop,H=_s(te,rL);return ut(ut(vd({onKeyDown:ae(En(xt,ye)),onFocus:ae(En(ct,ke)),onBlur:ae(En(_t,Ae)),onClick:G(En(fn,Ie)),onDragEnter:ie(En(Sn,Y)),onDragOver:ie(En(Xn,F)),onDragLeave:ie(En(Qn,W)),onDrop:ie(En(Jn,oe)),role:typeof Ge=="string"&&Ge!==""?Ge:"presentation"},Me,k),!r&&!T?{tabIndex:0}:{}),H)}},[k,ye,ke,Ae,Ie,Y,F,W,oe,T,w,r]),ge=E.useCallback(function(te){te.stopPropagation()},[]),be=E.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=te.refKey,Me=le===void 0?"ref":le,Ge=te.onChange,xt=te.onClick,ct=_s(te,oL),_t=vd({accept:P,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:G(En(Ge,oe)),onClick:G(En(xt,ge)),tabIndex:-1},Me,M);return ut(ut({},_t),ct)}},[M,n,s,oe,r]);return ut(ut({},_),{},{isFocused:O&&!r,getRootProps:ue,getInputProps:be,rootRef:k,inputRef:M,open:G($)})}function pL(e,t){switch(t.type){case"focus":return ut(ut({},e),{},{isFocused:!0});case"blur":return ut(ut({},e),{},{isFocused:!1});case"openDialog":return ut(ut({},yd),{},{isFileDialogActive:!0});case"closeDialog":return ut(ut({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ut(ut({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ut(ut({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return ut({},yd);default:return e}}function Bv(){}const hL={isImage:e=>e.type.includes("image")},mL=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(hL.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:bv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:bv(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[x.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(Ao,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(jo,{})})]}):x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"flex flex-row items-center gap-4",children:[x.jsx(Pb,{size:48}),x.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(Ao,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(jo,{className:"text-danger"})})]})},gL=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(mL,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),vL=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(gL,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(E.Fragment,{children:e.idle}),yL=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(nA,{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"})]})]}),xL=({idle:e=yL,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=E.useState([]),a=d=>{n==null||n(d),i(d)},{getRootProps:s,getInputProps:l,isDragActive:c}=s1({onDrop:a});return x.jsxs("div",{...s(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(vL,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},bL=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})};class zr extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof zr&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map(n=>t(n[1]))}clone(t){const n=new zr(this);return t?t(n):n}}const wL=e=>x.jsx(E.Fragment,{children:e.children}),TL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},SL={caseSensitive:!1,sort:!1},Hv=[],EL=E.forwardRef(function(t,n){return x.jsx(vt.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(vr,{children:t.children})})}),CL=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(vt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),kL={List:EL,Item:CL},RL=e=>{const t=Ot(),n=E.useRef(null),r=E.Children.count(e.children),[o,i]=E.useState(!1);return E.useEffect(()=>{if(n.current===null)return;const a=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>a.width)return i(!0)},[r]),x.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?x.jsxs(jd,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},PL=E.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:h=!1,onChangeOptions:y,...m},v)=>{const g=E.useMemo(()=>new zr(r.map(X=>[X.value,X])),[r]),b=E.useRef(null),S=E.useRef(null),T=m.value??m.defaultValue??Hv,w=Ot(),[C,R]=E.useState(0),[I,P]=E.useState(!1),[j,N]=E.useState(""),[V,k]=E.useState(()=>{const X=new zr;return T.forEach(ue=>{const ge=g.get(ue);return ge?X.set(ue,ge):void 0}),X}),M=E.useMemo(()=>Array.from(V.keys()),[V]),[D,L]=E.useState(()=>{const X=new Set(T);return r.reduce((ue,ge)=>X.has(ge.value)?[...ue,ge.label??ge.value]:ue,[])??T}),[_,z]=E.useState(null),O=E.useRef(Hv),B=h&&j!==""?[{value:j,label:j,"data-dynamic":"true"},...r]:r,Q=new Lr(B,["value","label"],SL).search(j);E.useEffect(()=>{I||R(0)},[I]),E.useEffect(()=>{m.value&&k(new zr(m.value.map(X=>[X,g.get(X)])))},[m.value,g]);const{x:re,y:J,strategy:K,refs:U,context:Y}=to({open:I,transform:!0,strategy:"absolute",onOpenChange:P,whileElementsMounted:va,middleware:[ya(4),X0({padding:10,elementContext:"reference",apply(X){if(b.current===null)return;const ue=b.current.getBoundingClientRect().width,ge=360;ca.flushSync(()=>setTimeout(()=>R(ge),200)),Object.assign(X.elements.floating.style,{width:`${ue}px`,maxWidth:`${ue}px`,maxHeight:`${ge}px`,height:`${ge}px`})}})]}),F=pw(Y,TL),{getReferenceProps:W,getFloatingProps:Z,getItemProps:oe}=no([ro(Y,{role:"listbox"}),eo(Y),Gf(Y,{cols:0,listRef:O,loop:!0,virtual:!0,allowEscape:!0,activeIndex:_,selectedIndex:_,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:X=>z(ue=>X??ue)})]);E.useEffect(()=>{const X=U.reference.current;if(X)return ua(X)},[]);const $=(X,ue)=>{const ge=V.clone(le=>le.has(X.value)?le.remove(X.value):le.set(X.value,X));k(ge);const be=U.reference.current;if(!be)return;const te=ge.map(le=>le.value);be==null||be.setAttribute("data-value",JSON.stringify(te)),y&&y(te),L(le=>le.concat(X.label??"")),N(""),z(ue)},ye=X=>{const ue=X.target.value;return N(ue),!I&&ue===""?P(!0):(X.target.name=m.name||"",ue?P(!0):void 0)},ke=()=>{var X;P(!0),N(""),(X=U.reference.current)==null||X.focus()},Ae=()=>{P(!0),N("")},Ie=()=>{var X;(X=U.reference.current)==null||X.setAttribute("data-value","[]"),N(""),P(!1),k(new zr),y==null||y([])},G=m.id||m.name,ae=V.map(X=>x.jsx(jd,{size:"small",children:X.label??X.value},`MultiSelect-${X.value}-x`)),ie=Q.filter(X=>X.hidden!==!0);return x.jsxs(Ea,{...m,left:e,error:t,ref:b,form:m.form,name:m.name,feedback:d,hideLeft:p,required:f,title:m.title,container:o,rightLabel:i,interactive:a,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[n,x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:ke,children:[x.jsx(gf,{size:20}),x.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),V?x.jsx("button",{type:"button",onClick:Ie,className:"transition-colors link:text-danger",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("button",{...W({...m,onFocus:Ae,id:`${G}-shadow`,name:`${G}-shadow`,ref:U.setReference}),type:"button","data-name":G,"data-target":G,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":M.join(","),value:I?j:D||V,className:ze("input placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","truncate overflow-ellipsis",m.className),children:x.jsx(RL,{label:c,children:ae})}),x.jsx("input",{id:G,name:G,type:"hidden","data-origin":G,ref:v,required:f,defaultValue:m.value||M||void 0}),x.jsx(Jr,{preserveTabOrder:!0,children:I?x.jsx(ci,{guards:!0,returnFocus:!1,context:Y,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("div",{...Z({ref:U.setFloating,style:{...F.styles,position:K,left:(re??0)+(V?26:18),top:J??0}}),"data-floating":"true",className:"isolate z-floating m-0 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[x.jsx("input",{autoFocus:!0,value:j,onChange:ye,title:m.title,placeholder:w.multiSelectInnerPlaceholder,onKeyDown:X=>{var ue,ge;if(X.key==="ArrowDown"){let be=_+1;return be>Q.length-1&&(be=0),(ue=S.current)==null||ue.scrollIntoView({index:be}),z(be)}if(X.key==="ArrowUp"){let be=_-1;return be<0&&(be=Q.length-1),(ge=S.current)==null||ge.scrollIntoView({index:be}),z(be)}if(X.key==="Escape")return X.currentTarget.blur(),P(!1);if(X.key==="Enter"){if(_!==null&&Q[_])return X.preventDefault(),$(Q[_],_);if(Q.length===1)return X.preventDefault(),$(Q[0],0)}},className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary"}),Q.length===0?x.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||w.autocompleteEmpty})}):null,x.jsx(cp,{ref:S,data:ie,components:kL,hidden:ie.length===0,style:{height:V.size===0?C-49:C-86},className:"border-floating-border bg-floating-background p-0 text-foreground",itemContent:(X,ue)=>{const ge=ue.Render??wL,be=V.has(ue.value)||V.has(ue.label??""),te=_===X,le=ue.label??ue.value;return x.jsx("button",{"data-value":ue.value,...oe({ref:Me=>void(O.current[X]=Me),role:"option",type:"button","aria-checked":be,"aria-current":be,"aria-selected":be,"aria-busy":ue.disabled,onClick:()=>$(ue,X)}),className:`w-full cursor-pointer p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${be||te?"bg-floating-hover text-floating-foreground":""}`,children:x.jsx(dp,{onChange:Pf,checked:be,"aria-checked":be,onClick:Me=>{Me.stopPropagation(),$(ue,X)},children:x.jsx(ge,{...m,label:ue.label,value:ue.value,children:le})})})}}),V.size===0?null:x.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:ae})]})}):null})]})}),AL=({children:e,className:t="",size:n,...r})=>x.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[x.jsx("input",{...r,type:"radio",className:ze("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),Gr=E.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,optionalText:l,container:c,hideLeft:u=!1,right:d,left:p,error:f,...h},y)=>{const m=Ot(),v=E.useRef(null),g=h.id??h.name;E.useImperativeHandle(y,()=>v.current),E.useEffect(()=>{if(v.current===null)return;const S=new AbortController,T=v.current,w=ua(v.current);return T.addEventListener("change",()=>T.setAttribute("data-selected","true"),{once:!0,signal:S.signal}),()=>{w(),S.abort()}},[]);const b=()=>{var S;return(S=v.current)==null?void 0:S.focus()};return x.jsx(Ea,{info:n,left:p,error:f,form:h.form,name:h.name,feedback:o,hideLeft:u,required:e,title:h.title,container:c,componentName:"select",rightLabel:s,interactive:a,id:h.name||h.id,optionalText:l,labelClassName:i,placeholder:h.placeholder,right:x.jsx("label",{htmlFor:g,children:x.jsxs("button",{onClick:b,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(gf,{size:20}),x.jsx("span",{className:"sr-only",children:m.inputCaretDown})]})}),children:x.jsxs("select",{...h,id:g,name:g,value:h.value,required:e,ref:Dd(y,v),"data-selected":!!h.value||!1,defaultValue:h.value?void 0:"",title:typeof h.title=="string"?h.title:void 0,className:ze("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",h.className),children:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:h.placeholder}),t.map(S=>E.createElement("option",{...S,value:S.value,children:S.label??S.value,key:`${g}-select-option-${S.value}`}))]})})}),IL=E.forwardRef(({children:e,container:t,error:n,...r},o)=>{const i=E.useId(),[a,s]=E.useState(r.checked??!1),l=a,c=E.useRef(null),u=zi(r.onChange);E.useImperativeHandle(o,()=>c.current),E.useEffect(()=>{if(c.current!==null&&u.current){const p=f=>{f.target.checked=!f.target.checked,u.current&&u.current(f)};return c.current.addEventListener("change",p),()=>{var f;return(f=c.current)==null?void 0:f.removeEventListener("change",p)}}},[]);const d=()=>{var f,h;const p=!((f=c.current)!=null&&f.checked);s(p),(h=r==null?void 0:r.onCheck)==null||h.call(r,p),c.current!==null&&(c.current.checked=p,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:ze("flex flex-col flex-wrap justify-center",t),"data-component":"switch",children:[x.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[x.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||i,onChange:p=>s(p.target.checked),ref:c,type:"checkbox"}),x.jsx("button",{type:"button",role:"switch",onClick:d,"aria-checked":l,"data-checked":l,"aria-labelledby":`${i}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:x.jsx("span",{"aria-hidden":"true","data-checked":l,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),x.jsx("label",{htmlFor:r.id||i,className:"ml-3 inline-block text-sm",id:`${i}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})})]}),x.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),OL=e=>{const[t,n]=uP();return E.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const a=i.target,s=Array.from(r.querySelectorAll("input[data-task=true]")),l=s.every(u=>u.checked),c=s.indexOf(a);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:mP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},_L=Yw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
|
|
196
|
+
`);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),ML=e=>{const[t,n]=E.useState(0);return E.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},DL={Item:E.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},jL=e=>{const t=E.useRef(null),n=ML(t);return x.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[x.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[x.jsx("header",{className:"border-b border-card-border pb-2"}),x.jsxs("div",{className:"px-8 space-y-2",children:[x.jsx(Ca,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(cp,{height:n,useWindowScroll:!0,data:e.source,components:DL,itemContent:(r,o)=>x.jsx(E.Fragment,{children:x.jsx(dp,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(Ao,{children:x.jsx(vf,{})})}),x.jsx("div",{})]})};var NL=Object.defineProperty,Wv=Object.getOwnPropertySymbols,FL=Object.prototype.hasOwnProperty,LL=Object.prototype.propertyIsEnumerable,qv=(e,t,n)=>t in e?NL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,VL=(e,t)=>{for(var n in t||(t={}))FL.call(t,n)&&qv(e,n,t[n]);if(Wv)for(var n of Wv(t))LL.call(t,n)&&qv(e,n,t[n]);return e},hp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},zL=(e,t,n,r)=>Tl(hp,e,t,n,r),Go=e=>typeof e=="object",ur=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Go(e)&&!Go(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=>ur(e[r],t[r]))},$L=(e,t)=>(Go(e)||Array.isArray(e))&&t?e[t]:e,BL=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ms=e=>/[0-9.]+/.test(e),Uv=e=>["string","number"].includes(typeof e),Gv=e=>e==null||(e==null?void 0:e.length)===0||e==="",Yv={eq:ur,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:Gv,notEmpty:e=>!Gv(e),in:(e,t)=>hp(t,n=>ur(e,n)),notIn:(e,t)=>l1(t,n=>!ur(e,n))},HL=e=>{if(e in Yv)return Yv[e];throw new Error("Linq - Symbol not found")},ko=(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},Tl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=HL(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},WL=(e,t,n,r)=>Tl(ko,e,t,n,r),l1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},qL=(e,t,n,r)=>Tl(l1,e,t,n,r),c1=e=>{if(e===null)return null;const t=VL({},e);return Object.keys(t).forEach(n=>t[n]=Go(e[n])?c1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Kv=(e,t)=>{if(Go(t)){for(let n=0;n<e.length;n++){const r=e[n];if(ur(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(ur(t,r))return!0}return!1},UL=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},GL=e=>ko(e,(t,n,r)=>Go(t)?n===r.findIndex(o=>ur(o,t)):n===r.indexOf(t)),YL=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},u1=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},KL=(e,t)=>u1(e,n=>n[t]),Zv=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},ZL=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},XL=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return Ms(e)&&Ms(t)?r.map(a=>Number.parseInt(a)):r},pu=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ms(e)&&Ms(t)){const o=[],[i,a]=ZL(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return XL(e,t,r)},QL=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?pu(r,o,1):pu(r,i,Number.parseInt(o,10))}return Uv(e)&&Uv(t)?pu(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},hu=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const a=n[i];r=e(r,a,i,n)}return r},Xv=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},JL=(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)},e2=(e,t,n,r)=>Tl(JL,e,t,n,r),Qv=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(BL(t))},d1=(e=>(e.Asc="asc",e.Desc="desc",e))(d1||{}),t2=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.key,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),n2=(e,t)=>e.sort(t2(t)),r2=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ko(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},o2=class xd{constructor(t=[]){this.array=t}static Range(...t){return QL(...t)}static New(t){return new xd(t)}Where(t,n,r){return this.array=WL(this.array,t,n,r),this}Some(t,n,r){return zL(this.array,t,n,r)}All(t,n,r){return qL(this.array,t,n,r)}Reverse(){return this.array=Xv(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=e2(this.array,t,n,r),this}Distinct(){return this.array=GL(this.array),this}First(t){return t===void 0?this.array[0]:YL(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?hu((n,r)=>n+r,0,this.array):hu((n,r)=>n+$L(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return KL(this.array,t)}GroupWith(t){return u1(this.array,t)}Except(t){return ko(this.array,n=>!Kv(t,n))}Intersect(t){return ko(this.array,n=>Kv(t,n))}OrderBy(t,n){let r;return r=t?Qv(this.array,t):this.array.toSorted(),this.array=n==="desc"?Xv(r):r,this}Includes(t){return hp(this.array,n=>ur(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 hu(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Zv(this.array,n=>[t,n]))}Zip(t,n){return Zv(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ko(this.array,t).length}Get(t){return this.array[t]}Clone(){return new xd(c1(this.array))}ToObject(t){return UL(this.array,t)}Sort(t){return Array.isArray(t)?n2(this.array,t):Qv(this.array,t)}Unique(t){return r2(this.array,t)}},f1=o2,mu={},Jv;function i2(){return Jv||(Jv=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(m,v)=>{try{Object.keys(m).forEach(v)}catch(g){window.console.log(g)}},n=m=>m==null,r=m=>{const v=typeof m;return v==="string"||v==="number"||v==="boolean"||n(m)},o=(m,v)=>{const g=v.getItem(m);try{return JSON.parse(g)}catch{return g??null}},i=m=>Object.keys(m).reduce((v,g)=>({...v,[g]:o(g,m)}),{}),a=m=>m instanceof Date?m:typeof m=="number"?new Date(new Date*1+m*864e5):m,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(m=>m.split("=")).reduce((m,v)=>(m[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),m),{}),c=new Set,u=()=>{const m=l();c.forEach(v=>v(m))},d=[{name:"expires",parse:m=>`expires=${a(m.expires??s)}`},{name:"maxAge",parse:m=>m.maxAge?`max-age=${a(m.expires??s)}`:""},{name:"path",parse:m=>`path=${m.path??"/"}`},{name:"sameSite",parse:m=>`samesite=${m.sameSite??"strict"}`},{name:"useSecure",parse:m=>`${m.useSecure??!0?"secure":""}`},{name:"domain",parse:m=>{const v=m.domain??"";return v===""?"":`domain=${m.multiDomain?".":""}${v}`}},{name:"partitioned",parse:m=>m.partitioned?"Partitioned":""}],p={json:l,listener:m=>(c.add(m),()=>c.delete(m)),clearListeners:()=>c.clear(),has:m=>document.cookie.split(";").some(v=>v.trim().startsWith(`${m}=`)),deleteAll:()=>{document.cookie.split(";").forEach(m=>{document.cookie=m.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:m=>{const v=p.json()[m];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:m=>{document.cookie=`${encodeURIComponent(m)}=;expires=${new Date().toUTCString()}`,u()},set:(m,v,g={})=>{const b=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=d.reduce((T,w)=>{const C=w.parse(g);return C===""?T:T.concat(C)},[`${encodeURIComponent(m)}=${b}`]).join(";");document.cookie=S,u()}},f=m=>{const v=new Set,g=b=>{m().removeItem(b);const S=i(m());v.forEach(T=>T(S))};return{delete:g,listener:b=>(v.add(b),()=>v.delete(b)),clearListeners:()=>v.clear(),json:(b=!1)=>b?i(m()):m(),has:b=>{const S=m().getItem(b);return!n(S)},deleteAll:()=>{t(m(),g),v.forEach(b=>b(m()))},get:b=>o(b,m()),set:(b,S)=>{m().setItem(b,JSON.stringify(S)),v.forEach(T=>T(m()))}}},h=f(()=>window.sessionStorage),y=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=y,e.SessionStorage=h,e.createStorage=f}(mu)),mu}var Li=i2();const mp=e=>e.headerLabel??e.thead??e.id,gp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Ro=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Ro||{});const vp=e=>e.type==="number"?e.valueAsNumber:e.value,a2=e=>{let t=[];return e({add:(o,i,a)=>t.push({...a,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},s2={},l2=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const a=r.get(o.id);return a===void 0?e[i]:a})},c2=(e,t,n=s2)=>{const r=Zi()?null:Li.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Ef({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:l2(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return Zi()||Li.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},bd=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??Ro.Text,a=t[i]??[],s=((c=a.find(d=>d["data-default"]))==null?void 0:c.value)??((u=a[0])==null?void 0:u.value),l=n[s];return{id:ma(),operation:l,label:mp(e),name:o,type:i,value:"",...r}},yp=()=>{const e=Ot(),t=E.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:E.useMemo(()=>({[Ro.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Ro.Boolean]:[t.is,t.isNot],[Ro.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},u2=e=>{const t=Ot(),n=yp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,bd(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>{if(c!==p.id)return p;const f=e.cols.find(h=>u===h.id);return bd(f,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>p.id===c?{...p,operation:n.operations[u]}:p))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=vp(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return x.jsx(E.Fragment,{children:x.jsx(ui,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(WP,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Gr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),x.jsx(Gr,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Ca,{"data-id":l.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),x.jsx("div",{className:"mt-5 flex items-center justify-center",children:x.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:x.jsx(jo,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[x.jsx(yf,{size:14})," ",t.tableFilterNewFilter]})})]})})})},d2=({filter:e,onDelete:t,set:n})=>{const r=Ot(),o=yp(),i=s=>{const l=s.target.value,c=s.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},a=s=>{const l=s.target.dataset.id||"",c=vp(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(Gr,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),x.jsx(Ca,{"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(jo,{className:"text-danger",size:14})})]})},f2=({item:e,onPointerDown:t})=>{const n=Do(0);return x.jsxs(Eb,{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($P,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},p2=e=>{var l;const t=Ot(),n=gp(e.cols),r=pP(),[o,i]=E.useState(((l=e.groups[0])==null?void 0:l.thead)||""),a=c=>{var m;const u=c.target,d=u.value,p=u.options.selectedIndex,f=((m=u.options.item(p))==null?void 0:m.label)||"";i(f);const h=new f1(e.rows).GroupBy(d),y=e.cols.find(v=>v.id===d);e.setGroups(mT(h).map((v,g)=>{const b=h[v];return{...y,groupId:ma(),groupKey:d,index:g,rows:b,groupName:v}}))},s=()=>e.setGroups([]);return x.jsx(E.Fragment,{children:x.jsxs(ui,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(eA,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(Gr,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),x.jsx(Ao,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:x.jsx(jo,{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(SS,{children:x.jsx(Sb,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>x.jsx(f2,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},h2=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.value,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),m2=(e,t)=>e.toSorted(h2(t)),p1=(e,t,n)=>({label:t,id:ma(),type:n,value:e.id}),g2=e=>{const t=Ot(),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,p1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,type:u}:p))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return x.jsx(E.Fragment,{children:x.jsx(ui,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(kb,{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(Gr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(Gr,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),x.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:x.jsx(jo,{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(yf,{size:14})," ",t.tableSortAddButton]})})]})})})},v2=e=>{const t=Ot(),[n,r]=E.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");E.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=p1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=mp(e.col);return x.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?x.jsx(PP,{size:14}):null,n==="desc"?x.jsx(kP,{size:14}):null,n==="undefined"?x.jsx(kb,{size:14}):null]})},y2=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(u2,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(g2,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(p2,{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=vp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function x2(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let s=o>2?o:2;s<=Math.min(t,i);s++)n.push(s);const a=t-2;return i+1!==a&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const b2=e=>{const t=E.useId(),n=Ot(),r=E.useMemo(()=>x2(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return x.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(E.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(cn,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:x.jsx(E.Fragment,{children:typeof i=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(cn,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?x.jsx("li",{children:x.jsx(cn,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},w2={top:0,left:0,right:0,bottom:-1},T2=e=>{var h;const t=Ot(),n=e.filters.filter(y=>y.name===e.header.id),r=n.length>0,o=e.header.allowSort??!0,i=e.header.allowFilter??!0,a=yp(),s=r?GP:KP,l=E.useRef(null),c=y=>{const m=y.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(g=>g.id!==m))},u=E.useCallback(y=>{if(y===null)return;l.current=y;const m=new AbortController;return y.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:m.signal}),()=>m.abort()},[]),d=e.sorters.find(y=>e.header.id===y.value),p=d!=null&&d.type?d.type===d1.Asc?"ascending":"descending":"none",f=mp(e.header);return x.jsxs(Eb,{...e.header.thProps,as:"th",ref:u,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":p,value:e.header,"aria-busy":e.loading,whileDrag:{cursor:"grabbing"},className:`relative hidden min-w-0 cursor-grab border border-b border-transparent border-b-table-border border-r-table-border font-medium first:table-cell last:border-r-transparent md:table-cell ${((h=e.header.thProps)==null?void 0:h.className)??""}`,children:[x.jsx("span",{className:"flex h-full items-center justify-between px-2 py-4",children:x.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&i?x.jsx(ui,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",f]}),x.jsx(s,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:x.jsxs("span",{className:"text-lg font-medium",children:[t.tableFilterDropdownTitleUnique," ",x.jsx("span",{className:"text-primary",children:f})]}),children:n.length===0?null:x.jsxs("ul",{className:"font-medium",children:[n.map(y=>x.jsx("li",{className:"my-1",children:x.jsx(d2,{onDelete:c,filter:y,set:e.setFilters})},`thead-filter-${y.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(y=>y.concat(bd(e.header,a.options,a.operations))),children:[x.jsx(yf,{size:14})," ",t.tableFilterNewFilter]})})]})}):null,x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&o?x.jsx(v2,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:x.jsx(vt.button,{drag:"x",draggable:!0,type:"button",animate:!1,initial:!1,dragListener:!0,dragMomentum:!0,dragElastic:0,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:w2,className:"absolute right-0 top-0 block h-full w-1.5 cursor-col-resize hover:bg-primary active:bg-primary",onDrag:(y,m)=>{if(l.current===null)return;const v=l.current.getBoundingClientRect().width,g=m.delta.x;l.current.style.width=`${Math.abs(v+g)}px`}})]})},S2=e=>x.jsx(Sb,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,values:e.headers,onReorder:e.setCols,className:"bg-table-header text-lg",children:x.jsx(vr,{children:e.headers.map((t,n)=>x.jsx(T2,{header:t,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:n===e.headers.length-1},`header-child-item-${t.id}`))})}),h1=E.createContext({}),E2=()=>E.useContext(h1),C2=E.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:x.jsx(vr,{children:n.children})})),k2=E.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${t??""}`})),R2=E.forwardRef(({context:e,...t},n)=>{const r=E2(),o={...t==null?void 0:t.style,top:ht.number(r.sticky)?`${r.sticky}px`:void 0};return x.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),P2=E.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),A2=E.forwardRef((e,t)=>e.context.loadingMore?x.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:x.jsx("tr",{role:"row",className:"bg-card-background",children:x.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:x.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),I2={TableHead:R2,Table:k2,TableBody:C2,TableRow:P2,TableFoot:A2},O2=[0,0,0,0,0,0,0,0,0,0],m1=x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),_2=(e,t,n)=>x.jsx("td",{role:"cell",colSpan:n.cols.length,className:"hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell",children:n.loading?m1:x.jsx(l0,{})}),M2=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(E.Fragment,{children:r.map((i,a)=>{var d;const s=`${a},${e}`,l=Rf(t,i.id),c=i.Element,u=((d=i.cellProps)==null?void 0:d.className)||"";return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},o?m1:c?x.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l}):x.jsx(E.Fragment,{children:ht.nil(l)?"":l}))})})},D2=()=>x.jsx(E.Fragment,{}),j2=[{}],ey=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,border:s=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=E.useRef(null),[p,f]=E.useState(!1),h=zi(a),y=zi(u.loadingMore),m=E.useMemo(()=>{if(u.loading)return O2;if(c)return u.rows;const v=new f1(u.rows);return t.length>0&&t.forEach(g=>g.value===""||Number.isNaN(g.value)?void 0:v.Where(g.name,g.operation.symbol,g.value)),r.length===0?v.Select():m2(v.Select(),r)},[u.rows,t,r,u.loading]);return E.useEffect(()=>{if(d.current===null)return()=>{};const v=d.current,g=new IntersectionObserver(b=>{var w;return b[b.length-1].isIntersecting&&y.current?((w=h.current)==null||w.call(h),void f(!0)):f(!1)});return g.observe(v),()=>g.disconnect()},[]),x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg ${s?"border border-table-border":""}`,children:[x.jsx(jN,{useWindowScroll:!0,followOutput:"smooth",components:I2,totalCount:m.length,data:m.length===0?j2:m,fixedFooterContent:p?D2:null,itemContent:m.length===0?_2:M2,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>x.jsx(S2,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?x.jsx(b2,{...l}):null]})},N2=(e,t)=>typeof t=="function"?t(e):t,Ka=(e,t,n)=>e===t||n==null?void 0:n(t),F2=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=E.useMemo(()=>gp(e.cols),[e.cols]),[o,i]=Ef({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},a=>{const s=l=>c=>{const u=a.state();return{...u,[l]:N2(u[l],c)}};return{cols:s("cols"),sorters:s("sorters"),groups:s("groups"),filters:s("filters")}},{postMiddleware:[(a,s)=>{var l;return(l=e.set)==null||l.call(e,a),Ka((s==null?void 0:s.filters)??[],a.filters??[],e.setFilters),Ka((s==null?void 0:s.sorters)??[],a.sorters??[],e.setSorters),Ka((s==null?void 0:s.groups)??[],a.groups??[],e.setGroups),Ka((s==null?void 0:s.cols)??[],a.cols??[],e.setCols),a}]});return x.jsx(h1.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?x.jsx(y2,{cols:o.cols,rows:e.rows,options:r,groups:o.groups,filters:o.filters,setCols:i.cols,sorters:o.sorters,setGroups:i.groups,setFilters:i.filters,setSorters:i.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,o.groups.length===0?x.jsx(ey,{...e,index:0,cols:o.cols,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:i.cols,sorters:o.sorters,setGroups:i.groups,setFilters:i.filters,setSorters:i.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):x.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((a,s)=>x.jsx("div",{className:"min-w-full",children:x.jsx(ey,{...e,group:a,index:s,cols:o.cols,pagination:null,rows:a.rows,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:i.cols,sorters:o.sorters,setGroups:i.groups,setFilters:i.filters,setSorters:i.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${a.groupId}`))})]})})},L2=["INPUT","SELECT"],g1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{L2.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var gu,ty;function xp(){if(ty)return gu;ty=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return gu={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},gu}var vu,ny;function v1(){if(ny)return vu;ny=1;var e=xp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var m=[],v=0;v<256;++v)m.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return m}(),o=function(v){for(;v.length>1;){var g=v.pop(),b=g.obj[g.prop];if(n(b)){for(var S=[],T=0;T<b.length;++T)typeof b[T]<"u"&&S.push(b[T]);g.obj[g.prop]=S}}},i=function(v,g){for(var b=g&&g.plainObjects?{__proto__:null}:{},S=0;S<v.length;++S)typeof v[S]<"u"&&(b[S]=v[S]);return b},a=function m(v,g,b){if(!g)return v;if(typeof g!="object"&&typeof g!="function"){if(n(v))v.push(g);else if(v&&typeof v=="object")(b&&(b.plainObjects||b.allowPrototypes)||!t.call(Object.prototype,g))&&(v[g]=!0);else return[v,g];return v}if(!v||typeof v!="object")return[v].concat(g);var S=v;return n(v)&&!n(g)&&(S=i(v,b)),n(v)&&n(g)?(g.forEach(function(T,w){if(t.call(v,w)){var C=v[w];C&&typeof C=="object"&&T&&typeof T=="object"?v[w]=m(C,T,b):v.push(T)}else v[w]=T}),v):Object.keys(g).reduce(function(T,w){var C=g[w];return t.call(T,w)?T[w]=m(T[w],C,b):T[w]=C,T},S)},s=function(v,g){return Object.keys(g).reduce(function(b,S){return b[S]=g[S],b},v)},l=function(m,v,g){var b=m.replace(/\+/g," ");if(g==="iso-8859-1")return b.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(b)}catch{return b}},c=1024,u=function(v,g,b,S,T){if(v.length===0)return v;var w=v;if(typeof v=="symbol"?w=Symbol.prototype.toString.call(v):typeof v!="string"&&(w=String(v)),b==="iso-8859-1")return escape(w).replace(/%u[0-9a-f]{4}/gi,function(V){return"%26%23"+parseInt(V.slice(2),16)+"%3B"});for(var C="",R=0;R<w.length;R+=c){for(var I=w.length>=c?w.slice(R,R+c):w,P=[],j=0;j<I.length;++j){var N=I.charCodeAt(j);if(N===45||N===46||N===95||N===126||N>=48&&N<=57||N>=65&&N<=90||N>=97&&N<=122||T===e.RFC1738&&(N===40||N===41)){P[P.length]=I.charAt(j);continue}if(N<128){P[P.length]=r[N];continue}if(N<2048){P[P.length]=r[192|N>>6]+r[128|N&63];continue}if(N<55296||N>=57344){P[P.length]=r[224|N>>12]+r[128|N>>6&63]+r[128|N&63];continue}j+=1,N=65536+((N&1023)<<10|I.charCodeAt(j)&1023),P[P.length]=r[240|N>>18]+r[128|N>>12&63]+r[128|N>>6&63]+r[128|N&63]}C+=P.join("")}return C},d=function(v){for(var g=[{obj:{o:v},prop:"o"}],b=[],S=0;S<g.length;++S)for(var T=g[S],w=T.obj[T.prop],C=Object.keys(w),R=0;R<C.length;++R){var I=C[R],P=w[I];typeof P=="object"&&P!==null&&b.indexOf(P)===-1&&(g.push({obj:w,prop:I}),b.push(P))}return o(g),v},p=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},f=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},h=function(v,g){return[].concat(v,g)},y=function(v,g){if(n(v)){for(var b=[],S=0;S<v.length;S+=1)b.push(g(v[S]));return b}return g(v)};return vu={arrayToObject:i,assign:s,combine:h,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:y,merge:a},vu}var yu,ry;function V2(){if(ry)return yu;ry=1;var e=uT(),t=v1(),n=xp(),r=Object.prototype.hasOwnProperty,o={brackets:function(m){return m+"[]"},comma:"comma",indices:function(m,v){return m+"["+v+"]"},repeat:function(m){return m}},i=Array.isArray,a=Array.prototype.push,s=function(y,m){a.apply(y,i(m)?m:[m])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(m){return l.call(m)},skipNulls:!1,strictNullHandling:!1},d=function(m){return typeof m=="string"||typeof m=="number"||typeof m=="boolean"||typeof m=="symbol"||typeof m=="bigint"},p={},f=function y(m,v,g,b,S,T,w,C,R,I,P,j,N,V,k,M,D,L){for(var _=m,z=L,O=0,B=!1;(z=z.get(p))!==void 0&&!B;){var Q=z.get(m);if(O+=1,typeof Q<"u"){if(Q===O)throw new RangeError("Cyclic object value");B=!0}typeof z.get(p)>"u"&&(O=0)}if(typeof I=="function"?_=I(v,_):_ instanceof Date?_=N(_):g==="comma"&&i(_)&&(_=t.maybeMap(_,function(Ae){return Ae instanceof Date?N(Ae):Ae})),_===null){if(T)return R&&!M?R(v,u.encoder,D,"key",V):v;_=""}if(d(_)||t.isBuffer(_)){if(R){var re=M?v:R(v,u.encoder,D,"key",V);return[k(re)+"="+k(R(_,u.encoder,D,"value",V))]}return[k(v)+"="+k(String(_))]}var J=[];if(typeof _>"u")return J;var K;if(g==="comma"&&i(_))M&&R&&(_=t.maybeMap(_,R)),K=[{value:_.length>0?_.join(",")||null:void 0}];else if(i(I))K=I;else{var U=Object.keys(_);K=P?U.sort(P):U}var Y=C?String(v).replace(/\./g,"%2E"):String(v),F=b&&i(_)&&_.length===1?Y+"[]":Y;if(S&&i(_)&&_.length===0)return F+"[]";for(var W=0;W<K.length;++W){var Z=K[W],oe=typeof Z=="object"&&Z&&typeof Z.value<"u"?Z.value:_[Z];if(!(w&&oe===null)){var $=j&&C?String(Z).replace(/\./g,"%2E"):String(Z),ye=i(_)?typeof g=="function"?g(F,$):F:F+(j?"."+$:"["+$+"]");L.set(m,O);var ke=e();ke.set(p,L),s(J,y(oe,ye,g,b,S,T,w,C,g==="comma"&&M&&i(_)?null:R,I,P,j,N,V,k,M,D,ke))}}return J},h=function(m){if(!m)return u;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.encodeDotInKeys<"u"&&typeof m.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(m.encoder!==null&&typeof m.encoder<"u"&&typeof m.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=m.charset||u.charset;if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var g=n.default;if(typeof m.format<"u"){if(!r.call(n.formatters,m.format))throw new TypeError("Unknown format option provided.");g=m.format}var b=n.formatters[g],S=u.filter;(typeof m.filter=="function"||i(m.filter))&&(S=m.filter);var T;if(m.arrayFormat in o?T=m.arrayFormat:"indices"in m?T=m.indices?"indices":"repeat":T=u.arrayFormat,"commaRoundTrip"in m&&typeof m.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var w=typeof m.allowDots>"u"?m.encodeDotInKeys===!0?!0:u.allowDots:!!m.allowDots;return{addQueryPrefix:typeof m.addQueryPrefix=="boolean"?m.addQueryPrefix:u.addQueryPrefix,allowDots:w,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:T,charset:v,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!m.commaRoundTrip,delimiter:typeof m.delimiter>"u"?u.delimiter:m.delimiter,encode:typeof m.encode=="boolean"?m.encode:u.encode,encodeDotInKeys:typeof m.encodeDotInKeys=="boolean"?m.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof m.encoder=="function"?m.encoder:u.encoder,encodeValuesOnly:typeof m.encodeValuesOnly=="boolean"?m.encodeValuesOnly:u.encodeValuesOnly,filter:S,format:g,formatter:b,serializeDate:typeof m.serializeDate=="function"?m.serializeDate:u.serializeDate,skipNulls:typeof m.skipNulls=="boolean"?m.skipNulls:u.skipNulls,sort:typeof m.sort=="function"?m.sort:null,strictNullHandling:typeof m.strictNullHandling=="boolean"?m.strictNullHandling:u.strictNullHandling}};return yu=function(y,m){var v=y,g=h(m),b,S;typeof g.filter=="function"?(S=g.filter,v=S("",v)):i(g.filter)&&(S=g.filter,b=S);var T=[];if(typeof v!="object"||v===null)return"";var w=o[g.arrayFormat],C=w==="comma"&&g.commaRoundTrip;b||(b=Object.keys(v)),g.sort&&b.sort(g.sort);for(var R=e(),I=0;I<b.length;++I){var P=b[I],j=v[P];g.skipNulls&&j===null||s(T,f(j,P,w,C,g.allowEmptyArrays,g.strictNullHandling,g.skipNulls,g.encodeDotInKeys,g.encode?g.encoder:null,g.filter,g.sort,g.allowDots,g.serializeDate,g.format,g.formatter,g.encodeValuesOnly,g.charset,R))}var N=T.join(g.delimiter),V=g.addQueryPrefix===!0?"?":"";return g.charsetSentinel&&(g.charset==="iso-8859-1"?V+="utf8=%26%2310003%3B&":V+="utf8=%E2%9C%93&"),N.length>0?V+N:""},yu}var xu,oy;function z2(){if(oy)return xu;oy=1;var e=v1(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(f,h){return String.fromCharCode(parseInt(h,10))})},i=function(p,f,h){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&h>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,h){var y={__proto__:null},m=h.ignoreQueryPrefix?f.replace(/^\?/,""):f;m=m.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=h.parameterLimit===1/0?void 0:h.parameterLimit,g=m.split(h.delimiter,h.throwOnLimitExceeded?v+1:v);if(h.throwOnLimitExceeded&&g.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var b=-1,S,T=h.charset;if(h.charsetSentinel)for(S=0;S<g.length;++S)g[S].indexOf("utf8=")===0&&(g[S]===s?T="utf-8":g[S]===a&&(T="iso-8859-1"),b=S,S=g.length);for(S=0;S<g.length;++S)if(S!==b){var w=g[S],C=w.indexOf("]="),R=C===-1?w.indexOf("="):C+1,I,P;R===-1?(I=h.decoder(w,r.decoder,T,"key"),P=h.strictNullHandling?null:""):(I=h.decoder(w.slice(0,R),r.decoder,T,"key"),P=e.maybeMap(i(w.slice(R+1),h,n(y[I])?y[I].length:0),function(N){return h.decoder(N,r.decoder,T,"value")})),P&&h.interpretNumericEntities&&T==="iso-8859-1"&&(P=o(String(P))),w.indexOf("[]=")>-1&&(P=n(P)?[P]:P);var j=t.call(y,I);j&&h.duplicates==="combine"?y[I]=e.combine(y[I],P):(!j||h.duplicates==="last")&&(y[I]=P)}return y},c=function(p,f,h,y){var m=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");m=Array.isArray(f)&&f[v]?f[v].length:0}for(var g=y?f:i(f,h,m),b=p.length-1;b>=0;--b){var S,T=p[b];if(T==="[]"&&h.parseArrays)S=h.allowEmptyArrays&&(g===""||h.strictNullHandling&&g===null)?[]:e.combine([],g);else{S=h.plainObjects?{__proto__:null}:{};var w=T.charAt(0)==="["&&T.charAt(T.length-1)==="]"?T.slice(1,-1):T,C=h.decodeDotInKeys?w.replace(/%2E/g,"."):w,R=parseInt(C,10);!h.parseArrays&&C===""?S={0:g}:!isNaN(R)&&T!==C&&String(R)===C&&R>=0&&h.parseArrays&&R<=h.arrayLimit?(S=[],S[R]=g):C!=="__proto__"&&(S[C]=g)}g=S}return g},u=function(f,h,y,m){if(f){var v=y.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,g=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,S=y.depth>0&&g.exec(v),T=S?v.slice(0,S.index):v,w=[];if(T){if(!y.plainObjects&&t.call(Object.prototype,T)&&!y.allowPrototypes)return;w.push(T)}for(var C=0;y.depth>0&&(S=b.exec(v))!==null&&C<y.depth;){if(C+=1,!y.plainObjects&&t.call(Object.prototype,S[1].slice(1,-1))&&!y.allowPrototypes)return;w.push(S[1])}if(S){if(y.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+y.depth+" and strictDepth is true");w.push("["+v.slice(S.index)+"]")}return c(w,h,y,m)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var h=typeof f.charset>"u"?r.charset:f.charset,y=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(y!=="combine"&&y!=="first"&&y!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var m=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:m,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:h,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:y,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return xu=function(p,f){var h=d(f);if(p===""||p===null||typeof p>"u")return h.plainObjects?{__proto__:null}:{};for(var y=typeof p=="string"?l(p,h):p,m=h.plainObjects?{__proto__:null}:{},v=Object.keys(y),g=0;g<v.length;++g){var b=v[g],S=u(b,y[b],h,typeof p=="string");m=e.merge(m,S,h)}return h.allowSparse===!0?m:e.compact(m)},xu}var bu,iy;function $2(){if(iy)return bu;iy=1;var e=V2(),t=z2(),n=xp();return bu={formats:n,parse:t,stringify:e},bu}var B2=$2(),Be;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Be||(Be={}));var ay;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ay||(ay={}));const fe=Be.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ar=e=>{switch(typeof e){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},ne=Be.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 un extends Error{get errors(){return this.issues}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}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof un))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Be.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()}}un.create=e=>new un(e);const aa=(e,t)=>{let n;switch(e.code){case ne.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ne.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Be.jsonStringifyReplacer)}`;break;case ne.unrecognized_keys:n=`Unrecognized key(s) in object: ${Be.joinValues(e.keys,", ")}`;break;case ne.invalid_union:n="Invalid input";break;case ne.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Be.joinValues(e.options)}`;break;case ne.invalid_enum_value:n=`Invalid enum value. Expected ${Be.joinValues(e.options)}, received '${e.received}'`;break;case ne.invalid_arguments:n="Invalid function arguments";break;case ne.invalid_return_type:n="Invalid function return type";break;case ne.invalid_date:n="Invalid date";break;case ne.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}"`:Be.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ne.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 ne.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 ne.custom:n="Invalid input";break;case ne.invalid_intersection_types:n="Intersection results could not be merged";break;case ne.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ne.not_finite:n="Number must be finite";break;default:n=t.defaultError,Be.assertNever(e)}return{message:n}};let H2=aa;function wd(){return H2}const Td=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function ce(e,t){const n=wd(),r=Td({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===aa?void 0:aa].filter(o=>!!o)});e.common.issues.push(r)}class Ht{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 Ee;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,a=await o.value;r.push({key:i,value:a})}return Ht.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return Ee;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const Ee=Object.freeze({status:"aborted"}),Si=e=>({status:"dirty",value:e}),Yt=e=>({status:"valid",value:e}),sy=e=>e.status==="aborted",ly=e=>e.status==="dirty",Yo=e=>e.status==="valid",Ds=e=>typeof Promise<"u"&&e instanceof Promise;function js(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function y1(e,t,n,r,o){if(typeof t=="function"?e!==t||!0:!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}var ve;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ve||(ve={}));var Ei,Ci;class Ln{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 cy=(e,t)=>{if(Yo(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 un(e.common.issues);return this._error=n,this._error}}};function Pe(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:(a,s)=>{var l,c;const{message:u}=e;return a.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:s.defaultError}},description:o}}class Ne{get description(){return this._def.description}_getType(t){return ar(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ht,ctx:{common:t.parent.common,data:t.data,parsedType:ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ds(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:ar(t)},i=this._parseSync({data:t,path:o.path,parent:o});return cy(o,i)}"~validate"(t){var n,r;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ar(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return Yo(i)?{value:i.value}:{issues:o.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:o}).then(i=>Yo(i)?{value:i.value}:{issues:o.common.issues})}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:ar(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(Ds(o)?o:Promise.resolve(o));return cy(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:ne.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!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 Kn({schema:this,typeName:Te.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}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),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Hn.create(this,this._def)}nullable(){return Zr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Dn.create(this)}promise(){return la.create(this,this._def)}or(t){return Ls.create([this,t],this._def)}and(t){return Vs.create(this,t,this._def)}transform(t){return new Kn({...Pe(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ws({...Pe(this._def),innerType:this,defaultValue:n,typeName:Te.ZodDefault})}brand(){return new T1({typeName:Te.ZodBranded,type:this,...Pe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new qs({...Pe(this._def),innerType:this,catchValue:n,typeName:Te.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Sl.create(this,t)}readonly(){return Us.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const W2=/^c[^\s-]{8,}$/i,q2=/^[0-9a-z]+$/,U2=/^[0-9A-HJKMNP-TV-Z]{26}$/i,G2=/^[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,Y2=/^[a-z0-9_-]{21}$/i,K2=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Z2=/^[-+]?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)?)??$/,X2=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Q2="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let wu;const J2=/^(?:(?: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])$/,eV=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,tV=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,nV=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,rV=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,oV=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,x1="((\\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])))",iV=new RegExp(`^${x1}$`);function b1(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 aV(e){return new RegExp(`^${b1(e)}$`)}function sV(e){let t=`${x1}T${b1(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 lV(e,t){return!!((t==="v4"||!t)&&J2.test(e)||(t==="v6"||!t)&&tV.test(e))}function cV(e,t){if(!K2.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||!o.typ||!o.alg||t&&o.alg!==t)}catch{return!1}}function uV(e,t){return!!((t==="v4"||!t)&&eV.test(e)||(t==="v6"||!t)&&nV.test(e))}class Bn extends Ne{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ce(i,{code:ne.invalid_type,expected:fe.string,received:i.parsedType}),Ee}const r=new Ht;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:ne.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:ne.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?ce(o,{code:ne.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ce(o,{code:ne.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")X2.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"email",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")wu||(wu=new RegExp(Q2,"u")),wu.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"emoji",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")G2.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"uuid",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Y2.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"nanoid",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")W2.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cuid",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")q2.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cuid2",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")U2.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"ulid",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ce(o,{validation:"url",code:ne.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"regex",code:ne.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ce(o,{code:ne.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ce(o,{code:ne.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ce(o,{code:ne.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?sV(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:ne.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?iV.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:ne.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?aV(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:ne.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Z2.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"duration",code:ne.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?lV(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"ip",code:ne.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?cV(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"jwt",code:ne.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?uV(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cidr",code:ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?rV.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64",code:ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?oV.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64url",code:ne.invalid_string,message:i.message}),r.dirty()):Be.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ne.invalid_string,...ve.errToObj(r)})}_addCheck(t){return new Bn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ve.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ve.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ve.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ve.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ve.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ve.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ve.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ve.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ve.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ve.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ve.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ve.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ve.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,...ve.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,...ve.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ve.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ve.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ve.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ve.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ve.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ve.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ve.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ve.errToObj(n)})}nonempty(t){return this.min(1,ve.errToObj(t))}trim(){return new Bn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Bn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Bn({...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 isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}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}}Bn.create=e=>{var t;return new Bn({checks:[],typeName:Te.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Pe(e)})};function dV(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class Yr extends Ne{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)!==fe.number){const i=this._getOrReturnCtx(t);return ce(i,{code:ne.invalid_type,expected:fe.number,received:i.parsedType}),Ee}let r;const o=new Ht;for(const i of this._def.checks)i.kind==="int"?Be.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ce(r,{code:ne.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ce(r,{code:ne.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ce(r,{code:ne.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?dV(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ce(r,{code:ne.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ce(r,{code:ne.not_finite,message:i.message}),o.dirty()):Be.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new Yr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new Yr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ve.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ve.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ve.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ve.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"&&Be.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)}}Yr.create=e=>new Yr({checks:[],typeName:Te.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Pe(e)});class Ko extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==fe.bigint)return this._getInvalidInput(t);let r;const o=new Ht;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ce(r,{code:ne.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ce(r,{code:ne.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ce(r,{code:ne.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Be.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ce(n,{code:ne.invalid_type,expected:fe.bigint,received:n.parsedType}),Ee}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new Ko({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new Ko({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ko.create=e=>{var t;return new Ko({checks:[],typeName:Te.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Pe(e)})};class Sd extends Ne{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ce(r,{code:ne.invalid_type,expected:fe.boolean,received:r.parsedType}),Ee}return Yt(t.data)}}Sd.create=e=>new Sd({typeName:Te.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Pe(e)});class sa extends Ne{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return ce(i,{code:ne.invalid_type,expected:fe.date,received:i.parsedType}),Ee}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ce(i,{code:ne.invalid_date}),Ee}const r=new Ht;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:ne.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:ne.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Be.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new sa({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ve.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ve.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}}sa.create=e=>new sa({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Te.ZodDate,...Pe(e)});class Ed extends Ne{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ce(r,{code:ne.invalid_type,expected:fe.symbol,received:r.parsedType}),Ee}return Yt(t.data)}}Ed.create=e=>new Ed({typeName:Te.ZodSymbol,...Pe(e)});class Ns extends Ne{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ce(r,{code:ne.invalid_type,expected:fe.undefined,received:r.parsedType}),Ee}return Yt(t.data)}}Ns.create=e=>new Ns({typeName:Te.ZodUndefined,...Pe(e)});class Fs extends Ne{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ce(r,{code:ne.invalid_type,expected:fe.null,received:r.parsedType}),Ee}return Yt(t.data)}}Fs.create=e=>new Fs({typeName:Te.ZodNull,...Pe(e)});class Cd extends Ne{constructor(){super(...arguments),this._any=!0}_parse(t){return Yt(t.data)}}Cd.create=e=>new Cd({typeName:Te.ZodAny,...Pe(e)});class Po extends Ne{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Yt(t.data)}}Po.create=e=>new Po({typeName:Te.ZodUnknown,...Pe(e)});class gr extends Ne{_parse(t){const n=this._getOrReturnCtx(t);return ce(n,{code:ne.invalid_type,expected:fe.never,received:n.parsedType}),Ee}}gr.create=e=>new gr({typeName:Te.ZodNever,...Pe(e)});class kd extends Ne{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ce(r,{code:ne.invalid_type,expected:fe.void,received:r.parsedType}),Ee}return Yt(t.data)}}kd.create=e=>new kd({typeName:Te.ZodVoid,...Pe(e)});class Dn extends Ne{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ce(n,{code:ne.invalid_type,expected:fe.array,received:n.parsedType}),Ee;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ce(n,{code:a?ne.too_big:ne.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?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&&(ce(n,{code:ne.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&&(ce(n,{code:ne.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((a,s)=>o.type._parseAsync(new Ln(n,a,n.path,s)))).then(a=>Ht.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Ln(n,a,n.path,s)));return Ht.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Dn({...this._def,minLength:{value:t,message:ve.toString(n)}})}max(t,n){return new Dn({...this._def,maxLength:{value:t,message:ve.toString(n)}})}length(t,n){return new Dn({...this._def,exactLength:{value:t,message:ve.toString(n)}})}nonempty(t){return this.min(1,t)}}Dn.create=(e,t)=>new Dn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Te.ZodArray,...Pe(t)});function mo(e){if(e instanceof gt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Hn.create(mo(r))}return new gt({...e._def,shape:()=>t})}else return e instanceof Dn?new Dn({...e._def,type:mo(e.element)}):e instanceof Hn?Hn.create(mo(e.unwrap())):e instanceof Zr?Zr.create(mo(e.unwrap())):e instanceof Yn?Yn.create(e.items.map(t=>mo(t))):e}class gt extends Ne{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=Be.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return ce(c,{code:ne.invalid_type,expected:fe.object,received:c.parsedType}),Ee}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof gr&&this._def.unknownKeys==="strip"))for(const c in o.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Ln(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof gr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(ce(o,{code:ne.unrecognized_keys,keys:s}),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 s){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Ln(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,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>Ht.mergeObjectSync(r,c)):Ht.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ve.errToObj,new gt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const l=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ve.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new gt({...this._def,unknownKeys:"strip"})}passthrough(){return new gt({...this._def,unknownKeys:"passthrough"})}extend(t){return new gt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new gt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Te.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new gt({...this._def,catchall:t})}pick(t){const n={};return Be.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new gt({...this._def,shape:()=>n})}omit(t){const n={};return Be.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new gt({...this._def,shape:()=>n})}deepPartial(){return mo(this)}partial(t){const n={};return Be.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new gt({...this._def,shape:()=>n})}required(t){const n={};return Be.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Hn;)i=i._def.innerType;n[r]=i}}),new gt({...this._def,shape:()=>n})}keyof(){return w1(Be.objectKeys(this.shape))}}gt.create=(e,t)=>new gt({shape:()=>e,unknownKeys:"strip",catchall:gr.create(),typeName:Te.ZodObject,...Pe(t)});gt.strictCreate=(e,t)=>new gt({shape:()=>e,unknownKeys:"strict",catchall:gr.create(),typeName:Te.ZodObject,...Pe(t)});gt.lazycreate=(e,t)=>new gt({shape:e,unknownKeys:"strip",catchall:gr.create(),typeName:Te.ZodObject,...Pe(t)});class Ls extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new un(s.ctx.common.issues));return ce(n,{code:ne.invalid_union,unionErrors:a}),Ee}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new un(l));return ce(n,{code:ne.invalid_union,unionErrors:s}),Ee}}get options(){return this._def.options}}Ls.create=(e,t)=>new Ls({options:e,typeName:Te.ZodUnion,...Pe(t)});const $n=e=>e instanceof $s?$n(e.schema):e instanceof Kn?$n(e.innerType()):e instanceof Bs?[e.value]:e instanceof Kr?e.options:e instanceof Hs?Be.objectValues(e.enum):e instanceof Ws?$n(e._def.innerType):e instanceof Ns?[void 0]:e instanceof Fs?[null]:e instanceof Hn?[void 0,...$n(e.unwrap())]:e instanceof Zr?[null,...$n(e.unwrap())]:e instanceof T1||e instanceof Us?$n(e.unwrap()):e instanceof qs?$n(e._def.innerType):[];class bp extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ce(n,{code:ne.invalid_type,expected:fe.object,received:n.parsedType}),Ee;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ce(n,{code:ne.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ee)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=$n(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new bp({typeName:Te.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Pe(r)})}}function Rd(e,t){const n=ar(e),r=ar(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=Be.objectKeys(t),i=Be.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Rd(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===fe.array&&r===fe.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],l=Rd(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===fe.date&&r===fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Vs extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(sy(i)||sy(a))return Ee;const s=Rd(i.value,a.value);return s.valid?((ly(i)||ly(a))&&n.dirty(),{status:n.value,value:s.data}):(ce(r,{code:ne.invalid_intersection_types}),Ee)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):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}))}}Vs.create=(e,t,n)=>new Vs({left:e,right:t,typeName:Te.ZodIntersection,...Pe(n)});class Yn extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ce(r,{code:ne.invalid_type,expected:fe.array,received:r.parsedType}),Ee;if(r.data.length<this._def.items.length)return ce(r,{code:ne.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ee;!this._def.rest&&r.data.length>this._def.items.length&&(ce(r,{code:ne.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Ln(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Ht.mergeArray(n,a)):Ht.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Yn({...this._def,rest:t})}}Yn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yn({items:e,typeName:Te.ZodTuple,rest:null,...Pe(t)})};class zs extends Ne{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!==fe.object)return ce(r,{code:ne.invalid_type,expected:fe.object,received:r.parsedType}),Ee;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new Ln(r,s,r.path,s)),value:a._parse(new Ln(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?Ht.mergeObjectAsync(n,o):Ht.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ne?new zs({keyType:t,valueType:n,typeName:Te.ZodRecord,...Pe(r)}):new zs({keyType:Bn.create(),valueType:t,typeName:Te.ZodRecord,...Pe(n)})}}class Pd extends Ne{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!==fe.map)return ce(r,{code:ne.invalid_type,expected:fe.map,received:r.parsedType}),Ee;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Ln(r,s,r.path,[c,"key"])),value:i._parse(new Ln(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Ee;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Ee;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}Pd.create=(e,t,n)=>new Pd({valueType:t,keyType:e,typeName:Te.ZodMap,...Pe(n)});class Zo extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ce(r,{code:ne.invalid_type,expected:fe.set,received:r.parsedType}),Ee;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ce(r,{code:ne.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&&(ce(r,{code:ne.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Ee;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>i._parse(new Ln(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Zo({...this._def,minSize:{value:t,message:ve.toString(n)}})}max(t,n){return new Zo({...this._def,maxSize:{value:t,message:ve.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Zo.create=(e,t)=>new Zo({valueType:e,minSize:null,maxSize:null,typeName:Te.ZodSet,...Pe(t)});class Vi extends Ne{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ce(n,{code:ne.invalid_type,expected:fe.function,received:n.parsedType}),Ee;function r(s,l){return Td({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,wd(),aa].filter(c=>!!c),issueData:{code:ne.invalid_arguments,argumentsError:l}})}function o(s,l){return Td({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,wd(),aa].filter(c=>!!c),issueData:{code:ne.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof la){const s=this;return Yt(async function(...l){const c=new un([]),u=await s._def.args.parseAsync(l,i).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const s=this;return Yt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new un([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new un([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Vi({...this._def,args:Yn.create(t).rest(Po.create())})}returns(t){return new Vi({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Vi({args:t||Yn.create([]).rest(Po.create()),returns:n||Po.create(),typeName:Te.ZodFunction,...Pe(r)})}}class $s extends Ne{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})}}$s.create=(e,t)=>new $s({getter:e,typeName:Te.ZodLazy,...Pe(t)});class Bs extends Ne{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ce(n,{received:n.data,code:ne.invalid_literal,expected:this._def.value}),Ee}return{status:"valid",value:t.data}}get value(){return this._def.value}}Bs.create=(e,t)=>new Bs({value:e,typeName:Te.ZodLiteral,...Pe(t)});function w1(e,t){return new Kr({values:e,typeName:Te.ZodEnum,...Pe(t)})}class Kr extends Ne{constructor(){super(...arguments),Ei.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ce(n,{expected:Be.joinValues(r),received:n.parsedType,code:ne.invalid_type}),Ee}if(js(this,Ei)||y1(this,Ei,new Set(this._def.values)),!js(this,Ei).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ce(n,{received:n.data,code:ne.invalid_enum_value,options:r}),Ee}return Yt(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 Kr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Kr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ei=new WeakMap;Kr.create=w1;class Hs extends Ne{constructor(){super(...arguments),Ci.set(this,void 0)}_parse(t){const n=Be.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=Be.objectValues(n);return ce(r,{expected:Be.joinValues(o),received:r.parsedType,code:ne.invalid_type}),Ee}if(js(this,Ci)||y1(this,Ci,new Set(Be.getValidEnumValues(this._def.values))),!js(this,Ci).has(t.data)){const o=Be.objectValues(n);return ce(r,{received:r.data,code:ne.invalid_enum_value,options:o}),Ee}return Yt(t.data)}get enum(){return this._def.values}}Ci=new WeakMap;Hs.create=(e,t)=>new Hs({values:e,typeName:Te.ZodNativeEnum,...Pe(t)});class la extends Ne{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return ce(n,{code:ne.invalid_type,expected:fe.promise,received:n.parsedType}),Ee;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Yt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}la.create=(e,t)=>new la({type:e,typeName:Te.ZodPromise,...Pe(t)});class Kn extends Ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Te.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{ce(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Ee;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Ee:l.status==="dirty"||n.value==="dirty"?Si(l.value):l});{if(n.value==="aborted")return Ee;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Ee:s.status==="dirty"||n.value==="dirty"?Si(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ee:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Ee:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Yo(a))return a;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Yo(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);Be.assertNever(o)}}Kn.create=(e,t,n)=>new Kn({schema:e,typeName:Te.ZodEffects,effect:t,...Pe(n)});Kn.createWithPreprocess=(e,t,n)=>new Kn({schema:t,effect:{type:"preprocess",transform:e},typeName:Te.ZodEffects,...Pe(n)});class Hn extends Ne{_parse(t){return this._getType(t)===fe.undefined?Yt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Hn.create=(e,t)=>new Hn({innerType:e,typeName:Te.ZodOptional,...Pe(t)});class Zr extends Ne{_parse(t){return this._getType(t)===fe.null?Yt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Zr.create=(e,t)=>new Zr({innerType:e,typeName:Te.ZodNullable,...Pe(t)});class Ws extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ws.create=(e,t)=>new Ws({innerType:e,typeName:Te.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Pe(t)});class qs extends Ne{_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 Ds(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new un(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new un(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}qs.create=(e,t)=>new qs({innerType:e,typeName:Te.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Pe(t)});class Ad extends Ne{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ce(r,{code:ne.invalid_type,expected:fe.nan,received:r.parsedType}),Ee}return{status:"valid",value:t.data}}}Ad.create=e=>new Ad({typeName:Te.ZodNaN,...Pe(e)});class T1 extends Ne{_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 Sl extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ee:i.status==="dirty"?(n.dirty(),Si(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ee: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 Sl({in:t,out:n,typeName:Te.ZodPipeline})}}class Us extends Ne{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Yo(o)&&(o.value=Object.freeze(o.value)),o);return Ds(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Us.create=(e,t)=>new Us({innerType:e,typeName:Te.ZodReadonly,...Pe(t)});gt.lazycreate;var Te;(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"})(Te||(Te={}));Bn.create;Yr.create;Ad.create;Ko.create;Sd.create;sa.create;Ed.create;Ns.create;Fs.create;Cd.create;Po.create;gr.create;kd.create;Dn.create;gt.create;gt.strictCreate;Ls.create;bp.create;Vs.create;Yn.create;zs.create;Pd.create;Zo.create;Vi.create;$s.create;Bs.create;Kr.create;Hs.create;la.create;Kn.create;Hn.create;Zr.create;Kn.createWithPreprocess;Sl.create;const fV=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},pV=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const i=t[o];if(o===r)e[i]=n;else{if(!(i in e)||typeof e[i]!="object"){const a=t[o+1];e[i]=isNaN(Number(a))?{}:[]}e=e[i]}}},S1=e=>e.replace(/\[(\d+)]/g,".$1").split("."),hn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):S1(t),o=structuredClone(e);return pV(o,r,n),o},hV=(e,t)=>e.localeCompare(t),yi={},E1=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return C1(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=E1(e._def.innerType);return t==="ZodArray"?n??[]:n}},C1=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,E1(n)])),k1=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],i=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof i=="object"&&i!==null&&!Array.isArray(i)?n[r]=k1(i,o):n[r]=o||i)}return n},mV={sort:hV,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},R1=e=>{const t=new FormData(e),n=new URLSearchParams(t);return B2.parse(n.toString(),mV)},Dr=(e,t)=>S1(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),sr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Tu=e=>{const t=e.dataset.target;if(!t)return sr(e);const n=document.querySelector(`[data-origin="${t}"]`);return sr(n||e)},gV={state:{},loading:!1,useOnChange:!1},uy=e=>e.dataset.target||e.name,vV=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=Li.LocalStorage.get(t);return fV(n)?n:{}},clear:()=>void Li.LocalStorage.delete(t),set:n=>Li.LocalStorage.set(t,n)}},yV=(e,t,n=gV)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>ht.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??C1(e)??{}),l=E.useCallback(g=>{var I;const b=g.target,S=g.currentTarget;if(b.dataset.optional==="true")return;const w=uy(b),C=Tu(b)||(S?sr(S):""),R=Dr(w,e);if(b.setAttribute("data-initialized","true"),R){const P=R.safeParse(C),j=P.success?void 0:((I=P.error.issues[0])==null?void 0:I.message)??"";o(N=>hn(N??{},w,j))}},[]),c=E.useCallback(g=>b=>{const S=b.currentTarget,T=Object.values(i.current).reduce((C,R)=>{var V;const I=R.element,P=R.schema.safeParse(sr(I));if(I.dataset.ignore==="ignore"||P.success)return C;const j=(V=P.error.issues[0])==null?void 0:V.message;I.setAttribute("data-initialized","true");const N=I.dataset.name||I.name||"";return hn(C,N,j)},{}),w=ht.empty(T)?null:T;o(w),console.error(w),g==null||g({form:S,errors:w||{}})},[]),u=(g,b=yi)=>{const S=Dr(g,e),T=w=>{var R;if(!w)return;const C=w instanceof Date?w.toISOString():w.target.value;s(I=>hn(I,g,C)),(R=b==null?void 0:b.onChange)==null||R.call(b,w)};return{...b,loading:n.loading,name:g,id:g,onChange:T,form:t,date:ht.string(a[g])?new Date(a[g]):a[g],required:b.required??!S.isOptional(),error:r==null?void 0:r[g],ref:w=>{w!==null&&(i.current[g]={element:w,schema:S})}}},d=(g,b=yi)=>{const S=Dr(g,e);return{...b,name:g,id:g,onChange:w=>{var R;const C=w.target.value;s(I=>hn(I,g,C)),(R=b==null?void 0:b.onChange)==null||R.call(b,w)},form:t,loading:n.loading,onInvalid:l,error:kr(r,g,void 0),value:kr(a,g,void 0)||"",required:b.required??!S.isOptional(),ref:w=>w!==null?i.current[g]={element:w,schema:S}:void 0}},p=(g,b=yi)=>{const S=Dr(g,e);return{...b,name:g,id:g,onChange:w=>{var R;const C=w.target.checked;s(I=>hn(I??{},g,C)),(R=b==null?void 0:b.onChange)==null||R.call(b,w)},form:t,loading:n.loading,onInvalid:l,error:kr(r,g,void 0),required:b.required??!S.isOptional(),ref:w=>w!==null?void(i.current[g]={element:w,schema:S}):void 0}},f=(g,b=yi)=>{const S=Dr(g,e),T=w=>{var R,I;(R=w.persist)==null||R.call(w);const C=w.target.value;(I=b==null?void 0:b.onChange)==null||I.call(b,w),s(P=>hn(P,g,C))};return{...b,loading:n.loading,name:g,id:g,onChange:T,form:t,onInvalid:l,error:kr(r,g,void 0),required:b.required??!S.isOptional(),value:kr(a,g,void 0)||(b==null?void 0:b.value)||"",type:ht.instance(S,Yr)?"number":(b==null?void 0:b.type)??"text",ref:w=>w===null?void 0:i.current[g]={element:w,schema:S}}},h=(g,b=yi)=>{const S=Dr(g,e),T=S._def.typeName==="ZodNumber";return{...b,name:g,id:g,onChange:C=>{var I,P;(I=C.persist)==null||I.call(C);const R=T?C.target.valueAsNumber:C.target.value;(P=b==null?void 0:b.onChange)==null||P.call(b,C),s(j=>hn(j,g,R))},form:t,loading:n.loading,onInvalid:l,error:kr(r,g,void 0),required:b.required??!S.isOptional(),type:T?"number":(b==null?void 0:b.type)??"text",value:kr(a,g,void 0)||(b==null?void 0:b.value)||"",ref:C=>C===null?void 0:void(i.current[g]={element:C,schema:S})}};E.useEffect(()=>{const g=Object.values(i.current).map(S=>{const T=S.element.dataset.origin?document.querySelector(`[data-target="${S.element.name}"]`):S.element,w=S.schema.safeParse(sr(T)),C=j=>{var D;const N=uy(j.target);if(!N)return!1;const V=j.target,k=Tu(j.target)||(j.relatedTarget?sr(j.relatedTarget):""),M=S.schema.safeParse(k);if(V.setAttribute("value",k),M.success)return T.setCustomValidity(""),o(L=>{if(ht.null(L))return null;const _=hn(L,N,void 0);return ht.empty(L)||ht.nil(L)||ht.empty(_)?null:_}),!1;if(T.required){const L=((D=M.error.issues[0])==null?void 0:D.message)||"";T.setCustomValidity(L),o(_=>{if(ht.null(_))return null;const z=hn(_,N,L||void 0);return ht.empty(z)?null:z})}return!1},R=new AbortController,I=T.getAttribute("data-trigger")||"blur";T.addEventListener(I,C,{signal:R.signal});const P=T.dataset.shadow?!1:T.required?!w.success:!1;return{input:S,hasInitialError:P,unsubscribe:()=>R.abort()}});return g.some(S=>S.hasInitialError)&&o(S=>S===null?{}:S),()=>g.forEach(S=>S.unsubscribe())});const y=g=>b=>{var P;b.preventDefault();const S=b.currentTarget;let T=R1(S);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(S.elements)).forEach(j=>{if(j.tagName==="SELECT"){const N=j;T=hn(T,N.name,N.value)}if(j.tagName==="INPUT"){const N=j,V=Tu(N)||(N?sr(N):"");T=hn(T,N.dataset.target||N.name,V)}});const C=k1(T,a),R=e.safeParse(C),I=()=>{var j;g1(S),(j=n.interceptor)==null||j.clear()};if(R.success){const j=JSON.stringify(R.data);return S.setAttribute("data-json",j),(P=n.interceptor)==null||P.clear(),g==null?void 0:g(b,{form:S,event:b,reset:I,errors:[],success:!0,data:R.data,json:R.data})}return console.group("useForm error"),console.info(R),console.info(R.error.issues),console.error(R.error),console.groupEnd(),S.reportValidity(),g==null?void 0:g(b,{form:S,json:T,event:b,reset:I,data:T,success:!1,errors:R.error.issues.map(j=>({message:j.message,path:j.path.map(N=>String(N))}))})},m=g=>Rf(a,g)||"",v=g=>({...g,id:t,name:t});return E.useEffect(()=>{var g;n.interceptor&&((g=n.interceptor)==null||g.set(a))},[a]),{get:m,input:h,state:a,errors:r,select:d,checkbox:p,onSubmit:y,setState:s,textarea:f,onInvalid:c,controller:v,datepicker:u,name:t,disabled:r!==null}},xV=e=>e?JSON.parse(e.getAttribute("data-json")):{},bV=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},P1={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},A1={base:"1rem",lg:"1.5rem",sm:"0.75rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},wV={name:"dark",rounded:P1,spacing:A1,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",muted:"hsla(0, 0%, 12%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 27%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 33%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},TV={rounded:P1,spacing:A1,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"},colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 88%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(221, 10%, 90%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},SV=wV,EV=TV,CV=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...cl,...e.tweaks},parser:e.parser||sl.hsla,map:{...ll,...e.map}}),[e]);return x.jsx(oi.Provider,{value:t,children:e.children})},kV=()=>{const e=E.useContext(oi);return e?e.parser:sl.hsla};exports.Alert=aA;exports.Autocomplete=oF;exports.Button=Ao;exports.Calendar=a0;exports.Card=s0;exports.Checkbox=dp;exports.ColType=Ro;exports.Collapse=Ib;exports.ComponentsProvider=CV;exports.Context=oi;exports.DatePicker=aF;exports.Dropdown=ui;exports.Empty=l0;exports.Expand=ej;exports.FileUpload=xL;exports.Form=bL;exports.Input=Ca;exports.InputFeedback=Gw;exports.InputField=Ea;exports.Menu=rj;exports.MenuItem=nj;exports.Modal=hj;exports.MultiSelect=PL;exports.Notifications=eM;exports.Polymorph=cn;exports.Radiobox=AL;exports.RenderOnView=lS;exports.Select=Gr;exports.Stats=tM;exports.Switch=IL;exports.Tab=oM;exports.Table=F2;exports.Tabs=nM;exports.Tag=jd;exports.TaskList=OL;exports.Textarea=_L;exports.Timeline=iM;exports.TimelineItem=fl;exports.Toolbar=mj;exports.Tooltip=vw;exports.TransferList=jL;exports.createColumns=a2;exports.createCssProperties=GO;exports.createDesignTokens=n0;exports.createFormStorage=vV;exports.createOptionCols=gp;exports.createStyles=qO;exports.createTheme=UO;exports.createTokenStyles=YO;exports.css=ze;exports.defaultDarkTheme=SV;exports.defaultLightTheme=EV;exports.defaultTranslations=ll;exports.defaultTweaks=cl;exports.dispatchInput=_y;exports.formReset=g1;exports.formToJson=R1;exports.getJsonForm=xV;exports.getSchemaShape=Dr;exports.hasVerticalScroll=My;exports.initializeInputDataset=ua;exports.isReactComponent=rS;exports.isReactFC=oS;exports.isSsr=Zi;exports.mergeRefs=Dd;exports.negate=ZO;exports.noop=Pf;exports.parsers=sl;exports.path=Rf;exports.reduceTokens=To;exports.safeRegex=Ku;exports.splitInto=r0;exports.useColorParser=kV;exports.useForm=yV;exports.useLocale=kf;exports.useNotification=Q_;exports.usePrevious=bV;exports.useReactive=O0;exports.useTablePreferences=c2;exports.useTranslations=Ot;exports.uuid=ma;
|
|
237
197
|
//# sourceMappingURL=index.js.map
|