@g4rcez/components 0.1.0 → 0.2.0
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 +16595 -15060
- 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/display/alert.d.ts.map +1 -1
- package/dist/src/components/display/calendar.d.ts +6 -15
- package/dist/src/components/display/calendar.d.ts.map +1 -1
- package/dist/src/components/display/calendar.js +3 -2
- 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/timeline.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/src/components/floating/modal.js +9 -10
- 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 +3 -3
- 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-combobox.d.ts.map +1 -1
- package/dist/src/components/form/multi-combobox.js +2 -2
- 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 +1 -0
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +1 -0
- 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 +1 -1
- 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/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 +16 -63
- package/dist/src/hooks/use-components-provider.d.ts.map +1 -1
- package/dist/src/hooks/use-components-provider.js +4 -30
- package/dist/src/hooks/use-form.d.ts +20 -3
- 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-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.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-translations.d.ts +57 -0
- package/dist/src/hooks/use-translations.d.ts.map +1 -0
- package/dist/src/hooks/use-translations.js +8 -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 +8 -0
- package/dist/src/index.d.ts +4 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -1
- package/dist/src/lib/dom.d.ts +2 -1
- package/dist/src/lib/dom.d.ts.map +1 -1
- package/dist/src/lib/dom.js +1 -0
- package/dist/src/lib/fns.d.ts +1 -1
- 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 +8 -2
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +36 -26
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"),sa=require("react-dom");function uy(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=uy(E),qs=uy(sa);function dy(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=dy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fy(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=dy(e))&&(r&&(r+=" "),r+=t);return r}var Pp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function py(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 kl,Ap;function Ko(){return Ap||(Ap=1,kl=TypeError),kl}const j1={},N1=Object.freeze(Object.defineProperty({__proto__:null,default:j1},Symbol.toStringTag,{value:"Module"})),F1=D1(N1);var Rl,Ip;function Us(){if(Ip)return Rl;Ip=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,g=Function.prototype.toString,v=String.prototype.match,m=String.prototype.slice,b=String.prototype.replace,S=String.prototype.toUpperCase,T=String.prototype.toLowerCase,w=RegExp.prototype.test,C=Array.prototype.concat,k=Array.prototype.join,I=Array.prototype.slice,P=Math.floor,j=typeof BigInt=="function"?BigInt.prototype.valueOf:null,D=Object.getOwnPropertySymbols,F=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,R=typeof Symbol=="function"&&typeof Symbol.iterator=="object",O=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===R||!0)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,L=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(B){return B.__proto__}:null);function M(B,W){if(B===1/0||B===-1/0||B!==B||B&&B>-1e3&&B<1e3||w.call(/e/,W))return W;var Ne=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof B=="number"){var Ze=B<0?-P(-B):P(B);if(Ze!==B){var nt=String(Ze),Ie=m.call(W,nt.length+1);return b.call(nt,Ne,"$&_")+"."+b.call(b.call(Ie,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(W,Ne,"$&_")}var q=F1,_=q.custom,z=ke(_)?_:null,Q={__proto__:null,double:'"',single:"'"},ie={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Rl=function B(W,Ne,Ze,nt){var Ie=Ne||{};if(K(Ie,"quoteStyle")&&!K(Q,Ie.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(K(Ie,"maxStringLength")&&(typeof Ie.maxStringLength=="number"?Ie.maxStringLength<0&&Ie.maxStringLength!==1/0:Ie.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Jn=K(Ie,"customInspect")?Ie.customInspect:!0;if(typeof Jn!="boolean"&&Jn!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(Ie,"indent")&&Ie.indent!==null&&Ie.indent!==" "&&!(parseInt(Ie.indent,10)===Ie.indent&&Ie.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(Ie,"numericSeparator")&&typeof Ie.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Er=Ie.numericSeparator;if(typeof W>"u")return"undefined";if(W===null)return"null";if(typeof W=="boolean")return W?"true":"false";if(typeof W=="string")return Ge(W,Ie);if(typeof W=="number"){if(W===0)return 1/0/W>0?"0":"-0";var Zt=String(W);return Er?M(W,Zt):Zt}if(typeof W=="bigint"){var er=String(W)+"n";return Er?M(W,er):er}var xl=typeof Ie.depth>"u"?5:Ie.depth;if(typeof Ze>"u"&&(Ze=0),Ze>=xl&&xl>0&&typeof W=="object")return Z(W)?"[Array]":"[Object]";var oo=Zn(Ie,Ze);if(typeof nt>"u")nt=[];else if(ee(nt,W)>=0)return"[Circular]";function fn(io,ka,O1){if(ka&&(nt=I.call(nt),nt.push(ka)),O1){var Rp={depth:Ie.depth};return K(Ie,"quoteStyle")&&(Rp.quoteStyle=Ie.quoteStyle),B(io,Rp,Ze+1,nt)}return B(io,Ie,Ze+1,nt)}if(typeof W=="function"&&!H(W)){var bp=G(W),wp=Qn(W,fn);return"[Function"+(bp?": "+bp:" (anonymous)")+"]"+(wp.length>0?" { "+k.call(wp,", ")+" }":"")}if(ke(W)){var Tp=R?b.call(String(W),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(W);return typeof W=="object"&&!R?lt(Tp):Tp}if(Le(W)){for(var pi="<"+T.call(String(W.nodeName)),bl=W.attributes||[],Ca=0;Ca<bl.length;Ca++)pi+=" "+bl[Ca].name+"="+J(Y(bl[Ca].value),"double",Ie);return pi+=">",W.childNodes&&W.childNodes.length&&(pi+="..."),pi+="</"+T.call(String(W.nodeName))+">",pi}if(Z(W)){if(W.length===0)return"[]";var wl=Qn(W,fn);return oo&&!Tn(wl)?"["+Xn(wl,oo)+"]":"[ "+k.call(wl,", ")+" ]"}if(X(W)){var Tl=Qn(W,fn);return!("cause"in Error.prototype)&&"cause"in W&&!N.call(W,"cause")?"{ ["+String(W)+"] "+k.call(C.call("[cause]: "+fn(W.cause),Tl),", ")+" }":Tl.length===0?"["+String(W)+"]":"{ ["+String(W)+"] "+k.call(Tl,", ")+" }"}if(typeof W=="object"&&Jn){if(z&&typeof W[z]=="function"&&q)return q(W,{depth:xl-Ze});if(Jn!=="symbol"&&typeof W.inspect=="function")return W.inspect()}if(ge(W)){var Sp=[];return r&&r.call(W,function(io,ka){Sp.push(fn(ka,W,!0)+" => "+fn(io,W))}),dn("Map",n.call(W),Sp,oo)}if(oe(W)){var Ep=[];return s&&s.call(W,function(io){Ep.push(fn(io,W))}),dn("Set",a.call(W),Ep,oo)}if(ue(W))return _t("WeakMap");if(le(W))return _t("WeakSet");if(Fe(W))return _t("WeakRef");if($(W))return lt(fn(Number(W)));if(Ae(W))return lt(fn(j.call(W)));if(ye(W))return lt(h.call(W));if(re(W))return lt(fn(String(W)));if(typeof window<"u"&&W===window)return"{ [object Window] }";if(typeof globalThis<"u"&&W===globalThis||typeof Pp<"u"&&W===Pp)return"{ [object globalThis] }";if(!V(W)&&!H(W)){var Sl=Qn(W,fn),Cp=L?L(W)===Object.prototype:W instanceof Object||W.constructor===Object,El=W instanceof Object?"":"null prototype",kp=!Cp&&O&&Object(W)===W&&O in W?m.call(ae(W),8,-1):El?"Object":"",I1=Cp||typeof W.constructor!="function"?"":W.constructor.name?W.constructor.name+" ":"",Cl=I1+(kp||El?"["+k.call(C.call([],kp||[],El||[]),": ")+"] ":"");return Sl.length===0?Cl+"{}":oo?Cl+"{"+Xn(Sl,oo)+"}":Cl+"{ "+k.call(Sl,", ")+" }"}return String(W)};function J(B,W,Ne){var Ze=Ne.quoteStyle||W,nt=Q[Ze];return nt+B+nt}function Y(B){return b.call(String(B),/"/g,""")}function U(B){return!O||!(typeof B=="object"&&(O in B||typeof B[O]<"u"))}function Z(B){return ae(B)==="[object Array]"&&U(B)}function V(B){return ae(B)==="[object Date]"&&U(B)}function H(B){return ae(B)==="[object RegExp]"&&U(B)}function X(B){return ae(B)==="[object Error]"&&U(B)}function re(B){return ae(B)==="[object String]"&&U(B)}function $(B){return ae(B)==="[object Number]"&&U(B)}function ye(B){return ae(B)==="[object Boolean]"&&U(B)}function ke(B){if(R)return B&&typeof B=="object"&&B instanceof Symbol;if(typeof B=="symbol")return!0;if(!B||typeof B!="object"||!F)return!1;try{return F.call(B),!0}catch{}return!1}function Ae(B){if(!B||typeof B!="object"||!j)return!1;try{return j.call(B),!0}catch{}return!1}var Te=Object.prototype.hasOwnProperty||function(B){return B in this};function K(B,W){return Te.call(B,W)}function ae(B){return y.call(B)}function G(B){if(B.name)return B.name;var W=v.call(g.call(B),/^function\s*([\w$]+)/);return W?W[1]:null}function ee(B,W){if(B.indexOf)return B.indexOf(W);for(var Ne=0,Ze=B.length;Ne<Ze;Ne++)if(B[Ne]===W)return Ne;return-1}function ge(B){if(!n||!B||typeof B!="object")return!1;try{n.call(B);try{a.call(B)}catch{return!0}return B instanceof Map}catch{}return!1}function ue(B){if(!c||!B||typeof B!="object")return!1;try{c.call(B,c);try{d.call(B,d)}catch{return!0}return B instanceof WeakMap}catch{}return!1}function Fe(B){if(!f||!B||typeof B!="object")return!1;try{return f.call(B),!0}catch{}return!1}function oe(B){if(!a||!B||typeof B!="object")return!1;try{a.call(B);try{n.call(B)}catch{return!0}return B instanceof Set}catch{}return!1}function le(B){if(!d||!B||typeof B!="object")return!1;try{d.call(B,d);try{c.call(B,c)}catch{return!0}return B instanceof WeakSet}catch{}return!1}function Le(B){return!B||typeof B!="object"?!1:typeof HTMLElement<"u"&&B instanceof HTMLElement?!0:typeof B.nodeName=="string"&&typeof B.getAttribute=="function"}function Ge(B,W){if(B.length>W.maxStringLength){var Ne=B.length-W.maxStringLength,Ze="... "+Ne+" more character"+(Ne>1?"s":"");return Ge(m.call(B,0,W.maxStringLength),W)+Ze}var nt=ie[W.quoteStyle||"single"];nt.lastIndex=0;var Ie=b.call(b.call(B,nt,"\\$1"),/[\x00-\x1f]/g,xt);return J(Ie,"single",W)}function xt(B){var W=B.charCodeAt(0),Ne={8:"b",9:"t",10:"n",12:"f",13:"r"}[W];return Ne?"\\"+Ne:"\\x"+(W<16?"0":"")+S.call(W.toString(16))}function lt(B){return"Object("+B+")"}function _t(B){return B+" { ? }"}function dn(B,W,Ne,Ze){var nt=Ze?Xn(Ne,Ze):k.call(Ne,", ");return B+" ("+W+") {"+nt+"}"}function Tn(B){for(var W=0;W<B.length;W++)if(ee(B[W],`
|
|
2
|
+
`)>=0)return!1;return!0}function Zn(B,W){var Ne;if(B.indent===" ")Ne=" ";else if(typeof B.indent=="number"&&B.indent>0)Ne=k.call(Array(B.indent+1)," ");else return null;return{base:Ne,prev:k.call(Array(W+1),Ne)}}function Xn(B,W){if(B.length===0)return"";var Ne=`
|
|
3
|
+
`+W.prev+W.base;return Ne+k.call(B,","+Ne)+`
|
|
4
|
+
`+W.prev}function Qn(B,W){var Ne=Z(B),Ze=[];if(Ne){Ze.length=B.length;for(var nt=0;nt<B.length;nt++)Ze[nt]=K(B,nt)?W(B[nt],B):""}var Ie=typeof D=="function"?D(B):[],Jn;if(R){Jn={};for(var Er=0;Er<Ie.length;Er++)Jn["$"+Ie[Er]]=Ie[Er]}for(var Zt in B)K(B,Zt)&&(Ne&&String(Number(Zt))===Zt&&Zt<B.length||R&&Jn["$"+Zt]instanceof Symbol||(w.call(/[^\w$]/,Zt)?Ze.push(W(Zt,B)+": "+W(B[Zt],B)):Ze.push(Zt+": "+W(B[Zt],B))));if(typeof D=="function")for(var er=0;er<Ie.length;er++)N.call(B,Ie[er])&&Ze.push("["+W(Ie[er])+"]: "+W(B[Ie[er]],B));return Ze}return Rl}var Pl,Op;function L1(){if(Op)return Pl;Op=1;var e=Us(),t=Ko(),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 Pl=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},Pl}var Al,_p;function hy(){return _p||(_p=1,Al=Object),Al}var Il,Mp;function V1(){return Mp||(Mp=1,Il=Error),Il}var Ol,Dp;function z1(){return Dp||(Dp=1,Ol=EvalError),Ol}var _l,jp;function $1(){return jp||(jp=1,_l=RangeError),_l}var Ml,Np;function B1(){return Np||(Np=1,Ml=ReferenceError),Ml}var Dl,Fp;function H1(){return Fp||(Fp=1,Dl=SyntaxError),Dl}var jl,Lp;function W1(){return Lp||(Lp=1,jl=URIError),jl}var Nl,Vp;function q1(){return Vp||(Vp=1,Nl=Math.abs),Nl}var Fl,zp;function U1(){return zp||(zp=1,Fl=Math.floor),Fl}var Ll,$p;function G1(){return $p||($p=1,Ll=Math.max),Ll}var Vl,Bp;function Y1(){return Bp||(Bp=1,Vl=Math.min),Vl}var zl,Hp;function K1(){return Hp||(Hp=1,zl=Math.pow),zl}var $l,Wp;function Z1(){return Wp||(Wp=1,$l=Math.round),$l}var Bl,qp;function X1(){return qp||(qp=1,Bl=Number.isNaN||function(t){return t!==t}),Bl}var Hl,Up;function Q1(){if(Up)return Hl;Up=1;var e=X1();return Hl=function(n){return e(n)||n===0?n:n<0?-1:1},Hl}var Wl,Gp;function J1(){return Gp||(Gp=1,Wl=Object.getOwnPropertyDescriptor),Wl}var ql,Yp;function my(){if(Yp)return ql;Yp=1;var e=J1();if(e)try{e([],"length")}catch{e=null}return ql=e,ql}var Ul,Kp;function eT(){if(Kp)return Ul;Kp=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Ul=e,Ul}var Gl,Zp;function tT(){return Zp||(Zp=1,Gl=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}),Gl}var Yl,Xp;function nT(){if(Xp)return Yl;Xp=1;var e=typeof Symbol<"u"&&Symbol,t=tT();return Yl=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Yl}var Kl,Qp;function gy(){return Qp||(Qp=1,Kl=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Kl}var Zl,Jp;function vy(){if(Jp)return Zl;Jp=1;var e=hy();return Zl=e.getPrototypeOf||null,Zl}var Xl,eh;function rT(){if(eh)return Xl;eh=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 Xl=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 g=function(){};g.prototype=c.prototype,d.prototype=new g,g.prototype=null}return d},Xl}var Ql,th;function Gs(){if(th)return Ql;th=1;var e=rT();return Ql=Function.prototype.bind||e,Ql}var Jl,nh;function kd(){return nh||(nh=1,Jl=Function.prototype.call),Jl}var ec,rh;function yy(){return rh||(rh=1,ec=Function.prototype.apply),ec}var tc,oh;function oT(){return oh||(oh=1,tc=typeof Reflect<"u"&&Reflect&&Reflect.apply),tc}var nc,ih;function iT(){if(ih)return nc;ih=1;var e=Gs(),t=yy(),n=kd(),r=oT();return nc=r||e.call(n,t),nc}var rc,ah;function xy(){if(ah)return rc;ah=1;var e=Gs(),t=Ko(),n=kd(),r=iT();return rc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},rc}var oc,sh;function aT(){if(sh)return oc;sh=1;var e=xy(),t=my(),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 oc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,oc}var ic,lh;function sT(){if(lh)return ic;lh=1;var e=gy(),t=vy(),n=aT();return ic=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,ic}var ac,ch;function lT(){if(ch)return ac;ch=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Gs();return ac=n.call(e,t),ac}var sc,uh;function Rd(){if(uh)return sc;uh=1;var e,t=hy(),n=V1(),r=z1(),o=$1(),i=B1(),a=H1(),s=Ko(),l=W1(),c=q1(),u=U1(),d=G1(),p=Y1(),f=K1(),h=Z1(),y=Q1(),g=Function,v=function(H){try{return g('"use strict"; return ('+H+").constructor;")()}catch{}},m=my(),b=eT(),S=function(){throw new s},T=m?function(){try{return arguments.callee,S}catch{try{return m(arguments,"callee").get}catch{return S}}}():S,w=nT()(),C=sT(),k=vy(),I=gy(),P=yy(),j=kd(),D={},F=typeof Uint8Array>"u"||!C?e:C(Uint8Array),R={__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%":D,"%AsyncGenerator%":D,"%AsyncGeneratorFunction%":D,"%AsyncIteratorPrototype%":D,"%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%":g,"%GeneratorFunction%":D,"%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%":m,"%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%":F,"%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%":k,"%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(H){var O=C(C(H));R["%Error.prototype%"]=O}var N=function H(X){var re;if(X==="%AsyncFunction%")re=v("async function () {}");else if(X==="%GeneratorFunction%")re=v("function* () {}");else if(X==="%AsyncGeneratorFunction%")re=v("async function* () {}");else if(X==="%AsyncGenerator%"){var $=H("%AsyncGeneratorFunction%");$&&(re=$.prototype)}else if(X==="%AsyncIteratorPrototype%"){var ye=H("%AsyncGenerator%");ye&&C&&(re=C(ye.prototype))}return R[X]=re,re},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"]},M=Gs(),q=lT(),_=M.call(j,Array.prototype.concat),z=M.call(P,Array.prototype.splice),Q=M.call(j,String.prototype.replace),ie=M.call(j,String.prototype.slice),J=M.call(j,RegExp.prototype.exec),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,Z=function(X){var re=ie(X,0,1),$=ie(X,-1);if(re==="%"&&$!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if($==="%"&&re!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ye=[];return Q(X,Y,function(ke,Ae,Te,K){ye[ye.length]=Te?Q(K,U,"$1"):Ae||ke}),ye},V=function(X,re){var $=X,ye;if(q(L,$)&&(ye=L[$],$="%"+ye[0]+"%"),q(R,$)){var ke=R[$];if(ke===D&&(ke=N($)),typeof ke>"u"&&!re)throw new s("intrinsic "+X+" exists, but is not available. Please file an issue!");return{alias:ye,name:$,value:ke}}throw new a("intrinsic "+X+" does not exist!")};return sc=function(X,re){if(typeof X!="string"||X.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof re!="boolean")throw new s('"allowMissing" argument must be a boolean');if(J(/^%?[^%]*%?$/,X)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var $=Z(X),ye=$.length>0?$[0]:"",ke=V("%"+ye+"%",re),Ae=ke.name,Te=ke.value,K=!1,ae=ke.alias;ae&&(ye=ae[0],z($,_([0,1],ae)));for(var G=1,ee=!0;G<$.length;G+=1){var ge=$[G],ue=ie(ge,0,1),Fe=ie(ge,-1);if((ue==='"'||ue==="'"||ue==="`"||Fe==='"'||Fe==="'"||Fe==="`")&&ue!==Fe)throw new a("property names with quotes must have matching quotes");if((ge==="constructor"||!ee)&&(K=!0),ye+="."+ge,Ae="%"+ye+"%",q(R,Ae))Te=R[Ae];else if(Te!=null){if(!(ge in Te)){if(!re)throw new s("base intrinsic for "+X+" exists, but the property is not available.");return}if(m&&G+1>=$.length){var oe=m(Te,ge);ee=!!oe,ee&&"get"in oe&&!("originalValue"in oe.get)?Te=oe.get:Te=Te[ge]}else ee=q(Te,ge),Te=Te[ge];ee&&!K&&(R[Ae]=Te)}}return Te},sc}var lc,dh;function by(){if(dh)return lc;dh=1;var e=Rd(),t=xy(),n=t([e("%String.prototype.indexOf%")]);return lc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},lc}var cc,fh;function wy(){if(fh)return cc;fh=1;var e=Rd(),t=by(),n=Us(),r=Ko(),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 cc=!!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},cc}var uc,ph;function cT(){if(ph)return uc;ph=1;var e=Rd(),t=by(),n=Us(),r=wy(),o=Ko(),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 uc=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,uc}var dc,hh;function uT(){if(hh)return dc;hh=1;var e=Ko(),t=Us(),n=L1(),r=wy(),o=cT(),i=o||r||n;return dc=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},dc}var mh=e=>Array.isArray(e),fc=e=>e===void 0,pc=e=>e===null,dT=Function.bind.call(Function.call,Object.prototype.toString),fT=e=>!!e&&dT(e)==="[object Error]"||e instanceof Error,Ty=(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]"&&Ty(e,Date),ht={array:mh,date:hT,empty:e=>pc(e)||fc(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:Ty,isError:fT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>pc(e)||fc(e),null:pc,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!mh(e)&&typeof e=="object",primitive:pT,string:e=>typeof e=="string",undefined:fc},mT=e=>Object.keys(e),Cr=(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 Pd="-",gT=e=>{const t=yT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Pd);return s[0]===""&&s.length!==1&&s.shift(),Sy(s,t)||vT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},Sy=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Sy(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Pd);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},gh=/^\[(.+)\]$/,vT=e=>{if(gh.test(e)){const t=gh.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)xu(n[o],r,o,t);return r},xu=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:vh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(xT(o)){xu(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{xu(a,vh(t,i),n,r)})})},vh=(e,t)=>{let n=e;return t.split(Pd).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)}}},bu="!",wu=":",wT=wu.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===wu){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+wu,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(bu)?e.substring(0,e.length-1):e.startsWith(bu)?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 g=!!y,v=r(g?h.substring(0,y):h);if(!v){if(!g){l=u+(l.length>0?" "+l:l);continue}if(v=r(h),!v){l=u+(l.length>0?" "+l:l);continue}g=!1}const m=i(p).join(":"),b=f?m+bu:m,S=b+v;if(a.includes(S))continue;a.push(S);const T=o(v,g);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=Ey(t))&&(r&&(r+=" "),r+=n);return r}const Ey=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ey(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},Cy=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ky=/^\((?:(\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)\(.+\)$/,ao=e=>IT.test(e),je=e=>!!e&&!Number.isNaN(Number(e)),kr=e=>!!e&&Number.isInteger(Number(e)),yh=e=>e.endsWith("%")&&je(e.slice(0,-1)),tr=e=>OT.test(e),NT=()=>!0,FT=e=>_T.test(e)&&!MT.test(e),Ad=()=>!1,LT=e=>DT.test(e),VT=e=>jT.test(e),zT=e=>!he(e)&&!me(e),$T=e=>Zo(e,Ay,Ad),he=e=>Cy.test(e),Rr=e=>Zo(e,Iy,FT),hc=e=>Zo(e,QT,je),BT=e=>Zo(e,Ry,Ad),HT=e=>Zo(e,Py,VT),WT=e=>Zo(e,Ad,LT),me=e=>ky.test(e),Ra=e=>Xo(e,Iy),qT=e=>Xo(e,JT),UT=e=>Xo(e,Ry),GT=e=>Xo(e,Ay),YT=e=>Xo(e,Py),KT=e=>Xo(e,eS,!0),Zo=(e,t,n)=>{const r=Cy.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Xo=(e,t,n=!1)=>{const r=ky.exec(e);return r?r[1]?t(r[1]):n:!1},Ry=e=>e==="position",ZT=new Set(["image","url"]),Py=e=>ZT.has(e),XT=new Set(["length","size","percentage"]),Ay=e=>XT.has(e),Iy=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"),g=At("ease"),v=At("animate"),m=()=>["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=()=>[ao,"full","auto",...w()],k=()=>[kr,"none","subgrid",me,he],I=()=>["auto",{span:["full",kr,me,he]},me,he],P=()=>[kr,"auto",me,he],j=()=>["auto","min","max","fr",me,he],D=()=>["start","end","center","between","around","evenly","stretch","baseline"],F=()=>["start","end","center","stretch"],R=()=>["auto",...w()],O=()=>[ao,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],N=()=>[e,me,he],L=()=>[yh,Rr],M=()=>["","none","full",c,me,he],q=()=>["",je,Ra,Rr],_=()=>["solid","dashed","dotted","double"],z=()=>["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],ie=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",me,he],J=()=>["none",je,me,he],Y=()=>["none",je,me,he],U=()=>[je,me,he],Z=()=>[ao,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[tr],breakpoint:[tr],color:[NT],container:[tr],"drop-shadow":[tr],ease:["in","out","in-out"],font:[zT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[tr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[tr],shadow:[tr],spacing:["px",je],text:[tr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ao,he,me,y]}],container:["container"],columns:[{columns:[je,he,me,s]}],"break-after":[{"break-after":m()}],"break-before":[{"break-before":m()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],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:[kr,"auto",me,he]}],basis:[{basis:[ao,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,ao,"auto","initial","none",he]}],grow:[{grow:["",je,me,he]}],shrink:[{shrink:["",je,me,he]}],order:[{order:[kr,"first","last","none",me,he]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":k()}],"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:[...D(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...F(),"baseline"]}],"align-self":[{self:["auto",...F(),"baseline"]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],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:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[s,"screen",...O()]}],"min-w":[{"min-w":[s,"screen","none",...O()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...O()]}],h:[{h:["screen",...O()]}],"min-h":[{"min-h":["screen","none",...O()]}],"max-h":[{"max-h":["screen",...O()]}],"font-size":[{text:["base",n,Ra,Rr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,me,hc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",yh,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":[je,"none",me,hc]}],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:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",me,Rr]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[je,"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"]},kr,me,he],radial:["",me,he],conic:[kr,me,he]},YT,HT]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:q()}],"border-w-x":[{"border-x":q()}],"border-w-y":[{"border-y":q()}],"border-w-s":[{"border-s":q()}],"border-w-e":[{"border-e":q()}],"border-w-t":[{"border-t":q()}],"border-w-r":[{"border-r":q()}],"border-w-b":[{"border-b":q()}],"border-w-l":[{"border-l":q()}],"divide-x":[{"divide-x":q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[..._(),"hidden","none"]}],"divide-style":[{divide:[..._(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[..._(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,me,he]}],"outline-w":[{outline:["",je,Ra,Rr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,KT,WT]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",me,he,d]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[je,Rr]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":N()}],opacity:[{opacity:[je,me,he]}],"mix-blend":[{"mix-blend":[...z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none",me,he]}],blur:[{blur:Q()}],brightness:[{brightness:[je,me,he]}],contrast:[{contrast:[je,me,he]}],"drop-shadow":[{"drop-shadow":["","none",p,me,he]}],grayscale:[{grayscale:["",je,me,he]}],"hue-rotate":[{"hue-rotate":[je,me,he]}],invert:[{invert:["",je,me,he]}],saturate:[{saturate:[je,me,he]}],sepia:[{sepia:["",je,me,he]}],"backdrop-filter":[{"backdrop-filter":["","none",me,he]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[je,me,he]}],"backdrop-contrast":[{"backdrop-contrast":[je,me,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,me,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,me,he]}],"backdrop-invert":[{"backdrop-invert":["",je,me,he]}],"backdrop-opacity":[{"backdrop-opacity":[je,me,he]}],"backdrop-saturate":[{"backdrop-saturate":[je,me,he]}],"backdrop-sepia":[{"backdrop-sepia":["",je,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:[je,"initial",me,he]}],ease:[{ease:["linear","initial",g,me,he]}],delay:[{delay:[je,me,he]}],animate:[{animate:["none",v,me,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,me,he]}],"perspective-origin":[{"perspective-origin":ie()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:Y()}],"scale-x":[{"scale-x":Y()}],"scale-y":[{"scale-y":Y()}],"scale-z":[{"scale-z":Y()}],"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:ie()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"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",...N()]}],"stroke-w":[{stroke:[je,Ra,Rr,hc]}],stroke:[{stroke:["none",...N()]}],"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),Id=(...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),Be=(...e)=>nS(fy(e)),Od=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},la=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Oy=e=>e.scrollHeight>e.clientHeight,rn=(e,t=2)=>e.toString(16).padStart(t,"0"),ca=()=>{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,`${rn(t,4)+rn(n,3)}-${rn(r[0])+rn(r[1])}-${rn(r[2])+rn(r[3])}-${rn(r[4])+rn(r[5])}-${rn(r[6])+rn(r[7])+rn(r[8])+rn(r[9])}`},xh=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),bh={basic:/[,[\]]+?/,extend:/[,[\].]+?/},_d=(e,t)=>{const n=xh(t,bh.basic,e)||xh(t,bh.extend,e);return n===void 0||n===e?void 0:n},Li=()=>typeof window>"u",Tu=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),_y=(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},iS=e=>!e,Md=()=>{},wh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Th=fy,Qo=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Th(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=wh(u)||wh(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,g]=h;return Array.isArray(g)?g.includes({...i,...s}[y]):{...i,...s}[y]===g})?[...c,d,p]:c},[]);return Th(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)},aS="span",Jo=E.forwardRef(function(t,n){const r=t.as||aS;return x.jsx(r,{ref:n,...t,as:void 0})}),sS=Qo("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"}}),Ro=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(Jo,{...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:Be(sS({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),Vi=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function lS(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 cS=({children:e,...t})=>{const n=Vi(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:lS(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})},uS=Qo("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"}}}),dS=Qo("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"}}),Dd=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return x.jsxs(Jo,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Be(dS({size:a,theme:i}),t),children:[n?x.jsx("span",{className:uS({theme:n})}):null,r,s.children]})}),zi=E.createContext({});function xn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const jd=typeof window<"u",Ys=jd?E.useLayoutEffect:E.useEffect,Ks=E.createContext(null),Po=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class fS 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 pS({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(Po);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(fS,{isPresent:t,childRef:o,sizeRef:i,children:A.cloneElement(e,{ref:o})})}const hS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=xn(mS),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(pS,{isPresent:n,anchorX:s,children:e})),x.jsx(Ks.Provider,{value:d,children:e})};function mS(){return new Map}function My(e=!0){const t=E.useContext(Ks);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 Pa=e=>e.key||"";function Sh(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const gr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=My(a),u=E.useMemo(()=>Sh(e),[e]),d=a&&!l?[]:u.map(Pa),p=E.useRef(!0),f=E.useRef(u),h=xn(()=>new Map),[y,g]=E.useState(u),[v,m]=E.useState(u);Ys(()=>{p.current=!1,f.current=u;for(let T=0;T<v.length;T++){const w=Pa(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],k=Pa(C);d.includes(k)||(T.splice(w,0,C),b.push(C))}return i==="wait"&&b.length&&(T=b),m(Sh(T)),g(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(zi);return x.jsx(x.Fragment,{children:v.map(T=>{const w=Pa(T),C=a&&!l?!1:u===v||d.includes(w),k=()=>{if(h.has(w))h.set(w,!0);else return;let I=!0;h.forEach(P=>{P||(I=!1)}),I&&(S==null||S(),m(f.current),a&&(c==null||c()),r&&r())};return x.jsx(hS,{isPresent:C,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:C?void 0:k,anchorX:s,children:T},w)})})},gS=E.createContext(null),Gt=e=>e;let ei=Gt,un=Gt;process.env.NODE_ENV!=="production"&&(ei=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},un=(e,t)=>{if(!e)throw new Error(t)});const vS={useManualTiming:!1},Aa=["read","resolveKeyframes","update","preRender","render","postRender"];function yS(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 xS=40;function Dy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Aa.reduce((v,m)=>(v[m]=yS(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,xS),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:Aa.reduce((v,m)=>{const b=a[m];return v[m]=(S,T=!1,w=!1)=>(n||h(),b.schedule(S,T,w)),v},{}),cancel:v=>{for(let m=0;m<Aa.length;m++)a[Aa[m]].cancel(v)},state:o,steps:a}}const{schedule:Qe,cancel:Hn,state:Mt,steps:mc}=Dy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Gt,!0);function bS(){const e=E.useRef(!1);return Ys(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function wS(){const e=bS(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>Qe.postRender(r),[r]),t]}const TS=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Eh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(TS);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 jy=e=>e===!0,SS=e=>jy(e===!0)||e==="id",ES=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(zi),o=E.useContext(gS),[i,a]=wS(),s=E.useRef(null),l=r.id||o;s.current===null&&(SS(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:jy(n)&&r.group||Eh()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return x.jsx(zi.Provider,{value:c,children:e})},Ny=E.createContext({strict:!1}),Ch={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"]},Ao={};for(const e in Ch)Ao[e]={isEnabled:t=>Ch[e].some(n=>!!t[n])};function CS(e){for(const t in e)Ao[t]={...Ao[t],...e[t]}}const kS=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 rs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||kS.has(e)}let Fy=e=>!rs(e);function Ly(e){e&&(Fy=t=>t.startsWith("on")?!rs(t):e(t))}try{Ly(require("@emotion/is-prop-valid").default)}catch{}function RS(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Fy(o)||n===!0&&rs(o)||!t&&!rs(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function PS({children:e,isValidProp:t,...n}){t&&Ly(t),n={...E.useContext(Po),...n},n.isStatic=xn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(Po.Provider,{value:r,children:e})}const kh=new Set;function Zs(e,t,n){e||kh.has(t)||(console.warn(t),kh.add(t))}function AS(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Zs(!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 Xs=E.createContext({});function Qs(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function $i(e){return typeof e=="string"||Array.isArray(e)}const Nd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Fd=["initial",...Nd];function Js(e){return Qs(e.animate)||Fd.some(t=>$i(e[t]))}function Vy(e){return!!(Js(e)||e.variants)}function IS(e,t){if(Js(e)){const{initial:n,animate:r}=e;return{initial:n===!1||$i(n)?n:void 0,animate:$i(r)?r:void 0}}return e.inherit!==!1?t:{}}function OS(e){const{initial:t,animate:n}=IS(e,E.useContext(Xs));return E.useMemo(()=>({initial:t,animate:n}),[Rh(t),Rh(n)])}function Rh(e){return Array.isArray(e)?e.join(" "):e}const _S=Symbol.for("motionComponentSymbol");function ho(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function MS(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):ho(n)&&(n.current=r))},[t])}const{schedule:Ld}=Dy(queueMicrotask,!1),Vd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),DS="framerAppearId",zy="data-"+Vd(DS),$y=E.createContext({});function jS(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(Xs),l=E.useContext(Ny),c=E.useContext(Ks),u=E.useContext(Po).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($y);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&NS(d.current,n,o,f);const h=E.useRef(!1);E.useInsertionEffect(()=>{p&&h.current&&p.update(n,c)});const y=n[zy],g=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 Ys(()=>{p&&(h.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Ld.render(p.render),g.current&&p.animationState&&p.animationState.animateChanges())}),E.useEffect(()=>{p&&(!g.current&&p.animationState&&p.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,y)}),g.current=!1))}),p}function NS(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:By(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&ho(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function By(e){if(e)return e.options.allowProjection!==!1?e.projection:By(e.parent)}function FS({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&CS(e);function s(c,u){let d;const p={...E.useContext(Po),...c,layoutId:LS(c)},{isStatic:f}=p,h=OS(c),y=r(c,f);if(!f&&jd){VS(p,e);const g=zS(p);d=g.MeasureLayout,h.visualElement=jS(o,y,p,t,g.ProjectionNode)}return x.jsxs(Xs.Provider,{value:h,children:[d&&h.visualElement?x.jsx(d,{visualElement:h.visualElement,...p}):null,n(o,c,MS(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[_S]=o,l}function LS({layoutId:e}){const t=E.useContext(zi).id;return t&&e!==void 0?t+"-"+e:e}function VS(e,t){const n=E.useContext(Ny).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?ei(!1,r):un(!1,r)}}function zS(e){const{drag:t,layout:n}=Ao;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 Hy=e=>t=>typeof t=="string"&&t.startsWith(e),zd=Hy("--"),$S=Hy("var(--"),$d=e=>$S(e)?BS.test(e.split("/*")[0].trim()):!1,BS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Bi={};function HS(e){for(const t in e)Bi[t]=e[t],zd(t)&&(Bi[t].isCSSVariable=!0)}const ti=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Kr=new Set(ti);function Wy(e,{layout:t,layoutId:n}){return Kr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Bi[e]||e==="opacity")}const Pt=e=>!!(e&&e.getVelocity),qy=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Wn=(e,t,n)=>n>t?t:n<e?e:n,ni={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Hi={...ni,transform:e=>Wn(0,1,e)},Ia={...ni,default:1},ua=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),rr=ua("deg"),In=ua("%"),be=ua("px"),WS=ua("vh"),qS=ua("vw"),Ph={...In,parse:e=>In.parse(e)/100,transform:e=>In.transform(e*100)},US={borderWidth:be,borderTopWidth:be,borderRightWidth:be,borderBottomWidth:be,borderLeftWidth:be,borderRadius:be,radius:be,borderTopLeftRadius:be,borderTopRightRadius:be,borderBottomRightRadius:be,borderBottomLeftRadius:be,width:be,maxWidth:be,height:be,maxHeight:be,top:be,right:be,bottom:be,left:be,padding:be,paddingTop:be,paddingRight:be,paddingBottom:be,paddingLeft:be,margin:be,marginTop:be,marginRight:be,marginBottom:be,marginLeft:be,backgroundPositionX:be,backgroundPositionY:be},GS={rotate:rr,rotateX:rr,rotateY:rr,rotateZ:rr,scale:Ia,scaleX:Ia,scaleY:Ia,scaleZ:Ia,skew:rr,skewX:rr,skewY:rr,distance:be,translateX:be,translateY:be,translateZ:be,x:be,y:be,z:be,perspective:be,transformPerspective:be,opacity:Hi,originX:Ph,originY:Ph,originZ:be},Ah={...ni,transform:Math.round},Bd={...US,...GS,zIndex:Ah,size:be,fillOpacity:Hi,strokeOpacity:Hi,numOctaves:Ah},YS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},KS=ti.length;function ZS(e,t,n){let r="",o=!0;for(let i=0;i<KS;i++){const a=ti[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=qy(s,Bd[a]);if(!l){o=!1;const u=YS[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Hd(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(Kr.has(l)){a=!0;continue}else if(zd(l)){o[l]=c;continue}else{const u=qy(c,Bd[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=ZS(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 Wd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Uy(e,t,n){for(const r in t)!Pt(t[r])&&!Wy(r,n)&&(e[r]=t[r])}function XS({transformTemplate:e},t){return E.useMemo(()=>{const n=Wd();return Hd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function QS(e,t){const n=e.style||{},r={};return Uy(r,n,e),Object.assign(r,XS(e,t)),r}function JS(e,t){const n={},r=QS(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 eE=["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 qd(e){return typeof e!="string"||e.includes("-")?!1:!!(eE.indexOf(e)>-1||/[A-Z]/u.test(e))}const tE={offset:"stroke-dashoffset",array:"stroke-dasharray"},nE={offset:"strokeDashoffset",array:"strokeDasharray"};function rE(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?tE:nE;e[i.offset]=be.transform(-r);const a=be.transform(t),s=be.transform(n);e[i.array]=`${a} ${s}`}function Ih(e,t,n){return typeof e=="string"?e:be.transform(t+n*e)}function oE(e,t,n){const r=Ih(t,e.x,e.width),o=Ih(n,e.y,e.height);return`${r} ${o}`}function Ud(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(Hd(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=oE(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&&rE(p,a,s,l,!1)}const Gy=()=>({...Wd(),attrs:{}}),Gd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function iE(e,t,n,r){const o=E.useMemo(()=>{const i=Gy();return Ud(i,t,Gd(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Uy(i,e.style,e),o.style={...i,...o.style}}return o}function aE(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(qd(n)?iE:JS)(r,i,a,n),c=RS(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 Oh(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Yd(e,t,n,r){if(typeof t=="function"){const[o,i]=Oh(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Oh(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const Su=e=>Array.isArray(e),sE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),lE=e=>Su(e)?e[e.length-1]||0:e;function Ya(e){const t=Pt(e)?e.get():e;return sE(t)?t.toValue():t}function cE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:uE(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const Yy=e=>(t,n)=>{const r=E.useContext(Xs),o=E.useContext(Ks),i=()=>cE(e,t,r,o);return n?i():xn(i)};function uE(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=Ya(i[p]);let{initial:a,animate:s}=e;const l=Js(e),c=Vy(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"&&!Qs(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const h=Yd(e,p[f]);if(h){const{transitionEnd:y,transition:g,...v}=h;for(const m in v){let b=v[m];if(Array.isArray(b)){const S=u?b.length-1:0;b=b[S]}b!==null&&(o[m]=b)}for(const m in y)o[m]=y[m]}}}return o}function Kd(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(Pt(o[a])||t.style&&Pt(t.style[a])||Wy(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 dE={useVisualState:Yy({scrapeMotionValuesFromProps:Kd,createRenderState:Wd})};function Ky(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 Zy(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 Xy=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 Qy(e,t,n,r){Zy(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Xy.has(o)?o:Vd(o),t.attrs[o])}function Jy(e,t,n){const r=Kd(e,t,n);for(const o in e)if(Pt(e[o])||Pt(t[o])){const i=ti.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const _h=["x","y","width","height","cx","cy","r"],fE={useVisualState:Yy({scrapeMotionValuesFromProps:Jy,createRenderState:Gy,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(Kr.has(s)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let s=0;s<_h.length;s++){const l=_h[s];e[l]!==t[l]&&(a=!0)}a&&Qe.read(()=>{Ky(n,r),Qe.render(()=>{Ud(r,o,Gd(n.tagName),e.transformTemplate),Qy(n,r)})})}})};function pE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...qd(r)?fE:dE,preloadedFeatures:e,useRender:aE(o),createVisualElement:t,Component:r};return FS(a)}}function Wi(e,t,n){const r=e.getProps();return Yd(r,t,n!==void 0?n:r.custom,e)}function Zd(e,t){return e?e[t]||e.default||e:void 0}const ex=new Set(["width","height","top","left","right","bottom",...ti]);function Xd(e,t){e.indexOf(t)===-1&&e.push(t)}function el(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function hE([...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 Qd{constructor(){this.subscriptions=[]}add(t){return Xd(this.subscriptions,t),()=>el(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 tx(e,t){return t?e*(1e3/t):0}let Ka;function mE(){Ka=void 0}const On={now:()=>(Ka===void 0&&On.set(Mt.isProcessing||vS.useManualTiming?Mt.timestamp:performance.now()),Ka),set:e=>{Ka=e,queueMicrotask(mE)}},Mh=30,gE=e=>!isNaN(parseFloat(e)),Ei={current:void 0};class vE{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=On.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=On.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=gE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Zs(!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 Qd);const r=this.events[t].add(n);return t==="change"?()=>{r(),Qe.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 Ei.current&&Ei.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=On.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Mh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Mh);return tx(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 Io(e,t){return new vE(e,t)}function yE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Io(n))}function xE(e,t){const n=Wi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=lE(i[a]);yE(e,a,s)}}function bE(e){return!!(Pt(e)&&e.add)}function Eu(e,t){const n=e.getValue("willChange");if(bE(n))return n.add(t)}function nx(e){return e.props[zy]}function Jd(e){let t;return()=>(t===void 0&&(t=e()),t)}const wE=Jd(()=>window.ScrollTimeline!==void 0);class TE{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(wE()&&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 rx extends TE{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const vn=e=>e*1e3,_n=e=>e/1e3;function tl(e){return typeof e=="function"}function Dh(e,t){e.timeline=t,e.onfinish=null}const ef=e=>Array.isArray(e)&&typeof e[0]=="number",SE={linearEasing:void 0};function EE(e,t){const n=Jd(e);return()=>{var r;return(r=SE[t])!==null&&r!==void 0?r:n()}}const os=EE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),$r=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},ox=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e($r(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function ix(e){return!!(typeof e=="function"&&os()||!e||typeof e=="string"&&(e in Cu||os())||ef(e)||Array.isArray(e)&&e.every(ix))}const yi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Cu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yi([0,.65,.55,1]),circOut:yi([.55,0,1,.45]),backIn:yi([.31,.01,.66,-.59]),backOut:yi([.33,1.53,.69,.99])};function ax(e,t){if(e)return typeof e=="function"&&os()?ox(e,t):ef(e)?yi(e):Array.isArray(e)?e.map(n=>ax(n,t)||Cu.easeOut):Cu[e]}const sx=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,CE=1e-7,kE=12;function RE(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=sx(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>CE&&++s<kE);return a}function da(e,t,n,r){if(e===t&&n===r)return Gt;const o=i=>RE(i,0,1,e,n);return i=>i===0||i===1?i:sx(o(i),t,r)}const lx=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cx=e=>t=>1-e(1-t),ux=da(.33,1.53,.69,.99),tf=cx(ux),dx=lx(tf),fx=e=>(e*=2)<1?.5*tf(e):.5*(2-Math.pow(2,-10*(e-1))),nf=e=>1-Math.sin(Math.acos(e)),px=cx(nf),hx=lx(nf),mx=e=>/^0[^.\s]+$/u.test(e);function PE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||mx(e):!0}const Ci=e=>Math.round(e*1e5)/1e5,rf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function AE(e){return e==null}const IE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,of=(e,t)=>n=>!!(typeof n=="string"&&IE.test(n)&&n.startsWith(e)||t&&!AE(n)&&Object.prototype.hasOwnProperty.call(n,t)),gx=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(rf);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},OE=e=>Wn(0,255,e),gc={...ni,transform:e=>Math.round(OE(e))},jr={test:of("rgb","red"),parse:gx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+gc.transform(e)+", "+gc.transform(t)+", "+gc.transform(n)+", "+Ci(Hi.transform(r))+")"};function _E(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 ku={test:of("#"),parse:_E,transform:jr.transform},mo={test:of("hsl","hue"),parse:gx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+In.transform(Ci(t))+", "+In.transform(Ci(n))+", "+Ci(Hi.transform(r))+")"},Nt={test:e=>jr.test(e)||ku.test(e)||mo.test(e),parse:e=>jr.test(e)?jr.parse(e):mo.test(e)?mo.parse(e):ku.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?jr.transform(e):mo.transform(e)},ME=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function DE(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(rf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(ME))===null||n===void 0?void 0:n.length)||0)>0}const vx="number",yx="color",jE="var",NE="var(",jh="${}",FE=/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 qi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(FE,l=>(Nt.test(l)?(r.color.push(i),o.push(yx),n.push(Nt.parse(l))):l.startsWith(NE)?(r.var.push(i),o.push(jE),n.push(l)):(r.number.push(i),o.push(vx),n.push(parseFloat(l))),++i,jh)).split(jh);return{values:n,split:s,indexes:r,types:o}}function xx(e){return qi(e).values}function bx(e){const{split:t,types:n}=qi(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===vx?i+=Ci(o[a]):s===yx?i+=Nt.transform(o[a]):i+=o[a]}return i}}const LE=e=>typeof e=="number"?0:e;function VE(e){const t=xx(e);return bx(e)(t.map(LE))}const ur={test:DE,parse:xx,createTransformer:bx,getAnimatableNone:VE},zE=new Set(["brightness","contrast","saturate","opacity"]);function $E(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(rf)||[];if(!r)return e;const o=n.replace(r,"");let i=zE.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const BE=/\b([a-z-]*)\(.*?\)/gu,Ru={...ur,getAnimatableNone:e=>{const t=e.match(BE);return t?t.map($E).join(" "):e}},HE={...Bd,color:Nt,backgroundColor:Nt,outlineColor:Nt,fill:Nt,stroke:Nt,borderColor:Nt,borderTopColor:Nt,borderRightColor:Nt,borderBottomColor:Nt,borderLeftColor:Nt,filter:Ru,WebkitFilter:Ru},wx=e=>HE[e];function Tx(e,t){let n=wx(e);return n!==Ru&&(n=ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const WE=new Set(["auto","none","0"]);function qE(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!WE.has(i)&&qi(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=Tx(n,o)}const Nr=e=>e*180/Math.PI,Pu=e=>{const t=Nr(Math.atan2(e[1],e[0]));return Au(t)},UE={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Pu,rotateZ:Pu,skewX:e=>Nr(Math.atan(e[1])),skewY:e=>Nr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Au=e=>(e=e%360,e<0&&(e+=360),e),Nh=Pu,Fh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Lh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),GE={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Fh,scaleY:Lh,scale:e=>(Fh(e)+Lh(e))/2,rotateX:e=>Au(Nr(Math.atan2(e[6],e[5]))),rotateY:e=>Au(Nr(Math.atan2(-e[2],e[0]))),rotateZ:Nh,rotate:Nh,skewX:e=>Nr(Math.atan(e[4])),skewY:e=>Nr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Vh(e){return e.includes("scale")?1:0}function Iu(e,t){if(!e||e==="none")return Vh(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=GE,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=UE,o=s}if(!o)return Vh(t);const i=r[t],a=o[1].split(",").map(KE);return typeof i=="function"?i(a):a[i]}const YE=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Iu(n,t)};function KE(e){return parseFloat(e.trim())}const zh=e=>e===ni||e===be,ZE=new Set(["x","y","z"]),XE=ti.filter(e=>!ZE.has(e));function QE(e){const t=[];return XE.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Oo={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})=>Iu(t,"x"),y:(e,{transform:t})=>Iu(t,"y")};Oo.translateX=Oo.x;Oo.translateY=Oo.y;const Vr=new Set;let Ou=!1,_u=!1;function Sx(){if(_u){const e=Array.from(Vr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=QE(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)})}_u=!1,Ou=!1,Vr.forEach(e=>e.complete()),Vr.clear()}function Ex(){Vr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_u=!0)})}function JE(){Ex(),Sx()}class af{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?(Vr.add(this),Ou||(Ou=!0,Qe.read(Ex),Qe.resolveKeyframes(Sx))):(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),Vr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Vr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Cx=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),eC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function tC(e){const t=eC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const nC=4;function kx(e,t,n=1){un(n<=nC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=tC(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return Cx(a)?parseFloat(a):a}return $d(o)?kx(o,t,n+1):o}const Rx=e=>t=>t.test(e),rC={test:e=>e==="auto",parse:e=>e},Px=[ni,be,In,rr,qS,WS,rC],$h=e=>Px.find(Rx(e));class Ax extends af{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(),$d(c))){const u=kx(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!ex.has(r)||t.length!==2)return;const[o,i]=t,a=$h(o),s=$h(i);if(a!==s)if(zh(a)&&zh(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++)PE(t[o])&&r.push(o);r.length&&qE(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=Oo[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]=Oo[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 Bh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ur.test(e)||e==="0")&&!e.startsWith("url("));function oC(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 iC(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=Bh(o,t),s=Bh(i,t);return ei(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:oC(e)||(n==="spring"||tl(n))&&r}const aC=e=>e!==null;function nl(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(aC),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const sC=40;class Ix{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=On.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>sC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&JE(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=On.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!iC(t,r,o,i))if(a)this.options.duration=0;else{l&&l(nl(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 is=2e4;function sf(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<is;)t+=n,r=e.next(t);return t>=is?1/0:t}const rt=(e,t,n)=>e+(t-e)*n;function vc(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 lC({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=vc(l,s,e+1/3),i=vc(l,s,e),a=vc(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function as(e,t){return n=>n>0?t:e}const yc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},cC=[ku,jr,mo],uC=e=>cC.find(t=>t.test(e));function Hh(e){const t=uC(e);if(ei(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===mo&&(n=lC(n)),n}const Wh=(e,t)=>{const n=Hh(e),r=Hh(t);if(!n||!r)return as(e,t);const o={...n};return i=>(o.red=yc(n.red,r.red,i),o.green=yc(n.green,r.green,i),o.blue=yc(n.blue,r.blue,i),o.alpha=rt(n.alpha,r.alpha,i),jr.transform(o))},dC=(e,t)=>n=>t(e(n)),fa=(...e)=>e.reduce(dC),Mu=new Set(["none","hidden"]);function fC(e,t){return Mu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function pC(e,t){return n=>rt(e,t,n)}function lf(e){return typeof e=="number"?pC:typeof e=="string"?$d(e)?as:Nt.test(e)?Wh:gC:Array.isArray(e)?Ox:typeof e=="object"?Nt.test(e)?Wh:hC:as}function Ox(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>lf(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function hC(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=lf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function mC(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 gC=(e,t)=>{const n=ur.createTransformer(t),r=qi(e),o=qi(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?Mu.has(e)&&!o.values.length||Mu.has(t)&&!r.values.length?fC(e,t):fa(Ox(mC(r,o),o.values),n):(ei(!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.`),as(e,t))};function _x(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?rt(e,t,n):lf(e)(e,t)}const vC=5;function Mx(e,t,n){const r=Math.max(t-vC,0);return tx(n-e(r),t-r)}const ut={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},qh=.001;function yC({duration:e=ut.duration,bounce:t=ut.bounce,velocity:n=ut.velocity,mass:r=ut.mass}){let o,i;ei(e<=vn(ut.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Wn(ut.minDamping,ut.maxDamping,a),e=Wn(ut.minDuration,ut.maxDuration,_n(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=Du(c,a),h=Math.exp(-d);return qh-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=Du(Math.pow(c,2),a);return(-o(c)+qh>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=bC(o,i,s);if(e=vn(e),isNaN(l))return{stiffness:ut.stiffness,damping:ut.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const xC=12;function bC(e,t,n){let r=n;for(let o=1;o<xC;o++)r=r-e(r)/t(r);return r}function Du(e,t){return e*Math.sqrt(1-t*t)}const wC=["duration","bounce"],TC=["stiffness","damping","mass"];function Uh(e,t){return t.some(n=>e[n]!==void 0)}function SC(e){let t={velocity:ut.velocity,stiffness:ut.stiffness,damping:ut.damping,mass:ut.mass,isResolvedFromDuration:!1,...e};if(!Uh(e,TC)&&Uh(e,wC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Wn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ut.mass,stiffness:o,damping:i}}else{const n=yC(e);t={...t,...n,mass:ut.mass},t.isResolvedFromDuration=!0}return t}function cf(e=ut.visualDuration,t=ut.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}=SC({...n,velocity:-_n(n.velocity||0)}),h=p||0,y=c/(2*Math.sqrt(l*u)),g=a-i,v=_n(Math.sqrt(l/u)),m=Math.abs(g)<5;r||(r=m?ut.restSpeed.granular:ut.restSpeed.default),o||(o=m?ut.restDelta.granular:ut.restDelta.default);let b;if(y<1){const T=Du(v,y);b=w=>{const C=Math.exp(-y*v*w);return a-C*((h+y*v*g)/T*Math.sin(T*w)+g*Math.cos(T*w))}}else if(y===1)b=T=>a-Math.exp(-v*T)*(g+(h+v*g)*T);else{const T=v*Math.sqrt(y*y-1);b=w=>{const C=Math.exp(-y*v*w),k=Math.min(T*w,300);return a-C*((h+y*v*g)*Math.sinh(k)+T*g*Math.cosh(k))/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?vn(h):Mx(b,T,w));const k=Math.abs(C)<=r,I=Math.abs(a-w)<=o;s.done=k&&I}return s.value=s.done?a:w,s},toString:()=>{const T=Math.min(sf(S),is),w=ox(C=>S.next(T*C).value,T,30);return T+"ms "+w}};return S}function Gh({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=k=>s!==void 0&&k<s||l!==void 0&&k>l,h=k=>s===void 0?l:l===void 0||Math.abs(s-k)<Math.abs(l-k)?s:l;let y=n*t;const g=d+y,v=a===void 0?g:a(g);v!==g&&(y=v-d);const m=k=>-y*Math.exp(-k/r),b=k=>v+m(k),S=k=>{const I=m(k),P=b(k);p.done=Math.abs(I)<=c,p.value=p.done?v:P};let T,w;const C=k=>{f(p.value)&&(T=k,w=cf({keyframes:[p.value,h(p.value)],velocity:Mx(b,k,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:k=>{let I=!1;return!w&&T===void 0&&(I=!0,S(k),C(k)),T!==void 0&&k>=T?w.next(k-T):(!I&&S(k),p)}}}const EC=da(.42,0,1,1),CC=da(0,0,.58,1),Dx=da(.42,0,.58,1),jx=e=>Array.isArray(e)&&typeof e[0]!="number",Yh={linear:Gt,easeIn:EC,easeInOut:Dx,easeOut:CC,circIn:nf,circInOut:hx,circOut:px,backIn:tf,backInOut:dx,backOut:ux,anticipate:fx},ju=e=>{if(ef(e)){un(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return da(t,n,r,o)}else if(typeof e=="string")return un(Yh[e]!==void 0,`Invalid easing type '${e}'`),Yh[e];return e};function kC(e,t,n){const r=[],o=n||_x,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=fa(l,s)}r.push(s)}return r}function Nx(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(un(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=kC(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=$r(e[d],e[d+1],u);return s[d](p)};return n?u=>c(Wn(e[0],e[i-1],u)):c}function Fx(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=$r(0,t,r);e.push(rt(n,1,o))}}function Lx(e){const t=[0];return Fx(t,e.length-1),t}function RC(e,t){return e.map(n=>n*t)}function PC(e,t){return e.map(()=>t||Dx).splice(0,e.length-1)}function ki({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=jx(r)?r.map(ju):ju(r),i={done:!1,value:t[0]},a=RC(n&&n.length===t.length?n:Lx(t),e),s=Nx(a,t,{ease:Array.isArray(o)?o:PC(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const AC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Qe.update(t,!0),stop:()=>Hn(t),now:()=>Mt.isProcessing?Mt.timestamp:On.now()}},IC={decay:Gh,inertia:Gh,tween:ki,keyframes:ki,spring:cf},OC=e=>e/100;class uf extends Ix{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)||af,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=tl(n)?n:IC[n]||ki;let l,c;process.env.NODE_ENV!=="production"&&s!==ki&&un(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==ki&&typeof t[0]!="number"&&(l=fa(OC,_x(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=sf(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:k}=this.options;return{done:!0,value:k[k.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:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-p*(this.speed>=0?1:-1),m=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 k=Math.min(this.currentTime,u)/d;let I=Math.floor(k),P=k%1;!P&&k>=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=Wn(0,1,P)*d}const T=m?{done:!1,value:l[0]}:S.next(b);s&&(T.value=s(T.value));let{done:w}=T;!m&&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=nl(l,this.options,o)),g&&g(T.value),C&&this.finish(),T}get duration(){const{resolved:t}=this;return t?_n(t.calculatedDuration):0}get time(){return _n(this.currentTime)}set time(t){t=vn(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=_n(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=AC,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 _C=new Set(["opacity","clipPath","filter","transform"]);function MC(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=ax(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 DC=Jd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ss=10,jC=2e4;function NC(e){return tl(e.type)||e.type==="spring"||!ix(e.ease)}function FC(e,t){const n=new uf({...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<jC;)r=n.sample(i),o.push(r.value),i+=ss;return{times:void 0,keyframes:o,duration:i-ss,ease:"linear"}}const Vx={anticipate:fx,backInOut:dx,circInOut:hx};function LC(e){return e in Vx}class Kh extends Ix{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new Ax(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"&&os()&&LC(i)&&(i=Vx[i]),NC(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:h,...y}=this.options,g=FC(t,y);t=g.keyframes,t.length===1&&(t[1]=t[0]),r=g.duration,o=g.times,i=g.ease,a="keyframes"}const u=MC(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Dh(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(nl(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 _n(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return _n(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=vn(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;Dh(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 uf({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),y=vn(this.time);c.setWithVelocity(h.sample(y-ss).value,h.sample(y).value,ss)}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 DC()&&r&&_C.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const VC={type:"spring",stiffness:500,damping:25,restSpeed:10},zC=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),$C={type:"keyframes",duration:.8},BC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},HC=(e,{keyframes:t})=>t.length>2?$C:Kr.has(e)?e.startsWith("scale")?zC(t[1]):VC:BC;function WC({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 df=(e,t,n,r={},o,i)=>a=>{const s=Zd(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-vn(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};WC(s)||(u={...u,...HC(e,u)}),u.duration&&(u.duration=vn(u.duration)),u.repeatDelay&&(u.repeatDelay=vn(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=nl(u.keyframes,s);if(p!==void 0)return Qe.update(()=>{u.onUpdate(p),u.onComplete()}),new rx([])}return!i&&Kh.supports(u)?new Kh(u):new uf(u)};function qC({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ff(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&&qC(u,d))continue;const h={delay:n,...Zd(a||{},d)};let y=!1;if(window.MotionHandoffAnimation){const v=nx(e);if(v){const m=window.MotionHandoffAnimation(v,d,Qe);m!==null&&(h.startTime=m,y=!0)}}Eu(e,d),p.start(df(d,p,f,e.shouldReduceMotion&&ex.has(d)?{type:!1}:h,e,y));const g=p.animation;g&&c.push(g)}return s&&Promise.all(c).then(()=>{Qe.update(()=>{s&&xE(e,s)})}),c}function Nu(e,t,n={}){var r;const o=Wi(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(ff(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return UC(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 UC(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(GC).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(Nu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function GC(e,t){return e.sortNodePosition(t)}function YC(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Nu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Nu(e,t,n);else{const o=typeof t=="function"?Wi(e,t,n.custom):t;r=Promise.all(ff(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function zx(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 KC=Fd.length;function $x(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?$x(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<KC;n++){const r=Fd[n],o=e.props[r];($i(o)||o===!1)&&(t[r]=o)}return t}const ZC=[...Nd].reverse(),XC=Nd.length;function QC(e){return t=>Promise.all(t.map(({animation:n,options:r})=>YC(e,n,r)))}function JC(e){let t=QC(e),n=Zh(),r=!0;const o=l=>(c,u)=>{var d;const p=Wi(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=$x(e.parent)||{},d=[],p=new Set;let f={},h=1/0;for(let g=0;g<XC;g++){const v=ZC[g],m=n[v],b=c[v]!==void 0?c[v]:u[v],S=$i(b),T=v===l?m.isActive:null;T===!1&&(h=g);let w=b===u[v]&&b!==c[v]&&S;if(w&&r&&e.manuallyAnimateOnMount&&(w=!1),m.protectedKeys={...f},!m.isActive&&T===null||!b&&!m.prevProp||Qs(b)||typeof b=="boolean")continue;const C=ek(m.prevProp,b);let k=C||v===l&&m.isActive&&!w&&S||g>h&&S,I=!1;const P=Array.isArray(b)?b:[b];let j=P.reduce(o(v),{});T===!1&&(j={});const{prevResolvedValues:D={}}=m,F={...D,...j},R=L=>{k=!0,p.has(L)&&(I=!0,p.delete(L)),m.needsAnimating[L]=!0;const M=e.getValue(L);M&&(M.liveStyle=!1)};for(const L in F){const M=j[L],q=D[L];if(f.hasOwnProperty(L))continue;let _=!1;Su(M)&&Su(q)?_=!zx(M,q):_=M!==q,_?M!=null?R(L):p.add(L):M!==void 0&&p.has(L)?R(L):m.protectedKeys[L]=!0}m.prevProp=b,m.prevResolvedValues=j,m.isActive&&(f={...f,...j}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(w&&C)||I)&&d.push(...P.map(L=>({animation:L,options:{type:v}})))}if(p.size){const g={};if(typeof c.initial!="boolean"){const v=Wi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(g.transition=v.transition)}p.forEach(v=>{const m=e.getBaseTarget(v),b=e.getValue(v);b&&(b.liveStyle=!0),g[v]=m??null}),d.push({animation:g})}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=Zh(),r=!0}}}function ek(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!zx(t,e):!1}function Pr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Zh(){return{animate:Pr(!0),whileInView:Pr(),whileHover:Pr(),whileTap:Pr(),whileDrag:Pr(),whileFocus:Pr(),exit:Pr()}}class vr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class tk extends vr{constructor(t){super(t),t.animationState||(t.animationState=JC(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Qs(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 nk=0;class rk extends vr{constructor(){super(...arguments),this.id=nk++}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 ok={animation:{Feature:tk},exit:{Feature:rk}},hn={x:!1,y:!1};function Bx(){return hn.x||hn.y}function ik(e){return e==="x"||e==="y"?hn[e]?null:(hn[e]=!0,()=>{hn[e]=!1}):hn.x||hn.y?null:(hn.x=hn.y=!0,()=>{hn.x=hn.y=!1})}function Ui(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const pf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function pa(e){return{point:{x:e.pageX,y:e.pageY}}}const ak=e=>t=>pf(t)&&e(t,pa(t));function Ri(e,t,n,r){return Ui(e,t,ak(n),r)}function Hx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function sk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function lk(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 Wx=1e-4,ck=1-Wx,uk=1+Wx,qx=.01,dk=0-qx,fk=0+qx;function $t(e){return e.max-e.min}function pk(e,t,n){return Math.abs(e-t)<=n}function Xh(e,t,n,r=.5){e.origin=r,e.originPoint=rt(t.min,t.max,e.origin),e.scale=$t(n)/$t(t),e.translate=rt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ck&&e.scale<=uk||isNaN(e.scale))&&(e.scale=1),(e.translate>=dk&&e.translate<=fk||isNaN(e.translate))&&(e.translate=0)}function Pi(e,t,n,r){Xh(e.x,t.x,n.x,r?r.originX:void 0),Xh(e.y,t.y,n.y,r?r.originY:void 0)}function Qh(e,t,n){e.min=n.min+t.min,e.max=e.min+$t(t)}function hk(e,t,n){Qh(e.x,t.x,n.x),Qh(e.y,t.y,n.y)}function Jh(e,t,n){e.min=t.min-n.min,e.max=e.min+$t(t)}function Ai(e,t,n){Jh(e.x,t.x,n.x),Jh(e.y,t.y,n.y)}const em=()=>({translate:0,scale:1,origin:0,originPoint:0}),go=()=>({x:em(),y:em()}),tm=()=>({min:0,max:0}),pt=()=>({x:tm(),y:tm()});function an(e){return[e("x"),e("y")]}function xc(e){return e===void 0||e===1}function Fu({scale:e,scaleX:t,scaleY:n}){return!xc(e)||!xc(t)||!xc(n)}function Ir(e){return Fu(e)||Ux(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ux(e){return nm(e.x)||nm(e.y)}function nm(e){return e&&e!=="0%"}function ls(e,t,n){const r=e-n,o=t*r;return n+o}function rm(e,t,n,r,o){return o!==void 0&&(e=ls(e,o,r)),ls(e,n,r)+t}function Lu(e,t=0,n=1,r,o){e.min=rm(e.min,t,n,r,o),e.max=rm(e.max,t,n,r,o)}function Gx(e,{x:t,y:n}){Lu(e.x,t.translate,t.scale,t.originPoint),Lu(e.y,n.translate,n.scale,n.originPoint)}const om=.999999999999,im=1.0000000000001;function mk(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&&yo(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Gx(e,a)),r&&Ir(i.latestValues)&&yo(e,i.latestValues))}t.x<im&&t.x>om&&(t.x=1),t.y<im&&t.y>om&&(t.y=1)}function vo(e,t){e.min=e.min+t,e.max=e.max+t}function am(e,t,n,r,o=.5){const i=rt(e.min,e.max,o);Lu(e,t,n,i,r)}function yo(e,t){am(e.x,t.x,t.scaleX,t.scale,t.originX),am(e.y,t.y,t.scaleY,t.scale,t.originY)}function Yx(e,t){return Hx(lk(e.getBoundingClientRect(),t))}function gk(e,t,n){const r=Yx(e,n),{scroll:o}=t;return o&&(vo(r.x,o.offset.x),vo(r.y,o.offset.y)),r}const Kx=({current:e})=>e?e.ownerDocument.defaultView:null,sm=(e,t)=>Math.abs(e-t);function vk(e,t){const n=sm(e.x,t.x),r=sm(e.y,t.y);return Math.sqrt(n**2+r**2)}class Zx{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=wc(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=vk(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:g,onMove:v}=this.handlers;p||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=bc(p,this.transformPagePoint),Qe.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 g=wc(d.type==="pointercancel"?this.lastMoveEventInfo:bc(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,g),h&&h(d,g)},!pf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=pa(t),s=bc(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Mt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,wc(s,this.history)),this.removeListeners=fa(Ri(this.contextWindow,"pointermove",this.handlePointerMove),Ri(this.contextWindow,"pointerup",this.handlePointerUp),Ri(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Hn(this.updatePoint)}}function bc(e,t){return t?{point:t(e.point)}:e}function lm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function wc({point:e},t){return{point:e,delta:lm(e,Xx(t)),offset:lm(e,yk(t)),velocity:xk(t,.1)}}function yk(e){return e[0]}function Xx(e){return e[e.length-1]}function xk(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Xx(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>vn(t)));)n--;if(!r)return{x:0,y:0};const i=_n(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 bk(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?rt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?rt(n,e,r.max):Math.min(e,n)),e}function cm(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 wk(e,{top:t,left:n,bottom:r,right:o}){return{x:cm(e.x,n,o),y:cm(e.y,t,r)}}function um(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 Tk(e,t){return{x:um(e.x,t.x),y:um(e.y,t.y)}}function Sk(e,t){let n=.5;const r=$t(e),o=$t(t);return o>r?n=$r(t.min,t.max-r,e.min):r>o&&(n=$r(e.min,e.max-o,t.min)),Wn(0,1,n)}function Ek(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 Vu=.35;function Ck(e=Vu){return e===!1?e=0:e===!0&&(e=Vu),{x:dm(e,"left","right"),y:dm(e,"top","bottom")}}function dm(e,t,n){return{min:fm(e,t),max:fm(e,n)}}function fm(e,t){return typeof e=="number"?e:e[t]||0}const kk=new WeakMap;class Rk{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(pa(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:h}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ik(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(g=>{let v=this.getAxisMotionValue(g).get()||0;if(In.test(v)){const{projection:m}=this.visualElement;if(m&&m.layout){const b=m.layout.layoutBox[g];b&&(v=$t(b)*(parseFloat(v)/100))}}this.originPoint[g]=v}),h&&Qe.postRender(()=>h(u,d)),Eu(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:g}=d;if(f&&this.currentDirection===null){this.currentDirection=Pk(g),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),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 Zx(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Kx(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&&Qe.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||!Oa(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=bk(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&&ho(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=wk(o.layoutBox,n):this.constraints=!1,this.elastic=Ck(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&an(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=Ek(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ho(t))return!1;const r=t.current;un(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=gk(r,o.root,this.visualElement.getTransformPagePoint());let a=Tk(o.layout.layoutBox,i);if(n){const s=n(sk(a));this.hasMutatedConstraints=!!s,s&&(a=Hx(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(!Oa(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 Eu(this.visualElement,t),r.start(df(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(!Oa(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]-rt(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ho(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]=Sk({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(!Oa(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(rt(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;kk.set(this.visualElement,this);const t=this.visualElement.current,n=Ri(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ho(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()),Qe.read(r);const a=Ui(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=Vu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Oa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Pk(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Ak extends vr{constructor(t){super(t),this.removeGroupControls=Gt,this.removeListeners=Gt,this.controls=new Rk(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 pm=e=>(t,n)=>{e&&Qe.postRender(()=>e(t,n))};class Ik extends vr{constructor(){super(...arguments),this.removePointerDownListener=Gt}onPointerDown(t){this.session=new Zx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Kx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:pm(t),onStart:pm(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&Qe.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Ri(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 Za={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function hm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const hi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(be.test(e))e=parseFloat(e);else return e;const n=hm(e,t.target.x),r=hm(e,t.target.y);return`${n}% ${r}%`}},Ok={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ur.parse(e);if(o.length>5)return r;const i=ur.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=rt(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 _k extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;HS(Mk),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()})),Za.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()||Qe.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ld.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 Qx(e){const[t,n]=My(),r=E.useContext(zi);return x.jsx(_k,{...e,layoutGroup:r,switchLayoutGroup:E.useContext($y),isPresent:t,safeToRemove:n})}const Mk={borderRadius:{...hi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:hi,borderTopRightRadius:hi,borderBottomLeftRadius:hi,borderBottomRightRadius:hi,boxShadow:Ok};function Jx(e,t,n){const r=Pt(e)?e:Io(e);return r.start(df("",r,t,n)),r.animation}function eb(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Dk=(e,t)=>e.depth-t.depth;class jk{constructor(){this.children=[],this.isDirty=!1}add(t){Xd(this.children,t),this.isDirty=!0}remove(t){el(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Dk),this.isDirty=!1,this.children.forEach(t)}}function Nk(e,t){const n=On.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Hn(r),e(i-t))};return Qe.read(r,!0),()=>Hn(r)}const tb=["TopLeft","TopRight","BottomLeft","BottomRight"],Fk=tb.length,mm=e=>typeof e=="string"?parseFloat(e):e,gm=e=>typeof e=="number"||be.test(e);function Lk(e,t,n,r,o,i){o?(e.opacity=rt(0,n.opacity!==void 0?n.opacity:1,Vk(r)),e.opacityExit=rt(t.opacity!==void 0?t.opacity:1,0,zk(r))):i&&(e.opacity=rt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<Fk;a++){const s=`border${tb[a]}Radius`;let l=vm(t,s),c=vm(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||gm(l)===gm(c)?(e[s]=Math.max(rt(mm(l),mm(c),r),0),(In.test(c)||In.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=rt(t.rotate||0,n.rotate||0,r))}function vm(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Vk=nb(0,.5,px),zk=nb(.5,.95,Gt);function nb(e,t,n){return r=>r<e?0:r>t?1:n($r(e,t,r))}function ym(e,t){e.min=t.min,e.max=t.max}function on(e,t){ym(e.x,t.x),ym(e.y,t.y)}function xm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function bm(e,t,n,r,o){return e-=t,e=ls(e,1/n,r),o!==void 0&&(e=ls(e,1/o,r)),e}function $k(e,t=0,n=1,r=.5,o,i=e,a=e){if(In.test(t)&&(t=parseFloat(t),t=rt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=rt(i.min,i.max,r);e===i&&(s-=t),e.min=bm(e.min,t,n,s,o),e.max=bm(e.max,t,n,s,o)}function wm(e,t,[n,r,o],i,a){$k(e,t[n],t[r],t[o],t.scale,i,a)}const Bk=["x","scaleX","originX"],Hk=["y","scaleY","originY"];function Tm(e,t,n,r){wm(e.x,t,Bk,n?n.x:void 0,r?r.x:void 0),wm(e.y,t,Hk,n?n.y:void 0,r?r.y:void 0)}function Sm(e){return e.translate===0&&e.scale===1}function rb(e){return Sm(e.x)&&Sm(e.y)}function Em(e,t){return e.min===t.min&&e.max===t.max}function Wk(e,t){return Em(e.x,t.x)&&Em(e.y,t.y)}function Cm(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ob(e,t){return Cm(e.x,t.x)&&Cm(e.y,t.y)}function km(e){return $t(e.x)/$t(e.y)}function Rm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class qk{constructor(){this.members=[]}add(t){Xd(this.members,t),t.scheduleRender()}remove(t){if(el(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 Uk(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 Tc=["","X","Y","Z"],Gk={visibility:"hidden"},Pm=1e3;let Yk=0;function Sc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ib(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=nx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Qe,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ib(r)}function ab({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=Yk++,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(Xk),this.nodes.forEach(nR),this.nodes.forEach(rR),this.nodes.forEach(Qk)},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 jk)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Qd),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=eb(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=Nk(p,250),Za.hasAnimatedSinceResize&&(Za.hasAnimatedSinceResize=!1,this.nodes.forEach(Im))})}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()||lR,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),m=!this.targetLayout||!ob(this.targetLayout,h),b=!p&&f;if(this.options.layoutRoot||this.resumeFrom||b||p&&(m||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const S={...Zd(y,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||Im(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,Hn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(oR),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&&ib(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(Am);return}this.isUpdating||this.nodes.forEach(eR),this.isUpdating=!1,this.nodes.forEach(tR),this.nodes.forEach(Kk),this.nodes.forEach(Zk),this.clearAllSnapshots();const s=On.now();Mt.delta=Wn(0,1e3/60,s-Mt.timestamp),Mt.timestamp=s,Mt.isProcessing=!0,mc.update.process(Mt),mc.preRender.process(Mt),mc.render.process(Mt),Mt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ld.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Jk),this.sharedNodes.forEach(iR)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Qe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Qe.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&&!rb(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&(s||Ir(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)),cR(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(uR))){const{scroll:u}=this.root;u&&(vo(l.x,u.offset.x),vo(l.y,u.offset.y))}return l}removeElementScroll(a){var s;const l=pt();if(on(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&&on(l,a),vo(l.x,d.offset.x),vo(l.y,d.offset.y))}return l}applyTransform(a,s=!1){const l=pt();on(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&&yo(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ir(u.latestValues)&&yo(l,u.latestValues)}return Ir(this.latestValues)&&yo(l,this.latestValues),l}removeTransform(a){const s=pt();on(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ir(c.latestValues))continue;Fu(c.latestValues)&&c.updateSnapshot();const u=pt(),d=c.measurePageBox();on(u,d),Tm(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ir(this.latestValues)&&Tm(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(),Ai(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),on(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(),hk(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):on(this.target,this.layout.layoutBox),Gx(this.target,this.targetDelta)):on(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(),Ai(this.relativeTargetOrigin,this.target,f.target),on(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Fu(this.parent.latestValues)||Ux(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;on(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;mk(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():(xm(this.prevProjectionDelta.x,this.projectionDelta.x),xm(this.prevProjectionDelta.y,this.projectionDelta.y)),Pi(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!Rm(this.projectionDelta.x,this.prevProjectionDelta.x)||!Rm(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=go(),this.projectionDelta=go(),this.projectionDeltaWithTransform=go()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=go();(!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,g=this.getStack(),v=!g||g.members.length<=1,m=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(sR));this.animationProgress=0;let b;this.mixTargetDelta=S=>{const T=S/1e3;Om(d.x,a.x,T),Om(d.y,a.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ai(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),aR(this.relativeTarget,this.relativeTargetOrigin,p,T),b&&Wk(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=pt()),on(b,this.relativeTarget)),y&&(this.animationValues=u,Lk(u,c,this.latestValues,T,m,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&&(Hn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Qe.update(()=>{Za.hasAnimatedSinceResize=!0,this.currentAnimation=Jx(0,Pm,{...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(Pm),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&&sb(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}on(s,l),yo(s,u),Pi(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new qk),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&&Sc("z",a,c,this.animationValues);for(let u=0;u<Tc.length;u++)Sc(`rotate${Tc[u]}`,a,c,this.animationValues),Sc(`skew${Tc[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 Gk;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Ya(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=Ya(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Ir(this.latestValues)&&(y.transform=u?u({},""):"none",this.hasProjected=!1),y}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Uk(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 Bi){if(p[y]===void 0)continue;const{correct:g,applyTo:v,isCSSVariable:m}=Bi[y],b=c.transform==="none"?p[y]:g(p[y],d);if(v){const S=v.length;for(let T=0;T<S;T++)c[v[T]]=b}else m?this.options.visualElement.renderState.vars[y]=b:c[y]=b}return this.options.layoutId&&(c.pointerEvents=d===this?Ya(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(Am),this.root.sharedNodes.clear()}}}function Kk(e){e.updateLayout()}function Zk(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}):sb(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=go();Pi(s,r,n.layoutBox);const l=go();a?Pi(l,e.applyTransform(o,!0),n.measuredBox):Pi(l,r,n.layoutBox);const c=!rb(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();Ai(h,n.layoutBox,p.layoutBox);const y=pt();Ai(y,r,f.layoutBox),ob(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 Xk(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 Qk(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Jk(e){e.clearSnapshot()}function Am(e){e.clearMeasurements()}function eR(e){e.isLayoutDirty=!1}function tR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Im(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function nR(e){e.resolveTargetDelta()}function rR(e){e.calcProjection()}function oR(e){e.resetSkewAndRotation()}function iR(e){e.removeLeadSnapshot()}function Om(e,t,n){e.translate=rt(t.translate,0,n),e.scale=rt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _m(e,t,n,r){e.min=rt(t.min,n.min,r),e.max=rt(t.max,n.max,r)}function aR(e,t,n,r){_m(e.x,t.x,n.x,r),_m(e.y,t.y,n.y,r)}function sR(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const lR={duration:.45,ease:[.4,0,.1,1]},Mm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Dm=Mm("applewebkit/")&&!Mm("chrome/")?Math.round:Gt;function jm(e){e.min=Dm(e.min),e.max=Dm(e.max)}function cR(e){jm(e.x),jm(e.y)}function sb(e,t,n){return e==="position"||e==="preserve-aspect"&&!pk(km(t),km(n),.2)}function uR(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const dR=ab({attachResizeListener:(e,t)=>Ui(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ec={current:void 0},lb=ab({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ec.current){const e=new dR({});e.mount(window),e.setOptions({layoutScroll:!0}),Ec.current=e}return Ec.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),fR={pan:{Feature:Ik},drag:{Feature:Ak,ProjectionNode:lb,MeasureLayout:Qx}};function cb(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 ub(e,t){const n=cb(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Nm(e){return!(e.pointerType==="touch"||Bx())}function pR(e,t,n={}){const[r,o,i]=ub(e,n),a=s=>{if(!Nm(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{Nm(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function Fm(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&&Qe.postRender(()=>i(t,pa(t)))}class hR extends vr{mount(){const{current:t}=this.node;t&&(this.unmount=pR(t,(n,r)=>(Fm(this.node,r,"Start"),o=>Fm(this.node,o,"End"))))}unmount(){}}class mR extends vr{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=fa(Ui(this.node.current,"focus",()=>this.onFocus()),Ui(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const db=(e,t)=>t?e===t?!0:db(e,t.parentElement):!1,gR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function vR(e){return gR.has(e.tagName)||e.tabIndex!==-1}const xi=new WeakSet;function Lm(e){return t=>{t.key==="Enter"&&e(t)}}function Cc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const yR=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Lm(()=>{if(xi.has(n))return;Cc(n,"down");const o=Lm(()=>{Cc(n,"up")}),i=()=>Cc(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 Vm(e){return pf(e)&&!Bx()}function xR(e,t,n={}){const[r,o,i]=ub(e,n),a=s=>{const l=s.currentTarget;if(!Vm(s)||xi.has(l))return;xi.add(l);const c=t(l,s),u=(f,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!Vm(f)||!xi.has(l))&&(xi.delete(l),typeof c=="function"&&c(f,{success:h}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||db(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=>yR(c,o)),!vR(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function zm(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&&Qe.postRender(()=>i(t,pa(t)))}class bR extends vr{mount(){const{current:t}=this.node;t&&(this.unmount=xR(t,(n,r)=>(zm(this.node,r,"Start"),(o,{success:i})=>zm(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const zu=new WeakMap,kc=new WeakMap,wR=e=>{const t=zu.get(e.target);t&&t(e)},TR=e=>{e.forEach(wR)};function SR({root:e,...t}){const n=e||document;kc.has(n)||kc.set(n,{});const r=kc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(TR,{root:e,...t})),r[o]}function ER(e,t,n){const r=SR(t);return zu.set(e,n),r.observe(e),()=>{zu.delete(e),r.unobserve(e)}}const CR={some:0,all:1};class kR extends vr{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:CR[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 ER(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(RR(t,n))&&this.startObserver()}unmount(){}}function RR({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const PR={inView:{Feature:kR},tap:{Feature:bR},focus:{Feature:mR},hover:{Feature:hR}},AR={layout:{ProjectionNode:lb,MeasureLayout:Qx}},$u={current:null},fb={current:!1};function IR(){if(fb.current=!0,!!jd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>$u.current=e.matches;e.addListener(t),t()}else $u.current=!1}const OR=[...Px,Nt,ur],_R=e=>OR.find(Rx(e)),Gi=new WeakMap;function MR(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"&&Zs(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,Io(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,Io(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const $m=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class pb{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=af,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=On.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Qe.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=Js(n),this.isVariantNode=Vy(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,Gi.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)),fb.current||IR(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:$u.current,process.env.NODE_ENV!=="production"&&Zs(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(),Hn(this.notifyUpdate),Hn(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=Kr.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Qe.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 Ao){const n=Ao[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<$m.length;r++){const o=$m[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=MR(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=Io(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"&&(Cx(o)||mx(o))?o=parseFloat(o):!_R(o)&&ur.test(n)&&(o=Tx(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=Yd(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 Qd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class hb extends pb{constructor(){super(...arguments),this.KeyframeResolver=Ax}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 DR(e){return window.getComputedStyle(e)}class mb extends hb{constructor(){super(...arguments),this.type="html",this.renderInstance=Zy}readValueFromInstance(t,n){if(Kr.has(n))return YE(t,n);{const r=DR(t),o=(zd(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Yx(t,n)}build(t,n,r){Hd(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Kd(t,n,r)}}class gb extends hb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=pt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Ky(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Kr.has(n)){const r=wx(n);return r&&r.default||0}return n=Xy.has(n)?n:Vd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Jy(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Qe.postRender(this.updateDimensions)}build(t,n,r){Ud(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Qy(t,n,r,o)}mount(t){this.isSVGTag=Gd(t.tagName),super.mount(t)}}const jR=(e,t)=>qd(e)?new gb(t):new mb(t,{allowProjection:e!==E.Fragment}),NR=pE({...ok,...PR,...fR,...AR},jR),vt=AS(NR);function FR(e){return E.useEffect(()=>()=>e(),[])}function _o(e){const t=xn(()=>Io(e)),{isStatic:n}=E.useContext(Po);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function vb(e,t){const n=_o(t()),r=()=>n.set(t());return r(),Ys(()=>{const o=()=>Qe.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Hn(r)}}),n}const LR=e=>e&&typeof e=="object"&&e.mix,VR=e=>LR(e)?e.mix:void 0;function zR(...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=Nx(o,i,{mixer:VR(i[0]),...a});return t?s(r):s}function $R(e){Ei.current=[],e();const t=vb(Ei.current,e);return Ei.current=void 0,t}function BR(e,t,n,r){if(typeof e=="function")return $R(e);const o=typeof t=="function"?t:zR(t,n,r);return Array.isArray(e)?Bm(e,o):Bm([e],([i])=>o(i))}function Bm(e,t){const n=xn(()=>[]);return vb(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function HR(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(sf(r),is);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:_n(o)}}const WR=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function yb(e,t){return jx(e)?e[WR(0,e.length,t)]:e}function hf(e){return typeof e=="object"&&!Array.isArray(e)}function xb(e,t,n,r){return typeof e=="string"&&hf(t)?cb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function qR(e,t,n){return e*(t+1)}function Hm(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 UR(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(el(e,o),r--)}}function GR(e,t,n,r,o,i){UR(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:rt(o,i,r[a]),easing:yb(n,a)})}function YR(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function KR(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const ZR="easeInOut",XR=20;function QR(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,Hm(d,h.at,u,c));continue}let[y,g,v={}]=h;v.at!==void 0&&(d=Hm(d,v.at,u,c));let m=0;const b=(S,T,w,C=0,k=0)=>{const I=JR(S),{delay:P=0,times:j=Lx(I),type:D="keyframes",repeat:F,repeatType:R,repeatDelay:O=0,...N}=T;let{ease:L=t.ease||"easeOut",duration:M}=T;const q=typeof P=="function"?P(C,k):P,_=I.length,z=tl(D)?D:o==null?void 0:o[D];if(_<=2&&z){let Y=100;if(_===2&&nP(I)){const V=I[1]-I[0];Y=Math.abs(V)}const U={...N};M!==void 0&&(U.duration=vn(M));const Z=HR(U,Y,z);L=Z.ease,M=Z.duration}M??(M=i);const Q=d+q;j.length===1&&j[0]===0&&(j[1]=1);const ie=j.length-I.length;if(ie>0&&Fx(j,ie),I.length===1&&I.unshift(null),F){un(F<XR,"Repeat count too high, must be less than 20"),M=qR(M,F);const Y=[...I],U=[...j];L=Array.isArray(L)?[...L]:[L];const Z=[...L];for(let V=0;V<F;V++){I.push(...Y);for(let H=0;H<Y.length;H++)j.push(U[H]+(V+1)),L.push(H===0?"linear":yb(Z,H-1))}YR(j,F)}const J=Q+M;GR(w,I,L,j,Q,J),m=Math.max(q+M,m),p=Math.max(J,p)};if(Pt(y)){const S=Wm(y,s);b(g,v,qm("default",S))}else{const S=xb(y,g,r,l),T=S.length;for(let w=0;w<T;w++){g=g,v=v;const C=S[w],k=Wm(C,s);for(const I in g)b(g[I],eP(v,I),qm(I,k),w,T)}}u=d,d+=m}return s.forEach((f,h)=>{for(const y in f){const g=f[y];g.sort(KR);const v=[],m=[],b=[];for(let T=0;T<g.length;T++){const{at:w,value:C,easing:k}=g[T];v.push(C),m.push($r(0,p,w)),b.push(k||"easeOut")}m[0]!==0&&(m.unshift(0),v.unshift(v[0]),b.unshift(ZR)),m[m.length-1]!==1&&(m.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:m,...n}}}),a}function Wm(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function qm(e,t){return t[e]||(t[e]=[]),t[e]}function JR(e){return Array.isArray(e)?e:[e]}function eP(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const tP=e=>typeof e=="number",nP=e=>e.every(tP);function rP(e,t){return e in t}class oP extends pb{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(rP(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 iP(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=eb(e)?new gb(t):new mb(t);n.mount(e),Gi.set(e,n)}function aP(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new oP(t);n.mount(e),Gi.set(e,n)}function sP(e,t){return Pt(e)||typeof e=="number"||typeof e=="string"&&!hf(t)}function bb(e,t,n,r){const o=[];if(sP(e,t))o.push(Jx(e,hf(t)&&t.default||t,n&&(n.default||n)));else{const i=xb(e,t,r),a=i.length;un(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?iP:aP;Gi.has(l)||c(l);const u=Gi.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...ff(u,{...t,transition:d},{}))}}return o}function lP(e,t,n){const r=[];return QR(e,t,n,{spring:cf}).forEach(({keyframes:i,transition:a},s)=>{r.push(...bb(s,i,a))}),r}function cP(e){return Array.isArray(e)&&e.some(Array.isArray)}function uP(e){function t(n,r,o){let i=[];cP(n)?i=lP(n,r,e):i=bb(n,r,o,e);const a=new rx(i);return e&&e.animations.push(a),a}return t}function dP(){const e=xn(()=>({current:null,animations:[]})),t=xn(()=>uP(e));return FR(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class fP{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const pP=()=>new fP;function hP(){return xn(pP)}function mP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function gP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:mP(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=ju(r)(l/c)*c}return t+l}}const wb=E.createContext(null);function vP(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,a=e[o+i];if(!a)return e;const s=e[o],l=a.layout,c=rt(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?hE(e,o,o+i):e}function yP({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=xn(()=>vt[t]),l=[],c=E.useRef(!1);un(!!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(bP)},updateOrder:(d,p,f)=>{if(c.current)return;const h=vP(l,d,p,f);l!==h&&(c.current=!0,r(h.map(xP).filter(y=>o.indexOf(y)!==-1)))}};return E.useEffect(()=>{c.current=!1}),x.jsx(s,{...i,ref:a,ignoreStrict:!0,children:x.jsx(wb.Provider,{value:u,children:e})})}const Tb=E.forwardRef(yP);function xP(e){return e.value}function bP(e,t){return e.layout.min-t.layout.min}function Um(e,t=0){return Pt(e)?e:_o(t)}function wP({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=xn(()=>vt[r]),c=E.useContext(wb),u={x:Um(t.x),y:Um(t.y)},d=BR([u.x,u.y],([y,g])=>y||g?1:"unset");un(!!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,g)=>{const{velocity:v}=g;v[p]&&h(n,u[p].get(),v[p]),o&&o(y,g)},onLayoutMeasure:y=>f(n,y),ref:s,ignoreStrict:!0,children:e})}const Sb=E.forwardRef(wP);/**
|
|
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 TP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),SP=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Gm=e=>{const t=SP(e);return t.charAt(0).toUpperCase()+t.slice(1)},Eb=(...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 EP={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 CP=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,...EP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Eb("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(CP,{ref:i,iconNode:t,className:Eb(`lucide-${TP(Gm(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Gm(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 kP=[["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"}]],RP=Et("arrow-down-0-1",kP);/**
|
|
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 PP=[["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"}]],AP=Et("arrow-up-0-1",PP);/**
|
|
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 IP=[["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"}]],Cb=Et("arrow-up-down",IP);/**
|
|
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 OP=[["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"}]],_P=Et("calendar",OP);/**
|
|
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 MP=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],mf=Et("chevron-down",MP);/**
|
|
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 DP=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],jP=Et("chevron-left",DP);/**
|
|
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 NP=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],gf=Et("chevron-right",NP);/**
|
|
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 FP=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],kb=Et("circle-check-big",FP);/**
|
|
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 LP=[["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"}]],VP=Et("circle-x",LP);/**
|
|
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 zP=[["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"}]],Rb=Et("file",zP);/**
|
|
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 $P=[["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"}]],BP=Et("grip-vertical",$P);/**
|
|
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 HP=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Pb=Et("info",HP);/**
|
|
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 WP=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]],qP=Et("list-filter",WP);/**
|
|
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 UP=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],vf=Et("plus",UP);/**
|
|
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 GP=[["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"}]],YP=Et("search-check",GP);/**
|
|
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 KP=[["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"}]],ZP=Et("search-x",KP);/**
|
|
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 XP=[["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"}]],Mo=Et("trash-2",XP);/**
|
|
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 QP=[["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"}]],JP=Et("triangle-alert",QP);/**
|
|
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 eA=[["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"}]],tA=Et("ungroup",eA);/**
|
|
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 nA=[["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"}]],rA=Et("upload",nA);/**
|
|
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 oA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],yf=Et("x",oA),Ym={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},iA={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Ab=e=>x.jsx(vt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:Ym,exit:Ym.false,transition:iA,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Be("aria-hidden:pointer-events-none",e.className),children:e.children}),aA=Qo("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"}}),sA=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:Be("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:x.jsx(Ab,{"data-open":!!i,open:!!i,children:x.jsxs(Jo,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Be(aA({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(kb,{size:20}):null,!r&&n==="info"?x.jsx(Pb,{size:20}):null,!r&&n==="danger"?x.jsx(JP,{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(yf,{size:20})}):null]})})})}),Ib=6048e5,lA=864e5,cA=6e4,uA=36e5,dA=1e3,Km=Symbol.for("constructDateFrom");function ft(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Km in e?e[Km](t):e instanceof Date?new e.constructor(t):new Date(t)}function tt(e,t){return ft(t||e,e)}function ri(e,t,n){const r=tt(e,n==null?void 0:n.in);return isNaN(t)?ft((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function rl(e,t,n){const r=tt(e,n==null?void 0:n.in);if(isNaN(t))return ft(e,NaN);if(!t)return r;const o=r.getDate(),i=ft(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)}let fA={};function Zr(){return fA}function Dn(e,t){var s,l,c,u;const n=Zr(),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=tt(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 Do(e,t){return Dn(e,{...t,weekStartsOn:1})}function Ob(e,t){const n=tt(e,t==null?void 0:t.in),r=n.getFullYear(),o=ft(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Do(o),a=ft(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Do(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function cs(e){const t=tt(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 ol(e,...t){const n=ft.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function jo(e,t){const n=tt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function pA(e,t,n){const[r,o]=ol(n==null?void 0:n.in,e,t),i=jo(r),a=jo(o),s=+i-cs(i),l=+a-cs(a);return Math.round((s-l)/lA)}function hA(e,t){const n=Ob(e,t),r=ft(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Do(r)}function _b(e,t,n){return ri(e,t*7,n)}function Mb(e,t,n){return rl(e,t*12,n)}function mA(e){return ft(e,Date.now())}function gA(e,t,n){const[r,o]=ol(n==null?void 0:n.in,e,t);return+jo(r)==+jo(o)}function vA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Db(e){return!(!vA(e)&&typeof e!="number"||isNaN(+tt(e)))}function yA(e,t){const[n,r]=ol(e,t.start,t.end);return{start:n,end:r}}function jb(e,t){const{start:n,end:r}=yA(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(ft(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function Nb(e,t){const n=tt(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function xA(e,t){const n=tt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function bA(e,t){var s,l;const n=Zr(),r=n.weekStartsOn??((l=(s=n.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=tt(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 wA={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"}},TA=(e,t,n)=>{let r;const o=wA[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 Rc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const SA={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},EA={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},CA={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},kA={date:Rc({formats:SA,defaultWidth:"full"}),time:Rc({formats:EA,defaultWidth:"full"}),dateTime:Rc({formats:CA,defaultWidth:"full"})},RA={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},PA=(e,t,n,r)=>RA[e];function mi(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 AA={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},IA={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},OA={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"]},_A={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"]},MA={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"}},DA={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"}},jA=(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"},NA={ordinalNumber:jA,era:mi({values:AA,defaultWidth:"wide"}),quarter:mi({values:IA,defaultWidth:"wide",argumentCallback:e=>e-1}),month:mi({values:OA,defaultWidth:"wide"}),day:mi({values:_A,defaultWidth:"wide"}),dayPeriod:mi({values:MA,defaultWidth:"wide",formattingValues:DA,defaultFormattingWidth:"wide"})};function gi(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)?LA(s,d=>d.test(a)):FA(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 FA(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function LA(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function VA(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 zA=/^(\d+)(th|st|nd|rd)?/i,$A=/\d+/i,BA={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},HA={any:[/^b/i,/^(a|c)/i]},WA={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},qA={any:[/1/i,/2/i,/3/i,/4/i]},UA={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},GA={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]},YA={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},KA={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]},ZA={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},XA={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}},QA={ordinalNumber:VA({matchPattern:zA,parsePattern:$A,valueCallback:e=>parseInt(e,10)}),era:gi({matchPatterns:BA,defaultMatchWidth:"wide",parsePatterns:HA,defaultParseWidth:"any"}),quarter:gi({matchPatterns:WA,defaultMatchWidth:"wide",parsePatterns:qA,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gi({matchPatterns:UA,defaultMatchWidth:"wide",parsePatterns:GA,defaultParseWidth:"any"}),day:gi({matchPatterns:YA,defaultMatchWidth:"wide",parsePatterns:KA,defaultParseWidth:"any"}),dayPeriod:gi({matchPatterns:ZA,defaultMatchWidth:"any",parsePatterns:XA,defaultParseWidth:"any"})},Fb={code:"en-US",formatDistance:TA,formatLong:kA,formatRelative:PA,localize:NA,match:QA,options:{weekStartsOn:0,firstWeekContainsDate:1}};function JA(e,t){const n=tt(e,t==null?void 0:t.in);return pA(n,xA(n))+1}function Lb(e,t){const n=tt(e,t==null?void 0:t.in),r=+Do(n)-+hA(n);return Math.round(r/Ib)+1}function xf(e,t){var u,d,p,f;const n=tt(e,t==null?void 0:t.in),r=n.getFullYear(),o=Zr(),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=ft((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Dn(a,t),l=ft((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Dn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function eI(e,t){var s,l,c,u;const n=Zr(),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=xf(e,t),i=ft((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Dn(i,t)}function Vb(e,t){const n=tt(e,t==null?void 0:t.in),r=+Dn(n,t)-+eI(n,t);return Math.round(r/Ib)+1}function Ye(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const nr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return 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)}},so={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Zm={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return nr.y(e,t)},Y:function(e,t,n,r){const o=xf(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=Ob(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 nr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return 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"}):nr.d(e,t)},D:function(e,t,n){const r=JA(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=so.noon:r===0?o=so.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=so.evening:r>=12?o=so.afternoon:r>=4?o=so.morning:o=so.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return nr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):nr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):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"}):nr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):nr.s(e,t)},S:function(e,t){return nr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Qm(r);case"XXXX":case"XX":return Or(r);case"XXXXX":case"XXX":default:return Or(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Qm(r);case"xxxx":case"xx":return Or(r);case"xxxxx":case"xxx":default:return Or(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Xm(r,":");case"OOOO":default:return"GMT"+Or(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Xm(r,":");case"zzzz":default:return"GMT"+Or(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 Xm(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 Qm(e,t){return e%60===0?(e>0?"-":"+")+Ye(Math.abs(e)/60,2):Or(e,t)}function Or(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 Jm=(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"})}},tI=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Jm(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}}",Jm(r,t)).replace("{{time}}",zb(o,t))},Bu={p:zb,P:tI},nI=/^D+$/,rI=/^Y+$/,oI=["D","DD","YY","YYYY"];function $b(e){return nI.test(e)}function Bb(e){return rI.test(e)}function Hu(e,t,n){const r=iI(e,t,n);if(console.warn(r),oI.includes(e))throw new RangeError(r)}function iI(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 aI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,sI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lI=/^'([^]*?)'?$/,cI=/''/g,uI=/[a-zA-Z]/;function dI(e,t,n){var u,d,p,f;const r=Zr(),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=tt(e,n==null?void 0:n.in);if(!Db(s))throw new RangeError("Invalid time value");let l=t.match(sI).map(h=>{const y=h[0];if(y==="p"||y==="P"){const g=Bu[y];return g(h,o.formatLong)}return h}).join("").match(aI).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const y=h[0];if(y==="'")return{isToken:!1,value:fI(h)};if(Zm[y])return{isToken:!0,value:h};if(y.match(uI))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))&&Hu(y,t,String(e));const g=Zm[y[0]];return g(s,y,o.localize,c)}).join("")}function fI(e){const t=e.match(lI);return t?t[1].replace(cI,"'"):e}function pI(){return Object.assign({},Zr())}function hI(e,t){const n=tt(e,t==null?void 0:t.in).getDay();return n===0?7:n}function mI(e,t){return+tt(e)>+tt(t)}function gI(e,t){return+tt(e)<+tt(t)}function vI(e,t){const n=yI(t)?new t(0):ft(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function yI(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const xI=10;class Hb{constructor(){de(this,"subPriority",0)}validate(t,n){return!0}}class bI 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 wI extends Hb{constructor(n,r){super();de(this,"priority",xI);de(this,"subPriority",-1);this.context=n||(o=>ft(r,o))}set(n,r){return r.timestampIsSet?n:ft(n,vI(n,this.context))}}class He{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new bI(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class TI 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}/},Cn={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 dt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function kn(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*uA+i*cA+a*dA),rest:t.slice(n[0].length)}}function Wb(e){return dt(wt.anyDigitsSigned,e)}function yt(e,t){switch(e){case 1:return dt(wt.singleDigit,t);case 2:return dt(wt.twoDigits,t);case 3:return dt(wt.threeDigits,t);case 4:return dt(wt.fourDigits,t);default:return dt(new RegExp("^\\d{1,"+e+"}"),t)}}function us(e,t){switch(e){case 1:return dt(wt.singleDigitSigned,t);case 2:return dt(wt.twoDigitsSigned,t);case 3:return dt(wt.threeDigitsSigned,t);case 4:return dt(wt.fourDigitsSigned,t);default:return dt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function bf(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 SI 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 EI 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=xf(n,i);if(o.isTwoDigitYear){const l=qb(o.year,a);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),Dn(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),Dn(n,i)}}class CI 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 us(r==="R"?4:r.length,n)}set(n,r,o){const i=ft(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),Do(i)}}class kI 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 us(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class 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:"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 PI 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 AI 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(dt(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 II 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(dt(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 OI(e,t,n){const r=tt(e,n==null?void 0:n.in),o=Vb(r,n)-t;return r.setDate(r.getDate()-o*7),tt(r,n==null?void 0:n.in)}class _I 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 dt(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 Dn(OI(n,o,i),i)}}function MI(e,t,n){const r=tt(e,n==null?void 0:n.in),o=Lb(r,n)-t;return r.setDate(r.getDate()-o*7),r}class DI 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 dt(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 Do(MI(n,o))}}const jI=[31,28,31,30,31,30,31,31,30,31,30,31],NI=[31,29,31,30,31,30,31,31,30,31,30,31];class FI 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 dt(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<=NI[a]:r>=1&&r<=jI[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class LI 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 dt(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 wf(e,t,n){var d,p,f,h;const r=Zr(),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=tt(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 ri(i,u,n)}class VI 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=wf(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","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=wf(n,o,i),n.setHours(0,0,0,0),n}}class $I 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=wf(n,o,i),n.setHours(0,0,0,0),n}}function BI(e,t,n){const r=tt(e,n==null?void 0:n.in),o=hI(r,n),i=t-o;return ri(r,i,n)}class HI 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=BI(n,o),n.setHours(0,0,0,0),n}}class WI 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(bf(o),0,0,0),n}}class qI 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(bf(o),0,0,0),n}}class UI 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(bf(o),0,0,0),n}}class GI 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 dt(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 YI 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 dt(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 KI 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 dt(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 ZI 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 dt(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 XI extends He{constructor(){super(...arguments);de(this,"priority",60);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return dt(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 QI extends He{constructor(){super(...arguments);de(this,"priority",50);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return dt(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 JI 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 eO extends He{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return kn(Cn.basicOptionalMinutes,n);case"XX":return kn(Cn.basic,n);case"XXXX":return kn(Cn.basicOptionalSeconds,n);case"XXXXX":return kn(Cn.extendedOptionalSeconds,n);case"XXX":default:return kn(Cn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:ft(n,n.getTime()-cs(n)-o)}}class tO extends He{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return kn(Cn.basicOptionalMinutes,n);case"xx":return kn(Cn.basic,n);case"xxxx":return kn(Cn.basicOptionalSeconds,n);case"xxxxx":return kn(Cn.extendedOptionalSeconds,n);case"xxx":default:return kn(Cn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:ft(n,n.getTime()-cs(n)-o)}}class nO extends He{constructor(){super(...arguments);de(this,"priority",40);de(this,"incompatibleTokens","*")}parse(n){return Wb(n)}set(n,r,o){return[ft(n,o*1e3),{timestampIsSet:!0}]}}class rO extends He{constructor(){super(...arguments);de(this,"priority",20);de(this,"incompatibleTokens","*")}parse(n){return Wb(n)}set(n,r,o){return[ft(n,o),{timestampIsSet:!0}]}}const oO={G:new TI,y:new SI,Y:new EI,R:new CI,u:new kI,Q:new RI,q:new PI,M:new AI,L:new II,w:new _I,I:new DI,d:new FI,D:new LI,E:new VI,e:new zI,c:new $I,i:new HI,a:new WI,b:new qI,B:new UI,h:new GI,H:new YI,K:new KI,k:new ZI,m:new XI,s:new QI,S:new JI,X:new eO,x:new tO,t:new nO,T:new rO},iO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,aO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,sO=/^'([^]*?)'?$/,lO=/''/g,cO=/\S/,uO=/[a-zA-Z]/;function dO(e,t,n,r){var g,v,m,b;const o=()=>ft(n,NaN),i=pI(),a=i.locale??Fb,s=i.firstWeekContainsDate??((v=(g=i.locale)==null?void 0:g.options)==null?void 0:v.firstWeekContainsDate)??1,l=i.weekStartsOn??((b=(m=i.locale)==null?void 0:m.options)==null?void 0:b.weekStartsOn)??0;if(!t)return e?o():tt(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new wI(r==null?void 0:r.in,n)],d=t.match(aO).map(S=>{const T=S[0];if(T in Bu){const w=Bu[T];return w(S,a.formatLong)}return S}).join("").match(iO),p=[];for(let S of d){Bb(S)&&Hu(S,t,e),$b(S)&&Hu(S,t,e);const T=S[0],w=oO[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 k=w.run(e,S,a.match,c);if(!k)return o();u.push(k.setter),e=k.rest}else{if(T.match(uO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(S==="''"?S="'":T==="'"&&(S=fO(S)),e.indexOf(S)===0)e=e.slice(S.length);else return o()}}if(e.length>0&&cO.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=tt(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 fO(e){return e.match(sO)[1].replace(lO,"'")}function pO(e,t,n){const[r,o]=ol(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function hO(e,t){return gA(ft(e,e),mA(e))}function mO(e,t,n){return ri(e,-1,n)}function Gb(e,t,n){return rl(e,-1,n)}function gO(e,t,n){return _b(e,-1,n)}function vO(e,t,n){return Mb(e,-1,n)}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 Tf(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 Wu(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 Yi=function(e){return e.replace(new RegExp(" ","g")," ")},Yb=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)},yO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Kb=function(e,t,n){var r=e.length-2,o=yO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Zb=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ds=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},xO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Pc=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},bO=function(e){return e==="money"||e==="currency"},wO=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:""})},_a=function(e,t){var n=Yb(Zb(e),t.fraction.length),r="".concat(t.currency).concat(Kb(n,t.group,t.decimal));return Yi(r)},TO=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=Tf(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var h=wO(r,i,s);return h.currency=Yi("".concat(h.currency.trim()," ")),h.literal=Yi(h.literal.trim()),h},[r,i]),p=function(h){var y=_a(h.target.value,d),g=ds(y);h.target.value=y,h.target.setAttribute("data-number",g.toString()),l==null||l(h),g!==0&&(u.current.selectionEnd=y.length)};E.useEffect(function(){if(u.current!==null){var h=u.current.value;if(h!==""){var y=_a(h,d),g=ds(y);u.current.value=y,u.current.setAttribute("data-number",g.toString());var v=new InputEvent("change",{});l==null||l(St(St({},v),{target:u.current,currentTarget:u.current})),g!==0&&(u.current.selectionEnd=y.length)}}},[d]);var f=c.defaultValue?_a(c.defaultValue,d):void 0;return E.createElement("input",St({},c,{value:typeof c.value=="string"?_a(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),SO=1,EO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},CO=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:""})},Ma=function(e,t){var n=Yb(Zb(e),t.fraction.length),r="".concat(Kb(n,t.group,t.decimal)," ").concat(t.percentSign);return Yi(r)},kO=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=Tf(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),l=Wu(E.useState(function(){var v,m;return(m=(v=a.value)===null||v===void 0?void 0:v.toString())!==null&&m!==void 0?m:""}),2),c=l[0],u=l[1];E.useImperativeHandle(t,function(){return s.current}),E.useEffect(function(){var v,m=Number.parseFloat("".concat((v=a.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(Ma(m,d))},[a.value]);var d=E.useMemo(function(){var v=CO(r);return v.percentSign=Yi("".concat(v.percentSign)),v},[r]),p=c.length-d.percentSign.length-SO,f=function(v){var m,b=s.current;b&&(b.setSelectionRange(p,p),v&&((m=a.onFocus)===null||m===void 0||m.call(a,v)))},h=function(v){var m=v.currentTarget;if(m.selectionStart!==null){var b=m.selectionStart,S=m.selectionEnd,T=b!==S,w=p<b;!T&&w&&f()}i==null||i(v)},y=function(v){var m=Ma(v.target.value,d),b=ds(m);u(m),v.target.value=m,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 m=Ma(v,d),b=ds(m);u(m),s.current.value=m,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 g=a.defaultValue?Ma(a.defaultValue,d):void 0;return E.createElement("input",St({},a,{defaultValue:g,inputMode:"decimal",onChange:y,onFocus:f,onKeyUp:h,ref:s,type:"text"}))}),bi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},RO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=fs[i];a===void 0?r.push(i.replace(bi.dots,"\\.").replace(bi.openParenthesis,"\\(").replace(bi.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(bi.leadingBars,"\\")},Ii=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return qu(o,n);var i=RO(o);return n?"^".concat(i,"$"):i},PO=function(e){return e.replace(bi.escape,"\\$&")},qu=function(e,t){var n=e.map(function(r){return typeof r=="string"?PO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},fs={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]/}},AO=/\d/,eg="(dd) 9dddd-dddd",tg="(dd) dddd-dddd",ng="ddd.ddd.ddd-dd",rg="dd.ddd.ddd/dddd-dd",Xa=function(e){return e.replace(/\D/g,"")},IO=["2",/[0-3]/,":",/[0-5]/,/\d/],OO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],qt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:ng,isoDate:"dddd-dd-dd",cnpj:rg,telephone:tg,cellphone:eg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Xa(e).length<=11?ng:rg},int:function(e){return e===void 0&&(e=""),AO.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=Xa(e);return t.length<11?tg:eg},time:function(e){var t=Xa(e),n=t[0];return n==="2"?IO:OO}},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:Ii(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:Xa}),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 og(e,t,n,r){var o,i;r===void 0&&(r=fs);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 ig=function(e){return e},_O=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Ii(e,n,t));return r.test(n)};function MO(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var DO=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=Tf(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),h=E.useRef(null);E.useImperativeHandle(t,function(){return h.current});var y=Pc(s),g=Pc(d),v=Pc(u),m=E.useRef(_O(u,i,f.value||f.defaultValue)),b=p??"input",S=Wu(E.useState(""),2),T=S[0],w=S[1],C=MO(T),k=E.useCallback(function(O,N){var L,M,q=(L=O??N)!==null&&L!==void 0?L:"";if(u===void 0)return q;var _=(M=q==null?void 0:q.toString())!==null&&M!==void 0?M:"";return og(_,typeof u=="function"?u(_):u,a??ig,c??fs)},[a,u,c]),I=Wu(E.useState(function(){return k(f.value,f.defaultValue)}),2),P=I[0],j=I[1],D=k(f.defaultValue,f.defaultValue),F=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var O=u(P);return Array.isArray(O)?qu(O,i):Ii(u,P,i)}return typeof u=="string"?Ii(u,P,i):qu(u,i)},[l,P,i,u]);E.useEffect(function(){if(f.value!==void 0){var O=k(f.value,f.defaultValue);j(O),h.current!==null&&(h.current.value=O)}},[f.value,u,a,f.defaultValue]);var R=function(O){var N,L,M,q,_,z=O.currentTarget,Q=O.target.value;if(v.current===void 0)return j(Q),(N=g.current)===null||N===void 0||N.call(g,Q),(L=y.current)===null||L===void 0||L.call(y,O),d==null?void 0:d(Q);var ie=new RegExp(Ii(v.current,Q,i)),J=(M=z.selectionEnd)!==null&&M!==void 0?M:0,Y=function(X,re,$){if(X.type!=="number")return X.setSelectionRange(re,$)};if(r&&m.current&&Q.length>=P.length)return z.value=P,Y(z,J-1,J-1);var U=!1;Q.length<C.length&&(m.current=!1,U=!0),ie.test(Q)&&(m.current=!0);var Z=J,V=Q[Z-1],H=og(Q,typeof v.current=="function"?v.current(Q):v.current,a??ig,c??fs);for(z.value=H,j(H);Z<H.length&&H.charAt(Z-1)!==V;)Z+=1;U?Y(z,J,J):Y(z,Z,Z),O.target.value=H,w(H),(q=g.current)===null||q===void 0||q.call(g,H),(_=y.current)===null||_===void 0||_.call(y,O)};return E.createElement(b,St({},f,{ref:h,pattern:F,onChange:R,defaultValue:ag(f.defaultValue)?D:void 0,value:ag(f.value)?k(f.value,f.value):f.value}))}),ag=function(e){return typeof e=="string"},Xb=E.forwardRef(function(e,t){return bO(e.mask)?E.createElement(TO,St({},e,{mask:void 0,ref:t})):EO(e.mask)?E.createElement(kO,St({},e,{mask:void 0,ref:t})):E.createElement(DO,St({},e,{ref:t}))}),Kt=function(e){return function(t){return E.createElement(Xb,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 Qb=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&xO(zt,t.mask)?zt[t.mask]:{mask:t.mask}},[t.mask]),o=St(St({},t),r);return E.createElement(Xb,St({},o,{ref:n}))}),Da={exports:{}},Ac={},ja={exports:{}},Ic={};/**
|
|
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 sg;function jO(){if(sg)return Ic;sg=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,g=h[1];return i(function(){y.value=f,y.getSnapshot=p,l(y)&&g({inst:y})},[d,f,p]),o(function(){return l(y)&&g({inst:y}),d(function(){l(y)&&g({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 Ic.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Ic}var Oc={};/**
|
|
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 lg;function NO(){return lg||(lg=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 g=h();i(y,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}g=a({inst:{value:y,getSnapshot:h}});var v=g[0].inst,m=g[1];return l(function(){v.value=y,v.getSnapshot=h,n(v)&&m({inst:v})},[f,y,h]),s(function(){return n(v)&&m({inst:v}),f(function(){n(v)&&m({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;Oc.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())}()),Oc}var cg;function Jb(){return cg||(cg=1,process.env.NODE_ENV==="production"?ja.exports=jO():ja.exports=NO()),ja.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 ug;function FO(){if(ug)return Ac;ug=1;var e=E,t=Jb();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 Ac.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(!m){if(m=!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 k=p(w);return f!==void 0&&f(C,k)?(b=w,C):(b=w,S=k)}var m=!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 g=o(c,h[0],h[1]);return a(function(){y.hasValue=!0,y.value=g},[g]),l(g),g},Ac}var _c={};/**
|
|
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 dg;function LO(){return dg||(dg=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=Jb(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;_c.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(!m){if(m=!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 k=p(w);return f!==void 0&&f(C,k)?(b=w,C):(b=w,S=k)}var m=!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 g=o(c,h[0],h[1]);return a(function(){y.hasValue=!0,y.value=g},[g]),l(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),_c}var fg;function VO(){return fg||(fg=1,process.env.NODE_ENV==="production"?Da.exports=FO():Da.exports=LO()),Da.exports}VO();var No=function(){return No=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},No.apply(this,arguments)};function Oi(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 e0(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 lo=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},zO=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},$O=function(e){return Object.entries(e)},t0=function(e){return e instanceof Promise},n0=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)},No(No({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},BO=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,e0([],Oi(a),!1)),u=function(d,p){return n(function(f){return n0(d,f,i,p)})};return t0(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))}},HO=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,e0([],Oi(a),!1)),c=function(u){return n(function(d){return n0(u,d,i,o.current)})};return t0(l)?l.then(function(u){return c(u)}):c(l)}},Sf=function(e,t,n){var r,o,i,a=Oi(E.useState(function(){return e}),2),s=a[0],l=a[1],c=lo(s),u=lo((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=lo(t),p=lo((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=lo((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),h=E.useRef(e),y=zO(s),g=lo(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 m=Oi(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 g.current}});return $O(T).reduce(function(w,C){var k,I=Oi(C,2),P=I[0],j=I[1];return No(No({},w),(k={},k[P]=n!=null&&n.debug?BO(P,j,l,S,v,f.current):HO(P,j,l,S,v,f.current),k))},{})}),1),b=m[0];return[s,b,u.current]};const WO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function qO(e,t){return E.useRef(WO(e,t)).current}const il={cssVariable:(e,t,n)=>`var(--${n})`,rgba:e=>`rgba(${e})`,rgb:e=>`rgb(${e})`,hsl:e=>`hsl(${e})`,hsla:e=>`hsla(${e})`,hex:e=>e,raw:e=>e,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},xo=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,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(xo(a,t,n,s))},[]),r0=(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]:r0(a,t,n,s)}},{}),pg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ps=(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)},UO={default:e=>ps(e,{result:pg.default}),dark:e=>ps(e,{result:pg.dark})},Ef=(e,t)=>{const n=s=>(l,c,u)=>{const d={key:`--${u}`,value:`${l}`};return s?s(d):d},r=xo(e.colors,n(t==null?void 0:t.colors)),o=xo(e.spacing,n(t==null?void 0:t.spacing)),i=xo(e.rounded,n(t==null?void 0:t.rounded)),a=e.custom?xo(e.custom,n(t==null?void 0:t.customTokens)):[];return r.concat(o,i,a)},GO=(e,t)=>ps(Ef(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),YO=(e,t)=>Ef(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),KO=(e,t)=>ps(Ef(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),o0={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},i0={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"},ZO={name:"dark",rounded:o0,spacing:i0,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%)"}}}},XO={rounded:o0,spacing:i0,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%)"}}}},QO=ZO,JO=XO,Cf={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",multiComboboxSelectedLabel:"Selected",multiComboboxInnerPlaceholder:"Search..."},kf={input:{iconFeedback:!0}},ha=E.createContext({tweaks:kf,parser:il.hsla,map:Cf,locale:void 0}),e_=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...kf,...e.tweaks},parser:e.parser||il.hsla,map:{...Cf,...e.map}}),[e]);return x.jsx(ha.Provider,{value:t,children:e.children})},Rf=e=>{const t=E.useContext(ha);if(e)return e;if(t)return t.locale||e},Ot=()=>{const e=E.useContext(ha);return e?e.map:Cf},t_={type:"spring",bounce:.3,duration:.6},hg=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),a0={middle:{x:"0%",opacity:1},enter:hg(1),exit:hg(-1)},mg={exit:{visibility:"hidden"}},n_=e=>{const t=Dn(Nb(e));return jb({start:t,end:ri(t,41)})},s0=(e,t)=>e.toLocaleDateString(t,{month:"long"}),r_=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=Nb(new Date(1970,o,1).setMonth(o)),a=s0(i,n);return x.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Mc={ArrowLeft:(e,t)=>t==="days"?mO(e):Gb(e),ArrowRight:(e,t)=>t==="days"?ri(e,1):rl(e,1),ArrowUp:(e,t)=>t==="days"?gO(e):vO(e),ArrowDown:(e,t)=>t==="days"?_b(e,1):Mb(e,1)},gg=(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)},Ar=e=>e.getFullYear().toString().padStart(4,"0"),o_=(e,t,n)=>e===void 0||n===void 0?!1:mI(t,e)&&gI(t,n),i_=e=>{var n;const t=Ot();return x.jsx(vt.tbody,{layout:!0,variants:a0,custom:e.direction,onKeyDown:e.onKeyDown,className:Be((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,m,b,S,T,w,C,k,I,P,j,D,F,R,O,N,L,M;const u=c.toISOString(),d=e.rangeMode?u===((m=(v=e.range)==null?void 0:v.to)==null?void 0:m.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=hO(c)&&e.markToday,f=((w=e.disabledDate)==null?void 0:w.call(e,c))||!1,h=pO(c,e.stateDate),y=!h||f,g=e.rangeMode?o_((C=e.range)==null?void 0:C.from,c,(k=e.range)==null?void 0:k.to):!1;return x.jsxs("td",{align:"center",className:Be("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:Be(`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":""}`,g&&e.markRange?"size-10 border border-dashed border-card-border":"",ht.function((D=e.styles)==null?void 0:D.day)?(F=e.styles)==null?void 0:F.day(c):(R=e.styles)==null?void 0:R.day),children:[c.getDate(),d&&((O=e.stateRange.from)==null?void 0:O.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:((N=e.labelRange)==null?void 0:N.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:((M=e.labelRange)==null?void 0:M.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},l0=({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(ca()),h=Ot(),y=Rf(o),g=E.useRef(null),{date:v,range:m}=p,b=v||new Date,S=E.useRef(null),[T,w]=Sf({date:b,isAnimating:!1,year:Ar(b),direction:void 0,range:{from:m==null?void 0:m.from,to:m==null?void 0:m.to},months:r_(f.current,b,y),selectMode:l?"from":void 0,week:jb({start:Dn(b),end:bA(b)})},F=>({onChangeYear:R=>({year:R}),setToday:()=>({date:jo(new Date)}),onExitComplete:()=>(gg(S.current||null,g,F.state().date,200),S.current=null,{isAnimating:!1}),date:R=>{const O=R(F.state().date);return{date:O,year:Ar(O)}},nextMonth:R=>{S.current=R.currentTarget;const O=F.state();if(O.isAnimating)return O;const N=rl(O.date,1);return{date:N,isAnimating:!0,direction:1,year:Ar(N)}},previousMonth:R=>{S.current=R.currentTarget;const O=F.state();if(O.isAnimating)return O;const N=Gb(O.date);return{date:N,isAnimating:!0,direction:-1,year:Ar(N)}},onSelectDate:R=>{const O=F.state(),N=R.currentTarget.dataset.range==="true",L=R.currentTarget.dataset.date||"",M=new Date(L);return{date:M,year:Ar(M),selectMode:O.selectMode===void 0?void 0:O.selectMode==="from"?"to":"from",range:N?{from:O.selectMode==="from"?M:O.range.from,to:O.selectMode==="to"?M:O.range.to}:O.range}},onChangeMonth:R=>{const O=R.target.value,L=Array.from(R.target.options).find(q=>q.value===O),M=F.state();if(L){const q=L.dataset.index||"",_=new Date(F.state().date);return _.setMonth(+q),{...M,date:_,year:Ar(_)}}return M},onKeyDown:R=>{const O=R.key,N=F.state();if(O in Mc){(O==="ArrowUp"||O==="ArrowDown")&&R.preventDefault();const L=F.state().date,M=ht.keyof(Mc,O)?Mc[O](L,R.shiftKey?"month":"days"):null;if(M!==null)return gg(R.target,g,M),{...N,date:M,year:Ar(M)}}return F.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(F,R,O)=>{var L,M;return(O.method==="onChangeMonth"||O.method==="previousMonth"||O.method==="nextMonth")&&((M=(L=O.props).onChangeMonth)==null||M.call(L,F.date)),F},(F,R,O)=>{var L,M;return O.method==="onChangeYear"&&((M=(L=O.props).onChangeYear)==null||M.call(L,F.date)),F},(F,R,O)=>{const N=O.method==="onSelectDate"||O.method==="setToday"||O.method==="onKeyDown";return l&&N&&t?(c==null||c(F.range),F):(N&&t&&(c==null||c(F.date)),F)}]}),C=n_(T.date),k=_y(C,7),I=T.date.toISOString(),P=s0(T.date,y);E.useEffect(()=>{t||c==null||c(T.date)},[I]);const j=qO(F=>{w.date(R=>{const O=new Date(R);return O.setFullYear(+F),O})},1200),D=F=>{const R=F.currentTarget.value;w.onChangeYear(R),s==null||s(new Date(R)),j(R)};return x.jsx(PS,{transition:t_,children:x.jsxs("div",{"data-component":"calendar",ref:g,className:Be("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(gr,{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:mg,onClick:w.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(jP,{className:"h-4 w-4"})}),x.jsx(vt.span,{layout:!0,variants:a0,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",{"aria-label":h.calendarMonthLabel,value:P,onChange:w.onChangeMonth,style:{width:`${P.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:T.months}),x.jsx(Qb,{mask:"int",maxLength:4,placeholder:"YYYY",value:T.year,onChange:D,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:mg,onClick:w.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(gf,{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(F=>x.jsx("th",{role:"columnheader",className:Be("py-2 text-sm font-medium capitalize",ht.function(u==null?void 0:u.weekDay)?u.weekDay(F):u==null?void 0:u.weekDay),children:F.toLocaleDateString(y,{weekday:"short"})},F.toString()))})}),x.jsx(i_,{zip:k,range:m,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",{className:"transition-transform duration-300 hover:scale-105",type:"button",onClick:w.setToday,children:h.calendarToday})})]})})},c0=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>x.jsxs(Jo,{...s,as:r,"data-componen":"card",className:Be("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:Be("mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",n),children:t}):i,x.jsx("div",{className:Be("min-w-full px-8",a),children:e})]}),u0=e=>{const t=e.Icon??Rb,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 vg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function d0(...e){return t=>{let n=!1;const r=e.map(o=>{const i=vg(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():vg(e[o],null)}}}}function Br(...e){return A.useCallback(d0(...e),e)}function f0(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,g=A.useMemo(()=>h,Object.values(h));return x.jsx(y.Provider,{value:g,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,a_(o,...t)]}function a_(...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 Fo=A.forwardRef((e,t)=>{const{children:n,...r}=e,o=A.Children.toArray(n),i=o.find(l_);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(Uu,{...r,ref:t,children:A.isValidElement(a)?A.cloneElement(a,void 0,s):null})}return x.jsx(Uu,{...r,ref:t,children:n})});Fo.displayName="Slot";var Uu=A.forwardRef((e,t)=>{const{children:n,...r}=e;if(A.isValidElement(n)){const o=u_(n),i=c_(r,n.props);return n.type!==A.Fragment&&(i.ref=t?d0(t,o):o),A.cloneElement(n,i)}return A.Children.count(n)>1?A.Children.only(null):null});Uu.displayName="SlotClone";var s_=({children:e})=>x.jsx(x.Fragment,{children:e});function l_(e){return A.isValidElement(e)&&e.type===s_}function c_(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 u_(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 d_(e){const t=e+"CollectionProvider",[n,r]=f0(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:h,children:y}=f,g=E.useRef(null),v=E.useRef(new Map).current;return x.jsx(o,{scope:h,itemMap:v,collectionRef:g,children:y})};a.displayName=t;const s=e+"CollectionSlot",l=E.forwardRef((f,h)=>{const{scope:y,children:g}=f,v=i(s,y),m=Br(h,v.collectionRef);return x.jsx(Fo,{ref:m,children:g})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,h)=>{const{scope:y,children:g,...v}=f,m=E.useRef(null),b=Br(h,m),S=i(c,y);return E.useEffect(()=>(S.itemMap.set(m,{ref:m,...v}),()=>void S.itemMap.delete(m))),x.jsx(Fo,{[u]:"",ref:b,children:g})});d.displayName=c;function p(f){const h=i(e+"CollectionConsumer",f);return E.useCallback(()=>{const g=h.collectionRef.current;if(!g)return[];const v=Array.from(g.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 f_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ln=f_.reduce((e,t)=>{const n=A.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Fo: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 p0(e,t){e&&qs.flushSync(()=>e.dispatchEvent(t))}function qn(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 p_(e,t=globalThis==null?void 0:globalThis.document){const n=qn(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 h_="DismissableLayer",Gu="dismissableLayer.update",m_="dismissableLayer.pointerDownOutside",g_="dismissableLayer.focusOutside",yg,h0=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),m0=A.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=A.useContext(h0),[u,d]=A.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=A.useState({}),h=Br(t,C=>d(C)),y=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(g),m=u?y.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,S=m>=v,T=y_(C=>{const k=C.target,I=[...c.branches].some(P=>P.contains(k));!S||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),w=x_(C=>{const k=C.target;[...c.branches].some(P=>P.contains(k))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return p_(C=>{m===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&&(yg=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),xg(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=yg)}},[u,p,n,c]),A.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),xg())},[u,c]),A.useEffect(()=>{const C=()=>f({});return document.addEventListener(Gu,C),()=>document.removeEventListener(Gu,C)},[]),x.jsx(Ln.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)})});m0.displayName=h_;var v_="DismissableLayerBranch",g0=A.forwardRef((e,t)=>{const n=A.useContext(h0),r=A.useRef(null),o=Br(t,r);return A.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(Ln.div,{...e,ref:o})});g0.displayName=v_;function y_(e,t=globalThis==null?void 0:globalThis.document){const n=qn(e),r=A.useRef(!1),o=A.useRef(()=>{});return A.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){v0(m_,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 x_(e,t=globalThis==null?void 0:globalThis.document){const n=qn(e),r=A.useRef(!1);return A.useEffect(()=>{const o=i=>{i.target&&!r.current&&v0(g_,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 xg(){const e=new CustomEvent(Gu);document.dispatchEvent(e)}function v0(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?p0(o,i):o.dispatchEvent(i)}var b_=m0,w_=g0,hs=globalThis!=null&&globalThis.document?A.useLayoutEffect:()=>{},T_="Portal",y0=A.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=A.useState(!1);hs(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?sa.createPortal(x.jsx(Ln.div,{...r,ref:t}),a):null});y0.displayName=T_;function S_(e,t){return A.useReducer((n,r)=>t[n][r]??n,e)}var x0=e=>{const{present:t,children:n}=e,r=E_(t),o=typeof n=="function"?n({present:r.isPresent}):A.Children.only(n),i=Br(r.ref,C_(o));return typeof n=="function"||r.isPresent?A.cloneElement(o,{ref:i}):null};x0.displayName="Presence";function E_(e){const[t,n]=A.useState(),r=A.useRef({}),o=A.useRef(e),i=A.useRef("none"),a=e?"mounted":"unmounted",[s,l]=S_(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{const c=Na(r.current);i.current=s==="mounted"?c:"none"},[s]),hs(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=Na(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]),hs(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const y=Na(r.current).includes(f.animationName);if(f.target===t&&y&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=f=>{f.target===t&&(i.current=Na(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 Na(e){return(e==null?void 0:e.animationName)||"none"}function C_(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 k_({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=R_({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=qn(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 R_({defaultProp:e,onChange:t}){const n=A.useState(e),[r]=n,o=A.useRef(r),i=qn(t);return A.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var P_="VisuallyHidden",Pf=A.forwardRef((e,t)=>x.jsx(Ln.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}}));Pf.displayName=P_;var Af="ToastProvider",[If,A_,I_]=d_("Toast"),[b0,CV]=f0("Toast",[I_]),[O_,al]=b0(Af),w0=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 \`${Af}\`. Expected non-empty \`string\`.`),x.jsx(If.Provider,{scope:t,children:x.jsx(O_,{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})})};w0.displayName=Af;var T0="ToastViewport",__=["F8"],Yu="toast.viewportPause",Ku="toast.viewportResume",S0=A.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=__,label:o="Notifications ({hotkey})",...i}=e,a=al(T0,n),s=A_(n),l=A.useRef(null),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),p=Br(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a.toastCount>0;A.useEffect(()=>{const g=v=>{var b;r.length!==0&&r.every(S=>v[S]||v.code===S)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),A.useEffect(()=>{const g=l.current,v=d.current;if(h&&g&&v){const m=()=>{if(!a.isClosePausedRef.current){const w=new CustomEvent(Yu);v.dispatchEvent(w),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const w=new CustomEvent(Ku);v.dispatchEvent(w),a.isClosePausedRef.current=!1}},S=w=>{!g.contains(w.relatedTarget)&&b()},T=()=>{g.contains(document.activeElement)||b()};return g.addEventListener("focusin",m),g.addEventListener("focusout",S),g.addEventListener("pointermove",m),g.addEventListener("pointerleave",T),window.addEventListener("blur",m),window.addEventListener("focus",b),()=>{g.removeEventListener("focusin",m),g.removeEventListener("focusout",S),g.removeEventListener("pointermove",m),g.removeEventListener("pointerleave",T),window.removeEventListener("blur",m),window.removeEventListener("focus",b)}}},[h,a.isClosePausedRef]);const y=A.useCallback(({tabbingDirection:g})=>{const m=s().map(b=>{const S=b.ref.current,T=[S,...U_(S)];return g==="forwards"?T:T.reverse()});return(g==="forwards"?m.reverse():m).flat()},[s]);return A.useEffect(()=>{const g=d.current;if(g){const v=m=>{var T,w,C;const b=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!b){const k=document.activeElement,I=m.shiftKey;if(m.target===g&&I){(T=c.current)==null||T.focus();return}const D=y({tabbingDirection:I?"backwards":"forwards"}),F=D.findIndex(R=>R===k);Dc(D.slice(F+1))?m.preventDefault():I?(w=c.current)==null||w.focus():(C=u.current)==null||C.focus()}};return g.addEventListener("keydown",v),()=>g.removeEventListener("keydown",v)}},[s,y]),x.jsxs(w_,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&x.jsx(Zu,{ref:c,onFocusFromOutsideViewport:()=>{const g=y({tabbingDirection:"forwards"});Dc(g)}}),x.jsx(If.Slot,{scope:n,children:x.jsx(Ln.ol,{tabIndex:-1,...i,ref:p})}),h&&x.jsx(Zu,{ref:u,onFocusFromOutsideViewport:()=>{const g=y({tabbingDirection:"backwards"});Dc(g)}})]})});S0.displayName=T0;var E0="ToastFocusProxy",Zu=A.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=al(E0,n);return x.jsx(Pf,{"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()}})});Zu.displayName=E0;var sl="Toast",M_="toast.swipeStart",D_="toast.swipeMove",j_="toast.swipeCancel",N_="toast.swipeEnd",C0=A.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=k_({prop:r,defaultProp:o,onChange:i});return x.jsx(x0,{present:n||s,children:x.jsx(V_,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:qn(e.onPause),onResume:qn(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)})})})});C0.displayName=sl;var[F_,L_]=b0(sl,{onClose(){}}),V_=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=al(sl,n),[g,v]=A.useState(null),m=Br(t,R=>v(R)),b=A.useRef(null),S=A.useRef(null),T=o||y.duration,w=A.useRef(0),C=A.useRef(T),k=A.useRef(0),{onToastAdd:I,onToastRemove:P}=y,j=qn(()=>{var O;(g==null?void 0:g.contains(document.activeElement))&&((O=y.viewport)==null||O.focus()),a()}),D=A.useCallback(R=>{!R||R===1/0||(window.clearTimeout(k.current),w.current=new Date().getTime(),k.current=window.setTimeout(j,R))},[j]);A.useEffect(()=>{const R=y.viewport;if(R){const O=()=>{D(C.current),c==null||c()},N=()=>{const L=new Date().getTime()-w.current;C.current=C.current-L,window.clearTimeout(k.current),l==null||l()};return R.addEventListener(Yu,N),R.addEventListener(Ku,O),()=>{R.removeEventListener(Yu,N),R.removeEventListener(Ku,O)}}},[y.viewport,T,l,c,D]),A.useEffect(()=>{i&&!y.isClosePausedRef.current&&D(T)},[i,T,y.isClosePausedRef,D]),A.useEffect(()=>(I(),()=>P()),[I,P]);const F=A.useMemo(()=>g?O0(g):null,[g]);return y.viewport?x.jsxs(x.Fragment,{children:[F&&x.jsx(z_,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),x.jsx(F_,{scope:n,onClose:j,children:qs.createPortal(x.jsx(If.ItemSlot,{scope:n,children:x.jsx(b_,{asChild:!0,onEscapeKeyDown:Qt(s,()=>{y.isFocusedToastEscapeKeyDownRef.current||j(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(Ln.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection,...h,ref:m,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Qt(e.onKeyDown,R=>{R.key==="Escape"&&(s==null||s(R.nativeEvent),R.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,j()))}),onPointerDown:Qt(e.onPointerDown,R=>{R.button===0&&(b.current={x:R.clientX,y:R.clientY})}),onPointerMove:Qt(e.onPointerMove,R=>{if(!b.current)return;const O=R.clientX-b.current.x,N=R.clientY-b.current.y,L=!!S.current,M=["left","right"].includes(y.swipeDirection),q=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,_=M?q(0,O):0,z=M?0:q(0,N),Q=R.pointerType==="touch"?10:2,ie={x:_,y:z},J={originalEvent:R,delta:ie};L?(S.current=ie,Fa(D_,d,J,{discrete:!1})):bg(ie,y.swipeDirection,Q)?(S.current=ie,Fa(M_,u,J,{discrete:!1}),R.target.setPointerCapture(R.pointerId)):(Math.abs(O)>Q||Math.abs(N)>Q)&&(b.current=null)}),onPointerUp:Qt(e.onPointerUp,R=>{const O=S.current,N=R.target;if(N.hasPointerCapture(R.pointerId)&&N.releasePointerCapture(R.pointerId),S.current=null,b.current=null,O){const L=R.currentTarget,M={originalEvent:R,delta:O};bg(O,y.swipeDirection,y.swipeThreshold)?Fa(N_,f,M,{discrete:!0}):Fa(j_,p,M,{discrete:!0}),L.addEventListener("click",q=>q.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),z_=e=>{const{__scopeToast:t,children:n,...r}=e,o=al(sl,t),[i,a]=A.useState(!1),[s,l]=A.useState(!1);return W_(()=>a(!0)),A.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:x.jsx(y0,{asChild:!0,children:x.jsx(Pf,{...r,children:i&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},$_="ToastTitle",k0=A.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(Ln.div,{...r,ref:t})});k0.displayName=$_;var B_="ToastDescription",R0=A.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(Ln.div,{...r,ref:t})});R0.displayName=B_;var P0="ToastAction",H_=A.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(I0,{altText:n,asChild:!0,children:x.jsx(Of,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${P0}\`. Expected non-empty \`string\`.`),null)});H_.displayName=P0;var A0="ToastClose",Of=A.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=L_(A0,n);return x.jsx(I0,{asChild:!0,children:x.jsx(Ln.button,{type:"button",...r,ref:t,onClick:Qt(e.onClick,o.onClose)})})});Of.displayName=A0;var I0=A.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(Ln.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function O0(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),q_(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(...O0(r))}}),t}function Fa(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?p0(o,i):o.dispatchEvent(i)}var bg=(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 W_(e=()=>{}){const t=qn(e);hs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function q_(e){return e.nodeType===e.ELEMENT_NODE}function U_(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 Dc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var G_=w0,Y_=S0,K_=C0,Z_=k0,X_=R0,Q_=Of;const J_=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},eM=Qo("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"}}),_0=E.createContext(()=>{throw new Error("Not implemented")}),tM=()=>E.useContext(_0),wg={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]}},nM=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=eM({theme:t.theme||"default"});return x.jsx(K_,{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:wg[t.reversedIndex]||wg.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(Z_,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(X_,{className:"select-text truncate",children:t.text})]}),r?x.jsx(Q_,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(yf,{className:"h-5 w-5"})}):null]})})})});function rM({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=J_(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(G_,{duration:n,swipeThreshold:150,children:[x.jsx(_0.Provider,{value:l,children:e}),x.jsx(gr,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(h=>h.id!==c.id));return E.createElement(nM,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),x.jsx(Y_,{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 oM=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:Be("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]}),M0=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},D0=E.createContext(""),iM=e=>{const[t,n]=M0(e.active),r=_o(0),o=_o(0),i=E.useRef(null),a=e.useHash?"a":"button";E.useEffect(()=>{const u=i.current;if(u===null)return;const d=y=>{if(!y)return;const g=y.getBoundingClientRect();o.set(g.width),r.set(y.offsetLeft)},p=()=>{const y=u.querySelector("li[data-active=true]");return void d(y)};window.addEventListener("resize",p);let f=u.querySelector("li[data-active=true]");const h=window.location.hash.replace(/^#/,"");if(e.active===""&&h!==""&&(f=u.querySelector(`li[data-id="${h}"]`),n(h)),f===null){f=u.querySelector("li[data-id]");const y=f.getAttribute("data-id")||"";n(y)}return d(f),()=>window.removeEventListener("resize",p)},[]);const s=Vi(e.onChange);E.useEffect(()=>{s.current&&s.current(t)},[s,t]);const l=E.Children.toArray(e.children),c=u=>{const d=u.currentTarget,p=d.getBoundingClientRect();o.set(p.width),r.set(d.offsetLeft),n(d.dataset.id||"")};return x.jsx(D0.Provider,{value:t,children:x.jsx(c0,{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:l.map(u=>{const d=u.props;return x.jsx("li",{"data-id":d.id,"data-active":t===d.id,className:"w-full border-b-2 transition-all border-card-border data-[active=true]:border-primary data-[active=true]:text-primary",children:x.jsx(a,{"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})})},aM=()=>E.useContext(D0),sM=e=>{const t=aM();return x.jsx(E.Fragment,{children:e.id===t?e.children:null})};function ll(){return typeof window<"u"}function yr(e){return j0(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kn(e){var t;return(t=(j0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function j0(e){return ll()?e instanceof Node||e instanceof Bt(e).Node:!1}function Xe(e){return ll()?e instanceof Element||e instanceof Bt(e).Element:!1}function bt(e){return ll()?e instanceof HTMLElement||e instanceof Bt(e).HTMLElement:!1}function Xu(e){return!ll()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function ma(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 lM(e){return["table","td","th"].includes(yr(e))}function cl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function _f(e){const t=Mf(),n=Xe(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 cM(e){let t=Un(e);for(;bt(t)&&!dr(t);){if(_f(t))return t;if(cl(t))return null;t=Un(t)}return null}function Mf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function dr(e){return["html","body","#document"].includes(yr(e))}function nn(e){return Bt(e).getComputedStyle(e)}function ul(e){return Xe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Un(e){if(yr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xu(e)&&e.host||Kn(e);return Xu(t)?t.host:t}function N0(e){const t=Un(e);return dr(t)?e.ownerDocument?e.ownerDocument.body:e.body:bt(t)&&ma(t)?t:N0(t)}function lr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=N0(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Bt(o);if(i){const s=Qu(a);return t.concat(a,a.visualViewport||[],ma(o)?o:[],s&&n?lr(s):[])}return t.concat(o,lr(o,[],n))}function Qu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mn(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&&Xu(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Df(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function F0(){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 L0(e){return e.mozInputSource===0&&e.isTrusted?!0:Ju()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function jf(e){return uM()?!1:!Ju()&&e.width===0&&e.height===0||Ju()&&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 Nf(){return/apple/i.test(navigator.vendor)}function Ju(){const e=/android/i;return e.test(Df())||e.test(F0())}function V0(){return Df().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function uM(){return F0().includes("jsdom/")}function Lo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function dM(e){return"nativeEvent"in e}function fM(e){return e.matches("html,body")}function It(e){return(e==null?void 0:e.ownerDocument)||document}function jc(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Rn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const pM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ff(e){return bt(e)&&e.matches(pM)}function Dt(e){e.preventDefault(),e.stopPropagation()}function z0(e){return e?e.getAttribute("role")==="combobox"&&Ff(e):!1}const Pn=Math.min,Xt=Math.max,ms=Math.round,bo=Math.floor,fr=e=>({x:e,y:e}),hM={left:"right",right:"left",bottom:"top",top:"bottom"},mM={start:"end",end:"start"};function ed(e,t,n){return Xt(e,Pn(t,n))}function oi(e,t){return typeof e=="function"?e(t):e}function pr(e){return e.split("-")[0]}function ii(e){return e.split("-")[1]}function $0(e){return e==="x"?"y":"x"}function Lf(e){return e==="y"?"height":"width"}function Hr(e){return["top","bottom"].includes(pr(e))?"y":"x"}function Vf(e){return $0(Hr(e))}function gM(e,t,n){n===void 0&&(n=!1);const r=ii(e),o=Vf(e),i=Lf(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=gs(a)),[a,gs(a)]}function vM(e){const t=gs(e);return[td(e),t,td(t)]}function td(e){return e.replace(/start|end/g,t=>mM[t])}function yM(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 xM(e,t,n,r){const o=ii(e);let i=yM(pr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(td)))),i}function gs(e){return e.replace(/left|right|bottom|top/g,t=>hM[t])}function bM(e){return{top:0,right:0,bottom:0,left:0,...e}}function B0(e){return typeof e!="number"?bM(e):{top:e,right:e,bottom:e,left:e}}function vs(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 wM=["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])"],ys=wM.join(","),H0=typeof Element>"u",Vo=H0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,xs=!H0&&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},bs=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},TM=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},SM=function(t,n,r){if(bs(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ys));return n&&Vo.call(t,ys)&&o.unshift(t),o=o.filter(r),o},EM=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!bs(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=Vo.call(a,ys);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!bs(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},W0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},q0=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||TM(t))&&!W0(t)?0:t.tabIndex},CM=function(t,n){var r=q0(t);return r<0&&n&&!W0(t)?0:r},kM=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},U0=function(t){return t.tagName==="INPUT"},RM=function(t){return U0(t)&&t.type==="hidden"},PM=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},AM=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},IM=function(t){if(!t.name)return!0;var n=t.form||xs(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=AM(o,t.form);return!i||i===t},OM=function(t){return U0(t)&&t.type==="radio"},_M=function(t){return OM(t)&&!IM(t)},MM=function(t){var n,r=t&&xs(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=xs(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},Tg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},DM=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Vo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Vo.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=xs(t);if(l&&!l.shadowRoot&&o(l)===!0)return Tg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(MM(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Tg(t);return!1},jM=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Vo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},NM=function(t,n){return!(n.disabled||bs(n)||RM(n)||DM(n,t)||PM(n)||jM(n))},nd=function(t,n){return!(_M(n)||q0(n)<0||!NM(t,n))},FM=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},LM=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=CM(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(kM).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ki=function(t,n){n=n||{};var r;return n.getShadowRoot?r=EM([t],n.includeContainer,{filter:nd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:FM}):r=SM(t,n.includeContainer,nd.bind(null,n)),LM(r)},VM=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Vo.call(t,ys)===!1?!1:nd(n,t)};function Sg(e,t,n){let{reference:r,floating:o}=e;const i=Hr(t),a=Vf(t),s=Lf(a),l=pr(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(ii(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const zM=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}=Sg(c,r,l),p=r,f={},h=0;for(let y=0;y<s.length;y++){const{name:g,fn:v}=s[y],{x:m,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=m??u,d=b??d,f={...f,[g]:{...f[g],...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}=Sg(c,p,l)),y=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function zf(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}=oi(t,e),h=B0(f),g=s[p?d==="floating"?"reference":"floating":d],v=vs(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),m=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=vs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:m,offsetParent:b,strategy:l}):m);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 $M=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}=oi(e,t)||{};if(c==null)return{};const d=B0(u),p={x:n,y:r},f=Vf(o),h=Lf(f),y=await a.getDimensions(c),g=f==="y",v=g?"top":"left",m=g?"bottom":"right",b=g?"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 k=S/2-T/2,I=C/2-y[h]/2-1,P=Pn(d[v],I),j=Pn(d[m],I),D=P,F=C-y[h]-j,R=C/2-y[h]/2+k,O=ed(D,R,F),N=!l.arrow&&ii(o)!=null&&R!==O&&i.reference[h]/2-(R<D?P:j)-y[h]/2<0,L=N?R<D?R-D:R-F:0;return{[f]:p[f]+L,data:{[f]:O,centerOffset:R-O-L,...N&&{alignmentOffset:L}},reset:N}}}),BM=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,...g}=oi(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=pr(o),m=Hr(s),b=pr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=p||(b||!y?[gs(s)]:vM(s)),w=h!=="none";!p&&w&&T.push(...xM(s,y,h,S));const C=[s,...T],k=await zf(t,g),I=[];let P=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[v]),d){const R=gM(o,a,S);I.push(k[R[0]],k[R[1]])}if(P=[...P,{placement:o,overflows:I}],!I.every(R=>R<=0)){var j,D;const R=(((j=i.flip)==null?void 0:j.index)||0)+1,O=C[R];if(O)return{data:{index:R,overflows:P},reset:{placement:O}};let N=(D=P.filter(L=>L.overflows[0]<=0).sort((L,M)=>L.overflows[1]-M.overflows[1])[0])==null?void 0:D.placement;if(!N)switch(f){case"bestFit":{var F;const L=(F=P.filter(M=>{if(w){const q=Hr(M.placement);return q===m||q==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(q=>q>0).reduce((q,_)=>q+_,0)]).sort((M,q)=>M[1]-q[1])[0])==null?void 0:F[0];L&&(N=L);break}case"initialPlacement":N=s;break}if(o!==N)return{reset:{placement:N}}}return{}}}};async function HM(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=pr(n),s=ii(n),l=Hr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=oi(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 WM=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 HM(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}}}}},qM=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:g=>{let{x:v,y:m}=g;return{x:v,y:m}}},...l}=oi(e,t),c={x:n,y:r},u=await zf(t,l),d=Hr(pr(o)),p=$0(d);let f=c[p],h=c[d];if(i){const g=p==="y"?"top":"left",v=p==="y"?"bottom":"right",m=f+u[g],b=f-u[v];f=ed(m,f,b)}if(a){const g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",m=h+u[g],b=h-u[v];h=ed(m,h,b)}const y=s.fn({...t,[p]:f,[d]:h});return{...y,data:{x:y.x-n,y:y.y-r}}}}},UM=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}=oi(e,t),l=await zf(t,s),c=pr(n),u=ii(n),d=Hr(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 g=f-l.top-l.bottom,v=p-l.left-l.right,m=Pn(f-l[h],g),b=Pn(p-l[y],v),S=!t.middlewareData.shift;let T=m,w=b;if(d?w=u||S?Pn(b,v):v:T=u||S?Pn(m,g):g,S&&!u){const k=Xt(l.left,0),I=Xt(l.right,0),P=Xt(l.top,0),j=Xt(l.bottom,0);d?w=p-2*(k!==0||I!==0?k+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 G0(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=ms(n)!==i||ms(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function $f(e){return Xe(e)?e:e.contextElement}function wo(e){const t=$f(e);if(!bt(t))return fr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=G0(t);let a=(i?ms(n.width):n.width)/r,s=(i?ms(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const GM=fr(0);function Y0(e){const t=Bt(e);return!Mf()||!t.visualViewport?GM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function YM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function Wr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=$f(e);let a=fr(1);t&&(r?Xe(r)&&(a=wo(r)):a=wo(e));const s=YM(i,n,r)?Y0(i):fr(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&&Xe(r)?Bt(r):r;let h=p,y=Qu(h);for(;y&&r&&f!==h;){const g=wo(y),v=y.getBoundingClientRect(),m=nn(y),b=v.left+(y.clientLeft+parseFloat(m.paddingLeft))*g.x,S=v.top+(y.clientTop+parseFloat(m.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=b,c+=S,h=Bt(y),y=Qu(h)}}return vs({width:u,height:d,x:l,y:c})}function KM(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Kn(r),s=t?cl(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=fr(1);const u=fr(0),d=bt(r);if((d||!d&&!i)&&((yr(r)!=="body"||ma(a))&&(l=ul(r)),bt(r))){const p=Wr(r);c=wo(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 ZM(e){return Array.from(e.getClientRects())}function K0(e){return Wr(Kn(e)).left+ul(e).scrollLeft}function XM(e){const t=Kn(e),n=ul(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+K0(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 QM(e,t){const n=Bt(e),r=Kn(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=Mf();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function JM(e,t){const n=Wr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=bt(e)?wo(e):fr(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 Eg(e,t,n){let r;if(t==="viewport")r=QM(e,n);else if(t==="document")r=XM(Kn(e));else if(Xe(t))r=JM(t,n);else{const o=Y0(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return vs(r)}function Z0(e,t){const n=Un(e);return n===t||!Xe(n)||dr(n)?!1:nn(n).position==="fixed"||Z0(n,t)}function eD(e,t){const n=t.get(e);if(n)return n;let r=lr(e,[],!1).filter(s=>Xe(s)&&yr(s)!=="body"),o=null;const i=nn(e).position==="fixed";let a=i?Un(e):e;for(;Xe(a)&&!dr(a);){const s=nn(a),l=_f(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ma(a)&&!l&&Z0(e,a))?r=r.filter(u=>u!==a):o=s,a=Un(a)}return t.set(e,r),r}function tD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?cl(t)?[]:eD(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=Eg(t,u,o);return c.top=Xt(d.top,c.top),c.right=Pn(d.right,c.right),c.bottom=Pn(d.bottom,c.bottom),c.left=Xt(d.left,c.left),c},Eg(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function nD(e){const{width:t,height:n}=G0(e);return{width:t,height:n}}function rD(e,t,n){const r=bt(t),o=Kn(t),i=n==="fixed",a=Wr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=fr(0);if(r||!r&&!i)if((yr(t)!=="body"||ma(o))&&(s=ul(t)),r){const d=Wr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=K0(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 Nc(e){return nn(e).position==="static"}function Cg(e,t){return!bt(e)||nn(e).position==="fixed"?null:t?t(e):e.offsetParent}function X0(e,t){const n=Bt(e);if(cl(e))return n;if(!bt(e)){let o=Un(e);for(;o&&!dr(o);){if(Xe(o)&&!Nc(o))return o;o=Un(o)}return n}let r=Cg(e,t);for(;r&&lM(r)&&Nc(r);)r=Cg(r,t);return r&&dr(r)&&Nc(r)&&!_f(r)?n:r||cM(e)||n}const oD=async function(e){const t=this.getOffsetParent||X0,n=this.getDimensions,r=await n(e.floating);return{reference:rD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function iD(e){return nn(e).direction==="rtl"}const aD={convertOffsetParentRelativeRectToViewportRelativeRect:KM,getDocumentElement:Kn,getClippingRect:tD,getOffsetParent:X0,getElementRects:oD,getClientRects:ZM,getDimensions:nD,getScale:wo,isElement:Xe,isRTL:iD};function sD(e,t){let n=null,r;const o=Kn(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=bo(u),h=bo(o.clientWidth-(c+d)),y=bo(o.clientHeight-(u+p)),g=bo(c),m={rootMargin:-f+"px "+-h+"px "+-y+"px "+-g+"px",threshold:Xt(0,Pn(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,{...m,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,m)}n.observe(e)}return a(!0),i}function ga(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=$f(e),u=o||i?[...c?lr(c):[],...lr(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?sD(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(v=>{let[m]=v;m&&m.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?Wr(e):null;l&&g();function g(){const v=Wr(e);y&&(v.x!==y.x||v.y!==y.y||v.width!==y.width||v.height!==y.height)&&n(),y=v,h=requestAnimationFrame(g)}return n(),()=>{var v;u.forEach(m=>{o&&m.removeEventListener("scroll",n),i&&m.removeEventListener("resize",n)}),d==null||d(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const lD=WM,cD=qM,uD=BM,dD=UM,kg=$M,fD=(e,t,n)=>{const r=new Map,o={platform:aD,...n},i={...o.platform,_c:r};return zM(e,t,{...o,platform:i})};var Qa=typeof document<"u"?E.useLayoutEffect:E.useEffect;function ws(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(!ws(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)&&!ws(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Q0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rg(e,t){const n=Q0(e);return Math.round(t*n)/n}function Fc(e){const t=A.useRef(e);return Qa(()=>{t.current=e}),t}function pD(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);ws(p,r)||f(r);const[h,y]=A.useState(null),[g,v]=A.useState(null),m=A.useCallback(M=>{M!==w.current&&(w.current=M,y(M))},[]),b=A.useCallback(M=>{M!==C.current&&(C.current=M,v(M))},[]),S=i||h,T=a||g,w=A.useRef(null),C=A.useRef(null),k=A.useRef(u),I=l!=null,P=Fc(l),j=Fc(o),D=Fc(c),F=A.useCallback(()=>{if(!w.current||!C.current)return;const M={placement:t,strategy:n,middleware:p};j.current&&(M.platform=j.current),fD(w.current,C.current,M).then(q=>{const _={...q,isPositioned:D.current!==!1};R.current&&!ws(k.current,_)&&(k.current=_,qs.flushSync(()=>{d(_)}))})},[p,t,n,j,D]);Qa(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(M=>({...M,isPositioned:!1})))},[c]);const R=A.useRef(!1);Qa(()=>(R.current=!0,()=>{R.current=!1}),[]),Qa(()=>{if(S&&(w.current=S),T&&(C.current=T),S&&T){if(P.current)return P.current(S,T,F);F()}},[S,T,F,P,I]);const O=A.useMemo(()=>({reference:w,floating:C,setReference:m,setFloating:b}),[m,b]),N=A.useMemo(()=>({reference:S,floating:T}),[S,T]),L=A.useMemo(()=>{const M={position:n,left:0,top:0};if(!N.floating)return M;const q=Rg(N.floating,u.x),_=Rg(N.floating,u.y);return s?{...M,transform:"translate("+q+"px, "+_+"px)",...Q0(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:_}},[n,s,N.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:F,refs:O,elements:N,floatingStyles:L}),[u,F,O,N,L])}const hD=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?kg({element:r.current,padding:o}).fn(n):{}:r?kg({element:r,padding:o}).fn(n):{}}}},va=(e,t)=>({...lD(e),options:[e,t]}),Bf=(e,t)=>({...cD(e),options:[e,t]}),Hf=(e,t)=>({...uD(e),options:[e,t]}),J0=(e,t)=>({...dD(e),options:[e,t]}),ew=(e,t)=>({...hD(e),options:[e,t]});function rd(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 tw={...A},mD=tw.useInsertionEffect,gD=mD||(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 gD(()=>{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 Wf="ArrowUp",ya="ArrowDown",zo="ArrowLeft",ai="ArrowRight";function La(e,t,n){return Math.floor(e/t)!==n}function _i(e,t){return t<0||t>=e.current.length}function Lc(e,t){return Ft(e,{disabledIndices:t})}function Pg(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&&Ja(a,s,o));return s}function vD(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===Wf){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}_i(e,d)&&(d=c)}if(n.key===ya&&(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}))),_i(e,d)&&(d=c)),r==="both"){const p=bo(c/i);n.key===ai&&(u&&Dt(n),c%i!==i-1?(d=Ft(e,{startingIndex:c,disabledIndices:a}),o&&La(d,i,p)&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a})),La(d,i,p)&&(d=c)),n.key===zo&&(u&&Dt(n),c%i!==0?(d=Ft(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&La(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})),La(d,i,p)&&(d=c));const f=bo(l/i)===p;_i(e,d)&&(o&&f?d=n.key===zo?l:Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function yD(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 xD(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 bD(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Ja(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 Ag=0;function or(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Ag);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Ag=requestAnimationFrame(i)}var ze=typeof document<"u"?E.useLayoutEffect:E.useEffect;function wD(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 TD(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 nw=A.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function SD(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 ze(()=>{const l=new Map(o);Array.from(l.keys()).sort(wD).forEach((u,d)=>{l.set(u,d)}),TD(o,l)||i(l)},[o]),A.createElement(nw.Provider,{value:A.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function rw(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=A.useContext(nw),[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 ze(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),ze(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),A.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function $o(){return $o=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},$o.apply(this,arguments)}let Ig=!1,ED=0;const Og=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ED++;function CD(){const[e,t]=A.useState(()=>Ig?Og():void 0);return ze(()=>{e==null&&t(Og())},[]),A.useEffect(()=>{Ig=!0},[]),e}const kD=tw.useId,si=kD||CD;let Zi;process.env.NODE_ENV!=="production"&&(Zi=new Set);function es(){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=Zi)!=null&&e.has(o))){var i;(i=Zi)==null||i.add(o),console.warn(o)}}function RD(){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=Zi)!=null&&e.has(o))){var i;(i=Zi)==null||i.add(o),console.error(o)}}const ow=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||es("The `ref` prop is required for `FloatingArrow`."));const g=si(),[v,m]=A.useState(!1);if(ze(()=>{if(!o)return;nn(o).direction==="rtl"&&m(!0)},[o]),!o)return null;const b=c*2,S=b/2,T=a/2*(l/-8+1),w=s/2*l/4,[C,k]=r.split("-"),I=!!p,P=C==="top"||C==="bottom",j=u&&k==="end"?"bottom":"top";let D=u&&k==="end"?"right":"left";u&&v&&(D=k==="end"?"left":"right");const F=(i==null?void 0:i.x)!=null?u||i.x:"",R=(i==null?void 0:i.y)!=null?u||i.y:"",O=p||"M0,0"+(" H"+a)+(" L"+(a-T)+","+(s-w))+(" Q"+a/2+","+s+" "+T+","+(s-w))+" Z",N={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",$o({},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",[D]:F,[j]:R,[C]:P||I?"100%":"calc(100% - "+b/2+"px)",transform:""+N+(f??""),...h}}),b>0&&A.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:d,strokeWidth:b+(p?0:1),d:O}),A.createElement("path",{stroke:b&&!p?y.fill:"none",d:O}),A.createElement("clipPath",{id:g},A.createElement("rect",{x:-S,y:S*(I?-1:1),width:a+b,height:a})))});function iw(){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 aw=A.createContext(null),sw=A.createContext(null),xr=()=>{var e;return((e=A.useContext(aw))==null?void 0:e.id)||null},br=()=>A.useContext(sw);function PD(e){const t=si(),n=br(),o=xr();return ze(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function AD(e){const{children:t,id:n}=e,r=xr();return A.createElement(aw.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function ID(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(()=>iw())[0];return A.createElement(sw.Provider,{value:A.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function hr(e){return"data-floating-ui-"+e}function jt(e){const t=E.useRef(e);return ze(()=>{t.current=e}),t}const _g=hr("safe-polygon");function Vc(e,t,n){return n&&!Lo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function lw(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=br(),h=xr(),y=jt(c),g=jt(l),v=jt(n),m=A.useRef(),b=A.useRef(-1),S=A.useRef(),T=A.useRef(-1),w=A.useRef(!0),C=A.useRef(!1),k=A.useRef(()=>{}),I=A.useCallback(()=>{var O;const N=(O=o.current.openEvent)==null?void 0:O.type;return(N==null?void 0:N.includes("mouse"))&&N!=="mousedown"},[o]);A.useEffect(()=>{if(!s)return;function O(N){let{open:L}=N;L||(clearTimeout(b.current),clearTimeout(T.current),w.current=!0)}return i.on("openchange",O),()=>{i.off("openchange",O)}},[s,i]),A.useEffect(()=>{if(!s||!y.current||!n)return;function O(L){I()&&r(!1,L,"hover")}const N=It(a.floating).documentElement;return N.addEventListener("mouseleave",O),()=>{N.removeEventListener("mouseleave",O)}},[a.floating,n,r,s,y,I]);const P=A.useCallback(function(O,N,L){N===void 0&&(N=!0),L===void 0&&(L="hover");const M=Vc(g.current,"close",m.current);M&&!S.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>r(!1,O,L),M)):N&&(clearTimeout(b.current),r(!1,O,L))},[g,r]),j=kt(()=>{k.current(),S.current=void 0}),D=kt(()=>{if(C.current){const O=It(a.floating).body;O.style.pointerEvents="",O.removeAttribute(_g),C.current=!1}});A.useEffect(()=>{if(!s)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function N(_){if(clearTimeout(b.current),w.current=!1,u&&!Lo(m.current)||d>0&&!Vc(g.current,"open"))return;const z=Vc(g.current,"open",m.current);z?b.current=window.setTimeout(()=>{v.current||r(!0,_,"hover")},z):r(!0,_,"hover")}function L(_){if(O())return;k.current();const z=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:_.clientX,y:_.clientY,onClose(){D(),j(),P(_,!0,"safe-polygon")}});const ie=S.current;z.addEventListener("mousemove",ie),k.current=()=>{z.removeEventListener("mousemove",ie)};return}(m.current==="touch"?!mt(a.floating,_.relatedTarget):!0)&&P(_)}function M(_){O()||o.current.floatingContext&&(y.current==null||y.current({...o.current.floatingContext,tree:f,x:_.clientX,y:_.clientY,onClose(){D(),j(),P(_)}})(_))}if(Xe(a.domReference)){var q;const _=a.domReference;return n&&_.addEventListener("mouseleave",M),(q=a.floating)==null||q.addEventListener("mouseleave",M),p&&_.addEventListener("mousemove",N,{once:!0}),_.addEventListener("mouseenter",N),_.addEventListener("mouseleave",L),()=>{var z;n&&_.removeEventListener("mouseleave",M),(z=a.floating)==null||z.removeEventListener("mouseleave",M),p&&_.removeEventListener("mousemove",N),_.removeEventListener("mouseenter",N),_.removeEventListener("mouseleave",L)}}},[a,s,e,u,d,p,P,j,D,r,n,v,f,g,y,o]),ze(()=>{var O;if(s&&n&&(O=y.current)!=null&&O.__options.blockPointerEvents&&I()){const L=It(a.floating).body;L.setAttribute(_g,""),L.style.pointerEvents="none",C.current=!0;const M=a.floating;if(Xe(a.domReference)&&M){var N;const q=a.domReference,_=f==null||(N=f.nodesRef.current.find(z=>z.id===h))==null||(N=N.context)==null?void 0:N.elements.floating;return _&&(_.style.pointerEvents=""),q.style.pointerEvents="auto",M.style.pointerEvents="auto",()=>{q.style.pointerEvents="",M.style.pointerEvents=""}}}},[s,n,h,a,f,y,I]),ze(()=>{n||(m.current=void 0,j(),D())},[n,j,D]),A.useEffect(()=>()=>{j(),clearTimeout(b.current),clearTimeout(T.current),D()},[s,a.domReference,j,D]);const F=A.useMemo(()=>{function O(N){m.current=N.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(N){const{nativeEvent:L}=N;function M(){!w.current&&!v.current&&r(!0,L,"hover")}u&&!Lo(m.current)||n||d===0||(clearTimeout(T.current),m.current==="touch"?M():T.current=window.setTimeout(M,d))}}},[u,r,n,v,d]),R=A.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(O){P(O.nativeEvent,!1)}}),[P]);return A.useMemo(()=>s?{reference:F,floating:R}:{},[s,F,R])}function OD(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 zr(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 _D(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),zr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let co=new WeakMap,Va=new WeakSet,za={},zc=0;const MD=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,cw=e=>e&&(e.host||cw(e.parentNode)),DD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=cw(n);return e.contains(r)?r:null}).filter(n=>n!=null);function jD(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=DD(t,e),s=new Set,l=new Set(a),c=[];za[o]||(za[o]=new WeakMap);const u=za[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(yr(h)!=="script")if(s.has(h))p(h);else{const y=i?h.getAttribute(i):null,g=y!==null&&y!=="false",v=(co.get(h)||0)+1,m=(u.get(h)||0)+1;co.set(h,v),u.set(h,m),c.push(h),v===1&&g&&Va.add(h),m===1&&h.setAttribute(o,""),!g&&i&&h.setAttribute(i,"true")}})}return zc++,()=>{c.forEach(f=>{const h=(co.get(f)||0)-1,y=(u.get(f)||0)-1;co.set(f,h),u.set(f,y),h||(!Va.has(f)&&i&&f.removeAttribute(i),Va.delete(f)),y||f.removeAttribute(o)}),zc--,zc||(co=new WeakMap,co=new WeakMap,Va=new WeakSet,za={})}}function Mg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=It(e[0]).body;return jD(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Bo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function uw(e,t){const n=Ki(e,Bo());t==="prev"&&n.reverse();const r=n.indexOf(mn(It(e)));return n.slice(r+1)[0]}function dw(){return uw(document.body,"next")}function fw(){return uw(document.body,"prev")}function Mi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!mt(n,r)}function ND(e){Ki(e,Bo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function FD(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 LD(e,t,n){const r=e.indexOf(t);function o(a){const s=hr("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 qf={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 VD;function Dg(e){e.key==="Tab"&&(e.target,clearTimeout(VD))}const Ts=A.forwardRef(function(t,n){const[r,o]=A.useState();ze(()=>(Nf()&&o("button"),document.addEventListener("keydown",Dg),()=>{document.removeEventListener("keydown",Dg)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[hr("focus-guard")]:"",style:qf};return A.createElement("span",$o({},t,i))}),pw=A.createContext(null),jg=hr("portal");function zD(e){e===void 0&&(e={});const{id:t,root:n}=e,r=si(),o=hw(),[i,a]=A.useState(null),s=A.useRef(null);return ze(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),ze(()=>{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(jg,""),l.appendChild(c),s.current=c,a(c)},[t,r]),ze(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Xe(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(jg,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function Xr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=zD({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&&Mi(h)&&(h.type==="focusin"?FD:ND)(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(pw.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&A.createElement(Ts,{"data-type":"outside",ref:l,onFocus:f=>{if(Mi(f,i)){var h;(h=u.current)==null||h.focus()}else{const y=fw()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus()}}}),p&&i&&A.createElement("span",{"aria-owns":i.id,style:qf}),i&&qs.createPortal(t,i),p&&i&&A.createElement(Ts,{"data-type":"outside",ref:c,onFocus:f=>{if(Mi(f,i)){var h;(h=d.current)==null||h.focus()}else{const y=dw()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const hw=()=>A.useContext(pw),$D=20;let _r=[];function $c(e){_r=_r.filter(n=>n.isConnected);let t=e;if(!(!t||yr(t)==="body")){if(!VM(t,Bo())){const n=Ki(t,Bo())[0];n&&(t=n)}_r.push(t),_r.length>$D&&(_r=_r.slice(-20))}}function Ng(){return _r.slice().reverse().find(e=>e.isConnected)}const BD=A.forwardRef(function(t,n){return A.createElement("button",$o({},t,{type:"button",ref:n,tabIndex:-1,style:qf}))});function li(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:g,dataRef:v,floatingId:m,elements:{domReference:b,floating:S}}=t,T=typeof a=="number"&&a<0,w=z0(b)&&T,C=MD()?i:!0,k=jt(o),I=jt(a),P=jt(s),j=br(),D=hw(),F=A.useRef(null),R=A.useRef(null),O=A.useRef(!1),N=A.useRef(!1),L=A.useRef(-1),M=D!=null,q=S==null?void 0:S.firstElementChild,_=(q==null?void 0:q.id)===m?q:S,z=kt(function(Y){return Y===void 0&&(Y=_),Y?Ki(Y,Bo()):[]}),Q=kt(Y=>{const U=z(Y);return k.current.map(Z=>b&&Z==="reference"?b:_&&Z==="floating"?_:U).filter(Boolean).flat()});A.useEffect(()=>{if(r||!c)return;function Y(Z){if(Z.key==="Tab"){mt(_,mn(It(_)))&&z().length===0&&!w&&Dt(Z);const V=Q(),H=Rn(Z);k.current[0]==="reference"&&H===b&&(Dt(Z),Z.shiftKey?or(V[V.length-1]):or(V[1])),k.current[1]==="floating"&&H===_&&Z.shiftKey&&(Dt(Z),or(V[0]))}}const U=It(_);return U.addEventListener("keydown",Y),()=>{U.removeEventListener("keydown",Y)}},[r,b,_,c,k,w,z,Q]),A.useEffect(()=>{if(r||!S)return;function Y(U){const Z=Rn(U),H=z().indexOf(Z);H!==-1&&(L.current=H)}return S.addEventListener("focusin",Y),()=>{S.removeEventListener("focusin",Y)}},[r,S,z]),A.useEffect(()=>{if(r||!d)return;function Y(){N.current=!0,setTimeout(()=>{N.current=!1})}function U(Z){const V=Z.relatedTarget;queueMicrotask(()=>{const H=!(mt(b,V)||mt(S,V)||mt(V,S)||mt(D==null?void 0:D.portalNode,V)||V!=null&&V.hasAttribute(hr("focus-guard"))||j&&(zr(j.nodesRef.current,h).find(X=>{var re,$;return mt((re=X.context)==null?void 0:re.elements.floating,V)||mt(($=X.context)==null?void 0:$.elements.domReference,V)})||OD(j.nodesRef.current,h).find(X=>{var re,$;return((re=X.context)==null?void 0:re.elements.floating)===V||(($=X.context)==null?void 0:$.elements.domReference)===V})));if(l&&H&&mn(It(_))===It(_).body){bt(_)&&(_==null||_.focus());const X=L.current,re=z(),$=re[X]||re[re.length-1]||_;bt($)&&$.focus()}(w||!c)&&V&&H&&!N.current&&V!==Ng()&&(O.current=!0,y(!1,Z))})}if(S&&bt(b))return b.addEventListener("focusout",U),b.addEventListener("pointerdown",Y),S.addEventListener("focusout",U),()=>{b.removeEventListener("focusout",U),b.removeEventListener("pointerdown",Y),S.removeEventListener("focusout",U)}},[r,b,S,_,c,h,j,D,y,d,l,z,w]),A.useEffect(()=>{var Y;if(r)return;const U=Array.from((D==null||(Y=D.portalNode)==null?void 0:Y.querySelectorAll("["+hr("portal")+"]"))||[]);if(S){const Z=[S,...U,F.current,R.current,k.current.includes("reference")||w?b:null].filter(H=>H!=null),V=c||w?Mg(Z,C,!C):Mg(Z);return()=>{V()}}},[r,b,S,c,k,D,w,C]),ze(()=>{if(r||!bt(_))return;const Y=It(_),U=mn(Y);queueMicrotask(()=>{const Z=Q(_),V=I.current,H=(typeof V=="number"?Z[V]:V.current)||_,X=mt(_,U);!T&&!X&&p&&or(H,{preventScroll:H===_})})},[r,p,_,T,Q,I]),ze(()=>{if(r||!_)return;let Y=!1;const U=It(_),Z=mn(U);let H=v.current.openEvent;const X=f.domReference.current;$c(Z);function re($){let{open:ye,reason:ke,event:Ae,nested:Te}=$;ye&&(H=Ae),ke==="escape-key"&&f.domReference.current&&$c(f.domReference.current),ke==="hover"&&Ae.type==="mouseleave"&&(O.current=!0),ke==="outside-press"&&(Te?(O.current=!1,Y=!0):O.current=!(L0(Ae)||jf(Ae)))}return g.on("openchange",re),()=>{g.off("openchange",re);const $=mn(U),ye=mt(S,$)||j&&zr(j.nodesRef.current,h).some(K=>{var ae;return mt((ae=K.context)==null?void 0:ae.elements.floating,$)});(ye||H&&["click","mousedown"].includes(H.type))&&f.domReference.current&&$c(f.domReference.current);const Ae=X||Z,Te=Ki(It(Ae).body,Bo());queueMicrotask(()=>{let K=Ng();!K&&bt(Ae)&&S&&(K=LD(Te,Ae,S)),P.current&&!O.current&&bt(K)&&(!(K!==$&&$!==U.body)||ye)&&K.focus({preventScroll:Y})})}},[r,S,_,P,v,f,g,j,h]),ze(()=>{if(!r&&D)return D.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:y,refs:f}),()=>{D.setFocusManagerState(null)}},[r,D,c,p,y,f,d]),ze(()=>{if(r||!_||typeof MutationObserver!="function"||T)return;const Y=()=>{const Z=_.getAttribute("tabindex"),V=z(),H=mn(It(S)),X=V.indexOf(H);X!==-1&&(L.current=X),k.current.includes("floating")||H!==f.domReference.current&&V.length===0?Z!=="0"&&_.setAttribute("tabindex","0"):Z!=="-1"&&_.setAttribute("tabindex","-1")};Y();const U=new MutationObserver(Y);return U.observe(_,{childList:!0,subtree:!0,attributes:!0}),()=>{U.disconnect()}},[r,S,_,f,k,z,T]);function ie(Y){return r||!u||!c?null:A.createElement(BD,{ref:Y==="start"?F:R,onClick:U=>y(!1,U.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&C&&(c?!w:!0)&&(M||c);return A.createElement(A.Fragment,null,J&&A.createElement(Ts,{"data-type":"inside",ref:D==null?void 0:D.beforeInsideRef,onFocus:Y=>{if(c){const Z=Q();or(o[0]==="reference"?Z[0]:Z[Z.length-1])}else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(O.current=!1,Mi(Y,D.portalNode)){const Z=dw()||b;Z==null||Z.focus()}else{var U;(U=D.beforeOutsideRef.current)==null||U.focus()}}}),!w&&ie("start"),n,ie("end"),J&&A.createElement(Ts,{"data-type":"inside",ref:D==null?void 0:D.afterInsideRef,onFocus:Y=>{if(c)or(Q()[0]);else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(d&&(O.current=!0),Mi(Y,D.portalNode)){const Z=fw()||b;Z==null||Z.focus()}else{var U;(U=D.afterOutsideRef.current)==null||U.focus()}}}))}const Bc=new Set,HD=A.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=si();return ze(()=>{if(!r)return;Bc.add(i);const a=/iP(hone|ad|od)|iOS/.test(Df()),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,g=((h=window.visualViewport)==null?void 0:h.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(p-Math.floor(g))+"px",left:-(d-Math.floor(y))+"px",right:"0"})}return()=>{Bc.delete(i),Bc.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),A.createElement("div",$o({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Fg(e){return bt(e.target)&&e.target.tagName==="BUTTON"}function Lg(e){return Ff(e)}function xa(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"&&(Lo(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}Lo(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||Fg(h))&&(h.key===" "&&!Lg(i)&&(h.preventDefault(),p.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!u||Fg(h)||Lg(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 WD(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 Vg(e){return e!=null&&e.clientX!=null}function qD(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,g]=A.useState([]),v=kt((w,C)=>{d.current||r.current.openEvent&&!Vg(r.current.openEvent)||a.setPositionReference(WD(i,{x:w,y:C,axis:l,dataRef:r,pointerType:f}))}),m=kt(w=>{c!=null||u!=null||(n?p.current||g([]):v(w.clientX,w.clientY))}),b=Lo(f)?o:n,S=A.useCallback(()=>{if(!b||!s||c!=null||u!=null)return;const w=Bt(o);function C(k){const I=Rn(k);mt(o,I)?(w.removeEventListener("mousemove",C),p.current=null):v(k.clientX,k.clientY)}if(!r.current.openEvent||Vg(r.current.openEvent)){w.addEventListener("mousemove",C);const k=()=>{w.removeEventListener("mousemove",C),p.current=null};return p.current=k,k}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]),ze(()=>{s&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[s,c,u,v]);const T=A.useMemo(()=>{function w(C){let{pointerType:k}=C;h(k)}return{onPointerDown:w,onPointerEnter:w,onMouseMove:m,onMouseEnter:m}},[m]);return A.useMemo(()=>s?{reference:T}:{},[s,T])}const UD={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},GD={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},zg=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 Qr(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=br(),g=kt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?g:l,m=A.useRef(!1),b=A.useRef(!1),{escapeKey:S,outsidePress:T}=zg(f),{escapeKey:w,outsidePress:C}=zg(h),k=kt(R=>{var O;if(!n||!a||!s||R.key!=="Escape")return;const N=(O=i.current.floatingContext)==null?void 0:O.nodeId,L=y?zr(y.nodesRef.current,N):[];if(!S&&(R.stopPropagation(),L.length>0)){let M=!0;if(L.forEach(q=>{var _;if((_=q.context)!=null&&_.open&&!q.context.dataRef.current.__escapeKeyBubbles){M=!1;return}}),!M)return}r(!1,dM(R)?R.nativeEvent:R,"escape-key")}),I=kt(R=>{var O;const N=()=>{var L;k(R),(L=Rn(R))==null||L.removeEventListener("keydown",N)};(O=Rn(R))==null||O.addEventListener("keydown",N)}),P=kt(R=>{var O;const N=m.current;m.current=!1;const L=b.current;if(b.current=!1,c==="click"&&L||N||typeof v=="function"&&!v(R))return;const M=Rn(R),q="["+hr("inert")+"]",_=It(o.floating).querySelectorAll(q);let z=Xe(M)?M:null;for(;z&&!dr(z);){const Y=Un(z);if(dr(Y)||!Xe(Y))break;z=Y}if(_.length&&Xe(M)&&!fM(M)&&!mt(M,o.floating)&&Array.from(_).every(Y=>!mt(z,Y)))return;if(bt(M)&&F){const Y=M.clientWidth>0&&M.scrollWidth>M.clientWidth,U=M.clientHeight>0&&M.scrollHeight>M.clientHeight;let Z=U&&R.offsetX>M.clientWidth;if(U&&nn(M).direction==="rtl"&&(Z=R.offsetX<=M.offsetWidth-M.clientWidth),Z||Y&&R.offsetY>M.clientHeight)return}const Q=(O=i.current.floatingContext)==null?void 0:O.nodeId,ie=y&&zr(y.nodesRef.current,Q).some(Y=>{var U;return jc(R,(U=Y.context)==null?void 0:U.elements.floating)});if(jc(R,o.floating)||jc(R,o.domReference)||ie)return;const J=y?zr(y.nodesRef.current,Q):[];if(J.length>0){let Y=!0;if(J.forEach(U=>{var Z;if((Z=U.context)!=null&&Z.open&&!U.context.dataRef.current.__outsidePressBubbles){Y=!1;return}}),!Y)return}r(!1,R,"outside-press")}),j=kt(R=>{var O;const N=()=>{var L;P(R),(L=Rn(R))==null||L.removeEventListener(c,N)};(O=Rn(R))==null||O.addEventListener(c,N)});A.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=T;function R(L){r(!1,L,"ancestor-scroll")}const O=It(o.floating);s&&O.addEventListener("keydown",w?I:k,w),v&&O.addEventListener(c,C?j:P,C);let N=[];return p&&(Xe(o.domReference)&&(N=lr(o.domReference)),Xe(o.floating)&&(N=N.concat(lr(o.floating))),!Xe(o.reference)&&o.reference&&o.reference.contextElement&&(N=N.concat(lr(o.reference.contextElement)))),N=N.filter(L=>{var M;return L!==((M=O.defaultView)==null?void 0:M.visualViewport)}),N.forEach(L=>{L.addEventListener("scroll",R,{passive:!0})}),()=>{s&&O.removeEventListener("keydown",w?I:k,w),v&&O.removeEventListener(c,C?j:P,C),N.forEach(L=>{L.removeEventListener("scroll",R)})}},[i,o,s,v,c,n,r,p,a,S,T,k,w,I,P,C,j]),A.useEffect(()=>{m.current=!1},[v,c]);const D=A.useMemo(()=>({onKeyDown:k,[UD[d]]:R=>{u&&r(!1,R.nativeEvent,"reference-press")}}),[k,r,u,d]),F=A.useMemo(()=>({onKeyDown:k,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[GD[c]]:()=>{m.current=!0}}),[k,c]);return A.useMemo(()=>a?{reference:D,floating:F}:{},[a,D,F])}function YD(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=si(),i=A.useRef({}),[a]=A.useState(()=>iw()),s=xr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!Xe(f)&&RD("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 Jr(e){e===void 0&&(e={});const{nodeId:t}=e,n=YD({...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=br();ze(()=>{u&&(d.current=u)},[u]);const f=pD({...e,elements:{...o,...s&&{reference:s}}}),h=A.useCallback(b=>{const S=Xe(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;l(S),f.refs.setReference(S)},[f.refs]),y=A.useCallback(b=>{(Xe(b)||b===null)&&(d.current=b,a(b)),(Xe(f.refs.reference.current)||f.refs.reference.current===null||b!==null&&!Xe(b))&&f.refs.setReference(b)},[f.refs]),g=A.useMemo(()=>({...f.refs,setReference:y,setPositionReference:h,domReference:d}),[f.refs,y,h]),v=A.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),m=A.useMemo(()=>({...f,...r,refs:g,elements:v,nodeId:t}),[f,g,v,t,r]);return ze(()=>{r.dataRef.current.floatingContext=m;const b=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);b&&(b.context=m)}),A.useMemo(()=>({...f,context:m,refs:g,elements:v}),[f,g,v,m])}function KD(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===mn(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){jf(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const h=Rn(f.nativeEvent);if(l&&Xe(h))try{if(Nf()&&V0())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!d.current&&!Ff(h))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const h=f.relatedTarget,y=f.nativeEvent,g=Xe(h)&&h.hasAttribute(hr("focus-guard"))&&h.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const m=mn(a.domReference?a.domReference.ownerDocument:document);!h&&m===a.domReference||mt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,m)||mt(a.domReference,m)||g||r(!1,y,"focus")})}}),[i,a.domReference,r,l]);return A.useMemo(()=>s?{reference:p}:{},[s,p])}const $g="active",Bg="selected";function Hc(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[$g]:a,[Bg]: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&&[$g,Bg].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(g=>g(...h)).find(g=>g!==void 0)}}}else a[c]=u}),a),{})}}function eo(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=>Hc(s,e,"reference"),t),i=A.useCallback(s=>Hc(s,e,"floating"),n),a=A.useCallback(s=>Hc(s,e,"item"),r);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let Hg=!1;function dl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Wg(e,t){return dl(t,e===Wf||e===ya,e===zo||e===ai)}function Wc(e,t,n){return dl(t,e===ya,n?e===zo:e===ai)||e==="Enter"||e===" "||e===""}function ZD(e,t,n){return dl(t,n?e===zo:e===ai,e===ya)}function qg(e,t,n){return dl(t,n?e===ai:e===zo,e===Wf)}function Uf(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:g=!0,openOnArrowKeyDown:v=!0,disabledIndices:m=void 0,orientation:b="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:w,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||es("`useListNavigation` looping must be enabled to allow escaping."),h||es("`useListNavigation` must be virtual to allow escaping.")),b==="vertical"&&S>1&&es("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=xr(),P=br(),j=kt(s),D=A.useRef(y),F=A.useRef(c??-1),R=A.useRef(null),O=A.useRef(!0),N=A.useRef(j),L=A.useRef(!!o.floating),M=A.useRef(n),q=A.useRef(!1),_=A.useRef(!1),z=jt(m),Q=jt(n),ie=jt(T),J=jt(o.floating),Y=jt(c),[U,Z]=A.useState(),[V,H]=A.useState(),X=kt(function(K,ae,G){G===void 0&&(G=!1);function ee(ue){h?(Z(ue.id),P==null||P.events.emit("virtualfocus",ue),w&&(w.current=ue)):or(ue,{preventScroll:!0,sync:V0()&&Nf()?Hg||q.current:!1})}const ge=K.current[ae.current];ge&&ee(ge),requestAnimationFrame(()=>{const ue=K.current[ae.current]||ge;if(!ue)return;ge||ee(ue);const Fe=ie.current;Fe&&$&&(G||!O.current)&&(ue.scrollIntoView==null||ue.scrollIntoView(typeof Fe=="boolean"?{block:"nearest",inline:"nearest"}:Fe))})});ze(()=>{document.createElement("div").focus({get preventScroll(){return Hg=!0,!1}})},[]),ze(()=>{l&&(n&&o.floating?D.current&&c!=null&&(_.current=!0,F.current=c,j(c)):L.current&&(F.current=-1,N.current(null)))},[l,n,o.floating,c,j]),ze(()=>{if(l&&n&&o.floating)if(a==null){if(q.current=!1,Y.current!=null)return;if(L.current&&(F.current=-1,X(i,F)),(!M.current||!L.current)&&D.current&&(R.current!=null||D.current===!0&&R.current==null)){let K=0;const ae=()=>{i.current[0]==null?(K<2&&(K?requestAnimationFrame:queueMicrotask)(ae),K++):(F.current=R.current==null||Wc(R.current,b,f)||p?Lc(i,z.current):Pg(i,z.current),R.current=null,j(F.current))};ae()}}else _i(i,a)||(F.current=a,X(i,F,_.current),_.current=!1)},[l,n,o.floating,a,Y,p,i,b,f,j,X,z]),ze(()=>{var K;if(!l||o.floating||!P||h||!L.current)return;const ae=P.nodesRef.current,G=(K=ae.find(ue=>ue.id===I))==null||(K=K.context)==null?void 0:K.elements.floating,ee=mn(It(o.floating)),ge=ae.some(ue=>ue.context&&mt(ue.context.elements.floating,ee));G&&!ge&&O.current&&G.focus({preventScroll:!0})},[l,o.floating,P,I,h]),ze(()=>{if(!l||!P||!h||I)return;function K(ae){H(ae.id),w&&(w.current=ae)}return P.events.on("virtualfocus",K),()=>{P.events.off("virtualfocus",K)}},[l,P,h,I,w]),ze(()=>{N.current=j,L.current=!!o.floating}),ze(()=>{n||(R.current=null)},[n]),ze(()=>{M.current=n},[n]);const re=a!=null,$=A.useMemo(()=>{function K(G){if(!n)return;const ee=i.current.indexOf(G);ee!==-1&&j(ee)}return{onFocus(G){let{currentTarget:ee}=G;K(ee)},onClick:G=>{let{currentTarget:ee}=G;return ee.focus({preventScroll:!0})},...g&&{onMouseMove(G){let{currentTarget:ee}=G;K(ee)},onPointerLeave(G){let{pointerType:ee}=G;!O.current||ee==="touch"||(F.current=-1,X(i,F),j(null),h||or(J.current,{preventScroll:!0}))}}}},[n,J,X,g,i,j,h]),ye=kt(K=>{if(O.current=!1,q.current=!0,!Q.current&&K.currentTarget===J.current)return;if(p&&qg(K.key,b,f)){Dt(K),r(!1,K.nativeEvent,"list-navigation"),bt(o.domReference)&&!h&&o.domReference.focus();return}const ae=F.current,G=Lc(i,m),ee=Pg(i,m);if(K.key==="Home"&&(Dt(K),F.current=G,j(F.current)),K.key==="End"&&(Dt(K),F.current=ee,j(F.current)),S>1){const ge=C||Array.from({length:i.current.length},()=>({width:1,height:1})),ue=yD(ge,S,k),Fe=ue.findIndex(le=>le!=null&&!Ja(i.current,le,m)),oe=ue.reduce((le,Le,Ge)=>Le!=null&&!Ja(i.current,Le,m)?Ge:le,-1);if(F.current=ue[vD({current:ue.map(le=>le!=null?i.current[le]:null)},{event:K,orientation:b,loop:d,cols:S,disabledIndices:bD([...m||i.current.map((le,Le)=>Ja(i.current,Le)?Le:void 0),void 0],ue),minIndex:Fe,maxIndex:oe,prevIndex:xD(F.current>ee?G:F.current,ge,ue,S,K.key===ya?"bl":K.key===ai?"tr":"tl"),stopEvent:!0})],j(F.current),b==="both")return}if(Wg(K.key,b)){if(Dt(K),n&&!h&&mn(K.currentTarget.ownerDocument)===K.currentTarget){F.current=Wc(K.key,b,f)?G:ee,j(F.current);return}Wc(K.key,b,f)?d?F.current=ae>=ee?u&&ae!==i.current.length?-1:G:Ft(i,{startingIndex:ae,disabledIndices:m}):F.current=Math.min(ee,Ft(i,{startingIndex:ae,disabledIndices:m})):d?F.current=ae<=G?u&&ae!==-1?i.current.length:ee:Ft(i,{startingIndex:ae,decrement:!0,disabledIndices:m}):F.current=Math.max(G,Ft(i,{startingIndex:ae,decrement:!0,disabledIndices:m})),_i(i,F.current)?j(null):j(F.current)}}),ke=A.useMemo(()=>h&&n&&re&&{"aria-activedescendant":V||U},[h,n,re,V,U]),Ae=A.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...!z0(o.domReference)&&ke,onKeyDown:ye,onPointerMove(){O.current=!0}}),[ke,ye,o.domReference,b]),Te=A.useMemo(()=>{function K(G){y==="auto"&&L0(G.nativeEvent)&&(D.current=!0)}function ae(G){D.current=y,y==="auto"&&jf(G.nativeEvent)&&(D.current=!0)}return{...ke,onKeyDown(G){O.current=!1;const ee=G.key.indexOf("Arrow")===0,ge=ZD(G.key,b,f),ue=qg(G.key,b,f),Fe=Wg(G.key,b),oe=(p?ge:Fe)||G.key==="Enter"||G.key.trim()==="";if(h&&n){const xt=P==null?void 0:P.nodesRef.current.find(_t=>_t.parentId==null),lt=P&&xt?_D(P.nodesRef.current,xt.id):null;if(ee&<&&w){const _t=new KeyboardEvent("keydown",{key:G.key,bubbles:!0});if(ge||ue){var le,Le;const dn=((le=lt.context)==null?void 0:le.elements.domReference)===G.currentTarget,Tn=ue&&!dn?(Le=lt.context)==null?void 0:Le.elements.domReference:ge?i.current.find(Zn=>(Zn==null?void 0:Zn.id)===U):null;Tn&&(Dt(G),Tn.dispatchEvent(_t),H(void 0))}if(Fe&<.context&<.context.open&<.parentId&&G.currentTarget!==lt.context.elements.domReference){var Ge;Dt(G),(Ge=lt.context.elements.domReference)==null||Ge.dispatchEvent(_t);return}}return ye(G)}if(!(!n&&!v&&ee)){if(oe&&(R.current=p&&Fe?null:G.key),p){ge&&(Dt(G),n?(F.current=Lc(i,z.current),j(F.current)):r(!0,G.nativeEvent,"list-navigation"));return}Fe&&(c!=null&&(F.current=c),Dt(G),!n&&v?r(!0,G.nativeEvent,"list-navigation"):ye(G),n&&j(F.current))}},onFocus(){n&&!h&&j(null)},onPointerDown:ae,onMouseDown:K,onClick:K}},[U,ke,ye,z,y,i,p,j,r,n,v,b,f,c,P,h,w]);return A.useMemo(()=>l?{reference:Te,floating:Ae,item:$}:{},[l,Te,Ae,$])}const XD=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function to(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=XD.get(a))!=null?n:a,l=si(),u=xr()!=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:g}=h;const v={role:"option",...y&&{id:o+"-option"}};switch(a){case"select":return{...v,"aria-selected":y&&g};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 Ug=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]=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 JD(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=QD(n,a);return!c&&s==="close"&&l("unmounted"),ze(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function mw(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(()=>({...uo(i,c),...uo(n,c)})),{isMounted:y,status:g}=JD(e,{duration:a}),v=jt(n),m=jt(r),b=jt(o),S=jt(i);return ze(()=>{const T=uo(v.current,c),w=uo(b.current,c),C=uo(S.current,c),k=uo(m.current,c)||Object.keys(T).reduce((I,P)=>(I[P]="",I),{});if(g==="initial"&&h(I=>({transitionProperty:I.transitionProperty,...C,...T})),g==="open"&&h({transitionProperty:Object.keys(k).map(Ug).join(","),transitionDuration:d+"ms",...C,...k}),g==="close"){const I=w||T;h({transitionProperty:Object.keys(I).map(Ug).join(","),transitionDuration:p+"ms",...C,...I})}},[p,b,v,m,S,d,g,c]),{isMounted:y,styles:f}}function ej(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(""),g=A.useRef((n=f??a)!=null?n:-1),v=A.useRef(null),m=kt(s),b=kt(l),S=jt(u),T=jt(p);ze(()=>{r&&(clearTimeout(h.current),v.current=null,y.current="")},[r]),ze(()=>{if(r&&y.current===""){var P;g.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(N,L,M){const q=S.current?S.current(L,M):L.find(_=>(_==null?void 0:_.toLocaleLowerCase().indexOf(M.toLocaleLowerCase()))===0);return q?N.indexOf(q):-1}const D=i.current;if(y.current.length>0&&y.current[0]!==" "&&(j(D,D,y.current)===-1?w(!1):P.key===" "&&Dt(P)),D==null||T.current.includes(P.key)||P.key.length!==1||P.ctrlKey||P.metaKey||P.altKey)return;r&&P.key!==" "&&(Dt(P),w(!0)),D.every(N=>{var L,M;return N?((L=N[0])==null?void 0:L.toLocaleLowerCase())!==((M=N[1])==null?void 0:M.toLocaleLowerCase()):!0})&&y.current===P.key&&(y.current="",g.current=v.current),y.current+=P.key,clearTimeout(h.current),h.current=setTimeout(()=>{y.current="",g.current=v.current,w(!1)},d);const R=g.current,O=j(D,[...D.slice((R||0)+1),...D.slice(0,(R||0)+1)],y.current);O!==-1?(m(O),v.current=O):P.key!==" "&&(y.current="",w(!1))}),k=A.useMemo(()=>({onKeyDown:C}),[C]),I=A.useMemo(()=>({onKeyDown:C,onKeyUp(P){P.key===" "&&w(!1)}}),[C,w]);return A.useMemo(()=>c?{reference:k,floating:I}:{},[c,k,I])}function Gg(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 tj(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function gw(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,g=p-s,m=Math.sqrt(y*y+g*g)/h;return a=d,s=p,l=f,m}const u=d=>{let{x:p,y:f,placement:h,elements:y,onClose:g,nodeId:v,tree:m}=d;return function(S){function T(){clearTimeout(o),g()}if(clearTimeout(o),!y.domReference||!y.floating||h==null||p==null||f==null)return;const{clientX:w,clientY:C}=S,k=[w,C],I=Rn(S),P=S.type==="mouseleave",j=mt(y.floating,I),D=mt(y.domReference,I),F=y.domReference.getBoundingClientRect(),R=y.floating.getBoundingClientRect(),O=h.split("-")[0],N=p>R.right-R.width/2,L=f>R.bottom-R.height/2,M=tj(k,F),q=R.width>F.width,_=R.height>F.height,z=(q?F:R).left,Q=(q?F:R).right,ie=(_?F:R).top,J=(_?F:R).bottom;if(j&&(i=!0,!P))return;if(D&&(i=!1),D&&!P){i=!0;return}if(P&&Xe(S.relatedTarget)&&mt(y.floating,S.relatedTarget)||m&&zr(m.nodesRef.current,v).some(Z=>{let{context:V}=Z;return V==null?void 0:V.open}))return;if(O==="top"&&f>=F.bottom-1||O==="bottom"&&f<=F.top+1||O==="left"&&p>=F.right-1||O==="right"&&p<=F.left+1)return T();let Y=[];switch(O){case"top":Y=[[z,F.top+1],[z,R.bottom-1],[Q,R.bottom-1],[Q,F.top+1]];break;case"bottom":Y=[[z,R.top+1],[z,F.bottom-1],[Q,F.bottom-1],[Q,R.top+1]];break;case"left":Y=[[R.right-1,J],[R.right-1,ie],[F.left+1,ie],[F.left+1,J]];break;case"right":Y=[[F.right-1,J],[F.right-1,ie],[R.left+1,ie],[R.left+1,J]];break}function U(Z){let[V,H]=Z;switch(O){case"top":{const X=[q?V+t/2:N?V+t*4:V-t*4,H+t+1],re=[q?V-t/2:N?V+t*4:V-t*4,H+t+1],$=[[R.left,N||q?R.bottom-t:R.top],[R.right,N?q?R.bottom-t:R.top:R.bottom-t]];return[X,re,...$]}case"bottom":{const X=[q?V+t/2:N?V+t*4:V-t*4,H-t],re=[q?V-t/2:N?V+t*4:V-t*4,H-t],$=[[R.left,N||q?R.top+t:R.bottom],[R.right,N?q?R.top+t:R.bottom:R.top+t]];return[X,re,...$]}case"left":{const X=[V+t+1,_?H+t/2:L?H+t*4:H-t*4],re=[V+t+1,_?H-t/2:L?H+t*4:H-t*4];return[...[[L||_?R.right-t:R.left,R.top],[L?_?R.right-t:R.left:R.right-t,R.bottom]],X,re]}case"right":{const X=[V-t,_?H+t/2:L?H+t*4:H-t*4],re=[V-t,_?H-t/2:L?H+t*4:H-t*4],$=[[L||_?R.left+t:R.right,R.top],[L?_?R.left+t:R.right:R.left+t,R.bottom]];return[X,re,...$]}}}if(!Gg([w,C],Y)){if(i&&!M)return T();if(!P&&r){const Z=c(S.clientX,S.clientY);if(Z!==null&&Z<.1)return T()}Gg([w,C],U([p,f]))?!i&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const ci=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[va(10),Hf({fallbackAxisSideDirection:"end"}),Bf(),ew({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=Jr({open:n,middleware:i,transform:!0,whileElementsMounted:ga,onOpenChange:(h,y)=>{var v;const g=y==null?void 0:y.relatedTarget;g&&g.dataset.floating==="true"&&!h||(r(h),(v=e.onChange)==null||v.call(e,h))}}),c=xa(l),u=Qr(l),d=to(l),{getReferenceProps:p,getFloatingProps:f}=eo([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(Xr,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(li,{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(ow,{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]})})})]})},nj=e=>{const t=E.useRef(null),n=E.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=E.useState(!1),{context:s,refs:l}=Jr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=xa(s),u=to(s),d=Qr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=eo([c,u,d]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(Ro,{...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(gr,{children:i?x.jsx(Xr,{root:t,children:x.jsx(li,{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})]})},vw=300,rj=500,yw=(e="")=>Be("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),od=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Yg=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([]),g=E.useRef([]),v=E.useContext(od),m=xr(),b=br(),S=PD(),T=rw(),w=m!==null,{floatingStyles:C,refs:k,context:I}=Jr({nodeId:S,open:c,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:ga,placement:w?"right":"bottom-start",middleware:[va({mainAxis:w?0:4,alignmentAxis:w?-4:0}),Hf(),Bf()]}),P=to(I,{role:"menu",enabled:!0}),j=Qr(I,{bubbles:!0}),D=lw(I,{move:!1,enabled:n,delay:{open:vw},handleClose:gw({blockPointerEvents:!0})}),F=xa(I,{event:"mousedown",toggle:!w,ignoreMouse:w,keyboardHandlers:!0}),R=Uf(I,{loop:!0,listRef:y,activeIndex:f,nested:w,onNavigate:h}),O=ej(I,{activeIndex:f,listRef:g,resetMs:rj,onMatch:c?h:void 0}),{getReferenceProps:N,getFloatingProps:L,getItemProps:M}=eo([D,F,P,j,R,O]);E.useEffect(()=>{if(!b)return;function _(){u(!1)}function z(Q){Q.nodeId!==S&&Q.parentId===m&&u(!1)}return b.events.on("click",_),b.events.on("menuopen",z),()=>{b.events.off("click",_),b.events.off("menuopen",z)}},[b,S,m]),E.useEffect(()=>{c&&b&&b.events.emit("menuopen",{parentId:m,nodeId:S})},[b,c,S,m]);const q=o?s.className:Be(yw(s.className));return x.jsxs(AD,{id:S,children:[x.jsx(E.Fragment,{children:s.asChild?x.jsx(Fo,{...N(v.getItemProps({...s,onFocus(_){var z;(z=s.onFocus)==null||z.call(s,_),p(!1),v.setHasFocusInside(!0)}})),children:a,ref:rd([k.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:q}):x.jsxs("button",{type:"button",className:q,"data-open":c?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":d?"":void 0,ref:rd([k.setReference,T.ref,l]),tabIndex:w?v.activeIndex===T.index?0:-1:void 0,...N(v.getItemProps({...s,onFocus(_){var z;(z=s.onFocus)==null||z.call(s,_),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(gf,{size:14})]})]})}),x.jsx(od.Provider,{value:{activeIndex:f,setActiveIndex:h,getItemProps:M,setHasFocusInside:p,isOpen:c},children:x.jsx(SD,{elementsRef:y,labelsRef:g,children:c&&x.jsx(Xr,{preserveTabOrder:!0,children:x.jsx(li,{context:I,modal:!1,initialFocus:w?-1:0,returnFocus:!w,children:x.jsx(t,{...L(),ref:k.setFloating,style:{...s.style,...C},className:Be("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})})})})})]})}),oj=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(od),s=rw({label:n?null:e}),l=br(),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:rd([s.ref,i]),className:yw(`${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]})}),ij=E.forwardRef((e,t)=>xr()!==null?x.jsx(Yg,{...e,isParent:!1,ref:t}):x.jsx(ID,{children:x.jsx(Yg,{...e,isParent:!0,ref:t})})),aj=(e,t)=>Li()?t:window.matchMedia(e).matches,sj=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(aj(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},lj=e=>{const t=E.useRef(Li()?"":document.documentElement.style.overflowY);E.useEffect(()=>{const n=document.documentElement;e?(t.current=document.documentElement.style.overflowY,n.style.overflowY="hidden",n.style.padding=Oy(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])},gn="600ms",cj={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:gn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:gn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:gn}},uj={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:gn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:gn}},qc={drawer:e=>e==="left"?cj:uj,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:gn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:gn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:gn,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:gn},enter:{opacity:1,scale:[1.05,1],animationDuration:gn},exit:{opacity:0,scale:.97,animationDuration:gn}}},dj=Qo("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"}}),fj={top:0,left:0,right:0,bottom:-1},pj=e=>e*.62,hj=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+d))}const i=e.parent.current.getBoundingClientRect(),a=e.value.get()||i.height,s=Math.abs(a-r.delta.y),l=pj(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:fj,whileDrag:{cursor:"grabbing"},className:Be("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})},Uc={drawer:"right",sheet:"none",dialog:"none"},mj=({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:g,...v})=>{lj(e);const m=E.useId(),b=E.useId(),S=sj("(min-width: 64rem)"),T=f!=="dialog",w=S?f==="drawer"?h:Uc[f]:d?Uc[f]:Uc.sheet,C=S||d?qc[f]:qc.sheet,k=typeof C=="function"?C(w):C,I=S||d?f:"sheet",{refs:P,context:j}=Jr({open:e,onOpenChange:s}),D=xa(j),F=to(j),R=Qr(j,{escapeKey:!0,referencePress:!0,outsidePress:y}),{getReferenceProps:O,getFloatingProps:N}=eo([D,F,R]),L=o,M=_o(void 0),q=()=>s(!1);return x.jsxs(E.Fragment,{children:[o?x.jsx(E.Fragment,{children:r?x.jsx(Fo,{ref:P.setReference,...O({layoutId:a}),children:L}):x.jsx(vt.button,{ref:P.setReference,...O(),layoutId:a,type:"button",children:L})}):null,x.jsx(Xr,{children:x.jsx(gr,{mode:"wait",presenceAffectsLayout:!0,children:e?x.jsx(HD,{lockScroll:!1,className:Be(`fixed 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(li,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:j,children:x.jsxs(vt.div,{...v,exit:"exit",animate:"enter",initial:"initial",variants:k,"data-component":"modal",ref:P.setFloating,"aria-modal":e,layoutId:a,className:Be(dj({position:w,type:I}),l),style:I==="drawer"?{width:M}:{height:M},...t?{"aria-labelledby":m,"aria-describedby":b}:{"aria-label":g},...N(),children:[t?x.jsx("header",{className:"relative w-full",children:t?x.jsx("h2",{id:m,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:q,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(yf,{})})}):null,T&&c?x.jsx(hj,{value:M,onChange:s,sheet:I==="sheet",parent:P.floating,position:w}):null]})})}):null})})]})},gj=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}),xw=({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=Md,...d})=>{const[p,f]=E.useState(o??!1),h=E.useRef(null),y=e||"span",g=D=>{f(D),u==null||u(D)},{refs:v,floatingStyles:m,context:b}=Jr({open:p,placement:r,transform:!0,strategy:"absolute",whileElementsMounted:ga,onOpenChange:o?void 0:g,middleware:[Bf(),va(5),Hf({fallbackAxisSideDirection:"start"}),ew({padding:5,element:h})]}),S=lw(b,{move:!0,delay:{open:vw},enabled:s?a:!1,handleClose:l?gw():null}),T=KD(b,{enabled:s?i:!1}),w=xa(b,{enabled:s?l:!1}),C=Qr(b,{enabled:s}),k=to(b,{role:"tooltip",enabled:s}),I=qD(b,{enabled:!!s&&!!c}),{getReferenceProps:P,getFloatingProps:j}=eo([k,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(Xr,{preserveTabOrder:!0,children:x.jsxs(Jo,{...j(),ref:v.setFloating,style:m,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(ow,{ref:h,context:b,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),n]})})]})};class Ss{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++)Ss.getDescendantProperty(s[l],i,r);else i&&Ss.getDescendantProperty(s,i,r)}else r.push(t);return r}}class Fr{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=Fr.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=Ss.getDescendantProperty(o,this.keys[i]);let s=!1;for(let l=0;l<a.length;l++){const c=Fr.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=Fr.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 Fr.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 fl=0,wr=1,ui=2,bw=4;function Kg(e){return()=>e}function vj(e){e()}function Xi(e,t){return n=>e(t(n))}function Zg(e,t){return()=>e(t)}function ww(e,t){return n=>e(t,n)}function Gf(e){return e!==void 0}function yj(...e){return()=>{e.map(vj)}}function di(){}function pl(e,t){return t(e),e}function xj(e,t){return t(e)}function at(...e){return e}function Ke(e,t){return e(wr,t)}function Oe(e,t){e(fl,t)}function Yf(e){e(ui)}function Lt(e){return e(bw)}function xe(e,t){return Ke(e,ww(t,fl))}function jn(e,t){const n=e(wr,r=>{n(),t(r)});return n}function Xg(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Tw(e,t){return e===t}function ot(e=Tw){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=>Xi(t,e)}function En(e){return t=>()=>{t(e)}}function te(e,...t){const n=bj(...t);return(r,o)=>{switch(r){case ui:Yf(e);return;case wr:return Ke(e,n(o))}}}function An(e,t){return n=>r=>{n(t=e(t,r))}}function Ho(e){return t=>n=>{e>0?e--:t(n)}}function sr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Me(...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 bj(...e){return t=>e.reduceRight(xj,t)}function wj(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case wr:return i?n===i?void 0:(r(),n=i,t=Ke(e,i),t):(r(),di);case ui:r(),n=null;return}}}function se(e){let t=e;const n=Ve();return(r,o)=>{switch(r){case fl:t=o;break;case wr:{o(t);break}case bw:return t}return n(r,o)}}function Vt(e,t){return pl(se(t),n=>xe(e,n))}function Ve(){const e=[];return(t,n)=>{switch(t){case fl:e.slice().forEach(r=>{r(n)});return;case ui:e.splice(0,e.length);return;case wr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function en(e){return pl(Ve(),t=>xe(e,t))}function We(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:Tj(),singleton:n}}const Tj=()=>Symbol();function Sj(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&&Oe(t,n)})}),function(i,a){switch(i){case ui:{Yf(t);return}case wr:return r===o&&a(n),Ke(t,a)}}}function Ce(e,t=Tw){return te(e,ot(t))}function Qg(...e){return function(t,n){switch(t){case ui:return;case wr:return yj(...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 Ej={0:"debug",3:"error",1:"log",2:"warn"},Cj=()=>typeof globalThis>"u"?window:globalThis,Tr=We(()=>{const e=se(3);return{log:se((t,n,r=1)=>{var o;const i=(o=Cj().VIRTUOSO_LOG_LEVEL)!=null?o:Lt(e);r>=i&&console[Ej[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Nn(e,t,n){return Kf(e,t,n).callbackRef}function Kf(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 Sw(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=kj(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,g=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:g,scrollTop:Math.max(y,0),viewportHeight:v}),i==null||i(s?Jg("column-gap",getComputedStyle(u).columnGap,o):Jg("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return Kf(c,n,l)}function kj(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 Jg(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 Zf(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}=Kf(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(te(e,pe(({scrollTop:g})=>g)),t),xe(te(e,pe(({scrollHeight:g})=>g)),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}),Qi={lvl:0};function Ew(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 et(e){return e===Qi}function Ji(e,t){if(!et(e))return t===e.k?e.v:t<e.k?Ji(e.l,t):Ji(e.r,t)}function bn(e,t,n="k"){if(et(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=bn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return bn(e.l,t,n)}function Jt(e,t,n){return et(e)?Rw(t,n,1):t===e.k?Ct(e,{k:t,v:n}):t<e.k?ev(Ct(e,{l:Jt(e.l,t,n)})):ev(Ct(e,{r:Jt(e.r,t,n)}))}function To(){return Qi}function hl(e,t,n){if(et(e))return[];const r=bn(e,t)[0];return Rj(ad(e,r,n))}function id(e,t){if(et(e))return Qi;const{k:n,l:r,r:o}=e;if(t===n){if(et(r))return o;if(et(o))return r;{const[i,a]=kw(r);return ts(Ct(e,{k:i,l:Cw(r),v:a}))}}else return t<n?ts(Ct(e,{l:id(r,t)})):ts(Ct(e,{r:id(o,t)}))}function Lr(e){return et(e)?[]:[...Lr(e.l),{k:e.k,v:e.v},...Lr(e.r)]}function ad(e,t,n){if(et(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(ad(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(ad(i,t,n))),s}function ts(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(Gc(t))return Pw(Ct(e,{lvl:n-1}));if(!et(t)&&!et(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(Gc(e))return sd(Ct(e,{lvl:n-1}));if(!et(r)&&!et(r.l)){const o=r.l,i=Gc(o)?r.lvl-1:r.lvl;return Ct(o,{l:Ct(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:sd(Ct(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Ct(e,t){return Rw(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 Cw(e){return et(e.r)?e.l:ts(Ct(e,{r:Cw(e.r)}))}function Gc(e){return et(e)||e.lvl>e.r.lvl}function kw(e){return et(e.r)?[e.k,e.v]:kw(e.r)}function Rw(e,t,n,r=Qi,o=Qi){return{k:e,l:r,lvl:n,r:o,v:t}}function ev(e){return sd(Pw(e))}function Pw(e){const{l:t}=e;return!et(t)&&t.lvl===e.lvl?Ct(t,{r:Ct(e,{l:t.r})}):e}function sd(e){const{lvl:t,r:n}=e;return!et(n)&&!et(n.r)&&n.lvl===t&&n.r.lvl===t?Ct(n,{l:Ct(e,{r:n.l}),lvl:t+1}):e}function Rj(e){return Ew(e,({k:t,v:n})=>({index:t,value:n}))}function Aw(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ea(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const Xf=We(()=>({recalcInProgress:se(!1)}),[],{singleton:!0});function Iw(e,t,n){return e[Es(e,t,n)]}function Es(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 Pj(e,t,n,r){const o=Es(e,t,r),i=Es(e,n,r,o);return e.slice(o,i+1)}function wn(e,t){return Math.round(e.getBoundingClientRect()[t])}function ml(e){return!et(e.groupOffsetTree)}function Qf({index:e},t){return t===e?0:t<e?-1:1}function Aj(){return{groupIndices:[],groupOffsetTree:To(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:To()}}function Ij(e,t){let n=et(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),et(e)){e=Jt(e,0,i);continue}const s=hl(e,a-1,o+1);if(s.some(Fj(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=id(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 Oj(e){return typeof e.groupIndex<"u"}function _j({offset:e},t){return t===e?0:t<e?-1:1}function ta(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=Iw(t,e,Qf),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function Ow(e,t){if(!ml(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function _w(e,t,n){if(Oj(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Ow(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Mj(e,t,n,r=0){return r>0&&(t=Math.max(t,Iw(e,r,Qf).offset)),Ew(Pj(e,t,n,_j),Nj)}function Dj(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&&et(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]=Ij(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=ld(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>Jt(p,f,ta(f,d,o)),To()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function jj(e){return Lr(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 tv(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 ld(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Es(o,t-1,Qf),s=o[l].offset;const c=bn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===bn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of hl(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 Nj(e){return{index:e.index,value:e}}function Fj(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 Lj={offsetHeight:"height",offsetWidth:"width"},Vn=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)=>wn(T,Lj[w])),p=se(void 0),f=se(0),h=Aj(),y=Vt(te(n,Me(l,e,f),An(Dj,h),ot()),h),g=Vt(te(l,ot(),An((T,w)=>({current:w,prev:T.current}),{current:[],prev:[]}),pe(({prev:T})=>T)),[]);xe(te(l,Se(T=>T.length>0),Me(y,f),pe(([T,w,C])=>{const k=T.reduce((I,P,j)=>Jt(I,P,ta(P,w.offsetTree,C)||j),To());return{...w,groupIndices:T,groupOffsetTree:k}})),y),xe(te(r,Me(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(te(c,pe(T=>T===void 0)),!0);xe(te(u,Se(T=>T!==void 0&&et(Lt(y).sizeTree)),pe(T=>[{endIndex:0,size:T,startIndex:0}])),n);const m=en(te(n,Me(y),An(({sizes:T},[w,C])=>({changed:C!==T,sizes:C}),{changed:!1,sizes:h}),pe(T=>T.changed)));Ke(te(s,An((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)Oe(t,!0),Oe(i,T+tv(T,w));else if(T<0){const C=Lt(g);C.length>0&&(T-=tv(-T,C)),Oe(a,T)}}),Ke(te(s,Me(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(te(i,Me(y),pe(([T,w])=>{const C=w.groupIndices.length>0,k=[],I=w.lastSize;if(C){const P=Ji(w.sizeTree,0);let j=0,D=0;for(;j<T;){const R=w.groupIndices[D],O=w.groupIndices.length===D+1?1/0:w.groupIndices[D+1]-R-1;k.push({endIndex:R,size:P,startIndex:R}),k.push({endIndex:R+1+O-1,size:I,startIndex:R+1}),D++,j+=O+1}const F=Lr(w.sizeTree);return j!==T&&F.shift(),F.reduce((R,{k:O,v:N})=>{let L=R.ranges;return R.prevSize!==0&&(L=[...R.ranges,{endIndex:O+T-1,size:R.prevSize,startIndex:R.prevIndex}]),{prevIndex:O+T,prevSize:N,ranges:L}},{prevIndex:T,prevSize:0,ranges:k}).ranges}return Lr(w.sizeTree).reduce((P,{k:j,v:D})=>({prevIndex:j+T,prevSize:D,ranges:[...P.ranges,{endIndex:j+T-1,size:P.prevSize,startIndex:P.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const S=en(te(a,Me(y,f),pe(([T,{offsetTree:w},C])=>{const k=-T;return ta(k,w,C)})));return xe(te(a,Me(y,f),pe(([T,w,C])=>{if(w.groupIndices.length>0){if(et(w.sizeTree))return w;let k=To();const I=Lt(g);let P=0,j=0,D=0;for(;P<-T;){D=I[j];const F=I[j+1]-D-1;j++,P+=F+1}if(k=Lr(w.sizeTree).reduce((F,{k:R,v:O})=>Jt(F,Math.max(0,R+T),O),k),P!==-T){const F=Ji(w.sizeTree,D);k=Jt(k,0,F);const R=bn(w.sizeTree,-T+1)[1];k=Jt(k,1,R)}return{...w,sizeTree:k,...ld(w.offsetTree,0,k,C)}}else{const k=Lr(w.sizeTree).reduce((I,{k:P,v:j})=>Jt(I,Math.max(0,P+T),j),To());return{...w,sizeTree:k,...ld(w.offsetTree,0,k,C)}}})),y),{beforeUnshiftWith:b,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:m,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:y,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}},at(Tr,Xf),{singleton:!0});function Vj(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const Mw=We(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Ve(),a=Ve(),s=en(te(i,pe(Vj)));return xe(te(s,pe(l=>l.totalCount)),n),xe(te(s,pe(l=>l.groupIndices)),e),xe(te(Rt(o,t,r),Se(([l,c])=>ml(c)),pe(([l,c,u])=>bn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),ot(),pe(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},at(Vn,Wt)),Sr=We(([{log:e}])=>{const t=se(!1),n=en(te(t,Se(r=>r),ot()));return Ke(t,r=>{r&&Lt(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},at(Tr),{singleton:!0}),zj=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Dw(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!zj)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const ba=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 g=null,v=null,m=null;function b(){g&&(g(),g=null),m&&(m(),m=null),v&&(clearTimeout(v),v=null),Oe(l,!1)}return xe(te(f,Me(n,d,r,y,s,a,p),Me(e,i,o),pe(([[S,T,w,C,k,I,P,j],D,F,R])=>{const O=Dw(S),{align:N,behavior:L,offset:M}=O,q=C-1,_=_w(O,T,q);let z=ta(_,T.offsetTree,D)+I;N==="end"?(z+=F+bn(T.sizeTree,_)[1]-w+R,_===q&&(z+=P)):N==="center"?z+=(F+bn(T.sizeTree,_)[1]-w+R)/2:z-=k,M&&(z+=M);const Q=ie=>{b(),ie?(j("retrying to scroll to",{location:S},tn.DEBUG),Oe(f,S)):(Oe(h,!0),j("list did not change, scroll successful",{},tn.DEBUG))};if(b(),L==="smooth"){let ie=!1;m=Ke(t,J=>{ie=ie||J}),g=jn(u,()=>{Q(ie)})}else g=jn(te(t,$j(150)),Q);return v=setTimeout(()=>{b()},1200),Oe(l,!0),j("scrolling from index to",{behavior:L,index:_,top:z},tn.DEBUG),{behavior:L,top:z}})),c),{scrollTargetReached:h,scrollToIndex:f,topListHeight:y}},at(Vn,Wt,Tr),{singleton:!0});function $j(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function Jf(e,t){e==0?t():requestAnimationFrame(()=>{Jf(e-1,t)})}function ep(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const wa=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(te(a,Me(l),Se(([u,d])=>!!d),En(!1)),s),xe(te(a,Me(l),Se(([u,d])=>!!d),En(!1)),c),Ke(te(Rt(t,a),Me(s,n,e,c),Se(([[,u],d,{sizeTree:p},f,h])=>u&&(!et(p)||Gf(f))&&!d&&!h),Me(l)),([,u])=>{jn(o,()=>{Oe(c,!0)}),Jf(4,()=>{jn(r,()=>{Oe(s,!0)}),Oe(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},at(Vn,Wt,ba,Sr),{singleton:!0});function jw(e,t){return Math.abs(e-t)<1.01}const na="up",Di="down",Bj="none",Hj={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Wj=0,Ta=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(Wj),p=Vt(te(Qg(te(Ce(o),Ho(1),En(!0)),te(Ce(o),Ho(1),En(!1),Xg(100))),ot()),!1),f=Vt(te(Qg(te(n,En(!0)),te(n,En(!1),Xg(200))),ot()),!1);xe(te(Rt(Ce(o),Ce(d)),pe(([m,b])=>m<=b),ot()),s),xe(te(s,sr(50)),c);const h=en(te(Rt(r,Ce(i),Ce(t),Ce(e),Ce(u)),An((m,[{scrollHeight:b,scrollTop:S},T,w,C,k])=>{const I=S+T-b>-k,P={scrollHeight:b,scrollTop:S,viewportHeight:T};if(I){let D,F;return S>m.state.scrollTop?(D="SCROLLED_DOWN",F=m.state.scrollTop-S):(D="SIZE_DECREASED",F=m.state.scrollTop-S||m.scrollTopDelta),{atBottom:!0,atBottomBecause:D,scrollTopDelta:F,state:P}}let j;return P.scrollHeight>m.state.scrollHeight?j="SIZE_INCREASED":T<m.state.viewportHeight?j="VIEWPORT_HEIGHT_DECREASING":S<m.state.scrollTop?j="SCROLLING_UPWARDS":j="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:j,state:P}},Hj),ot((m,b)=>m&&m.atBottom===b.atBottom))),y=Vt(te(r,An((m,{scrollHeight:b,scrollTop:S,viewportHeight:T})=>{if(jw(m.scrollHeight,b))return{changed:!1,jump:0,scrollHeight:b,scrollTop:S};{const w=b-(S+T)<1;return m.scrollTop!==S&&w?{changed:!0,jump:m.scrollTop-S,scrollHeight:b,scrollTop:S}:{changed:!0,jump:0,scrollHeight:b,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Se(m=>m.changed),pe(m=>m.jump)),0);xe(te(h,pe(m=>m.atBottom)),a),xe(te(a,sr(50)),l);const g=se(Di);xe(te(r,pe(({scrollTop:m})=>m),ot(),An((m,b)=>Lt(f)?{direction:m.direction,prevScrollTop:b}:{direction:b<m.prevScrollTop?na:Di,prevScrollTop:b},{direction:Di,prevScrollTop:0}),pe(m=>m.direction)),g),xe(te(r,sr(50),En(Bj)),g);const v=se(0);return xe(te(p,Se(m=>!m),En(0)),v),xe(te(o,sr(100),Me(p),Se(([m,b])=>!!b),An(([m,b],[S])=>[b,S],[0,0]),pe(([m,b])=>b-m)),v),{atBottomState:h,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:y,scrollDirection:g,scrollVelocity:v}},at(Wt)),Cs="top",ks="bottom",nv="none";function rv(e,t,n){return typeof e=="number"?n===na&&t===Cs||n===Di&&t===ks?e:0:n===na?t===Cs?e.main:e.reverse:t===ks?e.main:e.reverse}function ov(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const tp=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(te(Rt(Ce(r),Ce(o),Ce(n),Ce(i,ea),Ce(l),Ce(a),Ce(t),Ce(e),Ce(s)),pe(([u,d,p,[f,h],y,g,v,m,b])=>{const S=u-m,T=g+v,w=Math.max(p-S,0);let C=nv;const k=ov(b,Cs),I=ov(b,ks);return f-=m,f+=p+v,h+=p+v,h-=m,f>u+T-k&&(C=na),h<u-w+d+I&&(C=Di),C!==nv?[Math.max(S-p-rv(y,Cs,C)-k,0),S-w-v+d+rv(y,ks,C)+I]:null}),Se(u=>u!=null),ot(ea)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},at(Wt),{singleton:!0});function qj(e,t,n){if(ml(t)){const r=Ow(e,t);return[{index:bn(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 Yc={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function ns(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:iv(e,o,i),offsetBottom:h,offsetTop:c,top:f,topItems:iv(t,o,i),topListHeight:t.reduce((y,g)=>g.size+y,0),totalCount:n}}function Nw(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=ep(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return ns(c,[],s,o,n,r)}function iv(e,t,n){if(e.length===0)return[];if(!ml(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=hl(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 no=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([]),g=se(0),v=Ve();xe(i.topItemsIndexes,y);const m=Vt(te(Rt(f,h,Ce(l,ea),Ce(o),Ce(r),Ce(c),u,Ce(y),Ce(t),Ce(n),e),Se(([w,C,,k,,,,,,,I])=>{const P=I&&I.length!==k;return w&&!C&&!P}),pe(([,,[w,C],k,I,P,j,D,F,R,O])=>{const N=I,{offsetTree:L,sizeTree:M}=N,q=Lt(g);if(k===0)return{...Yc,totalCount:k};if(w===0&&C===0)return q===0?{...Yc,totalCount:k}:Nw(q,P,I,F,R,O||[]);if(et(M))return q>0?null:ns(qj(ep(P,k),N,O),[],k,R,N,F);const _=[];if(D.length>0){const Y=D[0],U=D[D.length-1];let Z=0;for(const V of hl(M,Y,U)){const H=V.value,X=Math.max(V.start,Y),re=Math.min(V.end,U);for(let $=X;$<=re;$++)_.push({data:O==null?void 0:O[$],index:$,offset:Z,size:H}),Z+=H}}if(!j)return ns([],_,k,R,N,F);const z=D.length>0?D[D.length-1]+1:0,Q=Mj(L,w,C,z);if(Q.length===0)return null;const ie=k-1,J=pl([],Y=>{for(const U of Q){const Z=U.value;let V=Z.offset,H=U.start;const X=Z.size;if(Z.offset<w){H+=Math.floor((w-Z.offset+R)/(X+R));const $=H-U.start;V+=$*X+$*R}H<z&&(V+=(z-H)*X,H=z);const re=Math.min(U.end,ie);for(let $=H;$<=re&&!(V>=C);$++)Y.push({data:O==null?void 0:O[$],index:$,offset:V,size:X}),V+=X+R}});return ns(J,_,k,R,N,F)}),Se(w=>w!==null),ot()),Yc);xe(te(e,Se(Gf),pe(w=>w==null?void 0:w.length)),o),xe(te(m,pe(w=>w.topListHeight)),d),xe(d,s),xe(te(m,pe(w=>[w.top,w.bottom])),a),xe(te(m,pe(w=>w.items)),v);const b=en(te(m,Se(({items:w})=>w.length>0),Me(o,e),Se(([{items:w},C])=>w[w.length-1].originalIndex===C-1),pe(([,w,C])=>[w-1,C]),ot(ea),pe(([w])=>w))),S=en(te(m,sr(200),Se(({items:w,topItems:C})=>w.length>0&&w[0].originalIndex===C.length),pe(({items:w})=>w[0].index),ot())),T=en(te(m,Se(({items:w})=>w.length>0),pe(({items:w})=>{let C=0,k=w.length-1;for(;w[C].type==="group"&&C<k;)C++;for(;w[k].type==="group"&&k>C;)k--;return{endIndex:w[k].index,startIndex:w[C].index}}),ot(Aw)));return{endReached:b,initialItemCount:g,itemsRendered:v,listState:m,rangeChanged:T,startReached:S,topItemsIndexes:y,...p}},at(Vn,Mw,tp,wa,ba,Ta,Sr,Xf),{singleton:!0}),Fw=We(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Ve(),a=Vt(te(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}},at(Wt,no),{singleton:!0}),Uj=We(([{viewportHeight:e},{totalListHeight:t}])=>{const n=se(!1),r=Vt(te(Rt(n,e,t),Se(([o])=>o),pe(([,o,i])=>Math.max(0,o-i)),sr(0),ot()),0);return{alignToBottom:n,paddingTopAddition:r}},at(Wt,Fw),{singleton:!0});function av(e){return e?e==="smooth"?"smooth":"auto":!1}const Gj=(e,t)=>typeof e=="function"?av(e(t)):t&&av(e),Yj=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){Oe(o,{align:"end",behavior:y,index:"LAST"})}Ke(te(Rt(te(Ce(t),Ho(1)),a),Me(Ce(u),r,i,c),pe(([[y,g],v,m,b,S])=>{let T=g&&b,w="auto";return T&&(w=Gj(v,m||S),T=T&&!!w),{followOutputBehavior:w,shouldFollow:T,totalCount:y}}),Se(({shouldFollow:y})=>y)),({followOutputBehavior:y,totalCount:g})=>{p&&(p(),p=null),p=jn(e,()=>{Lt(l)("following output to ",{totalCount:g},tn.DEBUG),f(y),p=null})});function h(y){const g=jn(n,v=>{y&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Lt(l)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(g,100)}return Ke(te(Rt(Ce(u),t,s),Se(([y,,g])=>y&&g),An(({value:y},[,g])=>({refreshed:y===g,value:g}),{refreshed:!1,value:0}),Se(({refreshed:y})=>y),Me(u,t)),([,y])=>{Lt(i)&&h(y!==!1)}),Ke(d,()=>{h(Lt(u)!==!1)}),Ke(Rt(Ce(u),n),([y,g])=>{y&&!g.atBottom&&g.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},at(Vn,Ta,ba,wa,Sr,Tr,Wt)),Kj=We(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(xe(te(s,Me(i),Se(([,l])=>l!==0),Me(o,r,t,n,e),pe(([[,l],c,u,d,p,f=[]])=>Nw(l,c,u,d,p,f))),a),{}),at(Vn,wa,no,Sr),{singleton:!0}),Zj=We(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=se(0);return Ke(te(e,Me(r),Se(([,o])=>o!==0),pe(([,o])=>({top:o}))),o=>{jn(te(n,Ho(1),Se(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Oe(t,o)})})}),{initialScrollTop:r}},at(Sr,Wt,no),{singleton:!0}),Xj=({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,Qj=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(te(u,Me(t,l,n,i,o,r,s),Me(e),pe(([[d,p,f,h,y,g,v,m],b])=>{const{align:S,behavior:T,calculateViewLocation:w=Xj,done:C,...k}=d,I=_w(d,p,h-1),P=ta(I,p.offsetTree,b)+y+g,j=P+bn(p.sizeTree,I)[1],D=m+g,F=m+f-v,R=w({itemBottom:j,itemTop:P,locationParams:{align:S,behavior:T,...k},viewportBottom:F,viewportTop:D});return R?C&&jn(te(a,Se(O=>!O),Ho(Lt(a)?1:2)),C):C&&C(),R}),Se(d=>d!==null)),c),{scrollIntoView:u}},at(Vn,Wt,ba,no,Tr),{singleton:!0}),Lw=We(([{scrollVelocity:e}])=>{const t=se(!1),n=Ve(),r=se(!1);return xe(te(e,Me(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}),ot()),t),Ke(te(Rt(t,e,n),Me(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},at(Ta),{singleton:!0}),np=We(([{scrollContainerState:e,scrollTo:t}])=>{const n=Ve(),r=Ve(),o=Ve(),i=se(!1),a=se(void 0);return xe(te(Rt(n,r),pe(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),xe(te(t,Me(r),pe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},at(Wt)),Jj=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(te(c,Me(t,r,a,d,p,n)),([f,h,y,g,v,m,b])=>{const S=jj(h.sizeTree);g&&v!==null&&m!==null&&(y=v.scrollTop-m.offsetTop),y-=b,f({ranges:S,scrollTop:y})}),xe(te(u,Se(Gf),pe(eN)),o),xe(te(i,Me(u),Se(([,f])=>f!==void 0),ot(),pe(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},at(Vn,Wt,wa,Sr,np));function eN(e){return{align:"start",index:0,offset:e.scrollTop}}const tN=We(([{topItemsIndexes:e}])=>{const t=se(0);return xe(te(t,Se(n=>n>=0),pe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},at(no));function Vw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const nN=Vw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),rN=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(te(l,Me(a),An(([,v,m,b],[{bottom:S,items:T,offsetBottom:w,totalCount:C},k])=>{const I=S+w;let P=0;return m===C&&v.length>0&&T.length>0&&(T[0].originalIndex===0&&v[0].originalIndex===0||(P=I-b,P!==0&&(P+=k))),[P,T,C,I]},[0,[],0,0]),Se(([v])=>v!==0),Me(r,s,n,o,f,h),Se(([,v,m,b,,,S])=>!S&&!b&&v!==0&&m===na),pe(([[v],,,,,m])=>(m("Upward scrolling compensation",{amount:v},tn.DEBUG),v))));function g(v){v>0?(Oe(t,{behavior:"auto",top:-v}),Oe(e,0)):(Oe(e,0),Oe(t,{behavior:"auto",top:-v}))}return Ke(te(y,Me(e,i)),([v,m,b])=>{b&&nN()?Oe(e,m-v):g(-v)}),Ke(te(Rt(Vt(i,!1),e,h),Se(([v,m,b])=>!v&&!b&&m!==0),pe(([v,m])=>m),sr(1)),g),xe(te(d,pe(v=>({top:-v}))),t),Ke(te(c,Me(p,u),pe(([v,{groupIndices:m,lastSize:b,sizeTree:S},T])=>{function w(C){return C*(b+T)}if(m.length===0)return w(v);{let C=0;const k=Ji(S,0);let I=0,P=0;for(;I<v;){I++,C+=k;let j=m.length===P+1?1/0:m[P+1]-m[P]-1;I+j>v&&(C-=k,j=v-I+1),I+=j,C+=w(j),P++}return C}})),v=>{Oe(e,v),requestAnimationFrame(()=>{Oe(t,{top:v}),requestAnimationFrame(()=>{Oe(e,0),Oe(h,!1)})})}),{deviation:e}},at(Wt,Ta,no,Vn,Tr,Xf)),oN=We(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),at(tp,Kj,Sr,Lw,Fw,Zj,Uj,np,Qj,Tr)),zw=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,g,v,{listState:m,topItemsIndexes:b,...S},{scrollToIndex:T},w,{topItemCount:C},{groupCounts:k},I])=>(xe(S.rangeChanged,I.scrollSeekRangeChanged),xe(te(I.windowViewportRect,pe(P=>P.visibleHeight)),y.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:k,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:h,sizeRanges:s,topItemCount:C,topItemsIndexes:b,totalCount:u,...v,groupIndices:i,itemSize:a,listState:m,scrollToIndex:T,statefulTotalCount:c,trackItemSizes:d,...S,...I,...y,sizes:l,...g}),at(Vn,wa,Wt,Jj,Yj,no,ba,rN,tN,Mw,oN));function iN(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 $a=typeof document<"u"?E.useLayoutEffect:E.useEffect;function rp(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(g,v){g.propsReady&&Oe(g.propsReady,!1);for(const m of r){const b=g[t.required[m]];Oe(b,v[m])}for(const m of o)if(m in v){const b=g[t.optional[m]];Oe(b,v[m])}g.propsReady&&Oe(g.propsReady,!0)}function c(g){return i.reduce((v,m)=>(v[m]=b=>{const S=g[t.methods[m]];Oe(S,b)},v),{})}function u(g){return a.reduce((v,m)=>(v[m]=wj(g[t.events[m]]),v),{})}const d=E.forwardRef((g,v)=>{const{children:m,...b}=g,[S]=E.useState(()=>pl(Sj(e),C=>{l(C,b)})),[T]=E.useState(Zg(u,S));$a(()=>{for(const C of a)C in b&&Ke(T[C],b[C]);return()=>{Object.values(T).map(Yf)}},[b,T,S]),$a(()=>{l(S,b)}),E.useImperativeHandle(v,Kg(c(S)));const w=n;return x.jsx(s.Provider,{value:S,children:n?x.jsx(w,{...iN([...r,...o,...a],b),children:m}):m})}),p=g=>E.useCallback(ww(Oe,E.useContext(s)[g]),[g]),f=g=>{const v=E.useContext(s)[g],m=E.useCallback(b=>Ke(v,b),[v]);return E.useSyncExternalStore(m,()=>Lt(v),()=>Lt(v))},h=g=>{const v=E.useContext(s)[g],[m,b]=E.useState(Zg(Lt,v));return $a(()=>Ke(v,S=>{S!==m&&b(Kg(S))}),[v,m]),m},y=E.version.startsWith("18")?f:h;return{Component:d,useEmitter:(g,v)=>{const m=E.useContext(s)[g];$a(()=>Ke(m,v),[v,m])},useEmitterValue:y,usePublisher:p}}const gl=E.createContext(void 0),$w=E.createContext(void 0),Bw=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Kc(e){return"self"in e}function aN(e){return"body"in e}function Hw(e,t,n,r=di,o,i){const a=E.useRef(null),s=E.useRef(null),l=E.useRef(null),c=E.useCallback(p=>{let f,h,y;const g=p.target;if(aN(g)||Kc(g)){const m=Kc(g)?g:g.defaultView;y=i?m.scrollX:m.scrollY,f=i?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight,h=i?m.innerWidth:m.innerHeight}else y=i?g.scrollLeft:g.scrollTop,f=i?g.scrollWidth:g.scrollHeight,h=i?g.offsetWidth:g.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(y,0),viewportHeight:h})};p.suppressFlushSync?v():sa.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,g,v;Kc(f)?(g=Math.max(wn(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):(g=f[i?"scrollWidth":"scrollHeight"],y=wn(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const m=g-y;if(p.top=Math.ceil(Math.max(Math.min(m,p.top),0)),jw(y,g)||p.top===v){e({scrollHeight:g,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 Zc="-webkit-sticky",sv="sticky",Ww=Vw(()=>{if(typeof document>"u")return sv;const e=document.createElement("div");return e.style.position=Zc,e.style.position===Zc?Zc:sv});function op(e){return e}const sN=We(()=>{const e=se(l=>`Item ${l}`),t=se(null),n=se(l=>`Group ${l}`),r=se({}),o=se(op),i=se("div"),a=se(di),s=(l,c=null)=>Vt(te(r,pe(u=>u[l]),ot()),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")}}),lN=We(([e,t])=>({...e,...t}),at(zw,sN)),cN=({height:e})=>x.jsx("div",{style:{height:e}}),uN={overflowAnchor:"none",position:Ww(),zIndex:1},qw={overflowAnchor:"none"},dN={...qw,display:"inline-block",height:"100%"},lv=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:g}=Sw(n,p,d,e?di:s,f,h,o,y,Re("skipAnimationFrameInResizeObserver")),[v,m]=E.useState(0);sp("deviation",R=>{v!==R&&m(R)});const b=Re("EmptyPlaceholder"),S=Re("ScrollSeekPlaceholder")||cN,T=Re("ListComponent"),w=Re("ItemComponent"),C=Re("GroupComponent"),k=Re("computeItemKey"),I=Re("isSeeking"),P=Re("groupIndices").length>0,j=Re("alignToBottom"),D=Re("initialItemFinalLocationReached"),F=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},...D?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?x.jsx(b,{...it(b,c)}):x.jsx(T,{...it(T,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:g,style:F,children:(e?t.topItems:t.items).map(R=>{const O=R.originalIndex,N=k(O+t.firstItemIndex,R.data,c);return I?E.createElement(S,{...it(S,c),height:R.size,index:R.index,key:N,type:R.type||"item",...R.type==="group"?{}:{groupIndex:R.groupIndex}}):R.type==="group"?E.createElement(C,{...it(C,c),"data-index":O,"data-item-index":R.index,"data-known-size":R.size,key:N,style:uN},u(R.index,c)):E.createElement(w,{...it(w,c),...Uw(w,R.data),"data-index":O,"data-item-group-index":R.groupIndex,"data-item-index":R.index,"data-known-size":R.size,key:N,style:y?dN:qw},P?l(R.index,R.groupIndex,R.data,c):l(R.index,R.data,c))})})}),fN={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},pN={outline:"none",overflowX:"auto",position:"relative"},fi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),hN={position:Ww(),top:0,width:"100%",zIndex:1};function it(e,t){if(typeof e!="string")return{context:t}}function Uw(e,t){return{item:typeof e=="string"?void 0:t}}const mN=E.memo(function(){const e=Re("HeaderComponent"),t=sn("headerHeight"),n=Re("HeaderFooterTag"),r=Nn(E.useMemo(()=>i=>{t(wn(i,"height"))},[t]),!0,Re("skipAnimationFrameInResizeObserver")),o=Re("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...it(e,o)})}):null}),gN=E.memo(function(){const e=Re("FooterComponent"),t=sn("footerHeight"),n=Re("HeaderFooterTag"),r=Nn(E.useMemo(()=>i=>{t(wn(i,"height"))},[t]),!0,Re("skipAnimationFrameInResizeObserver")),o=Re("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...it(e,o)})}):null});function ip({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}=Hw(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?pN:fN,...o},tabIndex:0,...i,...it(s,u),children:r})})}function ap({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:g,scrollToCallback:v}=Hw(a,l,s,h,d);return Bw(()=>{var m;return g.current=d||((m=f.current)==null?void 0:m.ownerDocument.defaultView),()=>{g.current=null}},[g,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,...it(s,p),children:r})})}const vN=({children:e})=>{const t=E.useContext(gl),n=sn("viewportHeight"),r=sn("fixedItemHeight"),o=Re("alignToBottom"),i=Re("horizontalDirection"),a=E.useMemo(()=>Xi(n,l=>wn(l,i?"width":"height")),[n,i]),s=Nn(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:fi(o),children:e})},yN=({children:e})=>{const t=E.useContext(gl),n=sn("windowViewportRect"),r=sn("fixedItemHeight"),o=Re("customScrollParent"),i=Zf(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:fi(a),children:e})},xN=({children:e})=>{const t=Re("TopItemListComponent")||"div",n=Re("headerHeight"),r={...hN,marginTop:`${n}px`},o=Re("context");return x.jsx(t,{style:r,...it(t,o),children:e})},bN=E.memo(function(e){const t=Re("useWindowScroll"),n=Re("topItemsIndexes").length>0,r=Re("customScrollParent"),o=Re("context"),i=r||t?SN:TN,a=r||t?yN:vN;return x.jsxs(i,{...e,...it(i,o),children:[n&&x.jsx(xN,{children:x.jsx(lv,{showTopList:!0})}),x.jsxs(a,{children:[x.jsx(mN,{}),x.jsx(lv,{}),x.jsx(gN,{})]})]})}),{Component:wN,useEmitter:sp,useEmitterValue:Re,usePublisher:sn}=rp(lN,{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:{}},bN),TN=ip({useEmitter:sp,useEmitterValue:Re,usePublisher:sn}),SN=ap({useEmitter:sp,useEmitterValue:Re,usePublisher:sn}),lp=wN,EN=We(()=>{const e=se(l=>x.jsxs("td",{children:["Item $",l]})),t=se(null),n=se(null),r=se(null),o=se({}),i=se(op),a=se(di),s=(l,c=null)=>Vt(te(o,pe(u=>u[l]),ot()),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")}}),CN=We(([e,t])=>({...e,...t}),at(zw,EN)),kN=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{height:e}})}),RN=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{border:0,height:e,padding:0}})}),PN={overflowAnchor:"none"},cv=E.memo(function({showTopList:e=!1}){const t=_e("listState"),n=_e("computeItemKey"),r=_e("firstItemIndex"),o=_e("isSeeking"),i=_e("ScrollSeekPlaceholder")||kN,a=_e("context"),s=_e("TableRowComponent"),l=_e("fixedHeaderHeight"),c=_e("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,{...it(i,a),height:p.size,index:p.index,key:h,type:p.type||"item"}):E.createElement(s,{...it(s,a),...Uw(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}:PN},c(p.index,p.data,a))});return x.jsx(x.Fragment,{children:d})}),AN=E.memo(function(){const e=_e("listState"),t=_e("topItemsIndexes").length>0,n=yn("sizeRanges"),r=_e("useWindowScroll"),o=_e("customScrollParent"),i=yn("windowScrollContainerState"),a=yn("scrollContainerState"),s=o||r?i:a,l=_e("trackItemSizes"),c=_e("itemSize"),u=_e("log"),{callbackRef:d,ref:p}=Sw(n,c,l,s,u,void 0,o,!1,_e("skipAnimationFrameInResizeObserver")),[f,h]=E.useState(0);cp("deviation",P=>{f!==P&&(p.current.style.marginTop=`${P}px`,h(P))});const y=_e("EmptyPlaceholder"),g=_e("FillerRow")||RN,v=_e("TableBodyComponent"),m=_e("paddingTopAddition"),b=_e("statefulTotalCount"),S=_e("context");if(b===0&&y)return x.jsx(y,{...it(y,S)});const T=(t?e.topItems:[]).reduce((P,j)=>P+j.size,0),w=e.offsetTop+m+f-T,C=e.offsetBottom,k=w>0?x.jsx(g,{context:S,height:w},"padding-top"):null,I=C>0?x.jsx(g,{context:S,height:C},"padding-bottom"):null;return x.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...it(v,S),children:[k,t&&x.jsx(cv,{showTopList:!0}),x.jsx(cv,{}),I]})}),IN=({children:e})=>{const t=E.useContext(gl),n=yn("viewportHeight"),r=yn("fixedItemHeight"),o=Nn(E.useMemo(()=>Xi(n,i=>wn(i,"height")),[n]),!0,_e("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:o,style:fi(!1),children:e})},ON=({children:e})=>{const t=E.useContext(gl),n=yn("windowViewportRect"),r=yn("fixedItemHeight"),o=_e("customScrollParent"),i=Zf(n,o,_e("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:fi(!1),children:e})},_N=E.memo(function(e){const t=_e("useWindowScroll"),n=_e("customScrollParent"),r=yn("fixedHeaderHeight"),o=yn("fixedFooterHeight"),i=_e("fixedHeaderContent"),a=_e("fixedFooterContent"),s=_e("context"),l=Nn(E.useMemo(()=>Xi(r,v=>wn(v,"height")),[r]),!0,_e("skipAnimationFrameInResizeObserver")),c=Nn(E.useMemo(()=>Xi(o,v=>wn(v,"height")),[o]),!0,_e("skipAnimationFrameInResizeObserver")),u=n||t?jN:DN,d=n||t?ON:IN,p=_e("TableComponent"),f=_e("TableHeadComponent"),h=_e("TableFooterComponent"),y=i?x.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...it(f,s),children:i()},"TableHead"):null,g=a?x.jsx(h,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...it(h,s),children:a()},"TableFoot"):null;return x.jsx(u,{...e,...it(u,s),children:x.jsx(d,{children:x.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...it(p,s),children:[y,x.jsx(AN,{},"TableBody"),g]})})})}),{Component:MN,useEmitter:cp,useEmitterValue:_e,usePublisher:yn}=rp(CN,{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:{}},_N),DN=ip({useEmitter:cp,useEmitterValue:_e,usePublisher:yn}),jN=ap({useEmitter:cp,useEmitterValue:_e,usePublisher:yn}),NN=MN,uv={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},FN={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:dv,floor:Rs,max:ji,min:Xc,round:fv}=Math;function pv(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function LN(e){return{...FN,items:e}}function Ba(e,t){return e&&e.width===t.width&&e.height===t.height}function VN(e,t){return e&&e.column===t.column&&e.row===t.row}const zN=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:g,useWindowScroll:v,windowScrollContainerState:m,windowScrollTo:b,windowViewportRect:S},T])=>{const w=se(0),C=se(0),k=se(uv),I=se({height:0,width:0}),P=se({height:0,width:0}),j=Ve(),D=Ve(),F=se(0),R=se(null),O=se({column:0,row:0}),N=Ve(),L=Ve(),M=se(!1),q=se(0),_=se(!0),z=se(!1),Q=se(!1);Ke(te(h,Me(q),Se(([V,H])=>!!H)),()=>{Oe(_,!1)}),Ke(te(Rt(h,_,P,I,q,z),Se(([V,H,X,re,,$])=>V&&!H&&X.height!==0&&re.height!==0&&!$)),([,,,,V])=>{Oe(z,!0),Jf(1,()=>{Oe(j,V)}),jn(te(c),()=>{Oe(t,[0,0]),Oe(_,!0)})}),xe(te(L,Se(V=>V!=null&&V.scrollTop>0),En(0)),C),Ke(te(h,Me(L),Se(([,V])=>V!=null)),([,V])=>{V&&(Oe(I,V.viewport),Oe(P,V.item),Oe(O,V.gap),V.scrollTop>0&&(Oe(M,!0),jn(te(c,Ho(1)),H=>{Oe(M,!1)}),Oe(l,{top:V.scrollTop})))}),xe(te(I,pe(({height:V})=>V)),d),xe(te(Rt(Ce(I,Ba),Ce(P,Ba),Ce(O,(V,H)=>V&&V.column===H.column&&V.row===H.row),Ce(c)),pe(([V,H,X,re])=>({gap:X,item:H,scrollTop:re,viewport:V}))),N),xe(te(Rt(Ce(w),r,Ce(O,VN),Ce(P,Ba),Ce(I,Ba),Ce(R),Ce(C),Ce(M),Ce(_),Ce(q)),Se(([,,,,,,,V])=>!V),pe(([V,[H,X],re,$,ye,ke,Ae,,Te,K])=>{const{column:ae,row:G}=re,{height:ee,width:ge}=$,{width:ue}=ye;if(Ae===0&&(V===0||ue===0))return uv;if(ge===0){const dn=ep(K,V),Tn=dn+Math.max(Ae-1,0);return LN(pv(dn,Tn,ke))}const Fe=Gw(ue,ge,ae);let oe,le;Te?H===0&&X===0&&Ae>0?(oe=0,le=Ae-1):(oe=Fe*Rs((H+G)/(ee+G)),le=Fe*dv((X+G)/(ee+G))-1,le=Xc(V-1,ji(le,Fe-1)),oe=Xc(le,ji(0,oe))):(oe=0,le=-1);const Le=pv(oe,le,ke),{bottom:Ge,top:xt}=hv(ye,re,$,Le),lt=dv(V/Fe),_t=lt*ee+(lt-1)*G-Ge;return{bottom:Ge,itemHeight:ee,items:Le,itemWidth:ge,offsetBottom:_t,offsetTop:xt,top:xt}})),k),xe(te(R,Se(V=>V!==null),pe(V=>V.length)),w),xe(te(Rt(I,P,k,O),Se(([V,H,{items:X}])=>X.length>0&&H.height!==0&&V.height!==0),pe(([V,H,{items:X},re])=>{const{bottom:$,top:ye}=hv(V,re,H,X);return[ye,$]}),ot(ea)),t);const ie=se(!1);xe(te(c,Me(ie),pe(([V,H])=>H||V!==0)),ie);const J=en(te(Rt(k,w),Se(([{items:V}])=>V.length>0),Me(ie),Se(([[V,H],X])=>{const re=V.items[V.items.length-1].index===H-1;return(X||V.bottom>0&&V.itemHeight>0&&V.offsetBottom===0&&V.items.length===H)&&re}),pe(([[,V]])=>V-1),ot())),Y=en(te(Ce(k),Se(({items:V})=>V.length>0&&V[0].index===0),En(0),ot())),U=en(te(Ce(k),Me(M),Se(([{items:V},H])=>V.length>0&&!H),pe(([{items:V}])=>({endIndex:V[V.length-1].index,startIndex:V[0].index})),ot(Aw),sr(0)));xe(U,f.scrollSeekRangeChanged),xe(te(j,Me(I,P,w,O),pe(([V,H,X,re,$])=>{const ye=Dw(V),{align:ke,behavior:Ae,offset:Te}=ye;let K=ye.index;K==="LAST"&&(K=re-1),K=ji(0,K,Xc(re-1,K));let ae=cd(H,$,X,K);return ke==="end"?ae=fv(ae-H.height+X.height):ke==="center"&&(ae=fv(ae-H.height/2+X.height/2)),Te&&(ae+=Te),{behavior:Ae,top:ae}})),l);const Z=Vt(te(k,pe(V=>V.offsetBottom+V.bottom)),0);return xe(te(S,pe(V=>({height:V.visibleHeight,width:V.visibleWidth}))),I),{customScrollParent:g,data:R,deviation:F,footerHeight:o,gap:O,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:P,overscan:n,restoreStateFrom:L,scrollBy:a,scrollContainerState:s,scrollHeight:D,scrollTo:l,scrollToIndex:j,scrollTop:c,smoothScrollTargetReached:u,totalCount:w,useWindowScroll:v,viewportDimensions:I,windowScrollContainerState:m,windowScrollTo:b,windowViewportRect:S,...f,gridState:k,horizontalDirection:Q,initialTopMostItemIndex:q,totalListHeight:Z,...p,endReached:J,propsReady:y,rangeChanged:U,startReached:Y,stateChanged:N,stateRestoreInProgress:M,...T}},at(tp,Wt,Ta,Lw,Sr,np,Tr));function Gw(e,t,n){return ji(1,Rs((e+n)/(Rs(t)+n)))}function hv(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=cd(e,t,n,r[0].index);return{bottom:cd(e,t,n,r[r.length-1].index)+o,top:i}}function cd(e,t,n,r){const o=Gw(e.width,n.width,t.column),i=Rs(r/o),a=i*n.height+ji(0,i-1)*t.row;return a>0?a+t.row:a}const $N=We(()=>{const e=se(d=>`Item ${d}`),t=se({}),n=se(null),r=se("virtuoso-grid-item"),o=se("virtuoso-grid-list"),i=se(op),a=se("div"),s=se(di),l=(d,p=null)=>Vt(te(t,pe(f=>f[d]),ot()),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")}}),BN=We(([e,t])=>({...e,...t}),at(zN,$N)),HN=E.memo(function(){const e=st("gridState"),t=st("listClassName"),n=st("itemClassName"),r=st("itemContent"),o=st("computeItemKey"),i=st("isSeeking"),a=ln("scrollHeight"),s=st("ItemComponent"),l=st("ListComponent"),c=st("ScrollSeekPlaceholder"),u=st("context"),d=ln("itemDimensions"),p=ln("gap"),f=st("log"),h=st("stateRestoreInProgress"),y=ln("reportReadyState"),g=Nn(E.useMemo(()=>v=>{const m=v.parentElement.parentElement.scrollHeight;a(m);const b=v.firstChild;if(b){const{height:S,width:T}=b.getBoundingClientRect();d({height:S,width:T})}p({column:mv("column-gap",getComputedStyle(v).columnGap,f),row:mv("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return Bw(()=>{e.itemHeight>0&&e.itemWidth>0&&y(!0)},[e]),h?null:x.jsx(l,{className:t,ref:g,...it(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const m=o(v.index,v.data,u);return i?x.jsx(c,{...it(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},m):E.createElement(s,{...it(s,u),className:n,"data-index":v.index,key:m},r(v.index,v.data,u))})})}),WN=E.memo(function(){const e=st("HeaderComponent"),t=ln("headerHeight"),n=st("headerFooterTag"),r=Nn(E.useMemo(()=>i=>{t(wn(i,"height"))},[t]),!0,!1),o=st("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...it(e,o)})}):null}),qN=E.memo(function(){const e=st("FooterComponent"),t=ln("footerHeight"),n=st("headerFooterTag"),r=Nn(E.useMemo(()=>i=>{t(wn(i,"height"))},[t]),!0,!1),o=st("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...it(e,o)})}):null}),UN=({children:e})=>{const t=E.useContext($w),n=ln("itemDimensions"),r=ln("viewportDimensions"),o=Nn(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:fi(!1),children:e})},GN=({children:e})=>{const t=E.useContext($w),n=ln("windowViewportRect"),r=ln("itemDimensions"),o=st("customScrollParent"),i=Zf(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:fi(!1),children:e})},YN=E.memo(function({...e}){const t=st("useWindowScroll"),n=st("customScrollParent"),r=n||t?ZN:KN,o=n||t?GN:UN,i=st("context");return x.jsx(r,{...e,...it(r,i),children:x.jsxs(o,{children:[x.jsx(WN,{}),x.jsx(HN,{}),x.jsx(qN,{})]})})}),{useEmitter:Yw,useEmitterValue:st,usePublisher:ln}=rp(BN,{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"}},YN),KN=ip({useEmitter:Yw,useEmitterValue:st,usePublisher:ln}),ZN=ap({useEmitter:Yw,useEmitterValue:st,usePublisher:ln});function mv(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 XN=()=>{const e=E.useContext(ha);return e?e.tweaks:kf},Kw=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>x.jsxs("div",{className:Be("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(xw,{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(Pb,{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(kb,{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(VP,{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]}),Sa=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:g,hideLeft:v=!1,required:m,disabled:b,reportStatus:S},T)=>{const w=XN(),C=S!==void 0?S:w.input.iconFeedback,k=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:Be("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[x.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:[x.jsx(Kw,{info:s,hideLeft:v,reportStatus:C,title:h,placeholder:g,children:P||n?x.jsxs(E.Fragment,{children:[m?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})]})}),QN=e=>x.jsx(E.Fragment,{children:e.children}),JN={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},eF={caseSensitive:!1,sort:!1},tF=[],nF=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(gr,{children:t.children})})}),rF=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"})}),oF={List:nF,Item:rF},fo=320,Qc=40,iF=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 g=E.useRef(null),v=E.useRef(null),m=h.value??h.defaultValue??"",b=Ot(),[S,T]=E.useState(()=>Math.min(fo,Qc*e.length)),[w,C]=E.useState(!1),[k,I]=E.useState(""),[P,j]=E.useState(m),[D,F]=E.useState(()=>{var K;return((K=e.find(ae=>ae.value===m))==null?void 0:K.label)??m}),[R,O]=E.useState(null),N=E.useRef(tF),L=t&&k!==""?[{value:k,label:k,"data-dynamic":"true"},...e]:e,M=new Fr(L,["value","label"],eF).search(k),q=()=>{C(!1),T(0)},_=M.filter(K=>K.hidden!==!0),z=t?void 0:`^(${e.map(K=>`${Tu(K.value)}${K.label?"|"+Tu(K.label):""}`).join("|")})$`;E.useEffect(()=>{if(h.value){const K=e.find(ae=>ae.value===h.value);j((K==null?void 0:K.label)??h.value)}},[h.value]),E.useEffect(()=>{w||T(0)},[w]),E.useEffect(()=>{if(!w)return;const K=Y.floating;if(K.current===null)return;let ae=0;Array.from(K.current.querySelectorAll("li")).slice(0,Math.min(M.length,10)).forEach(ge=>{const ue=ge.getBoundingClientRect();ae+=ue.height});const ee=Math.min(ae,fo);T(ee)},[k,w]);const{x:Q,y:ie,strategy:J,refs:Y,context:U}=Jr({open:w,transform:!0,strategy:"absolute",onOpenChange:C,whileElementsMounted:ga,middleware:[va(4),J0({padding:10,elementContext:"reference",apply(K){var ue;const ae=(ue=g.current)==null?void 0:ue.getBoundingClientRect().width,G=K.elements.floating.querySelector("ul"),ee=(G==null?void 0:G.getBoundingClientRect().height)||0,ge=Math.min(ee<Qc?fo:ee,fo);sa.flushSync(()=>setTimeout(()=>{const Fe=(G==null?void 0:G.getBoundingClientRect().height)??0;return Fe<Qc?void T(ge):void T(Math.min(Fe,fo))},50)),Object.assign(K.elements.floating.style,{width:`${ae}px`,maxWidth:`${ae}px`,maxHeight:`${fo}`})}})]}),Z=mw(U,JN),{getReferenceProps:V,getFloatingProps:H,getItemProps:X}=eo([to(U,{role:"listbox"}),Qr(U),Uf(U,{cols:0,listRef:N,loop:!0,virtual:!0,allowEscape:!0,activeIndex:R,selectedIndex:R,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:K=>O(ae=>K??ae)})]);E.useEffect(()=>{const K=Y.reference.current;if(K)return la(K)},[]);const re=(K,ae)=>{j(K.value);const G=Y.reference.current;if(!G)return;G==null||G.setAttribute("data-value",K.value),G.value=K.value;const ee=new Event("change",{bubbles:!1,cancelable:!0});G.dispatchEvent(ee),h.onChange&&h.onChange(ee),F(K.label??""),q(),I(""),O(ae)},$=K=>{var G;const ae=K.target.value;return I(ae),!w&&ae===""?C(!0):(K.target.name=h.name||"",ae?C(!0):(G=h.onChange)==null?void 0:G.call(h,K))},ye=()=>{var K;C(!0),I(""),(K=Y.reference.current)==null||K.focus()},ke=()=>{C(!0),I("")},Ae=()=>{var K;(K=Y.reference.current)==null||K.setAttribute("data-value",""),I(""),j(""),F(""),Od(Y.reference.current),q()},Te=h.id||h.name;return x.jsxs(Sa,{...h,left:d,error:p,ref:g,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(mf,{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",...V({...h,onChange:$,onFocus:ke,pattern:z,ref:Y.setReference,name:`${Te}-shadow`,id:`${Te}-shadow`,onClick:K=>K.currentTarget.focus(),onKeyDown(K){var ae,G;if(K.key==="ArrowDown"){let ee=R+1;return ee>M.length-1&&(ee=0),(ae=v.current)==null||ae.scrollIntoView({index:ee}),O(ee)}if(K.key==="ArrowUp"){let ee=R-1;return ee<0&&(ee=M.length-1),(G=v.current)==null||G.scrollIntoView({index:ee}),O(ee)}if(K.key==="Escape")return K.currentTarget.blur(),q();if(K.key==="Enter"){if(R!==null&&M[R])return K.preventDefault(),re(M[R],R);if(M.length===1)return K.preventDefault(),re(M[0],0)}}}),"data-value":P,"data-error":!!p,"data-name":Te,"data-target":Te,required:f,value:w?k:D||P,"aria-autocomplete":"list",autoComplete:"off",className:Be("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:Te,name:Te,type:"hidden","data-origin":Te,ref:y,required:f,defaultValue:h.value||P||void 0}),x.jsx(Xr,{preserveTabOrder:!0,children:w?x.jsx(li,{guards:!0,returnFocus:!1,context:U,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("ul",{...H({ref:Y.setFloating,style:{...Z.styles,position:J,left:(Q??0)+(P?36:25),top:ie??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:[M.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(lp,{ref:v,data:_,components:oF,hidden:_.length===0,className:"rounded-lg border-floating-border bg-floating-background p-0 text-foreground",style:{height:S},itemContent:(K,ae)=>{const G=ae.Render??QN,ee=P===ae.value||P===ae.label,ge=R===K,ue=ae.label??ae.value;return x.jsx("button",{"data-value":ae.value,...X({ref:Fe=>void(N.current[K]=Fe),role:"option",type:"button","aria-checked":ee,"aria-current":ee,"aria-selected":ee,"aria-busy":ae.disabled,onClick:()=>re(ae,K),className:`cursor-pointer w-full p-2 text-left ${ee?"bg-primary-hover text-primary-foreground":""} ${ge?"bg-floating-hover text-floating-foreground":""}`}),children:x.jsx(G,{...h,label:ae.label,value:ae.value,children:ue})})}})]})}):null})]})});class So extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof So&&(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 So(this)}}const up=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:Be("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:Be("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:Be("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),aF=e=>x.jsx(E.Fragment,{children:e.children}),sF={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},lF={caseSensitive:!1,sort:!1},gv=[],cF=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(gr,{children:t.children})})}),uF=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(vt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),dF={List:cF,Item:uF},fF=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(Dd,{size:"small","data-multicounter":"true",children:[r," ",t.multiComboboxSelectedLabel]}):e.children})},pF=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,...y},g)=>{const v=E.useMemo(()=>new So(r.map(G=>[G.value,G])),[r]),m=E.useRef(null),b=E.useRef(null),S=y.value??y.defaultValue??gv,T=Ot(),[w,C]=E.useState(0),[k,I]=E.useState(!1),[P,j]=E.useState(""),[D,F]=E.useState(()=>{const G=new So;return S.forEach(ee=>{const ge=v.get(ee);return ge?G.set(ee,ge):void 0}),G}),R=E.useMemo(()=>Array.from(D.keys()),[D]),[O,N]=E.useState(()=>{const G=new Set(S);return r.reduce((ee,ge)=>G.has(ge.value)?[...ee,ge.label??ge.value]:ee,[])??S}),[L,M]=E.useState(null),q=E.useRef(gv),_=h&&P!==""?[{value:P,label:P,"data-dynamic":"true"},...r]:r,z=new Fr(_,["value","label"],lF).search(P);E.useEffect(()=>{k||C(0)},[k]),E.useEffect(()=>{y.value&&F(new So(y.value.map(G=>[G,v.get(G)])))},[y.value,v]);const{x:Q,y:ie,strategy:J,refs:Y,context:U}=Jr({open:k,transform:!0,strategy:"absolute",onOpenChange:I,whileElementsMounted:ga,middleware:[va(4),J0({padding:10,elementContext:"reference",apply(G){var ue;const ee=(ue=m.current)==null?void 0:ue.getBoundingClientRect().width,ge=360;sa.flushSync(()=>setTimeout(()=>C(ge),200)),Object.assign(G.elements.floating.style,{width:`${ee}px`,maxWidth:`${ee}px`,maxHeight:`${ge}px`,height:`${ge}px`})}})]}),Z=mw(U,sF),{getReferenceProps:V,getFloatingProps:H,getItemProps:X}=eo([to(U,{role:"listbox"}),Qr(U),Uf(U,{cols:0,listRef:q,loop:!0,virtual:!0,allowEscape:!0,activeIndex:L,selectedIndex:L,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:G=>M(ee=>G??ee)})]);E.useEffect(()=>{const G=Y.reference.current;if(G)return la(G)},[]);const re=(G,ee)=>{const ge=D.clone();ge.has(G.value)?ge.delete(G.value):ge.set(G.value,G),F(ge);const ue=Y.reference.current;if(!ue)return;ue==null||ue.setAttribute("data-value",G.value),ue.value=Array.from(ge.values());const Fe=new Event("change",{bubbles:!1,cancelable:!0});ue.dispatchEvent(Fe),y.onChange&&y.onChange(Fe),N(oe=>oe.concat(G.label??"")),j(""),M(ee)},$=G=>{const ee=G.target.value;return j(ee),!k&&ee===""?I(!0):(G.target.name=y.name||"",ee?I(!0):void 0)},ye=()=>{var G;I(!0),j(""),(G=Y.reference.current)==null||G.focus()},ke=()=>{I(!0),j("")},Ae=()=>{var G;(G=Y.reference.current)==null||G.setAttribute("data-value",""),j(""),Od(Y.reference.current),I(!1)},Te=y.id||y.name,K=D.map(G=>x.jsx(Dd,{size:"small",children:G.label??G.value},`multicombobox-${G.value}-x`)),ae=z.filter(G=>G.hidden!==!0);return x.jsxs(Sa,{...y,left:e,error:t,ref:m,form:y.form,name:y.name,feedback:d,hideLeft:p,required:f,title:y.title,container:o,rightLabel:i,interactive:a,id:y.name||y.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:y.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:ye,children:[x.jsx(mf,{size:20}),x.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),D?x.jsx("button",{type:"button",onClick:Ae,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",{...V({...y,onFocus:ke,id:`${Te}-shadow`,name:`${Te}-shadow`,ref:Y.setReference}),type:"button","data-name":Te,"data-target":Te,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":R.join(","),value:k?P:O||D,className:Be("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",y.className),children:x.jsx(fF,{label:c,children:K})}),x.jsx("input",{id:Te,name:Te,type:"hidden","data-origin":Te,ref:g,required:f,defaultValue:y.value||R||void 0}),x.jsx(Xr,{preserveTabOrder:!0,children:k?x.jsx(li,{guards:!0,returnFocus:!1,context:U,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("div",{...H({ref:Y.setFloating,style:{...Z.styles,position:J,left:(Q??0)+(D?26:18),top:ie??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:P,onChange:$,title:y.title,placeholder:T.multiComboboxInnerPlaceholder,onKeyDown:G=>{var ee,ge;if(G.key==="ArrowDown"){let ue=L+1;return ue>z.length-1&&(ue=0),(ee=b.current)==null||ee.scrollIntoView({index:ue}),M(ue)}if(G.key==="ArrowUp"){let ue=L-1;return ue<0&&(ue=z.length-1),(ge=b.current)==null||ge.scrollIntoView({index:ue}),M(ue)}if(G.key==="Escape")return G.currentTarget.blur(),I(!1);if(G.key==="Enter"){if(L!==null&&z[L])return G.preventDefault(),re(z[L],L);if(z.length===1)return G.preventDefault(),re(z[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"}),z.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||T.autocompleteEmpty})}):null,x.jsx(lp,{ref:b,data:ae,components:dF,hidden:ae.length===0,style:{height:D.size===0?w-49:w-86},className:"border-floating-border bg-floating-background p-0 text-foreground",itemContent:(G,ee)=>{const ge=ee.Render??aF,ue=D.has(ee.value)||D.has(ee.label??""),Fe=L===G,oe=ee.label??ee.value;return x.jsx("button",{"data-value":ee.value,...X({ref:le=>void(q.current[G]=le),role:"option",type:"button","aria-checked":ue,"aria-current":ue,"aria-selected":ue,"aria-busy":ee.disabled,onClick:()=>re(ee,G)}),className:`w-full cursor-pointer p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${ue||Fe?"bg-floating-hover text-floating-foreground":""}`,children:x.jsx(up,{onChange:Md,checked:ue,"aria-checked":ue,onClick:le=>(le.stopPropagation(),void le.preventDefault()),children:x.jsx(ge,{...y,label:ee.label,value:ee.value,children:oe})})})}}),D.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:K})]})}):null})]})}),Zw=(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:g=null,hideLeft:v=!1,...m},b)=>{const S=e,T=m.id??m.name,w=E.useRef(null);return E.useEffect(()=>{if(w.current===null)return;const C=w.current,k=la(w.current),I=r==null?void 0:r(C),P=j=>{const D=j;if(D.key==="Enter"&&C.enterKeyHint==="next"){const F=C.getAttribute("data-next");if(F){const R=document.getElementById(F);if(R)return R.focus(),void D.preventDefault()}}};return C.addEventListener("keydown",P),()=>{I==null||I(),k(),C.removeEventListener("keydown",P)}},[]),x.jsx(Sa,{...n,info:i,left:a,error:l,right:c,form:m.form,name:m.name,feedback:g,hideLeft:v,title:m.title,container:u,rightLabel:d,disabled:m.disabled,interactive:p,required:m.required,componentName:t,id:m.name||m.id,optionalText:f,labelClassName:y,placeholder:m.placeholder,children:x.jsx(S,{...n,...m,id:T,name:T,type:h,"data-next":s,"aria-busy":m.disabled,"aria-disabled":m.disabled,"aria-readonly":m.readOnly,ref:Id(b,w),className:Be("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",m.className)})})}),Ea=Zw(Qb,"input",{type:"text"}),vv=new Date(1970,11,31),Jc={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},hF={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")},eu=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},mF=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=Rf(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=eu(u,vv).flatMap(C=>ht.keyof(Jc,C.type)?Jc[C.type](C.value):[]),g=eu(u,vv).reduce((C,k)=>C+(ht.keyof(yv,k.type)?yv[k.type](k.value):""),""),[v,m]=E.useState(d?eu(u,d).reduce((C,k)=>C+(ht.keyof(Jc,k.type)?hF[k.type](d,k.value):""),""):""),b=C=>{const k=C.target.value;if(m(k),y.length===k.length&&y.every((P,j)=>{const D=k.charAt(j);return typeof P=="string"?D===P:P.test(D)})){const P=jo(dO(k,g,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),m(C?dI(C,g):"")),T=Db(d),w=T?d.toISOString():void 0;return x.jsx(Ea,{...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??g,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(ci,{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(_P,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(l0,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:T?d:void 0})})]})})}),gF=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],vF=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],yF=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],xF=["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?xF:yF:t.binary?vF:gF,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 Ha={exports:{}},Wa={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 bF(){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,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,m=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===g||T.$$typeof===v||T.$$typeof===m||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 wF(){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,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,m=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===g||$.$$typeof===v||$.$$typeof===m||$.$$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,k=a,I=t,P=u,j=r,D=h,F=f,R=n,O=i,N=o,L=d,M=!1;function q($){return M||(M=!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.")),_($)||S($)===l}function _($){return S($)===c}function z($){return S($)===s}function Q($){return S($)===a}function ie($){return typeof $=="object"&&$!==null&&$.$$typeof===t}function J($){return S($)===u}function Y($){return S($)===r}function U($){return S($)===h}function Z($){return S($)===f}function V($){return S($)===n}function H($){return S($)===i}function X($){return S($)===o}function re($){return S($)===d}Ue.AsyncMode=T,Ue.ConcurrentMode=w,Ue.ContextConsumer=C,Ue.ContextProvider=k,Ue.Element=I,Ue.ForwardRef=P,Ue.Fragment=j,Ue.Lazy=D,Ue.Memo=F,Ue.Portal=R,Ue.Profiler=O,Ue.StrictMode=N,Ue.Suspense=L,Ue.isAsyncMode=q,Ue.isConcurrentMode=_,Ue.isContextConsumer=z,Ue.isContextProvider=Q,Ue.isElement=ie,Ue.isForwardRef=J,Ue.isFragment=Y,Ue.isLazy=U,Ue.isMemo=Z,Ue.isPortal=V,Ue.isProfiler=H,Ue.isStrictMode=X,Ue.isSuspense=re,Ue.isValidElementType=b,Ue.typeOf=S}()),Ue}var Sv;function Xw(){return Sv||(Sv=1,process.env.NODE_ENV==="production"?Wa.exports=bF():Wa.exports=wF()),Wa.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 tu,Ev;function TF(){if(Ev)return tu;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 tu=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},tu}var nu,Cv;function dp(){if(Cv)return nu;Cv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return nu=e,nu}var ru,kv;function Qw(){return kv||(kv=1,ru=Function.call.bind(Object.prototype.hasOwnProperty)),ru}var ou,Rv;function SF(){if(Rv)return ou;Rv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=dp(),n={},r=Qw();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={})},ou=o,ou}var iu,Pv;function EF(){if(Pv)return iu;Pv=1;var e=Xw(),t=TF(),n=dp(),r=Qw(),o=SF(),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 iu=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(_){var z=_&&(c&&_[c]||_[u]);if(typeof z=="function")return z}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:m(),arrayOf:b,element:S(),elementType:T(),instanceOf:w,node:P(),objectOf:k,oneOf:C,oneOfType:I,shape:D,exact:F};function h(_,z){return _===z?_!==0||1/_===1/z:_!==_&&z!==z}function y(_,z){this.message=_,this.data=z&&typeof z=="object"?z:{},this.stack=""}y.prototype=Error.prototype;function g(_){if(process.env.NODE_ENV!=="production")var z={},Q=0;function ie(Y,U,Z,V,H,X,re){if(V=V||p,X=X||Z,re!==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=V+":"+Z;!z[ye]&&Q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+V+"`. 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."),z[ye]=!0,Q++)}}return U[Z]==null?Y?U[Z]===null?new y("The "+H+" `"+X+"` is marked as required "+("in `"+V+"`, but its value is `null`.")):new y("The "+H+" `"+X+"` is marked as required in "+("`"+V+"`, but its value is `undefined`.")):null:_(U,Z,V,H,X)}var J=ie.bind(null,!1);return J.isRequired=ie.bind(null,!0),J}function v(_){function z(Q,ie,J,Y,U,Z){var V=Q[ie],H=N(V);if(H!==_){var X=L(V);return new y("Invalid "+Y+" `"+U+"` of type "+("`"+X+"` supplied to `"+J+"`, expected ")+("`"+_+"`."),{expectedType:_})}return null}return g(z)}function m(){return g(a)}function b(_){function z(Q,ie,J,Y,U){if(typeof _!="function")return new y("Property `"+U+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var Z=Q[ie];if(!Array.isArray(Z)){var V=N(Z);return new y("Invalid "+Y+" `"+U+"` of type "+("`"+V+"` supplied to `"+J+"`, expected an array."))}for(var H=0;H<Z.length;H++){var X=_(Z,H,J,Y,U+"["+H+"]",n);if(X instanceof Error)return X}return null}return g(z)}function S(){function _(z,Q,ie,J,Y){var U=z[Q];if(!s(U)){var Z=N(U);return new y("Invalid "+J+" `"+Y+"` of type "+("`"+Z+"` supplied to `"+ie+"`, expected a single ReactElement."))}return null}return g(_)}function T(){function _(z,Q,ie,J,Y){var U=z[Q];if(!e.isValidElementType(U)){var Z=N(U);return new y("Invalid "+J+" `"+Y+"` of type "+("`"+Z+"` supplied to `"+ie+"`, expected a single ReactElement type."))}return null}return g(_)}function w(_){function z(Q,ie,J,Y,U){if(!(Q[ie]instanceof _)){var Z=_.name||p,V=q(Q[ie]);return new y("Invalid "+Y+" `"+U+"` of type "+("`"+V+"` supplied to `"+J+"`, expected ")+("instance of `"+Z+"`."))}return null}return g(z)}function C(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function z(Q,ie,J,Y,U){for(var Z=Q[ie],V=0;V<_.length;V++)if(h(Z,_[V]))return null;var H=JSON.stringify(_,function(re,$){var ye=L($);return ye==="symbol"?String($):$});return new y("Invalid "+Y+" `"+U+"` of value `"+String(Z)+"` "+("supplied to `"+J+"`, expected one of "+H+"."))}return g(z)}function k(_){function z(Q,ie,J,Y,U){if(typeof _!="function")return new y("Property `"+U+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var Z=Q[ie],V=N(Z);if(V!=="object")return new y("Invalid "+Y+" `"+U+"` of type "+("`"+V+"` supplied to `"+J+"`, expected an object."));for(var H in Z)if(r(Z,H)){var X=_(Z,H,J,Y,U+"."+H,n);if(X instanceof Error)return X}return null}return g(z)}function I(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var z=0;z<_.length;z++){var Q=_[z];if(typeof Q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+M(Q)+" at index "+z+"."),a}function ie(J,Y,U,Z,V){for(var H=[],X=0;X<_.length;X++){var re=_[X],$=re(J,Y,U,Z,V,n);if($==null)return null;$.data&&r($.data,"expectedType")&&H.push($.data.expectedType)}var ye=H.length>0?", expected one of type ["+H.join(", ")+"]":"";return new y("Invalid "+Z+" `"+V+"` supplied to "+("`"+U+"`"+ye+"."))}return g(ie)}function P(){function _(z,Q,ie,J,Y){return R(z[Q])?null:new y("Invalid "+J+" `"+Y+"` supplied to "+("`"+ie+"`, expected a ReactNode."))}return g(_)}function j(_,z,Q,ie,J){return new y((_||"React class")+": "+z+" type `"+Q+"."+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function D(_){function z(Q,ie,J,Y,U){var Z=Q[ie],V=N(Z);if(V!=="object")return new y("Invalid "+Y+" `"+U+"` of type `"+V+"` "+("supplied to `"+J+"`, expected `object`."));for(var H in _){var X=_[H];if(typeof X!="function")return j(J,Y,U,H,L(X));var re=X(Z,H,J,Y,U+"."+H,n);if(re)return re}return null}return g(z)}function F(_){function z(Q,ie,J,Y,U){var Z=Q[ie],V=N(Z);if(V!=="object")return new y("Invalid "+Y+" `"+U+"` of type `"+V+"` "+("supplied to `"+J+"`, expected `object`."));var H=t({},Q[ie],_);for(var X in H){var re=_[X];if(r(_,X)&&typeof re!="function")return j(J,Y,U,X,L(re));if(!re)return new y("Invalid "+Y+" `"+U+"` key `"+X+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(Q[ie],null," ")+`
|
|
191
|
+
Valid keys: `+JSON.stringify(Object.keys(_),null," "));var $=re(Z,X,J,Y,U+"."+X,n);if($)return $}return null}return g(z)}function R(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(R);if(_===null||s(_))return!0;var z=d(_);if(z){var Q=z.call(_),ie;if(z!==_.entries){for(;!(ie=Q.next()).done;)if(!R(ie.value))return!1}else for(;!(ie=Q.next()).done;){var J=ie.value;if(J&&!R(J[1]))return!1}}else return!1;return!0;default:return!1}}function O(_,z){return _==="symbol"?!0:z?z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&z instanceof Symbol:!1}function N(_){var z=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":O(z,_)?"symbol":z}function L(_){if(typeof _>"u"||_===null)return""+_;var z=N(_);if(z==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return z}function M(_){var z=L(_);switch(z){case"array":case"object":return"an "+z;case"boolean":case"date":case"regexp":return"a "+z;default:return z}}function q(_){return!_.constructor||!_.constructor.name?p:_.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},iu}var au,Av;function CF(){if(Av)return au;Av=1;var e=dp();function t(){}function n(){}return n.resetWarningCache=t,au=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},au}var Iv;function kF(){if(Iv)return Ha.exports;if(Iv=1,process.env.NODE_ENV!=="production"){var e=Xw(),t=!0;Ha.exports=EF()(e.isElement,t)}else Ha.exports=CF()();return Ha.exports}var RF=kF();const Je=py(RF);function ro(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 PF=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 Wo(e,t,n){const r=AF(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 AF(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=PF.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 IF=[".DS_Store","Thumbs.db"];function OF(e){return ro(this,void 0,void 0,function*(){return Ps(e)&&_F(e.dataTransfer)?NF(e.dataTransfer,e.type):MF(e)?DF(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?jF(e):[]})}function _F(e){return Ps(e)}function MF(e){return Ps(e)&&Ps(e.target)}function Ps(e){return typeof e=="object"&&e!==null}function DF(e){return ud(e.target.files).map(t=>Wo(t))}function jF(e){return ro(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Wo(n))})}function NF(e,t){return ro(this,void 0,void 0,function*(){if(e.items){const n=ud(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(FF));return _v(Jw(r))}return _v(ud(e.files).map(n=>Wo(n)))})}function _v(e){return e.filter(t=>IF.indexOf(t.name)===-1)}function ud(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 FF(e){if(typeof e.webkitGetAsEntry!="function")return Mv(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?e1(t):Mv(e,t)}function Jw(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Jw(n):[n]],[])}function Mv(e,t){return ro(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,Wo(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Wo(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function LF(e){return ro(this,void 0,void 0,function*(){return e.isDirectory?e1(e):VF(e)})}function e1(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>ro(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(LF));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function VF(e){return ro(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Wo(r,e.fullPath);t(o)},r=>{n(r)})})})}var qa={},Dv;function zF(){return Dv||(Dv=1,qa.__esModule=!0,qa.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}),qa}var $F=zF();const su=py($F);function jv(e){return WF(e)||HF(e)||n1(e)||BF()}function BF(){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 HF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function WF(e){if(Array.isArray(e))return dd(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){t1(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 t1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ra(e,t){return GF(e)||UF(e,t)||n1(e,t)||qF()}function qF(){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 n1(e,t){if(e){if(typeof e=="string")return dd(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 dd(e,t)}}function dd(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 UF(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 GF(e){if(Array.isArray(e))return e}var YF=typeof su=="function"?su:su.default,KF="file-invalid-type",ZF="file-too-large",XF="file-too-small",QF="too-many-files",JF=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:KF,message:"File type must be ".concat(r)}},Lv=function(t){return{code:ZF,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Vv=function(t){return{code:XF,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},eL={code:QF,message:"Too many files"};function r1(e,t){var n=e.type==="application/x-moz-file"||YF(e,t);return[n,n?null:JF(t)]}function o1(e,t,n){if(Dr(e.size))if(Dr(t)&&Dr(n)){if(e.size>n)return[!1,Lv(n)];if(e.size<t)return[!1,Vv(t)]}else{if(Dr(t)&&e.size<t)return[!1,Vv(t)];if(Dr(n)&&e.size>n)return[!1,Lv(n)]}return[!0,null]}function Dr(e){return e!=null}function tL(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=r1(l,n),u=ra(c,1),d=u[0],p=o1(l,r,o),f=ra(p,1),h=f[0],y=s?s(l):null;return d&&h&&!y})}function As(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ua(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 nL(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function rL(e){return e.indexOf("Edge/")!==-1}function oL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return nL(e)||rL(e)}function Sn(){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!As(r)&&s&&s.apply(void 0,[r].concat(i)),As(r)})}}function iL(){return"showOpenFilePicker"in window}function aL(e){if(Dr(e)){var t=Object.entries(e).filter(function(n){var r=ra(n,2),o=r[0],i=r[1],a=!0;return i1(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(a1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=ra(r,2),i=o[0],a=o[1];return Fv(Fv({},n),{},t1({},i,a))},{});return[{description:"Files",accept:t}]}return e}function sL(e){if(Dr(e))return Object.entries(e).reduce(function(t,n){var r=ra(n,2),o=r[0],i=r[1];return[].concat(jv(t),[o],jv(i))},[]).filter(function(t){return i1(t)||a1(t)}).join(",")}function lL(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function cL(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function i1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function a1(e){return/^.*\.[\w]+$/.test(e)}var uL=["children"],dL=["open"],fL=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],pL=["refKey","onChange","onClick"];function hL(e){return vL(e)||gL(e)||s1(e)||mL()}function mL(){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 gL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vL(e){if(Array.isArray(e))return fd(e)}function lu(e,t){return bL(e)||xL(e,t)||s1(e,t)||yL()}function yL(){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 s1(e,t){if(e){if(typeof e=="string")return fd(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 fd(e,t)}}function fd(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 xL(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 bL(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 ct(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){pd(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 pd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Is(e,t){if(e==null)return{};var n=wL(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 wL(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 fp=E.forwardRef(function(e,t){var n=e.children,r=Is(e,uL),o=c1(r),i=o.open,a=Is(o,dL);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(ct(ct({},a),{},{open:i})))});fp.displayName="Dropzone";var l1={disabled:!1,getFilesFromEvent:OF,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};fp.defaultProps=l1;fp.propTypes={children:Je.func,accept:Je.objectOf(Je.arrayOf(Je.string)),multiple:Je.bool,preventDropOnDocument:Je.bool,noClick:Je.bool,noKeyboard:Je.bool,noDrag:Je.bool,noDragEventsBubbling:Je.bool,minSize:Je.number,maxSize:Je.number,maxFiles:Je.number,disabled:Je.bool,getFilesFromEvent:Je.func,onFileDialogCancel:Je.func,onFileDialogOpen:Je.func,useFsAccessApi:Je.bool,autoFocus:Je.bool,onDragEnter:Je.func,onDragLeave:Je.func,onDragOver:Je.func,onDrop:Je.func,onDropAccepted:Je.func,onDropRejected:Je.func,onError:Je.func,validator:Je.func};var hd={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function c1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ct(ct({},l1),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,g=t.onFileDialogOpen,v=t.useFsAccessApi,m=t.autoFocus,b=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,w=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,P=E.useMemo(function(){return sL(n)},[n]),j=E.useMemo(function(){return aL(n)},[n]),D=E.useMemo(function(){return typeof g=="function"?g:Bv},[g]),F=E.useMemo(function(){return typeof y=="function"?y:Bv},[y]),R=E.useRef(null),O=E.useRef(null),N=E.useReducer(TL,hd),L=lu(N,2),M=L[0],q=L[1],_=M.isFocused,z=M.isFileDialogActive,Q=E.useRef(typeof window<"u"&&window.isSecureContext&&v&&iL()),ie=function(){!Q.current&&z&&setTimeout(function(){if(O.current){var le=O.current.files;le.length||(q({type:"closeDialog"}),F())}},300)};E.useEffect(function(){return window.addEventListener("focus",ie,!1),function(){window.removeEventListener("focus",ie,!1)}},[O,z,F,Q]);var J=E.useRef([]),Y=function(le){R.current&&R.current.contains(le.target)||(le.preventDefault(),J.current=[])};E.useEffect(function(){return b&&(document.addEventListener("dragover",zv,!1),document.addEventListener("drop",Y,!1)),function(){b&&(document.removeEventListener("dragover",zv),document.removeEventListener("drop",Y))}},[R,b]),E.useEffect(function(){return!r&&m&&R.current&&R.current.focus(),function(){}},[R,m,r]);var U=E.useCallback(function(oe){k?k(oe):console.error(oe)},[k]),Z=E.useCallback(function(oe){oe.preventDefault(),oe.persist(),ee(oe),J.current=[].concat(hL(J.current),[oe.target]),Ua(oe)&&Promise.resolve(o(oe)).then(function(le){if(!(As(oe)&&!C)){var Le=le.length,Ge=Le>0&&tL({files:le,accept:P,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),xt=Le>0&&!Ge;q({isDragAccept:Ge,isDragReject:xt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(oe)}}).catch(function(le){return U(le)})},[o,c,U,C,P,a,i,s,l,I]),V=E.useCallback(function(oe){oe.preventDefault(),oe.persist(),ee(oe);var le=Ua(oe);if(le&&oe.dataTransfer)try{oe.dataTransfer.dropEffect="copy"}catch{}return le&&d&&d(oe),!1},[d,C]),H=E.useCallback(function(oe){oe.preventDefault(),oe.persist(),ee(oe);var le=J.current.filter(function(Ge){return R.current&&R.current.contains(Ge)}),Le=le.indexOf(oe.target);Le!==-1&&le.splice(Le,1),J.current=le,!(le.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ua(oe)&&u&&u(oe))},[R,u,C]),X=E.useCallback(function(oe,le){var Le=[],Ge=[];oe.forEach(function(xt){var lt=r1(xt,P),_t=lu(lt,2),dn=_t[0],Tn=_t[1],Zn=o1(xt,a,i),Xn=lu(Zn,2),Qn=Xn[0],B=Xn[1],W=I?I(xt):null;if(dn&&Qn&&!W)Le.push(xt);else{var Ne=[Tn,B];W&&(Ne=Ne.concat(W)),Ge.push({file:xt,errors:Ne.filter(function(Ze){return Ze})})}}),(!s&&Le.length>1||s&&l>=1&&Le.length>l)&&(Le.forEach(function(xt){Ge.push({file:xt,errors:[eL]})}),Le.splice(0)),q({acceptedFiles:Le,fileRejections:Ge,isDragReject:Ge.length>0,type:"setFiles"}),p&&p(Le,Ge,le),Ge.length>0&&h&&h(Ge,le),Le.length>0&&f&&f(Le,le)},[q,s,P,a,i,l,p,f,h,I]),re=E.useCallback(function(oe){oe.preventDefault(),oe.persist(),ee(oe),J.current=[],Ua(oe)&&Promise.resolve(o(oe)).then(function(le){As(oe)&&!C||X(le,oe)}).catch(function(le){return U(le)}),q({type:"reset"})},[o,X,U,C]),$=E.useCallback(function(){if(Q.current){q({type:"openDialog"}),D();var oe={multiple:s,types:j};window.showOpenFilePicker(oe).then(function(le){return o(le)}).then(function(le){X(le,null),q({type:"closeDialog"})}).catch(function(le){lL(le)?(F(le),q({type:"closeDialog"})):cL(le)?(Q.current=!1,O.current?(O.current.value=null,O.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}O.current&&(q({type:"openDialog"}),D(),O.current.value=null,O.current.click())},[q,D,F,v,X,U,j,s]),ye=E.useCallback(function(oe){!R.current||!R.current.isEqualNode(oe.target)||(oe.key===" "||oe.key==="Enter"||oe.keyCode===32||oe.keyCode===13)&&(oe.preventDefault(),$())},[R,$]),ke=E.useCallback(function(){q({type:"focus"})},[]),Ae=E.useCallback(function(){q({type:"blur"})},[]),Te=E.useCallback(function(){S||(oL()?setTimeout($,0):$())},[S,$]),K=function(le){return r?null:le},ae=function(le){return T?null:K(le)},G=function(le){return w?null:K(le)},ee=function(le){C&&le.stopPropagation()},ge=E.useMemo(function(){return function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=oe.refKey,Le=le===void 0?"ref":le,Ge=oe.role,xt=oe.onKeyDown,lt=oe.onFocus,_t=oe.onBlur,dn=oe.onClick,Tn=oe.onDragEnter,Zn=oe.onDragOver,Xn=oe.onDragLeave,Qn=oe.onDrop,B=Is(oe,fL);return ct(ct(pd({onKeyDown:ae(Sn(xt,ye)),onFocus:ae(Sn(lt,ke)),onBlur:ae(Sn(_t,Ae)),onClick:K(Sn(dn,Te)),onDragEnter:G(Sn(Tn,Z)),onDragOver:G(Sn(Zn,V)),onDragLeave:G(Sn(Xn,H)),onDrop:G(Sn(Qn,re)),role:typeof Ge=="string"&&Ge!==""?Ge:"presentation"},Le,R),!r&&!T?{tabIndex:0}:{}),B)}},[R,ye,ke,Ae,Te,Z,V,H,re,T,w,r]),ue=E.useCallback(function(oe){oe.stopPropagation()},[]),Fe=E.useMemo(function(){return function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=oe.refKey,Le=le===void 0?"ref":le,Ge=oe.onChange,xt=oe.onClick,lt=Is(oe,pL),_t=pd({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:K(Sn(Ge,re)),onClick:K(Sn(xt,ue)),tabIndex:-1},Le,O);return ct(ct({},_t),lt)}},[O,n,s,re,r]);return ct(ct({},M),{},{isFocused:_&&!r,getRootProps:ge,getInputProps:Fe,rootRef:R,inputRef:O,open:K($)})}function TL(e,t){switch(t.type){case"focus":return ct(ct({},e),{},{isFocused:!0});case"blur":return ct(ct({},e),{},{isFocused:!1});case"openDialog":return ct(ct({},hd),{},{isFileDialogActive:!0});case"closeDialog":return ct(ct({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ct(ct({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ct(ct({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return ct({},hd);default:return e}}function Bv(){}const SL={isImage:e=>e.type.includes("image")},EL=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(SL.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(Ro,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Mo,{})})]}):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(Rb,{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(Ro,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Mo,{className:"text-danger"})})]})},CL=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(EL,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),kL=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(CL,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(E.Fragment,{children:e.idle}),RL=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(rA,{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"})]})]}),PL=({idle:e=RL,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}=c1({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(kL,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},AL=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})},IL=({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:Be("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]}),qr=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 g=Ot(),v=E.useRef(null),m=h.id??h.name;E.useImperativeHandle(y,()=>v.current),E.useEffect(()=>{if(v.current===null)return;const S=new AbortController,T=v.current,w=la(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(Sa,{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:m,children:x.jsxs("button",{onClick:b,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(mf,{size:20}),x.jsx("span",{className:"sr-only",children:g.inputCaretDown})]})}),children:x.jsxs("select",{...h,id:m,name:m,value:h.value,required:e,ref:Id(y,v),"data-selected":!!h.value||!1,defaultValue:h.value?void 0:"",title:typeof h.title=="string"?h.title:void 0,className:Be("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:`${m}-select-option-${S.value}`}))]})})}),OL=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=Vi(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:Be("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})]})}),_L=e=>{const[t,n]=dP();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:gP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},ML=Zw("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)}),DL=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},jL={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"})})},NL=e=>{const t=E.useRef(null),n=DL(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(Ea,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(lp,{height:n,useWindowScroll:!0,data:e.source,components:jL,itemContent:(r,o)=>x.jsx(E.Fragment,{children:x.jsx(up,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(Ro,{children:x.jsx(gf,{})})}),x.jsx("div",{})]})};var FL=Object.defineProperty,Hv=Object.getOwnPropertySymbols,LL=Object.prototype.hasOwnProperty,VL=Object.prototype.propertyIsEnumerable,Wv=(e,t,n)=>t in e?FL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zL=(e,t)=>{for(var n in t||(t={}))LL.call(t,n)&&Wv(e,n,t[n]);if(Hv)for(var n of Hv(t))VL.call(t,n)&&Wv(e,n,t[n]);return e},pp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},$L=(e,t,n,r)=>vl(pp,e,t,n,r),qo=e=>typeof e=="object",cr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!qo(e)&&!qo(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=>cr(e[r],t[r]))},BL=(e,t)=>(qo(e)||Array.isArray(e))&&t?e[t]:e,HL=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Os=e=>/[0-9.]+/.test(e),qv=e=>["string","number"].includes(typeof e),Uv=e=>e==null||(e==null?void 0:e.length)===0||e==="",Gv={eq:cr,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:Uv,notEmpty:e=>!Uv(e),in:(e,t)=>pp(t,n=>cr(e,n)),notIn:(e,t)=>u1(t,n=>!cr(e,n))},WL=e=>{if(e in Gv)return Gv[e];throw new Error("Linq - Symbol not found")},Eo=(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},vl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=WL(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},qL=(e,t,n,r)=>vl(Eo,e,t,n,r),u1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},UL=(e,t,n,r)=>vl(u1,e,t,n,r),d1=e=>{if(e===null)return null;const t=zL({},e);return Object.keys(t).forEach(n=>t[n]=qo(e[n])?d1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Yv=(e,t)=>{if(qo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(cr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(cr(t,r))return!0}return!1},GL=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},YL=e=>Eo(e,(t,n,r)=>qo(t)?n===r.findIndex(o=>cr(o,t)):n===r.indexOf(t)),KL=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},f1=(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())},ZL=(e,t)=>f1(e,n=>n[t]),Kv=(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},XL=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},QL=(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 Os(e)&&Os(t)?r.map(a=>Number.parseInt(a)):r},cu=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Os(e)&&Os(t)){const o=[],[i,a]=XL(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return QL(e,t,r)},JL=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?cu(r,o,1):cu(r,i,Number.parseInt(o,10))}return qv(e)&&qv(t)?cu(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},uu=(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},Zv=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},e2=(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)},t2=(e,t,n,r)=>vl(e2,e,t,n,r),Xv=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(HL(t))},p1=(e=>(e.Asc="asc",e.Desc="desc",e))(p1||{}),n2=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),r2=(e,t)=>e.sort(n2(t)),o2=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Eo(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},i2=class md{constructor(t=[]){this.array=t}static Range(...t){return JL(...t)}static New(t){return new md(t)}Where(t,n,r){return this.array=qL(this.array,t,n,r),this}Some(t,n,r){return $L(this.array,t,n,r)}All(t,n,r){return UL(this.array,t,n,r)}Reverse(){return this.array=Zv(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=t2(this.array,t,n,r),this}Distinct(){return this.array=YL(this.array),this}First(t){return t===void 0?this.array[0]:KL(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?uu((n,r)=>n+r,0,this.array):uu((n,r)=>n+BL(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return ZL(this.array,t)}GroupWith(t){return f1(this.array,t)}Except(t){return Eo(this.array,n=>!Yv(t,n))}Intersect(t){return Eo(this.array,n=>Yv(t,n))}OrderBy(t,n){let r;return r=t?Xv(this.array,t):this.array.toSorted(),this.array=n==="desc"?Zv(r):r,this}Includes(t){return pp(this.array,n=>cr(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 uu(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Kv(this.array,n=>[t,n]))}Zip(t,n){return Kv(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Eo(this.array,t).length}Get(t){return this.array[t]}Clone(){return new md(d1(this.array))}ToObject(t){return GL(this.array,t)}Sort(t){return Array.isArray(t)?r2(this.array,t):Xv(this.array,t)}Unique(t){return o2(this.array,t)}},h1=i2,du={},Qv;function a2(){return Qv||(Qv=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(g,v)=>{try{Object.keys(g).forEach(v)}catch(m){window.console.log(m)}},n=g=>g==null,r=g=>{const v=typeof g;return v==="string"||v==="number"||v==="boolean"||n(g)},o=(g,v)=>{const m=v.getItem(g);try{return JSON.parse(m)}catch{return m??null}},i=g=>Object.keys(g).reduce((v,m)=>({...v,[m]:o(m,g)}),{}),a=g=>g instanceof Date?g:typeof g=="number"?new Date(new Date*1+g*864e5):g,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(g=>g.split("=")).reduce((g,v)=>(g[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),g),{}),c=new Set,u=()=>{const g=l();c.forEach(v=>v(g))},d=[{name:"expires",parse:g=>`expires=${a(g.expires??s)}`},{name:"maxAge",parse:g=>g.maxAge?`max-age=${a(g.expires??s)}`:""},{name:"path",parse:g=>`path=${g.path??"/"}`},{name:"sameSite",parse:g=>`samesite=${g.sameSite??"strict"}`},{name:"useSecure",parse:g=>`${g.useSecure??!0?"secure":""}`},{name:"domain",parse:g=>{const v=g.domain??"";return v===""?"":`domain=${g.multiDomain?".":""}${v}`}},{name:"partitioned",parse:g=>g.partitioned?"Partitioned":""}],p={json:l,listener:g=>(c.add(g),()=>c.delete(g)),clearListeners:()=>c.clear(),has:g=>document.cookie.split(";").some(v=>v.trim().startsWith(`${g}=`)),deleteAll:()=>{document.cookie.split(";").forEach(g=>{document.cookie=g.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:g=>{const v=p.json()[g];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:g=>{document.cookie=`${encodeURIComponent(g)}=;expires=${new Date().toUTCString()}`,u()},set:(g,v,m={})=>{const b=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=d.reduce((T,w)=>{const C=w.parse(m);return C===""?T:T.concat(C)},[`${encodeURIComponent(g)}=${b}`]).join(";");document.cookie=S,u()}},f=g=>{const v=new Set,m=b=>{g().removeItem(b);const S=i(g());v.forEach(T=>T(S))};return{delete:m,listener:b=>(v.add(b),()=>v.delete(b)),clearListeners:()=>v.clear(),json:(b=!1)=>b?i(g()):g(),has:b=>{const S=g().getItem(b);return!n(S)},deleteAll:()=>{t(g(),m),v.forEach(b=>b(g()))},get:b=>o(b,g()),set:(b,S)=>{g().setItem(b,JSON.stringify(S)),v.forEach(T=>T(g()))}}},h=f(()=>window.sessionStorage),y=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=y,e.SessionStorage=h,e.createStorage=f}(du)),du}var Ni=a2();const hp=e=>e.headerLabel??e.thead??e.id,mp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Co=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Co||{});const gp=e=>e.type==="number"?e.valueAsNumber:e.value,s2=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},l2={},c2=(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})},u2=(e,t,n=l2)=>{const r=Li()?null:Ni.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Sf({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:c2(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return Li()||Ni.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},gd=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??Co.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:ca(),operation:l,label:hp(e),name:o,type:i,value:"",...r}},vp=()=>{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(()=>({[Co.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Co.Boolean]:[t.is,t.isNot],[Co.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},d2=e=>{const t=Ot(),n=vp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,gd(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 gd(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=gp(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return x.jsx(E.Fragment,{children:x.jsx(ci,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(qP,{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(qr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),x.jsx(qr,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Ea,{"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(Mo,{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(vf,{size:14})," ",t.tableFilterNewFilter]})})]})})})},f2=({filter:e,onDelete:t,set:n})=>{const r=Ot(),o=vp(),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=gp(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(qr,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),x.jsx(Ea,{"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(Mo,{className:"text-danger",size:14})})]})},p2=({item:e,onPointerDown:t})=>{const n=_o(0);return x.jsxs(Sb,{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(BP,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},h2=e=>{var l;const t=Ot(),n=mp(e.cols),r=hP(),[o,i]=E.useState(((l=e.groups[0])==null?void 0:l.thead)||""),a=c=>{var g;const u=c.target,d=u.value,p=u.options.selectedIndex,f=((g=u.options.item(p))==null?void 0:g.label)||"";i(f);const h=new h1(e.rows).GroupBy(d),y=e.cols.find(v=>v.id===d);e.setGroups(mT(h).map((v,m)=>{const b=h[v];return{...y,groupId:ca(),groupKey:d,index:m,rows:b,groupName:v}}))},s=()=>e.setGroups([]);return x.jsx(E.Fragment,{children:x.jsxs(ci,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(tA,{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(qr,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),x.jsx(Ro,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:x.jsx(Mo,{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(ES,{children:x.jsx(Tb,{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(p2,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},m2=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),g2=(e,t)=>e.toSorted(m2(t)),m1=(e,t,n)=>({label:t,id:ca(),type:n,value:e.id}),v2=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,m1(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(ci,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(Cb,{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(qr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(qr,{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(Mo,{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(vf,{size:14})," ",t.tableSortAddButton]})})]})})})},y2=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=m1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=hp(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(AP,{size:14}):null,n==="desc"?x.jsx(RP,{size:14}):null,n==="undefined"?x.jsx(Cb,{size:14}):null]})},x2=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(d2,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(v2,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(h2,{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=gp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function b2(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2;const o=e-r,i=e+r;for(let 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 w2=e=>{const t=E.useId(),n=Ot(),r=e.asLink||"button",o=E.useMemo(()=>b2(e.current,e.pages),[e.current,e.pages]),i=e.current<e.pages;return x.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(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:a=>{var s;(s=e.onChangeSize)==null||s.call(e,Number(a.target.value))},children:e.sizes.map(a=>x.jsx("option",{value:a,children:a},`pagination-opt-${a}`))})," "]}):null})}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(a=>a===null?null:x.jsx(E.Fragment,{children:typeof a=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(r,{href:a,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${a===e.current?"text-primary border-primary":"border-transparent"}`,children:a})})},`pagination-${a}`)),i?x.jsx("li",{children:x.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},T2={top:0,left:0,right:0,bottom:-1},S2=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=vp(),s=r?YP:ZP,l=E.useRef(null),c=y=>{const g=y.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(m=>m.id!==g))},u=E.useCallback(y=>{if(y===null)return;l.current=y;const g=new AbortController;return y.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:g.signal}),()=>g.abort()},[]),d=e.sorters.find(y=>e.header.id===y.value),p=d!=null&&d.type?d.type===p1.Asc?"ascending":"descending":"none",f=hp(e.header);return x.jsxs(Sb,{...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(ci,{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(f2,{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(gd(e.header,a.options,a.operations))),children:[x.jsx(vf,{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(y2,{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:T2,className:"absolute right-0 top-0 block h-full w-1.5 cursor-col-resize hover:bg-primary active:bg-primary",onDrag:(y,g)=>{if(l.current===null)return;const v=l.current.getBoundingClientRect().width,m=g.delta.x;l.current.style.width=`${Math.abs(v+m)}px`}})]})},E2=e=>x.jsx(Tb,{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(gr,{children:e.headers.map((t,n)=>x.jsx(S2,{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}`))})}),g1=E.createContext({}),C2=()=>E.useContext(g1),k2=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(gr,{children:n.children})})),R2=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??""}`})),P2=E.forwardRef(({context:e,...t},n)=>{const r=C2(),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})}),A2=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)??""}`})),I2=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),O2={TableHead:P2,Table:R2,TableBody:k2,TableRow:A2,TableFoot:I2},_2=[0,0,0,0,0,0,0,0,0,0],v1=x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),M2=(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?v1:x.jsx(u0,{})}),D2=(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=_d(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?v1:c?x.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l}):x.jsx(E.Fragment,{children:ht.nil(l)?"":l}))})})},j2=()=>x.jsx(E.Fragment,{}),N2=[{}],Jv=({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=Vi(a),y=Vi(u.loadingMore),g=E.useMemo(()=>{if(u.loading)return _2;if(c)return u.rows;const v=new h1(u.rows);return t.length>0&&t.forEach(m=>m.value===""||Number.isNaN(m.value)?void 0:v.Where(m.name,m.operation.symbol,m.value)),r.length===0?v.Select():g2(v.Select(),r)},[u.rows,t,r,u.loading]);return E.useEffect(()=>{if(d.current===null)return()=>{};const v=d.current,m=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 m.observe(v),()=>m.disconnect()},[]),x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg ${s?"border border-table-border":""}`,children:[x.jsx(NN,{useWindowScroll:!0,followOutput:"smooth",components:O2,totalCount:g.length,data:g.length===0?N2:g,fixedFooterContent:p?j2:null,itemContent:g.length===0?M2:D2,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>x.jsx(E2,{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(w2,{...l}):null]})},F2=(e,t)=>typeof t=="function"?t(e):t,Ga=(e,t,n)=>e===t||n==null?void 0:n(t),L2=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=E.useMemo(()=>mp(e.cols),[e.cols]),[o,i]=Sf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},a=>{const s=l=>c=>{const u=a.state();return{...u,[l]:F2(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),Ga((s==null?void 0:s.filters)??[],a.filters??[],e.setFilters),Ga((s==null?void 0:s.sorters)??[],a.sorters??[],e.setSorters),Ga((s==null?void 0:s.groups)??[],a.groups??[],e.setGroups),Ga((s==null?void 0:s.cols)??[],a.cols??[],e.setCols),a}]});return x.jsx(g1.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?x.jsx(x2,{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(Jv,{...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(Jv,{...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}`))})]})})},V2=["INPUT","SELECT"],y1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{V2.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var fu,ey;function yp(){if(ey)return fu;ey=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return fu={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},fu}var pu,ty;function x1(){if(ty)return pu;ty=1;var e=yp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var g=[],v=0;v<256;++v)g.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return g}(),o=function(v){for(;v.length>1;){var m=v.pop(),b=m.obj[m.prop];if(n(b)){for(var S=[],T=0;T<b.length;++T)typeof b[T]<"u"&&S.push(b[T]);m.obj[m.prop]=S}}},i=function(v,m){for(var b=m&&m.plainObjects?{__proto__:null}:{},S=0;S<v.length;++S)typeof v[S]<"u"&&(b[S]=v[S]);return b},a=function g(v,m,b){if(!m)return v;if(typeof m!="object"&&typeof m!="function"){if(n(v))v.push(m);else if(v&&typeof v=="object")(b&&(b.plainObjects||b.allowPrototypes)||!t.call(Object.prototype,m))&&(v[m]=!0);else return[v,m];return v}if(!v||typeof v!="object")return[v].concat(m);var S=v;return n(v)&&!n(m)&&(S=i(v,b)),n(v)&&n(m)?(m.forEach(function(T,w){if(t.call(v,w)){var C=v[w];C&&typeof C=="object"&&T&&typeof T=="object"?v[w]=g(C,T,b):v.push(T)}else v[w]=T}),v):Object.keys(m).reduce(function(T,w){var C=m[w];return t.call(T,w)?T[w]=g(T[w],C,b):T[w]=C,T},S)},s=function(v,m){return Object.keys(m).reduce(function(b,S){return b[S]=m[S],b},v)},l=function(g,v,m){var b=g.replace(/\+/g," ");if(m==="iso-8859-1")return b.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(b)}catch{return b}},c=1024,u=function(v,m,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(F){return"%26%23"+parseInt(F.slice(2),16)+"%3B"});for(var C="",k=0;k<w.length;k+=c){for(var I=w.length>=c?w.slice(k,k+c):w,P=[],j=0;j<I.length;++j){var D=I.charCodeAt(j);if(D===45||D===46||D===95||D===126||D>=48&&D<=57||D>=65&&D<=90||D>=97&&D<=122||T===e.RFC1738&&(D===40||D===41)){P[P.length]=I.charAt(j);continue}if(D<128){P[P.length]=r[D];continue}if(D<2048){P[P.length]=r[192|D>>6]+r[128|D&63];continue}if(D<55296||D>=57344){P[P.length]=r[224|D>>12]+r[128|D>>6&63]+r[128|D&63];continue}j+=1,D=65536+((D&1023)<<10|I.charCodeAt(j)&1023),P[P.length]=r[240|D>>18]+r[128|D>>12&63]+r[128|D>>6&63]+r[128|D&63]}C+=P.join("")}return C},d=function(v){for(var m=[{obj:{o:v},prop:"o"}],b=[],S=0;S<m.length;++S)for(var T=m[S],w=T.obj[T.prop],C=Object.keys(w),k=0;k<C.length;++k){var I=C[k],P=w[I];typeof P=="object"&&P!==null&&b.indexOf(P)===-1&&(m.push({obj:w,prop:I}),b.push(P))}return o(m),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,m){return[].concat(v,m)},y=function(v,m){if(n(v)){for(var b=[],S=0;S<v.length;S+=1)b.push(m(v[S]));return b}return m(v)};return pu={arrayToObject:i,assign:s,combine:h,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:y,merge:a},pu}var hu,ny;function z2(){if(ny)return hu;ny=1;var e=uT(),t=x1(),n=yp(),r=Object.prototype.hasOwnProperty,o={brackets:function(g){return g+"[]"},comma:"comma",indices:function(g,v){return g+"["+v+"]"},repeat:function(g){return g}},i=Array.isArray,a=Array.prototype.push,s=function(y,g){a.apply(y,i(g)?g:[g])},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(g){return l.call(g)},skipNulls:!1,strictNullHandling:!1},d=function(g){return typeof g=="string"||typeof g=="number"||typeof g=="boolean"||typeof g=="symbol"||typeof g=="bigint"},p={},f=function y(g,v,m,b,S,T,w,C,k,I,P,j,D,F,R,O,N,L){for(var M=g,q=L,_=0,z=!1;(q=q.get(p))!==void 0&&!z;){var Q=q.get(g);if(_+=1,typeof Q<"u"){if(Q===_)throw new RangeError("Cyclic object value");z=!0}typeof q.get(p)>"u"&&(_=0)}if(typeof I=="function"?M=I(v,M):M instanceof Date?M=D(M):m==="comma"&&i(M)&&(M=t.maybeMap(M,function(Ae){return Ae instanceof Date?D(Ae):Ae})),M===null){if(T)return k&&!O?k(v,u.encoder,N,"key",F):v;M=""}if(d(M)||t.isBuffer(M)){if(k){var ie=O?v:k(v,u.encoder,N,"key",F);return[R(ie)+"="+R(k(M,u.encoder,N,"value",F))]}return[R(v)+"="+R(String(M))]}var J=[];if(typeof M>"u")return J;var Y;if(m==="comma"&&i(M))O&&k&&(M=t.maybeMap(M,k)),Y=[{value:M.length>0?M.join(",")||null:void 0}];else if(i(I))Y=I;else{var U=Object.keys(M);Y=P?U.sort(P):U}var Z=C?String(v).replace(/\./g,"%2E"):String(v),V=b&&i(M)&&M.length===1?Z+"[]":Z;if(S&&i(M)&&M.length===0)return V+"[]";for(var H=0;H<Y.length;++H){var X=Y[H],re=typeof X=="object"&&X&&typeof X.value<"u"?X.value:M[X];if(!(w&&re===null)){var $=j&&C?String(X).replace(/\./g,"%2E"):String(X),ye=i(M)?typeof m=="function"?m(V,$):V:V+(j?"."+$:"["+$+"]");L.set(g,_);var ke=e();ke.set(p,L),s(J,y(re,ye,m,b,S,T,w,C,m==="comma"&&O&&i(M)?null:k,I,P,j,D,F,R,O,N,ke))}}return J},h=function(g){if(!g)return u;if(typeof g.allowEmptyArrays<"u"&&typeof g.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof g.encodeDotInKeys<"u"&&typeof g.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(g.encoder!==null&&typeof g.encoder<"u"&&typeof g.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=g.charset||u.charset;if(typeof g.charset<"u"&&g.charset!=="utf-8"&&g.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var m=n.default;if(typeof g.format<"u"){if(!r.call(n.formatters,g.format))throw new TypeError("Unknown format option provided.");m=g.format}var b=n.formatters[m],S=u.filter;(typeof g.filter=="function"||i(g.filter))&&(S=g.filter);var T;if(g.arrayFormat in o?T=g.arrayFormat:"indices"in g?T=g.indices?"indices":"repeat":T=u.arrayFormat,"commaRoundTrip"in g&&typeof g.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var w=typeof g.allowDots>"u"?g.encodeDotInKeys===!0?!0:u.allowDots:!!g.allowDots;return{addQueryPrefix:typeof g.addQueryPrefix=="boolean"?g.addQueryPrefix:u.addQueryPrefix,allowDots:w,allowEmptyArrays:typeof g.allowEmptyArrays=="boolean"?!!g.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:T,charset:v,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!g.commaRoundTrip,delimiter:typeof g.delimiter>"u"?u.delimiter:g.delimiter,encode:typeof g.encode=="boolean"?g.encode:u.encode,encodeDotInKeys:typeof g.encodeDotInKeys=="boolean"?g.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof g.encoder=="function"?g.encoder:u.encoder,encodeValuesOnly:typeof g.encodeValuesOnly=="boolean"?g.encodeValuesOnly:u.encodeValuesOnly,filter:S,format:m,formatter:b,serializeDate:typeof g.serializeDate=="function"?g.serializeDate:u.serializeDate,skipNulls:typeof g.skipNulls=="boolean"?g.skipNulls:u.skipNulls,sort:typeof g.sort=="function"?g.sort:null,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:u.strictNullHandling}};return hu=function(y,g){var v=y,m=h(g),b,S;typeof m.filter=="function"?(S=m.filter,v=S("",v)):i(m.filter)&&(S=m.filter,b=S);var T=[];if(typeof v!="object"||v===null)return"";var w=o[m.arrayFormat],C=w==="comma"&&m.commaRoundTrip;b||(b=Object.keys(v)),m.sort&&b.sort(m.sort);for(var k=e(),I=0;I<b.length;++I){var P=b[I],j=v[P];m.skipNulls&&j===null||s(T,f(j,P,w,C,m.allowEmptyArrays,m.strictNullHandling,m.skipNulls,m.encodeDotInKeys,m.encode?m.encoder:null,m.filter,m.sort,m.allowDots,m.serializeDate,m.format,m.formatter,m.encodeValuesOnly,m.charset,k))}var D=T.join(m.delimiter),F=m.addQueryPrefix===!0?"?":"";return m.charsetSentinel&&(m.charset==="iso-8859-1"?F+="utf8=%26%2310003%3B&":F+="utf8=%E2%9C%93&"),D.length>0?F+D:""},hu}var mu,ry;function $2(){if(ry)return mu;ry=1;var e=x1(),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},g=h.ignoreQueryPrefix?f.replace(/^\?/,""):f;g=g.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=h.parameterLimit===1/0?void 0:h.parameterLimit,m=g.split(h.delimiter,h.throwOnLimitExceeded?v+1:v);if(h.throwOnLimitExceeded&&m.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<m.length;++S)m[S].indexOf("utf8=")===0&&(m[S]===s?T="utf-8":m[S]===a&&(T="iso-8859-1"),b=S,S=m.length);for(S=0;S<m.length;++S)if(S!==b){var w=m[S],C=w.indexOf("]="),k=C===-1?w.indexOf("="):C+1,I,P;k===-1?(I=h.decoder(w,r.decoder,T,"key"),P=h.strictNullHandling?null:""):(I=h.decoder(w.slice(0,k),r.decoder,T,"key"),P=e.maybeMap(i(w.slice(k+1),h,n(y[I])?y[I].length:0),function(D){return h.decoder(D,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 g=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");g=Array.isArray(f)&&f[v]?f[v].length:0}for(var m=y?f:i(f,h,g),b=p.length-1;b>=0;--b){var S,T=p[b];if(T==="[]"&&h.parseArrays)S=h.allowEmptyArrays&&(m===""||h.strictNullHandling&&m===null)?[]:e.combine([],m);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,k=parseInt(C,10);!h.parseArrays&&C===""?S={0:m}:!isNaN(k)&&T!==C&&String(k)===C&&k>=0&&h.parseArrays&&k<=h.arrayLimit?(S=[],S[k]=m):C!=="__proto__"&&(S[C]=m)}m=S}return m},u=function(f,h,y,g){if(f){var v=y.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,m=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,S=y.depth>0&&m.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,g)}},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 g=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:g,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 mu=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,g=h.plainObjects?{__proto__:null}:{},v=Object.keys(y),m=0;m<v.length;++m){var b=v[m],S=u(b,y[b],h,typeof p=="string");g=e.merge(g,S,h)}return h.allowSparse===!0?g:e.compact(g)},mu}var gu,oy;function B2(){if(oy)return gu;oy=1;var e=z2(),t=$2(),n=yp();return gu={formats:n,parse:t,stringify:e},gu}var H2=B2(),$e;(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})($e||($e={}));var iy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(iy||(iy={}));const fe=$e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ir=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=$e.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 cn 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 cn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,$e.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()}}cn.create=e=>new cn(e);const oa=(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,$e.jsonStringifyReplacer)}`;break;case ne.unrecognized_keys:n=`Unrecognized key(s) in object: ${$e.joinValues(e.keys,", ")}`;break;case ne.invalid_union:n="Invalid input";break;case ne.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${$e.joinValues(e.options)}`;break;case ne.invalid_enum_value:n=`Invalid enum value. Expected ${$e.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}"`:$e.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,$e.assertNever(e)}return{message:n}};let W2=oa;function vd(){return W2}const yd=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=vd(),r=yd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===oa?void 0:oa].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"}),wi=e=>({status:"dirty",value:e}),Yt=e=>({status:"valid",value:e}),ay=e=>e.status==="aborted",sy=e=>e.status==="dirty",Uo=e=>e.status==="valid",_s=e=>typeof Promise<"u"&&e instanceof Promise;function Ms(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 b1(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 Ti,Si;class Fn{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 ly=(e,t)=>{if(Uo(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 cn(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 De{get description(){return this._def.description}_getType(t){return ir(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ir(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:ir(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(_s(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:ir(t)},i=this._parseSync({data:t,path:o.path,parent:o});return ly(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:ir(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return Uo(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=>Uo(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:ir(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(_s(o)?o:Promise.resolve(o));return ly(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 Yn({schema:this,typeName:we.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 Bn.create(this,this._def)}nullable(){return Yr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Mn.create(this)}promise(){return aa.create(this,this._def)}or(t){return Ns.create([this,t],this._def)}and(t){return Fs.create(this,t,this._def)}transform(t){return new Yn({...Pe(this._def),schema:this,typeName:we.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Bs({...Pe(this._def),innerType:this,defaultValue:n,typeName:we.ZodDefault})}brand(){return new E1({typeName:we.ZodBranded,type:this,...Pe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Hs({...Pe(this._def),innerType:this,catchValue:n,typeName:we.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return yl.create(this,t)}readonly(){return Ws.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const q2=/^c[^\s-]{8,}$/i,U2=/^[0-9a-z]+$/,G2=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Y2=/^[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,K2=/^[a-z0-9_-]{21}$/i,Z2=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,X2=/^[-+]?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)?)??$/,Q2=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,J2="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let vu;const 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])$/,tV=/^(?:(?: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])$/,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]))$/,rV=/^(([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])$/,oV=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,iV=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,w1="((\\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])))",aV=new RegExp(`^${w1}$`);function T1(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 sV(e){return new RegExp(`^${T1(e)}$`)}function lV(e){let t=`${w1}T${T1(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 cV(e,t){return!!((t==="v4"||!t)&&eV.test(e)||(t==="v6"||!t)&&nV.test(e))}function uV(e,t){if(!Z2.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 dV(e,t){return!!((t==="v4"||!t)&&tV.test(e)||(t==="v6"||!t)&&rV.test(e))}class $n extends De{_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")Q2.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")vu||(vu=new RegExp(J2,"u")),vu.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")Y2.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")K2.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")q2.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")U2.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")G2.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"?lV(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"?aV.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:ne.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?sV(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"?X2.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"duration",code:ne.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?cV(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"?uV(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"?dV(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"?oV.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64",code:ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?iV.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64url",code:ne.invalid_string,message:i.message}),r.dirty()):$e.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 $n({...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 $n({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new $n({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new $n({...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}}$n.create=e=>{var t;return new $n({checks:[],typeName:we.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Pe(e)})};function fV(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 Ur extends De{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"?$e.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"?fV(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()):$e.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 Ur({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new Ur({...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"&&$e.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:we.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Pe(e)});class Go extends De{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()):$e.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 Go({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new Go({...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}}Go.create=e=>{var t;return new Go({checks:[],typeName:we.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Pe(e)})};class xd extends De{_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)}}xd.create=e=>new xd({typeName:we.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Pe(e)});class ia extends De{_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()):$e.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ia({...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}}ia.create=e=>new ia({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:we.ZodDate,...Pe(e)});class bd extends De{_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)}}bd.create=e=>new bd({typeName:we.ZodSymbol,...Pe(e)});class Ds extends De{_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)}}Ds.create=e=>new Ds({typeName:we.ZodUndefined,...Pe(e)});class js extends De{_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)}}js.create=e=>new js({typeName:we.ZodNull,...Pe(e)});class wd extends De{constructor(){super(...arguments),this._any=!0}_parse(t){return Yt(t.data)}}wd.create=e=>new wd({typeName:we.ZodAny,...Pe(e)});class ko extends De{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Yt(t.data)}}ko.create=e=>new ko({typeName:we.ZodUnknown,...Pe(e)});class mr extends De{_parse(t){const n=this._getOrReturnCtx(t);return ce(n,{code:ne.invalid_type,expected:fe.never,received:n.parsedType}),Ee}}mr.create=e=>new mr({typeName:we.ZodNever,...Pe(e)});class Td extends De{_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)}}Td.create=e=>new Td({typeName:we.ZodVoid,...Pe(e)});class Mn extends De{_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 Fn(n,a,n.path,s)))).then(a=>Ht.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Fn(n,a,n.path,s)));return Ht.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Mn({...this._def,minLength:{value:t,message:ve.toString(n)}})}max(t,n){return new Mn({...this._def,maxLength:{value:t,message:ve.toString(n)}})}length(t,n){return new Mn({...this._def,exactLength:{value:t,message:ve.toString(n)}})}nonempty(t){return this.min(1,t)}}Mn.create=(e,t)=>new Mn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:we.ZodArray,...Pe(t)});function po(e){if(e instanceof gt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Bn.create(po(r))}return new gt({...e._def,shape:()=>t})}else return e instanceof Mn?new Mn({...e._def,type:po(e.element)}):e instanceof Bn?Bn.create(po(e.unwrap())):e instanceof Yr?Yr.create(po(e.unwrap())):e instanceof Gn?Gn.create(e.items.map(t=>po(t))):e}class gt extends De{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=$e.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 mr&&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 Fn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof mr){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 Fn(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:we.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new gt({...this._def,catchall:t})}pick(t){const n={};return $e.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 $e.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new gt({...this._def,shape:()=>n})}deepPartial(){return po(this)}partial(t){const n={};return $e.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 $e.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Bn;)i=i._def.innerType;n[r]=i}}),new gt({...this._def,shape:()=>n})}keyof(){return S1($e.objectKeys(this.shape))}}gt.create=(e,t)=>new gt({shape:()=>e,unknownKeys:"strip",catchall:mr.create(),typeName:we.ZodObject,...Pe(t)});gt.strictCreate=(e,t)=>new gt({shape:()=>e,unknownKeys:"strict",catchall:mr.create(),typeName:we.ZodObject,...Pe(t)});gt.lazycreate=(e,t)=>new gt({shape:e,unknownKeys:"strip",catchall:mr.create(),typeName:we.ZodObject,...Pe(t)});class Ns extends De{_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 cn(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 cn(l));return ce(n,{code:ne.invalid_union,unionErrors:s}),Ee}}get options(){return this._def.options}}Ns.create=(e,t)=>new Ns({options:e,typeName:we.ZodUnion,...Pe(t)});const zn=e=>e instanceof Vs?zn(e.schema):e instanceof Yn?zn(e.innerType()):e instanceof zs?[e.value]:e instanceof Gr?e.options:e instanceof $s?$e.objectValues(e.enum):e instanceof Bs?zn(e._def.innerType):e instanceof Ds?[void 0]:e instanceof js?[null]:e instanceof Bn?[void 0,...zn(e.unwrap())]:e instanceof Yr?[null,...zn(e.unwrap())]:e instanceof E1||e instanceof Ws?zn(e.unwrap()):e instanceof Hs?zn(e._def.innerType):[];class xp extends De{_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=zn(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 xp({typeName:we.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Pe(r)})}}function Sd(e,t){const n=ir(e),r=ir(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=$e.objectKeys(t),i=$e.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Sd(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=Sd(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 Fs extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(ay(i)||ay(a))return Ee;const s=Sd(i.value,a.value);return s.valid?((sy(i)||sy(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}))}}Fs.create=(e,t,n)=>new Fs({left:e,right:t,typeName:we.ZodIntersection,...Pe(n)});class Gn extends De{_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 Fn(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 Gn({...this._def,rest:t})}}Gn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gn({items:e,typeName:we.ZodTuple,rest:null,...Pe(t)})};class Ls extends De{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 Fn(r,s,r.path,s)),value:a._parse(new Fn(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 De?new Ls({keyType:t,valueType:n,typeName:we.ZodRecord,...Pe(r)}):new Ls({keyType:$n.create(),valueType:t,typeName:we.ZodRecord,...Pe(n)})}}class Ed extends De{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 Fn(r,s,r.path,[c,"key"])),value:i._parse(new Fn(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}}}}Ed.create=(e,t,n)=>new Ed({valueType:t,keyType:e,typeName:we.ZodMap,...Pe(n)});class Yo extends De{_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 Fn(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Yo({...this._def,minSize:{value:t,message:ve.toString(n)}})}max(t,n){return new Yo({...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)}}Yo.create=(e,t)=>new Yo({valueType:e,minSize:null,maxSize:null,typeName:we.ZodSet,...Pe(t)});class Fi extends De{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 yd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,vd(),oa].filter(c=>!!c),issueData:{code:ne.invalid_arguments,argumentsError:l}})}function o(s,l){return yd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,vd(),oa].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 aa){const s=this;return Yt(async function(...l){const c=new cn([]),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 cn([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new cn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Fi({...this._def,args:Gn.create(t).rest(ko.create())})}returns(t){return new Fi({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Fi({args:t||Gn.create([]).rest(ko.create()),returns:n||ko.create(),typeName:we.ZodFunction,...Pe(r)})}}class Vs extends De{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})}}Vs.create=(e,t)=>new Vs({getter:e,typeName:we.ZodLazy,...Pe(t)});class zs extends De{_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}}zs.create=(e,t)=>new zs({value:e,typeName:we.ZodLiteral,...Pe(t)});function S1(e,t){return new Gr({values:e,typeName:we.ZodEnum,...Pe(t)})}class Gr extends De{constructor(){super(...arguments),Ti.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ce(n,{expected:$e.joinValues(r),received:n.parsedType,code:ne.invalid_type}),Ee}if(Ms(this,Ti)||b1(this,Ti,new Set(this._def.values)),!Ms(this,Ti).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 Gr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Gr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ti=new WeakMap;Gr.create=S1;class $s extends De{constructor(){super(...arguments),Si.set(this,void 0)}_parse(t){const n=$e.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=$e.objectValues(n);return ce(r,{expected:$e.joinValues(o),received:r.parsedType,code:ne.invalid_type}),Ee}if(Ms(this,Si)||b1(this,Si,new Set($e.getValidEnumValues(this._def.values))),!Ms(this,Si).has(t.data)){const o=$e.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}}Si=new WeakMap;$s.create=(e,t)=>new $s({values:e,typeName:we.ZodNativeEnum,...Pe(t)});class aa extends De{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})))}}aa.create=(e,t)=>new aa({type:e,typeName:we.ZodPromise,...Pe(t)});class Yn extends De{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===we.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"?wi(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"?wi(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(!Uo(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=>Uo(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);$e.assertNever(o)}}Yn.create=(e,t,n)=>new Yn({schema:e,typeName:we.ZodEffects,effect:t,...Pe(n)});Yn.createWithPreprocess=(e,t,n)=>new Yn({schema:t,effect:{type:"preprocess",transform:e},typeName:we.ZodEffects,...Pe(n)});class Bn extends De{_parse(t){return this._getType(t)===fe.undefined?Yt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Bn.create=(e,t)=>new Bn({innerType:e,typeName:we.ZodOptional,...Pe(t)});class Yr extends De{_parse(t){return this._getType(t)===fe.null?Yt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Yr.create=(e,t)=>new Yr({innerType:e,typeName:we.ZodNullable,...Pe(t)});class Bs extends De{_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}}Bs.create=(e,t)=>new Bs({innerType:e,typeName:we.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Pe(t)});class Hs extends De{_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 _s(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new cn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new cn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Hs.create=(e,t)=>new Hs({innerType:e,typeName:we.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Pe(t)});class Cd extends De{_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}}}Cd.create=e=>new Cd({typeName:we.ZodNaN,...Pe(e)});class E1 extends De{_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 yl extends De{_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(),wi(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 yl({in:t,out:n,typeName:we.ZodPipeline})}}class Ws extends De{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Uo(o)&&(o.value=Object.freeze(o.value)),o);return _s(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ws.create=(e,t)=>new Ws({innerType:e,typeName:we.ZodReadonly,...Pe(t)});gt.lazycreate;var we;(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"})(we||(we={}));$n.create;Ur.create;Cd.create;Go.create;xd.create;ia.create;bd.create;Ds.create;js.create;wd.create;ko.create;mr.create;Td.create;Mn.create;gt.create;gt.strictCreate;Ns.create;xp.create;Fs.create;Gn.create;Ls.create;Ed.create;Yo.create;Fi.create;Vs.create;zs.create;Gr.create;$s.create;aa.create;Yn.create;Bn.create;Yr.create;Yn.createWithPreprocess;yl.create;const pV=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},hV=(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]}}},C1=e=>e.replace(/\[(\d+)]/g,".$1").split("."),pn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):C1(t),o=structuredClone(e);return hV(o,r,n),o},mV=(e,t)=>e.localeCompare(t),vi={},k1=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return R1(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=k1(e._def.innerType);return t==="ZodArray"?n??[]:n}},R1=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,k1(n)])),P1=(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]=P1(i,o):n[r]=o||i)}return n},gV={sort:mV,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},A1=e=>{const t=new FormData(e),n=new URLSearchParams(t);return H2.parse(n.toString(),gV)},Mr=(e,t)=>C1(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),ar=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),yu=e=>{const t=e.dataset.target;if(!t)return ar(e);const n=document.querySelector(`[data-origin="${t}"]`);return ar(n||e)},vV={state:{},loading:!1,useOnChange:!1},cy=e=>e.dataset.target||e.name,yV=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=Ni.LocalStorage.get(t);return pV(n)?n:{}},clear:()=>void Ni.LocalStorage.delete(t),set:n=>Ni.LocalStorage.set(t,n)}},xV=(e,t,n=vV)=>{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)??R1(e)??{}),l=E.useCallback(m=>{var I;const b=m.target,S=m.currentTarget;if(b.dataset.optional==="true")return;const w=cy(b),C=yu(b)||(S?ar(S):""),k=Mr(w,e);if(b.setAttribute("data-initialized","true"),k){const P=k.safeParse(C),j=P.success?void 0:((I=P.error.issues[0])==null?void 0:I.message)??"";o(D=>pn(D??{},w,j))}},[]),c=E.useCallback(m=>b=>{const S=b.currentTarget,T=Object.values(i.current).reduce((C,k)=>{var F;const I=k.element,P=k.schema.safeParse(ar(I));if(I.dataset.ignore==="ignore"||P.success)return C;const j=(F=P.error.issues[0])==null?void 0:F.message;I.setAttribute("data-initialized","true");const D=I.dataset.name||I.name||"";return pn(C,D,j)},{}),w=ht.empty(T)?null:T;o(w),console.error(w),m==null||m({form:S,errors:w||{}})},[]),u=(m,b=vi)=>{const S=Mr(m,e),T=w=>{var k;if(!w)return;const C=w instanceof Date?w.toISOString():w.target.value;s(I=>pn(I,m,C)),(k=b==null?void 0:b.onChange)==null||k.call(b,w)};return{...b,loading:n.loading,name:m,id:m,onChange:T,form:t,date:ht.string(a[m])?new Date(a[m]):a[m],required:b.required??!S.isOptional(),error:r==null?void 0:r[m],ref:w=>{w!==null&&(i.current[m]={element:w,schema:S})}}},d=(m,b=vi)=>{const S=Mr(m,e);return{...b,name:m,id:m,onChange:w=>{var k;const C=w.target.value;s(I=>pn(I,m,C)),(k=b==null?void 0:b.onChange)==null||k.call(b,w)},form:t,loading:n.loading,onInvalid:l,error:Cr(r,m,void 0),value:Cr(a,m,void 0)||"",required:b.required??!S.isOptional(),ref:w=>w!==null?i.current[m]={element:w,schema:S}:void 0}},p=(m,b=vi)=>{const S=Mr(m,e);return{...b,name:m,id:m,onChange:w=>{var k;const C=w.target.checked;s(I=>pn(I??{},m,C)),(k=b==null?void 0:b.onChange)==null||k.call(b,w)},form:t,loading:n.loading,onInvalid:l,error:Cr(r,m,void 0),required:b.required??!S.isOptional(),ref:w=>w!==null?void(i.current[m]={element:w,schema:S}):void 0}},f=(m,b=vi)=>{const S=Mr(m,e),T=w=>{var k,I;(k=w.persist)==null||k.call(w);const C=w.target.value;(I=b==null?void 0:b.onChange)==null||I.call(b,w),s(P=>pn(P,m,C))};return{...b,loading:n.loading,name:m,id:m,onChange:T,form:t,onInvalid:l,error:Cr(r,m,void 0),required:b.required??!S.isOptional(),value:Cr(a,m,void 0)||(b==null?void 0:b.value)||"",type:ht.instance(S,Ur)?"number":(b==null?void 0:b.type)??"text",ref:w=>w===null?void 0:i.current[m]={element:w,schema:S}}},h=(m,b=vi)=>{const S=Mr(m,e),T=S._def.typeName==="ZodNumber";return{...b,name:m,id:m,onChange:C=>{var I,P;(I=C.persist)==null||I.call(C);const k=T?C.target.valueAsNumber:C.target.value;(P=b==null?void 0:b.onChange)==null||P.call(b,C),s(j=>pn(j,m,k))},form:t,loading:n.loading,onInvalid:l,error:Cr(r,m,void 0),required:b.required??!S.isOptional(),type:T?"number":(b==null?void 0:b.type)??"text",value:Cr(a,m,void 0)||(b==null?void 0:b.value)||"",ref:C=>C===null?void 0:void(i.current[m]={element:C,schema:S})}};E.useEffect(()=>{const m=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(ar(T)),C=j=>{var N;const D=cy(j.target);if(!D)return!1;const F=j.target,R=yu(j.target)||(j.relatedTarget?ar(j.relatedTarget):""),O=S.schema.safeParse(R);if(F.setAttribute("value",R),O.success)return T.setCustomValidity(""),o(L=>{if(ht.null(L))return null;const M=pn(L,D,void 0);return ht.empty(L)||ht.nil(L)||ht.empty(M)?null:M}),!1;if(T.required){const L=((N=O.error.issues[0])==null?void 0:N.message)||"";T.setCustomValidity(L),o(M=>{if(ht.null(M))return null;const q=pn(M,D,L||void 0);return ht.empty(q)?null:q})}return!1},k=new AbortController,I=T.getAttribute("data-trigger")||"blur";T.addEventListener(I,C,{signal:k.signal});const P=T.dataset.shadow?!1:T.required?!w.success:!1;return{input:S,hasInitialError:P,unsubscribe:()=>k.abort()}});return m.some(S=>S.hasInitialError)&&o(S=>S===null?{}:S),()=>m.forEach(S=>S.unsubscribe())});const y=m=>b=>{var P;b.preventDefault();const S=b.currentTarget;let T=A1(S);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(S.elements)).forEach(j=>{if(j.tagName==="SELECT"){const D=j;T=pn(T,D.name,D.value)}if(j.tagName==="INPUT"){const D=j,F=yu(D)||(D?ar(D):"");T=pn(T,D.dataset.target||D.name,F)}});const C=P1(T,a),k=e.safeParse(C),I=()=>{var j;y1(S),(j=n.interceptor)==null||j.clear()};if(k.success){const j=JSON.stringify(k.data);return S.setAttribute("data-json",j),(P=n.interceptor)==null||P.clear(),m==null?void 0:m(b,{form:S,event:b,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(),S.reportValidity(),m==null?void 0:m(b,{form:S,json:T,event:b,reset:I,data:T,success:!1,errors:k.error.issues.map(j=>({message:j.message,path:j.path.map(D=>String(D))}))})},g=m=>_d(a,m)||"",v=m=>({...m,id:t,name:t});return E.useEffect(()=>{var m;n.interceptor&&((m=n.interceptor)==null||m.set(a))},[a]),{get:g,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}},bV=e=>e?JSON.parse(e.getAttribute("data-json")):{},wV=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},TV=()=>{const e=E.useContext(ha);return e?e.parser:il.hsla};exports.Alert=sA;exports.Autocomplete=iF;exports.Button=Ro;exports.Calendar=l0;exports.Card=c0;exports.Checkbox=up;exports.ColType=Co;exports.Collapse=Ab;exports.ComponentsProvider=e_;exports.DatePicker=mF;exports.Dropdown=ci;exports.Empty=u0;exports.Expand=nj;exports.FileUpload=PL;exports.Form=AL;exports.Input=Ea;exports.InputFeedback=Kw;exports.InputField=Sa;exports.Menu=ij;exports.MenuItem=oj;exports.Modal=mj;exports.MultiCombobox=pF;exports.Notifications=rM;exports.Polymorph=Jo;exports.Radiobox=IL;exports.RenderOnView=cS;exports.Select=qr;exports.Stats=oM;exports.Switch=OL;exports.Tab=sM;exports.Table=L2;exports.Tabs=iM;exports.Tag=Dd;exports.TaskList=_L;exports.Textarea=ML;exports.Toolbar=gj;exports.Tooltip=xw;exports.TransferList=NL;exports.createColumns=s2;exports.createCssProperties=YO;exports.createDesignTokens=r0;exports.createFormStorage=yV;exports.createOptionCols=mp;exports.createStyles=UO;exports.createTheme=GO;exports.createTokenStyles=KO;exports.css=Be;exports.defaultDarkTheme=QO;exports.defaultLightTheme=JO;exports.dispatchInput=Od;exports.formReset=y1;exports.formToJson=A1;exports.getJsonForm=bV;exports.getSchemaShape=Mr;exports.hasVerticalScroll=Oy;exports.initializeInputDataset=la;exports.isReactComponent=rS;exports.isReactFC=oS;exports.isSsr=Li;exports.mergeRefs=Id;exports.negate=iS;exports.noop=Md;exports.parsers=il;exports.path=_d;exports.reduceTokens=xo;exports.safeRegex=Tu;exports.splitInto=_y;exports.useColorParser=TV;exports.useForm=xV;exports.useLocale=Rf;exports.useNotification=tM;exports.usePrevious=wV;exports.useReactive=M0;exports.useTablePreferences=u2;exports.useTranslations=Ot;exports.uuid=ca;
|
|
237
197
|
//# sourceMappingURL=index.js.map
|