@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.umd.js
CHANGED
|
@@ -1,237 +1,197 @@
|
|
|
1
|
-
(function(J,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],w):(J=typeof globalThis<"u"?globalThis:J||self,w(J.components={},J.React,J["react/jsx-runtime"],J.ReactDOM))})(this,function(J,w,x,xs){"use strict";var iB=Object.defineProperty;var aB=(J,w,x)=>w in J?iB(J,w,{enumerable:!0,configurable:!0,writable:!0,value:x}):J[w]=x;var ce=(J,w,x)=>aB(J,typeof w!="symbol"?w+"":w,x);function dh(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 P=dh(w),Ss=dh(xs);function fh(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=fh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Xx(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=fh(e))&&(r&&(r+=" "),r+=t);return r}var hh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Jx(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 e1=Error,t1=EvalError,n1=RangeError,r1=ReferenceError,ph=SyntaxError,Ts=TypeError,o1=URIError,s1=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},mh=typeof Symbol<"u"&&Symbol,i1=s1,a1=function(){return typeof mh!="function"||typeof Symbol!="function"||typeof mh("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:i1()},Rl={__proto__:null,foo:{}},l1=Object,c1=function(){return{__proto__:Rl}.foo===Rl.foo&&!(Rl instanceof l1)},u1="Function.prototype.bind called on incompatible ",d1=Object.prototype.toString,f1=Math.max,h1="[object Function]",gh=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},p1=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},m1=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},g1=function(t){var n=this;if(typeof n!="function"||d1.apply(n)!==h1)throw new TypeError(u1+n);for(var r=p1(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,gh(r,arguments));return Object(u)===u?u:this}return n.apply(t,gh(r,arguments))},i=f1(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+m1(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},y1=g1,Bl=Function.prototype.bind||y1,v1=Function.prototype.call,b1=Object.prototype.hasOwnProperty,w1=Bl,x1=w1.call(v1,b1),ke,S1=e1,T1=t1,E1=n1,C1=r1,oo=ph,so=Ts,P1=o1,yh=Function,jl=function(e){try{return yh('"use strict"; return ('+e+").constructor;")()}catch{}},xr=Object.getOwnPropertyDescriptor;if(xr)try{xr({},"")}catch{xr=null}var zl=function(){throw new so},k1=xr?function(){try{return arguments.callee,zl}catch{try{return xr(arguments,"callee").get}catch{return zl}}}():zl,io=a1(),I1=c1(),Tt=Object.getPrototypeOf||(I1?function(e){return e.__proto__}:null),ao={},A1=typeof Uint8Array>"u"||!Tt?ke:Tt(Uint8Array),Sr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?ke:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ke:ArrayBuffer,"%ArrayIteratorPrototype%":io&&Tt?Tt([][Symbol.iterator]()):ke,"%AsyncFromSyncIteratorPrototype%":ke,"%AsyncFunction%":ao,"%AsyncGenerator%":ao,"%AsyncGeneratorFunction%":ao,"%AsyncIteratorPrototype%":ao,"%Atomics%":typeof Atomics>"u"?ke:Atomics,"%BigInt%":typeof BigInt>"u"?ke:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ke:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ke:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ke:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":S1,"%eval%":eval,"%EvalError%":T1,"%Float32Array%":typeof Float32Array>"u"?ke:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ke:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ke:FinalizationRegistry,"%Function%":yh,"%GeneratorFunction%":ao,"%Int8Array%":typeof Int8Array>"u"?ke:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ke:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ke:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":io&&Tt?Tt(Tt([][Symbol.iterator]())):ke,"%JSON%":typeof JSON=="object"?JSON:ke,"%Map%":typeof Map>"u"?ke:Map,"%MapIteratorPrototype%":typeof Map>"u"||!io||!Tt?ke:Tt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ke:Promise,"%Proxy%":typeof Proxy>"u"?ke:Proxy,"%RangeError%":E1,"%ReferenceError%":C1,"%Reflect%":typeof Reflect>"u"?ke:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ke:Set,"%SetIteratorPrototype%":typeof Set>"u"||!io||!Tt?ke:Tt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ke:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":io&&Tt?Tt(""[Symbol.iterator]()):ke,"%Symbol%":io?Symbol:ke,"%SyntaxError%":oo,"%ThrowTypeError%":k1,"%TypedArray%":A1,"%TypeError%":so,"%Uint8Array%":typeof Uint8Array>"u"?ke:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ke:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ke:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ke:Uint32Array,"%URIError%":P1,"%WeakMap%":typeof WeakMap>"u"?ke:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ke:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ke:WeakSet};if(Tt)try{null.error}catch(e){var O1=Tt(Tt(e));Sr["%Error.prototype%"]=O1}var _1=function e(t){var n;if(t==="%AsyncFunction%")n=jl("async function () {}");else if(t==="%GeneratorFunction%")n=jl("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=jl("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Tt&&(n=Tt(o.prototype))}return Sr[t]=n,n},vh={__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"]},Es=Bl,$i=x1,M1=Es.call(Function.call,Array.prototype.concat),D1=Es.call(Function.apply,Array.prototype.splice),bh=Es.call(Function.call,String.prototype.replace),Ri=Es.call(Function.call,String.prototype.slice),N1=Es.call(Function.call,RegExp.prototype.exec),L1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F1=/\\(\\)?/g,V1=function(t){var n=Ri(t,0,1),r=Ri(t,-1);if(n==="%"&&r!=="%")throw new oo("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new oo("invalid intrinsic syntax, expected opening `%`");var o=[];return bh(t,L1,function(s,i,a,l){o[o.length]=a?bh(l,F1,"$1"):i||s}),o},$1=function(t,n){var r=t,o;if($i(vh,r)&&(o=vh[r],r="%"+o[0]+"%"),$i(Sr,r)){var s=Sr[r];if(s===ao&&(s=_1(r)),typeof s>"u"&&!n)throw new so("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new oo("intrinsic "+t+" does not exist!")},lo=function(t,n){if(typeof t!="string"||t.length===0)throw new so("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new so('"allowMissing" argument must be a boolean');if(N1(/^%?[^%]*%?$/,t)===null)throw new oo("`%` 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],D1(r,M1([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=Ri(f,0,1),m=Ri(f,-1);if((h==='"'||h==="'"||h==="`"||m==='"'||m==="'"||m==="`")&&h!==m)throw new oo("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,i="%"+o+"%",$i(Sr,i))a=Sr[i];else if(a!=null){if(!(f in a)){if(!n)throw new so("base intrinsic for "+t+" exists, but the property is not available.");return}if(xr&&u+1>=r.length){var p=xr(a,f);d=!!p,d&&"get"in p&&!("originalValue"in p.get)?a=p.get:a=a[f]}else d=$i(a,f),a=a[f];d&&!l&&(Sr[i]=a)}}return a},wh={exports:{}},Wl,xh;function Hl(){if(xh)return Wl;xh=1;var e=lo,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Wl=t,Wl}var R1=lo,Bi=R1("%Object.getOwnPropertyDescriptor%",!0);if(Bi)try{Bi([],"length")}catch{Bi=null}var Sh=Bi,Th=Hl(),B1=ph,co=Ts,Eh=Sh,j1=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new co("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new co("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new co("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new co("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new co("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new co("`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=!!Eh&&Eh(t,n);if(Th)Th(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 B1("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Ul=Hl(),Ch=function(){return!!Ul};Ch.hasArrayLengthDefineBug=function(){if(!Ul)return null;try{return Ul([],"length",{value:1}).length!==1}catch{return!0}};var z1=Ch,W1=lo,Ph=j1,H1=z1(),kh=Sh,Ih=Ts,U1=W1("%Math.floor%"),G1=function(t,n){if(typeof t!="function")throw new Ih("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||U1(n)!==n)throw new Ih("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&kh){var i=kh(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(H1?Ph(t,"length",n,!0,!0):Ph(t,"length",n)),t};(function(e){var t=Bl,n=lo,r=G1,o=Ts,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=Hl(),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})(wh);var Y1=wh.exports,Ah=lo,Oh=Y1,q1=Oh(Ah("String.prototype.indexOf")),K1=function(t,n){var r=Ah(t,!!n);return typeof r=="function"&&q1(t,".prototype.")>-1?Oh(r):r};const Z1=Jx(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Gl=typeof Map=="function"&&Map.prototype,Yl=Object.getOwnPropertyDescriptor&&Gl?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ji=Gl&&Yl&&typeof Yl.get=="function"?Yl.get:null,_h=Gl&&Map.prototype.forEach,ql=typeof Set=="function"&&Set.prototype,Kl=Object.getOwnPropertyDescriptor&&ql?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,zi=ql&&Kl&&typeof Kl.get=="function"?Kl.get:null,Mh=ql&&Set.prototype.forEach,X1=typeof WeakMap=="function"&&WeakMap.prototype,Cs=X1?WeakMap.prototype.has:null,Q1=typeof WeakSet=="function"&&WeakSet.prototype,Ps=Q1?WeakSet.prototype.has:null,J1=typeof WeakRef=="function"&&WeakRef.prototype,Dh=J1?WeakRef.prototype.deref:null,eS=Boolean.prototype.valueOf,tS=Object.prototype.toString,nS=Function.prototype.toString,rS=String.prototype.match,Zl=String.prototype.slice,Kn=String.prototype.replace,oS=String.prototype.toUpperCase,Nh=String.prototype.toLowerCase,Lh=RegExp.prototype.test,Fh=Array.prototype.concat,yn=Array.prototype.join,sS=Array.prototype.slice,Vh=Math.floor,Xl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ql=Object.getOwnPropertySymbols,Jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,uo=typeof Symbol=="function"&&typeof Symbol.iterator=="object",_t=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===uo||!0)?Symbol.toStringTag:null,$h=Object.prototype.propertyIsEnumerable,Rh=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Bh(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Lh.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Vh(-e):Vh(e);if(r!==e){var o=String(r),s=Zl.call(t,o.length+1);return Kn.call(o,n,"$&_")+"."+Kn.call(Kn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Kn.call(t,n,"$&_")}var ec=Z1,jh=ec.custom,zh=Uh(jh)?jh:null,iS=function e(t,n,r,o){var s=n||{};if(Zn(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Zn(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=Zn(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(Zn(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(Zn(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 Yh(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Bh(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Bh(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 tc(t)?"[Array]":"[Object]";var d=ES(s,r);if(typeof o>"u")o=[];else if(Gh(o,t)>=0)return"[Circular]";function f(V,k,_){if(k&&(o=sS.call(o),o.push(k)),_){var F={depth:s.depth};return Zn(s,"quoteStyle")&&(F.quoteStyle=s.quoteStyle),e(V,F,r+1,o)}return e(V,s,r+1,o)}if(typeof t=="function"&&!Hh(t)){var h=mS(t),m=Wi(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(m.length>0?" { "+yn.call(m,", ")+" }":"")}if(Uh(t)){var p=uo?Kn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Jl.call(t);return typeof t=="object"&&!uo?ks(p):p}if(xS(t)){for(var v="<"+Nh.call(String(t.nodeName)),b=t.attributes||[],y=0;y<b.length;y++)v+=" "+b[y].name+"="+Wh(aS(b[y].value),"double",s);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+Nh.call(String(t.nodeName))+">",v}if(tc(t)){if(t.length===0)return"[]";var g=Wi(t,f);return d&&!TS(g)?"["+rc(g,d)+"]":"[ "+yn.call(g,", ")+" ]"}if(cS(t)){var T=Wi(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!$h.call(t,"cause")?"{ ["+String(t)+"] "+yn.call(Fh.call("[cause]: "+f(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+yn.call(T,", ")+" }"}if(typeof t=="object"&&i){if(zh&&typeof t[zh]=="function"&&ec)return ec(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(gS(t)){var S=[];return _h&&_h.call(t,function(V,k){S.push(f(k,t,!0)+" => "+f(V,t))}),qh("Map",ji.call(t),S,d)}if(bS(t)){var E=[];return Mh&&Mh.call(t,function(V){E.push(f(V,t))}),qh("Set",zi.call(t),E,d)}if(yS(t))return nc("WeakMap");if(wS(t))return nc("WeakSet");if(vS(t))return nc("WeakRef");if(dS(t))return ks(f(Number(t)));if(hS(t))return ks(f(Xl.call(t)));if(fS(t))return ks(eS.call(t));if(uS(t))return ks(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof hh<"u"&&t===hh)return"{ [object globalThis] }";if(!lS(t)&&!Hh(t)){var C=Wi(t,f),I=Rh?Rh(t)===Object.prototype:t instanceof Object||t.constructor===Object,A=t instanceof Object?"":"null prototype",O=!I&&_t&&Object(t)===t&&_t in t?Zl.call(Xn(t),8,-1):A?"Object":"",L=I||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",D=L+(O||A?"["+yn.call(Fh.call([],O||[],A||[]),": ")+"] ":"");return C.length===0?D+"{}":d?D+"{"+rc(C,d)+"}":D+"{ "+yn.call(C,", ")+" }"}return String(t)};function Wh(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function aS(e){return Kn.call(String(e),/"/g,""")}function tc(e){return Xn(e)==="[object Array]"&&(!_t||!(typeof e=="object"&&_t in e))}function lS(e){return Xn(e)==="[object Date]"&&(!_t||!(typeof e=="object"&&_t in e))}function Hh(e){return Xn(e)==="[object RegExp]"&&(!_t||!(typeof e=="object"&&_t in e))}function cS(e){return Xn(e)==="[object Error]"&&(!_t||!(typeof e=="object"&&_t in e))}function uS(e){return Xn(e)==="[object String]"&&(!_t||!(typeof e=="object"&&_t in e))}function dS(e){return Xn(e)==="[object Number]"&&(!_t||!(typeof e=="object"&&_t in e))}function fS(e){return Xn(e)==="[object Boolean]"&&(!_t||!(typeof e=="object"&&_t in e))}function Uh(e){if(uo)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Jl)return!1;try{return Jl.call(e),!0}catch{}return!1}function hS(e){if(!e||typeof e!="object"||!Xl)return!1;try{return Xl.call(e),!0}catch{}return!1}var pS=Object.prototype.hasOwnProperty||function(e){return e in this};function Zn(e,t){return pS.call(e,t)}function Xn(e){return tS.call(e)}function mS(e){if(e.name)return e.name;var t=rS.call(nS.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Gh(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 gS(e){if(!ji||!e||typeof e!="object")return!1;try{ji.call(e);try{zi.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function yS(e){if(!Cs||!e||typeof e!="object")return!1;try{Cs.call(e,Cs);try{Ps.call(e,Ps)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function vS(e){if(!Dh||!e||typeof e!="object")return!1;try{return Dh.call(e),!0}catch{}return!1}function bS(e){if(!zi||!e||typeof e!="object")return!1;try{zi.call(e);try{ji.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function wS(e){if(!Ps||!e||typeof e!="object")return!1;try{Ps.call(e,Ps);try{Cs.call(e,Cs)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function xS(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Yh(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Yh(Zl.call(e,0,t.maxStringLength),t)+r}var o=Kn.call(Kn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,SS);return Wh(o,"single",t)}function SS(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":"")+oS.call(t.toString(16))}function ks(e){return"Object("+e+")"}function nc(e){return e+" { ? }"}function qh(e,t,n,r){var o=r?rc(n,r):yn.call(n,", ");return e+" ("+t+") {"+o+"}"}function TS(e){for(var t=0;t<e.length;t++)if(Gh(e[t],`
|
|
2
|
-
`)>=0)return!1;return!0}function
|
|
3
|
-
`+
|
|
4
|
-
`+t.prev}function Wi(e,t){var n=tc(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Zn(e,o)?t(e[o],e):""}var s=typeof Ql=="function"?Ql(e):[],i;if(uo){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)Zn(e,l)&&(n&&String(Number(l))===l&&l<e.length||uo&&i["$"+l]instanceof Symbol||(Lh.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++)$h.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var Kh=lo,fo=K1,CS=iS,PS=Ts,Hi=Kh("%WeakMap%",!0),Ui=Kh("%Map%",!0),kS=fo("WeakMap.prototype.get",!0),IS=fo("WeakMap.prototype.set",!0),AS=fo("WeakMap.prototype.has",!0),OS=fo("Map.prototype.get",!0),_S=fo("Map.prototype.set",!0),MS=fo("Map.prototype.has",!0),oc=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},DS=function(e,t){var n=oc(e,t);return n&&n.value},NS=function(e,t,n){var r=oc(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},LS=function(e,t){return!!oc(e,t)},FS=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new PS("Side channel does not contain "+CS(s))},get:function(s){if(Hi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return kS(t,s)}else if(Ui){if(n)return OS(n,s)}else if(r)return DS(r,s)},has:function(s){if(Hi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return AS(t,s)}else if(Ui){if(n)return MS(n,s)}else if(r)return LS(r,s);return!1},set:function(s,i){Hi&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new Hi),IS(t,s,i)):Ui?(n||(n=new Ui),_S(n,s,i)):(r||(r={key:{},next:null}),NS(r,s,i))}};return o},Zh=e=>Array.isArray(e),sc=e=>e===void 0,ic=e=>e===null,VS=Function.bind.call(Function.call,Object.prototype.toString),$S=e=>!!e&&VS(e)==="[object Error]"||e instanceof Error,Xh=(e,t)=>e instanceof t,RS=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},BS=e=>Object.prototype.toString.call(e)==="[object Date]"&&Xh(e,Date),it={array:Zh,date:BS,empty:e=>ic(e)||sc(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:Xh,isError:$S,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>ic(e)||sc(e),null:ic,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Zh(e)&&typeof e=="object",primitive:RS,string:e=>typeof e=="string",undefined:sc},jS=e=>Object.keys(e),Tr=(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 ac="-";function zS(e){const t=HS(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(ac);return a[0]===""&&a.length!==1&&a.shift(),Qh(a,t)||WS(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Qh(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Qh(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(ac);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Jh=/^\[(.+)\]$/;function WS(e){if(Jh.test(e)){const t=Jh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function HS(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return GS(Object.entries(e.classGroups),n).forEach(([s,i])=>{lc(i,r,s,t)}),r}function lc(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:ep(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(US(o)){lc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{lc(i,ep(t,s),n,r)})})}function ep(e,t){let n=e;return t.split(ac).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function US(e){return e.isThemeGetter}function GS(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 YS(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 tp="!";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(tp),m=h?f.substring(1):f,p=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}}return n?function(l){return n({className:l,parseClassName:i})}:i}function KS(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 ZS(e){return{cache:YS(e.cacheSize),parseClassName:qS(e),...zS(e)}}const XS=/\s+/;function QS(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(XS).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=KS(a).join(":");return{isTailwindClass:!0,modifierId:l?h+tp: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 JS(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=np(t))&&(r&&(r+=" "),r+=n);return r}function np(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=np(e[r]))&&(n&&(n+=" "),n+=t);return n}function eT(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=ZS(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=QS(l,n);return o(l,u),u}return function(){return s(JS.apply(null,arguments))}}function Ze(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const rp=/^\[(?:([a-z-]+):)?(.+)\]$/i,tT=/^\d+\/\d+$/,nT=new Set(["px","full","screen"]),rT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oT=/\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$/,sT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,iT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,aT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function $n(e){return Er(e)||nT.has(e)||tT.test(e)}function Qn(e){return ho(e,"length",mT)}function Er(e){return!!e&&!Number.isNaN(Number(e))}function Gi(e){return ho(e,"number",Er)}function Is(e){return!!e&&Number.isInteger(Number(e))}function lT(e){return e.endsWith("%")&&Er(e.slice(0,-1))}function Se(e){return rp.test(e)}function Jn(e){return rT.test(e)}const cT=new Set(["length","size","percentage"]);function uT(e){return ho(e,cT,op)}function dT(e){return ho(e,"position",op)}const fT=new Set(["image","url"]);function hT(e){return ho(e,fT,yT)}function pT(e){return ho(e,"",gT)}function As(){return!0}function ho(e,t,n){const r=rp.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function mT(e){return oT.test(e)&&!sT.test(e)}function op(){return!1}function gT(e){return iT.test(e)}function yT(e){return aT.test(e)}function vT(){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"),m=Ze("gradientColorStopPositions"),p=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"),I=Ze("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",Se,t],D=()=>[Se,t],V=()=>["",$n,Qn],k=()=>["auto",Er,Se],_=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],N=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",Se],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Er,Gi],K=()=>[Er,Se];return{cacheSize:500,separator:":",theme:{colors:[As],spacing:[$n,Qn],blur:["none","",Jn,Se],brightness:B(),borderColor:[e],borderRadius:["none","","full",Jn,Se],borderSpacing:D(),borderWidth:V(),contrast:B(),grayscale:H(),hueRotate:K(),invert:H(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[lT,Qn],inset:L(),margin:L(),opacity:B(),padding:D(),saturate:B(),scale:B(),sepia:H(),skew:K(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",Se]}],container:["container"],columns:[{columns:[Jn]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[..._(),Se]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Is,Se]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Se]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",Is,Se]}],"grid-cols":[{"grid-cols":[As]}],"col-start-end":[{col:["auto",{span:["full",Is,Se]},Se]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[As]}],"row-start-end":[{row:["auto",{span:[Is,Se]},Se]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Se]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"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",Se,t]}],"min-w":[{"min-w":[Se,t,"min","max","fit"]}],"max-w":[{"max-w":[Se,t,"none","full","min","max","fit","prose",{screen:[Jn]},Jn]}],h:[{h:[Se,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Se,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Se,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Se,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Jn,Qn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Gi]}],"font-family":[{font:[As]}],"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",Se]}],"line-clamp":[{"line-clamp":["none",Er,Gi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$n,Se]}],"list-image":[{"list-image":["none",Se]}],"list-style-type":[{list:["none","disc","decimal",Se]}],"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:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$n,Qn]}],"underline-offset":[{"underline-offset":["auto",$n,Se]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se]}],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",Se]}],"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:[..._(),dT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",uT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},hT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"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:[...F(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[$n,Se]}],"outline-w":[{outline:[$n,Qn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[$n,Qn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Jn,pT]}],"shadow-color":[{shadow:[As]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...N(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":N()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Jn,Se]}],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",Se]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",Se]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",Se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[Is,Se]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Se]}],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",Se]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Se]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$n,Qn,Gi]}],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 bT=eT(vT),cc=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},wT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),xT=e=>it.function(e),De=(...e)=>bT(Xx(e)),uc=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},Os=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},en=(e,t=2)=>e.toString(16).padStart(t,"0"),_s=()=>{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,`${en(t,4)+en(n,3)}-${en(r[0])+en(r[1])}-${en(r[2])+en(r[3])}-${en(r[4])+en(r[5])}-${en(r[6])+en(r[7])+en(r[8])+en(r[9])}`},sp=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),ip={basic:/[,[\]]+?/,extend:/[,[\].]+?/},dc=(e,t)=>{const n=sp(t,ip.basic,e)||sp(t,ip.extend,e);return n===void 0||n===e?void 0:n},Yi=()=>typeof window>"u",fc=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),ap=(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},ST=e=>!e,hc=()=>{};function lp(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=lp(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function TT(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=lp(e))&&(r&&(r+=" "),r+=t);return r}const cp=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,up=TT,po=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return up(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=cp(u)||cp(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(m=>{let[p,v]=m;return Array.isArray(v)?v.includes({...s,...a}[p]):{...s,...a}[p]===v})?[...c,d,f]:c},[]);return up(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},ET="span",mo=w.forwardRef(function(t,n){const r=t.as||ET;return x.jsx(r,{ref:n,...t,as:void 0})}),CT=po("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"}}),go=w.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:s="button",size:i,rounded:a,...l},c){const u=r||l.disabled;return x.jsxs(mo,{...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:De(CT({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),Ms=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t};function PT(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 kT=({children:e,...t})=>{const n=Ms(t.onIntersection),r=w.useRef(null),[o,s]=w.useState(()=>r.current===null?!1:PT(r.current));return w.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()},[]),x.jsx("div",{...t,ref:r,children:o?e:null})},IT=po("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"}}}),AT=po("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"}}),pc=w.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:s,size:i,...a},l){return x.jsxs(mo,{...a,ref:l,"data-theme":s,"data-component":"tag",as:a.as??"span",className:De(AT({size:i,theme:s}),t),children:[n?x.jsx("span",{className:IT({theme:n})}):null,r,a.children]})}),Ds=w.createContext({});function an(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const qi=w.createContext(null),yo=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class OT extends P.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 _T({children:e,isPresent:t,anchorX:n}){const r=w.useId(),o=w.useRef(null),s=w.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=w.useContext(yo);return w.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
|
+
(function(ae,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],E):(ae=typeof globalThis<"u"?globalThis:ae||self,E(ae.components={},ae.React,ae["react/jsx-runtime"],ae.ReactDOM))})(this,function(ae,E,b,hi){"use strict";var Uj=Object.defineProperty;var Gj=(ae,E,b)=>E in ae?Uj(ae,E,{enumerable:!0,configurable:!0,writable:!0,value:b}):ae[E]=b;var pe=(ae,E,b)=>Gj(ae,typeof E!="symbol"?E+"":E,b);function wp(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 _=wp(E),ka=wp(hi);function Tp(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=Tp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Sp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Tp(e))&&(r&&(r+=" "),r+=t);return r}var Ep=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function O1(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 xl,kp;function io(){return kp||(kp=1,xl=TypeError),xl}const M1=O1(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var wl,Pp;function Pa(){if(Pp)return wl;Pp=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,x=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,A=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,P=typeof Symbol=="function"&&typeof Symbol.iterator=="object",O=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P||!0)?Symbol.toStringTag:null,L=Object.prototype.propertyIsEnumerable,j=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(B){return B.__proto__}:null);function D(B,W){if(B===1/0||B===-1/0||B!==B||B&&B>-1e3&&B<1e3||w.call(/e/,W))return W;var Ve=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof B=="number"){var Je=B<0?-A(-B):A(B);if(Je!==B){var st=String(Je),Me=m.call(W,st.length+1);return x.call(st,Ve,"$&_")+"."+x.call(x.call(Me,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(W,Ve,"$&_")}var q=M1,M=q.custom,$=Ae(M)?M:null,Q={__proto__:null,double:'"',single:"'"},ie={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};wl=function B(W,Ve,Je,st){var Me=Ve||{};if(K(Me,"quoteStyle")&&!K(Q,Me.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(K(Me,"maxStringLength")&&(typeof Me.maxStringLength=="number"?Me.maxStringLength<0&&Me.maxStringLength!==1/0:Me.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Sr=K(Me,"customInspect")?Me.customInspect:!0;if(typeof Sr!="boolean"&&Sr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(Me,"indent")&&Me.indent!==null&&Me.indent!==" "&&!(parseInt(Me.indent,10)===Me.indent&&Me.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(Me,"numericSeparator")&&typeof Me.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var oo=Me.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 Ze(W,Me);if(typeof W=="number"){if(W===0)return 1/0/W>0?"0":"-0";var rn=String(W);return oo?D(W,rn):rn}if(typeof W=="bigint"){var Er=String(W)+"n";return oo?D(W,Er):Er}var pp=typeof Me.depth>"u"?5:Me.depth;if(typeof Je>"u"&&(Je=0),Je>=pp&&pp>0&&typeof W=="object")return Z(W)?"[Array]":"[Object]";var fi=xr(Me,Je);if(typeof st>"u")st=[];else if(ee(st,W)>=0)return"[Circular]";function Tn(pi,bl,qj){if(bl&&(st=I.call(st),st.push(bl)),qj){var I1={depth:Me.depth};return K(Me,"quoteStyle")&&(I1.quoteStyle=Me.quoteStyle),B(pi,I1,Je+1,st)}return B(pi,Me,Je+1,st)}if(typeof W=="function"&&!H(W)){var S1=G(W),E1=Tr(W,Tn);return"[Function"+(S1?": "+S1:" (anonymous)")+"]"+(E1.length>0?" { "+k.call(E1,", ")+" }":"")}if(Ae(W)){var C1=P?x.call(String(W),/^(Symbol\(.*\))_[^)]*$/,"$1"):V.call(W);return typeof W=="object"&&!P?pt(C1):C1}if($e(W)){for(var Ca="<"+T.call(String(W.nodeName)),hp=W.attributes||[],yl=0;yl<hp.length;yl++)Ca+=" "+hp[yl].name+"="+J(Y(hp[yl].value),"double",Me);return Ca+=">",W.childNodes&&W.childNodes.length&&(Ca+="..."),Ca+="</"+T.call(String(W.nodeName))+">",Ca}if(Z(W)){if(W.length===0)return"[]";var mp=Tr(W,Tn);return fi&&!$n(mp)?"["+wr(mp,fi)+"]":"[ "+k.call(mp,", ")+" ]"}if(X(W)){var gp=Tr(W,Tn);return!("cause"in Error.prototype)&&"cause"in W&&!L.call(W,"cause")?"{ ["+String(W)+"] "+k.call(C.call("[cause]: "+Tn(W.cause),gp),", ")+" }":gp.length===0?"["+String(W)+"]":"{ ["+String(W)+"] "+k.call(gp,", ")+" }"}if(typeof W=="object"&&Sr){if($&&typeof W[$]=="function"&&q)return q(W,{depth:pp-Je});if(Sr!=="symbol"&&typeof W.inspect=="function")return W.inspect()}if(ye(W)){var k1=[];return r&&r.call(W,function(pi,bl){k1.push(Tn(bl,W,!0)+" => "+Tn(pi,W))}),wn("Map",n.call(W),k1,fi)}if(oe(W)){var P1=[];return s&&s.call(W,function(pi){P1.push(Tn(pi,W))}),wn("Set",a.call(W),P1,fi)}if(de(W))return Lt("WeakMap");if(ce(W))return Lt("WeakSet");if(Re(W))return Lt("WeakRef");if(z(W))return pt(Tn(Number(W)));if(Ie(W))return pt(Tn(F.call(W)));if(xe(W))return pt(h.call(W));if(re(W))return pt(Tn(String(W)));if(typeof window<"u"&&W===window)return"{ [object Window] }";if(typeof globalThis<"u"&&W===globalThis||typeof Ep<"u"&&W===Ep)return"{ [object globalThis] }";if(!R(W)&&!H(W)){var vp=Tr(W,Tn),A1=j?j(W)===Object.prototype:W instanceof Object||W.constructor===Object,yp=W instanceof Object?"":"null prototype",_1=!A1&&O&&Object(W)===W&&O in W?m.call(se(W),8,-1):yp?"Object":"",Wj=A1||typeof W.constructor!="function"?"":W.constructor.name?W.constructor.name+" ":"",bp=Wj+(_1||yp?"["+k.call(C.call([],_1||[],yp||[]),": ")+"] ":"");return vp.length===0?bp+"{}":fi?bp+"{"+wr(vp,fi)+"}":bp+"{ "+k.call(vp,", ")+" }"}return String(W)};function J(B,W,Ve){var Je=Ve.quoteStyle||W,st=Q[Je];return st+B+st}function Y(B){return x.call(String(B),/"/g,""")}function U(B){return!O||!(typeof B=="object"&&(O in B||typeof B[O]<"u"))}function Z(B){return se(B)==="[object Array]"&&U(B)}function R(B){return se(B)==="[object Date]"&&U(B)}function H(B){return se(B)==="[object RegExp]"&&U(B)}function X(B){return se(B)==="[object Error]"&&U(B)}function re(B){return se(B)==="[object String]"&&U(B)}function z(B){return se(B)==="[object Number]"&&U(B)}function xe(B){return se(B)==="[object Boolean]"&&U(B)}function Ae(B){if(P)return B&&typeof B=="object"&&B instanceof Symbol;if(typeof B=="symbol")return!0;if(!B||typeof B!="object"||!V)return!1;try{return V.call(B),!0}catch{}return!1}function Ie(B){if(!B||typeof B!="object"||!F)return!1;try{return F.call(B),!0}catch{}return!1}var Se=Object.prototype.hasOwnProperty||function(B){return B in this};function K(B,W){return Se.call(B,W)}function se(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 Ve=0,Je=B.length;Ve<Je;Ve++)if(B[Ve]===W)return Ve;return-1}function ye(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 de(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 Re(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 ce(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 $e(B){return!B||typeof B!="object"?!1:typeof HTMLElement<"u"&&B instanceof HTMLElement?!0:typeof B.nodeName=="string"&&typeof B.getAttribute=="function"}function Ze(B,W){if(B.length>W.maxStringLength){var Ve=B.length-W.maxStringLength,Je="... "+Ve+" more character"+(Ve>1?"s":"");return Ze(m.call(B,0,W.maxStringLength),W)+Je}var st=ie[W.quoteStyle||"single"];st.lastIndex=0;var Me=x.call(x.call(B,st,"\\$1"),/[\x00-\x1f]/g,Ct);return J(Me,"single",W)}function Ct(B){var W=B.charCodeAt(0),Ve={8:"b",9:"t",10:"n",12:"f",13:"r"}[W];return Ve?"\\"+Ve:"\\x"+(W<16?"0":"")+S.call(W.toString(16))}function pt(B){return"Object("+B+")"}function Lt(B){return B+" { ? }"}function wn(B,W,Ve,Je){var st=Je?wr(Ve,Je):k.call(Ve,", ");return B+" ("+W+") {"+st+"}"}function $n(B){for(var W=0;W<B.length;W++)if(ee(B[W],`
|
|
2
|
+
`)>=0)return!1;return!0}function xr(B,W){var Ve;if(B.indent===" ")Ve=" ";else if(typeof B.indent=="number"&&B.indent>0)Ve=k.call(Array(B.indent+1)," ");else return null;return{base:Ve,prev:k.call(Array(W+1),Ve)}}function wr(B,W){if(B.length===0)return"";var Ve=`
|
|
3
|
+
`+W.prev+W.base;return Ve+k.call(B,","+Ve)+`
|
|
4
|
+
`+W.prev}function Tr(B,W){var Ve=Z(B),Je=[];if(Ve){Je.length=B.length;for(var st=0;st<B.length;st++)Je[st]=K(B,st)?W(B[st],B):""}var Me=typeof N=="function"?N(B):[],Sr;if(P){Sr={};for(var oo=0;oo<Me.length;oo++)Sr["$"+Me[oo]]=Me[oo]}for(var rn in B)K(B,rn)&&(Ve&&String(Number(rn))===rn&&rn<B.length||P&&Sr["$"+rn]instanceof Symbol||(w.call(/[^\w$]/,rn)?Je.push(W(rn,B)+": "+W(B[rn],B)):Je.push(rn+": "+W(B[rn],B))));if(typeof N=="function")for(var Er=0;Er<Me.length;Er++)L.call(B,Me[Er])&&Je.push("["+W(Me[Er])+"]: "+W(B[Me[Er]],B));return Je}return wl}var Tl,Ap;function D1(){if(Ap)return Tl;Ap=1;var e=Pa(),t=io(),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 Tl=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},Tl}var Sl,_p;function Ip(){return _p||(_p=1,Sl=Object),Sl}var El,Op;function N1(){return Op||(Op=1,El=Error),El}var Cl,Mp;function F1(){return Mp||(Mp=1,Cl=EvalError),Cl}var kl,Dp;function L1(){return Dp||(Dp=1,kl=RangeError),kl}var Pl,Np;function V1(){return Np||(Np=1,Pl=ReferenceError),Pl}var Al,Fp;function j1(){return Fp||(Fp=1,Al=SyntaxError),Al}var _l,Lp;function R1(){return Lp||(Lp=1,_l=URIError),_l}var Il,Vp;function $1(){return Vp||(Vp=1,Il=Math.abs),Il}var Ol,jp;function z1(){return jp||(jp=1,Ol=Math.floor),Ol}var Ml,Rp;function B1(){return Rp||(Rp=1,Ml=Math.max),Ml}var Dl,$p;function H1(){return $p||($p=1,Dl=Math.min),Dl}var Nl,zp;function W1(){return zp||(zp=1,Nl=Math.pow),Nl}var Fl,Bp;function q1(){return Bp||(Bp=1,Fl=Math.round),Fl}var Ll,Hp;function U1(){return Hp||(Hp=1,Ll=Number.isNaN||function(t){return t!==t}),Ll}var Vl,Wp;function G1(){if(Wp)return Vl;Wp=1;var e=U1();return Vl=function(n){return e(n)||n===0?n:n<0?-1:1},Vl}var jl,qp;function Y1(){return qp||(qp=1,jl=Object.getOwnPropertyDescriptor),jl}var Rl,Up;function Gp(){if(Up)return Rl;Up=1;var e=Y1();if(e)try{e([],"length")}catch{e=null}return Rl=e,Rl}var $l,Yp;function K1(){if(Yp)return $l;Yp=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return $l=e,$l}var zl,Kp;function Z1(){return Kp||(Kp=1,zl=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}),zl}var Bl,Zp;function X1(){if(Zp)return Bl;Zp=1;var e=typeof Symbol<"u"&&Symbol,t=Z1();return Bl=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Bl}var Hl,Xp;function Qp(){return Xp||(Xp=1,Hl=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Hl}var Wl,Jp;function eh(){if(Jp)return Wl;Jp=1;var e=Ip();return Wl=e.getPrototypeOf||null,Wl}var ql,th;function Q1(){if(th)return ql;th=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 ql=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},ql}var Ul,nh;function Aa(){if(nh)return Ul;nh=1;var e=Q1();return Ul=Function.prototype.bind||e,Ul}var Gl,rh;function Yl(){return rh||(rh=1,Gl=Function.prototype.call),Gl}var Kl,oh;function ih(){return oh||(oh=1,Kl=Function.prototype.apply),Kl}var Zl,ah;function J1(){return ah||(ah=1,Zl=typeof Reflect<"u"&&Reflect&&Reflect.apply),Zl}var Xl,sh;function eT(){if(sh)return Xl;sh=1;var e=Aa(),t=ih(),n=Yl(),r=J1();return Xl=r||e.call(n,t),Xl}var Ql,lh;function ch(){if(lh)return Ql;lh=1;var e=Aa(),t=io(),n=Yl(),r=eT();return Ql=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},Ql}var Jl,uh;function tT(){if(uh)return Jl;uh=1;var e=ch(),t=Gp(),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 Jl=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,Jl}var ec,dh;function nT(){if(dh)return ec;dh=1;var e=Qp(),t=eh(),n=tT();return ec=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,ec}var tc,fh;function rT(){if(fh)return tc;fh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Aa();return tc=n.call(e,t),tc}var nc,ph;function rc(){if(ph)return nc;ph=1;var e,t=Ip(),n=N1(),r=F1(),o=L1(),i=V1(),a=j1(),s=io(),l=R1(),c=$1(),u=z1(),d=B1(),p=H1(),f=W1(),h=q1(),y=G1(),g=Function,v=function(H){try{return g('"use strict"; return ('+H+").constructor;")()}catch{}},m=Gp(),x=K1(),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=X1()(),C=nT(),k=eh(),I=Qp(),A=ih(),F=Yl(),N={},V=typeof Uint8Array>"u"||!C?e:C(Uint8Array),P={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":w&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":N,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!w||!C?e:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":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%":V,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":F,"%Function.prototype.apply%":A,"%Object.defineProperty%":x,"%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));P["%Error.prototype%"]=O}var L=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 z=H("%AsyncGeneratorFunction%");z&&(re=z.prototype)}else if(X==="%AsyncIteratorPrototype%"){var xe=H("%AsyncGenerator%");xe&&C&&(re=C(xe.prototype))}return P[X]=re,re},j={__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"]},D=Aa(),q=rT(),M=D.call(F,Array.prototype.concat),$=D.call(A,Array.prototype.splice),Q=D.call(F,String.prototype.replace),ie=D.call(F,String.prototype.slice),J=D.call(F,RegExp.prototype.exec),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,Z=function(X){var re=ie(X,0,1),z=ie(X,-1);if(re==="%"&&z!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(z==="%"&&re!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var xe=[];return Q(X,Y,function(Ae,Ie,Se,K){xe[xe.length]=Se?Q(K,U,"$1"):Ie||Ae}),xe},R=function(X,re){var z=X,xe;if(q(j,z)&&(xe=j[z],z="%"+xe[0]+"%"),q(P,z)){var Ae=P[z];if(Ae===N&&(Ae=L(z)),typeof Ae>"u"&&!re)throw new s("intrinsic "+X+" exists, but is not available. Please file an issue!");return{alias:xe,name:z,value:Ae}}throw new a("intrinsic "+X+" does not exist!")};return nc=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=Z(X),xe=z.length>0?z[0]:"",Ae=R("%"+xe+"%",re),Ie=Ae.name,Se=Ae.value,K=!1,se=Ae.alias;se&&(xe=se[0],$(z,M([0,1],se)));for(var G=1,ee=!0;G<z.length;G+=1){var ye=z[G],de=ie(ye,0,1),Re=ie(ye,-1);if((de==='"'||de==="'"||de==="`"||Re==='"'||Re==="'"||Re==="`")&&de!==Re)throw new a("property names with quotes must have matching quotes");if((ye==="constructor"||!ee)&&(K=!0),xe+="."+ye,Ie="%"+xe+"%",q(P,Ie))Se=P[Ie];else if(Se!=null){if(!(ye in Se)){if(!re)throw new s("base intrinsic for "+X+" exists, but the property is not available.");return}if(m&&G+1>=z.length){var oe=m(Se,ye);ee=!!oe,ee&&"get"in oe&&!("originalValue"in oe.get)?Se=oe.get:Se=Se[ye]}else ee=q(Se,ye),Se=Se[ye];ee&&!K&&(P[Ie]=Se)}}return Se},nc}var oc,hh;function mh(){if(hh)return oc;hh=1;var e=rc(),t=ch(),n=t([e("%String.prototype.indexOf%")]);return oc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},oc}var ic,gh;function vh(){if(gh)return ic;gh=1;var e=rc(),t=mh(),n=Pa(),r=io(),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 ic=!!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},ic}var ac,yh;function oT(){if(yh)return ac;yh=1;var e=rc(),t=mh(),n=Pa(),r=vh(),o=io(),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 ac=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,ac}var sc,bh;function iT(){if(bh)return sc;bh=1;var e=io(),t=Pa(),n=D1(),r=vh(),o=oT(),i=o||r||n;return sc=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},sc}var xh=e=>Array.isArray(e),lc=e=>e===void 0,cc=e=>e===null,aT=Function.bind.call(Function.call,Object.prototype.toString),sT=e=>!!e&&aT(e)==="[object Error]"||e instanceof Error,wh=(e,t)=>e instanceof t,lT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},cT=e=>Object.prototype.toString.call(e)==="[object Date]"&&wh(e,Date),ht={array:xh,date:cT,empty:e=>cc(e)||lc(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:wh,isError:sT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>cc(e)||lc(e),null:cc,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!xh(e)&&typeof e=="object",primitive:lT,string:e=>typeof e=="string",undefined:lc},uT=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 uc="-",dT=e=>{const t=pT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(uc);return s[0]===""&&s.length!==1&&s.shift(),Th(s,t)||fT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},Th=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Th(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(uc);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Sh=/^\[(.+)\]$/,fT=e=>{if(Sh.test(e)){const t=Sh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},pT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)dc(n[o],r,o,t);return r},dc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Eh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(hT(o)){dc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{dc(a,Eh(t,i),n,r)})})},Eh=(e,t)=>{let n=e;return t.split(uc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},hT=e=>e.isThemeGetter,mT=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)}}},fc="!",pc=":",gT=pc.length,vT=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===pc){i.push(o.slice(l,h)),l=h+gT;continue}if(y==="/"){c=h;continue}}y==="["?a++:y==="]"?a--:y==="("?s++:y===")"&&s--}const u=i.length===0?o:o.substring(l),d=yT(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+pc,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},yT=e=>e.endsWith(fc)?e.substring(0,e.length-1):e.startsWith(fc)?e.substring(1):e,bT=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}},xT=e=>({cache:mT(e.cacheSize),parseClassName:vT(e),sortModifiers:bT(e),...dT(e)}),wT=/\s+/,TT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(wT);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(":"),x=f?m+fc:m,S=x+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(x+C)}l=u+(l.length>0?" "+l:l)}return l};function ST(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ch(t))&&(r&&(r+=" "),r+=n);return r}const Ch=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ch(e[r]))&&(n&&(n+=" "),n+=t);return n};function ET(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=xT(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=TT(l,n);return o(l,u),u}return function(){return i(ST.apply(null,arguments))}}const It=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},kh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ph=/^\((?:(\w[\w-]*):)?(.+)\)$/i,CT=/^\d+\/\d+$/,kT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,PT=/\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$/,AT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,_T=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,IT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ao=e=>CT.test(e),Le=e=>!!e&&!Number.isNaN(Number(e)),kr=e=>!!e&&Number.isInteger(Number(e)),Ah=e=>e.endsWith("%")&&Le(e.slice(0,-1)),Xn=e=>kT.test(e),OT=()=>!0,MT=e=>PT.test(e)&&!AT.test(e),hc=()=>!1,DT=e=>_T.test(e),NT=e=>IT.test(e),FT=e=>!me(e)&&!ge(e),LT=e=>so(e,Oh,hc),me=e=>kh.test(e),Pr=e=>so(e,Mh,MT),mc=e=>so(e,GT,Le),VT=e=>so(e,_h,hc),jT=e=>so(e,Ih,NT),RT=e=>so(e,hc,DT),ge=e=>Ph.test(e),_a=e=>lo(e,Mh),$T=e=>lo(e,YT),zT=e=>lo(e,_h),BT=e=>lo(e,Oh),HT=e=>lo(e,Ih),WT=e=>lo(e,KT,!0),so=(e,t,n)=>{const r=kh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},lo=(e,t,n=!1)=>{const r=Ph.exec(e);return r?r[1]?t(r[1]):n:!1},_h=e=>e==="position",qT=new Set(["image","url"]),Ih=e=>qT.has(e),UT=new Set(["length","size","percentage"]),Oh=e=>UT.has(e),Mh=e=>e==="length",GT=e=>e==="number",YT=e=>e==="family-name",KT=e=>e==="shadow",ZT=ET(()=>{const e=It("color"),t=It("font"),n=It("text"),r=It("font-weight"),o=It("tracking"),i=It("leading"),a=It("breakpoint"),s=It("container"),l=It("spacing"),c=It("radius"),u=It("shadow"),d=It("inset-shadow"),p=It("drop-shadow"),f=It("blur"),h=It("perspective"),y=It("aspect"),g=It("ease"),v=It("animate"),m=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],S=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],w=()=>[ge,me,l],C=()=>[ao,"full","auto",...w()],k=()=>[kr,"none","subgrid",ge,me],I=()=>["auto",{span:["full",kr,ge,me]},ge,me],A=()=>[kr,"auto",ge,me],F=()=>["auto","min","max","fr",ge,me],N=()=>["start","end","center","between","around","evenly","stretch","baseline"],V=()=>["start","end","center","stretch"],P=()=>["auto",...w()],O=()=>[ao,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],L=()=>[e,ge,me],j=()=>[Ah,Pr],D=()=>["","none","full",c,ge,me],q=()=>["",Le,_a,Pr],M=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["","none",f,ge,me],ie=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge,me],J=()=>["none",Le,ge,me],Y=()=>["none",Le,ge,me],U=()=>[Le,ge,me],Z=()=>[ao,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Xn],breakpoint:[Xn],color:[OT],container:[Xn],"drop-shadow":[Xn],ease:["in","out","in-out"],font:[FT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Xn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Xn],shadow:[Xn],spacing:["px",Le],text:[Xn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ao,me,ge,y]}],container:["container"],columns:[{columns:[Le,me,ge,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:[...x(),me,ge]}],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",ge,me]}],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:[Le,ao,"auto","initial","none",me]}],grow:[{grow:["",Le,ge,me]}],shrink:[{shrink:["",Le,ge,me]}],order:[{order:[kr,"first","last","none",ge,me]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...V(),"baseline"]}],"align-self":[{self:["auto",...V(),"baseline"]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"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,_a,Pr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ge,mc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ah,me]}],"font-family":[{font:[$T,me,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,ge,me]}],"line-clamp":[{"line-clamp":[Le,"none",ge,mc]}],leading:[{leading:[i,...w()]}],"list-image":[{"list-image":["none",ge,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",ge,Pr]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Le,"auto",ge,me]}],"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",ge,me]}],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",ge,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),zT,VT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",BT,LT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},kr,ge,me],radial:["",ge,me],conic:[kr,ge,me]},HT,jT]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:j()}],"gradient-via-pos":[{via:j()}],"gradient-to-pos":[{to:j()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"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:[...M(),"hidden","none"]}],"divide-style":[{divide:[...M(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,ge,me]}],"outline-w":[{outline:["",Le,_a,Pr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,WT,RT]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",ge,me,d]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Le,Pr]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":L()}],opacity:[{opacity:[Le,ge,me]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none",ge,me]}],blur:[{blur:Q()}],brightness:[{brightness:[Le,ge,me]}],contrast:[{contrast:[Le,ge,me]}],"drop-shadow":[{"drop-shadow":["","none",p,ge,me]}],grayscale:[{grayscale:["",Le,ge,me]}],"hue-rotate":[{"hue-rotate":[Le,ge,me]}],invert:[{invert:["",Le,ge,me]}],saturate:[{saturate:[Le,ge,me]}],sepia:[{sepia:["",Le,ge,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,me]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[Le,ge,me]}],"backdrop-contrast":[{"backdrop-contrast":[Le,ge,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,ge,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,ge,me]}],"backdrop-invert":[{"backdrop-invert":["",Le,ge,me]}],"backdrop-opacity":[{"backdrop-opacity":[Le,ge,me]}],"backdrop-saturate":[{"backdrop-saturate":[Le,ge,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,ge,me]}],"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",ge,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",ge,me]}],ease:[{ease:["linear","initial",g,ge,me]}],delay:[{delay:[Le,ge,me]}],animate:[{animate:["none",v,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,ge,me]}],"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:[ge,me,"","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:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"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",ge,me]}],"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",ge,me]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Le,_a,Pr,mc]}],stroke:[{stroke:["none",...L()]}],"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","*","**"]}}),gc=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},XT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),QT=e=>ht.function(e),He=(...e)=>ZT(Sp(e)),vc=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},mi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Dh=e=>e.scrollHeight>e.clientHeight,on=(e,t=2)=>e.toString(16).padStart(t,"0"),gi=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${on(t,4)+on(n,3)}-${on(r[0])+on(r[1])}-${on(r[2])+on(r[3])}-${on(r[4])+on(r[5])}-${on(r[6])+on(r[7])+on(r[8])+on(r[9])}`},Nh=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Fh={basic:/[,[\]]+?/,extend:/[,[\].]+?/},yc=(e,t)=>{const n=Nh(t,Fh.basic,e)||Nh(t,Fh.extend,e);return n===void 0||n===e?void 0:n},vi=()=>typeof window>"u",bc=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Lh=(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},JT=e=>!e,xc=()=>{},Vh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,jh=Sp,co=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return jh(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=Vh(u)||Vh(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 jh(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)},eS="span",uo=E.forwardRef(function(t,n){const r=t.as||eS;return b.jsx(r,{ref:n,...t,as:void 0})}),tS=co("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"}}),fo=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 b.jsxs(uo,{...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:He(tS({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),yi=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function nS(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 rS=({children:e,...t})=>{const n=yi(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:nS(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()},[]),b.jsx("div",{...t,ref:r,children:o?e:null})},oS=co("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"}}}),iS=co("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"}}),wc=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return b.jsxs(uo,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:He(iS({size:a,theme:i}),t),children:[n?b.jsx("span",{className:oS({theme:n})}):null,r,s.children]})}),bi=E.createContext({});function fn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Tc=typeof window<"u",Ia=Tc?E.useLayoutEffect:E.useEffect,Oa=E.createContext(null),po=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class aS extends _.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 sS({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]),x.jsx(OT,{isPresent:t,childRef:o,sizeRef:s,children:P.cloneElement(e,{ref:o})})}const MT=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i,anchorX:a})=>{const l=an(DT),c=w.useId(),u=w.useCallback(f=>{l.set(f,!0);for(const h of l.values())if(!h)return;r&&r()},[l,r]),d=w.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 w.useMemo(()=>{l.forEach((f,h)=>l.set(h,!1))},[n]),P.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),i==="popLayout"&&(e=x.jsx(_T,{isPresent:n,anchorX:a,children:e})),x.jsx(qi.Provider,{value:d,children:e})};function DT(){return new Map}function dp(e=!0){const t=w.useContext(qi);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=w.useId();w.useEffect(()=>{if(e)return o(s)},[e]);const i=w.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const Ki=e=>e.key||"";function fp(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const mc=typeof window<"u",Zi=mc?w.useLayoutEffect:w.useEffect,er=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:i=!1,anchorX:a="left"})=>{const[l,c]=dp(i),u=w.useMemo(()=>fp(e),[e]),d=i&&!l?[]:u.map(Ki),f=w.useRef(!0),h=w.useRef(u),m=an(()=>new Map),[p,v]=w.useState(u),[b,y]=w.useState(u);Zi(()=>{f.current=!1,h.current=u;for(let S=0;S<b.length;S++){const E=Ki(b[S]);d.includes(E)?m.delete(E):m.get(E)!==!0&&m.set(E,!1)}},[b,d.length,d.join("-")]);const g=[];if(u!==p){let S=[...u];for(let E=0;E<b.length;E++){const C=b[E],I=Ki(C);d.includes(I)||(S.splice(E,0,C),g.push(C))}return s==="wait"&&g.length&&(S=g),y(fp(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}=w.useContext(Ds);return x.jsx(x.Fragment,{children:b.map(S=>{const E=Ki(S),C=i&&!l?!1:u===b||d.includes(E),I=()=>{if(m.has(E))m.set(E,!0);else return;let A=!0;m.forEach(O=>{O||(A=!1)}),A&&(T==null||T(),y(h.current),i&&(c==null||c()),r&&r())};return x.jsx(MT,{isPresent:C,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,onExitComplete:C?void 0:I,anchorX:a,children:S},E)})})},NT=w.createContext(null);function LT(){const e=w.useRef(!1);return Zi(()=>(e.current=!0,()=>{e.current=!1}),[]),e}const Wt=e=>e;let vo=Wt,tn=Wt;process.env.NODE_ENV!=="production"&&(vo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},tn=(e,t)=>{if(!e)throw new Error(t)});const FT={skipAnimations:!1,useManualTiming:!1},Xi=["read","resolveKeyframes","update","preRender","render","postRender"],hp={value:null,addProjectionMetrics:null};function VT(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 p=h&&o?n:r;return f&&i.add(d),p.has(d)||p.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&&hp.value&&hp.value.frameloop[t].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const $T=40;function pp(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=Xi.reduce((b,y)=>(b[y]=VT(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,$T),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))},m=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:Xi.reduce((b,y)=>{const g=i[y];return b[y]=(T,S=!1,E=!1)=>(n||m(),g.schedule(T,S,E)),b},{}),cancel:b=>{for(let y=0;y<Xi.length;y++)i[Xi[y]].cancel(b)},state:o,steps:i}}const{schedule:Ue,cancel:Rn,state:kt,steps:gc}=pp(typeof requestAnimationFrame<"u"?requestAnimationFrame:Wt,!0);function RT(){const e=LT(),[t,n]=w.useState(0),r=w.useCallback(()=>{e.current&&n(t+1)},[t]);return[w.useCallback(()=>Ue.postRender(r),[r]),t]}const BT=e=>!e.isLayoutDirty&&e.willUpdate(!1);function mp(){const e=new Set,t=new WeakMap,n=()=>e.forEach(BT);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 gp=e=>e===!0,jT=e=>gp(e===!0)||e==="id",zT=({children:e,id:t,inherit:n=!0})=>{const r=w.useContext(Ds),o=w.useContext(NT),[s,i]=RT(),a=w.useRef(null),l=r.id||o;a.current===null&&(jT(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:gp(n)&&r.group||mp()});const c=w.useMemo(()=>({...a.current,forceRender:s}),[i]);return x.jsx(Ds.Provider,{value:c,children:e})},yp=w.createContext({strict:!1}),vp={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"]},bo={};for(const e in vp)bo[e]={isEnabled:t=>vp[e].some(n=>!!t[n])};function WT(e){for(const t in e)bo[t]={...bo[t],...e[t]}}const HT=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 Qi(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||HT.has(e)}let bp=e=>!Qi(e);function wp(e){e&&(bp=t=>t.startsWith("on")?!Qi(t):e(t))}try{wp(require("@emotion/is-prop-valid").default)}catch{}function UT(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(bp(o)||n===!0&&Qi(o)||!t&&!Qi(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function GT({children:e,isValidProp:t,...n}){t&&wp(t),n={...w.useContext(yo),...n},n.isStatic=an(()=>n.isStatic);const r=w.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(yo.Provider,{value:r,children:e})}const xp=new Set;function Ji(e,t,n){e||xp.has(t)||(console.warn(t),xp.add(t))}function YT(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Ji(!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 ea=w.createContext({});function ta(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ns(e){return typeof e=="string"||Array.isArray(e)}const yc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vc=["initial",...yc];function na(e){return ta(e.animate)||vc.some(t=>Ns(e[t]))}function Sp(e){return!!(na(e)||e.variants)}function qT(e,t){if(na(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ns(n)?n:void 0,animate:Ns(r)?r:void 0}}return e.inherit!==!1?t:{}}function KT(e){const{initial:t,animate:n}=qT(e,w.useContext(ea));return w.useMemo(()=>({initial:t,animate:n}),[Tp(t),Tp(n)])}function Tp(e){return Array.isArray(e)?e.join(" "):e}const ZT=Symbol.for("motionComponentSymbol");function wo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function XT(e,t,n){return w.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):wo(n)&&(n.current=r))},[t])}const bc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ep="data-"+bc("framerAppearId"),{schedule:wc,cancel:dB}=pp(queueMicrotask,!1),Cp=w.createContext({});function QT(e,t,n,r,o){var s,i;const{visualElement:a}=w.useContext(ea),l=w.useContext(yp),c=w.useContext(qi),u=w.useContext(yo).reducedMotion,d=w.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=w.useContext(Cp);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&JT(d.current,n,o,h);const m=w.useRef(!1);w.useInsertionEffect(()=>{f&&m.current&&f.update(n,c)});const p=n[Ep],v=w.useRef(!!p&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,p))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,p)));return Zi(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),wc.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),w.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,p)}),v.current=!1))}),f}function JT(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:Pp(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&wo(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Pp(e){if(e)return e.options.allowProjection!==!1?e.projection:Pp(e.parent)}function eE({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var s,i;e&&WT(e);function a(c,u){let d;const f={...w.useContext(yo),...c,layoutId:tE(c)},{isStatic:h}=f,m=KT(c),p=r(c,h);if(!h&&mc){nE(f,e);const v=rE(f);d=v.MeasureLayout,m.visualElement=QT(o,p,f,t,v.ProjectionNode)}return x.jsxs(ea.Provider,{value:m,children:[d&&m.visualElement?x.jsx(d,{visualElement:m.visualElement,...f}):null,n(o,c,XT(p,m.visualElement,u),p,h,m.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=w.forwardRef(a);return l[ZT]=o,l}function tE({layoutId:e}){const t=w.useContext(Ds).id;return t&&e!==void 0?t+"-"+e:e}function nE(e,t){const n=w.useContext(yp).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?vo(!1,r):tn(!1,r)}}function rE(e){const{drag:t,layout:n}=bo;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 kp=e=>t=>typeof t=="string"&&t.startsWith(e),xc=kp("--"),oE=kp("var(--"),Sc=e=>oE(e)?sE.test(e.split("/*")[0].trim()):!1,sE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ls={};function iE(e){for(const t in e)Ls[t]=e[t],xc(t)&&(Ls[t].isCSSVariable=!0)}const xo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Cr=new Set(xo);function Ip(e,{layout:t,layoutId:n}){return Cr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ls[e]||e==="opacity")}const bt=e=>!!(e&&e.getVelocity),Ap=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Bn=(e,t,n)=>n>t?t:n<e?e:n,So={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Fs={...So,transform:e=>Bn(0,1,e)},ra={...So,default:1},Vs=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),tr=Vs("deg"),vn=Vs("%"),me=Vs("px"),aE=Vs("vh"),lE=Vs("vw"),Op={...vn,parse:e=>vn.parse(e)/100,transform:e=>vn.transform(e*100)},cE={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},uE={rotate:tr,rotateX:tr,rotateY:tr,rotateZ:tr,scale:ra,scaleX:ra,scaleY:ra,scaleZ:ra,skew:tr,skewX:tr,skewY:tr,distance:me,translateX:me,translateY:me,translateZ:me,x:me,y:me,z:me,perspective:me,transformPerspective:me,opacity:Fs,originX:Op,originY:Op,originZ:me},_p={...So,transform:Math.round},Tc={...cE,...uE,zIndex:_p,size:me,fillOpacity:Fs,strokeOpacity:Fs,numOctaves:_p},dE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fE=xo.length;function hE(e,t,n){let r="",o=!0;for(let s=0;s<fE;s++){const i=xo[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=Ap(a,Tc[i]);if(!l){o=!1;const u=dE[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Ec(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(Cr.has(l)){i=!0;continue}else if(xc(l)){o[l]=c;continue}else{const u=Ap(c,Tc[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=hE(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 Cc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Mp(e,t,n){for(const r in t)!bt(t[r])&&!Ip(r,n)&&(e[r]=t[r])}function pE({transformTemplate:e},t){return w.useMemo(()=>{const n=Cc();return Ec(n,t,e),Object.assign({},n.vars,n.style)},[t])}function mE(e,t){const n=e.style||{},r={};return Mp(r,n,e),Object.assign(r,pE(e,t)),r}function gE(e,t){const n={},r=mE(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 yE=["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 Pc(e){return typeof e!="string"||e.includes("-")?!1:!!(yE.indexOf(e)>-1||/[A-Z]/u.test(e))}const vE={offset:"stroke-dashoffset",array:"stroke-dasharray"},bE={offset:"strokeDashoffset",array:"strokeDasharray"};function wE(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?vE:bE;e[s.offset]=me.transform(-r);const i=me.transform(t),a=me.transform(n);e[s.array]=`${i} ${a}`}function Dp(e,t,n){return typeof e=="string"?e:me.transform(t+n*e)}function xE(e,t,n){const r=Dp(t,e.x,e.width),o=Dp(n,e.y,e.height);return`${r} ${o}`}function kc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Ec(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:m}=e;f.transform&&(m&&(h.transform=f.transform),delete f.transform),m&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=xE(m,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&&wE(f,i,a,l,!1)}const Np=()=>({...Cc(),attrs:{}}),Ic=e=>typeof e=="string"&&e.toLowerCase()==="svg";function SE(e,t,n,r){const o=w.useMemo(()=>{const s=Np();return kc(s,t,Ic(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Mp(s,e.style,e),o.style={...s,...o.style}}return o}function TE(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Pc(n)?SE:gE)(r,s,i,n),c=UT(r,typeof n=="string",e),u=n!==w.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=w.useMemo(()=>bt(d)?d.get():d,[d]);return w.createElement(n,{...u,children:f})}}function Lp(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ac(e,t,n,r){if(typeof t=="function"){const[o,s]=Lp(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]=Lp(r);t=t(n!==void 0?n:e.custom,o,s)}return t}const Oc=e=>Array.isArray(e),EE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),CE=e=>Oc(e)?e[e.length-1]||0:e;function oa(e){const t=bt(e)?e.get():e;return EE(t)?t.toValue():t}function PE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){const i={latestValues:kE(r,o,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const Fp=e=>(t,n)=>{const r=w.useContext(ea),o=w.useContext(qi),s=()=>PE(e,t,r,o);return n?s():an(s)};function kE(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=oa(s[f]);let{initial:i,animate:a}=e;const l=na(e),c=Sp(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"&&!ta(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const m=Ac(e,f[h]);if(m){const{transitionEnd:p,transition:v,...b}=m;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 p)o[y]=p[y]}}}return o}function _c(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(bt(o[i])||t.style&&bt(t.style[i])||Ip(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 IE={useVisualState:Fp({scrapeMotionValuesFromProps:_c,createRenderState:Cc})};function Vp(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 $p(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 Rp=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 Bp(e,t,n,r){$p(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Rp.has(o)?o:bc(o),t.attrs[o])}function jp(e,t,n){const r=_c(e,t,n);for(const o in e)if(bt(e[o])||bt(t[o])){const s=xo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const zp=["x","y","width","height","cx","cy","r"],AE={useVisualState:Fp({scrapeMotionValuesFromProps:jp,createRenderState:Np,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(Cr.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<zp.length;a++){const l=zp[a];e[l]!==t[l]&&(i=!0)}i&&Ue.read(()=>{Vp(n,r),Ue.render(()=>{kc(r,o,Ic(n.tagName),e.transformTemplate),Bp(n,r)})})}})};function OE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...Pc(r)?AE:IE,preloadedFeatures:e,useRender:TE(o),createVisualElement:t,Component:r};return eE(i)}}function $s(e,t,n){const r=e.getProps();return Ac(r,t,n!==void 0?n:r.custom,e)}function Mc(e,t){return e?e[t]||e.default||e:void 0}const Wp=new Set(["width","height","top","left","right","bottom",...xo]);let sa;function _E(){sa=void 0}const bn={now:()=>(sa===void 0&&bn.set(kt.isProcessing||FT.useManualTiming?kt.timestamp:performance.now()),sa),set:e=>{sa=e,queueMicrotask(_E)}};function Dc(e,t){e.indexOf(t)===-1&&e.push(t)}function ia(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function ME([...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 Nc{constructor(){this.subscriptions=[]}add(t){return Dc(this.subscriptions,t),()=>ia(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 Hp(e,t){return t?e*(1e3/t):0}const Up=30,DE=e=>!isNaN(parseFloat(e)),Rs={current:void 0};class NE{constructor(t,n={}){this.version="12.4.7",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=bn.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=bn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=DE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ji(!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 Nc);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 Rs.current&&Rs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=bn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Up)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Up);return Hp(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 To(e,t){return new NE(e,t)}function LE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,To(n))}function FE(e,t){const n=$s(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=CE(s[i]);LE(e,i,a)}}function VE(e){return!!(bt(e)&&e.add)}function Lc(e,t){const n=e.getValue("willChange");if(VE(n))return n.add(t)}function Gp(e){return e.props[Ep]}function Fc(e){let t;return()=>(t===void 0&&(t=e()),t)}const $E=Fc(()=>window.ScrollTimeline!==void 0);class RE{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($E()&&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 Yp extends RE{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const ln=e=>e*1e3,wn=e=>e/1e3;function aa(e){return typeof e=="function"}function qp(e,t){e.timeline=t,e.onfinish=null}const Vc=e=>Array.isArray(e)&&typeof e[0]=="number",BE={linearEasing:void 0};function jE(e,t){const n=Fc(e);return()=>{var r;return(r=BE[t])!==null&&r!==void 0?r:n()}}const la=jE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Pr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Kp=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=e(Pr(0,o-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function Zp(e){return!!(typeof e=="function"&&la()||!e||typeof e=="string"&&(e in $c||la())||Vc(e)||Array.isArray(e)&&e.every(Zp))}const Bs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,$c={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Bs([0,.65,.55,1]),circOut:Bs([.55,0,1,.45]),backIn:Bs([.31,.01,.66,-.59]),backOut:Bs([.33,1.53,.69,.99])};function Xp(e,t){if(e)return typeof e=="function"&&la()?Kp(e,t):Vc(e)?Bs(e):Array.isArray(e)?e.map(n=>Xp(n,t)||$c.easeOut):$c[e]}const Qp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,zE=1e-7,WE=12;function HE(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=Qp(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>zE&&++a<WE);return i}function js(e,t,n,r){if(e===t&&n===r)return Wt;const o=s=>HE(s,0,1,e,n);return s=>s===0||s===1?s:Qp(o(s),t,r)}const Jp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,em=e=>t=>1-e(1-t),tm=js(.33,1.53,.69,.99),Rc=em(tm),nm=Jp(Rc),rm=e=>(e*=2)<1?.5*Rc(e):.5*(2-Math.pow(2,-10*(e-1))),Bc=e=>1-Math.sin(Math.acos(e)),om=em(Bc),sm=Jp(Bc),im=e=>/^0[^.\s]+$/u.test(e);function UE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||im(e):!0}const zs=e=>Math.round(e*1e5)/1e5,jc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function GE(e){return e==null}const YE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,zc=(e,t)=>n=>!!(typeof n=="string"&&YE.test(n)&&n.startsWith(e)||t&&!GE(n)&&Object.prototype.hasOwnProperty.call(n,t)),am=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(jc);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},qE=e=>Bn(0,255,e),Wc={...So,transform:e=>Math.round(qE(e))},kr={test:zc("rgb","red"),parse:am("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Wc.transform(e)+", "+Wc.transform(t)+", "+Wc.transform(n)+", "+zs(Fs.transform(r))+")"};function KE(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 Hc={test:zc("#"),parse:KE,transform:kr.transform},Eo={test:zc("hsl","hue"),parse:am("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+vn.transform(zs(t))+", "+vn.transform(zs(n))+", "+zs(Fs.transform(r))+")"},Mt={test:e=>kr.test(e)||Hc.test(e)||Eo.test(e),parse:e=>kr.test(e)?kr.parse(e):Eo.test(e)?Eo.parse(e):Hc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?kr.transform(e):Eo.transform(e)},ZE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function XE(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(jc))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(ZE))===null||n===void 0?void 0:n.length)||0)>0}const lm="number",cm="color",QE="var",JE="var(",um="${}",eC=/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 Ws(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(eC,l=>(Mt.test(l)?(r.color.push(s),o.push(cm),n.push(Mt.parse(l))):l.startsWith(JE)?(r.var.push(s),o.push(QE),n.push(l)):(r.number.push(s),o.push(lm),n.push(parseFloat(l))),++s,um)).split(um);return{values:n,split:a,indexes:r,types:o}}function dm(e){return Ws(e).values}function fm(e){const{split:t,types:n}=Ws(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===lm?s+=zs(o[i]):a===cm?s+=Mt.transform(o[i]):s+=o[i]}return s}}const tC=e=>typeof e=="number"?0:e;function nC(e){const t=dm(e);return fm(e)(t.map(tC))}const nr={test:XE,parse:dm,createTransformer:fm,getAnimatableNone:nC},rC=new Set(["brightness","contrast","saturate","opacity"]);function oC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(jc)||[];if(!r)return e;const o=n.replace(r,"");let s=rC.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const sC=/\b([a-z-]*)\(.*?\)/gu,Uc={...nr,getAnimatableNone:e=>{const t=e.match(sC);return t?t.map(oC).join(" "):e}},iC={...Tc,color:Mt,backgroundColor:Mt,outlineColor:Mt,fill:Mt,stroke:Mt,borderColor:Mt,borderTopColor:Mt,borderRightColor:Mt,borderBottomColor:Mt,borderLeftColor:Mt,filter:Uc,WebkitFilter:Uc},Gc=e=>iC[e];function hm(e,t){let n=Gc(e);return n!==Uc&&(n=nr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const aC=new Set(["auto","none","0"]);function lC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!aC.has(s)&&Ws(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=hm(n,o)}const pm=e=>e===So||e===me,mm=(e,t)=>parseFloat(e.split(", ")[t]),gm=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return mm(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?mm(s[1],e):0}},cC=new Set(["x","y","z"]),uC=xo.filter(e=>!cC.has(e));function dC(e){const t=[];return uC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Co={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:gm(4,13),y:gm(5,14)};Co.translateX=Co.x,Co.translateY=Co.y;const Ir=new Set;let Yc=!1,qc=!1;function ym(){if(qc){const e=Array.from(Ir).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=dC(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)})}qc=!1,Yc=!1,Ir.forEach(e=>e.complete()),Ir.clear()}function vm(){Ir.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(qc=!0)})}function fC(){vm(),ym()}class Kc{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?(Ir.add(this),Yc||(Yc=!0,Ue.read(vm),Ue.resolveKeyframes(ym))):(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),Ir.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ir.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const bm=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),hC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pC(e){const t=hC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const mC=4;function wm(e,t,n=1){tn(n<=mC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=pC(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return bm(i)?parseFloat(i):i}return Sc(o)?wm(o,t,n+1):o}const xm=e=>t=>t.test(e),Sm=[So,me,vn,tr,lE,aE,{test:e=>e==="auto",parse:e=>e}],Tm=e=>Sm.find(xm(e));class Em extends Kc{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(),Sc(c))){const u=wm(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Wp.has(r)||t.length!==2)return;const[o,s]=t,i=Tm(o),a=Tm(s);if(i!==a)if(pm(i)&&pm(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++)UE(t[o])&&r.push(o);r.length&&lC(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=Co[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]=Co[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 Cm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(nr.test(e)||e==="0")&&!e.startsWith("url("));function gC(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 yC(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=Cm(o,t),a=Cm(s,t);return vo(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:gC(e)||(n==="spring"||aa(n))&&r}const vC=e=>e!==null;function ca(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(vC),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const bC=40;class Pm{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=bn.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>bC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&fC(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=bn.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!yC(t,r,o,s))if(i)this.options.duration=0;else{l&&l(ca(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 ua=2e4;function Zc(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ua;)t+=n,r=e.next(t);return t>=ua?1/0:t}const Xe=(e,t,n)=>e+(t-e)*n;function Xc(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 wC({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=Xc(l,a,e+1/3),s=Xc(l,a,e),i=Xc(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function da(e,t){return n=>n>0?t:e}const Qc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},xC=[Hc,kr,Eo],SC=e=>xC.find(t=>t.test(e));function km(e){const t=SC(e);if(vo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Eo&&(n=wC(n)),n}const Im=(e,t)=>{const n=km(e),r=km(t);if(!n||!r)return da(e,t);const o={...n};return s=>(o.red=Qc(n.red,r.red,s),o.green=Qc(n.green,r.green,s),o.blue=Qc(n.blue,r.blue,s),o.alpha=Xe(n.alpha,r.alpha,s),kr.transform(o))},TC=(e,t)=>n=>t(e(n)),Hs=(...e)=>e.reduce(TC),Jc=new Set(["none","hidden"]);function EC(e,t){return Jc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function CC(e,t){return n=>Xe(e,t,n)}function eu(e){return typeof e=="number"?CC:typeof e=="string"?Sc(e)?da:Mt.test(e)?Im:IC:Array.isArray(e)?Am:typeof e=="object"?Mt.test(e)?Im:PC:da}function Am(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>eu(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function PC(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=eu(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function kC(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 IC=(e,t)=>{const n=nr.createTransformer(t),r=Ws(e),o=Ws(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?Jc.has(e)&&!o.values.length||Jc.has(t)&&!r.values.length?EC(e,t):Hs(Am(kC(r,o),o.values),n):(vo(!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.`),da(e,t))};function Om(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Xe(e,t,n):eu(e)(e,t)}const AC=5;function _m(e,t,n){const r=Math.max(t-AC,0);return Hp(n-e(r),t-r)}const nt={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},tu=.001;function OC({duration:e=nt.duration,bounce:t=nt.bounce,velocity:n=nt.velocity,mass:r=nt.mass}){let o,s;vo(e<=ln(nt.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Bn(nt.minDamping,nt.maxDamping,i),e=Bn(nt.minDuration,nt.maxDuration,wn(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=nu(c,i),m=Math.exp(-d);return tu-f/h*m},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,m=Math.exp(-d),p=nu(Math.pow(c,2),i);return(-o(c)+tu>0?-1:1)*((f-h)*m)/p}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-tu+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=MC(o,s,a);if(e=ln(e),isNaN(l))return{stiffness:nt.stiffness,damping:nt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const _C=12;function MC(e,t,n){let r=n;for(let o=1;o<_C;o++)r=r-e(r)/t(r);return r}function nu(e,t){return e*Math.sqrt(1-t*t)}const DC=["duration","bounce"],NC=["stiffness","damping","mass"];function Mm(e,t){return t.some(n=>e[n]!==void 0)}function LC(e){let t={velocity:nt.velocity,stiffness:nt.stiffness,damping:nt.damping,mass:nt.mass,isResolvedFromDuration:!1,...e};if(!Mm(e,NC)&&Mm(e,DC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Bn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:nt.mass,stiffness:o,damping:s}}else{const n=OC(e);t={...t,...n,mass:nt.mass},t.isResolvedFromDuration=!0}return t}function ru(e=nt.visualDuration,t=nt.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}=LC({...n,velocity:-wn(n.velocity||0)}),m=f||0,p=c/(2*Math.sqrt(l*u)),v=i-s,b=wn(Math.sqrt(l/u)),y=Math.abs(v)<5;r||(r=y?nt.restSpeed.granular:nt.restSpeed.default),o||(o=y?nt.restDelta.granular:nt.restDelta.default);let g;if(p<1){const S=nu(b,p);g=E=>{const C=Math.exp(-p*b*E);return i-C*((m+p*b*v)/S*Math.sin(S*E)+v*Math.cos(S*E))}}else if(p===1)g=S=>i-Math.exp(-b*S)*(v+(m+b*v)*S);else{const S=b*Math.sqrt(p*p-1);g=E=>{const C=Math.exp(-p*b*E),I=Math.min(S*E,300);return i-C*((m+p*b*v)*Math.sinh(I)+S*v*Math.cosh(I))/S}}const T={calculatedDuration:h&&d||null,next:S=>{const E=g(S);if(h)a.done=S>=d;else{let C=0;p<1&&(C=S===0?ln(m):_m(g,S,E));const I=Math.abs(C)<=r,A=Math.abs(i-E)<=o;a.done=I&&A}return a.value=a.done?i:E,a},toString:()=>{const S=Math.min(Zc(T),ua),E=Kp(C=>T.next(S*C).value,S,30);return S+"ms "+E}};return T}function Dm({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=I=>a!==void 0&&I<a||l!==void 0&&I>l,m=I=>a===void 0?l:l===void 0||Math.abs(a-I)<Math.abs(l-I)?a:l;let p=n*t;const v=d+p,b=i===void 0?v:i(v);b!==v&&(p=b-d);const y=I=>-p*Math.exp(-I/r),g=I=>b+y(I),T=I=>{const A=y(I),O=g(I);f.done=Math.abs(A)<=c,f.value=f.done?b:O};let S,E;const C=I=>{h(f.value)&&(S=I,E=ru({keyframes:[f.value,m(f.value)],velocity:_m(g,I,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:I=>{let A=!1;return!E&&S===void 0&&(A=!0,T(I),C(I)),S!==void 0&&I>=S?E.next(I-S):(!A&&T(I),f)}}}const FC=js(.42,0,1,1),VC=js(0,0,.58,1),Nm=js(.42,0,.58,1),Lm=e=>Array.isArray(e)&&typeof e[0]!="number",Fm={linear:Wt,easeIn:FC,easeInOut:Nm,easeOut:VC,circIn:Bc,circInOut:sm,circOut:om,backIn:Rc,backInOut:nm,backOut:tm,anticipate:rm},ou=e=>{if(Vc(e)){tn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return js(t,n,r,o)}else if(typeof e=="string")return tn(Fm[e]!==void 0,`Invalid easing type '${e}'`),Fm[e];return e};function $C(e,t,n){const r=[],o=n||Om,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||Wt:t;a=Hs(l,a)}r.push(a)}return r}function Vm(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(tn(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&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=$C(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=Pr(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Bn(e[0],e[s-1],u)):c}function $m(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Pr(0,t,r);e.push(Xe(n,1,o))}}function Rm(e){const t=[0];return $m(t,e.length-1),t}function RC(e,t){return e.map(n=>n*t)}function BC(e,t){return e.map(()=>t||Nm).splice(0,e.length-1)}function Us({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Lm(r)?r.map(ou):ou(r),s={done:!1,value:t[0]},i=RC(n&&n.length===t.length?n:Rm(t),e),a=Vm(i,t,{ease:Array.isArray(o)?o:BC(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const jC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ue.update(t,!0),stop:()=>Rn(t),now:()=>kt.isProcessing?kt.timestamp:bn.now()}},zC={decay:Dm,inertia:Dm,tween:Us,keyframes:Us,spring:ru},WC=e=>e/100;class su extends Pm{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)||Kc,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=aa(n)?n:zC[n]||Us;let l,c;process.env.NODE_ENV!=="production"&&a!==Us&&tn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==Us&&typeof t[0]!="number"&&(l=Hs(WC,Om(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=Zc(u));const{calculatedDuration:d}=u,f=d+o,h=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:I}=this.options;return{done:!0,value:I[I.length-1]}}const{finalKeyframe:o,generator: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:m,repeatDelay:p,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 I=Math.min(this.currentTime,u)/d;let A=Math.floor(I),O=I%1;!O&&I>=1&&(O=1),O===1&&A--,A=Math.min(A,h+1),!!(A%2)&&(m==="reverse"?(O=1-O,p&&(O-=p/d)):m==="mirror"&&(T=i)),g=Bn(0,1,O)*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=ca(l,this.options,o)),v&&v(S.value),C&&this.finish(),S}get duration(){const{resolved:t}=this;return t?wn(t.calculatedDuration):0}get time(){return wn(this.currentTime)}set time(t){t=ln(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=wn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=jC,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 HC=new Set(["opacity","clipPath","filter","transform"]);function UC(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=Xp(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 GC=Fc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),fa=10,YC=2e4;function qC(e){return aa(e.type)||e.type==="spring"||!Zp(e.ease)}function KC(e,t){const n=new su({...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<YC;)r=n.sample(s),o.push(r.value),s+=fa;return{times:void 0,keyframes:o,duration:s-fa,ease:"linear"}}const Bm={anticipate:rm,backInOut:nm,circInOut:sm};function ZC(e){return e in Bm}class jm extends Pm{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:s}=this.options;this.resolver=new Em(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"&&la()&&ZC(s)&&(s=Bm[s]),qC(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,element:m,...p}=this.options,v=KC(t,p);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,o=v.times,s=v.ease,i="keyframes"}const u=UC(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(qp(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(ca(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 wn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return wn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ln(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 Wt;const{animation:r}=n;qp(r,t)}return Wt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;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,m=new su({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),p=ln(this.time);c.setWithVelocity(m.sample(p-fa).value,m.sample(p).value,fa)}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 GC()&&r&&HC.has(r)&&!l&&!c&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}const XC={type:"spring",stiffness:500,damping:25,restSpeed:10},QC=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),JC={type:"keyframes",duration:.8},eP={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},tP=(e,{keyframes:t})=>t.length>2?JC:Cr.has(e)?e.startsWith("scale")?QC(t[1]):XC:eP;function nP({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 iu=(e,t,n,r={},o,s)=>i=>{const a=Mc(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-ln(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};nP(a)||(u={...u,...tP(e,u)}),u.duration&&(u.duration=ln(u.duration)),u.repeatDelay&&(u.repeatDelay=ln(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=ca(u.keyframes,a);if(f!==void 0)return Ue.update(()=>{u.onUpdate(f),u.onComplete()}),new Yp([])}return!s&&jm.supports(u)?new jm(u):new su(u)};function rP({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function au(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&&rP(u,d))continue;const m={delay:n,...Mc(i||{},d)};let p=!1;if(window.MotionHandoffAnimation){const b=Gp(e);if(b){const y=window.MotionHandoffAnimation(b,d,Ue);y!==null&&(m.startTime=y,p=!0)}}Lc(e,d),f.start(iu(d,f,h,e.shouldReduceMotion&&Wp.has(d)?{type:!1}:m,e,p));const v=f.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{Ue.update(()=>{a&&FE(e,a)})}),c}function lu(e,t,n={}){var r;const o=$s(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(au(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return oP(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 oP(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(sP).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(lu(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function sP(e,t){return e.sortNodePosition(t)}function iP(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>lu(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=lu(e,t,n);else{const o=typeof t=="function"?$s(e,t,n.custom):t;r=Promise.all(au(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function zm(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 aP=vc.length;function Wm(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Wm(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<aP;n++){const r=vc[n],o=e.props[r];(Ns(o)||o===!1)&&(t[r]=o)}return t}const lP=[...yc].reverse(),cP=yc.length;function uP(e){return t=>Promise.all(t.map(({animation:n,options:r})=>iP(e,n,r)))}function dP(e){let t=uP(e),n=Hm(),r=!0;const o=l=>(c,u)=>{var d;const f=$s(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:m,...p}=f;c={...c,...p,...m}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=Wm(e.parent)||{},d=[],f=new Set;let h={},m=1/0;for(let v=0;v<cP;v++){const b=lP[v],y=n[b],g=c[b]!==void 0?c[b]:u[b],T=Ns(g),S=b===l?y.isActive:null;S===!1&&(m=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||ta(g)||typeof g=="boolean")continue;const C=fP(y.prevProp,g);let I=C||b===l&&y.isActive&&!E&&T||v>m&&T,A=!1;const O=Array.isArray(g)?g:[g];let L=O.reduce(o(b),{});S===!1&&(L={});const{prevResolvedValues:D={}}=y,V={...D,...L},k=N=>{I=!0,f.has(N)&&(A=!0,f.delete(N)),y.needsAnimating[N]=!0;const R=e.getValue(N);R&&(R.liveStyle=!1)};for(const N in V){const R=L[N],H=D[N];if(h.hasOwnProperty(N))continue;let M=!1;Oc(R)&&Oc(H)?M=!zm(R,H):M=R!==H,M?R!=null?k(N):f.add(N):R!==void 0&&f.has(N)?k(N):y.protectedKeys[N]=!0}y.prevProp=g,y.prevResolvedValues=L,y.isActive&&(h={...h,...L}),r&&e.blockInitialAnimation&&(I=!1),I&&(!(E&&C)||A)&&d.push(...O.map(N=>({animation:N,options:{type:b}})))}if(f.size){const v={};if(typeof c.initial!="boolean"){const b=$s(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 p=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?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=Hm(),r=!0}}}function fP(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!zm(t,e):!1}function Ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Hm(){return{animate:Ar(!0),whileInView:Ar(),whileHover:Ar(),whileTap:Ar(),whileDrag:Ar(),whileFocus:Ar(),exit:Ar()}}class rr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class hP extends rr{constructor(t){super(t),t.animationState||(t.animationState=dP(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ta(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 pP=0;class mP extends rr{constructor(){super(...arguments),this.id=pP++}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 gP={animation:{Feature:hP},exit:{Feature:mP}},cn={x:!1,y:!1};function Um(){return cn.x||cn.y}function yP(e){return e==="x"||e==="y"?cn[e]?null:(cn[e]=!0,()=>{cn[e]=!1}):cn.x||cn.y?null:(cn.x=cn.y=!0,()=>{cn.x=cn.y=!1})}function Gs(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const cu=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ys(e){return{point:{x:e.pageX,y:e.pageY}}}const vP=e=>t=>cu(t)&&e(t,Ys(t));function Po(e,t,n,r){return Gs(e,t,vP(n),r)}function Gm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function bP({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function wP(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 Ym=1e-4,xP=1-Ym,SP=1+Ym,qm=.01,TP=0-qm,EP=0+qm;function $t(e){return e.max-e.min}function CP(e,t,n){return Math.abs(e-t)<=n}function Km(e,t,n,r=.5){e.origin=r,e.originPoint=Xe(t.min,t.max,e.origin),e.scale=$t(n)/$t(t),e.translate=Xe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xP&&e.scale<=SP||isNaN(e.scale))&&(e.scale=1),(e.translate>=TP&&e.translate<=EP||isNaN(e.translate))&&(e.translate=0)}function qs(e,t,n,r){Km(e.x,t.x,n.x,r?r.originX:void 0),Km(e.y,t.y,n.y,r?r.originY:void 0)}function Zm(e,t,n){e.min=n.min+t.min,e.max=e.min+$t(t)}function PP(e,t,n){Zm(e.x,t.x,n.x),Zm(e.y,t.y,n.y)}function Xm(e,t,n){e.min=t.min-n.min,e.max=e.min+$t(t)}function Ks(e,t,n){Xm(e.x,t.x,n.x),Xm(e.y,t.y,n.y)}const Qm=()=>({translate:0,scale:1,origin:0,originPoint:0}),ko=()=>({x:Qm(),y:Qm()}),Jm=()=>({min:0,max:0}),at=()=>({x:Jm(),y:Jm()});function nn(e){return[e("x"),e("y")]}function uu(e){return e===void 0||e===1}function du({scale:e,scaleX:t,scaleY:n}){return!uu(e)||!uu(t)||!uu(n)}function Or(e){return du(e)||eg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function eg(e){return tg(e.x)||tg(e.y)}function tg(e){return e&&e!=="0%"}function ha(e,t,n){const r=e-n,o=t*r;return n+o}function ng(e,t,n,r,o){return o!==void 0&&(e=ha(e,o,r)),ha(e,n,r)+t}function fu(e,t=0,n=1,r,o){e.min=ng(e.min,t,n,r,o),e.max=ng(e.max,t,n,r,o)}function rg(e,{x:t,y:n}){fu(e.x,t.translate,t.scale,t.originPoint),fu(e.y,n.translate,n.scale,n.originPoint)}const og=.999999999999,sg=1.0000000000001;function kP(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ao(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,rg(e,i)),r&&Or(s.latestValues)&&Ao(e,s.latestValues))}t.x<sg&&t.x>og&&(t.x=1),t.y<sg&&t.y>og&&(t.y=1)}function Io(e,t){e.min=e.min+t,e.max=e.max+t}function ig(e,t,n,r,o=.5){const s=Xe(e.min,e.max,o);fu(e,t,n,s,r)}function Ao(e,t){ig(e.x,t.x,t.scaleX,t.scale,t.originX),ig(e.y,t.y,t.scaleY,t.scale,t.originY)}function ag(e,t){return Gm(wP(e.getBoundingClientRect(),t))}function IP(e,t,n){const r=ag(e,n),{scroll:o}=t;return o&&(Io(r.x,o.offset.x),Io(r.y,o.offset.y)),r}function pa(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 lg=(e,t)=>Math.abs(e-t);function AP(e,t){const n=lg(e.x,t.x),r=lg(e.y,t.y);return Math.sqrt(n**2+r**2)}class cg{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=pu(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=AP(u.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:h}=u,{timestamp:m}=kt;this.history.push({...h,timestamp:m});const{onStart:p,onMove:v}=this.handlers;d||(p&&p(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=hu(d,this.transformPagePoint),Ue.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{pa(u,"release"),this.end();const{onEnd:f,onSessionEnd:h,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=pu(u.type==="pointercancel"||u.type==="lostpointercapture"?this.lastMoveEventInfo:hu(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,p),h&&h(u,p)},!cu(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r;const s=Ys(t),i=hu(s,this.transformPagePoint),{point:a}=i,{timestamp:l}=kt;this.history=[{...a,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,pu(i,this.history)),pa(t,"set"),this.removeListeners=Hs(Po(t.currentTarget,"pointermove",this.handlePointerMove),Po(t.currentTarget,"pointerup",this.handlePointerUp),Po(t.currentTarget,"pointercancel",this.handlePointerUp),Po(t.currentTarget,"lostpointercapture",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Rn(this.updatePoint)}}function hu(e,t){return t?{point:t(e.point)}:e}function ug(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pu({point:e},t){return{point:e,delta:ug(e,dg(t)),offset:ug(e,OP(t)),velocity:_P(t,.1)}}function OP(e){return e[0]}function dg(e){return e[e.length-1]}function _P(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=dg(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>ln(t)));)n--;if(!r)return{x:0,y:0};const s=wn(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 MP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Xe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Xe(n,e,r.max):Math.min(e,n)),e}function fg(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 DP(e,{top:t,left:n,bottom:r,right:o}){return{x:fg(e.x,n,o),y:fg(e.y,t,r)}}function hg(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 NP(e,t){return{x:hg(e.x,t.x),y:hg(e.y,t.y)}}function LP(e,t){let n=.5;const r=$t(e),o=$t(t);return o>r?n=Pr(t.min,t.max-r,e.min):r>o&&(n=Pr(e.min,e.max-o,t.min)),Bn(0,1,n)}function FP(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 mu=.35;function VP(e=mu){return e===!1?e=0:e===!0&&(e=mu),{x:pg(e,"left","right"),y:pg(e,"top","bottom")}}function pg(e,t,n){return{min:mg(e,t),max:mg(e,n)}}function mg(e,t){return typeof e=="number"?e:e[t]||0}const $P=new WeakMap;class RP{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=at(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ys(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:h,onDragStart:m}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=yP(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),nn(v=>{let b=this.getAxisMotionValue(v).get()||0;if(vn.test(b)){const{projection:y}=this.visualElement;if(y&&y.layout){const g=y.layout.layoutBox[v];g&&(b=$t(g)*(parseFloat(b)/100))}}this.originPoint[v]=b}),m&&Ue.postRender(()=>m(u,d)),Lc(this.visualElement,"transform");const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:m,onDrag:p}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=d;if(h&&this.currentDirection===null){this.currentDirection=BP(v),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),p&&p(u,d)},a=(u,d)=>this.stop(u,d),l=()=>nn(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 cg(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||!ma(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=MP(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&&wo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=DP(o.layoutBox,n):this.constraints=!1,this.elastic=VP(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&nn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=FP(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!wo(t))return!1;const r=t.current;tn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=IP(r,o.root,this.visualElement.getTransformPagePoint());let i=NP(o.layout.layoutBox,s);if(n){const a=n(bP(i));this.hasMutatedConstraints=!!a,a&&(i=Gm(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=nn(u=>{if(!ma(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,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Lc(this.visualElement,t),r.start(iu(t,r,0,n,this.visualElement,!1))}stopAnimation(){nn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){nn(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){nn(n=>{const{drag:r}=this.getProps();if(!ma(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]-Xe(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!wo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};nn(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=LP({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(),nn(i=>{if(!ma(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Xe(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;$P.set(this.visualElement,this);const t=this.visualElement.current,n=Po(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();wo(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=Gs(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(nn(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=mu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function ma(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function BP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class jP extends rr{constructor(t){super(t),this.removeGroupControls=Wt,this.removeListeners=Wt,this.controls=new RP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Wt}unmount(){this.removeGroupControls(),this.removeListeners()}}const gg=e=>(t,n)=>{e&&Ue.postRender(()=>e(t,n))};class zP extends rr{constructor(){super(...arguments),this.removePointerDownListener=Wt}onPointerDown(t){this.session=new cg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:gg(t),onStart:gg(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&Ue.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=Po(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 ga={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function yg(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Zs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(me.test(e))e=parseFloat(e);else return e;const n=yg(e,t.target.x),r=yg(e,t.target.y);return`${n}% ${r}%`}},WP={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=nr.parse(e);if(o.length>5)return r;const s=nr.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=Xe(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 HP extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;iE(UP),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()})),ga.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(),wc.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 vg(e){const[t,n]=dp(),r=w.useContext(Ds);return x.jsx(HP,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(Cp),isPresent:t,safeToRemove:n})}const UP={borderRadius:{...Zs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Zs,borderTopRightRadius:Zs,borderBottomLeftRadius:Zs,borderBottomRightRadius:Zs,boxShadow:WP};function bg(e,t,n){const r=bt(e)?e:To(e);return r.start(iu("",r,t,n)),r.animation}function wg(e){return e instanceof SVGElement&&e.tagName!=="svg"}const GP=(e,t)=>e.depth-t.depth;class YP{constructor(){this.children=[],this.isDirty=!1}add(t){Dc(this.children,t),this.isDirty=!0}remove(t){ia(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(GP),this.isDirty=!1,this.children.forEach(t)}}function qP(e,t){const n=bn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Rn(r),e(s-t))};return Ue.read(r,!0),()=>Rn(r)}const xg=["TopLeft","TopRight","BottomLeft","BottomRight"],KP=xg.length,Sg=e=>typeof e=="string"?parseFloat(e):e,Tg=e=>typeof e=="number"||me.test(e);function ZP(e,t,n,r,o,s){o?(e.opacity=Xe(0,n.opacity!==void 0?n.opacity:1,XP(r)),e.opacityExit=Xe(t.opacity!==void 0?t.opacity:1,0,QP(r))):s&&(e.opacity=Xe(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<KP;i++){const a=`border${xg[i]}Radius`;let l=Eg(t,a),c=Eg(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Tg(l)===Tg(c)?(e[a]=Math.max(Xe(Sg(l),Sg(c),r),0),(vn.test(c)||vn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Xe(t.rotate||0,n.rotate||0,r))}function Eg(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const XP=Cg(0,.5,om),QP=Cg(.5,.95,Wt);function Cg(e,t,n){return r=>r<e?0:r>t?1:n(Pr(e,t,r))}function Pg(e,t){e.min=t.min,e.max=t.max}function rn(e,t){Pg(e.x,t.x),Pg(e.y,t.y)}function kg(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ig(e,t,n,r,o){return e-=t,e=ha(e,1/n,r),o!==void 0&&(e=ha(e,1/o,r)),e}function JP(e,t=0,n=1,r=.5,o,s=e,i=e){if(vn.test(t)&&(t=parseFloat(t),t=Xe(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Xe(s.min,s.max,r);e===s&&(a-=t),e.min=Ig(e.min,t,n,a,o),e.max=Ig(e.max,t,n,a,o)}function Ag(e,t,[n,r,o],s,i){JP(e,t[n],t[r],t[o],t.scale,s,i)}const ek=["x","scaleX","originX"],tk=["y","scaleY","originY"];function Og(e,t,n,r){Ag(e.x,t,ek,n?n.x:void 0,r?r.x:void 0),Ag(e.y,t,tk,n?n.y:void 0,r?r.y:void 0)}function _g(e){return e.translate===0&&e.scale===1}function Mg(e){return _g(e.x)&&_g(e.y)}function Dg(e,t){return e.min===t.min&&e.max===t.max}function nk(e,t){return Dg(e.x,t.x)&&Dg(e.y,t.y)}function Ng(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Lg(e,t){return Ng(e.x,t.x)&&Ng(e.y,t.y)}function Fg(e){return $t(e.x)/$t(e.y)}function Vg(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class rk{constructor(){this.members=[]}add(t){Dc(this.members,t),t.scheduleRender()}remove(t){if(ia(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 ok(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:m}=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) `),m&&(r+=`skewY(${m}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 gu=["","X","Y","Z"],sk={visibility:"hidden"},$g=1e3;let ik=0;function yu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Rg(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Gp(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&&Rg(r)}function Bg({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=ik++,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(ck),this.nodes.forEach(pk),this.nodes.forEach(mk),this.nodes.forEach(uk)},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 YP)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Nc),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=wg(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=qP(f,250),ga.hasAnimatedSinceResize&&(ga.hasAnimatedSinceResize=!1,this.nodes.forEach(zg))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||wk,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=u.getProps(),y=!this.targetLayout||!Lg(this.targetLayout,m),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={...Mc(p,"layout"),onPlay:v,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||zg(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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,Rn(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(gk),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&&Rg(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(jg);return}this.isUpdating||this.nodes.forEach(fk),this.isUpdating=!1,this.nodes.forEach(hk),this.nodes.forEach(ak),this.nodes.forEach(lk),this.clearAllSnapshots();const a=bn.now();kt.delta=Bn(0,1e3/60,a-kt.timestamp),kt.timestamp=a,kt.isProcessing=!0,gc.update.process(kt),gc.preRender.process(kt),gc.render.process(kt),kt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,wc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(dk),this.sharedNodes.forEach(yk)}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&&!$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 i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=at(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,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&&!Mg(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Or(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)),xk(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return at();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(Sk))){const{scroll:u}=this.root;u&&(Io(l.x,u.offset.x),Io(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=at();if(rn(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&&rn(l,i),Io(l.x,d.offset.x),Io(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=at();rn(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Ao(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Or(u.latestValues)&&Ao(l,u.latestValues)}return Or(this.latestValues)&&Ao(l,this.latestValues),l}removeTransform(i){const a=at();rn(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Or(c.latestValues))continue;du(c.latestValues)&&c.updateSnapshot();const u=at(),d=c.measurePageBox();rn(u,d),Og(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Or(this.latestValues)&&Og(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!==kt.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=kt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=at(),this.relativeTargetOrigin=at(),Ks(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=at(),this.targetWithTransforms=at()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),PP(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rn(this.target,this.layout.layoutBox),rg(this.target,this.targetDelta)):rn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=at(),this.relativeTargetOrigin=at(),Ks(this.relativeTargetOrigin,this.target,h.target),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||du(this.parent.latestValues)||eg(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===kt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;rn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;kP(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=at());const{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(kg(this.prevProjectionDelta.x,this.projectionDelta.x),kg(this.prevProjectionDelta.y,this.projectionDelta.y)),qs(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Vg(this.projectionDelta.x,this.prevProjectionDelta.x)||!Vg(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}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=ko(),this.projectionDelta=ko(),this.projectionDeltaWithTransform=ko()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=ko();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=at(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=h!==m,v=this.getStack(),b=!v||v.members.length<=1,y=!!(p&&!b&&this.options.crossfade===!0&&!this.path.some(bk));this.animationProgress=0;let g;this.mixTargetDelta=T=>{const S=T/1e3;Wg(d.x,i.x,S),Wg(d.y,i.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ks(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),vk(this.relativeTarget,this.relativeTargetOrigin,f,S),g&&nk(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=at()),rn(g,this.relativeTarget)),p&&(this.animationValues=u,ZP(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&&(Rn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ue.update(()=>{ga.hasAnimatedSinceResize=!0,this.currentAnimation=bg(0,$g,{...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($g),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&&qg(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||at();const d=$t(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=$t(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}rn(a,l),Ao(a,u),qs(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new rk),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&&yu("z",i,c,this.animationValues);for(let u=0;u<gu.length;u++)yu(`rotate${gu[u]}`,i,c,this.animationValues),yu(`skew${gu[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 sk;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=oa(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 p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=oa(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Or(this.latestValues)&&(p.transform=u?u({},""):"none",this.hasProjected=!1),p}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=ok(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:m}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${m.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 p in Ls){if(f[p]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:y}=Ls[p],g=c.transform==="none"?f[p]:v(f[p],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[p]=g:c[p]=g}return this.options.layoutId&&(c.pointerEvents=d===this?oa(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(jg),this.root.sharedNodes.clear()}}}function ak(e){e.updateLayout()}function lk(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"?nn(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=$t(f);f.min=r[d].min,f.max=f.min+h}):qg(s,n.layoutBox,r)&&nn(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=$t(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=ko();qs(a,r,n.layoutBox);const l=ko();i?qs(l,e.applyTransform(o,!0),n.measuredBox):qs(l,r,n.layoutBox);const c=!Mg(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 m=at();Ks(m,n.layoutBox,f.layoutBox);const p=at();Ks(p,r,h.layoutBox),Lg(m,p)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=m,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 ck(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 uk(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function dk(e){e.clearSnapshot()}function jg(e){e.clearMeasurements()}function fk(e){e.isLayoutDirty=!1}function hk(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function zg(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function pk(e){e.resolveTargetDelta()}function mk(e){e.calcProjection()}function gk(e){e.resetSkewAndRotation()}function yk(e){e.removeLeadSnapshot()}function Wg(e,t,n){e.translate=Xe(t.translate,0,n),e.scale=Xe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Hg(e,t,n,r){e.min=Xe(t.min,n.min,r),e.max=Xe(t.max,n.max,r)}function vk(e,t,n,r){Hg(e.x,t.x,n.x,r),Hg(e.y,t.y,n.y,r)}function bk(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const wk={duration:.45,ease:[.4,0,.1,1]},Ug=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Gg=Ug("applewebkit/")&&!Ug("chrome/")?Math.round:Wt;function Yg(e){e.min=Gg(e.min),e.max=Gg(e.max)}function xk(e){Yg(e.x),Yg(e.y)}function qg(e,t,n){return e==="position"||e==="preserve-aspect"&&!CP(Fg(t),Fg(n),.2)}function Sk(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const Tk=Bg({attachResizeListener:(e,t)=>Gs(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),vu={current:void 0},Kg=Bg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!vu.current){const e=new Tk({});e.mount(window),e.setOptions({layoutScroll:!0}),vu.current=e}return vu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ek={pan:{Feature:zP},drag:{Feature:jP,ProjectionNode:Kg,MeasureLayout:vg}};function Zg(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 Xg(e,t){const n=Zg(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Qg(e){return!(e.pointerType==="touch"||Um())}function Ck(e,t,n={}){const[r,o,s]=Xg(e,n),i=a=>{if(!Qg(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Qg(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}function Jg(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,Ys(t)))}class Pk extends rr{mount(){const{current:t}=this.node;t&&(this.unmount=Ck(t,(n,r)=>(Jg(this.node,r,"Start"),o=>Jg(this.node,o,"End"))))}unmount(){}}class kk extends rr{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=Hs(Gs(this.node.current,"focus",()=>this.onFocus()),Gs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const ey=(e,t)=>t?e===t?!0:ey(e,t.parentElement):!1,Ik=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ak(e){return Ik.has(e.tagName)||e.tabIndex!==-1}const Xs=new WeakSet;function ty(e){return t=>{t.key==="Enter"&&e(t)}}function bu(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Ok=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=ty(()=>{if(Xs.has(n))return;bu(n,"down");const o=ty(()=>{bu(n,"up")}),s=()=>bu(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 ny(e){return cu(e)&&!Um()}function _k(e,t,n={}){const[r,o,s]=Xg(e,n),i=a=>{const l=a.currentTarget;if(!l||!ny(a)||Xs.has(l))return;Xs.add(l),pa(a,"set");const c=t(l,a),u=(h,m)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),pa(h,"release"),!(!ny(h)||!Xs.has(l))&&(Xs.delete(l),typeof c=="function"&&c(h,{success:m}))},d=h=>{(h.isTrusted?Mk(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)||ey(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,!Ak(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,o),l&&a.addEventListener("focus",c=>Ok(c,o),o)}),s}function Mk(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}function ry(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,Ys(t)))}class Dk extends rr{mount(){const{current:t}=this.node;t&&(this.unmount=_k(t,(n,r)=>(ry(this.node,r,"Start"),(o,{success:s})=>ry(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const wu=new WeakMap,xu=new WeakMap,Nk=e=>{const t=wu.get(e.target);t&&t(e)},Lk=e=>{e.forEach(Nk)};function Fk({root:e,...t}){const n=e||document;xu.has(n)||xu.set(n,{});const r=xu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Lk,{root:e,...t})),r[o]}function Vk(e,t,n){const r=Fk(t);return wu.set(e,n),r.observe(e),()=>{wu.delete(e),r.unobserve(e)}}const $k={some:0,all:1};class Rk extends rr{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:$k[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 Vk(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(Bk(t,n))&&this.startObserver()}unmount(){}}function Bk({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const jk={inView:{Feature:Rk},tap:{Feature:Dk},focus:{Feature:kk},hover:{Feature:Pk}},zk={layout:{ProjectionNode:Kg,MeasureLayout:vg}},Su={current:null},oy={current:!1};function Wk(){if(oy.current=!0,!!mc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Su.current=e.matches;e.addListener(t),t()}else Su.current=!1}const Hk=[...Sm,Mt,nr],Uk=e=>Hk.find(xm(e)),Qs=new WeakMap;function Gk(e,t,n){for(const r in t){const o=t[r],s=n[r];if(bt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Ji(o.version==="12.4.7",`Attempting to mix Motion versions ${o.version} with 12.4.7 may not work as expected.`);else if(bt(s))e.addValue(r,To(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,To(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const sy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class iy{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=Kc,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=bn.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=na(n),this.isVariantNode=Sp(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 m=f[h];l[h]!==void 0&&bt(m)&&m.set(l[h],!1)}}mount(t){this.current=t,Qs.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)),oy.current||Wk(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Su.current,process.env.NODE_ENV!=="production"&&Ji(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(),Rn(this.notifyUpdate),Rn(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=Cr.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 bo){const n=bo[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):at()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<sy.length;r++){const o=sy[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=Gk(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=To(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"&&(bm(o)||im(o))?o=parseFloat(o):!Uk(o)&&nr.test(n)&&(o=hm(t,n)),this.setBaseTarget(t,bt(o)?o.get():o)),bt(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=Ac(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&&!bt(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 Nc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ay extends iy{constructor(){super(...arguments),this.KeyframeResolver=Em}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;bt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Yk(e){return window.getComputedStyle(e)}class ly extends ay{constructor(){super(...arguments),this.type="html",this.renderInstance=$p}readValueFromInstance(t,n){if(Cr.has(n)){const r=Gc(n);return r&&r.default||0}else{const r=Yk(t),o=(xc(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ag(t,n)}build(t,n,r){Ec(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return _c(t,n,r)}}class cy extends ay{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=at,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Vp(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Cr.has(n)){const r=Gc(n);return r&&r.default||0}return n=Rp.has(n)?n:bc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return jp(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ue.postRender(this.updateDimensions)}build(t,n,r){kc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Bp(t,n,r,o)}mount(t){this.isSVGTag=Ic(t.tagName),super.mount(t)}}const qk=(e,t)=>Pc(e)?new cy(t):new ly(t,{allowProjection:e!==w.Fragment}),Kk=OE({...gP,...jk,...Ek,...zk},qk),lt=YT(Kk);function _r(e){const t=an(()=>To(e)),{isStatic:n}=w.useContext(yo);if(n){const[,r]=w.useState(e);w.useEffect(()=>t.on("change",r),[])}return t}function uy(e,t){const n=_r(t()),r=()=>n.set(t());return r(),Zi(()=>{const o=()=>Ue.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),Rn(r)}}),n}const Zk=e=>e&&typeof e=="object"&&e.mix,Xk=e=>Zk(e)?e.mix:void 0;function Qk(...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=Vm(o,s,{mixer:Xk(s[0]),...i});return t?a(r):a}function Jk(e){Rs.current=[],e();const t=uy(Rs.current,e);return Rs.current=void 0,t}function eI(e,t,n,r){if(typeof e=="function")return Jk(e);const o=typeof t=="function"?t:Qk(t,n,r);return Array.isArray(e)?dy(e,o):dy([e],([s])=>o(s))}function dy(e,t){const n=an(()=>[]);return uy(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function tI(e){return w.useEffect(()=>()=>e(),[])}function nI(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Zc(r),ua);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:wn(o)}}const rI=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function fy(e,t){return Lm(e)?e[rI(0,e.length,t)]:e}function Tu(e){return typeof e=="object"&&!Array.isArray(e)}function hy(e,t,n,r){return typeof e=="string"&&Tu(t)?Zg(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function oI(e,t,n){return e*(t+1)}function py(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 sI(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(ia(e,o),r--)}}function iI(e,t,n,r,o,s){sI(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Xe(o,s,r[i]),easing:fy(n,i)})}function aI(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function lI(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const cI="easeInOut",uI=20;function dI(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 m=e[h];if(typeof m=="string"){c.set(m,d);continue}else if(!Array.isArray(m)){c.set(m.name,py(d,m.at,u,c));continue}let[p,v,b={}]=m;b.at!==void 0&&(d=py(d,b.at,u,c));let y=0;const g=(T,S,E,C=0,I=0)=>{const A=fI(T),{delay:O=0,times:L=Rm(A),type:D="keyframes",repeat:V,repeatType:k,repeatDelay:_=0,...F}=S;let{ease:N=t.ease||"easeOut",duration:R}=S;const H=typeof O=="function"?O(C,I):O,M=A.length,B=aa(D)?D:o==null?void 0:o[D];if(M<=2&&B){let G=100;if(M===2&&mI(A)){const W=A[1]-A[0];G=Math.abs(W)}const $={...F};R!==void 0&&($.duration=ln(R));const j=nI($,G,B);N=j.ease,R=j.duration}R??(R=s);const K=d+H;L.length===1&&L[0]===0&&(L[1]=1);const oe=L.length-A.length;if(oe>0&&$m(L,oe),A.length===1&&A.unshift(null),V){tn(V<uI,"Repeat count too high, must be less than 20"),R=oI(R,V);const G=[...A],$=[...L];N=Array.isArray(N)?[...N]:[N];const j=[...N];for(let W=0;W<V;W++){A.push(...G);for(let Y=0;Y<G.length;Y++)L.push($[Y]+(W+1)),N.push(Y===0?"linear":fy(j,Y-1))}aI(L,V)}const te=K+R;iI(E,A,N,L,K,te),y=Math.max(H+R,y),f=Math.max(te,f)};if(bt(p)){const T=my(p,a);g(v,b,gy("default",T))}else{const T=hy(p,v,r,l),S=T.length;for(let E=0;E<S;E++){v=v,b=b;const C=T[E],I=my(C,a);for(const A in v)g(v[A],hI(b,A),gy(A,I),E,S)}}u=d,d+=y}return a.forEach((h,m)=>{for(const p in h){const v=h[p];v.sort(lI);const b=[],y=[],g=[];for(let S=0;S<v.length;S++){const{at:E,value:C,easing:I}=v[S];b.push(C),y.push(Pr(0,f,E)),g.push(I||"easeOut")}y[0]!==0&&(y.unshift(0),b.unshift(b[0]),g.unshift(cI)),y[y.length-1]!==1&&(y.push(1),b.push(null)),i.has(m)||i.set(m,{keyframes:{},transition:{}});const T=i.get(m);T.keyframes[p]=b,T.transition[p]={...t,duration:f,ease:g,times:y,...n}}}),i}function my(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function gy(e,t){return t[e]||(t[e]=[]),t[e]}function fI(e){return Array.isArray(e)?e:[e]}function hI(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const pI=e=>typeof e=="number",mI=e=>e.every(pI);function gI(e,t){return e in t}class yI extends iy{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(gI(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 at()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function vI(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=wg(e)?new cy(t):new ly(t);n.mount(e),Qs.set(e,n)}function bI(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new yI(t);n.mount(e),Qs.set(e,n)}function wI(e,t){return bt(e)||typeof e=="number"||typeof e=="string"&&!Tu(t)}function yy(e,t,n,r){const o=[];if(wI(e,t))o.push(bg(e,Tu(t)&&t.default||t,n&&(n.default||n)));else{const s=hy(e,t,r),i=s.length;tn(!!i,"No valid elements provided.");for(let a=0;a<i;a++){const l=s[a],c=l instanceof Element?vI:bI;Qs.has(l)||c(l);const u=Qs.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,i)),o.push(...au(u,{...t,transition:d},{}))}}return o}function xI(e,t,n){const r=[];return dI(e,t,n,{spring:ru}).forEach(({keyframes:s,transition:i},a)=>{r.push(...yy(a,s,i))}),r}function SI(e){return Array.isArray(e)&&e.some(Array.isArray)}function TI(e){function t(n,r,o){let s=[];SI(n)?s=xI(n,r,e):s=yy(n,r,o,e);const i=new Yp(s);return e&&e.animations.push(i),i}return t}function EI(){const e=an(()=>({current:null,animations:[]})),t=an(()=>TI(e));return tI(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class CI{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 PI=()=>new CI;function kI(){return an(PI)}function II(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function AI(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:II(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=ou(r)(l/c)*c}return t+l}}const vy=w.createContext(null);function OI(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=Xe(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?ME(e,o,o+s):e}function _I({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=an(()=>lt[t]),l=[],c=w.useRef(!1);tn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,f)=>{const h=l.findIndex(m=>d===m.value);h!==-1?l[h].layout=f[n]:l.push({value:d,layout:f[n]}),l.sort(DI)},updateOrder:(d,f,h)=>{if(c.current)return;const m=OI(l,d,f,h);l!==m&&(c.current=!0,r(m.map(MI).filter(p=>o.indexOf(p)!==-1)))}};return w.useEffect(()=>{c.current=!1}),x.jsx(a,{...s,ref:i,ignoreStrict:!0,children:x.jsx(vy.Provider,{value:u,children:e})})}const by=w.forwardRef(_I);function MI(e){return e.value}function DI(e,t){return e.layout.min-t.layout.min}function wy(e,t=0){return bt(e)?e:_r(t)}function NI({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=an(()=>lt[r]),c=w.useContext(vy),u={x:wy(t.x),y:wy(t.y)},d=eI([u.x,u.y],([p,v])=>p||v?1:"unset");tn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:h,updateOrder:m}=c;return x.jsx(l,{drag:f,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:s,onDrag:(p,v)=>{const{velocity:b}=v;b[f]&&m(n,u[f].get(),b[f]),o&&o(p,v)},onLayoutMeasure:p=>h(n,p),ref:a,ignoreStrict:!0,children:e})}const xy=w.forwardRef(NI);/**
|
|
13
|
-
* @license lucide-react v0.
|
|
12
|
+
`),()=>{document.head.removeChild(f)}},[t]),b.jsx(aS,{isPresent:t,childRef:o,sizeRef:i,children:_.cloneElement(e,{ref:o})})}const lS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=fn(cS),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]),_.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=b.jsx(sS,{isPresent:n,anchorX:s,children:e})),b.jsx(Oa.Provider,{value:d,children:e})};function cS(){return new Map}function Rh(e=!0){const t=E.useContext(Oa);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 Ma=e=>e.key||"";function $h(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const Qn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=Rh(a),u=E.useMemo(()=>$h(e),[e]),d=a&&!l?[]:u.map(Ma),p=E.useRef(!0),f=E.useRef(u),h=fn(()=>new Map),[y,g]=E.useState(u),[v,m]=E.useState(u);Ia(()=>{p.current=!1,f.current=u;for(let T=0;T<v.length;T++){const w=Ma(v[T]);d.includes(w)?h.delete(w):h.get(w)!==!0&&h.set(w,!1)}},[v,d.length,d.join("-")]);const x=[];if(u!==y){let T=[...u];for(let w=0;w<v.length;w++){const C=v[w],k=Ma(C);d.includes(k)||(T.splice(w,0,C),x.push(C))}return i==="wait"&&x.length&&(T=x),m($h(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(bi);return b.jsx(b.Fragment,{children:v.map(T=>{const w=Ma(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(A=>{A||(I=!1)}),I&&(S==null||S(),m(f.current),a&&(c==null||c()),r&&r())};return b.jsx(lS,{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)})})},uS=E.createContext(null),Ut=e=>e;let ho=Ut,an=Ut;process.env.NODE_ENV!=="production"&&(ho=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},an=(e,t)=>{if(!e)throw new Error(t)});const dS={useManualTiming:!1},Da=["read","resolveKeyframes","update","preRender","render","postRender"];function fS(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 pS=40;function zh(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Da.reduce((v,m)=>(v[m]=fS(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,pS),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:Da.reduce((v,m)=>{const x=a[m];return v[m]=(S,T=!1,w=!1)=>(n||h(),x.schedule(S,T,w)),v},{}),cancel:v=>{for(let m=0;m<Da.length;m++)a[Da[m]].cancel(v)},state:o,steps:a}}const{schedule:Xe,cancel:zn,state:Dt,steps:Sc}=zh(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ut,!0);function hS(){const e=E.useRef(!1);return Ia(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function mS(){const e=hS(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>Xe.postRender(r),[r]),t]}const gS=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Bh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(gS);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 Hh=e=>e===!0,vS=e=>Hh(e===!0)||e==="id",yS=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(bi),o=E.useContext(uS),[i,a]=mS(),s=E.useRef(null),l=r.id||o;s.current===null&&(vS(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:Hh(n)&&r.group||Bh()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return b.jsx(bi.Provider,{value:c,children:e})},Wh=E.createContext({strict:!1}),qh={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"]},mo={};for(const e in qh)mo[e]={isEnabled:t=>qh[e].some(n=>!!t[n])};function bS(e){for(const t in e)mo[t]={...mo[t],...e[t]}}const xS=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 Na(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||xS.has(e)}let Uh=e=>!Na(e);function Gh(e){e&&(Uh=t=>t.startsWith("on")?!Na(t):e(t))}try{Gh(require("@emotion/is-prop-valid").default)}catch{}function wS(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Uh(o)||n===!0&&Na(o)||!t&&!Na(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function TS({children:e,isValidProp:t,...n}){t&&Gh(t),n={...E.useContext(po),...n},n.isStatic=fn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return b.jsx(po.Provider,{value:r,children:e})}const Yh=new Set;function Fa(e,t,n){e||Yh.has(t)||(console.warn(t),Yh.add(t))}function SS(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Fa(!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 La=E.createContext({});function Va(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function xi(e){return typeof e=="string"||Array.isArray(e)}const Ec=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Cc=["initial",...Ec];function ja(e){return Va(e.animate)||Cc.some(t=>xi(e[t]))}function Kh(e){return!!(ja(e)||e.variants)}function ES(e,t){if(ja(e)){const{initial:n,animate:r}=e;return{initial:n===!1||xi(n)?n:void 0,animate:xi(r)?r:void 0}}return e.inherit!==!1?t:{}}function CS(e){const{initial:t,animate:n}=ES(e,E.useContext(La));return E.useMemo(()=>({initial:t,animate:n}),[Zh(t),Zh(n)])}function Zh(e){return Array.isArray(e)?e.join(" "):e}const kS=Symbol.for("motionComponentSymbol");function go(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function PS(e,t,n){return E.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):go(n)&&(n.current=r))},[t])}const{schedule:kc}=zh(queueMicrotask,!1),Pc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Xh="data-"+Pc("framerAppearId"),Qh=E.createContext({});function AS(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(La),l=E.useContext(Wh),c=E.useContext(Oa),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(Qh);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&_S(d.current,n,o,f);const h=E.useRef(!1);E.useInsertionEffect(()=>{p&&h.current&&p.update(n,c)});const y=n[Xh],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 Ia(()=>{p&&(h.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),kc.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 _S(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:Jh(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&go(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Jh(e){if(e)return e.options.allowProjection!==!1?e.projection:Jh(e.parent)}function IS({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&bS(e);function s(c,u){let d;const p={...E.useContext(po),...c,layoutId:OS(c)},{isStatic:f}=p,h=CS(c),y=r(c,f);if(!f&&Tc){MS(p,e);const g=DS(p);d=g.MeasureLayout,h.visualElement=AS(o,y,p,t,g.ProjectionNode)}return b.jsxs(La.Provider,{value:h,children:[d&&h.visualElement?b.jsx(d,{visualElement:h.visualElement,...p}):null,n(o,c,PS(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[kS]=o,l}function OS({layoutId:e}){const t=E.useContext(bi).id;return t&&e!==void 0?t+"-"+e:e}function MS(e,t){const n=E.useContext(Wh).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?ho(!1,r):an(!1,r)}}function DS(e){const{drag:t,layout:n}=mo;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 em=e=>t=>typeof t=="string"&&t.startsWith(e),Ac=em("--"),NS=em("var(--"),_c=e=>NS(e)?FS.test(e.split("/*")[0].trim()):!1,FS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,wi={};function LS(e){for(const t in e)wi[t]=e[t],Ac(t)&&(wi[t].isCSSVariable=!0)}const vo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ar=new Set(vo);function tm(e,{layout:t,layoutId:n}){return Ar.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!wi[e]||e==="opacity")}const kt=e=>!!(e&&e.getVelocity),nm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Bn=(e,t,n)=>n>t?t:n<e?e:n,yo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ti={...yo,transform:e=>Bn(0,1,e)},Ra={...yo,default:1},Si=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Jn=Si("deg"),Sn=Si("%"),we=Si("px"),VS=Si("vh"),jS=Si("vw"),rm={...Sn,parse:e=>Sn.parse(e)/100,transform:e=>Sn.transform(e*100)},RS={borderWidth:we,borderTopWidth:we,borderRightWidth:we,borderBottomWidth:we,borderLeftWidth:we,borderRadius:we,radius:we,borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomRightRadius:we,borderBottomLeftRadius:we,width:we,maxWidth:we,height:we,maxHeight:we,top:we,right:we,bottom:we,left:we,padding:we,paddingTop:we,paddingRight:we,paddingBottom:we,paddingLeft:we,margin:we,marginTop:we,marginRight:we,marginBottom:we,marginLeft:we,backgroundPositionX:we,backgroundPositionY:we},$S={rotate:Jn,rotateX:Jn,rotateY:Jn,rotateZ:Jn,scale:Ra,scaleX:Ra,scaleY:Ra,scaleZ:Ra,skew:Jn,skewX:Jn,skewY:Jn,distance:we,translateX:we,translateY:we,translateZ:we,x:we,y:we,z:we,perspective:we,transformPerspective:we,opacity:Ti,originX:rm,originY:rm,originZ:we},om={...yo,transform:Math.round},Ic={...RS,...$S,zIndex:om,size:we,fillOpacity:Ti,strokeOpacity:Ti,numOctaves:om},zS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},BS=vo.length;function HS(e,t,n){let r="",o=!0;for(let i=0;i<BS;i++){const a=vo[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=nm(s,Ic[a]);if(!l){o=!1;const u=zS[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Oc(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(Ar.has(l)){a=!0;continue}else if(Ac(l)){o[l]=c;continue}else{const u=nm(c,Ic[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=HS(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 Mc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function im(e,t,n){for(const r in t)!kt(t[r])&&!tm(r,n)&&(e[r]=t[r])}function WS({transformTemplate:e},t){return E.useMemo(()=>{const n=Mc();return Oc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function qS(e,t){const n=e.style||{},r={};return im(r,n,e),Object.assign(r,WS(e,t)),r}function US(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 GS=["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 Dc(e){return typeof e!="string"||e.includes("-")?!1:!!(GS.indexOf(e)>-1||/[A-Z]/u.test(e))}const YS={offset:"stroke-dashoffset",array:"stroke-dasharray"},KS={offset:"strokeDashoffset",array:"strokeDasharray"};function ZS(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?YS:KS;e[i.offset]=we.transform(-r);const a=we.transform(t),s=we.transform(n);e[i.array]=`${a} ${s}`}function am(e,t,n){return typeof e=="string"?e:we.transform(t+n*e)}function XS(e,t,n){const r=am(t,e.x,e.width),o=am(n,e.y,e.height);return`${r} ${o}`}function Nc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(Oc(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=XS(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&&ZS(p,a,s,l,!1)}const sm=()=>({...Mc(),attrs:{}}),Fc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function QS(e,t,n,r){const o=E.useMemo(()=>{const i=sm();return Nc(i,t,Fc(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};im(i,e.style,e),o.style={...i,...o.style}}return o}function JS(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(Dc(n)?QS:US)(r,i,a,n),c=wS(r,typeof n=="string",e),u=n!==E.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=E.useMemo(()=>kt(d)?d.get():d,[d]);return E.createElement(n,{...u,children:p})}}function lm(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Lc(e,t,n,r){if(typeof t=="function"){const[o,i]=lm(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]=lm(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const Vc=e=>Array.isArray(e),eE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),tE=e=>Vc(e)?e[e.length-1]||0:e;function $a(e){const t=kt(e)?e.get():e;return eE(t)?t.toValue():t}function nE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:rE(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const cm=e=>(t,n)=>{const r=E.useContext(La),o=E.useContext(Oa),i=()=>nE(e,t,r,o);return n?i():fn(i)};function rE(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=$a(i[p]);let{initial:a,animate:s}=e;const l=ja(e),c=Kh(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"&&!Va(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const h=Lc(e,p[f]);if(h){const{transitionEnd:y,transition:g,...v}=h;for(const m in v){let x=v[m];if(Array.isArray(x)){const S=u?x.length-1:0;x=x[S]}x!==null&&(o[m]=x)}for(const m in y)o[m]=y[m]}}}return o}function jc(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(kt(o[a])||t.style&&kt(t.style[a])||tm(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 oE={useVisualState:cm({scrapeMotionValuesFromProps:jc,createRenderState:Mc})};function um(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 dm(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 fm=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 pm(e,t,n,r){dm(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(fm.has(o)?o:Pc(o),t.attrs[o])}function hm(e,t,n){const r=jc(e,t,n);for(const o in e)if(kt(e[o])||kt(t[o])){const i=vo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const mm=["x","y","width","height","cx","cy","r"],iE={useVisualState:cm({scrapeMotionValuesFromProps:hm,createRenderState:sm,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(Ar.has(s)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let s=0;s<mm.length;s++){const l=mm[s];e[l]!==t[l]&&(a=!0)}a&&Xe.read(()=>{um(n,r),Xe.render(()=>{Nc(r,o,Fc(n.tagName),e.transformTemplate),pm(n,r)})})}})};function aE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...Dc(r)?iE:oE,preloadedFeatures:e,useRender:JS(o),createVisualElement:t,Component:r};return IS(a)}}function Ei(e,t,n){const r=e.getProps();return Lc(r,t,n!==void 0?n:r.custom,e)}function Rc(e,t){return e?e[t]||e.default||e:void 0}const gm=new Set(["width","height","top","left","right","bottom",...vo]);function $c(e,t){e.indexOf(t)===-1&&e.push(t)}function za(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function sE([...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 zc{constructor(){this.subscriptions=[]}add(t){return $c(this.subscriptions,t),()=>za(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 vm(e,t){return t?e*(1e3/t):0}let Ba;function lE(){Ba=void 0}const En={now:()=>(Ba===void 0&&En.set(Dt.isProcessing||dS.useManualTiming?Dt.timestamp:performance.now()),Ba),set:e=>{Ba=e,queueMicrotask(lE)}},ym=30,cE=e=>!isNaN(parseFloat(e)),Ci={current:void 0};class uE{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=En.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=En.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=cE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Fa(!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 zc);const r=this.events[t].add(n);return t==="change"?()=>{r(),Xe.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 Ci.current&&Ci.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=En.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ym)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ym);return vm(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 bo(e,t){return new uE(e,t)}function dE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,bo(n))}function fE(e,t){const n=Ei(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=tE(i[a]);dE(e,a,s)}}function pE(e){return!!(kt(e)&&e.add)}function Bc(e,t){const n=e.getValue("willChange");if(pE(n))return n.add(t)}function bm(e){return e.props[Xh]}function Hc(e){let t;return()=>(t===void 0&&(t=e()),t)}const hE=Hc(()=>window.ScrollTimeline!==void 0);class mE{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(hE()&&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 xm extends mE{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const pn=e=>e*1e3,Cn=e=>e/1e3;function Ha(e){return typeof e=="function"}function wm(e,t){e.timeline=t,e.onfinish=null}const Wc=e=>Array.isArray(e)&&typeof e[0]=="number",gE={linearEasing:void 0};function vE(e,t){const n=Hc(e);return()=>{var r;return(r=gE[t])!==null&&r!==void 0?r:n()}}const Wa=vE(()=>{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},Tm=(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 Sm(e){return!!(typeof e=="function"&&Wa()||!e||typeof e=="string"&&(e in qc||Wa())||Wc(e)||Array.isArray(e)&&e.every(Sm))}const ki=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,qc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ki([0,.65,.55,1]),circOut:ki([.55,0,1,.45]),backIn:ki([.31,.01,.66,-.59]),backOut:ki([.33,1.53,.69,.99])};function Em(e,t){if(e)return typeof e=="function"&&Wa()?Tm(e,t):Wc(e)?ki(e):Array.isArray(e)?e.map(n=>Em(n,t)||qc.easeOut):qc[e]}const Cm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,yE=1e-7,bE=12;function xE(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=Cm(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>yE&&++s<bE);return a}function Pi(e,t,n,r){if(e===t&&n===r)return Ut;const o=i=>xE(i,0,1,e,n);return i=>i===0||i===1?i:Cm(o(i),t,r)}const km=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Pm=e=>t=>1-e(1-t),Am=Pi(.33,1.53,.69,.99),Uc=Pm(Am),_m=km(Uc),Im=e=>(e*=2)<1?.5*Uc(e):.5*(2-Math.pow(2,-10*(e-1))),Gc=e=>1-Math.sin(Math.acos(e)),Om=Pm(Gc),Mm=km(Gc),Dm=e=>/^0[^.\s]+$/u.test(e);function wE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Dm(e):!0}const Ai=e=>Math.round(e*1e5)/1e5,Yc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function TE(e){return e==null}const SE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Kc=(e,t)=>n=>!!(typeof n=="string"&&SE.test(n)&&n.startsWith(e)||t&&!TE(n)&&Object.prototype.hasOwnProperty.call(n,t)),Nm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(Yc);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},EE=e=>Bn(0,255,e),Zc={...yo,transform:e=>Math.round(EE(e))},Ir={test:Kc("rgb","red"),parse:Nm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Zc.transform(e)+", "+Zc.transform(t)+", "+Zc.transform(n)+", "+Ai(Ti.transform(r))+")"};function CE(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 Xc={test:Kc("#"),parse:CE,transform:Ir.transform},xo={test:Kc("hsl","hue"),parse:Nm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Sn.transform(Ai(t))+", "+Sn.transform(Ai(n))+", "+Ai(Ti.transform(r))+")"},Vt={test:e=>Ir.test(e)||Xc.test(e)||xo.test(e),parse:e=>Ir.test(e)?Ir.parse(e):xo.test(e)?xo.parse(e):Xc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ir.transform(e):xo.transform(e)},kE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function PE(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Yc))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(kE))===null||n===void 0?void 0:n.length)||0)>0}const Fm="number",Lm="color",AE="var",_E="var(",Vm="${}",IE=/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 _i(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(IE,l=>(Vt.test(l)?(r.color.push(i),o.push(Lm),n.push(Vt.parse(l))):l.startsWith(_E)?(r.var.push(i),o.push(AE),n.push(l)):(r.number.push(i),o.push(Fm),n.push(parseFloat(l))),++i,Vm)).split(Vm);return{values:n,split:s,indexes:r,types:o}}function jm(e){return _i(e).values}function Rm(e){const{split:t,types:n}=_i(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===Fm?i+=Ai(o[a]):s===Lm?i+=Vt.transform(o[a]):i+=o[a]}return i}}const OE=e=>typeof e=="number"?0:e;function ME(e){const t=jm(e);return Rm(e)(t.map(OE))}const er={test:PE,parse:jm,createTransformer:Rm,getAnimatableNone:ME},DE=new Set(["brightness","contrast","saturate","opacity"]);function NE(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Yc)||[];if(!r)return e;const o=n.replace(r,"");let i=DE.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const FE=/\b([a-z-]*)\(.*?\)/gu,Qc={...er,getAnimatableNone:e=>{const t=e.match(FE);return t?t.map(NE).join(" "):e}},LE={...Ic,color:Vt,backgroundColor:Vt,outlineColor:Vt,fill:Vt,stroke:Vt,borderColor:Vt,borderTopColor:Vt,borderRightColor:Vt,borderBottomColor:Vt,borderLeftColor:Vt,filter:Qc,WebkitFilter:Qc},$m=e=>LE[e];function zm(e,t){let n=$m(e);return n!==Qc&&(n=er),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const VE=new Set(["auto","none","0"]);function jE(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!VE.has(i)&&_i(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=zm(n,o)}const Or=e=>e*180/Math.PI,Jc=e=>{const t=Or(Math.atan2(e[1],e[0]));return eu(t)},RE={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Jc,rotateZ:Jc,skewX:e=>Or(Math.atan(e[1])),skewY:e=>Or(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},eu=e=>(e=e%360,e<0&&(e+=360),e),Bm=Jc,Hm=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Wm=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),$E={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Hm,scaleY:Wm,scale:e=>(Hm(e)+Wm(e))/2,rotateX:e=>eu(Or(Math.atan2(e[6],e[5]))),rotateY:e=>eu(Or(Math.atan2(-e[2],e[0]))),rotateZ:Bm,rotate:Bm,skewX:e=>Or(Math.atan(e[4])),skewY:e=>Or(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function qm(e){return e.includes("scale")?1:0}function tu(e,t){if(!e||e==="none")return qm(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=$E,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=RE,o=s}if(!o)return qm(t);const i=r[t],a=o[1].split(",").map(BE);return typeof i=="function"?i(a):a[i]}const zE=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return tu(n,t)};function BE(e){return parseFloat(e.trim())}const Um=e=>e===yo||e===we,HE=new Set(["x","y","z"]),WE=vo.filter(e=>!HE.has(e));function qE(e){const t=[];return WE.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const wo={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})=>tu(t,"x"),y:(e,{transform:t})=>tu(t,"y")};wo.translateX=wo.x,wo.translateY=wo.y;const Mr=new Set;let nu=!1,ru=!1;function Gm(){if(ru){const e=Array.from(Mr).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)})}ru=!1,nu=!1,Mr.forEach(e=>e.complete()),Mr.clear()}function Ym(){Mr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ru=!0)})}function UE(){Ym(),Gm()}class ou{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?(Mr.add(this),nu||(nu=!0,Xe.read(Ym),Xe.resolveKeyframes(Gm))):(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),Mr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Mr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Km=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),GE=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function YE(e){const t=GE.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const KE=4;function Zm(e,t,n=1){an(n<=KE,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=YE(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return Km(a)?parseFloat(a):a}return _c(o)?Zm(o,t,n+1):o}const Xm=e=>t=>t.test(e),Qm=[yo,we,Sn,Jn,jS,VS,{test:e=>e==="auto",parse:e=>e}],Jm=e=>Qm.find(Xm(e));class eg extends ou{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(),_c(c))){const u=Zm(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!gm.has(r)||t.length!==2)return;const[o,i]=t,a=Jm(o),s=Jm(i);if(a!==s)if(Um(a)&&Um(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++)wE(t[o])&&r.push(o);r.length&&jE(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=wo[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]=wo[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 tg=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(er.test(e)||e==="0")&&!e.startsWith("url("));function ZE(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 XE(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=tg(o,t),s=tg(i,t);return ho(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:ZE(e)||(n==="spring"||Ha(n))&&r}const QE=e=>e!==null;function qa(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(QE),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const JE=40;class ng{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=En.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>JE?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&UE(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=En.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!XE(t,r,o,i))if(a)this.options.duration=0;else{l&&l(qa(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 Ua=2e4;function iu(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ua;)t+=n,r=e.next(t);return t>=Ua?1/0:t}const rt=(e,t,n)=>e+(t-e)*n;function au(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 eC({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=au(l,s,e+1/3),i=au(l,s,e),a=au(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Ga(e,t){return n=>n>0?t:e}const su=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},tC=[Xc,Ir,xo],nC=e=>tC.find(t=>t.test(e));function rg(e){const t=nC(e);if(ho(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===xo&&(n=eC(n)),n}const og=(e,t)=>{const n=rg(e),r=rg(t);if(!n||!r)return Ga(e,t);const o={...n};return i=>(o.red=su(n.red,r.red,i),o.green=su(n.green,r.green,i),o.blue=su(n.blue,r.blue,i),o.alpha=rt(n.alpha,r.alpha,i),Ir.transform(o))},rC=(e,t)=>n=>t(e(n)),Ii=(...e)=>e.reduce(rC),lu=new Set(["none","hidden"]);function oC(e,t){return lu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function iC(e,t){return n=>rt(e,t,n)}function cu(e){return typeof e=="number"?iC:typeof e=="string"?_c(e)?Ga:Vt.test(e)?og:lC:Array.isArray(e)?ig:typeof e=="object"?Vt.test(e)?og:aC:Ga}function ig(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>cu(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function aC(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=cu(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function sC(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 lC=(e,t)=>{const n=er.createTransformer(t),r=_i(e),o=_i(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?lu.has(e)&&!o.values.length||lu.has(t)&&!r.values.length?oC(e,t):Ii(ig(sC(r,o),o.values),n):(ho(!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.`),Ga(e,t))};function ag(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?rt(e,t,n):cu(e)(e,t)}const cC=5;function sg(e,t,n){const r=Math.max(t-cC,0);return vm(n-e(r),t-r)}const ct={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},lg=.001;function uC({duration:e=ct.duration,bounce:t=ct.bounce,velocity:n=ct.velocity,mass:r=ct.mass}){let o,i;ho(e<=pn(ct.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Bn(ct.minDamping,ct.maxDamping,a),e=Bn(ct.minDuration,ct.maxDuration,Cn(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=uu(c,a),h=Math.exp(-d);return lg-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=uu(Math.pow(c,2),a);return(-o(c)+lg>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=fC(o,i,s);if(e=pn(e),isNaN(l))return{stiffness:ct.stiffness,damping:ct.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const dC=12;function fC(e,t,n){let r=n;for(let o=1;o<dC;o++)r=r-e(r)/t(r);return r}function uu(e,t){return e*Math.sqrt(1-t*t)}const pC=["duration","bounce"],hC=["stiffness","damping","mass"];function cg(e,t){return t.some(n=>e[n]!==void 0)}function mC(e){let t={velocity:ct.velocity,stiffness:ct.stiffness,damping:ct.damping,mass:ct.mass,isResolvedFromDuration:!1,...e};if(!cg(e,hC)&&cg(e,pC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Bn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ct.mass,stiffness:o,damping:i}}else{const n=uC(e);t={...t,...n,mass:ct.mass},t.isResolvedFromDuration=!0}return t}function du(e=ct.visualDuration,t=ct.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}=mC({...n,velocity:-Cn(n.velocity||0)}),h=p||0,y=c/(2*Math.sqrt(l*u)),g=a-i,v=Cn(Math.sqrt(l/u)),m=Math.abs(g)<5;r||(r=m?ct.restSpeed.granular:ct.restSpeed.default),o||(o=m?ct.restDelta.granular:ct.restDelta.default);let x;if(y<1){const T=uu(v,y);x=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)x=T=>a-Math.exp(-v*T)*(g+(h+v*g)*T);else{const T=v*Math.sqrt(y*y-1);x=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=x(T);if(f)s.done=T>=d;else{let C=0;y<1&&(C=T===0?pn(h):sg(x,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(iu(S),Ua),w=Tm(C=>S.next(T*C).value,T,30);return T+"ms "+w}};return S}function ug({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),x=k=>v+m(k),S=k=>{const I=m(k),A=x(k);p.done=Math.abs(I)<=c,p.value=p.done?v:A};let T,w;const C=k=>{f(p.value)&&(T=k,w=du({keyframes:[p.value,h(p.value)],velocity:sg(x,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 gC=Pi(.42,0,1,1),vC=Pi(0,0,.58,1),dg=Pi(.42,0,.58,1),fg=e=>Array.isArray(e)&&typeof e[0]!="number",pg={linear:Ut,easeIn:gC,easeInOut:dg,easeOut:vC,circIn:Gc,circInOut:Mm,circOut:Om,backIn:Uc,backInOut:_m,backOut:Am,anticipate:Im},fu=e=>{if(Wc(e)){an(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Pi(t,n,r,o)}else if(typeof e=="string")return an(pg[e]!==void 0,`Invalid easing type '${e}'`),pg[e];return e};function yC(e,t,n){const r=[],o=n||ag,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]||Ut:t;s=Ii(l,s)}r.push(s)}return r}function hg(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(an(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=yC(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(Bn(e[0],e[i-1],u)):c}function mg(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 gg(e){const t=[0];return mg(t,e.length-1),t}function bC(e,t){return e.map(n=>n*t)}function xC(e,t){return e.map(()=>t||dg).splice(0,e.length-1)}function Oi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=fg(r)?r.map(fu):fu(r),i={done:!1,value:t[0]},a=bC(n&&n.length===t.length?n:gg(t),e),s=hg(a,t,{ease:Array.isArray(o)?o:xC(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const wC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Xe.update(t,!0),stop:()=>zn(t),now:()=>Dt.isProcessing?Dt.timestamp:En.now()}},TC={decay:ug,inertia:ug,tween:Oi,keyframes:Oi,spring:du},SC=e=>e/100;class pu extends ng{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)||ou,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=Ha(n)?n:TC[n]||Oi;let l,c;process.env.NODE_ENV!=="production"&&s!==Oi&&an(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==Oi&&typeof t[0]!="number"&&(l=Ii(SC,ag(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=iu(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 x=this.currentTime,S=i;if(f){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,f+1),!!(I%2)&&(h==="reverse"?(A=1-A,y&&(A-=y/d)):h==="mirror"&&(S=a)),x=Bn(0,1,A)*d}const T=m?{done:!1,value:l[0]}:S.next(x);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=qa(l,this.options,o)),g&&g(T.value),C&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Cn(t.calculatedDuration):0}get time(){return Cn(this.currentTime)}set time(t){t=pn(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=Cn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=wC,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 EC=new Set(["opacity","clipPath","filter","transform"]);function CC(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=Em(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 kC=Hc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ya=10,PC=2e4;function AC(e){return Ha(e.type)||e.type==="spring"||!Sm(e.ease)}function _C(e,t){const n=new pu({...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<PC;)r=n.sample(i),o.push(r.value),i+=Ya;return{times:void 0,keyframes:o,duration:i-Ya,ease:"linear"}}const vg={anticipate:Im,backInOut:_m,circInOut:Mm};function IC(e){return e in vg}class yg extends ng{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new eg(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"&&Wa()&&IC(i)&&(i=vg[i]),AC(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:h,...y}=this.options,g=_C(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=CC(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(wm(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(qa(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 Cn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Cn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=pn(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 Ut;const{animation:r}=n;wm(r,t)}return Ut}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 pu({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),y=pn(this.time);c.setWithVelocity(h.sample(y-Ya).value,h.sample(y).value,Ya)}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 kC()&&r&&EC.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const OC={type:"spring",stiffness:500,damping:25,restSpeed:10},MC=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),DC={type:"keyframes",duration:.8},NC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},FC=(e,{keyframes:t})=>t.length>2?DC:Ar.has(e)?e.startsWith("scale")?MC(t[1]):OC:NC;function LC({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 hu=(e,t,n,r={},o,i)=>a=>{const s=Rc(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-pn(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};LC(s)||(u={...u,...FC(e,u)}),u.duration&&(u.duration=pn(u.duration)),u.repeatDelay&&(u.repeatDelay=pn(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=qa(u.keyframes,s);if(p!==void 0)return Xe.update(()=>{u.onUpdate(p),u.onComplete()}),new xm([])}return!i&&yg.supports(u)?new yg(u):new pu(u)};function VC({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function mu(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&&VC(u,d))continue;const h={delay:n,...Rc(a||{},d)};let y=!1;if(window.MotionHandoffAnimation){const v=bm(e);if(v){const m=window.MotionHandoffAnimation(v,d,Xe);m!==null&&(h.startTime=m,y=!0)}}Bc(e,d),p.start(hu(d,p,f,e.shouldReduceMotion&&gm.has(d)?{type:!1}:h,e,y));const g=p.animation;g&&c.push(g)}return s&&Promise.all(c).then(()=>{Xe.update(()=>{s&&fE(e,s)})}),c}function gu(e,t,n={}){var r;const o=Ei(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(mu(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return jC(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 jC(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(RC).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(gu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function RC(e,t){return e.sortNodePosition(t)}function $C(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>gu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=gu(e,t,n);else{const o=typeof t=="function"?Ei(e,t,n.custom):t;r=Promise.all(mu(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function bg(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 zC=Cc.length;function xg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?xg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<zC;n++){const r=Cc[n],o=e.props[r];(xi(o)||o===!1)&&(t[r]=o)}return t}const BC=[...Ec].reverse(),HC=Ec.length;function WC(e){return t=>Promise.all(t.map(({animation:n,options:r})=>$C(e,n,r)))}function qC(e){let t=WC(e),n=wg(),r=!0;const o=l=>(c,u)=>{var d;const p=Ei(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=xg(e.parent)||{},d=[],p=new Set;let f={},h=1/0;for(let g=0;g<HC;g++){const v=BC[g],m=n[v],x=c[v]!==void 0?c[v]:u[v],S=xi(x),T=v===l?m.isActive:null;T===!1&&(h=g);let w=x===u[v]&&x!==c[v]&&S;if(w&&r&&e.manuallyAnimateOnMount&&(w=!1),m.protectedKeys={...f},!m.isActive&&T===null||!x&&!m.prevProp||Va(x)||typeof x=="boolean")continue;const C=UC(m.prevProp,x);let k=C||v===l&&m.isActive&&!w&&S||g>h&&S,I=!1;const A=Array.isArray(x)?x:[x];let F=A.reduce(o(v),{});T===!1&&(F={});const{prevResolvedValues:N={}}=m,V={...N,...F},P=j=>{k=!0,p.has(j)&&(I=!0,p.delete(j)),m.needsAnimating[j]=!0;const D=e.getValue(j);D&&(D.liveStyle=!1)};for(const j in V){const D=F[j],q=N[j];if(f.hasOwnProperty(j))continue;let M=!1;Vc(D)&&Vc(q)?M=!bg(D,q):M=D!==q,M?D!=null?P(j):p.add(j):D!==void 0&&p.has(j)?P(j):m.protectedKeys[j]=!0}m.prevProp=x,m.prevResolvedValues=F,m.isActive&&(f={...f,...F}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(w&&C)||I)&&d.push(...A.map(j=>({animation:j,options:{type:v}})))}if(p.size){const g={};if(typeof c.initial!="boolean"){const v=Ei(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),x=e.getValue(v);x&&(x.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=wg(),r=!0}}}function UC(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!bg(t,e):!1}function Dr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function wg(){return{animate:Dr(!0),whileInView:Dr(),whileHover:Dr(),whileTap:Dr(),whileDrag:Dr(),whileFocus:Dr(),exit:Dr()}}class tr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class GC extends tr{constructor(t){super(t),t.animationState||(t.animationState=qC(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Va(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 YC=0;class KC extends tr{constructor(){super(...arguments),this.id=YC++}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 ZC={animation:{Feature:GC},exit:{Feature:KC}},hn={x:!1,y:!1};function Tg(){return hn.x||hn.y}function XC(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 Mi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const vu=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Di(e){return{point:{x:e.pageX,y:e.pageY}}}const QC=e=>t=>vu(t)&&e(t,Di(t));function Ni(e,t,n,r){return Mi(e,t,QC(n),r)}function Sg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function JC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ek(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 Eg=1e-4,tk=1-Eg,nk=1+Eg,Cg=.01,rk=0-Cg,ok=0+Cg;function Bt(e){return e.max-e.min}function ik(e,t,n){return Math.abs(e-t)<=n}function kg(e,t,n,r=.5){e.origin=r,e.originPoint=rt(t.min,t.max,e.origin),e.scale=Bt(n)/Bt(t),e.translate=rt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=tk&&e.scale<=nk||isNaN(e.scale))&&(e.scale=1),(e.translate>=rk&&e.translate<=ok||isNaN(e.translate))&&(e.translate=0)}function Fi(e,t,n,r){kg(e.x,t.x,n.x,r?r.originX:void 0),kg(e.y,t.y,n.y,r?r.originY:void 0)}function Pg(e,t,n){e.min=n.min+t.min,e.max=e.min+Bt(t)}function ak(e,t,n){Pg(e.x,t.x,n.x),Pg(e.y,t.y,n.y)}function Ag(e,t,n){e.min=t.min-n.min,e.max=e.min+Bt(t)}function Li(e,t,n){Ag(e.x,t.x,n.x),Ag(e.y,t.y,n.y)}const _g=()=>({translate:0,scale:1,origin:0,originPoint:0}),To=()=>({x:_g(),y:_g()}),Ig=()=>({min:0,max:0}),mt=()=>({x:Ig(),y:Ig()});function sn(e){return[e("x"),e("y")]}function yu(e){return e===void 0||e===1}function bu({scale:e,scaleX:t,scaleY:n}){return!yu(e)||!yu(t)||!yu(n)}function Nr(e){return bu(e)||Og(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Og(e){return Mg(e.x)||Mg(e.y)}function Mg(e){return e&&e!=="0%"}function Ka(e,t,n){const r=e-n,o=t*r;return n+o}function Dg(e,t,n,r,o){return o!==void 0&&(e=Ka(e,o,r)),Ka(e,n,r)+t}function xu(e,t=0,n=1,r,o){e.min=Dg(e.min,t,n,r,o),e.max=Dg(e.max,t,n,r,o)}function Ng(e,{x:t,y:n}){xu(e.x,t.translate,t.scale,t.originPoint),xu(e.y,n.translate,n.scale,n.originPoint)}const Fg=.999999999999,Lg=1.0000000000001;function sk(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&&Eo(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Ng(e,a)),r&&Nr(i.latestValues)&&Eo(e,i.latestValues))}t.x<Lg&&t.x>Fg&&(t.x=1),t.y<Lg&&t.y>Fg&&(t.y=1)}function So(e,t){e.min=e.min+t,e.max=e.max+t}function Vg(e,t,n,r,o=.5){const i=rt(e.min,e.max,o);xu(e,t,n,i,r)}function Eo(e,t){Vg(e.x,t.x,t.scaleX,t.scale,t.originX),Vg(e.y,t.y,t.scaleY,t.scale,t.originY)}function jg(e,t){return Sg(ek(e.getBoundingClientRect(),t))}function lk(e,t,n){const r=jg(e,n),{scroll:o}=t;return o&&(So(r.x,o.offset.x),So(r.y,o.offset.y)),r}const Rg=({current:e})=>e?e.ownerDocument.defaultView:null,$g=(e,t)=>Math.abs(e-t);function ck(e,t){const n=$g(e.x,t.x),r=$g(e.y,t.y);return Math.sqrt(n**2+r**2)}class zg{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=Tu(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=ck(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:h}=d,{timestamp:y}=Dt;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=wu(p,this.transformPagePoint),Xe.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=Tu(d.type==="pointercancel"?this.lastMoveEventInfo:wu(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,g),h&&h(d,g)},!vu(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=Di(t),s=wu(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Dt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Tu(s,this.history)),this.removeListeners=Ii(Ni(this.contextWindow,"pointermove",this.handlePointerMove),Ni(this.contextWindow,"pointerup",this.handlePointerUp),Ni(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),zn(this.updatePoint)}}function wu(e,t){return t?{point:t(e.point)}:e}function Bg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Tu({point:e},t){return{point:e,delta:Bg(e,Hg(t)),offset:Bg(e,uk(t)),velocity:dk(t,.1)}}function uk(e){return e[0]}function Hg(e){return e[e.length-1]}function dk(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Hg(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>pn(t)));)n--;if(!r)return{x:0,y:0};const i=Cn(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 fk(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 Wg(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 pk(e,{top:t,left:n,bottom:r,right:o}){return{x:Wg(e.x,n,o),y:Wg(e.y,t,r)}}function qg(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 hk(e,t){return{x:qg(e.x,t.x),y:qg(e.y,t.y)}}function mk(e,t){let n=.5;const r=Bt(e),o=Bt(t);return o>r?n=_r(t.min,t.max-r,e.min):r>o&&(n=_r(e.min,e.max-o,t.min)),Bn(0,1,n)}function gk(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 Su=.35;function vk(e=Su){return e===!1?e=0:e===!0&&(e=Su),{x:Ug(e,"left","right"),y:Ug(e,"top","bottom")}}function Ug(e,t,n){return{min:Gg(e,t),max:Gg(e,n)}}function Gg(e,t){return typeof e=="number"?e:e[t]||0}const yk=new WeakMap;class bk{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=mt(),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(Di(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:h}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=XC(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),sn(g=>{let v=this.getAxisMotionValue(g).get()||0;if(Sn.test(v)){const{projection:m}=this.visualElement;if(m&&m.layout){const x=m.layout.layoutBox[g];x&&(v=Bt(x)*(parseFloat(v)/100))}}this.originPoint[g]=v}),h&&Xe.postRender(()=>h(u,d)),Bc(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=xk(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=()=>sn(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 zg(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Rg(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&&Xe.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||!Za(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=fk(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&go(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=pk(o.layoutBox,n):this.constraints=!1,this.elastic=vk(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&sn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=gk(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!go(t))return!1;const r=t.current;an(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=lk(r,o.root,this.visualElement.getTransformPagePoint());let a=hk(o.layout.layoutBox,i);if(n){const s=n(JC(a));this.hasMutatedConstraints=!!s,s&&(a=Sg(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=sn(u=>{if(!Za(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 Bc(this.visualElement,t),r.start(hu(t,r,0,n,this.visualElement,!1))}stopAnimation(){sn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){sn(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){sn(n=>{const{drag:r}=this.getProps();if(!Za(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(!go(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};sn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=mk({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(),sn(a=>{if(!Za(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;yk.set(this.visualElement,this);const t=this.visualElement.current,n=Ni(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();go(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Xe.read(r);const a=Mi(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(sn(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=Su,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Za(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function xk(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class wk extends tr{constructor(t){super(t),this.removeGroupControls=Ut,this.removeListeners=Ut,this.controls=new bk(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const Yg=e=>(t,n)=>{e&&Xe.postRender(()=>e(t,n))};class Tk extends tr{constructor(){super(...arguments),this.removePointerDownListener=Ut}onPointerDown(t){this.session=new zg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Rg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Yg(t),onStart:Yg(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&Xe.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Ni(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 Xa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Kg(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Vi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(we.test(e))e=parseFloat(e);else return e;const n=Kg(e,t.target.x),r=Kg(e,t.target.y);return`${n}% ${r}%`}},Sk={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=er.parse(e);if(o.length>5)return r;const i=er.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 Ek extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;LS(Ck),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()})),Xa.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()||Xe.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),kc.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 Zg(e){const[t,n]=Rh(),r=E.useContext(bi);return b.jsx(Ek,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(Qh),isPresent:t,safeToRemove:n})}const Ck={borderRadius:{...Vi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vi,borderTopRightRadius:Vi,borderBottomLeftRadius:Vi,borderBottomRightRadius:Vi,boxShadow:Sk};function Xg(e,t,n){const r=kt(e)?e:bo(e);return r.start(hu("",r,t,n)),r.animation}function Qg(e){return e instanceof SVGElement&&e.tagName!=="svg"}const kk=(e,t)=>e.depth-t.depth;class Pk{constructor(){this.children=[],this.isDirty=!1}add(t){$c(this.children,t),this.isDirty=!0}remove(t){za(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(kk),this.isDirty=!1,this.children.forEach(t)}}function Ak(e,t){const n=En.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(zn(r),e(i-t))};return Xe.read(r,!0),()=>zn(r)}const Jg=["TopLeft","TopRight","BottomLeft","BottomRight"],_k=Jg.length,ev=e=>typeof e=="string"?parseFloat(e):e,tv=e=>typeof e=="number"||we.test(e);function Ik(e,t,n,r,o,i){o?(e.opacity=rt(0,n.opacity!==void 0?n.opacity:1,Ok(r)),e.opacityExit=rt(t.opacity!==void 0?t.opacity:1,0,Mk(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<_k;a++){const s=`border${Jg[a]}Radius`;let l=nv(t,s),c=nv(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||tv(l)===tv(c)?(e[s]=Math.max(rt(ev(l),ev(c),r),0),(Sn.test(c)||Sn.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=rt(t.rotate||0,n.rotate||0,r))}function nv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Ok=rv(0,.5,Om),Mk=rv(.5,.95,Ut);function rv(e,t,n){return r=>r<e?0:r>t?1:n(_r(e,t,r))}function ov(e,t){e.min=t.min,e.max=t.max}function ln(e,t){ov(e.x,t.x),ov(e.y,t.y)}function iv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function av(e,t,n,r,o){return e-=t,e=Ka(e,1/n,r),o!==void 0&&(e=Ka(e,1/o,r)),e}function Dk(e,t=0,n=1,r=.5,o,i=e,a=e){if(Sn.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=av(e.min,t,n,s,o),e.max=av(e.max,t,n,s,o)}function sv(e,t,[n,r,o],i,a){Dk(e,t[n],t[r],t[o],t.scale,i,a)}const Nk=["x","scaleX","originX"],Fk=["y","scaleY","originY"];function lv(e,t,n,r){sv(e.x,t,Nk,n?n.x:void 0,r?r.x:void 0),sv(e.y,t,Fk,n?n.y:void 0,r?r.y:void 0)}function cv(e){return e.translate===0&&e.scale===1}function uv(e){return cv(e.x)&&cv(e.y)}function dv(e,t){return e.min===t.min&&e.max===t.max}function Lk(e,t){return dv(e.x,t.x)&&dv(e.y,t.y)}function fv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function pv(e,t){return fv(e.x,t.x)&&fv(e.y,t.y)}function hv(e){return Bt(e.x)/Bt(e.y)}function mv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Vk{constructor(){this.members=[]}add(t){$c(this.members,t),t.scheduleRender()}remove(t){if(za(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 jk(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 Eu=["","X","Y","Z"],Rk={visibility:"hidden"},gv=1e3;let $k=0;function Cu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function vv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=bm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Xe,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&vv(r)}function yv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=$k++,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(Hk),this.nodes.forEach(Yk),this.nodes.forEach(Kk),this.nodes.forEach(Wk)},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 Pk)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new zc),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=Qg(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=Ak(p,250),Xa.hasAnimatedSinceResize&&(Xa.hasAnimatedSinceResize=!1,this.nodes.forEach(xv))})}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()||eP,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),m=!this.targetLayout||!pv(this.targetLayout,h),x=!p&&f;if(this.options.layoutRoot||this.resumeFrom||x||p&&(m||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const S={...Rc(y,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||xv(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,zn(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(Zk),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&&vv(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(bv);return}this.isUpdating||this.nodes.forEach(Uk),this.isUpdating=!1,this.nodes.forEach(Gk),this.nodes.forEach(zk),this.nodes.forEach(Bk),this.clearAllSnapshots();const s=En.now();Dt.delta=Bn(0,1e3/60,s-Dt.timestamp),Dt.timestamp=s,Dt.isProcessing=!0,Sc.update.process(Dt),Sc.preRender.process(Dt),Sc.render.process(Dt),Dt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,kc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qk),this.sharedNodes.forEach(Xk)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Xe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Xe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Bt(this.snapshot.measuredBox.x)&&!Bt(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=mt(),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&&!uv(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&(s||Nr(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)),tP(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return mt();const l=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(nP))){const{scroll:u}=this.root;u&&(So(l.x,u.offset.x),So(l.y,u.offset.y))}return l}removeElementScroll(a){var s;const l=mt();if(ln(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&&ln(l,a),So(l.x,d.offset.x),So(l.y,d.offset.y))}return l}applyTransform(a,s=!1){const l=mt();ln(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&&Eo(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Nr(u.latestValues)&&Eo(l,u.latestValues)}return Nr(this.latestValues)&&Eo(l,this.latestValues),l}removeTransform(a){const s=mt();ln(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Nr(c.latestValues))continue;bu(c.latestValues)&&c.updateSnapshot();const u=mt(),d=c.measurePageBox();ln(u,d),lv(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Nr(this.latestValues)&&lv(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!==Dt.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=Dt.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Li(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),ln(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=mt(),this.targetWithTransforms=mt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ak(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ln(this.target,this.layout.layoutBox),Ng(this.target,this.targetDelta)):ln(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=mt(),this.relativeTargetOrigin=mt(),Li(this.relativeTargetOrigin,this.target,f.target),ln(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||bu(this.parent.latestValues)||Og(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===Dt.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;ln(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;sk(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=mt());const{target:h}=s;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(iv(this.prevProjectionDelta.x,this.projectionDelta.x),iv(this.prevProjectionDelta.y,this.projectionDelta.y)),Fi(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!mv(this.projectionDelta.x,this.prevProjectionDelta.x)||!mv(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=To(),this.projectionDelta=To(),this.projectionDeltaWithTransform=To()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=To();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=mt(),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(Jk));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const T=S/1e3;wv(d.x,a.x,T),wv(d.y,a.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Li(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Qk(this.relativeTarget,this.relativeTargetOrigin,p,T),x&&Lk(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=mt()),ln(x,this.relativeTarget)),y&&(this.animationValues=u,Ik(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&&(zn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xe.update(()=>{Xa.hasAnimatedSinceResize=!0,this.currentAnimation=Xg(0,gv,{...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(gv),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&&kv(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||mt();const d=Bt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=Bt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}ln(s,l),Eo(s,u),Fi(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Vk),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&&Cu("z",a,c,this.animationValues);for(let u=0;u<Eu.length;u++)Cu(`rotate${Eu[u]}`,a,c,this.animationValues),Cu(`skew${Eu[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 Rk;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=$a(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=$a(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Nr(this.latestValues)&&(y.transform=u?u({},""):"none",this.hasProjected=!1),y}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=jk(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 wi){if(p[y]===void 0)continue;const{correct:g,applyTo:v,isCSSVariable:m}=wi[y],x=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]]=x}else m?this.options.visualElement.renderState.vars[y]=x:c[y]=x}return this.options.layoutId&&(c.pointerEvents=d===this?$a(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(bv),this.root.sharedNodes.clear()}}}function zk(e){e.updateLayout()}function Bk(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"?sn(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=Bt(p);p.min=r[d].min,p.max=p.min+f}):kv(i,n.layoutBox,r)&&sn(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=Bt(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=To();Fi(s,r,n.layoutBox);const l=To();a?Fi(l,e.applyTransform(o,!0),n.measuredBox):Fi(l,r,n.layoutBox);const c=!uv(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=mt();Li(h,n.layoutBox,p.layoutBox);const y=mt();Li(y,r,f.layoutBox),pv(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 Hk(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 Wk(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function qk(e){e.clearSnapshot()}function bv(e){e.clearMeasurements()}function Uk(e){e.isLayoutDirty=!1}function Gk(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function xv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Yk(e){e.resolveTargetDelta()}function Kk(e){e.calcProjection()}function Zk(e){e.resetSkewAndRotation()}function Xk(e){e.removeLeadSnapshot()}function wv(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 Tv(e,t,n,r){e.min=rt(t.min,n.min,r),e.max=rt(t.max,n.max,r)}function Qk(e,t,n,r){Tv(e.x,t.x,n.x,r),Tv(e.y,t.y,n.y,r)}function Jk(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const eP={duration:.45,ease:[.4,0,.1,1]},Sv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ev=Sv("applewebkit/")&&!Sv("chrome/")?Math.round:Ut;function Cv(e){e.min=Ev(e.min),e.max=Ev(e.max)}function tP(e){Cv(e.x),Cv(e.y)}function kv(e,t,n){return e==="position"||e==="preserve-aspect"&&!ik(hv(t),hv(n),.2)}function nP(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const rP=yv({attachResizeListener:(e,t)=>Mi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ku={current:void 0},Pv=yv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ku.current){const e=new rP({});e.mount(window),e.setOptions({layoutScroll:!0}),ku.current=e}return ku.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),oP={pan:{Feature:Tk},drag:{Feature:wk,ProjectionNode:Pv,MeasureLayout:Zg}};function Av(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 _v(e,t){const n=Av(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Iv(e){return!(e.pointerType==="touch"||Tg())}function iP(e,t,n={}){const[r,o,i]=_v(e,n),a=s=>{if(!Iv(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{Iv(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function Ov(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&&Xe.postRender(()=>i(t,Di(t)))}class aP extends tr{mount(){const{current:t}=this.node;t&&(this.unmount=iP(t,(n,r)=>(Ov(this.node,r,"Start"),o=>Ov(this.node,o,"End"))))}unmount(){}}class sP extends tr{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=Ii(Mi(this.node.current,"focus",()=>this.onFocus()),Mi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Mv=(e,t)=>t?e===t?!0:Mv(e,t.parentElement):!1,lP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function cP(e){return lP.has(e.tagName)||e.tabIndex!==-1}const ji=new WeakSet;function Dv(e){return t=>{t.key==="Enter"&&e(t)}}function Pu(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const uP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Dv(()=>{if(ji.has(n))return;Pu(n,"down");const o=Dv(()=>{Pu(n,"up")}),i=()=>Pu(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 Nv(e){return vu(e)&&!Tg()}function dP(e,t,n={}){const[r,o,i]=_v(e,n),a=s=>{const l=s.currentTarget;if(!Nv(s)||ji.has(l))return;ji.add(l);const c=t(l,s),u=(f,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!Nv(f)||!ji.has(l))&&(ji.delete(l),typeof c=="function"&&c(f,{success:h}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||Mv(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=>uP(c,o)),!cP(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function Fv(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&&Xe.postRender(()=>i(t,Di(t)))}class fP extends tr{mount(){const{current:t}=this.node;t&&(this.unmount=dP(t,(n,r)=>(Fv(this.node,r,"Start"),(o,{success:i})=>Fv(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Au=new WeakMap,_u=new WeakMap,pP=e=>{const t=Au.get(e.target);t&&t(e)},hP=e=>{e.forEach(pP)};function mP({root:e,...t}){const n=e||document;_u.has(n)||_u.set(n,{});const r=_u.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(hP,{root:e,...t})),r[o]}function gP(e,t,n){const r=mP(t);return Au.set(e,n),r.observe(e),()=>{Au.delete(e),r.unobserve(e)}}const vP={some:0,all:1};class yP extends tr{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:vP[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 gP(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(bP(t,n))&&this.startObserver()}unmount(){}}function bP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const xP={inView:{Feature:yP},tap:{Feature:fP},focus:{Feature:sP},hover:{Feature:aP}},wP={layout:{ProjectionNode:Pv,MeasureLayout:Zg}},Iu={current:null},Lv={current:!1};function TP(){if(Lv.current=!0,!!Tc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Iu.current=e.matches;e.addListener(t),t()}else Iu.current=!1}const SP=[...Qm,Vt,er],EP=e=>SP.find(Xm(e)),Ri=new WeakMap;function CP(e,t,n){for(const r in t){const o=t[r],i=n[r];if(kt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Fa(o.version==="12.6.2",`Attempting to mix Motion versions ${o.version} with 12.6.2 may not work as expected.`);else if(kt(i))e.addValue(r,bo(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,bo(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Vv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class jv{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=ou,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=En.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Xe.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=ja(n),this.isVariantNode=Kh(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&&kt(h)&&h.set(l[f],!1)}}mount(t){this.current=t,Ri.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)),Lv.current||TP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Iu.current,process.env.NODE_ENV!=="production"&&Fa(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(),zn(this.notifyUpdate),zn(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=Ar.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Xe.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 mo){const n=mo[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):mt()}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<Vv.length;r++){const o=Vv[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=CP(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=bo(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"&&(Km(o)||Dm(o))?o=parseFloat(o):!EP(o)&&er.test(n)&&(o=zm(t,n)),this.setBaseTarget(t,kt(o)?o.get():o)),kt(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=Lc(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&&!kt(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 zc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Rv extends jv{constructor(){super(...arguments),this.KeyframeResolver=eg}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;kt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function kP(e){return window.getComputedStyle(e)}class $v extends Rv{constructor(){super(...arguments),this.type="html",this.renderInstance=dm}readValueFromInstance(t,n){if(Ar.has(n))return zE(t,n);{const r=kP(t),o=(Ac(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return jg(t,n)}build(t,n,r){Oc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return jc(t,n,r)}}class zv extends Rv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&um(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ar.has(n)){const r=$m(n);return r&&r.default||0}return n=fm.has(n)?n:Pc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return hm(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Xe.postRender(this.updateDimensions)}build(t,n,r){Nc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){pm(t,n,r,o)}mount(t){this.isSVGTag=Fc(t.tagName),super.mount(t)}}const PP=(e,t)=>Dc(e)?new zv(t):new $v(t,{allowProjection:e!==E.Fragment}),AP=aE({...ZC,...xP,...oP,...wP},PP),gt=SS(AP);function _P(e){return E.useEffect(()=>()=>e(),[])}function Co(e){const t=fn(()=>bo(e)),{isStatic:n}=E.useContext(po);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function Bv(e,t){const n=Co(t()),r=()=>n.set(t());return r(),Ia(()=>{const o=()=>Xe.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),zn(r)}}),n}const IP=e=>e&&typeof e=="object"&&e.mix,OP=e=>IP(e)?e.mix:void 0;function MP(...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=hg(o,i,{mixer:OP(i[0]),...a});return t?s(r):s}function DP(e){Ci.current=[],e();const t=Bv(Ci.current,e);return Ci.current=void 0,t}function NP(e,t,n,r){if(typeof e=="function")return DP(e);const o=typeof t=="function"?t:MP(t,n,r);return Array.isArray(e)?Hv(e,o):Hv([e],([i])=>o(i))}function Hv(e,t){const n=fn(()=>[]);return Bv(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function FP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(iu(r),Ua);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Cn(o)}}const LP=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function Wv(e,t){return fg(e)?e[LP(0,e.length,t)]:e}function Ou(e){return typeof e=="object"&&!Array.isArray(e)}function qv(e,t,n,r){return typeof e=="string"&&Ou(t)?Av(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function VP(e,t,n){return e*(t+1)}function Uv(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 jP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(za(e,o),r--)}}function RP(e,t,n,r,o,i){jP(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:rt(o,i,r[a]),easing:Wv(n,a)})}function $P(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function zP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const BP="easeInOut",HP=20;function WP(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,Uv(d,h.at,u,c));continue}let[y,g,v={}]=h;v.at!==void 0&&(d=Uv(d,v.at,u,c));let m=0;const x=(S,T,w,C=0,k=0)=>{const I=qP(S),{delay:A=0,times:F=gg(I),type:N="keyframes",repeat:V,repeatType:P,repeatDelay:O=0,...L}=T;let{ease:j=t.ease||"easeOut",duration:D}=T;const q=typeof A=="function"?A(C,k):A,M=I.length,$=Ha(N)?N:o==null?void 0:o[N];if(M<=2&&$){let Y=100;if(M===2&&YP(I)){const R=I[1]-I[0];Y=Math.abs(R)}const U={...L};D!==void 0&&(U.duration=pn(D));const Z=FP(U,Y,$);j=Z.ease,D=Z.duration}D??(D=i);const Q=d+q;F.length===1&&F[0]===0&&(F[1]=1);const ie=F.length-I.length;if(ie>0&&mg(F,ie),I.length===1&&I.unshift(null),V){an(V<HP,"Repeat count too high, must be less than 20"),D=VP(D,V);const Y=[...I],U=[...F];j=Array.isArray(j)?[...j]:[j];const Z=[...j];for(let R=0;R<V;R++){I.push(...Y);for(let H=0;H<Y.length;H++)F.push(U[H]+(R+1)),j.push(H===0?"linear":Wv(Z,H-1))}$P(F,V)}const J=Q+D;RP(w,I,j,F,Q,J),m=Math.max(q+D,m),p=Math.max(J,p)};if(kt(y)){const S=Gv(y,s);x(g,v,Yv("default",S))}else{const S=qv(y,g,r,l),T=S.length;for(let w=0;w<T;w++){g=g,v=v;const C=S[w],k=Gv(C,s);for(const I in g)x(g[I],UP(v,I),Yv(I,k),w,T)}}u=d,d+=m}return s.forEach((f,h)=>{for(const y in f){const g=f[y];g.sort(zP);const v=[],m=[],x=[];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)),x.push(k||"easeOut")}m[0]!==0&&(m.unshift(0),v.unshift(v[0]),x.unshift(BP)),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:x,times:m,...n}}}),a}function Gv(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Yv(e,t){return t[e]||(t[e]=[]),t[e]}function qP(e){return Array.isArray(e)?e:[e]}function UP(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const GP=e=>typeof e=="number",YP=e=>e.every(GP);function KP(e,t){return e in t}class ZP extends jv{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(KP(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 mt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function XP(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Qg(e)?new zv(t):new $v(t);n.mount(e),Ri.set(e,n)}function QP(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new ZP(t);n.mount(e),Ri.set(e,n)}function JP(e,t){return kt(e)||typeof e=="number"||typeof e=="string"&&!Ou(t)}function Kv(e,t,n,r){const o=[];if(JP(e,t))o.push(Xg(e,Ou(t)&&t.default||t,n&&(n.default||n)));else{const i=qv(e,t,r),a=i.length;an(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?XP:QP;Ri.has(l)||c(l);const u=Ri.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...mu(u,{...t,transition:d},{}))}}return o}function eA(e,t,n){const r=[];return WP(e,t,n,{spring:du}).forEach(({keyframes:i,transition:a},s)=>{r.push(...Kv(s,i,a))}),r}function tA(e){return Array.isArray(e)&&e.some(Array.isArray)}function nA(e){function t(n,r,o){let i=[];tA(n)?i=eA(n,r,e):i=Kv(n,r,o,e);const a=new xm(i);return e&&e.animations.push(a),a}return t}function rA(){const e=fn(()=>({current:null,animations:[]})),t=fn(()=>nA(e));return _P(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class oA{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 iA=()=>new oA;function aA(){return fn(iA)}function sA(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function lA(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:sA(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=fu(r)(l/c)*c}return t+l}}const Zv=E.createContext(null);function cA(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?sE(e,o,o+i):e}function uA({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=fn(()=>gt[t]),l=[],c=E.useRef(!1);an(!!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(fA)},updateOrder:(d,p,f)=>{if(c.current)return;const h=cA(l,d,p,f);l!==h&&(c.current=!0,r(h.map(dA).filter(y=>o.indexOf(y)!==-1)))}};return E.useEffect(()=>{c.current=!1}),b.jsx(s,{...i,ref:a,ignoreStrict:!0,children:b.jsx(Zv.Provider,{value:u,children:e})})}const Xv=E.forwardRef(uA);function dA(e){return e.value}function fA(e,t){return e.layout.min-t.layout.min}function Qv(e,t=0){return kt(e)?e:Co(t)}function pA({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=fn(()=>gt[r]),c=E.useContext(Zv),u={x:Qv(t.x),y:Qv(t.y)},d=NP([u.x,u.y],([y,g])=>y||g?1:"unset");an(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:h}=c;return b.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 Jv=E.forwardRef(pA);/**
|
|
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 hA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),ey=e=>{const t=mA(e);return t.charAt(0).toUpperCase()+t.slice(1)},ty=(...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 gA={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 vA=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,...gA,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ty("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 xt=(e,t)=>{const n=E.forwardRef(({className:r,...o},i)=>E.createElement(vA,{ref:i,iconNode:t,className:ty(`lucide-${hA(ey(e))}`,`lucide-${e}`,r),...o}));return n.displayName=ey(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 yA=xt("arrow-down-0-1",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
|
|
38
|
+
* @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 bA=xt("arrow-up-0-1",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
|
|
43
|
+
* @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 ny=xt("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
|
|
48
|
+
* @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 xA=xt("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
53
|
+
* @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 Mu=xt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
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 wA=xt("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
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 Du=xt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
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 ry=xt("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
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 TA=xt("circle-x",[["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"}]]);/**
|
|
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 oy=xt("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
|
|
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 SA=xt("grip-vertical",[["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"}]]);/**
|
|
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 iy=xt("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
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 EA=xt("list-filter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
|
|
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 Nu=xt("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
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 CA=xt("search-check",[["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"}]]);/**
|
|
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 kA=xt("search-x",[["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"}]]);/**
|
|
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 ko=xt("trash-2",[["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"}]]);/**
|
|
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 PA=xt("triangle-alert",[["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"}]]);/**
|
|
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 AA=xt("ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);/**
|
|
128
|
+
* @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 _A=xt("upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
133
|
+
* @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 ku=ht("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ky={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},ZI={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Iy=e=>x.jsx(lt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:ky,exit:ky.false,transition:ZI,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:De("aria-hidden:pointer-events-none",e.className),children:e.children}),XI=po("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"}}),QI=w.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:s=!0,...i},a){const l=()=>o==null?void 0:o(!1);return x.jsx("div",{"data-open":!!s,"aria-hidden":!s,"data-component":"alert",className:De("isolate w-full",s?"pointer-events-auto":"pointer-events-none"),children:x.jsx(Iy,{"data-open":!!s,open:!!s,children:x.jsxs(mo,{...i,ref:a,role:"alert","data-theme":n,as:i.as??"div",className:De(XI({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(Ey,{size:20}):null,!r&&n==="info"?x.jsx(Py,{size:20}):null,!r&&n==="danger"?x.jsx(YI,{size:20}):null,r,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,o!==void 0&&s?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(ku,{size:20})}):null]})})})});function Le(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 Qe(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function _o(e,t){const n=Le(e);return isNaN(t)?Qe(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function ya(e,t){const n=Le(e);if(isNaN(t))return Qe(e,NaN);if(!t)return n;const r=n.getDate(),o=Qe(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 Ay=6048e5,JI=864e5,eA=6e4,tA=36e5,nA=1e3;let rA={};function Mr(){return rA}function xn(e,t){var a,l,c,u;const n=Mr(),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=Le(e),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Mo(e){return xn(e,{weekStartsOn:1})}function Oy(e){const t=Le(e),n=t.getFullYear(),r=Qe(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=Mo(r),s=Qe(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=Mo(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Do(e){const t=Le(e);return t.setHours(0,0,0,0),t}function va(e){const t=Le(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 oA(e,t){const n=Do(e),r=Do(t),o=+n-va(n),s=+r-va(r);return Math.round((o-s)/JI)}function sA(e){const t=Oy(e),n=Qe(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Mo(n)}function _y(e,t){const n=t*7;return _o(e,n)}function My(e,t){return ya(e,t*12)}function iA(e){return Qe(e,Date.now())}function aA(e,t){const n=Do(e),r=Do(t);return+n==+r}function lA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Dy(e){if(!lA(e)&&typeof e!="number")return!1;const t=Le(e);return!isNaN(Number(t))}function Ny(e,t){const n=Le(e.start),r=Le(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(Le(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function Ly(e){const t=Le(e);return t.setDate(1),t.setHours(0,0,0,0),t}function cA(e){const t=Le(e),n=Qe(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function uA(e,t){var a,l;const n=Mr(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=Le(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 dA={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"}},fA=(e,t,n)=>{let r;const o=dA[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 Iu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const hA={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},pA={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},mA={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},gA={date:Iu({formats:hA,defaultWidth:"full"}),time:Iu({formats:pA,defaultWidth:"full"}),dateTime:Iu({formats:mA,defaultWidth:"full"})},yA={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},vA=(e,t,n,r)=>yA[e];function Js(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 bA={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},wA={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},xA={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"]},SA={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"]},TA={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"}},EA={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"}},CA={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Js({values:bA,defaultWidth:"wide"}),quarter:Js({values:wA,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Js({values:xA,defaultWidth:"wide"}),day:Js({values:SA,defaultWidth:"wide"}),dayPeriod:Js({values:TA,defaultWidth:"wide",formattingValues:EA,defaultFormattingWidth:"wide"})};function ei(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)?kA(a,d=>d.test(i)):PA(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 PA(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function kA(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function IA(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 AA=/^(\d+)(th|st|nd|rd)?/i,OA=/\d+/i,_A={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},MA={any:[/^b/i,/^(a|c)/i]},DA={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},NA={any:[/1/i,/2/i,/3/i,/4/i]},LA={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},FA={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]},VA={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},$A={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]},RA={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},BA={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}},jA={ordinalNumber:IA({matchPattern:AA,parsePattern:OA,valueCallback:e=>parseInt(e,10)}),era:ei({matchPatterns:_A,defaultMatchWidth:"wide",parsePatterns:MA,defaultParseWidth:"any"}),quarter:ei({matchPatterns:DA,defaultMatchWidth:"wide",parsePatterns:NA,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ei({matchPatterns:LA,defaultMatchWidth:"wide",parsePatterns:FA,defaultParseWidth:"any"}),day:ei({matchPatterns:VA,defaultMatchWidth:"wide",parsePatterns:$A,defaultParseWidth:"any"}),dayPeriod:ei({matchPatterns:RA,defaultMatchWidth:"any",parsePatterns:BA,defaultParseWidth:"any"})},Fy={code:"en-US",formatDistance:fA,formatLong:gA,formatRelative:vA,localize:CA,match:jA,options:{weekStartsOn:0,firstWeekContainsDate:1}};function zA(e){const t=Le(e);return oA(t,cA(t))+1}function Vy(e){const t=Le(e),n=+Mo(t)-+sA(t);return Math.round(n/Ay)+1}function Au(e,t){var u,d,f,h;const n=Le(e),r=n.getFullYear(),o=Mr(),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=Qe(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=xn(i,t),l=Qe(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=xn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function WA(e,t){var a,l,c,u;const n=Mr(),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=Au(e,t),s=Qe(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),xn(s,t)}function $y(e,t){const n=Le(e),r=+xn(n,t)-+WA(n,t);return Math.round(r/Ay)+1}function ze(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const or={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ze(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ze(n+1,2)},d(e,t){return ze(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 ze(e.getHours()%12||12,t.length)},H(e,t){return ze(e.getHours(),t.length)},m(e,t){return ze(e.getMinutes(),t.length)},s(e,t){return ze(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ze(o,t.length)}},No={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ry={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 or.y(e,t)},Y:function(e,t,n,r){const o=Au(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return ze(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):ze(s,t.length)},R:function(e,t){const n=Oy(e);return ze(n,t.length)},u:function(e,t){const n=e.getFullYear();return ze(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 ze(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 ze(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 or.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 ze(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=$y(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ze(o,t.length)},I:function(e,t,n){const r=Vy(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ze(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):or.d(e,t)},D:function(e,t,n){const r=zA(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ze(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 ze(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 ze(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 ze(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=No.noon:r===0?o=No.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=No.evening:r>=12?o=No.afternoon:r>=4?o=No.morning:o=No.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 or.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):or.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ze(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ze(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):or.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):or.s(e,t)},S:function(e,t){return or.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return jy(r);case"XXXX":case"XX":return Dr(r);case"XXXXX":case"XXX":default:return Dr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return jy(r);case"xxxx":case"xx":return Dr(r);case"xxxxx":case"xxx":default:return Dr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+By(r,":");case"OOOO":default:return"GMT"+Dr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+By(r,":");case"zzzz":default:return"GMT"+Dr(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return ze(r,t.length)},T:function(e,t,n){const r=e.getTime();return ze(r,t.length)}};function By(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+ze(s,2)}function jy(e,t){return e%60===0?(e>0?"-":"+")+ze(Math.abs(e)/60,2):Dr(e,t)}function Dr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ze(Math.trunc(r/60),2),s=ze(r%60,2);return n+o+t+s}const zy=(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"})}},Wy=(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"})}},Ou={p:Wy,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return zy(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}}",zy(r,t)).replace("{{time}}",Wy(o,t))}},HA=/^D+$/,UA=/^Y+$/,GA=["D","DD","YY","YYYY"];function Hy(e){return HA.test(e)}function Uy(e){return UA.test(e)}function _u(e,t,n){const r=YA(e,t,n);if(console.warn(r),GA.includes(e))throw new RangeError(r)}function YA(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 qA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,KA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ZA=/^'([^]*?)'?$/,XA=/''/g,QA=/[a-zA-Z]/;function JA(e,t,n){var u,d,f,h;const r=Mr(),o=r.locale??Fy,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=Le(e);if(!Dy(a))throw new RangeError("Invalid time value");let l=t.match(KA).map(m=>{const p=m[0];if(p==="p"||p==="P"){const v=Ou[p];return v(m,o.formatLong)}return m}).join("").match(qA).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const p=m[0];if(p==="'")return{isToken:!1,value:eO(m)};if(Ry[p])return{isToken:!0,value:m};if(p.match(QA))throw new RangeError("Format string contains an unescaped latin alphabet character `"+p+"`");return{isToken:!1,value:m}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(m=>{if(!m.isToken)return m.value;const p=m.value;(Uy(p)||Hy(p))&&_u(p,t,String(e));const v=Ry[p[0]];return v(a,p,o.localize,c)}).join("")}function eO(e){const t=e.match(ZA);return t?t[1].replace(XA,"'"):e}function tO(){return Object.assign({},Mr())}function nO(e){let n=Le(e).getDay();return n===0&&(n=7),n}function rO(e,t){const n=Le(e),r=Le(t);return n.getTime()>r.getTime()}function oO(e,t){const n=Le(e),r=Le(t);return+n<+r}function sO(e,t){const n=t instanceof Date?Qe(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 iO=10;class Gy{constructor(){ce(this,"subPriority",0)}validate(t,n){return!0}}class aO extends Gy{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 lO extends Gy{constructor(){super(...arguments);ce(this,"priority",iO);ce(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Qe(n,sO(n,Date))}}class Fe{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new aO(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class cO extends Fe{constructor(){super(...arguments);ce(this,"priority",140);ce(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 pt={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}/},Sn={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 mt(e,t){return e&&{value:t(e.value),rest:e.rest}}function rt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Tn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*tA+s*eA+i*nA),rest:t.slice(n[0].length)}}function Yy(e){return rt(pt.anyDigitsSigned,e)}function ct(e,t){switch(e){case 1:return rt(pt.singleDigit,t);case 2:return rt(pt.twoDigits,t);case 3:return rt(pt.threeDigits,t);case 4:return rt(pt.fourDigits,t);default:return rt(new RegExp("^\\d{1,"+e+"}"),t)}}function ba(e,t){switch(e){case 1:return rt(pt.singleDigitSigned,t);case 2:return rt(pt.twoDigitsSigned,t);case 3:return rt(pt.threeDigitsSigned,t);case 4:return rt(pt.fourDigitsSigned,t);default:return rt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Mu(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function qy(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const 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 Ky(e){return e%400===0||e%4===0&&e%100!==0}class uO extends Fe{constructor(){super(...arguments);ce(this,"priority",130);ce(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 mt(ct(4,n),s);case"yo":return mt(o.ordinalNumber(n,{unit:"year"}),s);default:return mt(ct(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=qy(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 dO extends Fe{constructor(){super(...arguments);ce(this,"priority",130);ce(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 mt(ct(4,n),s);case"Yo":return mt(o.ordinalNumber(n,{unit:"year"}),s);default:return mt(ct(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=Au(n,s);if(o.isTwoDigitYear){const l=qy(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),xn(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),xn(n,s)}}class fO extends Fe{constructor(){super(...arguments);ce(this,"priority",130);ce(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return ba(r==="R"?4:r.length,n)}set(n,r,o){const s=Qe(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),Mo(s)}}class hO extends Fe{constructor(){super(...arguments);ce(this,"priority",130);ce(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return ba(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class pO extends Fe{constructor(){super(...arguments);ce(this,"priority",120);ce(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 ct(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 mO extends Fe{constructor(){super(...arguments);ce(this,"priority",120);ce(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 ct(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 gO extends Fe{constructor(){super(...arguments);ce(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ce(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return mt(rt(pt.month,n),s);case"MM":return mt(ct(2,n),s);case"Mo":return mt(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 yO extends Fe{constructor(){super(...arguments);ce(this,"priority",110);ce(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 mt(rt(pt.month,n),s);case"LL":return mt(ct(2,n),s);case"Lo":return mt(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 vO(e,t,n){const r=Le(e),o=$y(r,n)-t;return r.setDate(r.getDate()-o*7),r}class bO extends Fe{constructor(){super(...arguments);ce(this,"priority",100);ce(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return rt(pt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return ct(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return xn(vO(n,o,s),s)}}function wO(e,t){const n=Le(e),r=Vy(n)-t;return n.setDate(n.getDate()-r*7),n}class xO extends Fe{constructor(){super(...arguments);ce(this,"priority",100);ce(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 rt(pt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return ct(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Mo(wO(n,o))}}const SO=[31,28,31,30,31,30,31,31,30,31,30,31],TO=[31,29,31,30,31,30,31,31,30,31,30,31];class EO extends Fe{constructor(){super(...arguments);ce(this,"priority",90);ce(this,"subPriority",1);ce(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return rt(pt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return ct(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=Ky(o),i=n.getMonth();return s?r>=1&&r<=TO[i]:r>=1&&r<=SO[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class CO extends Fe{constructor(){super(...arguments);ce(this,"priority",90);ce(this,"subpriority",1);ce(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 rt(pt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return ct(r.length,n)}}validate(n,r){const o=n.getFullYear();return Ky(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 Du(e,t,n){var d,f,h,m;const r=Mr(),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??((m=(h=r.locale)==null?void 0:h.options)==null?void 0:m.weekStartsOn)??0,s=Le(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 _o(s,u)}class PO extends Fe{constructor(){super(...arguments);ce(this,"priority",90);ce(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=Du(n,o,s),n.setHours(0,0,0,0),n}}class kO extends Fe{constructor(){super(...arguments);ce(this,"priority",90);ce(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 mt(ct(r.length,n),i);case"eo":return mt(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=Du(n,o,s),n.setHours(0,0,0,0),n}}class IO extends Fe{constructor(){super(...arguments);ce(this,"priority",90);ce(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 mt(ct(r.length,n),i);case"co":return mt(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=Du(n,o,s),n.setHours(0,0,0,0),n}}function AO(e,t){const n=Le(e),r=nO(n),o=t-r;return _o(n,o)}class OO extends Fe{constructor(){super(...arguments);ce(this,"priority",90);ce(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 ct(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return mt(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 mt(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return mt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return mt(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=AO(n,o),n.setHours(0,0,0,0),n}}class _O extends Fe{constructor(){super(...arguments);ce(this,"priority",80);ce(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(Mu(o),0,0,0),n}}class MO extends Fe{constructor(){super(...arguments);ce(this,"priority",80);ce(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(Mu(o),0,0,0),n}}class DO extends Fe{constructor(){super(...arguments);ce(this,"priority",80);ce(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(Mu(o),0,0,0),n}}class NO extends Fe{constructor(){super(...arguments);ce(this,"priority",70);ce(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return rt(pt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return ct(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 LO extends Fe{constructor(){super(...arguments);ce(this,"priority",70);ce(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return rt(pt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return ct(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class FO extends Fe{constructor(){super(...arguments);ce(this,"priority",70);ce(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return rt(pt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return ct(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 VO extends Fe{constructor(){super(...arguments);ce(this,"priority",70);ce(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return rt(pt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return ct(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 $O extends Fe{constructor(){super(...arguments);ce(this,"priority",60);ce(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return rt(pt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return ct(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class RO extends Fe{constructor(){super(...arguments);ce(this,"priority",50);ce(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return rt(pt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return ct(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class BO extends Fe{constructor(){super(...arguments);ce(this,"priority",30);ce(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return mt(ct(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class jO extends Fe{constructor(){super(...arguments);ce(this,"priority",10);ce(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return Tn(Sn.basicOptionalMinutes,n);case"XX":return Tn(Sn.basic,n);case"XXXX":return Tn(Sn.basicOptionalSeconds,n);case"XXXXX":return Tn(Sn.extendedOptionalSeconds,n);case"XXX":default:return Tn(Sn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Qe(n,n.getTime()-va(n)-o)}}class zO extends Fe{constructor(){super(...arguments);ce(this,"priority",10);ce(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return Tn(Sn.basicOptionalMinutes,n);case"xx":return Tn(Sn.basic,n);case"xxxx":return Tn(Sn.basicOptionalSeconds,n);case"xxxxx":return Tn(Sn.extendedOptionalSeconds,n);case"xxx":default:return Tn(Sn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Qe(n,n.getTime()-va(n)-o)}}class WO extends Fe{constructor(){super(...arguments);ce(this,"priority",40);ce(this,"incompatibleTokens","*")}parse(n){return Yy(n)}set(n,r,o){return[Qe(n,o*1e3),{timestampIsSet:!0}]}}class HO extends Fe{constructor(){super(...arguments);ce(this,"priority",20);ce(this,"incompatibleTokens","*")}parse(n){return Yy(n)}set(n,r,o){return[Qe(n,o),{timestampIsSet:!0}]}}const UO={G:new cO,y:new uO,Y:new dO,R:new fO,u:new hO,Q:new pO,q:new mO,M:new gO,L:new yO,w:new bO,I:new xO,d:new EO,D:new CO,E:new PO,e:new kO,c:new IO,i:new OO,a:new _O,b:new MO,B:new DO,h:new NO,H:new LO,K:new FO,k:new VO,m:new $O,s:new RO,S:new BO,X:new jO,x:new zO,t:new WO,T:new HO},GO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,YO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qO=/^'([^]*?)'?$/,KO=/''/g,ZO=/\S/,XO=/[a-zA-Z]/;function QO(e,t,n,r){var p,v,b,y;const o=tO(),s=o.locale??Fy,i=o.firstWeekContainsDate??((v=(p=o.locale)==null?void 0:p.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===""?Le(n):Qe(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new lO],u=t.match(YO).map(g=>{const T=g[0];if(T in Ou){const S=Ou[T];return S(g,s.formatLong)}return g}).join("").match(GO),d=[];for(let g of u){Uy(g)&&_u(g,t,e),Hy(g)&&_u(g,t,e);const T=g[0],S=UO[T];if(S){const{incompatibleTokens:E}=S;if(Array.isArray(E)){const I=d.find(A=>E.includes(A.token)||A.token===T);if(I)throw new RangeError(`The format string mustn't contain \`${I.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 Qe(n,NaN);c.push(C.setter),e=C.rest}else{if(T.match(XO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(g==="''"?g="'":T==="'"&&(g=JO(g)),e.indexOf(g)===0)e=e.slice(g.length);else return Qe(n,NaN)}}if(e.length>0&&ZO.test(e))return Qe(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=Le(n);if(isNaN(h.getTime()))return Qe(n,NaN);const m={};for(const g of f){if(!g.validate(h,l))return Qe(n,NaN);const T=g.set(h,m,l);Array.isArray(T)?(h=T[0],Object.assign(m,T[1])):h=T}return Qe(n,h)}function JO(e){return e.match(qO)[1].replace(KO,"'")}function e_(e,t){const n=Le(e),r=Le(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function t_(e){return aA(e,iA(e))}function n_(e,t){return _o(e,-t)}function Zy(e,t){return ya(e,-t)}function r_(e,t){return _y(e,-t)}function o_(e,t){return My(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 Nu(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 Lu(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}typeof SuppressedError=="function"&&SuppressedError;var ti=function(e){return e.replace(new RegExp(" ","g")," ")},Xy=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)},s_=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Qy=function(e,t,n){var r=e.length-2,o=s_(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},Jy=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},wa=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},i_=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Fu=function(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t},a_=function(e){return e==="money"||e==="currency"},l_=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:""})},xa=function(e,t){var n=Xy(Jy(e),t.fraction.length),r="".concat(t.currency).concat(Qy(n,t.group,t.decimal));return ti(r)},c_=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,s=o===void 0?"BRL":o,i=e.currencyDisplay,a=i===void 0?"symbol":i;e.mask;var l=e.onChange,c=Nu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=w.useRef(null);w.useImperativeHandle(t,function(){return u.current});var d=w.useMemo(function(){var m=l_(r,s,a);return m.currency=ti("".concat(m.currency.trim()," ")),m.literal=ti(m.literal.trim()),m},[r,s]),f=function(m){var p=xa(m.target.value,d),v=wa(p);m.target.value=p,m.target.setAttribute("data-number",v.toString()),l==null||l(m),v!==0&&(u.current.selectionEnd=p.length)};w.useEffect(function(){if(u.current!==null){var m=u.current.value;if(m!==""){var p=xa(m,d),v=wa(p);u.current.value=p,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=p.length)}}},[d]);var h=c.defaultValue?xa(c.defaultValue,d):void 0;return w.createElement("input",gt({},c,{value:typeof c.value=="string"?xa(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),u_=1,d_=function(e){return e==="percentage"||e==="percent"||e==="percentual"},f_=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:""})},Sa=function(e,t){var n=Xy(Jy(e),t.fraction.length),r="".concat(Qy(n,t.group,t.decimal)," ").concat(t.percentSign);return ti(r)},h_=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,s=e.onKeyUp,i=Nu(e,["locale","mask","onChange","onKeyUp"]),a=w.useRef(null),l=Lu(w.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];w.useImperativeHandle(t,function(){return a.current}),w.useEffect(function(){var b,y=Number.parseFloat("".concat((b=i.value)!==null&&b!==void 0?b:"0")).toFixed(d.fraction.length);u(Sa(y,d))},[i.value]);var d=w.useMemo(function(){var b=f_(r);return b.percentSign=ti("".concat(b.percentSign)),b},[r]),f=c.length-d.percentSign.length-u_,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)))},m=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)},p=function(b){var y=Sa(b.target.value,d),g=wa(y);u(y),b.target.value=y,b.target.setAttribute("data-number",g.toString()),o==null||o(b)};w.useEffect(function(){if(a.current!==null){var b=a.current.value;if(b!==""){var y=Sa(b,d),g=wa(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}))}}},[]),w.useEffect(function(){return h()},[c]);var v=i.defaultValue?Sa(i.defaultValue,d):void 0;return w.createElement("input",gt({},i,{defaultValue:v,inputMode:"decimal",onChange:p,onFocus:h,onKeyUp:m,ref:a,type:"text"}))}),ni={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},p_=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=Ta[s];i===void 0?r.push(s.replace(ni.dots,"\\.").replace(ni.openParenthesis,"\\(").replace(ni.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(ni.leadingBars,"\\")},ri=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Vu(o,n);var s=p_(o);return n?"^".concat(s,"$"):s},m_=function(e){return e.replace(ni.escape,"\\$&")},Vu=function(e,t){var n=e.map(function(r){return typeof r=="string"?m_(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Ta={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]/}},g_=/\d/,ev="(dd) 9dddd-dddd",tv="(dd) dddd-dddd",nv="ddd.ddd.ddd-dd",rv="dd.ddd.ddd/dddd-dd",Ea=function(e){return e.replace(/\D/g,"")},y_=["2",/[0-3]/,":",/[0-5]/,/\d/],v_=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Ht={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:nv,isoDate:"dddd-dd-dd",cnpj:rv,telephone:tv,cellphone:ev,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Ea(e).length<=11?nv:rv},int:function(e){return e===void 0&&(e=""),g_.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=Ea(e);return t.length<11?tv:ev},time:function(e){var t=Ea(e),n=t[0];return n==="2"?y_:v_}},Ut=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:ri(e,"",!0),infinity:n.infinity},n)},Dt={cellTelephone:Ut(Ht.cellTelephone,"tel"),cellphone:Ut(Ht.cellphone,"tel"),cep:Ut(Ht.cep,"decimal"),cnpj:Ut(Ht.cnpj,"decimal"),color:Ut(Ht.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Ut(Ht.cpf,"decimal"),cpfCnpj:Ut(Ht.cpfCnpj,"decimal",{transform:Ea}),creditCard:Ut(Ht.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Ut(Ht.date,"decimal"),int:Ut(Ht.int,"decimal",{pattern:"[0-9]+"}),isoDate:Ut(Ht.isoDate,"decimal"),telephone:Ut(Ht.telephone,"tel"),time:Ut(Ht.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Ut(Ht.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function ov(e,t,n,r){var o,s;r===void 0&&(r=Ta);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 sv=function(e){return e},b_=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(ri(e,n,t));return r.test(n)};function w_(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t.current}var x_=w.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,s=o===void 0?!0:o,i=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,h=Nu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),m=w.useRef(null);w.useImperativeHandle(t,function(){return m.current});var p=Fu(a),v=Fu(d),b=Fu(u),y=w.useRef(b_(u,s,h.value||h.defaultValue)),g=f??"input",T=Lu(w.useState(""),2),S=T[0],E=T[1],C=w_(S),I=w.useCallback(function(_,F){var N,R,H=(N=_??F)!==null&&N!==void 0?N:"";if(u===void 0)return H;var M=(R=H==null?void 0:H.toString())!==null&&R!==void 0?R:"";return ov(M,typeof u=="function"?u(M):u,i??sv,c??Ta)},[i,u,c]),A=Lu(w.useState(function(){return I(h.value,h.defaultValue)}),2),O=A[0],L=A[1],D=I(h.defaultValue,h.defaultValue),V=w.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var _=u(O);return Array.isArray(_)?Vu(_,s):ri(u,O,s)}return typeof u=="string"?ri(u,O,s):Vu(u,s)},[l,O,s,u]);w.useEffect(function(){if(h.value!==void 0){var _=I(h.value,h.defaultValue);L(_),m.current!==null&&(m.current.value=_)}},[h.value,u,i,h.defaultValue]);var k=function(_){var F,N,R,H,M,B=_.currentTarget,K=_.target.value;if(b.current===void 0)return L(K),(F=v.current)===null||F===void 0||F.call(v,K),(N=p.current)===null||N===void 0||N.call(p,_),d==null?void 0:d(K);var oe=new RegExp(ri(b.current,K,s)),te=(R=B.selectionEnd)!==null&&R!==void 0?R:0,G=function(Q,fe,U){if(Q.type!=="number")return Q.setSelectionRange(fe,U)};if(r&&y.current&&K.length>=O.length)return B.value=O,G(B,te-1,te-1);var $=!1;K.length<C.length&&(y.current=!1,$=!0),oe.test(K)&&(y.current=!0);var j=te,W=K[j-1],Y=ov(K,typeof b.current=="function"?b.current(K):b.current,i??sv,c??Ta);for(B.value=Y,L(Y);j<Y.length&&Y.charAt(j-1)!==W;)j+=1;$?G(B,te,te):G(B,j,j),_.target.value=Y,E(Y),(H=v.current)===null||H===void 0||H.call(v,Y),(M=p.current)===null||M===void 0||M.call(p,_)};return w.createElement(g,gt({},h,{ref:m,pattern:V,onChange:k,defaultValue:iv(h.defaultValue)?D:void 0,value:iv(h.value)?I(h.value,h.value):h.value}))}),iv=function(e){return typeof e=="string"},av=w.forwardRef(function(e,t){return a_(e.mask)?w.createElement(c_,gt({},e,{mask:void 0,ref:t})):d_(e.mask)?w.createElement(h_,gt({},e,{mask:void 0,ref:t})):w.createElement(x_,gt({},e,{ref:t}))}),Gt=function(e){return function(t){return w.createElement(av,gt({},e,t))}};Gt(Dt.cellTelephone),Gt(Dt.cellphone),Gt(Dt.cep),Gt(Dt.cnpj),Gt(Dt.color),Gt(Dt.cpf),Gt(Dt.cpfCnpj),Gt(Dt.creditCard),Gt(Dt.date),Gt(Dt.int),Gt(Dt.isoDate),Gt(Dt.telephone),Gt(Dt.time),Gt(Dt.uuid);var lv=w.forwardRef(function(t,n){var r=w.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&i_(Dt,t.mask)?Dt[t.mask]:{mask:t.mask}},[t.mask]),o=gt(gt({},t),r);return w.createElement(av,gt({},o,{ref:n}))}),$u={},Ru={exports:{}},Bu={};/**
|
|
137
|
+
*/const Fu=xt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ay={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},IA={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},sy=e=>b.jsx(gt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:ay,exit:ay.false,transition:IA,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:He("aria-hidden:pointer-events-none",e.className),children:e.children}),OA=co("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"}}),MA=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 b.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:He("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:b.jsx(sy,{"data-open":!!i,open:!!i,children:b.jsxs(uo,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:He(OA({theme:n}),t),children:[b.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?b.jsx(ry,{size:20}):null,!r&&n==="info"?b.jsx(iy,{size:20}):null,!r&&n==="danger"?b.jsx(PA,{size:20}):null,r,b.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?b.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:b.jsx(Fu,{size:20})}):null]})})})}),ly=6048e5,DA=864e5,NA=6e4,FA=36e5,LA=1e3,cy=Symbol.for("constructDateFrom");function ut(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&cy in e?e[cy](t):e instanceof Date?new e.constructor(t):new Date(t)}function et(e,t){return ut(t||e,e)}function Po(e,t,n){const r=et(e,n==null?void 0:n.in);return isNaN(t)?ut((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Qa(e,t,n){const r=et(e,n==null?void 0:n.in);if(isNaN(t))return ut(e,NaN);if(!t)return r;const o=r.getDate(),i=ut(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 VA={};function Fr(){return VA}function kn(e,t){var s,l,c,u;const n=Fr(),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=et(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 Ao(e,t){return kn(e,{...t,weekStartsOn:1})}function uy(e,t){const n=et(e,t==null?void 0:t.in),r=n.getFullYear(),o=ut(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Ao(o),a=ut(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Ao(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Ja(e){const t=et(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 es(e,...t){const n=ut.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function _o(e,t){const n=et(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function jA(e,t,n){const[r,o]=es(n==null?void 0:n.in,e,t),i=_o(r),a=_o(o),s=+i-Ja(i),l=+a-Ja(a);return Math.round((s-l)/DA)}function RA(e,t){const n=uy(e,t),r=ut(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ao(r)}function dy(e,t,n){return Po(e,t*7,n)}function fy(e,t,n){return Qa(e,t*12,n)}function $A(e){return ut(e,Date.now())}function zA(e,t,n){const[r,o]=es(n==null?void 0:n.in,e,t);return+_o(r)==+_o(o)}function BA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function py(e){return!(!BA(e)&&typeof e!="number"||isNaN(+et(e)))}function HA(e,t){const[n,r]=es(e,t.start,t.end);return{start:n,end:r}}function hy(e,t){const{start:n,end:r}=HA(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(ut(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function my(e,t){const n=et(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function WA(e,t){const n=et(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function qA(e,t){var s,l;const n=Fr(),r=n.weekStartsOn??((l=(s=n.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=et(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 UA={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"}},GA=(e,t,n)=>{let r;const o=UA[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 Lu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const YA={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},KA={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ZA={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},XA={date:Lu({formats:YA,defaultWidth:"full"}),time:Lu({formats:KA,defaultWidth:"full"}),dateTime:Lu({formats:ZA,defaultWidth:"full"})},QA={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},JA=(e,t,n,r)=>QA[e];function $i(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 e_={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},t_={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},n_={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"]},r_={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"]},o_={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"}},i_={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"}},a_={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:$i({values:e_,defaultWidth:"wide"}),quarter:$i({values:t_,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$i({values:n_,defaultWidth:"wide"}),day:$i({values:r_,defaultWidth:"wide"}),dayPeriod:$i({values:o_,defaultWidth:"wide",formattingValues:i_,defaultFormattingWidth:"wide"})};function zi(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)?l_(s,d=>d.test(a)):s_(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 s_(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function l_(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function c_(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 u_=/^(\d+)(th|st|nd|rd)?/i,d_=/\d+/i,f_={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},p_={any:[/^b/i,/^(a|c)/i]},h_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},m_={any:[/1/i,/2/i,/3/i,/4/i]},g_={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},v_={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]},y_={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},b_={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]},x_={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},w_={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}},T_={ordinalNumber:c_({matchPattern:u_,parsePattern:d_,valueCallback:e=>parseInt(e,10)}),era:zi({matchPatterns:f_,defaultMatchWidth:"wide",parsePatterns:p_,defaultParseWidth:"any"}),quarter:zi({matchPatterns:h_,defaultMatchWidth:"wide",parsePatterns:m_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:zi({matchPatterns:g_,defaultMatchWidth:"wide",parsePatterns:v_,defaultParseWidth:"any"}),day:zi({matchPatterns:y_,defaultMatchWidth:"wide",parsePatterns:b_,defaultParseWidth:"any"}),dayPeriod:zi({matchPatterns:x_,defaultMatchWidth:"any",parsePatterns:w_,defaultParseWidth:"any"})},gy={code:"en-US",formatDistance:GA,formatLong:XA,formatRelative:JA,localize:a_,match:T_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function S_(e,t){const n=et(e,t==null?void 0:t.in);return jA(n,WA(n))+1}function vy(e,t){const n=et(e,t==null?void 0:t.in),r=+Ao(n)-+RA(n);return Math.round(r/ly)+1}function Vu(e,t){var u,d,p,f;const n=et(e,t==null?void 0:t.in),r=n.getFullYear(),o=Fr(),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=ut((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=kn(a,t),l=ut((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=kn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function E_(e,t){var s,l,c,u;const n=Fr(),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=Vu(e,t),i=ut((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),kn(i,t)}function yy(e,t){const n=et(e,t==null?void 0:t.in),r=+kn(n,t)-+E_(n,t);return Math.round(r/ly)+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)}},Io={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},by={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=Vu(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=uy(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=yy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ye(o,t.length)},I:function(e,t,n){const r=vy(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=S_(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=Io.noon:r===0?o=Io.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=Io.evening:r>=12?o=Io.afternoon:r>=4?o=Io.morning:o=Io.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 wy(r);case"XXXX":case"XX":return Lr(r);case"XXXXX":case"XXX":default:return Lr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return wy(r);case"xxxx":case"xx":return Lr(r);case"xxxxx":case"xxx":default:return Lr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+xy(r,":");case"OOOO":default:return"GMT"+Lr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+xy(r,":");case"zzzz":default:return"GMT"+Lr(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 xy(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 wy(e,t){return e%60===0?(e>0?"-":"+")+Ye(Math.abs(e)/60,2):Lr(e,t)}function Lr(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 Ty=(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"})}},Sy=(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"})}},ju={p:Sy,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ty(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}}",Ty(r,t)).replace("{{time}}",Sy(o,t))}},C_=/^D+$/,k_=/^Y+$/,P_=["D","DD","YY","YYYY"];function Ey(e){return C_.test(e)}function Cy(e){return k_.test(e)}function Ru(e,t,n){const r=A_(e,t,n);if(console.warn(r),P_.includes(e))throw new RangeError(r)}function A_(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 __=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,I_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,O_=/^'([^]*?)'?$/,M_=/''/g,D_=/[a-zA-Z]/;function N_(e,t,n){var u,d,p,f;const r=Fr(),o=r.locale??gy,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=et(e,n==null?void 0:n.in);if(!py(s))throw new RangeError("Invalid time value");let l=t.match(I_).map(h=>{const y=h[0];if(y==="p"||y==="P"){const g=ju[y];return g(h,o.formatLong)}return h}).join("").match(__).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const y=h[0];if(y==="'")return{isToken:!1,value:F_(h)};if(by[y])return{isToken:!0,value:h};if(y.match(D_))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;(Cy(y)||Ey(y))&&Ru(y,t,String(e));const g=by[y[0]];return g(s,y,o.localize,c)}).join("")}function F_(e){const t=e.match(O_);return t?t[1].replace(M_,"'"):e}function L_(){return Object.assign({},Fr())}function V_(e,t){const n=et(e,t==null?void 0:t.in).getDay();return n===0?7:n}function j_(e,t){return+et(e)>+et(t)}function R_(e,t){return+et(e)<+et(t)}function $_(e,t){const n=z_(t)?new t(0):ut(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function z_(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const B_=10;class ky{constructor(){pe(this,"subPriority",0)}validate(t,n){return!0}}class H_ extends ky{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 W_ extends ky{constructor(n,r){super();pe(this,"priority",B_);pe(this,"subPriority",-1);this.context=n||(o=>ut(r,o))}set(n,r){return r.timestampIsSet?n:ut(n,$_(n,this.context))}}class We{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new H_(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class q_ extends We{constructor(){super(...arguments);pe(this,"priority",140);pe(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}/},Pn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function 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 An(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*FA+i*NA+a*LA),rest:t.slice(n[0].length)}}function Py(e){return dt(wt.anyDigitsSigned,e)}function vt(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 ts(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 $u(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 Ay(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 _y(e){return e%400===0||e%4===0&&e%100!==0}class U_ extends We{constructor(){super(...arguments);pe(this,"priority",130);pe(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(vt(4,n),i);case"yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(vt(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=Ay(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 G_ extends We{constructor(){super(...arguments);pe(this,"priority",130);pe(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(vt(4,n),i);case"Yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(vt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const a=Vu(n,i);if(o.isTwoDigitYear){const l=Ay(o.year,a);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),kn(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),kn(n,i)}}class Y_ extends We{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return ts(r==="R"?4:r.length,n)}set(n,r,o){const i=ut(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),Ao(i)}}class K_ extends We{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return ts(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class Z_ extends We{constructor(){super(...arguments);pe(this,"priority",120);pe(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 vt(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 X_ extends We{constructor(){super(...arguments);pe(this,"priority",120);pe(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 vt(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 Q_ extends We{constructor(){super(...arguments);pe(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);pe(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(vt(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 J_ extends We{constructor(){super(...arguments);pe(this,"priority",110);pe(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(vt(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 eI(e,t,n){const r=et(e,n==null?void 0:n.in),o=yy(r,n)-t;return r.setDate(r.getDate()-o*7),et(r,n==null?void 0:n.in)}class tI extends We{constructor(){super(...arguments);pe(this,"priority",100);pe(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 vt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return kn(eI(n,o,i),i)}}function nI(e,t,n){const r=et(e,n==null?void 0:n.in),o=vy(r,n)-t;return r.setDate(r.getDate()-o*7),r}class rI extends We{constructor(){super(...arguments);pe(this,"priority",100);pe(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 vt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Ao(nI(n,o))}}const oI=[31,28,31,30,31,30,31,31,30,31,30,31],iI=[31,29,31,30,31,30,31,31,30,31,30,31];class aI extends We{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"subPriority",1);pe(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 vt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=_y(o),a=n.getMonth();return i?r>=1&&r<=iI[a]:r>=1&&r<=oI[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class sI extends We{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"subpriority",1);pe(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 vt(r.length,n)}}validate(n,r){const o=n.getFullYear();return _y(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 zu(e,t,n){var d,p,f,h;const r=Fr(),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=et(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 Po(i,u,n)}class lI extends We{constructor(){super(...arguments);pe(this,"priority",90);pe(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=zu(n,o,i),n.setHours(0,0,0,0),n}}class cI extends We{constructor(){super(...arguments);pe(this,"priority",90);pe(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(vt(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=zu(n,o,i),n.setHours(0,0,0,0),n}}class uI extends We{constructor(){super(...arguments);pe(this,"priority",90);pe(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(vt(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=zu(n,o,i),n.setHours(0,0,0,0),n}}function dI(e,t,n){const r=et(e,n==null?void 0:n.in),o=V_(r,n),i=t-o;return Po(r,i,n)}class fI extends We{constructor(){super(...arguments);pe(this,"priority",90);pe(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 vt(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=dI(n,o),n.setHours(0,0,0,0),n}}class pI extends We{constructor(){super(...arguments);pe(this,"priority",80);pe(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($u(o),0,0,0),n}}class hI extends We{constructor(){super(...arguments);pe(this,"priority",80);pe(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($u(o),0,0,0),n}}class mI extends We{constructor(){super(...arguments);pe(this,"priority",80);pe(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($u(o),0,0,0),n}}class gI extends We{constructor(){super(...arguments);pe(this,"priority",70);pe(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 vt(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 vI extends We{constructor(){super(...arguments);pe(this,"priority",70);pe(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 vt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class yI extends We{constructor(){super(...arguments);pe(this,"priority",70);pe(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 vt(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 bI extends We{constructor(){super(...arguments);pe(this,"priority",70);pe(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 vt(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 We{constructor(){super(...arguments);pe(this,"priority",60);pe(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 vt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class wI extends We{constructor(){super(...arguments);pe(this,"priority",50);pe(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 vt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class TI extends We{constructor(){super(...arguments);pe(this,"priority",30);pe(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return Tt(vt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class SI extends We{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return An(Pn.basicOptionalMinutes,n);case"XX":return An(Pn.basic,n);case"XXXX":return An(Pn.basicOptionalSeconds,n);case"XXXXX":return An(Pn.extendedOptionalSeconds,n);case"XXX":default:return An(Pn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:ut(n,n.getTime()-Ja(n)-o)}}class EI extends We{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return An(Pn.basicOptionalMinutes,n);case"xx":return An(Pn.basic,n);case"xxxx":return An(Pn.basicOptionalSeconds,n);case"xxxxx":return An(Pn.extendedOptionalSeconds,n);case"xxx":default:return An(Pn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:ut(n,n.getTime()-Ja(n)-o)}}class CI extends We{constructor(){super(...arguments);pe(this,"priority",40);pe(this,"incompatibleTokens","*")}parse(n){return Py(n)}set(n,r,o){return[ut(n,o*1e3),{timestampIsSet:!0}]}}class kI extends We{constructor(){super(...arguments);pe(this,"priority",20);pe(this,"incompatibleTokens","*")}parse(n){return Py(n)}set(n,r,o){return[ut(n,o),{timestampIsSet:!0}]}}const PI={G:new q_,y:new U_,Y:new G_,R:new Y_,u:new K_,Q:new Z_,q:new X_,M:new Q_,L:new J_,w:new tI,I:new rI,d:new aI,D:new sI,E:new lI,e:new cI,c:new uI,i:new fI,a:new pI,b:new hI,B:new mI,h:new gI,H:new vI,K:new yI,k:new bI,m:new xI,s:new wI,S:new TI,X:new SI,x:new EI,t:new CI,T:new kI},AI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_I=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,II=/^'([^]*?)'?$/,OI=/''/g,MI=/\S/,DI=/[a-zA-Z]/;function NI(e,t,n,r){var g,v,m,x;const o=()=>ut(n,NaN),i=L_(),a=i.locale??gy,s=i.firstWeekContainsDate??((v=(g=i.locale)==null?void 0:g.options)==null?void 0:v.firstWeekContainsDate)??1,l=i.weekStartsOn??((x=(m=i.locale)==null?void 0:m.options)==null?void 0:x.weekStartsOn)??0;if(!t)return e?o():et(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new W_(r==null?void 0:r.in,n)],d=t.match(_I).map(S=>{const T=S[0];if(T in ju){const w=ju[T];return w(S,a.formatLong)}return S}).join("").match(AI),p=[];for(let S of d){Cy(S)&&Ru(S,t,e),Ey(S)&&Ru(S,t,e);const T=S[0],w=PI[T];if(w){const{incompatibleTokens:C}=w;if(Array.isArray(C)){const I=p.find(A=>C.includes(A.token)||A.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(DI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(S==="''"?S="'":T==="'"&&(S=FI(S)),e.indexOf(S)===0)e=e.slice(S.length);else return o()}}if(e.length>0&&MI.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=et(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 FI(e){return e.match(II)[1].replace(OI,"'")}function LI(e,t,n){const[r,o]=es(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function VI(e,t){return zA(ut(e,e),$A(e))}function jI(e,t,n){return Po(e,-1,n)}function Iy(e,t,n){return Qa(e,-1,n)}function RI(e,t,n){return dy(e,-1,n)}function $I(e,t,n){return fy(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 Bu(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 Hu(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}typeof SuppressedError=="function"&&SuppressedError;var Bi=function(e){return e.replace(new RegExp(" ","g")," ")},Oy=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)},zI=function(e){return e.replace(/^0+([0-9]+)/,"$1")},My=function(e,t,n){var r=e.length-2,o=zI(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Dy=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ns=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},BI=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Wu=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},HI=function(e){return e==="money"||e==="currency"},WI=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:""})},rs=function(e,t){var n=Oy(Dy(e),t.fraction.length),r="".concat(t.currency).concat(My(n,t.group,t.decimal));return Bi(r)},qI=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=Bu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var h=WI(r,i,s);return h.currency=Bi("".concat(h.currency.trim()," ")),h.literal=Bi(h.literal.trim()),h},[r,i]),p=function(h){var y=rs(h.target.value,d),g=ns(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=rs(h,d),g=ns(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?rs(c.defaultValue,d):void 0;return E.createElement("input",St({},c,{value:typeof c.value=="string"?rs(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),UI=1,GI=function(e){return e==="percentage"||e==="percent"||e==="percentual"},YI=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:""})},os=function(e,t){var n=Oy(Dy(e),t.fraction.length),r="".concat(My(n,t.group,t.decimal)," ").concat(t.percentSign);return Bi(r)},KI=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=Bu(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),l=Hu(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(os(m,d))},[a.value]);var d=E.useMemo(function(){var v=YI(r);return v.percentSign=Bi("".concat(v.percentSign)),v},[r]),p=c.length-d.percentSign.length-UI,f=function(v){var m,x=s.current;x&&(x.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 x=m.selectionStart,S=m.selectionEnd,T=x!==S,w=p<x;!T&&w&&f()}i==null||i(v)},y=function(v){var m=os(v.target.value,d),x=ns(m);u(m),v.target.value=m,v.target.setAttribute("data-number",x.toString()),o==null||o(v)};E.useEffect(function(){if(s.current!==null){var v=s.current.value;if(v!==""){var m=os(v,d),x=ns(m);u(m),s.current.value=m,s.current.setAttribute("data-number",x.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?os(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"}))}),Hi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},ZI=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=is[i];a===void 0?r.push(i.replace(Hi.dots,"\\.").replace(Hi.openParenthesis,"\\(").replace(Hi.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Hi.leadingBars,"\\")},Wi=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=ZI(o);return n?"^".concat(i,"$"):i},XI=function(e){return e.replace(Hi.escape,"\\$&")},qu=function(e,t){var n=e.map(function(r){return typeof r=="string"?XI(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},is={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]/}},QI=/\d/,Ny="(dd) 9dddd-dddd",Fy="(dd) dddd-dddd",Ly="ddd.ddd.ddd-dd",Vy="dd.ddd.ddd/dddd-dd",as=function(e){return e.replace(/\D/g,"")},JI=["2",/[0-3]/,":",/[0-5]/,/\d/],eO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Gt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Ly,isoDate:"dddd-dd-dd",cnpj:Vy,telephone:Fy,cellphone:Ny,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return as(e).length<=11?Ly:Vy},int:function(e){return e===void 0&&(e=""),QI.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=as(e);return t.length<11?Fy:Ny},time:function(e){var t=as(e),n=t[0];return n==="2"?JI:eO}},Yt=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:Wi(e,"",!0),infinity:n.infinity},n)},jt={cellTelephone:Yt(Gt.cellTelephone,"tel"),cellphone:Yt(Gt.cellphone,"tel"),cep:Yt(Gt.cep,"decimal"),cnpj:Yt(Gt.cnpj,"decimal"),color:Yt(Gt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Yt(Gt.cpf,"decimal"),cpfCnpj:Yt(Gt.cpfCnpj,"decimal",{transform:as}),creditCard:Yt(Gt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Yt(Gt.date,"decimal"),int:Yt(Gt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Yt(Gt.isoDate,"decimal"),telephone:Yt(Gt.telephone,"tel"),time:Yt(Gt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Yt(Gt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function jy(e,t,n,r){var o,i;r===void 0&&(r=is);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 Ry=function(e){return e},tO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Wi(e,n,t));return r.test(n)};function nO(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var rO=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=Bu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),h=E.useRef(null);E.useImperativeHandle(t,function(){return h.current});var y=Wu(s),g=Wu(d),v=Wu(u),m=E.useRef(tO(u,i,f.value||f.defaultValue)),x=p??"input",S=Hu(E.useState(""),2),T=S[0],w=S[1],C=nO(T),k=E.useCallback(function(O,L){var j,D,q=(j=O??L)!==null&&j!==void 0?j:"";if(u===void 0)return q;var M=(D=q==null?void 0:q.toString())!==null&&D!==void 0?D:"";return jy(M,typeof u=="function"?u(M):u,a??Ry,c??is)},[a,u,c]),I=Hu(E.useState(function(){return k(f.value,f.defaultValue)}),2),A=I[0],F=I[1],N=k(f.defaultValue,f.defaultValue),V=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var O=u(A);return Array.isArray(O)?qu(O,i):Wi(u,A,i)}return typeof u=="string"?Wi(u,A,i):qu(u,i)},[l,A,i,u]);E.useEffect(function(){if(f.value!==void 0){var O=k(f.value,f.defaultValue);F(O),h.current!==null&&(h.current.value=O)}},[f.value,u,a,f.defaultValue]);var P=function(O){var L,j,D,q,M,$=O.currentTarget,Q=O.target.value;if(v.current===void 0)return F(Q),(L=g.current)===null||L===void 0||L.call(g,Q),(j=y.current)===null||j===void 0||j.call(y,O),d==null?void 0:d(Q);var ie=new RegExp(Wi(v.current,Q,i)),J=(D=$.selectionEnd)!==null&&D!==void 0?D:0,Y=function(X,re,z){if(X.type!=="number")return X.setSelectionRange(re,z)};if(r&&m.current&&Q.length>=A.length)return $.value=A,Y($,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,R=Q[Z-1],H=jy(Q,typeof v.current=="function"?v.current(Q):v.current,a??Ry,c??is);for($.value=H,F(H);Z<H.length&&H.charAt(Z-1)!==R;)Z+=1;U?Y($,J,J):Y($,Z,Z),O.target.value=H,w(H),(q=g.current)===null||q===void 0||q.call(g,H),(M=y.current)===null||M===void 0||M.call(y,O)};return E.createElement(x,St({},f,{ref:h,pattern:V,onChange:P,defaultValue:$y(f.defaultValue)?N:void 0,value:$y(f.value)?k(f.value,f.value):f.value}))}),$y=function(e){return typeof e=="string"},zy=E.forwardRef(function(e,t){return HI(e.mask)?E.createElement(qI,St({},e,{mask:void 0,ref:t})):GI(e.mask)?E.createElement(KI,St({},e,{mask:void 0,ref:t})):E.createElement(rO,St({},e,{ref:t}))}),Kt=function(e){return function(t){return E.createElement(zy,St({},e,t))}};Kt(jt.cellTelephone),Kt(jt.cellphone),Kt(jt.cep),Kt(jt.cnpj),Kt(jt.color),Kt(jt.cpf),Kt(jt.cpfCnpj),Kt(jt.creditCard),Kt(jt.date),Kt(jt.int),Kt(jt.isoDate),Kt(jt.telephone),Kt(jt.time),Kt(jt.uuid);var By=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&BI(jt,t.mask)?jt[t.mask]:{mask:t.mask}},[t.mask]),o=St(St({},t),r);return E.createElement(zy,St({},o,{ref:n}))}),ss={exports:{}},Uu={},ls={exports:{}},Gu={};/**
|
|
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 Hy;function oO(){if(Hy)return Gu;Hy=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 Gu.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Gu}var Yu={};/**
|
|
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 Wy;function iO(){return Wy||(Wy=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;Yu.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())}()),Yu}var qy;function Uy(){return qy||(qy=1,process.env.NODE_ENV==="production"?ls.exports=oO():ls.exports=iO()),ls.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 Gy;function aO(){if(Gy)return Uu;Gy=1;var e=E,t=Uy();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 Uu.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,x=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(x,w))return C;var k=p(w);return f!==void 0&&f(C,k)?(x=w,C):(x=w,S=k)}var m=!1,x,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},Uu}var Ku={};/**
|
|
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 gv;function C_(){return gv||(gv=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w,t=hv();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,m){var p=s(null),v;p.current===null?(v={hasValue:!1,value:null},p.current=v):v=p.current;var b=a(function(){var S=!1,E,C,I=function(D){if(!S){S=!0,E=D;var V=h(D);if(m!==void 0&&v.hasValue){var k=v.value;if(m(k,V))return C=k,k}return C=V,V}var _=E,F=C;if(r(_,D))return F;var N=h(D);return m!==void 0&&m(F,N)?F:(E=D,C=N,N)},A=f===void 0?null:f,O=function(){return I(d())},L=A===null?void 0:function(){return I(A())};return[O,L]},[d,f,h,m]),y=b[0],g=b[1],T=o(u,y,g);return i(function(){v.hasValue=!0,v.value=T},[T]),l(T),T}mv.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),mv}process.env.NODE_ENV==="production"?E_():C_();const Lo=e=>{const t=w.useRef(e??{});return w.useEffect(()=>void(t.current=e),[e]),t},P_=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current},k_=e=>Object.entries(e),yv=e=>e instanceof Promise,vv=(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),I_=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,d)=>n(f=>vv(u,f,s,d));return yv(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))},A_=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>vv(c,u,s,o.current));return yv(a)?a.then(c=>l(c)):l(a)},ju=(e,t,n)=>{const[r,o]=w.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=w.useRef(e),d=P_(r),f=Lo(d),h=w.useRef(null);w.useEffect(()=>{if(h.current===null)return;const p=h.current;l.current.forEach(v=>{v(r,d,p)})},[r,l,d]);const[m]=w.useState(()=>{const p=()=>i.current,v=a.current({props:p,state:()=>s.current,initialState:u.current,previousState:()=>f.current});return k_(v).reduce((b,[y,g])=>({...b,[y]:n!=null&&n.debug?I_(y,g,o,p,h,c.current):A_(y,g,o,p,h,c.current)}),{})});return[r,m,i.current]},O_=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function __(e,t){return w.useRef(O_(e,t)).current}const Ca={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>)`},Fo=(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(Fo(i,t,n,a))},[]),bv=(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]:bv(i,t,n,a)}},{}),wv={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Pa=(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)},M_={default:e=>Pa(e,{result:wv.default}),dark:e=>Pa(e,{result:wv.dark})},zu=(e,t)=>{const n=a=>(l,c,u)=>{const d={key:`--${u}`,value:`${l}`};return a?a(d):d},r=Fo(e.colors,n(t==null?void 0:t.colors)),o=Fo(e.spacing,n(t==null?void 0:t.spacing)),s=Fo(e.rounded,n(t==null?void 0:t.rounded)),i=e.custom?Fo(e.custom,n(t==null?void 0:t.customTokens)):[];return r.concat(o,s,i)},D_=(e,t)=>Pa(zu(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),N_=(e,t)=>zu(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),L_=(e,t)=>Pa(zu(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),xv={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},Sv={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"},F_={name:"dark",rounded:xv,spacing:Sv,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%)"}}}},V_={rounded:xv,spacing:Sv,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%)"}}}},$_=F_,R_=V_,Wu={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(w.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..."},Hu={input:{iconFeedback:!0}},oi=w.createContext({tweaks:Hu,parser:Ca.hsla,map:Wu,locale:void 0}),B_=e=>{const t=w.useMemo(()=>({locale:e.locale,tweaks:{...Hu,...e.tweaks},parser:e.parser||Ca.hsla,map:{...Wu,...e.map}}),[e]);return x.jsx(oi.Provider,{value:t,children:e.children})},Uu=e=>{if(e)return e;const t=w.useContext(oi);if(t)return t.locale||e},Et=()=>{const e=w.useContext(oi);return e?e.map:Wu},j_=()=>{const e=w.useContext(oi);return e?e.parser:Ca.hsla},z_=()=>{const e=w.useContext(oi);return e?e.tweaks:Hu},W_={type:"spring",bounce:.3,duration:.6},Tv=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),Ev={middle:{x:"0%",opacity:1},enter:Tv(1),exit:Tv(-1)},Cv={exit:{visibility:"hidden"}},H_=e=>{const t=xn(Ly(e));return Ny({start:t,end:_o(t,41)})},Pv=(e,t)=>e.toLocaleDateString(t,{month:"long"}),U_=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const s=Ly(new Date(1970,o,1).setMonth(o)),i=Pv(s,n);return x.jsx("option",{value:i,"data-index":o,children:i},`${e}-${i}`)}),Gu={ArrowLeft:(e,t)=>t==="days"?n_(e,1):Zy(e,1),ArrowRight:(e,t)=>t==="days"?_o(e,1):ya(e,1),ArrowUp:(e,t)=>t==="days"?r_(e,1):o_(e,1),ArrowDown:(e,t)=>t==="days"?_y(e,1):My(e,1)},kv=(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)},Nr=e=>e.getFullYear().toString().padStart(4,"0"),G_=(e,t,n)=>e===void 0||n===void 0?!1:rO(t,e)&&oO(t,n),Y_=e=>{var n;const t=Et();return x.jsx(lt.tbody,{layout:!0,variants:Ev,custom:e.direction,onKeyDown:e.onKeyDown,className:De((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 x.jsx("tr",{className:s,children:r.map(c=>{var b,y,g,T,S,E,C,I,A,O,L,D,V,k,_,F,N,R;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=t_(c)&&e.markToday,h=((E=e.disabledDate)==null?void 0:E.call(e,c))||!1,m=e_(c,e.stateDate),p=!m||h,v=e.rangeMode?G_((C=e.range)==null?void 0:C.from,c,(I=e.range)==null?void 0:I.to):!1;return x.jsxs("td",{align:"center",className:De("relative",it.function((A=e.styles)==null?void 0:A.dayFrame)?(O=e.styles)==null?void 0:O.dayFrame(c):(L=e.styles)==null?void 0:L.dayFrame),children:[x.jsxs("button",{type:"button","data-date":u,disabled:h,"data-samemonth":m,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:De(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${f?"text-emphasis":""} ${p?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,v&&e.markRange?"size-10 border border-dashed border-card-border":"",it.function((D=e.styles)==null?void 0:D.day)?(V=e.styles)==null?void 0:V.day(c):(k=e.styles)==null?void 0:k.day),children:[c.getDate(),d&&((_=e.stateRange.from)==null?void 0:_.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:((F=e.labelRange)==null?void 0:F.from)??t.calendarFromDate})}):null,d&&((N=e.stateRange.to)==null?void 0:N.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:((R=e.labelRange)==null?void 0:R.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},Iv=({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=w.useRef(_s()),m=Et(),p=Uu(o),v=w.useRef(null),{date:b,range:y}=f,g=b||new Date,T=w.useRef(null),[S,E]=ju({date:g,isAnimating:!1,year:Nr(g),direction:void 0,range:{from:y==null?void 0:y.from,to:y==null?void 0:y.to},months:U_(h.current,g,p),selectMode:l?"from":void 0,week:Ny({start:xn(g),end:uA(g)})},V=>({onChangeYear:k=>({year:k}),setToday:()=>({date:Do(new Date)}),onExitComplete:()=>(kv(T.current||null,v,V.state().date,200),T.current=null,{isAnimating:!1}),date:k=>{const _=k(V.state().date);return{date:_,year:Nr(_)}},nextMonth:k=>{T.current=k.currentTarget;const _=V.state();if(_.isAnimating)return _;const F=ya(_.date,1);return{date:F,isAnimating:!0,direction:1,year:Nr(F)}},previousMonth:k=>{T.current=k.currentTarget;const _=V.state();if(_.isAnimating)return _;const F=Zy(_.date,1);return{date:F,isAnimating:!0,direction:-1,year:Nr(F)}},onSelectDate:k=>{const _=V.state(),F=k.currentTarget.dataset.range==="true",N=k.currentTarget.dataset.date||"",R=new Date(N);return{date:R,year:Nr(R),selectMode:_.selectMode===void 0?void 0:_.selectMode==="from"?"to":"from",range:F?{from:_.selectMode==="from"?R:_.range.from,to:_.selectMode==="to"?R:_.range.to}:_.range}},onChangeMonth:k=>{const _=k.target.value,N=Array.from(k.target.options).find(H=>H.value===_),R=V.state();if(N){const H=N.dataset.index||"",M=new Date(V.state().date);return M.setMonth(+H),{...R,date:M,year:Nr(M)}}return R},onKeyDown:k=>{const _=k.key,F=V.state();if(_ in Gu){(_==="ArrowUp"||_==="ArrowDown")&&k.preventDefault();const N=V.state().date,R=it.keyof(Gu,_)?Gu[_](N,k.shiftKey?"month":"days"):null;if(R!==null)return kv(k.target,v,R),{...F,date:R,year:Nr(R)}}return V.state()}}),{props:{onChangeMonth:i,onChangeYear:a},postMiddleware:[(V,k,_)=>{var N,R;return(_.method==="onChangeMonth"||_.method==="previousMonth"||_.method==="nextMonth")&&((R=(N=_.props).onChangeMonth)==null||R.call(N,V.date)),V},(V,k,_)=>{var N,R;return _.method==="onChangeYear"&&((R=(N=_.props).onChangeYear)==null||R.call(N,V.date)),V},(V,k,_)=>{const F=_.method==="onSelectDate"||_.method==="setToday"||_.method==="onKeyDown";return l&&F&&t?(c==null||c(V.range),V):(F&&t&&(c==null||c(V.date)),V)}]}),C=H_(S.date),I=ap(C,7),A=S.date.toISOString(),O=Pv(S.date,p);w.useEffect(()=>{t||c==null||c(S.date)},[A]);const L=__(V=>{E.date(k=>{const _=new Date(k);return _.setFullYear(+V),_})},1200),D=V=>{const k=V.currentTarget.value;E.onChangeYear(k),a==null||a(new Date(k)),L(k)};return x.jsx(GT,{transition:W_,children:x.jsxs("div",{"data-component":"calendar",ref:v,className:De("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:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(er,{initial:!1,mode:"popLayout",custom:S.direction,onExitComplete:E.onExitComplete,children:x.jsxs(lt.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(lt.button,{layout:!0,type:"button","data-focustrap":"prev",variants:Cv,onClick:E.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(jI,{className:"h-4 w-4"})}),x.jsx(lt.span,{layout:!0,variants:Ev,custom:S.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":m.calendarMonthLabel,value:O,onChange:E.onChangeMonth,style:{width:`${O.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:S.months}),x.jsx(lv,{mask:"int",maxLength:4,placeholder:"YYYY",value:S.year,onChange:D,style:{width:`${S.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(lt.button,{layout:!0,type:"button","data-focustrap":"next",variants:Cv,onClick:E.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(Cu,{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(lt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:S.week.map(V=>x.jsx("th",{role:"columnheader",className:De("py-2 text-sm font-medium capitalize",it.function(u==null?void 0:u.weekDay)?u.weekDay(V):u==null?void 0:u.weekDay),children:V.toLocaleDateString(p,{weekday:"short"})},V.toString()))})}),x.jsx(Y_,{zip:I,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})]})]},O)})}),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:E.setToday,children:m.calendarToday})})]})})},Av=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:s=null,className:i="",...a})=>x.jsxs(mo,{...a,as:r,"data-componen":"card",className:De("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:De("mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",n),children:t}):s,x.jsx("div",{className:De("min-w-full px-8",i),children:e})]}),Ov=e=>{const t=e.Icon??Cy,n=Et();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 q_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function _v(...e){return t=>e.forEach(n=>q_(n,t))}function Lr(...e){return P.useCallback(_v(...e),e)}function Mv(e,t=[]){let n=[];function r(s,i){const a=P.createContext(i),l=n.length;n=[...n,i];function c(d){const{scope:f,children:h,...m}=d,p=(f==null?void 0:f[e][l])||a,v=P.useMemo(()=>m,Object.values(m));return x.jsx(p.Provider,{value:v,children:h})}function u(d,f){const h=(f==null?void 0:f[e][l])||a,m=P.useContext(h);if(m)return m;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=>P.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return P.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,K_(o,...t)]}function K_(...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 P.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Vo=P.forwardRef((e,t)=>{const{children:n,...r}=e,o=P.Children.toArray(n),s=o.find(X_);if(s){const i=s.props.children,a=o.map(l=>l===s?P.Children.count(i)>1?P.Children.only(null):P.isValidElement(i)?i.props.children:null:l);return x.jsx(Yu,{...r,ref:t,children:P.isValidElement(i)?P.cloneElement(i,void 0,a):null})}return x.jsx(Yu,{...r,ref:t,children:n})});Vo.displayName="Slot";var Yu=P.forwardRef((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const o=J_(n);return P.cloneElement(n,{...Q_(r,n.props),ref:t?_v(t,o):o})}return P.Children.count(n)>1?P.Children.only(null):null});Yu.displayName="SlotClone";var Z_=({children:e})=>x.jsx(x.Fragment,{children:e});function X_(e){return P.isValidElement(e)&&e.type===Z_}function Q_(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 J_(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 eM(e){const t=e+"CollectionProvider",[n,r]=Mv(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:m,children:p}=h,v=w.useRef(null),b=w.useRef(new Map).current;return x.jsx(o,{scope:m,itemMap:b,collectionRef:v,children:p})};i.displayName=t;const a=e+"CollectionSlot",l=w.forwardRef((h,m)=>{const{scope:p,children:v}=h,b=s(a,p),y=Lr(m,b.collectionRef);return x.jsx(Vo,{ref:y,children:v})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=w.forwardRef((h,m)=>{const{scope:p,children:v,...b}=h,y=w.useRef(null),g=Lr(m,y),T=s(c,p);return w.useEffect(()=>(T.itemMap.set(y,{ref:y,...b}),()=>void T.itemMap.delete(y))),x.jsx(Vo,{[u]:"",ref:g,children:v})});d.displayName=c;function f(h){const m=s(e+"CollectionConsumer",h);return w.useCallback(()=>{const v=m.collectionRef.current;if(!v)return[];const b=Array.from(v.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((T,S)=>b.indexOf(T.ref.current)-b.indexOf(S.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:i,Slot:l,ItemSlot:d},f,r]}var tM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],En=tM.reduce((e,t)=>{const n=P.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?Vo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Dv(e,t){e&&Ss.flushSync(()=>e.dispatchEvent(t))}function jn(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function nM(e,t=globalThis==null?void 0:globalThis.document){const n=jn(e);P.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 rM="DismissableLayer",qu="dismissableLayer.update",oM="dismissableLayer.pointerDownOutside",sM="dismissableLayer.focusOutside",Nv,Lv=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fv=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=P.useContext(Lv),[u,d]=P.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=P.useState({}),m=Lr(t,C=>d(C)),p=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=p.indexOf(v),y=u?p.indexOf(u):-1,g=c.layersWithOutsidePointerEventsDisabled.size>0,T=y>=b,S=aM(C=>{const I=C.target,A=[...c.branches].some(O=>O.contains(I));!T||A||(o==null||o(C),i==null||i(C),C.defaultPrevented||a==null||a())},f),E=lM(C=>{const I=C.target;[...c.branches].some(O=>O.contains(I))||(s==null||s(C),i==null||i(C),C.defaultPrevented||a==null||a())},f);return nM(C=>{y===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},f),P.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Nv=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),$v(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Nv)}},[u,f,n,c]),P.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),$v())},[u,c]),P.useEffect(()=>{const C=()=>h({});return document.addEventListener(qu,C),()=>document.removeEventListener(qu,C)},[]),x.jsx(En.div,{...l,ref:m,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)})});Fv.displayName=rM;var iM="DismissableLayerBranch",Vv=P.forwardRef((e,t)=>{const n=P.useContext(Lv),r=P.useRef(null),o=Lr(t,r);return P.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),x.jsx(En.div,{...e,ref:o})});Vv.displayName=iM;function aM(e,t=globalThis==null?void 0:globalThis.document){const n=jn(e),r=P.useRef(!1),o=P.useRef(()=>{});return P.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){Rv(oM,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 lM(e,t=globalThis==null?void 0:globalThis.document){const n=jn(e),r=P.useRef(!1);return P.useEffect(()=>{const o=s=>{s.target&&!r.current&&Rv(sM,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 $v(){const e=new CustomEvent(qu);document.dispatchEvent(e)}function Rv(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?Dv(o,s):o.dispatchEvent(s)}var cM=Fv,uM=Vv,ka=globalThis!=null&&globalThis.document?P.useLayoutEffect:()=>{},dM="Portal",Bv=P.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=P.useState(!1);ka(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?xs.createPortal(x.jsx(En.div,{...r,ref:t}),i):null});Bv.displayName=dM;function fM(e,t){return P.useReducer((n,r)=>t[n][r]??n,e)}var jv=e=>{const{present:t,children:n}=e,r=hM(t),o=typeof n=="function"?n({present:r.isPresent}):P.Children.only(n),s=Lr(r.ref,pM(o));return typeof n=="function"||r.isPresent?P.cloneElement(o,{ref:s}):null};jv.displayName="Presence";function hM(e){const[t,n]=P.useState(),r=P.useRef({}),o=P.useRef(e),s=P.useRef("none"),i=e?"mounted":"unmounted",[a,l]=fM(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const c=Ia(r.current);s.current=a==="mounted"?c:"none"},[a]),ka(()=>{const c=r.current,u=o.current;if(u!==e){const f=s.current,h=Ia(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]),ka(()=>{if(t){const c=d=>{const h=Ia(r.current).includes(d.animationName);d.target===t&&h&&Ss.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(s.current=Ia(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:P.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Ia(e){return(e==null?void 0:e.animationName)||"none"}function pM(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 mM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=gM({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=jn(n),l=P.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 gM({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),s=jn(t);return P.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var yM="VisuallyHidden",Ku=P.forwardRef((e,t)=>x.jsx(En.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}}));Ku.displayName=yM;var Zu="ToastProvider",[Xu,vM,bM]=eM("Toast"),[zv,mB]=Mv("Toast",[bM]),[wM,Aa]=zv(Zu),Wv=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[a,l]=P.useState(null),[c,u]=P.useState(0),d=P.useRef(!1),f=P.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Zu}\`. Expected non-empty \`string\`.`),x.jsx(Xu.Provider,{scope:t,children:x.jsx(wM,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:P.useCallback(()=>u(h=>h+1),[]),onToastRemove:P.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};Wv.displayName=Zu;var Hv="ToastViewport",xM=["F8"],Qu="toast.viewportPause",Ju="toast.viewportResume",Uv=P.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=xM,label:o="Notifications ({hotkey})",...s}=e,i=Aa(Hv,n),a=vM(n),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),f=Lr(t,d,i.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=i.toastCount>0;P.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]),P.useEffect(()=>{const v=l.current,b=d.current;if(m&&v&&b){const y=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(Qu);b.dispatchEvent(E),i.isClosePausedRef.current=!0}},g=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(Ju);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)}}},[m,i.isClosePausedRef]);const p=P.useCallback(({tabbingDirection:v})=>{const y=a().map(g=>{const T=g.ref.current,S=[T,...LM(T)];return v==="forwards"?S:S.reverse()});return(v==="forwards"?y.reverse():y).flat()},[a]);return P.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 I=document.activeElement,A=y.shiftKey;if(y.target===v&&A){(S=c.current)==null||S.focus();return}const D=p({tabbingDirection:A?"backwards":"forwards"}),V=D.findIndex(k=>k===I);nd(D.slice(V+1))?y.preventDefault():A?(E=c.current)==null||E.focus():(C=u.current)==null||C.focus()}};return v.addEventListener("keydown",b),()=>v.removeEventListener("keydown",b)}},[a,p]),x.jsxs(uM,{ref:l,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&x.jsx(ed,{ref:c,onFocusFromOutsideViewport:()=>{const v=p({tabbingDirection:"forwards"});nd(v)}}),x.jsx(Xu.Slot,{scope:n,children:x.jsx(En.ol,{tabIndex:-1,...s,ref:f})}),m&&x.jsx(ed,{ref:u,onFocusFromOutsideViewport:()=>{const v=p({tabbingDirection:"backwards"});nd(v)}})]})});Uv.displayName=Hv;var Gv="ToastFocusProxy",ed=P.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=Aa(Gv,n);return x.jsx(Ku,{"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()}})});ed.displayName=Gv;var Oa="Toast",SM="toast.swipeStart",TM="toast.swipeMove",EM="toast.swipeCancel",CM="toast.swipeEnd",Yv=P.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a=!0,l]=mM({prop:r,defaultProp:o,onChange:s});return x.jsx(jv,{present:n||a,children:x.jsx(IM,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:jn(e.onPause),onResume:jn(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)})})})});Yv.displayName=Oa;var[PM,kM]=zv(Oa,{onClose(){}}),IM=P.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,...m}=e,p=Aa(Oa,n),[v,b]=P.useState(null),y=Lr(t,k=>b(k)),g=P.useRef(null),T=P.useRef(null),S=o||p.duration,E=P.useRef(0),C=P.useRef(S),I=P.useRef(0),{onToastAdd:A,onToastRemove:O}=p,L=jn(()=>{var _;(v==null?void 0:v.contains(document.activeElement))&&((_=p.viewport)==null||_.focus()),i()}),D=P.useCallback(k=>{!k||k===1/0||(window.clearTimeout(I.current),E.current=new Date().getTime(),I.current=window.setTimeout(L,k))},[L]);P.useEffect(()=>{const k=p.viewport;if(k){const _=()=>{D(C.current),c==null||c()},F=()=>{const N=new Date().getTime()-E.current;C.current=C.current-N,window.clearTimeout(I.current),l==null||l()};return k.addEventListener(Qu,F),k.addEventListener(Ju,_),()=>{k.removeEventListener(Qu,F),k.removeEventListener(Ju,_)}}},[p.viewport,S,l,c,D]),P.useEffect(()=>{s&&!p.isClosePausedRef.current&&D(S)},[s,S,p.isClosePausedRef,D]),P.useEffect(()=>(A(),()=>O()),[A,O]);const V=P.useMemo(()=>v?Jv(v):null,[v]);return p.viewport?x.jsxs(x.Fragment,{children:[V&&x.jsx(AM,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),x.jsx(PM,{scope:n,onClose:L,children:Ss.createPortal(x.jsx(Xu.ItemSlot,{scope:n,children:x.jsx(cM,{asChild:!0,onEscapeKeyDown:qt(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||L(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(En.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,...m,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:qt(e.onKeyDown,k=>{k.key==="Escape"&&(a==null||a(k.nativeEvent),k.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:qt(e.onPointerDown,k=>{k.button===0&&(g.current={x:k.clientX,y:k.clientY})}),onPointerMove:qt(e.onPointerMove,k=>{if(!g.current)return;const _=k.clientX-g.current.x,F=k.clientY-g.current.y,N=!!T.current,R=["left","right"].includes(p.swipeDirection),H=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,M=R?H(0,_):0,B=R?0:H(0,F),K=k.pointerType==="touch"?10:2,oe={x:M,y:B},te={originalEvent:k,delta:oe};N?(T.current=oe,_a(TM,d,te,{discrete:!1})):eb(oe,p.swipeDirection,K)?(T.current=oe,_a(SM,u,te,{discrete:!1}),k.target.setPointerCapture(k.pointerId)):(Math.abs(_)>K||Math.abs(F)>K)&&(g.current=null)}),onPointerUp:qt(e.onPointerUp,k=>{const _=T.current,F=k.target;if(F.hasPointerCapture(k.pointerId)&&F.releasePointerCapture(k.pointerId),T.current=null,g.current=null,_){const N=k.currentTarget,R={originalEvent:k,delta:_};eb(_,p.swipeDirection,p.swipeThreshold)?_a(CM,h,R,{discrete:!0}):_a(EM,f,R,{discrete:!0}),N.addEventListener("click",H=>H.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),AM=e=>{const{__scopeToast:t,children:n,...r}=e,o=Aa(Oa,t),[s,i]=P.useState(!1),[a,l]=P.useState(!1);return DM(()=>i(!0)),P.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:x.jsx(Bv,{asChild:!0,children:x.jsx(Ku,{...r,children:s&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},OM="ToastTitle",qv=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(En.div,{...r,ref:t})});qv.displayName=OM;var _M="ToastDescription",Kv=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(En.div,{...r,ref:t})});Kv.displayName=_M;var Zv="ToastAction",MM=P.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(Qv,{altText:n,asChild:!0,children:x.jsx(td,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Zv}\`. Expected non-empty \`string\`.`),null)});MM.displayName=Zv;var Xv="ToastClose",td=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=kM(Xv,n);return x.jsx(Qv,{asChild:!0,children:x.jsx(En.button,{type:"button",...r,ref:t,onClick:qt(e.onClick,o.onClose)})})});td.displayName=Xv;var Qv=P.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(En.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Jv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),NM(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(...Jv(r))}}),t}function _a(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?Dv(o,s):o.dispatchEvent(s)}var eb=(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 DM(e=()=>{}){const t=jn(e);ka(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function NM(e){return e.nodeType===e.ELEMENT_NODE}function LM(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 nd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var FM=Wv,VM=Uv,$M=Yv,RM=qv,BM=Kv,jM=td;const zM=e=>{const[t,n]=w.useState(!1),r=()=>n(!0),o=()=>n(!1);return w.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},WM=po("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"}}),tb=w.createContext(()=>{throw new Error("Not implemented")}),HM=()=>w.useContext(tb),nb={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]}},UM=w.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,s=t.hover?"hover":t.isLast?"isLast":"other",i=WM({theme:t.theme||"default"});return x.jsx($M,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:x.jsx(lt.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:nb[t.reversedIndex]||nb.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:i,children:[x.jsxs("div",{className:"flex flex-col p-4",children:[t.title?x.jsx(RM,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(BM,{className:"select-text truncate",children:t.text})]}),r?x.jsx(jM,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(ku,{className:"h-5 w-5"})}):null]})})})});function GM({children:e,max:t=5,duration:n=5e3}){const r=w.useRef(null),o=zM(r),[s,i]=w.useState([]),a=w.useCallback(()=>i([]),[]);w.useEffect(()=>()=>a(),[a]);const l=w.useCallback((c,u)=>{const d=window.crypto.randomUUID();return i(h=>{const m=[...h,{...u,id:d,text:c}];return m.length>t?m.slice(m.length-t,m.length+1):m}),{clear:a,close:()=>i(h=>h.filter(m=>m.id!==d))}},[t]);return x.jsxs(FM,{duration:n,swipeThreshold:150,children:[x.jsx(tb.Provider,{value:l,children:e}),x.jsx(er,{presenceAffectsLayout:!0,mode:"popLayout",children:s.map((c,u,d)=>{const f=()=>i(h=>h.filter(m=>m.id!==c.id));return w.createElement(UM,{...c,key:c.id,hover:o,index:u,onClose:f,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),x.jsx(VM,{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 YM=e=>x.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[x.jsxs("header",{className:"p-6 items-start flex gap-4",children:[x.jsx("div",{className:De("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:x.jsx("div",{children:x.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("header",{children:x.jsx("h3",{className:"text-base leading-none",children:e.title})}),x.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?x.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),rb=(e,t)=>{const[n,r]=w.useState(()=>t||e);return w.useEffect(()=>{r(e)},[e]),[n,r]},ob=w.createContext(""),qM=e=>{const[t,n]=rb(e.active),r=_r(0),o=_r(0),s=w.useRef(null),i=e.useHash?"a":"button";w.useEffect(()=>{const u=s.current;if(u===null)return;const d=p=>{if(!p)return;const v=p.getBoundingClientRect();o.set(v.width),r.set(p.offsetLeft)},f=()=>{const p=u.querySelector("li[data-active=true]");return void d(p)};window.addEventListener("resize",f);let h=u.querySelector("li[data-active=true]");const m=window.location.hash.replace(/^#/,"");if(e.active===""&&m!==""&&(h=u.querySelector(`li[data-id="${m}"]`),n(m)),h===null){h=u.querySelector("li[data-id]");const p=h.getAttribute("data-id")||"";n(p)}return d(h),()=>window.removeEventListener("resize",f)},[]);const a=Ms(e.onChange);w.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=w.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 x.jsx(ob.Provider,{value:t,children:x.jsx(Av,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:x.jsx("header",{ref:s,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(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})})},KM=()=>w.useContext(ob),ZM=e=>{const t=KM();return x.jsx(w.Fragment,{children:e.id===t?e.children:null})};function sr(e){return sb(e)?(e.nodeName||"").toLowerCase():"#document"}function Rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zn(e){var t;return(t=(sb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sb(e){return e instanceof Node||e instanceof Rt(e).Node}function Ge(e){return e instanceof Element||e instanceof Rt(e).Element}function yt(e){return e instanceof HTMLElement||e instanceof Rt(e).HTMLElement}function rd(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rt(e).ShadowRoot}function si(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Kt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function XM(e){return["table","td","th"].includes(sr(e))}function Ma(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function od(e){const t=sd(),n=Ge(e)?Kt(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 QM(e){let t=Wn(e);for(;yt(t)&&!ir(t);){if(od(t))return t;if(Ma(t))return null;t=Wn(t)}return null}function sd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ir(e){return["html","body","#document"].includes(sr(e))}function Kt(e){return Rt(e).getComputedStyle(e)}function Da(e){return Ge(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wn(e){if(sr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rd(e)&&e.host||zn(e);return rd(t)?t.host:t}function ib(e){const t=Wn(e);return ir(t)?e.ownerDocument?e.ownerDocument.body:e.body:yt(t)&&si(t)?t:ib(t)}function ar(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ib(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Rt(o);if(s){const a=id(i);return t.concat(i,i.visualViewport||[],si(o)?o:[],a&&n?ar(a):[])}return t.concat(o,ar(o,[],n))}function id(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function un(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function ut(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&rd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ad(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function ab(){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 lb(e){return e.mozInputSource===0&&e.isTrusted?!0:ud()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ld(e){return JM()?!1:!ud()&&e.width===0&&e.height===0||ud()&&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 cd(){return/apple/i.test(navigator.vendor)}function ud(){const e=/android/i;return e.test(ad())||e.test(ab())}function cb(){return ad().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function JM(){return ab().includes("jsdom/")}function $o(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function eD(e){return"nativeEvent"in e}function tD(e){return e.matches("html,body")}function Ct(e){return(e==null?void 0:e.ownerDocument)||document}function dd(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 Cn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const nD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function fd(e){return yt(e)&&e.matches(nD)}function It(e){e.preventDefault(),e.stopPropagation()}function ub(e){return e?e.getAttribute("role")==="combobox"&&fd(e):!1}const Pn=Math.min,Zt=Math.max,Na=Math.round,Ro=Math.floor,lr=e=>({x:e,y:e}),rD={left:"right",right:"left",bottom:"top",top:"bottom"},oD={start:"end",end:"start"};function hd(e,t,n){return Zt(e,Pn(t,n))}function Bo(e,t){return typeof e=="function"?e(t):e}function cr(e){return e.split("-")[0]}function jo(e){return e.split("-")[1]}function db(e){return e==="x"?"y":"x"}function pd(e){return e==="y"?"height":"width"}function Fr(e){return["top","bottom"].includes(cr(e))?"y":"x"}function md(e){return db(Fr(e))}function sD(e,t,n){n===void 0&&(n=!1);const r=jo(e),o=md(e),s=pd(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=La(i)),[i,La(i)]}function iD(e){const t=La(e);return[gd(e),t,gd(t)]}function gd(e){return e.replace(/start|end/g,t=>oD[t])}function aD(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 lD(e,t,n,r){const o=jo(e);let s=aD(cr(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(gd)))),s}function La(e){return e.replace(/left|right|bottom|top/g,t=>rD[t])}function cD(e){return{top:0,right:0,bottom:0,left:0,...e}}function fb(e){return typeof e!="number"?cD(e):{top:e,right:e,bottom:e,left:e}}function Fa(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 Yy;function sO(){return Yy||(Yy=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=Uy(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Ku.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,x=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(x,w))return C;var k=p(w);return f!==void 0&&f(C,k)?(x=w,C):(x=w,S=k)}var m=!1,x,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())}()),Ku}var Ky;function lO(){return Ky||(Ky=1,process.env.NODE_ENV==="production"?ss.exports=aO():ss.exports=sO()),ss.exports}lO();var Oo=function(){return Oo=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},Oo.apply(this,arguments)};function qi(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 Zy(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))}typeof SuppressedError=="function"&&SuppressedError;var Mo=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},cO=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},uO=function(e){return Object.entries(e)},Xy=function(e){return e instanceof Promise},Qy=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)},Oo(Oo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},dO=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,Zy([],qi(a),!1)),u=function(d,p){return n(function(f){return Qy(d,f,i,p)})};return Xy(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))}},fO=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,Zy([],qi(a),!1)),c=function(u){return n(function(d){return Qy(u,d,i,o.current)})};return Xy(l)?l.then(function(u){return c(u)}):c(l)}},Zu=function(e,t,n){var r,o,i,a=qi(E.useState(function(){return e}),2),s=a[0],l=a[1],c=Mo(s),u=Mo((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=Mo(t),p=Mo((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=Mo((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),h=E.useRef(e),y=cO(s),g=Mo(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=qi(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 uO(T).reduce(function(w,C){var k,I=qi(C,2),A=I[0],F=I[1];return Oo(Oo({},w),(k={},k[A]=n!=null&&n.debug?dO(A,F,l,S,v,f.current):fO(A,F,l,S,v,f.current),k))},{})}),1),x=m[0];return[s,x,u.current]};const pO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function hO(e,t){return E.useRef(pO(e,t)).current}const cs={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>)`},Do=(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(Do(a,t,n,s))},[]),Jy=(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]:Jy(a,t,n,s)}},{}),eb={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},us=(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)},mO={default:e=>us(e,{result:eb.default}),dark:e=>us(e,{result:eb.dark})},Xu=(e,t)=>{const n=s=>(l,c,u)=>{const d={key:`--${u}`,value:`${l}`};return s?s(d):d},r=Do(e.colors,n(t==null?void 0:t.colors)),o=Do(e.spacing,n(t==null?void 0:t.spacing)),i=Do(e.rounded,n(t==null?void 0:t.rounded)),a=e.custom?Do(e.custom,n(t==null?void 0:t.customTokens)):[];return r.concat(o,i,a)},gO=(e,t)=>us(Xu(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),vO=(e,t)=>Xu(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),yO=(e,t)=>us(Xu(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),tb={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},nb={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"},bO={name:"dark",rounded:tb,spacing:nb,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:tb,spacing:nb,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%)"}}}},wO=bO,TO=xO,Qu={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=>b.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..."},Ju={input:{iconFeedback:!0}},Ui=E.createContext({tweaks:Ju,parser:cs.hsla,map:Qu,locale:void 0}),SO=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...Ju,...e.tweaks},parser:e.parser||cs.hsla,map:{...Qu,...e.map}}),[e]);return b.jsx(Ui.Provider,{value:t,children:e.children})},ed=e=>{const t=E.useContext(Ui);if(e)return e;if(t)return t.locale||e},Ot=()=>{const e=E.useContext(Ui);return e?e.map:Qu},EO={type:"spring",bounce:.3,duration:.6},rb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),ob={middle:{x:"0%",opacity:1},enter:rb(1),exit:rb(-1)},ib={exit:{visibility:"hidden"}},CO=e=>{const t=kn(my(e));return hy({start:t,end:Po(t,41)})},ab=(e,t)=>e.toLocaleDateString(t,{month:"long"}),kO=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=my(new Date(1970,o,1).setMonth(o)),a=ab(i,n);return b.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),td={ArrowLeft:(e,t)=>t==="days"?jI(e):Iy(e),ArrowRight:(e,t)=>t==="days"?Po(e,1):Qa(e,1),ArrowUp:(e,t)=>t==="days"?RI(e):$I(e),ArrowDown:(e,t)=>t==="days"?dy(e,1):fy(e,1)},sb=(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)},Vr=e=>e.getFullYear().toString().padStart(4,"0"),PO=(e,t,n)=>e===void 0||n===void 0?!1:j_(t,e)&&R_(t,n),AO=e=>{var n;const t=Ot();return b.jsx(gt.tbody,{layout:!0,variants:ob,custom:e.direction,onKeyDown:e.onKeyDown,className:He((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 b.jsx("tr",{className:i,children:r.map(c=>{var v,m,x,S,T,w,C,k,I,A,F,N,V,P,O,L,j,D;const u=c.toISOString(),d=e.rangeMode?u===((m=(v=e.range)==null?void 0:v.to)==null?void 0:m.toISOString())||u===((S=(x=e.range)==null?void 0:x.from)==null?void 0:S.toISOString()):u===((T=e.date)==null?void 0:T.toISOString()),p=VI(c)&&e.markToday,f=((w=e.disabledDate)==null?void 0:w.call(e,c))||!1,h=LI(c,e.stateDate),y=!h||f,g=e.rangeMode?PO((C=e.range)==null?void 0:C.from,c,(k=e.range)==null?void 0:k.to):!1;return b.jsxs("td",{align:"center",className:He("relative",ht.function((I=e.styles)==null?void 0:I.dayFrame)?(A=e.styles)==null?void 0:A.dayFrame(c):(F=e.styles)==null?void 0:F.dayFrame),children:[b.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:He(`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((N=e.styles)==null?void 0:N.day)?(V=e.styles)==null?void 0:V.day(c):(P=e.styles)==null?void 0:P.day),children:[c.getDate(),d&&((O=e.stateRange.from)==null?void 0:O.toISOString())===u?b.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:b.jsx("span",{className:"text-xs text-foreground",children:((L=e.labelRange)==null?void 0:L.from)??t.calendarFromDate})}):null,d&&((j=e.stateRange.to)==null?void 0:j.toISOString())===u?b.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:b.jsx("span",{className:"text-xs text-foreground",children:((D=e.labelRange)==null?void 0:D.to)??t.calendarToDate})}):null]}),e.RenderOnDay?b.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},lb=({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(gi()),h=Ot(),y=ed(o),g=E.useRef(null),{date:v,range:m}=p,x=v||new Date,S=E.useRef(null),[T,w]=Zu({date:x,isAnimating:!1,year:Vr(x),direction:void 0,range:{from:m==null?void 0:m.from,to:m==null?void 0:m.to},months:kO(f.current,x,y),selectMode:l?"from":void 0,week:hy({start:kn(x),end:qA(x)})},V=>({onChangeYear:P=>({year:P}),setToday:()=>({date:_o(new Date)}),onExitComplete:()=>(sb(S.current||null,g,V.state().date,200),S.current=null,{isAnimating:!1}),date:P=>{const O=P(V.state().date);return{date:O,year:Vr(O)}},nextMonth:P=>{S.current=P.currentTarget;const O=V.state();if(O.isAnimating)return O;const L=Qa(O.date,1);return{date:L,isAnimating:!0,direction:1,year:Vr(L)}},previousMonth:P=>{S.current=P.currentTarget;const O=V.state();if(O.isAnimating)return O;const L=Iy(O.date);return{date:L,isAnimating:!0,direction:-1,year:Vr(L)}},onSelectDate:P=>{const O=V.state(),L=P.currentTarget.dataset.range==="true",j=P.currentTarget.dataset.date||"",D=new Date(j);return{date:D,year:Vr(D),selectMode:O.selectMode===void 0?void 0:O.selectMode==="from"?"to":"from",range:L?{from:O.selectMode==="from"?D:O.range.from,to:O.selectMode==="to"?D:O.range.to}:O.range}},onChangeMonth:P=>{const O=P.target.value,j=Array.from(P.target.options).find(q=>q.value===O),D=V.state();if(j){const q=j.dataset.index||"",M=new Date(V.state().date);return M.setMonth(+q),{...D,date:M,year:Vr(M)}}return D},onKeyDown:P=>{const O=P.key,L=V.state();if(O in td){(O==="ArrowUp"||O==="ArrowDown")&&P.preventDefault();const j=V.state().date,D=ht.keyof(td,O)?td[O](j,P.shiftKey?"month":"days"):null;if(D!==null)return sb(P.target,g,D),{...L,date:D,year:Vr(D)}}return V.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(V,P,O)=>{var j,D;return(O.method==="onChangeMonth"||O.method==="previousMonth"||O.method==="nextMonth")&&((D=(j=O.props).onChangeMonth)==null||D.call(j,V.date)),V},(V,P,O)=>{var j,D;return O.method==="onChangeYear"&&((D=(j=O.props).onChangeYear)==null||D.call(j,V.date)),V},(V,P,O)=>{const L=O.method==="onSelectDate"||O.method==="setToday"||O.method==="onKeyDown";return l&&L&&t?(c==null||c(V.range),V):(L&&t&&(c==null||c(V.date)),V)}]}),C=CO(T.date),k=Lh(C,7),I=T.date.toISOString(),A=ab(T.date,y);E.useEffect(()=>{t||c==null||c(T.date)},[I]);const F=hO(V=>{w.date(P=>{const O=new Date(P);return O.setFullYear(+V),O})},1200),N=V=>{const P=V.currentTarget.value;w.onChangeYear(P),s==null||s(new Date(P)),F(P)};return b.jsx(TS,{transition:EO,children:b.jsxs("div",{"data-component":"calendar",ref:g,className:He("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:[b.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:b.jsx(Qn,{initial:!1,mode:"popLayout",custom:T.direction,onExitComplete:w.onExitComplete,children:b.jsxs(gt.div,{initial:"enter",animate:"middle",exit:"exit",children:[b.jsxs("header",{className:"relative flex justify-between",children:[b.jsx(gt.button,{layout:!0,type:"button","data-focustrap":"prev",variants:ib,onClick:w.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:b.jsx(wA,{className:"h-4 w-4"})}),b.jsx(gt.span,{layout:!0,variants:ob,custom:T.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:b.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[b.jsx("select",{"aria-label":h.calendarMonthLabel,value:A,onChange:w.onChangeMonth,style:{width:`${A.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:T.months}),b.jsx(By,{mask:"int",maxLength:4,placeholder:"YYYY",value:T.year,onChange:N,style:{width:`${T.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),b.jsx(gt.button,{layout:!0,type:"button","data-focustrap":"next",variants:ib,onClick:w.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:b.jsx(Du,{className:"h-4 w-4"})}),b.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%)"}})]}),b.jsxs(gt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[b.jsx("thead",{children:b.jsx("tr",{children:T.week.map(V=>b.jsx("th",{role:"columnheader",className:He("py-2 text-sm font-medium capitalize",ht.function(u==null?void 0:u.weekDay)?u.weekDay(V):u==null?void 0:u.weekDay),children:V.toLocaleDateString(y,{weekday:"short"})},V.toString()))})}),b.jsx(AO,{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})]})]},A)})}),b.jsx("footer",{className:"mt-2 text-center text-primary",children:b.jsx("button",{className:"transition-transform duration-300 hover:scale-105",type:"button",onClick:w.setToday,children:h.calendarToday})})]})})},cb=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>b.jsxs(uo,{...s,as:r,"data-componen":"card",className:He("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?b.jsx("header",{className:He("mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",n),children:t}):i,b.jsx("div",{className:He("min-w-full px-8",a),children:e})]}),ub=e=>{const t=e.Icon??oy,n=Ot();return b.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[b.jsx(t,{size:64,className:"text-disabled"}),b.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Xt(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 db(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function fb(...e){return t=>{let n=!1;const r=e.map(o=>{const i=db(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():db(e[o],null)}}}}function jr(...e){return _.useCallback(fb(...e),e)}function pb(e,t=[]){let n=[];function r(i,a){const s=_.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=_.useMemo(()=>h,Object.values(h));return b.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=_.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=>_.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return _.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,_O(o,...t)]}function _O(...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 _.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var No=_.forwardRef((e,t)=>{const{children:n,...r}=e,o=_.Children.toArray(n),i=o.find(OO);if(i){const a=i.props.children,s=o.map(l=>l===i?_.Children.count(a)>1?_.Children.only(null):_.isValidElement(a)?a.props.children:null:l);return b.jsx(nd,{...r,ref:t,children:_.isValidElement(a)?_.cloneElement(a,void 0,s):null})}return b.jsx(nd,{...r,ref:t,children:n})});No.displayName="Slot";var nd=_.forwardRef((e,t)=>{const{children:n,...r}=e;if(_.isValidElement(n)){const o=DO(n),i=MO(r,n.props);return n.type!==_.Fragment&&(i.ref=t?fb(t,o):o),_.cloneElement(n,i)}return _.Children.count(n)>1?_.Children.only(null):null});nd.displayName="SlotClone";var IO=({children:e})=>b.jsx(b.Fragment,{children:e});function OO(e){return _.isValidElement(e)&&e.type===IO}function MO(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 DO(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 NO(e){const t=e+"CollectionProvider",[n,r]=pb(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 b.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=jr(h,v.collectionRef);return b.jsx(No,{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),x=jr(h,m),S=i(c,y);return E.useEffect(()=>(S.itemMap.set(m,{ref:m,...v}),()=>void S.itemMap.delete(m))),b.jsx(No,{[u]:"",ref:x,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 FO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],_n=FO.reduce((e,t)=>{const n=_.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?No:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function hb(e,t){e&&ka.flushSync(()=>e.dispatchEvent(t))}function Hn(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function LO(e,t=globalThis==null?void 0:globalThis.document){const n=Hn(e);_.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 VO="DismissableLayer",rd="dismissableLayer.update",jO="dismissableLayer.pointerDownOutside",RO="dismissableLayer.focusOutside",mb,gb=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vb=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=_.useContext(gb),[u,d]=_.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=_.useState({}),h=jr(t,C=>d(C)),y=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(g),m=u?y.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,S=m>=v,T=zO(C=>{const k=C.target,I=[...c.branches].some(A=>A.contains(k));!S||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),w=BO(C=>{const k=C.target;[...c.branches].some(A=>A.contains(k))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return LO(C=>{m===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),_.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(mb=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),bb(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=mb)}},[u,p,n,c]),_.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),bb())},[u,c]),_.useEffect(()=>{const C=()=>f({});return document.addEventListener(rd,C),()=>document.removeEventListener(rd,C)},[]),b.jsx(_n.div,{...l,ref:h,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Xt(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Xt(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Xt(e.onPointerDownCapture,T.onPointerDownCapture)})});vb.displayName=VO;var $O="DismissableLayerBranch",yb=_.forwardRef((e,t)=>{const n=_.useContext(gb),r=_.useRef(null),o=jr(t,r);return _.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),b.jsx(_n.div,{...e,ref:o})});yb.displayName=$O;function zO(e,t=globalThis==null?void 0:globalThis.document){const n=Hn(e),r=_.useRef(!1),o=_.useRef(()=>{});return _.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){xb(jO,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 BO(e,t=globalThis==null?void 0:globalThis.document){const n=Hn(e),r=_.useRef(!1);return _.useEffect(()=>{const o=i=>{i.target&&!r.current&&xb(RO,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 bb(){const e=new CustomEvent(rd);document.dispatchEvent(e)}function xb(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?hb(o,i):o.dispatchEvent(i)}var HO=vb,WO=yb,ds=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},qO="Portal",wb=_.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=_.useState(!1);ds(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?hi.createPortal(b.jsx(_n.div,{...r,ref:t}),a):null});wb.displayName=qO;function UO(e,t){return _.useReducer((n,r)=>t[n][r]??n,e)}var Tb=e=>{const{present:t,children:n}=e,r=GO(t),o=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),i=jr(r.ref,YO(o));return typeof n=="function"||r.isPresent?_.cloneElement(o,{ref:i}):null};Tb.displayName="Presence";function GO(e){const[t,n]=_.useState(),r=_.useRef({}),o=_.useRef(e),i=_.useRef("none"),a=e?"mounted":"unmounted",[s,l]=UO(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const c=fs(r.current);i.current=s==="mounted"?c:"none"},[s]),ds(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=fs(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]),ds(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const y=fs(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=fs(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:_.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function fs(e){return(e==null?void 0:e.animationName)||"none"}function YO(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 KO({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=ZO({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Hn(n),l=_.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 ZO({defaultProp:e,onChange:t}){const n=_.useState(e),[r]=n,o=_.useRef(r),i=Hn(t);return _.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var XO="VisuallyHidden",od=_.forwardRef((e,t)=>b.jsx(_n.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}}));od.displayName=XO;var id="ToastProvider",[ad,QO,JO]=NO("Toast"),[Sb,TR]=pb("Toast",[JO]),[eM,ps]=Sb(id),Eb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=_.useState(null),[c,u]=_.useState(0),d=_.useRef(!1),p=_.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${id}\`. Expected non-empty \`string\`.`),b.jsx(ad.Provider,{scope:t,children:b.jsx(eM,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:_.useCallback(()=>u(f=>f+1),[]),onToastRemove:_.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};Eb.displayName=id;var Cb="ToastViewport",tM=["F8"],sd="toast.viewportPause",ld="toast.viewportResume",kb=_.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=tM,label:o="Notifications ({hotkey})",...i}=e,a=ps(Cb,n),s=QO(n),l=_.useRef(null),c=_.useRef(null),u=_.useRef(null),d=_.useRef(null),p=jr(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a.toastCount>0;_.useEffect(()=>{const g=v=>{var x;r.length!==0&&r.every(S=>v[S]||v.code===S)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),_.useEffect(()=>{const g=l.current,v=d.current;if(h&&g&&v){const m=()=>{if(!a.isClosePausedRef.current){const w=new CustomEvent(sd);v.dispatchEvent(w),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const w=new CustomEvent(ld);v.dispatchEvent(w),a.isClosePausedRef.current=!1}},S=w=>{!g.contains(w.relatedTarget)&&x()},T=()=>{g.contains(document.activeElement)||x()};return g.addEventListener("focusin",m),g.addEventListener("focusout",S),g.addEventListener("pointermove",m),g.addEventListener("pointerleave",T),window.addEventListener("blur",m),window.addEventListener("focus",x),()=>{g.removeEventListener("focusin",m),g.removeEventListener("focusout",S),g.removeEventListener("pointermove",m),g.removeEventListener("pointerleave",T),window.removeEventListener("blur",m),window.removeEventListener("focus",x)}}},[h,a.isClosePausedRef]);const y=_.useCallback(({tabbingDirection:g})=>{const m=s().map(x=>{const S=x.ref.current,T=[S,...mM(S)];return g==="forwards"?T:T.reverse()});return(g==="forwards"?m.reverse():m).flat()},[s]);return _.useEffect(()=>{const g=d.current;if(g){const v=m=>{var T,w,C;const x=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!x){const k=document.activeElement,I=m.shiftKey;if(m.target===g&&I){(T=c.current)==null||T.focus();return}const N=y({tabbingDirection:I?"backwards":"forwards"}),V=N.findIndex(P=>P===k);dd(N.slice(V+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]),b.jsxs(WO,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&b.jsx(cd,{ref:c,onFocusFromOutsideViewport:()=>{const g=y({tabbingDirection:"forwards"});dd(g)}}),b.jsx(ad.Slot,{scope:n,children:b.jsx(_n.ol,{tabIndex:-1,...i,ref:p})}),h&&b.jsx(cd,{ref:u,onFocusFromOutsideViewport:()=>{const g=y({tabbingDirection:"backwards"});dd(g)}})]})});kb.displayName=Cb;var Pb="ToastFocusProxy",cd=_.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=ps(Pb,n);return b.jsx(od,{"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()}})});cd.displayName=Pb;var hs="Toast",nM="toast.swipeStart",rM="toast.swipeMove",oM="toast.swipeCancel",iM="toast.swipeEnd",Ab=_.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=KO({prop:r,defaultProp:o,onChange:i});return b.jsx(Tb,{present:n||s,children:b.jsx(lM,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Hn(e.onPause),onResume:Hn(e.onResume),onSwipeStart:Xt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Xt(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:Xt(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:Xt(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)})})})});Ab.displayName=hs;var[aM,sM]=Sb(hs,{onClose(){}}),lM=_.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=ps(hs,n),[g,v]=_.useState(null),m=jr(t,P=>v(P)),x=_.useRef(null),S=_.useRef(null),T=o||y.duration,w=_.useRef(0),C=_.useRef(T),k=_.useRef(0),{onToastAdd:I,onToastRemove:A}=y,F=Hn(()=>{var O;(g==null?void 0:g.contains(document.activeElement))&&((O=y.viewport)==null||O.focus()),a()}),N=_.useCallback(P=>{!P||P===1/0||(window.clearTimeout(k.current),w.current=new Date().getTime(),k.current=window.setTimeout(F,P))},[F]);_.useEffect(()=>{const P=y.viewport;if(P){const O=()=>{N(C.current),c==null||c()},L=()=>{const j=new Date().getTime()-w.current;C.current=C.current-j,window.clearTimeout(k.current),l==null||l()};return P.addEventListener(sd,L),P.addEventListener(ld,O),()=>{P.removeEventListener(sd,L),P.removeEventListener(ld,O)}}},[y.viewport,T,l,c,N]),_.useEffect(()=>{i&&!y.isClosePausedRef.current&&N(T)},[i,T,y.isClosePausedRef,N]),_.useEffect(()=>(I(),()=>A()),[I,A]);const V=_.useMemo(()=>g?Nb(g):null,[g]);return y.viewport?b.jsxs(b.Fragment,{children:[V&&b.jsx(cM,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),b.jsx(aM,{scope:n,onClose:F,children:ka.createPortal(b.jsx(ad.ItemSlot,{scope:n,children:b.jsx(HO,{asChild:!0,onEscapeKeyDown:Xt(s,()=>{y.isFocusedToastEscapeKeyDownRef.current||F(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(_n.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:Xt(e.onKeyDown,P=>{P.key==="Escape"&&(s==null||s(P.nativeEvent),P.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:Xt(e.onPointerDown,P=>{P.button===0&&(x.current={x:P.clientX,y:P.clientY})}),onPointerMove:Xt(e.onPointerMove,P=>{if(!x.current)return;const O=P.clientX-x.current.x,L=P.clientY-x.current.y,j=!!S.current,D=["left","right"].includes(y.swipeDirection),q=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,M=D?q(0,O):0,$=D?0:q(0,L),Q=P.pointerType==="touch"?10:2,ie={x:M,y:$},J={originalEvent:P,delta:ie};j?(S.current=ie,ms(rM,d,J,{discrete:!1})):Fb(ie,y.swipeDirection,Q)?(S.current=ie,ms(nM,u,J,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(O)>Q||Math.abs(L)>Q)&&(x.current=null)}),onPointerUp:Xt(e.onPointerUp,P=>{const O=S.current,L=P.target;if(L.hasPointerCapture(P.pointerId)&&L.releasePointerCapture(P.pointerId),S.current=null,x.current=null,O){const j=P.currentTarget,D={originalEvent:P,delta:O};Fb(O,y.swipeDirection,y.swipeThreshold)?ms(iM,f,D,{discrete:!0}):ms(oM,p,D,{discrete:!0}),j.addEventListener("click",q=>q.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),cM=e=>{const{__scopeToast:t,children:n,...r}=e,o=ps(hs,t),[i,a]=_.useState(!1),[s,l]=_.useState(!1);return pM(()=>a(!0)),_.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:b.jsx(wb,{asChild:!0,children:b.jsx(od,{...r,children:i&&b.jsxs(b.Fragment,{children:[o.label," ",n]})})})},uM="ToastTitle",_b=_.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(_n.div,{...r,ref:t})});_b.displayName=uM;var dM="ToastDescription",Ib=_.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(_n.div,{...r,ref:t})});Ib.displayName=dM;var Ob="ToastAction",fM=_.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?b.jsx(Db,{altText:n,asChild:!0,children:b.jsx(ud,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ob}\`. Expected non-empty \`string\`.`),null)});fM.displayName=Ob;var Mb="ToastClose",ud=_.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=sM(Mb,n);return b.jsx(Db,{asChild:!0,children:b.jsx(_n.button,{type:"button",...r,ref:t,onClick:Xt(e.onClick,o.onClose)})})});ud.displayName=Mb;var Db=_.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return b.jsx(_n.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Nb(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),hM(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(...Nb(r))}}),t}function ms(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?hb(o,i):o.dispatchEvent(i)}var Fb=(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 pM(e=()=>{}){const t=Hn(e);ds(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function hM(e){return e.nodeType===e.ELEMENT_NODE}function mM(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 dd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var gM=Eb,vM=kb,yM=Ab,bM=_b,xM=Ib,wM=ud;const TM=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},SM=co("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"}}),Lb=E.createContext(()=>{throw new Error("Not implemented")}),EM=()=>E.useContext(Lb),Vb={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]}},CM=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=SM({theme:t.theme||"default"});return b.jsx(yM,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:b.jsx(gt.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:Vb[t.reversedIndex]||Vb.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:b.jsxs("div",{className:a,children:[b.jsxs("div",{className:"flex flex-col p-4",children:[t.title?b.jsx(bM,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,b.jsx(xM,{className:"select-text truncate",children:t.text})]}),r?b.jsx(wM,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:b.jsx(Fu,{className:"h-5 w-5"})}):null]})})})});function kM({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=TM(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 b.jsxs(gM,{duration:n,swipeThreshold:150,children:[b.jsx(Lb.Provider,{value:l,children:e}),b.jsx(Qn,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(h=>h.id!==c.id));return E.createElement(CM,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),b.jsx(vM,{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 PM=e=>b.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow",children:[b.jsxs("header",{className:"flex items-start gap-4 p-6",children:[b.jsx("div",{className:He("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:b.jsx("div",{children:b.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),b.jsxs("div",{className:"flex flex-col gap-1",children:[b.jsx("header",{children:b.jsx("h3",{className:"text-base leading-none",children:e.title})}),b.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?b.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),jb=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},Rb=E.createContext(""),AM=e=>{const[t,n]=jb(e.active),r=Co(0),o=Co(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=yi(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 b.jsx(Rb.Provider,{value:t,children:b.jsx(cb,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:b.jsx("header",{ref:i,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:b.jsx("nav",{className:"min-w-0",children:b.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 b.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:b.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})})},_M=()=>E.useContext(Rb),IM=e=>{const t=_M();return b.jsx(E.Fragment,{children:e.id===t?e.children:null})};function gs(){return typeof window<"u"}function rr(e){return $b(e)?(e.nodeName||"").toLowerCase():"#document"}function Ht(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wn(e){var t;return(t=($b(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $b(e){return gs()?e instanceof Node||e instanceof Ht(e).Node:!1}function Qe(e){return gs()?e instanceof Element||e instanceof Ht(e).Element:!1}function Et(e){return gs()?e instanceof HTMLElement||e instanceof Ht(e).HTMLElement:!1}function fd(e){return!gs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot}function Gi(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 OM(e){return["table","td","th"].includes(rr(e))}function vs(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function pd(e){const t=hd(),n=Qe(e)?Qt(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 MM(e){let t=qn(e);for(;Et(t)&&!or(t);){if(pd(t))return t;if(vs(t))return null;t=qn(t)}return null}function hd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function or(e){return["html","body","#document"].includes(rr(e))}function Qt(e){return Ht(e).getComputedStyle(e)}function ys(e){return Qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qn(e){if(rr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fd(e)&&e.host||Wn(e);return fd(t)?t.host:t}function zb(e){const t=qn(e);return or(t)?e.ownerDocument?e.ownerDocument.body:e.body:Et(t)&&Gi(t)?t:zb(t)}function ir(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=zb(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ht(o);if(i){const s=md(a);return t.concat(a,a.visualViewport||[],Gi(o)?o:[],s&&n?ir(s):[])}return t.concat(o,ir(o,[],n))}function md(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 yt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&fd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function gd(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Bb(){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 Hb(e){return e.mozInputSource===0&&e.isTrusted?!0:bd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function vd(e){return DM()?!1:!bd()&&e.width===0&&e.height===0||bd()&&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 yd(){return/apple/i.test(navigator.vendor)}function bd(){const e=/android/i;return e.test(gd())||e.test(Bb())}function Wb(){return gd().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function DM(){return Bb().includes("jsdom/")}function Fo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function NM(e){return"nativeEvent"in e}function FM(e){return e.matches("html,body")}function Mt(e){return(e==null?void 0:e.ownerDocument)||document}function xd(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 In(e){return"composedPath"in e?e.composedPath()[0]:e.target}const LM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function wd(e){return Et(e)&&e.matches(LM)}function Nt(e){e.preventDefault(),e.stopPropagation()}function qb(e){return e?e.getAttribute("role")==="combobox"&&wd(e):!1}const On=Math.min,Jt=Math.max,bs=Math.round,Lo=Math.floor,ar=e=>({x:e,y:e}),VM={left:"right",right:"left",bottom:"top",top:"bottom"},jM={start:"end",end:"start"};function Td(e,t,n){return Jt(e,On(t,n))}function Vo(e,t){return typeof e=="function"?e(t):e}function sr(e){return e.split("-")[0]}function jo(e){return e.split("-")[1]}function Ub(e){return e==="x"?"y":"x"}function Sd(e){return e==="y"?"height":"width"}function Rr(e){return["top","bottom"].includes(sr(e))?"y":"x"}function Ed(e){return Ub(Rr(e))}function RM(e,t,n){n===void 0&&(n=!1);const r=jo(e),o=Ed(e),i=Sd(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=xs(a)),[a,xs(a)]}function $M(e){const t=xs(e);return[Cd(e),t,Cd(t)]}function Cd(e){return e.replace(/start|end/g,t=>jM[t])}function zM(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 BM(e,t,n,r){const o=jo(e);let i=zM(sr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Cd)))),i}function xs(e){return e.replace(/left|right|bottom|top/g,t=>VM[t])}function HM(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gb(e){return typeof e!="number"?HM(e):{top:e,right:e,bottom:e,left:e}}function ws(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 uD=["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])"],Va=uD.join(","),hb=typeof Element>"u",zo=hb?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,$a=!hb&&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},Ra=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},dD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},fD=function(t,n,r){if(Ra(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Va));return n&&zo.call(t,Va)&&o.unshift(t),o=o.filter(r),o},hD=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Ra(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=zo.call(i,Va);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!Ra(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},pb=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},mb=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||dD(t))&&!pb(t)?0:t.tabIndex},pD=function(t,n){var r=mb(t);return r<0&&n&&!pb(t)?0:r},mD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},gb=function(t){return t.tagName==="INPUT"},gD=function(t){return gb(t)&&t.type==="hidden"},yD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},vD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},bD=function(t){if(!t.name)return!0;var n=t.form||$a(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=vD(o,t.form);return!s||s===t},wD=function(t){return gb(t)&&t.type==="radio"},xD=function(t){return wD(t)&&!bD(t)},SD=function(t){var n,r=t&&$a(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=$a(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},yb=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},TD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=zo.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(zo.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=$a(t);if(l&&!l.shadowRoot&&o(l)===!0)return yb(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(SD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return yb(t);return!1},ED=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 zo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},CD=function(t,n){return!(n.disabled||Ra(n)||gD(n)||TD(n,t)||yD(n)||ED(n))},yd=function(t,n){return!(xD(n)||mb(n)<0||!CD(t,n))},PD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},kD=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=pD(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(mD).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},ii=function(t,n){n=n||{};var r;return n.getShadowRoot?r=hD([t],n.includeContainer,{filter:yd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:PD}):r=fD(t,n.includeContainer,yd.bind(null,n)),kD(r)},ID=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return zo.call(t,Va)===!1?!1:yd(n,t)};function vb(e,t,n){let{reference:r,floating:o}=e;const s=Fr(t),i=md(t),a=pd(i),l=cr(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(jo(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}const AD=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}=vb(c,r,l),f=r,h={},m=0;for(let p=0;p<a.length;p++){const{name:v,fn:b}=a[p],{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&&m<=50&&(m++,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}=vb(c,f,l)),p=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function vd(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}=Bo(t,e),m=fb(h),v=a[f?d==="floating"?"reference":"floating":d],b=Fa(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=Fa(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:g,strategy:l}):y);return{top:(b.top-S.top+m.top)/T.y,bottom:(S.bottom-b.bottom+m.bottom)/T.y,left:(b.left-S.left+m.left)/T.x,right:(S.right-b.right+m.right)/T.x}}const OD=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}=Bo(e,t)||{};if(c==null)return{};const d=fb(u),f={x:n,y:r},h=md(o),m=pd(h),p=await i.getDimensions(c),v=h==="y",b=v?"top":"left",y=v?"bottom":"right",g=v?"clientHeight":"clientWidth",T=s.reference[m]+s.reference[h]-f[h]-s.floating[m],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[m]);const I=T/2-S/2,A=C/2-p[m]/2-1,O=Pn(d[b],A),L=Pn(d[y],A),D=O,V=C-p[m]-L,k=C/2-p[m]/2+I,_=hd(D,k,V),F=!l.arrow&&jo(o)!=null&&k!==_&&s.reference[m]/2-(k<D?O:L)-p[m]/2<0,N=F?k<D?k-D:k-V:0;return{[h]:f[h]+N,data:{[h]:_,centerOffset:k-_-N,...F&&{alignmentOffset:N}},reset:F}}}),_D=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:m="none",flipAlignment:p=!0,...v}=Bo(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=cr(o),y=Fr(a),g=cr(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(g||!p?[La(a)]:iD(a)),E=m!=="none";!f&&E&&S.push(...lD(a,p,m,T));const C=[a,...S],I=await vd(t,v),A=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&A.push(I[b]),d){const k=sD(o,i,T);A.push(I[k[0]],I[k[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(k=>k<=0)){var L,D;const k=(((L=s.flip)==null?void 0:L.index)||0)+1,_=C[k];if(_)return{data:{index:k,overflows:O},reset:{placement:_}};let F=(D=O.filter(N=>N.overflows[0]<=0).sort((N,R)=>N.overflows[1]-R.overflows[1])[0])==null?void 0:D.placement;if(!F)switch(h){case"bestFit":{var V;const N=(V=O.filter(R=>{if(E){const H=Fr(R.placement);return H===y||H==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(H=>H>0).reduce((H,M)=>H+M,0)]).sort((R,H)=>R[1]-H[1])[0])==null?void 0:V[0];N&&(F=N);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};async function MD(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=cr(n),a=jo(n),l=Fr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=Bo(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const DD=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 MD(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}}}}},ND=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}=Bo(e,t),c={x:n,y:r},u=await vd(t,l),d=Fr(cr(o)),f=db(d);let h=c[f],m=c[d];if(s){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",y=h+u[v],g=h-u[b];h=hd(y,h,g)}if(i){const v=d==="y"?"top":"left",b=d==="y"?"bottom":"right",y=m+u[v],g=m-u[b];m=hd(y,m,g)}const p=a.fn({...t,[f]:h,[d]:m});return{...p,data:{x:p.x-n,y:p.y-r}}}}},LD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=Bo(e,t),l=await vd(t,a),c=cr(n),u=jo(n),d=Fr(n)==="y",{width:f,height:h}=r.floating;let m,p;c==="top"||c==="bottom"?(m=c,p=u===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(p=c,m=u==="end"?"top":"bottom");const v=h-l.top-l.bottom,b=f-l.left-l.right,y=Pn(h-l[m],v),g=Pn(f-l[p],b),T=!t.middlewareData.shift;let S=y,E=g;if(d?E=u||T?Pn(g,b):b:S=u||T?Pn(y,v):v,T&&!u){const I=Zt(l.left,0),A=Zt(l.right,0),O=Zt(l.top,0),L=Zt(l.bottom,0);d?E=f-2*(I!==0||A!==0?I+A:Zt(l.left,l.right)):S=h-2*(O!==0||L!==0?O+L:Zt(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 bb(e){const t=Kt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=yt(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Na(n)!==s||Na(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function bd(e){return Ge(e)?e:e.contextElement}function Wo(e){const t=bd(e);if(!yt(t))return lr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=bb(t);let i=(s?Na(n.width):n.width)/r,a=(s?Na(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const FD=lr(0);function wb(e){const t=Rt(e);return!sd()||!t.visualViewport?FD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function VD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rt(e)?!1:t}function Vr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=bd(e);let i=lr(1);t&&(r?Ge(r)&&(i=Wo(r)):i=Wo(e));const a=VD(s,n,r)?wb(s):lr(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=Rt(s),h=r&&Ge(r)?Rt(r):r;let m=f,p=id(m);for(;p&&r&&h!==m;){const v=Wo(p),b=p.getBoundingClientRect(),y=Kt(p),g=b.left+(p.clientLeft+parseFloat(y.paddingLeft))*v.x,T=b.top+(p.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=g,c+=T,m=Rt(p),p=id(m)}}return Fa({width:u,height:d,x:l,y:c})}function $D(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=zn(r),a=t?Ma(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=lr(1);const u=lr(0),d=yt(r);if((d||!d&&!s)&&((sr(r)!=="body"||si(i))&&(l=Da(r)),yt(r))){const f=Vr(r);c=Wo(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 RD(e){return Array.from(e.getClientRects())}function xb(e){return Vr(zn(e)).left+Da(e).scrollLeft}function BD(e){const t=zn(e),n=Da(e),r=e.ownerDocument.body,o=Zt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Zt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+xb(e);const a=-n.scrollTop;return Kt(r).direction==="rtl"&&(i+=Zt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function jD(e,t){const n=Rt(e),r=zn(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=sd();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function zD(e,t){const n=Vr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=yt(e)?Wo(e):lr(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 Sb(e,t,n){let r;if(t==="viewport")r=jD(e,n);else if(t==="document")r=BD(zn(e));else if(Ge(t))r=zD(t,n);else{const o=wb(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Fa(r)}function Tb(e,t){const n=Wn(e);return n===t||!Ge(n)||ir(n)?!1:Kt(n).position==="fixed"||Tb(n,t)}function WD(e,t){const n=t.get(e);if(n)return n;let r=ar(e,[],!1).filter(a=>Ge(a)&&sr(a)!=="body"),o=null;const s=Kt(e).position==="fixed";let i=s?Wn(e):e;for(;Ge(i)&&!ir(i);){const a=Kt(i),l=od(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||si(i)&&!l&&Tb(e,i))?r=r.filter(u=>u!==i):o=a,i=Wn(i)}return t.set(e,r),r}function HD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Ma(t)?[]:WD(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=Sb(t,u,o);return c.top=Zt(d.top,c.top),c.right=Pn(d.right,c.right),c.bottom=Pn(d.bottom,c.bottom),c.left=Zt(d.left,c.left),c},Sb(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function UD(e){const{width:t,height:n}=bb(e);return{width:t,height:n}}function GD(e,t,n){const r=yt(t),o=zn(t),s=n==="fixed",i=Vr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=lr(0);if(r||!r&&!s)if((sr(t)!=="body"||si(o))&&(a=Da(t)),r){const d=Vr(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=xb(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 wd(e){return Kt(e).position==="static"}function Eb(e,t){return!yt(e)||Kt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Cb(e,t){const n=Rt(e);if(Ma(e))return n;if(!yt(e)){let o=Wn(e);for(;o&&!ir(o);){if(Ge(o)&&!wd(o))return o;o=Wn(o)}return n}let r=Eb(e,t);for(;r&&XM(r)&&wd(r);)r=Eb(r,t);return r&&ir(r)&&wd(r)&&!od(r)?n:r||QM(e)||n}const YD=async function(e){const t=this.getOffsetParent||Cb,n=this.getDimensions,r=await n(e.floating);return{reference:GD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function qD(e){return Kt(e).direction==="rtl"}const KD={convertOffsetParentRelativeRectToViewportRelativeRect:$D,getDocumentElement:zn,getClippingRect:HD,getOffsetParent:Cb,getElementRects:YD,getClientRects:RD,getDimensions:UD,getScale:Wo,isElement:Ge,isRTL:qD};function ZD(e,t){let n=null,r;const o=zn(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=Ro(u),m=Ro(o.clientWidth-(c+d)),p=Ro(o.clientHeight-(u+f)),v=Ro(c),y={rootMargin:-h+"px "+-m+"px "+-p+"px "+-v+"px",threshold:Zt(0,Pn(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 ai(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=bd(e),u=o||s?[...c?ar(c):[],...ar(t)]:[];u.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const d=c&&a?ZD(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 m,p=l?Vr(e):null;l&&v();function v(){const b=Vr(e);p&&(b.x!==p.x||b.y!==p.y||b.width!==p.width||b.height!==p.height)&&n(),p=b,m=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(m)}}const XD=DD,QD=ND,JD=_D,eN=LD,Pb=OD,tN=(e,t,n)=>{const r=new Map,o={platform:KD,...n},s={...o.platform,_c:r};return AD(e,t,{...o,platform:s})};var Ba=typeof document<"u"?w.useLayoutEffect:w.useEffect;function ja(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(!ja(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)&&!ja(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function kb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ib(e,t){const n=kb(e);return Math.round(t*n)/n}function Ab(e){const t=P.useRef(e);return Ba(()=>{t.current=e}),t}function nN(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]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=P.useState(r);ja(f,r)||h(r);const[m,p]=P.useState(null),[v,b]=P.useState(null),y=P.useCallback(N=>{N!==E.current&&(E.current=N,p(N))},[]),g=P.useCallback(N=>{N!==C.current&&(C.current=N,b(N))},[]),T=s||m,S=i||v,E=P.useRef(null),C=P.useRef(null),I=P.useRef(u),A=l!=null,O=Ab(l),L=Ab(o),D=P.useCallback(()=>{if(!E.current||!C.current)return;const N={placement:t,strategy:n,middleware:f};L.current&&(N.platform=L.current),tN(E.current,C.current,N).then(R=>{const H={...R,isPositioned:!0};V.current&&!ja(I.current,H)&&(I.current=H,Ss.flushSync(()=>{d(H)}))})},[f,t,n,L]);Ba(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[c]);const V=P.useRef(!1);Ba(()=>(V.current=!0,()=>{V.current=!1}),[]),Ba(()=>{if(T&&(E.current=T),S&&(C.current=S),T&&S){if(O.current)return O.current(T,S,D);D()}},[T,S,D,O,A]);const k=P.useMemo(()=>({reference:E,floating:C,setReference:y,setFloating:g}),[y,g]),_=P.useMemo(()=>({reference:T,floating:S}),[T,S]),F=P.useMemo(()=>{const N={position:n,left:0,top:0};if(!_.floating)return N;const R=Ib(_.floating,u.x),H=Ib(_.floating,u.y);return a?{...N,transform:"translate("+R+"px, "+H+"px)",...kb(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:H}},[n,a,_.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:D,refs:k,elements:_,floatingStyles:F}),[u,D,k,_,F])}const rN=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?Pb({element:r.current,padding:o}).fn(n):{}:r?Pb({element:r,padding:o}).fn(n):{}}}},li=(e,t)=>({...XD(e),options:[e,t]}),xd=(e,t)=>({...QD(e),options:[e,t]}),Sd=(e,t)=>({...JD(e),options:[e,t]}),Ob=(e,t)=>({...eN(e),options:[e,t]}),_b=(e,t)=>({...rN(e),options:[e,t]});function Td(e){return P.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const Mb={...P},oN=Mb.useInsertionEffect||(e=>e());function wt(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return oN(()=>{t.current=e}),P.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 Ed="ArrowUp",ci="ArrowDown",Ho="ArrowLeft",Uo="ArrowRight";function za(e,t,n){return Math.floor(e/t)!==n}function ui(e,t){return t<0||t>=e.current.length}function Cd(e,t){return Nt(e,{disabledIndices:t})}function Db(e,t){return Nt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Nt(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&&Wa(i,a,o));return a}function sN(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===Ed){if(u&&It(n),c===-1)d=l;else if(d=Nt(e,{startingIndex:d,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||d<0)){const f=c%s,h=l%s,m=l-(h-f);h===f?d=l:d=h>f?m:m-s}ui(e,d)&&(d=c)}if(n.key===ci&&(u&&It(n),c===-1?d=a:(d=Nt(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(d=Nt(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),ui(e,d)&&(d=c)),r==="both"){const f=Ro(c/s);n.key===Uo&&(u&&It(n),c%s!==s-1?(d=Nt(e,{startingIndex:c,disabledIndices:i}),o&&za(d,s,f)&&(d=Nt(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(d=Nt(e,{startingIndex:c-c%s-1,disabledIndices:i})),za(d,s,f)&&(d=c)),n.key===Ho&&(u&&It(n),c%s!==0?(d=Nt(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&za(d,s,f)&&(d=Nt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(d=Nt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),za(d,s,f)&&(d=c));const h=Ro(l/s)===f;ui(e,d)&&(o&&h?d=n.key===Ho?l:Nt(e,{startingIndex:c-c%s-1,disabledIndices:i}):d=c)}return d}function iN(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 aN(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 lN(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Wa(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 Nb=0;function ur(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Nb);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():Nb=requestAnimationFrame(s)}var _e=typeof document<"u"?w.useLayoutEffect:w.useEffect;function cN(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 uN(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 Lb=P.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function dN(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,s]=P.useState(()=>new Map),i=P.useCallback(l=>{s(c=>new Map(c).set(l,null))},[]),a=P.useCallback(l=>{s(c=>{const u=new Map(c);return u.delete(l),u})},[]);return _e(()=>{const l=new Map(o);Array.from(l.keys()).sort(cN).forEach((u,d)=>{l.set(u,d)}),uN(o,l)||s(l)},[o]),P.createElement(Lb.Provider,{value:P.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function Fb(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=P.useContext(Lb),[a,l]=P.useState(null),c=P.useRef(null),u=P.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 _e(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),_e(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),P.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function Go(){return Go=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},Go.apply(this,arguments)}let Vb=!1,fN=0;const $b=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+fN++;function hN(){const[e,t]=P.useState(()=>Vb?$b():void 0);return _e(()=>{e==null&&t($b())},[]),P.useEffect(()=>{Vb=!0},[]),e}const Yo=Mb.useId||hN;let di;process.env.NODE_ENV!=="production"&&(di=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=di)!=null&&e.has(o))){var s;(s=di)==null||s.add(o),console.warn(o)}}function pN(){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=di)!=null&&e.has(o))){var s;(s=di)==null||s.add(o),console.error(o)}}const Rb=P.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,...m}={},...p}=t;process.env.NODE_ENV!=="production"&&(n||Ha("The `ref` prop is required for `FloatingArrow`."));const v=Yo(),[b,y]=P.useState(!1);if(_e(()=>{if(!o)return;Kt(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,I]=r.split("-"),A=!!f,O=C==="top"||C==="bottom",L=u&&I==="end"?"bottom":"top";let D=u&&I==="end"?"right":"left";u&&b&&(D=I==="end"?"left":"right");const V=(s==null?void 0:s.x)!=null?u||s.x:"",k=(s==null?void 0:s.y)!=null?u||s.y:"",_=f||"M0,0"+(" H"+i)+(" L"+(i-S)+","+(a-E))+(" Q"+i/2+","+a+" "+S+","+(a-E))+" Z",F={top:A?"rotate(180deg)":"",left:A?"rotate(90deg)":"rotate(-90deg)",bottom:A?"":"rotate(180deg)",right:A?"rotate(-90deg)":"rotate(90deg)"}[C];return P.createElement("svg",Go({},p,{"aria-hidden":!0,ref:n,width:A?i:i+g,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[D]:V,[L]:k,[C]:O||A?"100%":"calc(100% - "+g/2+"px)",transform:""+F+(h??""),...m}}),g>0&&P.createElement("path",{clipPath:"url(#"+v+")",fill:"none",stroke:d,strokeWidth:g+(f?0:1),d:_}),P.createElement("path",{stroke:g&&!f?p.fill:"none",d:_}),P.createElement("clipPath",{id:v},P.createElement("rect",{x:-T,y:T*(A?-1:1),width:i+g,height:i})))});function Bb(){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 jb=P.createContext(null),zb=P.createContext(null),dr=()=>{var e;return((e=P.useContext(jb))==null?void 0:e.id)||null},fr=()=>P.useContext(zb);function mN(e){const t=Yo(),n=fr(),o=dr();return _e(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function gN(e){const{children:t,id:n}=e,r=dr();return P.createElement(jb.Provider,{value:P.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function yN(e){const{children:t}=e,n=P.useRef([]),r=P.useCallback(i=>{n.current=[...n.current,i]},[]),o=P.useCallback(i=>{n.current=n.current.filter(a=>a!==i)},[]),s=P.useState(()=>Bb())[0];return P.createElement(zb.Provider,{value:P.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function hr(e){return"data-floating-ui-"+e}function At(e){const t=w.useRef(e);return _e(()=>{t.current=e}),t}const Wb=hr("safe-polygon");function Pd(e,t,n){return n&&!$o(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Hb(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=fr(),m=dr(),p=At(c),v=At(l),b=At(n),y=P.useRef(),g=P.useRef(-1),T=P.useRef(),S=P.useRef(-1),E=P.useRef(!0),C=P.useRef(!1),I=P.useRef(()=>{}),A=P.useCallback(()=>{var _;const F=(_=o.current.openEvent)==null?void 0:_.type;return(F==null?void 0:F.includes("mouse"))&&F!=="mousedown"},[o]);P.useEffect(()=>{if(!a)return;function _(F){let{open:N}=F;N||(clearTimeout(g.current),clearTimeout(S.current),E.current=!0)}return s.on("openchange",_),()=>{s.off("openchange",_)}},[a,s]),P.useEffect(()=>{if(!a||!p.current||!n)return;function _(N){A()&&r(!1,N,"hover")}const F=Ct(i.floating).documentElement;return F.addEventListener("mouseleave",_),()=>{F.removeEventListener("mouseleave",_)}},[i.floating,n,r,a,p,A]);const O=P.useCallback(function(_,F,N){F===void 0&&(F=!0),N===void 0&&(N="hover");const R=Pd(v.current,"close",y.current);R&&!T.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,_,N),R)):F&&(clearTimeout(g.current),r(!1,_,N))},[v,r]),L=wt(()=>{I.current(),T.current=void 0}),D=wt(()=>{if(C.current){const _=Ct(i.floating).body;_.style.pointerEvents="",_.removeAttribute(Wb),C.current=!1}});P.useEffect(()=>{if(!a)return;function _(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function F(M){if(clearTimeout(g.current),E.current=!1,u&&!$o(y.current)||d>0&&!Pd(v.current,"open"))return;const B=Pd(v.current,"open",y.current);B?g.current=window.setTimeout(()=>{b.current||r(!0,M,"hover")},B):r(!0,M,"hover")}function N(M){if(_())return;I.current();const B=Ct(i.floating);if(clearTimeout(S.current),p.current&&o.current.floatingContext){n||clearTimeout(g.current),T.current=p.current({...o.current.floatingContext,tree:h,x:M.clientX,y:M.clientY,onClose(){D(),L(),O(M,!0,"safe-polygon")}});const oe=T.current;B.addEventListener("mousemove",oe),I.current=()=>{B.removeEventListener("mousemove",oe)};return}(y.current==="touch"?!ut(i.floating,M.relatedTarget):!0)&&O(M)}function R(M){_()||o.current.floatingContext&&(p.current==null||p.current({...o.current.floatingContext,tree:h,x:M.clientX,y:M.clientY,onClose(){D(),L(),O(M)}})(M))}if(Ge(i.domReference)){var H;const M=i.domReference;return n&&M.addEventListener("mouseleave",R),(H=i.floating)==null||H.addEventListener("mouseleave",R),f&&M.addEventListener("mousemove",F,{once:!0}),M.addEventListener("mouseenter",F),M.addEventListener("mouseleave",N),()=>{var B;n&&M.removeEventListener("mouseleave",R),(B=i.floating)==null||B.removeEventListener("mouseleave",R),f&&M.removeEventListener("mousemove",F),M.removeEventListener("mouseenter",F),M.removeEventListener("mouseleave",N)}}},[i,a,e,u,d,f,O,L,D,r,n,b,h,v,p,o]),_e(()=>{var _;if(a&&n&&(_=p.current)!=null&&_.__options.blockPointerEvents&&A()){const N=Ct(i.floating).body;N.setAttribute(Wb,""),N.style.pointerEvents="none",C.current=!0;const R=i.floating;if(Ge(i.domReference)&&R){var F;const H=i.domReference,M=h==null||(F=h.nodesRef.current.find(B=>B.id===m))==null||(F=F.context)==null?void 0:F.elements.floating;return M&&(M.style.pointerEvents=""),H.style.pointerEvents="auto",R.style.pointerEvents="auto",()=>{H.style.pointerEvents="",R.style.pointerEvents=""}}}},[a,n,m,i,h,p,A]),_e(()=>{n||(y.current=void 0,L(),D())},[n,L,D]),P.useEffect(()=>()=>{L(),clearTimeout(g.current),clearTimeout(S.current),D()},[a,i.domReference,L,D]);const V=P.useMemo(()=>{function _(F){y.current=F.pointerType}return{onPointerDown:_,onPointerEnter:_,onMouseMove(F){const{nativeEvent:N}=F;function R(){!E.current&&!b.current&&r(!0,N,"hover")}u&&!$o(y.current)||n||d===0||(clearTimeout(S.current),y.current==="touch"?R():S.current=window.setTimeout(R,d))}}},[u,r,n,b,d]),k=P.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(_){O(_.nativeEvent,!1)}}),[O]);return P.useMemo(()=>a?{reference:V,floating:k}:{},[a,V,k])}function vN(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 $r(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 bN(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),$r(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let qo=new WeakMap,Ua=new WeakSet,Ga={},kd=0;const wN=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Ub=e=>e&&(e.host||Ub(e.parentNode)),xN=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ub(n);return e.contains(r)?r:null}).filter(n=>n!=null);function SN(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=xN(t,e),a=new Set,l=new Set(i),c=[];Ga[o]||(Ga[o]=new WeakMap);const u=Ga[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,m=>{if(sr(m)!=="script")if(a.has(m))f(m);else{const p=s?m.getAttribute(s):null,v=p!==null&&p!=="false",b=(qo.get(m)||0)+1,y=(u.get(m)||0)+1;qo.set(m,b),u.set(m,y),c.push(m),b===1&&v&&Ua.add(m),y===1&&m.setAttribute(o,""),!v&&s&&m.setAttribute(s,"true")}})}return kd++,()=>{c.forEach(h=>{const m=(qo.get(h)||0)-1,p=(u.get(h)||0)-1;qo.set(h,m),u.set(h,p),m||(!Ua.has(h)&&s&&h.removeAttribute(s),Ua.delete(h)),p||h.removeAttribute(o)}),kd--,kd||(qo=new WeakMap,qo=new WeakMap,Ua=new WeakSet,Ga={})}}function Gb(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Ct(e[0]).body;return SN(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 Yb(e,t){const n=ii(e,Ko());t==="prev"&&n.reverse();const r=n.indexOf(un(Ct(e)));return n.slice(r+1)[0]}function qb(){return Yb(document.body,"next")}function Kb(){return Yb(document.body,"prev")}function fi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ut(n,r)}function TN(e){ii(e,Ko()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function EN(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 CN(e,t,n){const r=e.indexOf(t);function o(i){const a=hr("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||ut(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const Id={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 PN;function Zb(e){e.key==="Tab"&&(e.target,clearTimeout(PN))}const Ya=P.forwardRef(function(t,n){const[r,o]=P.useState();_e(()=>(cd()&&o("button"),document.addEventListener("keydown",Zb),()=>{document.removeEventListener("keydown",Zb)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[hr("focus-guard")]:"",style:Id};return P.createElement("span",Go({},t,s))}),Xb=P.createContext(null),Qb=hr("portal");function kN(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Yo(),o=Jb(),[s,i]=P.useState(null),a=P.useRef(null);return _e(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),_e(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Qb,""),l.appendChild(c),a.current=c,i(c)},[t,r]),_e(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Ge(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(Qb,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function Rr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=kN({id:n,root:r}),[i,a]=P.useState(null),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),f=!!i&&!i.modal&&i.open&&o&&!!(r||s);return P.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function h(m){s&&fi(m)&&(m.type==="focusin"?EN:TN)(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]),P.createElement(Xb.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s])},f&&s&&P.createElement(Ya,{"data-type":"outside",ref:l,onFocus:h=>{if(fi(h,s)){var m;(m=u.current)==null||m.focus()}else{const p=Kb()||(i==null?void 0:i.refs.domReference.current);p==null||p.focus()}}}),f&&s&&P.createElement("span",{"aria-owns":s.id,style:Id}),s&&Ss.createPortal(t,s),f&&s&&P.createElement(Ya,{"data-type":"outside",ref:c,onFocus:h=>{if(fi(h,s)){var m;(m=d.current)==null||m.focus()}else{const p=qb()||(i==null?void 0:i.refs.domReference.current);p==null||p.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,h.nativeEvent))}}}))}const Jb=()=>P.useContext(Xb),e0=20;let Br=[];function Ad(e){Br=Br.filter(n=>n.isConnected);let t=e;if(!(!t||sr(t)==="body")){if(!ID(t,Ko())){const n=ii(t,Ko())[0];n&&(t=n)}Br.push(t),Br.length>e0&&(Br=Br.slice(-e0))}}function t0(){return Br.slice().reverse().find(e=>e.isConnected)}const IN=P.forwardRef(function(t,n){return P.createElement("button",Go({},t,{type:"button",ref:n,tabIndex:-1,style:Id}))});function Zo(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:m,onOpenChange:p,events:v,dataRef:b,floatingId:y,elements:{domReference:g,floating:T}}=t,S=typeof i=="number"&&i<0,E=ub(g)&&S,C=wN()?s:!0,I=At(o),A=At(i),O=At(a),L=fr(),D=Jb(),V=P.useRef(null),k=P.useRef(null),_=P.useRef(!1),F=P.useRef(!1),N=P.useRef(-1),R=D!=null,H=T==null?void 0:T.firstElementChild,M=(H==null?void 0:H.id)===y?H:T,B=wt(function(G){return G===void 0&&(G=M),G?ii(G,Ko()):[]}),K=wt(G=>{const $=B(G);return I.current.map(j=>g&&j==="reference"?g:M&&j==="floating"?M:$).filter(Boolean).flat()});P.useEffect(()=>{if(r||!c)return;function G(j){if(j.key==="Tab"){ut(M,un(Ct(M)))&&B().length===0&&!E&&It(j);const W=K(),Y=Cn(j);I.current[0]==="reference"&&Y===g&&(It(j),j.shiftKey?ur(W[W.length-1]):ur(W[1])),I.current[1]==="floating"&&Y===M&&j.shiftKey&&(It(j),ur(W[0]))}}const $=Ct(M);return $.addEventListener("keydown",G),()=>{$.removeEventListener("keydown",G)}},[r,g,M,c,I,E,B,K]),P.useEffect(()=>{if(r||!T)return;function G($){const j=Cn($),Y=B().indexOf(j);Y!==-1&&(N.current=Y)}return T.addEventListener("focusin",G),()=>{T.removeEventListener("focusin",G)}},[r,T,B]),P.useEffect(()=>{if(r||!d)return;function G(){F.current=!0,setTimeout(()=>{F.current=!1})}function $(j){const W=j.relatedTarget;queueMicrotask(()=>{const Y=!(ut(g,W)||ut(T,W)||ut(W,T)||ut(D==null?void 0:D.portalNode,W)||W!=null&&W.hasAttribute(hr("focus-guard"))||L&&($r(L.nodesRef.current,m).find(Q=>{var fe,U;return ut((fe=Q.context)==null?void 0:fe.elements.floating,W)||ut((U=Q.context)==null?void 0:U.elements.domReference,W)})||vN(L.nodesRef.current,m).find(Q=>{var fe,U;return((fe=Q.context)==null?void 0:fe.elements.floating)===W||((U=Q.context)==null?void 0:U.elements.domReference)===W})));if(l&&Y&&un(Ct(M))===Ct(M).body){yt(M)&&(M==null||M.focus());const Q=N.current,fe=B(),U=fe[Q]||fe[fe.length-1]||M;yt(U)&&U.focus()}(E||!c)&&W&&Y&&!F.current&&W!==t0()&&(_.current=!0,p(!1,j))})}if(T&&yt(g))return g.addEventListener("focusout",$),g.addEventListener("pointerdown",G),T.addEventListener("focusout",$),()=>{g.removeEventListener("focusout",$),g.removeEventListener("pointerdown",G),T.removeEventListener("focusout",$)}},[r,g,T,M,c,m,L,D,p,d,l,B,E]),P.useEffect(()=>{var G;if(r)return;const $=Array.from((D==null||(G=D.portalNode)==null?void 0:G.querySelectorAll("["+hr("portal")+"]"))||[]);if(T){const j=[T,...$,V.current,k.current,I.current.includes("reference")||E?g:null].filter(Y=>Y!=null),W=c||E?Gb(j,C,!C):Gb(j);return()=>{W()}}},[r,g,T,c,I,D,E,C]),_e(()=>{if(r||!yt(M))return;const G=Ct(M),$=un(G);queueMicrotask(()=>{const j=K(M),W=A.current,Y=(typeof W=="number"?j[W]:W.current)||M,Q=ut(M,$);!S&&!Q&&f&&ur(Y,{preventScroll:Y===M})})},[r,f,M,S,K,A]),_e(()=>{if(r||!M)return;let G=!1;const $=Ct(M),j=un($);let Y=b.current.openEvent;const Q=h.domReference.current;Ad(j);function fe(U){let{open:Ae,reason:Ke,event:Be,nested:Ce}=U;Ae&&(Y=Be),Ke==="escape-key"&&h.domReference.current&&Ad(h.domReference.current),Ke==="hover"&&Be.type==="mouseleave"&&(_.current=!0),Ke==="outside-press"&&(Ce?(_.current=!1,G=!0):_.current=!(lb(Be)||ld(Be)))}return v.on("openchange",fe),()=>{v.off("openchange",fe);const U=un($),Ae=ut(T,U)||L&&$r(L.nodesRef.current,m).some(q=>{var ie;return ut((ie=q.context)==null?void 0:ie.elements.floating,U)});(Ae||Y&&["click","mousedown"].includes(Y.type))&&h.domReference.current&&Ad(h.domReference.current);const Be=Q||j,Ce=ii(Ct(Be).body,Ko());queueMicrotask(()=>{let q=t0();!q&&yt(Be)&&T&&(q=CN(Ce,Be,T)),O.current&&!_.current&&yt(q)&&(!(q!==U&&U!==$.body)||Ae)&&q.focus({preventScroll:G})})}},[r,T,M,O,b,h,v,L,m]),_e(()=>{if(!r&&D)return D.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:p,refs:h}),()=>{D.setFocusManagerState(null)}},[r,D,c,f,p,h,d]),_e(()=>{if(r||!M||typeof MutationObserver!="function"||S)return;const G=()=>{const j=M.getAttribute("tabindex"),W=B(),Y=un(Ct(T)),Q=W.indexOf(Y);Q!==-1&&(N.current=Q),I.current.includes("floating")||Y!==h.domReference.current&&W.length===0?j!=="0"&&M.setAttribute("tabindex","0"):j!=="-1"&&M.setAttribute("tabindex","-1")};G();const $=new MutationObserver(G);return $.observe(M,{childList:!0,subtree:!0,attributes:!0}),()=>{$.disconnect()}},[r,T,M,h,I,B,S]);function oe(G){return r||!u||!c?null:P.createElement(IN,{ref:G==="start"?V:k,onClick:$=>p(!1,$.nativeEvent)},typeof u=="string"?u:"Dismiss")}const te=!r&&C&&(c?!E:!0)&&(R||c);return P.createElement(P.Fragment,null,te&&P.createElement(Ya,{"data-type":"inside",ref:D==null?void 0:D.beforeInsideRef,onFocus:G=>{if(c){const j=K();ur(o[0]==="reference"?j[0]:j[j.length-1])}else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(_.current=!1,fi(G,D.portalNode)){const j=qb()||g;j==null||j.focus()}else{var $;($=D.beforeOutsideRef.current)==null||$.focus()}}}),!E&&oe("start"),n,oe("end"),te&&P.createElement(Ya,{"data-type":"inside",ref:D==null?void 0:D.afterInsideRef,onFocus:G=>{if(c)ur(K()[0]);else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(d&&(_.current=!0),fi(G,D.portalNode)){const j=Kb()||g;j==null||j.focus()}else{var $;($=D.afterOutsideRef.current)==null||$.focus()}}}))}const Od=new Set,AN=P.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=Yo();return _e(()=>{if(!r)return;Od.add(s);const i=/iP(hone|ad|od)|iOS/.test(ad()),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,m;const p=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,v=((m=window.visualViewport)==null?void 0:m.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(v))+"px",left:-(d-Math.floor(p))+"px",right:"0"})}return()=>{Od.delete(s),Od.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[s,r]),P.createElement("div",Go({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function n0(e){return yt(e.target)&&e.target.tagName==="BUTTON"}function r0(e){return fd(e)}function hi(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=P.useRef(),f=P.useRef(!1),h=P.useMemo(()=>({onPointerDown(m){d.current=m.pointerType},onMouseDown(m){const p=d.current;m.button===0&&a!=="click"&&($o(p,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){const p=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}$o(p,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){d.current=void 0,!(m.defaultPrevented||!u||n0(m))&&(m.key===" "&&!r0(s)&&(m.preventDefault(),f.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||n0(m)||r0(s)||m.key===" "&&f.current&&(f.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return P.useMemo(()=>i?{reference:h}:{},[i,h])}function ON(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 o0(e){return e!=null&&e.clientX!=null}function _N(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=P.useRef(!1),f=P.useRef(null),[h,m]=P.useState(),[p,v]=P.useState([]),b=wt((E,C)=>{d.current||r.current.openEvent&&!o0(r.current.openEvent)||i.setPositionReference(ON(s,{x:E,y:C,axis:l,dataRef:r,pointerType:h}))}),y=wt(E=>{c!=null||u!=null||(n?f.current||v([]):b(E.clientX,E.clientY))}),g=$o(h)?o:n,T=P.useCallback(()=>{if(!g||!a||c!=null||u!=null)return;const E=Rt(o);function C(I){const A=Cn(I);ut(o,A)?(E.removeEventListener("mousemove",C),f.current=null):b(I.clientX,I.clientY)}if(!r.current.openEvent||o0(r.current.openEvent)){E.addEventListener("mousemove",C);const I=()=>{E.removeEventListener("mousemove",C),f.current=null};return f.current=I,I}i.setPositionReference(s)},[g,a,c,u,o,r,i,s,b]);P.useEffect(()=>T(),[T,p]),P.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),P.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),_e(()=>{a&&(c!=null||u!=null)&&(d.current=!1,b(c,u))},[a,c,u,b]);const S=P.useMemo(()=>{function E(C){let{pointerType:I}=C;m(I)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:y,onMouseEnter:y}},[y]);return P.useMemo(()=>a?{reference:S}:{},[a,S])}const MN={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},DN={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},s0=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 jr(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:m}=t,p=fr(),v=wt(typeof l=="function"?l:()=>!1),b=typeof l=="function"?v:l,y=P.useRef(!1),g=P.useRef(!1),{escapeKey:T,outsidePress:S}=s0(h),{escapeKey:E,outsidePress:C}=s0(m),I=wt(k=>{var _;if(!n||!i||!a||k.key!=="Escape")return;const F=(_=s.current.floatingContext)==null?void 0:_.nodeId,N=p?$r(p.nodesRef.current,F):[];if(!T&&(k.stopPropagation(),N.length>0)){let R=!0;if(N.forEach(H=>{var M;if((M=H.context)!=null&&M.open&&!H.context.dataRef.current.__escapeKeyBubbles){R=!1;return}}),!R)return}r(!1,eD(k)?k.nativeEvent:k,"escape-key")}),A=wt(k=>{var _;const F=()=>{var N;I(k),(N=Cn(k))==null||N.removeEventListener("keydown",F)};(_=Cn(k))==null||_.addEventListener("keydown",F)}),O=wt(k=>{var _;const F=y.current;y.current=!1;const N=g.current;if(g.current=!1,c==="click"&&N||F||typeof b=="function"&&!b(k))return;const R=Cn(k),H="["+hr("inert")+"]",M=Ct(o.floating).querySelectorAll(H);let B=Ge(R)?R:null;for(;B&&!ir(B);){const G=Wn(B);if(ir(G)||!Ge(G))break;B=G}if(M.length&&Ge(R)&&!tD(R)&&!ut(R,o.floating)&&Array.from(M).every(G=>!ut(B,G)))return;if(yt(R)&&V){const G=R.clientWidth>0&&R.scrollWidth>R.clientWidth,$=R.clientHeight>0&&R.scrollHeight>R.clientHeight;let j=$&&k.offsetX>R.clientWidth;if($&&Kt(R).direction==="rtl"&&(j=k.offsetX<=R.offsetWidth-R.clientWidth),j||G&&k.offsetY>R.clientHeight)return}const K=(_=s.current.floatingContext)==null?void 0:_.nodeId,oe=p&&$r(p.nodesRef.current,K).some(G=>{var $;return dd(k,($=G.context)==null?void 0:$.elements.floating)});if(dd(k,o.floating)||dd(k,o.domReference)||oe)return;const te=p?$r(p.nodesRef.current,K):[];if(te.length>0){let G=!0;if(te.forEach($=>{var j;if((j=$.context)!=null&&j.open&&!$.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,k,"outside-press")}),L=wt(k=>{var _;const F=()=>{var N;O(k),(N=Cn(k))==null||N.removeEventListener(c,F)};(_=Cn(k))==null||_.addEventListener(c,F)});P.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=T,s.current.__outsidePressBubbles=S;function k(N){r(!1,N,"ancestor-scroll")}const _=Ct(o.floating);a&&_.addEventListener("keydown",E?A:I,E),b&&_.addEventListener(c,C?L:O,C);let F=[];return f&&(Ge(o.domReference)&&(F=ar(o.domReference)),Ge(o.floating)&&(F=F.concat(ar(o.floating))),!Ge(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(ar(o.reference.contextElement)))),F=F.filter(N=>{var R;return N!==((R=_.defaultView)==null?void 0:R.visualViewport)}),F.forEach(N=>{N.addEventListener("scroll",k,{passive:!0})}),()=>{a&&_.removeEventListener("keydown",E?A:I,E),b&&_.removeEventListener(c,C?L:O,C),F.forEach(N=>{N.removeEventListener("scroll",k)})}},[s,o,a,b,c,n,r,f,i,T,S,I,E,A,O,C,L]),P.useEffect(()=>{y.current=!1},[b,c]);const D=P.useMemo(()=>({onKeyDown:I,[MN[d]]:k=>{u&&r(!1,k.nativeEvent,"reference-press")}}),[I,r,u,d]),V=P.useMemo(()=>({onKeyDown:I,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[DN[c]]:()=>{y.current=!0}}),[I,c]);return P.useMemo(()=>i?{reference:D,floating:V}:{},[i,D,V])}function NN(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Yo(),s=P.useRef({}),[i]=P.useState(()=>Bb()),a=dr()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!Ge(h)&&pN("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]=P.useState(r.reference),u=wt((h,m,p)=>{s.current.openEvent=h?m:void 0,i.emit("openchange",{open:h,event:m,reason:p,nested:a}),n==null||n(h,m,p)}),d=P.useMemo(()=>({setPositionReference:c}),[]),f=P.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return P.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[t,u,f,i,o,d])}function zr(e){e===void 0&&(e={});const{nodeId:t}=e,n=NN({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=P.useState(null),[a,l]=P.useState(null),u=(o==null?void 0:o.reference)||s,d=P.useRef(null),f=fr();_e(()=>{u&&(d.current=u)},[u]);const h=nN({...e,elements:{...o,...a&&{reference:a}}}),m=P.useCallback(g=>{const T=Ge(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(T),h.refs.setReference(T)},[h.refs]),p=P.useCallback(g=>{(Ge(g)||g===null)&&(d.current=g,i(g)),(Ge(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!Ge(g))&&h.refs.setReference(g)},[h.refs]),v=P.useMemo(()=>({...h.refs,setReference:p,setPositionReference:m,domReference:d}),[h.refs,p,m]),b=P.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),y=P.useMemo(()=>({...h,...r,refs:v,elements:b,nodeId:t}),[h,v,b,t,r]);return _e(()=>{r.dataRef.current.floatingContext=y;const g=f==null?void 0:f.nodesRef.current.find(T=>T.id===t);g&&(g.context=y)}),P.useMemo(()=>({...h,context:y,refs:v,elements:b}),[h,v,b,y])}function LN(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=P.useRef(!1),u=P.useRef(),d=P.useRef(!0);P.useEffect(()=>{if(!a)return;const h=Rt(i.domReference);function m(){!n&&yt(i.domReference)&&i.domReference===un(Ct(i.domReference))&&(c.current=!0)}function p(){d.current=!0}return h.addEventListener("blur",m),h.addEventListener("keydown",p,!0),()=>{h.removeEventListener("blur",m),h.removeEventListener("keydown",p,!0)}},[i.domReference,n,a]),P.useEffect(()=>{if(!a)return;function h(m){let{reason:p}=m;(p==="reference-press"||p==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,a]),P.useEffect(()=>()=>{clearTimeout(u.current)},[]);const f=P.useMemo(()=>({onPointerDown(h){ld(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const m=Cn(h.nativeEvent);if(l&&Ge(m))try{if(cd()&&cb())throw Error();if(!m.matches(":focus-visible"))return}catch{if(!d.current&&!fd(m))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const m=h.relatedTarget,p=h.nativeEvent,v=Ge(m)&&m.hasAttribute(hr("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var b;const y=un(i.domReference?i.domReference.ownerDocument:document);!m&&y===i.domReference||ut((b=s.current.floatingContext)==null?void 0:b.refs.floating.current,y)||ut(i.domReference,y)||v||r(!1,p,"focus")})}}),[s,i.domReference,r,l]);return P.useMemo(()=>a?{reference:f}:{},[a,f])}const i0="active",a0="selected";function _d(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[i0]:i,[a0]: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&&[i0,a0].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,m=new Array(h),p=0;p<h;p++)m[p]=arguments[p];return(f=r.get(c))==null?void 0:f.map(v=>v(...m)).find(v=>v!==void 0)}}}else i[c]=u}),i),{})}}function Wr(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=P.useCallback(a=>_d(a,e,"reference"),t),s=P.useCallback(a=>_d(a,e,"floating"),n),i=P.useCallback(a=>_d(a,e,"item"),r);return P.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let l0=!1;function qa(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function c0(e,t){return qa(t,e===Ed||e===ci,e===Ho||e===Uo)}function Md(e,t,n){return qa(t,e===ci,n?e===Ho:e===Uo)||e==="Enter"||e===" "||e===""}function FN(e,t,n){return qa(t,n?e===Ho:e===Uo,e===ci)}function u0(e,t,n){return qa(t,n?e===Uo:e===Ho,e===Ed)}function Dd(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:m=!1,focusItemOnOpen:p="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:I=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||Ha("`useListNavigation` looping must be enabled to allow escaping."),m||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 A=dr(),O=fr(),L=wt(a),D=P.useRef(p),V=P.useRef(c??-1),k=P.useRef(null),_=P.useRef(!0),F=P.useRef(L),N=P.useRef(!!o.floating),R=P.useRef(n),H=P.useRef(!1),M=P.useRef(!1),B=At(y),K=At(n),oe=At(S),te=At(o.floating),G=At(c),[$,j]=P.useState(),[W,Y]=P.useState(),Q=wt(function(q,ie,z){z===void 0&&(z=!1);function ee(ue){m?(j(ue.id),O==null||O.events.emit("virtualfocus",ue),E&&(E.current=ue)):ur(ue,{preventScroll:!0,sync:cb()&&cd()?l0||H.current:!1})}const ye=q.current[ie.current];ye&&ee(ye),requestAnimationFrame(()=>{const ue=q.current[ie.current]||ye;if(!ue)return;ye||ee(ue);const je=oe.current;je&&U&&(z||!_.current)&&(ue.scrollIntoView==null||ue.scrollIntoView(typeof je=="boolean"?{block:"nearest",inline:"nearest"}:je))})});_e(()=>{document.createElement("div").focus({get preventScroll(){return l0=!0,!1}})},[]),_e(()=>{l&&(n&&o.floating?D.current&&c!=null&&(M.current=!0,V.current=c,L(c)):N.current&&(V.current=-1,F.current(null)))},[l,n,o.floating,c,L]),_e(()=>{if(l&&n&&o.floating)if(i==null){if(H.current=!1,G.current!=null)return;if(N.current&&(V.current=-1,Q(s,V)),(!R.current||!N.current)&&D.current&&(k.current!=null||D.current===!0&&k.current==null)){let q=0;const ie=()=>{s.current[0]==null?(q<2&&(q?requestAnimationFrame:queueMicrotask)(ie),q++):(V.current=k.current==null||Md(k.current,g,h)||f?Cd(s,B.current):Db(s,B.current),k.current=null,L(V.current))};ie()}}else ui(s,i)||(V.current=i,Q(s,V,M.current),M.current=!1)},[l,n,o.floating,i,G,f,s,g,h,L,Q,B]),_e(()=>{var q;if(!l||o.floating||!O||m||!N.current)return;const ie=O.nodesRef.current,z=(q=ie.find(ue=>ue.id===A))==null||(q=q.context)==null?void 0:q.elements.floating,ee=un(Ct(o.floating)),ye=ie.some(ue=>ue.context&&ut(ue.context.elements.floating,ee));z&&!ye&&_.current&&z.focus({preventScroll:!0})},[l,o.floating,O,A,m]),_e(()=>{if(!l||!O||!m||A)return;function q(ie){Y(ie.id),E&&(E.current=ie)}return O.events.on("virtualfocus",q),()=>{O.events.off("virtualfocus",q)}},[l,O,m,A,E]),_e(()=>{F.current=L,N.current=!!o.floating}),_e(()=>{n||(k.current=null)},[n]),_e(()=>{R.current=n},[n]);const fe=i!=null,U=P.useMemo(()=>{function q(z){if(!n)return;const ee=s.current.indexOf(z);ee!==-1&&L(ee)}return{onFocus(z){let{currentTarget:ee}=z;q(ee)},onClick:z=>{let{currentTarget:ee}=z;return ee.focus({preventScroll:!0})},...v&&{onMouseMove(z){let{currentTarget:ee}=z;q(ee)},onPointerLeave(z){let{pointerType:ee}=z;!_.current||ee==="touch"||(V.current=-1,Q(s,V),L(null),m||ur(te.current,{preventScroll:!0}))}}}},[n,te,Q,v,s,L,m]),Ae=wt(q=>{if(_.current=!1,H.current=!0,!K.current&&q.currentTarget===te.current)return;if(f&&u0(q.key,g,h)){It(q),r(!1,q.nativeEvent,"list-navigation"),yt(o.domReference)&&!m&&o.domReference.focus();return}const ie=V.current,z=Cd(s,y),ee=Db(s,y);if(q.key==="Home"&&(It(q),V.current=z,L(V.current)),q.key==="End"&&(It(q),V.current=ee,L(V.current)),T>1){const ye=C||Array.from({length:s.current.length},()=>({width:1,height:1})),ue=iN(ye,T,I),je=ue.findIndex(le=>le!=null&&!Wa(s.current,le,y)),ne=ue.reduce((le,Ne,tt)=>Ne!=null&&!Wa(s.current,Ne,y)?tt:le,-1);if(V.current=ue[sN({current:ue.map(le=>le!=null?s.current[le]:null)},{event:q,orientation:g,loop:d,cols:T,disabledIndices:lN([...y||s.current.map((le,Ne)=>Wa(s.current,Ne)?Ne:void 0),void 0],ue),minIndex:je,maxIndex:ne,prevIndex:aN(V.current>ee?z:V.current,ye,ue,T,q.key===ci?"bl":q.key===Uo?"tr":"tl"),stopEvent:!0})],L(V.current),g==="both")return}if(c0(q.key,g)){if(It(q),n&&!m&&un(q.currentTarget.ownerDocument)===q.currentTarget){V.current=Md(q.key,g,h)?z:ee,L(V.current);return}Md(q.key,g,h)?d?V.current=ie>=ee?u&&ie!==s.current.length?-1:z:Nt(s,{startingIndex:ie,disabledIndices:y}):V.current=Math.min(ee,Nt(s,{startingIndex:ie,disabledIndices:y})):d?V.current=ie<=z?u&&ie!==-1?s.current.length:ee:Nt(s,{startingIndex:ie,decrement:!0,disabledIndices:y}):V.current=Math.max(z,Nt(s,{startingIndex:ie,decrement:!0,disabledIndices:y})),ui(s,V.current)?L(null):L(V.current)}}),Ke=P.useMemo(()=>m&&n&&fe&&{"aria-activedescendant":W||$},[m,n,fe,W,$]),Be=P.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!ub(o.domReference)&&Ke,onKeyDown:Ae,onPointerMove(){_.current=!0}}),[Ke,Ae,o.domReference,g]),Ce=P.useMemo(()=>{function q(z){p==="auto"&&lb(z.nativeEvent)&&(D.current=!0)}function ie(z){D.current=p,p==="auto"&&ld(z.nativeEvent)&&(D.current=!0)}return{...Ke,onKeyDown(z){_.current=!1;const ee=z.key.indexOf("Arrow")===0,ye=FN(z.key,g,h),ue=u0(z.key,g,h),je=c0(z.key,g),ne=(f?ye:je)||z.key==="Enter"||z.key.trim()==="";if(m&&n){const Ot=O==null?void 0:O.nodesRef.current.find(zt=>zt.parentId==null),Vt=O&&Ot?bN(O.nodesRef.current,Ot.id):null;if(ee&&Vt&&E){const zt=new KeyboardEvent("keydown",{key:z.key,bubbles:!0});if(ye||ue){var le,Ne;const ro=((le=Vt.context)==null?void 0:le.elements.domReference)===z.currentTarget,bs=ue&&!ro?(Ne=Vt.context)==null?void 0:Ne.elements.domReference:ye?s.current.find(ws=>(ws==null?void 0:ws.id)===$):null;bs&&(It(z),bs.dispatchEvent(zt),Y(void 0))}if(je&&Vt.context&&Vt.context.open&&Vt.parentId&&z.currentTarget!==Vt.context.elements.domReference){var tt;It(z),(tt=Vt.context.elements.domReference)==null||tt.dispatchEvent(zt);return}}return Ae(z)}if(!(!n&&!b&&ee)){if(ne&&(k.current=f&&je?null:z.key),f){ye&&(It(z),n?(V.current=Cd(s,B.current),L(V.current)):r(!0,z.nativeEvent,"list-navigation"));return}je&&(c!=null&&(V.current=c),It(z),!n&&b?r(!0,z.nativeEvent,"list-navigation"):Ae(z),n&&L(V.current))}},onFocus(){n&&!m&&L(null)},onPointerDown:ie,onMouseDown:q,onClick:q}},[$,Ke,Ae,B,p,s,f,L,r,n,b,g,h,c,O,m,E]);return P.useMemo(()=>l?{reference:Ce,floating:Be,item:U}:{},[l,Ce,Be,U])}const VN=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Hr(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=VN.get(i))!=null?n:i,l=Yo(),u=dr()!=null,d=P.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=P.useMemo(()=>{const m={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?m:{...m,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),h=P.useCallback(m=>{let{active:p,selected:v}=m;const b={role:"option",...p&&{id:o+"-option"}};switch(i){case"select":return{...b,"aria-selected":p&&v};case"combobox":return{...b,...p&&{"aria-selected":!0}}}return{}},[o,i]);return P.useMemo(()=>s?{reference:d,floating:f,item:h}:{},[s,d,f,h])}const d0=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Xo(e,t){return typeof e=="function"?e(t):e}function $N(e,t){const[n,r]=P.useState(e);return e&&!n&&r(!0),P.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function RN(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]=P.useState("unmounted"),c=$N(n,i);return!c&&a==="close"&&l("unmounted"),_e(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function f0(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=P.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",d=(u?i:i.open)||0,f=(u?i:i.close)||0,[h,m]=P.useState(()=>({...Xo(s,c),...Xo(n,c)})),{isMounted:p,status:v}=RN(e,{duration:i}),b=At(n),y=At(r),g=At(o),T=At(s);return _e(()=>{const S=Xo(b.current,c),E=Xo(g.current,c),C=Xo(T.current,c),I=Xo(y.current,c)||Object.keys(S).reduce((A,O)=>(A[O]="",A),{});if(v==="initial"&&m(A=>({transitionProperty:A.transitionProperty,...C,...S})),v==="open"&&m({transitionProperty:Object.keys(I).map(d0).join(","),transitionDuration:d+"ms",...C,...I}),v==="close"){const A=E||S;m({transitionProperty:Object.keys(A).map(d0).join(","),transitionDuration:f+"ms",...C,...A})}},[f,g,b,y,T,d,v,c]),{isMounted:p,styles:h}}function BN(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,m=P.useRef(),p=P.useRef(""),v=P.useRef((n=h??i)!=null?n:-1),b=P.useRef(null),y=wt(a),g=wt(l),T=At(u),S=At(f);_e(()=>{r&&(clearTimeout(m.current),b.current=null,p.current="")},[r]),_e(()=>{if(r&&p.current===""){var O;v.current=(O=h??i)!=null?O:-1}},[r,h,i]);const E=wt(O=>{O?o.current.typing||(o.current.typing=O,g(O)):o.current.typing&&(o.current.typing=O,g(O))}),C=wt(O=>{function L(F,N,R){const H=T.current?T.current(N,R):N.find(M=>(M==null?void 0:M.toLocaleLowerCase().indexOf(R.toLocaleLowerCase()))===0);return H?F.indexOf(H):-1}const D=s.current;if(p.current.length>0&&p.current[0]!==" "&&(L(D,D,p.current)===-1?E(!1):O.key===" "&&It(O)),D==null||S.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(It(O),E(!0)),D.every(F=>{var N,R;return F?((N=F[0])==null?void 0:N.toLocaleLowerCase())!==((R=F[1])==null?void 0:R.toLocaleLowerCase()):!0})&&p.current===O.key&&(p.current="",v.current=b.current),p.current+=O.key,clearTimeout(m.current),m.current=setTimeout(()=>{p.current="",v.current=b.current,E(!1)},d);const k=v.current,_=L(D,[...D.slice((k||0)+1),...D.slice(0,(k||0)+1)],p.current);_!==-1?(y(_),b.current=_):O.key!==" "&&(p.current="",E(!1))}),I=P.useMemo(()=>({onKeyDown:C}),[C]),A=P.useMemo(()=>({onKeyDown:C,onKeyUp(O){O.key===" "&&E(!1)}}),[C,E]);return P.useMemo(()=>c?{reference:I,floating:A}:{},[c,I,A])}function h0(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 jN(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function p0(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(),m=h-l;if(i===null||a===null||m===0)return i=d,a=f,l=h,null;const p=d-i,v=f-a,y=Math.sqrt(p*p+v*v)/m;return i=d,a=f,l=h,y}const u=d=>{let{x:f,y:h,placement:m,elements:p,onClose:v,nodeId:b,tree:y}=d;return function(T){function S(){clearTimeout(o),v()}if(clearTimeout(o),!p.domReference||!p.floating||m==null||f==null||h==null)return;const{clientX:E,clientY:C}=T,I=[E,C],A=Cn(T),O=T.type==="mouseleave",L=ut(p.floating,A),D=ut(p.domReference,A),V=p.domReference.getBoundingClientRect(),k=p.floating.getBoundingClientRect(),_=m.split("-")[0],F=f>k.right-k.width/2,N=h>k.bottom-k.height/2,R=jN(I,V),H=k.width>V.width,M=k.height>V.height,B=(H?V:k).left,K=(H?V:k).right,oe=(M?V:k).top,te=(M?V:k).bottom;if(L&&(s=!0,!O))return;if(D&&(s=!1),D&&!O){s=!0;return}if(O&&Ge(T.relatedTarget)&&ut(p.floating,T.relatedTarget)||y&&$r(y.nodesRef.current,b).some(j=>{let{context:W}=j;return W==null?void 0:W.open}))return;if(_==="top"&&h>=V.bottom-1||_==="bottom"&&h<=V.top+1||_==="left"&&f>=V.right-1||_==="right"&&f<=V.left+1)return S();let G=[];switch(_){case"top":G=[[B,V.top+1],[B,k.bottom-1],[K,k.bottom-1],[K,V.top+1]];break;case"bottom":G=[[B,k.top+1],[B,V.bottom-1],[K,V.bottom-1],[K,k.top+1]];break;case"left":G=[[k.right-1,te],[k.right-1,oe],[V.left+1,oe],[V.left+1,te]];break;case"right":G=[[V.right-1,te],[V.right-1,oe],[k.left+1,oe],[k.left+1,te]];break}function $(j){let[W,Y]=j;switch(_){case"top":{const Q=[H?W+t/2:F?W+t*4:W-t*4,Y+t+1],fe=[H?W-t/2:F?W+t*4:W-t*4,Y+t+1],U=[[k.left,F||H?k.bottom-t:k.top],[k.right,F?H?k.bottom-t:k.top:k.bottom-t]];return[Q,fe,...U]}case"bottom":{const Q=[H?W+t/2:F?W+t*4:W-t*4,Y-t],fe=[H?W-t/2:F?W+t*4:W-t*4,Y-t],U=[[k.left,F||H?k.top+t:k.bottom],[k.right,F?H?k.top+t:k.bottom:k.top+t]];return[Q,fe,...U]}case"left":{const Q=[W+t+1,M?Y+t/2:N?Y+t*4:Y-t*4],fe=[W+t+1,M?Y-t/2:N?Y+t*4:Y-t*4];return[...[[N||M?k.right-t:k.left,k.top],[N?M?k.right-t:k.left:k.right-t,k.bottom]],Q,fe]}case"right":{const Q=[W-t,M?Y+t/2:N?Y+t*4:Y-t*4],fe=[W-t,M?Y-t/2:N?Y+t*4:Y-t*4],U=[[N||M?k.left+t:k.right,k.top],[N?M?k.left+t:k.right:k.left+t,k.bottom]];return[Q,fe,...U]}}}if(!h0([E,C],G)){if(s&&!R)return S();if(!O&&r){const j=c(T.clientX,T.clientY);if(j!==null&&j<.1)return S()}h0([E,C],$([f,h]))?!s&&r&&(o=window.setTimeout(S,40)):S()}}};return u.__options={blockPointerEvents:n},u}const Qo=e=>{const t=w.useId(),[n,r]=w.useState(e.open),o=w.useRef(null),s=w.useMemo(()=>[li(10),Sd({fallbackAxisSideDirection:"end"}),xd(),_b({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=zr({open:n,middleware:s,transform:!0,whileElementsMounted:ai,onOpenChange:(m,p)=>{var b;const v=p==null?void 0:p.relatedTarget;v&&v.dataset.floating==="true"&&!m||(r(m),(b=e.onChange)==null||b.call(e,m))}}),c=hi(l),u=jr(l),d=Hr(l),{getReferenceProps:f,getFloatingProps:h}=Wr([c,u,d]);return x.jsxs(w.Fragment,{children:[x.jsx("button",{ref:i.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(Rr,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(Zo,{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:i.setFloating,style:a,"aria-labelledby":t,...h(),children:[x.jsx(Rb,{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]})})})]})},zN=e=>{const t=w.useRef(null),n=w.useId(),r=`${n}:wrapper`,o=`${n}:title`,[s,i]=w.useState(!1),{context:a,refs:l}=zr({transform:!0,open:s!==null,nodeId:n,onOpenChange:i,strategy:"absolute"}),c=hi(a),u=Hr(a),d=jr(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:h}=Wr([c,u,d]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(go,{...h(e),as:lt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>i(!0),children:x.jsx(lt.span,{layoutId:o,children:e.trigger})}),x.jsx(er,{children:s?x.jsx(Rr,{root:t,children:x.jsx(Zo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:x.jsx(lt.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},m0=300,WN=500,g0=(e="")=>De("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),Nd=w.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),y0=w.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o,floatingClassName:s="",label:i,...a},l)=>{const[c,u]=w.useState(r??!1),[d,f]=w.useState(!1),[h,m]=w.useState(null),p=w.useRef([]),v=w.useRef([]),b=w.useContext(Nd),y=dr(),g=fr(),T=mN(),S=Fb(),E=y!==null,{floatingStyles:C,refs:I,context:A}=zr({nodeId:T,open:c,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:ai,placement:E?"right":"bottom-start",middleware:[li({mainAxis:E?0:4,alignmentAxis:E?-4:0}),Sd(),xd()]}),O=Hr(A,{role:"menu",enabled:!0}),L=jr(A,{bubbles:!0}),D=Hb(A,{move:!1,enabled:n,delay:{open:m0},handleClose:p0({blockPointerEvents:!0})}),V=hi(A,{event:"mousedown",toggle:!E,ignoreMouse:E,keyboardHandlers:!0}),k=Dd(A,{loop:!0,listRef:p,activeIndex:h,nested:E,onNavigate:m}),_=BN(A,{activeIndex:h,listRef:v,resetMs:WN,onMatch:c?m:void 0}),{getReferenceProps:F,getFloatingProps:N,getItemProps:R}=Wr([D,V,O,L,k,_]);w.useEffect(()=>{if(!g)return;function M(){u(!1)}function B(K){K.nodeId!==T&&K.parentId===y&&u(!1)}return g.events.on("click",M),g.events.on("menuopen",B),()=>{g.events.off("click",M),g.events.off("menuopen",B)}},[g,T,y]),w.useEffect(()=>{c&&g&&g.events.emit("menuopen",{parentId:y,nodeId:T})},[g,c,T,y]);const H=o?a.className:De(g0(a.className));return x.jsxs(gN,{id:T,children:[x.jsx(w.Fragment,{children:a.asChild?x.jsx(Vo,{...F(b.getItemProps({...a,onFocus(M){var B;(B=a.onFocus)==null||B.call(a,M),f(!1),b.setHasFocusInside(!0)}})),children:i,ref:Td([I.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}):x.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:Td([I.setReference,S.ref,l]),tabIndex:E?b.activeIndex===S.index?0:-1:void 0,...F(b.getItemProps({...a,onFocus(M){var B;(B=a.onFocus)==null||B.call(a,M),f(!1),b.setHasFocusInside(!0)}})),children:[i,E&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(Cu,{size:14})]})]})}),x.jsx(Nd.Provider,{value:{activeIndex:h,setActiveIndex:m,getItemProps:R,setHasFocusInside:f,isOpen:c},children:x.jsx(dN,{elementsRef:p,labelsRef:v,children:c&&x.jsx(Rr,{preserveTabOrder:!0,children:x.jsx(Zo,{context:A,modal:!1,initialFocus:E?-1:0,returnFocus:!E,children:x.jsx(t,{...N(),ref:I.setFloating,style:{...a.style,...C},className:De("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})})})})})]})}),HN=w.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},s)=>{const i=w.useContext(Nd),a=Fb({label:n?null:e}),l=fr(),c=a.index===i.activeIndex;return x.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":i.isOpen,tabIndex:c?0:-1,ref:Td([a.ref,s]),className:g0(`${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?x.jsx(t,{size:16}):null]})}),UN=w.forwardRef((e,t)=>dr()!==null?x.jsx(y0,{...e,isParent:!1,ref:t}):x.jsx(yN,{children:x.jsx(y0,{...e,isParent:!0,ref:t})}));var kn=function(){return kn=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},kn.apply(this,arguments)};function v0(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 Jo(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 es(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 b0(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 Ld(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ka="right-scroll-bar-position",Za="width-before-scroll-bar",GN="with-scroll-bars-hidden",YN="--removed-body-scroll-bar-size";function Fd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function qN(e,t){var n=w.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 KN=typeof window<"u"?P.useLayoutEffect:P.useEffect,w0=new WeakMap;function ZN(e,t){var n=qN(null,function(r){return e.forEach(function(o){return Fd(o,r)})});return KN(function(){var r=w0.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Fd(a,null)}),s.forEach(function(a){o.has(a)||Fd(a,i)})}w0.set(n,e)},[e]),n}function XN(e){return e}function QN(e,t){t===void 0&&(t=XN);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 JN(e){e===void 0&&(e={});var t=QN(null);return t.options=kn({async:!0,ssr:!1},e),t}var x0=function(e){var t=e.sideCar,n=v0(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 P.createElement(r,kn({},n))};x0.isSideCarExport=!0;function eL(e,t){return e.useMedium(t),x0}var S0=JN(),Vd=function(){},Xa=P.forwardRef(function(e,t){var n=P.useRef(null),r=P.useState({onScrollCapture:Vd,onWheelCapture:Vd,onTouchMoveCapture:Vd}),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,m=e.inert,p=e.allowPinchZoom,v=e.as,b=v===void 0?"div":v,y=e.gapMode,g=v0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=f,S=ZN([n,t]),E=kn(kn({},g),o);return P.createElement(P.Fragment,null,u&&P.createElement(T,{sideCar:S0,removeScrollBar:c,shards:d,noIsolation:h,inert:m,setCallbacks:s,allowPinchZoom:!!p,lockRef:n,gapMode:y}),i?P.cloneElement(P.Children.only(a),kn(kn({},E),{ref:S})):P.createElement(b,kn({},E,{className:l,ref:S}),a))});Xa.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Xa.classNames={fullWidth:Za,zeroRight:Ka};var tL=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function nL(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=tL();return t&&e.setAttribute("nonce",t),e}function rL(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function oL(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var sL=function(){var e=0,t=null;return{add:function(n){e==0&&(t=nL())&&(rL(t,n),oL(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},iL=function(){var e=sL();return function(t,n){P.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},T0=function(){var e=iL(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},aL={left:0,top:0,right:0,gap:0},$d=function(e){return parseInt(e||"",10)||0},lL=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[$d(n),$d(r),$d(o)]},cL=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return aL;var t=lL(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])}},uL=T0(),ts="data-scroll-locked",dL=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(GN,` {
|
|
174
|
-
overflow: hidden `).concat(r,`;
|
|
175
|
-
padding-right: `).concat(a,"px ").concat(r,`;
|
|
176
|
-
}
|
|
177
|
-
body[`).concat(ts,`] {
|
|
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(Ka,` {
|
|
191
|
-
right: `).concat(a,"px ").concat(r,`;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.`).concat(Za,` {
|
|
195
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.`).concat(Ka," .").concat(Ka,` {
|
|
199
|
-
right: 0 `).concat(r,`;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.`).concat(Za," .").concat(Za,` {
|
|
203
|
-
margin-right: 0 `).concat(r,`;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
body[`).concat(ts,`] {
|
|
207
|
-
`).concat(YN,": ").concat(a,`px;
|
|
208
|
-
}
|
|
209
|
-
`)},E0=function(){var e=parseInt(document.body.getAttribute(ts)||"0",10);return isFinite(e)?e:0},fL=function(){P.useEffect(function(){return document.body.setAttribute(ts,(E0()+1).toString()),function(){var e=E0()-1;e<=0?document.body.removeAttribute(ts):document.body.setAttribute(ts,e.toString())}},[])},hL=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;fL();var s=P.useMemo(function(){return cL(o)},[o]);return P.createElement(uL,{styles:dL(s,!t,o,n?"":"!important")})},Rd=!1;if(typeof window<"u")try{var Qa=Object.defineProperty({},"passive",{get:function(){return Rd=!0,!0}});window.addEventListener("test",Qa,Qa),window.removeEventListener("test",Qa,Qa)}catch{Rd=!1}var ns=Rd?{passive:!1}:!1,pL=function(e){return e.tagName==="TEXTAREA"},C0=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!pL(e)&&n[t]==="visible")},mL=function(e){return C0(e,"overflowY")},gL=function(e){return C0(e,"overflowX")},P0=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=k0(e,r);if(o){var s=I0(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},yL=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},vL=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},k0=function(e,t){return e==="v"?mL(t):gL(t)},I0=function(e,t){return e==="v"?yL(t):vL(t)},bL=function(e,t){return e==="h"&&t==="rtl"?-1:1},wL=function(e,t,n,r,o){var s=bL(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=I0(e,a),m=h[0],p=h[1],v=h[2],b=p-v-s*m;(m||b)&&k0(e,a)&&(d+=b,f+=m),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},Ja=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},A0=function(e){return[e.deltaX,e.deltaY]},O0=function(e){return e&&"current"in e?e.current:e},xL=function(e,t){return e[0]===t[0]&&e[1]===t[1]},SL=function(e){return`
|
|
210
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
211
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
212
|
-
`)},TL=0,rs=[];function EL(e){var t=P.useRef([]),n=P.useRef([0,0]),r=P.useRef(),o=P.useState(TL++)[0],s=P.useState(T0)[0],i=P.useRef(e);P.useEffect(function(){i.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=Ld([e.lockRef.current],(e.shards||[]).map(O0),!0).filter(Boolean);return p.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=P.useCallback(function(p,v){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!i.current.allowPinchZoom;var b=Ja(p),y=n.current,g="deltaX"in p?p.deltaX:y[0]-b[0],T="deltaY"in p?p.deltaY:y[1]-b[1],S,E=p.target,C=Math.abs(g)>Math.abs(T)?"h":"v";if("touches"in p&&C==="h"&&E.type==="range")return!1;var I=P0(C,E);if(!I)return!0;if(I?S=C:(S=C==="v"?"h":"v",I=P0(C,E)),!I)return!1;if(!r.current&&"changedTouches"in p&&(g||T)&&(r.current=S),!S)return!0;var A=r.current||S;return wL(A,v,p,A==="h"?g:T,!0)},[]),l=P.useCallback(function(p){var v=p;if(!(!rs.length||rs[rs.length-1]!==s)){var b="deltaY"in v?A0(v):Ja(v),y=t.current.filter(function(S){return S.name===v.type&&(S.target===v.target||v.target===S.shadowParent)&&xL(S.delta,b)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var g=(i.current.shards||[]).map(O0).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=P.useCallback(function(p,v,b,y){var g={name:p,delta:v,target:b,should:y,shadowParent:CL(b)};t.current.push(g),setTimeout(function(){t.current=t.current.filter(function(T){return T!==g})},1)},[]),u=P.useCallback(function(p){n.current=Ja(p),r.current=void 0},[]),d=P.useCallback(function(p){c(p.type,A0(p),p.target,a(p,e.lockRef.current))},[]),f=P.useCallback(function(p){c(p.type,Ja(p),p.target,a(p,e.lockRef.current))},[]);P.useEffect(function(){return rs.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,ns),document.addEventListener("touchmove",l,ns),document.addEventListener("touchstart",u,ns),function(){rs=rs.filter(function(p){return p!==s}),document.removeEventListener("wheel",l,ns),document.removeEventListener("touchmove",l,ns),document.removeEventListener("touchstart",u,ns)}},[]);var h=e.removeScrollBar,m=e.inert;return P.createElement(P.Fragment,null,m?P.createElement(s,{styles:SL(o)}):null,h?P.createElement(hL,{gapMode:e.gapMode}):null)}function CL(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const PL=eL(S0,EL);var _0=P.forwardRef(function(e,t){return P.createElement(Xa,kn({},e,{ref:t,sideCar:PL}))});_0.classNames=Xa.classNames;const kL=(e,t)=>Yi()?t:window.matchMedia(e).matches,IL=(e,t=!0)=>{const[n,r]=w.useState(t);return w.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(kL(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},dn="600ms",AL={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:dn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:dn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:dn}},OL={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:dn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:dn}},Bd={drawer:e=>e==="left"?AL:OL,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:dn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:dn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:dn,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:dn},enter:{opacity:1,scale:[1.05,1],animationDuration:dn},exit:{opacity:0,scale:.97,animationDuration:dn}}},_L=po("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"}}),ML={top:0,left:0,right:0,bottom:-1},DL=e=>e*.62,NL=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=DL(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return x.jsx(lt.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:ML,whileDrag:{cursor:"grabbing"},className:De("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})},jd={drawer:"right",sheet:"none",dialog:"none"},LL=({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:m,overlayClickClose:p=!1,ariaTitle:v,...b})=>{const y=w.useId(),g=w.useId(),T=IL("(min-width: 64rem)"),S=h!=="dialog",E=T?h==="drawer"?m:jd[h]:d?jd[h]:jd.sheet,C=T||d?Bd[h]:Bd.sheet,I=typeof C=="function"?C(E):C,A=T||d?h:"sheet",{refs:O,context:L}=zr({open:e,onOpenChange:a}),D=hi(L),V=Hr(L),k=jr(L,{escapeKey:!0,referencePress:!0,outsidePress:p}),{getReferenceProps:_,getFloatingProps:F}=Wr([D,V,k]),N=o,R=_r(void 0),H=()=>a(!1);return x.jsxs(w.Fragment,{children:[o?x.jsx(w.Fragment,{children:r?x.jsx(Vo,{ref:O.setReference,..._({layoutId:i}),children:N}):x.jsx(lt.button,{ref:O.setReference,..._(),layoutId:i,type:"button",children:N})}):null,x.jsx(Rr,{children:x.jsx(er,{mode:"wait",presenceAffectsLayout:!0,children:e?x.jsx(_0,{enabled:!0,forwardProps:!0,removeScrollBar:!0,inert:!0,noIsolation:!0,children:x.jsx(AN,{lockScroll:!0,className:De(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${A==="drawer"?"":"flex items-start justify-center p-10"}`,f),children:x.jsx(Zo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:L,children:x.jsxs(lt.div,{...b,exit:"exit",animate:"enter",initial:"initial",variants:I,"data-component":"modal",ref:O.setFloating,"aria-modal":e,layoutId:i,className:De(_L({position:E,type:A}),l),style:A==="drawer"?{width:R}:{height:R},...t?{"aria-labelledby":y,"aria-describedby":g}:{"aria-label":v},...F(),children:[t?x.jsx("header",{className:"relative w-full",children:t?x.jsx("h2",{id:y,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:s}),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:H,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(ku,{})})}):null,S&&c?x.jsx(NL,{onChange:a,parent:O.floating,position:E,sheet:A==="sheet",value:R}):null]})})})}):null})})]})},FL=e=>x.jsx(lt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),M0=({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=hc,...d})=>{const[f,h]=w.useState(o??!1),m=w.useRef(null),p=e||"span",v=D=>{h(D),u==null||u(D)},{refs:b,floatingStyles:y,context:g}=zr({open:f,placement:r,transform:!0,strategy:"absolute",whileElementsMounted:ai,onOpenChange:o?void 0:v,middleware:[xd(),li(5),Sd({fallbackAxisSideDirection:"start"}),_b({padding:5,element:m})]}),T=Hb(g,{move:!0,delay:{open:m0},enabled:a?i:!1,handleClose:l?p0():null}),S=LN(g,{enabled:a?s:!1}),E=hi(g,{enabled:a?l:!1}),C=jr(g,{enabled:a}),I=Hr(g,{role:"tooltip",enabled:a}),A=_N(g,{enabled:!!a&&!!c}),{getReferenceProps:O,getFloatingProps:L}=Wr([I,C,A,s?S:void 0,i?T:void 0,l?E:void 0]);return w.useEffect(()=>h(o===void 0?!1:o),[o]),x.jsxs(w.Fragment,{children:[x.jsx(p,{ref:b.setReference,...O(d),children:t}),f&&x.jsx(Rr,{preserveTabOrder:!0,children:x.jsxs(mo,{...L(),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:[x.jsx(Rb,{ref:m,context:g,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),n]})})]})};class el{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++)el.getDescendantProperty(a[l],s,r);else s&&el.getDescendantProperty(a,s,r)}else r.push(t);return r}}class Ur{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=Ur.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=el.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=Ur.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=Ur.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 Ur.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 tl=0,pr=1,os=2,D0=4;function pi(e,t){return n=>e(t(n))}function VL(e,t){return t(e)}function N0(e,t){return n=>e(t,n)}function L0(e,t){return()=>e(t)}function nl(e,t){return t(e),e}function Je(...e){return e}function $L(e){e()}function F0(e){return()=>e}function RL(...e){return()=>{e.map($L)}}function zd(e){return e!==void 0}function Gr(){}function We(e,t){return e(pr,t)}function Te(e,t){e(tl,t)}function Wd(e){e(os)}function Lt(e){return e(D0)}function pe(e,t){return We(e,N0(t,tl))}function In(e,t){const n=e(pr,r=>{n(),t(r)});return n}function Oe(){const e=[];return(t,n)=>{switch(t){case os:e.splice(0,e.length);return;case pr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case tl:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function re(e){let t=e;const n=Oe();return(r,o)=>{switch(r){case pr:o(t);break;case tl:t=o;break;case D0:return t}return n(r,o)}}function BL(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case pr:return s?n===s?void 0:(r(),n=s,t=We(e,s),t):(r(),Gr);case os:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Xt(e){return nl(Oe(),t=>pe(e,t))}function Ft(e,t){return nl(re(t),n=>pe(e,n))}function jL(...e){return t=>e.reduceRight(VL,t)}function Z(e,...t){const n=jL(...t);return(r,o)=>{switch(r){case pr:return We(e,n(o));case os:Wd(e);return}}}function V0(e,t){return e===t}function et(e=V0){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ve(e){return t=>n=>{e(n)&&t(n)}}function de(e){return t=>pi(t,e)}function An(e){return t=>()=>t(e)}function On(e,t){return n=>r=>n(t=e(t,r))}function ss(e){return t=>n=>{e>0?e--:t(n)}}function mr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function $0(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);We(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 R0(...e){return function(t,n){switch(t){case pr:return RL(...e.map(r=>We(r,n)));case os:return;default:throw new Error(`unrecognized action ${t}`)}}}function we(e,t=V0){return Z(e,et(t))}function Pt(...e){const t=Oe(),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);We(s,l=>{n[i]=l,r=r|a,r===o&&Te(t,n)})}),function(s,i){switch(s){case pr:return r===o&&i(n),We(t,i);case os:return Wd(t);default:throw new Error(`unrecognized action ${s}`)}}}function Ve(e,t=[],{singleton:n}={singleton:!0}){return{id:zL(),constructor:e,dependencies:t,singleton:n}}const zL=()=>Symbol();function WL(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 HL(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 rl=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Hd(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),i=Object.keys(t.events||{}),a=w.createContext({});function l(b,y){b.propsReady&&Te(b.propsReady,!1);for(const g of r){const T=b[t.required[g]];Te(T,y[g])}for(const g of o)if(g in y){const T=b[t.optional[g]];Te(T,y[g])}b.propsReady&&Te(b.propsReady,!0)}function c(b){return s.reduce((y,g)=>(y[g]=T=>{const S=b[t.methods[g]];Te(S,T)},y),{})}function u(b){return i.reduce((y,g)=>(y[g]=BL(b[t.events[g]]),y),{})}const d=w.forwardRef((b,y)=>{const{children:g,...T}=b,[S]=w.useState(()=>nl(WL(e),C=>l(C,T))),[E]=w.useState(L0(u,S));return rl(()=>{for(const C of i)C in T&&We(E[C],T[C]);return()=>{Object.values(E).map(Wd)}},[T,E,S]),rl(()=>{l(S,T)}),w.useImperativeHandle(y,F0(c(S))),w.createElement(a.Provider,{value:S},n?w.createElement(n,HL([...r,...o,...i],T),g):g)}),f=b=>w.useCallback(N0(Te,w.useContext(a)[b]),[b]),h=b=>{const g=w.useContext(a)[b],T=w.useCallback(S=>We(g,S),[g]);return w.useSyncExternalStore(T,()=>Lt(g),()=>Lt(g))},m=b=>{const g=w.useContext(a)[b],[T,S]=w.useState(L0(Lt,g));return rl(()=>We(g,E=>{E!==T&&S(F0(E))}),[g,T]),T},p=w.version.startsWith("18")?h:m;return{Component:d,usePublisher:f,useEmitterValue:p,useEmitter:(b,y)=>{const T=w.useContext(a)[b];rl(()=>We(T,y),[y,T])}}}const UL=typeof document<"u"?w.useLayoutEffect:w.useEffect;var Qt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Qt||{});const GL={0:"debug",1:"log",2:"warn",3:"error"},YL=()=>typeof globalThis>"u"?window:globalThis,gr=Ve(()=>{const e=re(3);return{log:re((n,r,o=1)=>{var s;const i=(s=YL().VIRTUOSO_LOG_LEVEL)!=null?s:Lt(e);o>=i&&console[GL[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Ud(e,t=!0){const n=w.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=w.useMemo(()=>new ResizeObserver(s=>{requestAnimationFrame(()=>{const i=s[0].target;i.offsetParent!==null&&e(i)})}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function _n(e,t=!0){return Ud(e,t).callbackRef}function B0(e,t,n,r,o,s,i){const a=w.useCallback(l=>{const c=qL(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,m=i?i.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:m}),s==null||s(KL("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return Ud(a,n)}function qL(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i<o;i++){const a=e.item(i);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Qt.ERROR),u===c)continue;const d=s[s.length-1];s.length===0||d.size!==u||d.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function KL(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Qt.WARN),t==="normal"?0:parseInt(t??"0",10)}function fn(e,t){return Math.round(e.getBoundingClientRect()[t])}function j0(e,t){return Math.abs(e-t)<1.01}function z0(e,t,n,r=Gr,o){const s=w.useRef(null),i=w.useRef(null),a=w.useRef(null),l=w.useCallback(d=>{const f=d.target,h=f===window||f===document,m=h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,p=h?document.documentElement.scrollHeight:f.scrollHeight,v=h?window.innerHeight:f.offsetHeight,b=()=>{e({scrollTop:Math.max(m,0),scrollHeight:p,viewportHeight:v})};d.suppressFlushSync?b():xs.flushSync(b),i.current!==null&&(m===i.current||m<=0||m===p-v)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);w.useEffect(()=>{const d=o||s.current;return r(o||s.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(d){const f=s.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let m,p,v;f===window?(p=Math.max(fn(document.documentElement,"height"),document.documentElement.scrollHeight),m=window.innerHeight,v=document.documentElement.scrollTop):(p=f.scrollHeight,m=fn(f,"height"),v=f.scrollTop);const b=p-m;if(d.top=Math.ceil(Math.max(Math.min(b,d.top),0)),j0(m,p)||d.top===v){e({scrollTop:v,scrollHeight:p,viewportHeight:m}),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=Ve(()=>{const e=Oe(),t=Oe(),n=re(0),r=Oe(),o=re(0),s=Oe(),i=Oe(),a=re(0),l=re(0),c=re(0),u=re(0),d=Oe(),f=Oe(),h=re(!1);return pe(Z(e,de(({scrollTop:m})=>m)),t),pe(Z(e,de(({scrollHeight:m})=>m)),i),pe(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}),mi={lvl:0};function W0(e,t,n,r=mi,o=mi){return{k:e,v:t,lvl:n,l:r,r:o}}function Ye(e){return e===mi}function is(){return mi}function Gd(e,t){if(Ye(e))return mi;const{k:n,l:r,r:o}=e;if(t===n){if(Ye(r))return o;if(Ye(o))return r;{const[s,i]=H0(r);return ol(xt(e,{k:s,v:i,l:U0(r)}))}}else return t<n?ol(xt(e,{l:Gd(r,t)})):ol(xt(e,{r:Gd(o,t)}))}function gi(e,t){if(!Ye(e))return t===e.k?e.v:t<e.k?gi(e.l,t):gi(e.r,t)}function hn(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=hn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return hn(e.l,t,n)}function Jt(e,t,n){return Ye(e)?W0(t,n,1):t===e.k?xt(e,{k:t,v:n}):t<e.k?G0(xt(e,{l:Jt(e.l,t,n)})):G0(xt(e,{r:Jt(e.r,t,n)}))}function Yd(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(Yd(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Yd(i,t,n))),a}function Yr(e){return Ye(e)?[]:[...Yr(e.l),{k:e.k,v:e.v},...Yr(e.r)]}function H0(e){return Ye(e.r)?[e.k,e.v]:H0(e.r)}function U0(e){return Ye(e.r)?e.l:ol(xt(e,{r:U0(e.r)}))}function xt(e,t){return W0(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 qd(e){return Ye(e)||e.lvl>e.r.lvl}function G0(e){return Kd(q0(e))}function ol(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(qd(t))return q0(xt(e,{lvl:r-1}));if(!Ye(t)&&!Ye(t.r))return xt(t.r,{l:xt(t,{r:t.r.l}),r:xt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(qd(e))return Kd(xt(e,{lvl:r-1}));if(!Ye(n)&&!Ye(n.l)){const o=n.l,s=qd(o)?n.lvl-1:n.lvl;return xt(o,{l:xt(e,{r:o.l,lvl:r-1}),r:Kd(xt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function sl(e,t,n){if(Ye(e))return[];const r=hn(e,t)[0];return ZL(Yd(e,r,n))}function Y0(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 ZL(e){return Y0(e,({k:t,v:n})=>({index:t,value:n}))}function Kd(e){const{r:t,lvl:n}=e;return!Ye(t)&&!Ye(t.r)&&t.lvl===n&&t.r.lvl===n?xt(t,{l:xt(e,{r:t.l}),lvl:n+1}):e}function q0(e){const{l:t}=e;return!Ye(t)&&t.lvl===e.lvl?xt(t,{r:xt(e,{l:t.r})}):e}function il(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 K0(e,t,n){return e[il(e,t,n)]}function XL(e,t,n,r){const o=il(e,t,r),s=il(e,n,r,o);return e.slice(o,s+1)}const Zd=Ve(()=>({recalcInProgress:re(!1)}),[],{singleton:!0});function QL(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 Z0(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 JL(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=Jt(e,0,o);continue}const a=sl(e,s-1,i+1);if(a.some(QL(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(i>=u||o===f)&&(e=Gd(e,u)):(c=f!==o,l=!0),d>i&&i>=u&&f!==o&&(e=Jt(e,i+1,f));c&&(e=Jt(e,s,o))}return[e,n]}function eF(){return{offsetTree:[],sizeTree:is(),groupOffsetTree:is(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Xd({index:e},t){return t===e?0:t<e?-1:1}function tF({offset:e},t){return t===e?0:t<e?-1:1}function nF(e){return{index:e.index,value:e}}function rF(e,t,n,r=0){return r>0&&(t=Math.max(t,K0(e,r,Xd).offset)),Y0(XL(e,t,n,tF),nF)}function Qd(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=il(o,t-1,Xd),a=o[l].offset;const u=hn(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===hn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of sl(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 oF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Qt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Ye(s)&&t.length===2){const f=t[0].size,h=t[1].size;i=n.reduce((m,p)=>Jt(Jt(m,p,f),p+1,h),i)}else[i,a]=JL(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=Qd(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Jt(f,h,yi(h,l,o)),is()),groupIndices:n}}function yi(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=K0(t,e,Xd),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function sF(e){return typeof e.groupIndex<"u"}function X0(e,t,n){if(sF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Q0(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Q0(e,t){if(!al(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function al(e){return!Ye(e.groupOffsetTree)}function iF(e){return Yr(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 aF={offsetHeight:"height",offsetWidth:"width"},Mn=Ve(([{log:e},{recalcInProgress:t}])=>{const n=Oe(),r=Oe(),o=Ft(r,0),s=Oe(),i=Oe(),a=re(0),l=re([]),c=re(void 0),u=re(void 0),d=re((S,E)=>fn(S,aF[E])),f=re(void 0),h=re(0),m=eF(),p=Ft(Z(n,Ee(l,e,h),On(oF,m),et()),m),v=Ft(Z(l,et(),On((S,E)=>({prev:S.current,current:E}),{prev:[],current:[]}),de(({prev:S})=>S)),[]);pe(Z(l,ve(S=>S.length>0),Ee(p,h),de(([S,E,C])=>{const I=S.reduce((A,O,L)=>Jt(A,O,yi(O,E.offsetTree,C)||L),is());return{...E,groupIndices:S,groupOffsetTree:I}})),p),pe(Z(r,Ee(p),ve(([S,{lastIndex:E}])=>S<E),de(([S,{lastIndex:E,lastSize:C}])=>[{startIndex:S,endIndex:E,size:C}])),n),pe(c,u);const b=Ft(Z(c,de(S=>S===void 0)),!0);pe(Z(u,ve(S=>S!==void 0&&Ye(Lt(p).sizeTree)),de(S=>[{startIndex:0,endIndex:0,size:S}])),n);const y=Xt(Z(n,Ee(p),On(({sizes:S},[E,C])=>({changed:C!==S,sizes:C}),{changed:!1,sizes:m}),de(S=>S.changed)));We(Z(a,On((S,E)=>({diff:S.prev-E,prev:E}),{diff:0,prev:0}),de(S=>S.diff)),S=>{const{groupIndices:E}=Lt(p);if(S>0)Te(t,!0),Te(s,S+Z0(S,E));else if(S<0){const C=Lt(v);C.length>0&&(S-=Z0(-S,C)),Te(i,S)}}),We(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},Qt.ERROR)});const g=Xt(s);pe(Z(s,Ee(p),de(([S,E])=>{const C=E.groupIndices.length>0,I=[],A=E.lastSize;if(C){const O=gi(E.sizeTree,0);let L=0,D=0;for(;L<S;){const _=E.groupIndices[D],F=E.groupIndices.length===D+1?1/0:E.groupIndices[D+1]-_-1;I.push({startIndex:_,endIndex:_,size:O}),I.push({startIndex:_+1,endIndex:_+1+F-1,size:A}),D++,L+=F+1}const V=Yr(E.sizeTree);return L!==S&&V.shift(),V.reduce((_,{k:F,v:N})=>{let R=_.ranges;return _.prevSize!==0&&(R=[..._.ranges,{startIndex:_.prevIndex,endIndex:F+S-1,size:_.prevSize}]),{ranges:R,prevIndex:F+S,prevSize:N}},{ranges:I,prevIndex:S,prevSize:0}).ranges}return Yr(E.sizeTree).reduce((O,{k:L,v:D})=>({ranges:[...O.ranges,{startIndex:O.prevIndex,endIndex:L+S-1,size:O.prevSize}],prevIndex:L+S,prevSize:D}),{ranges:[],prevIndex:0,prevSize:A}).ranges})),n);const T=Xt(Z(i,Ee(p,h),de(([S,{offsetTree:E},C])=>{const I=-S;return yi(I,E,C)})));return pe(Z(i,Ee(p,h),de(([S,E,C])=>{if(E.groupIndices.length>0){if(Ye(E.sizeTree))return E;let A=is();const O=Lt(v);let L=0,D=0,V=0;for(;L<-S;){V=O[D];const _=O[D+1]-V-1;D++,L+=_+1}if(A=Yr(E.sizeTree).reduce((_,{k:F,v:N})=>Jt(_,Math.max(0,F+S),N),A),L!==-S){const _=gi(E.sizeTree,V);A=Jt(A,0,_);const F=hn(E.sizeTree,-S+1)[1];A=Jt(A,1,F)}return{...E,sizeTree:A,...Qd(E.offsetTree,0,A,C)}}else{const A=Yr(E.sizeTree).reduce((O,{k:L,v:D})=>Jt(O,Math.max(0,L+S),D),is());return{...E,sizeTree:A,...Qd(E.offsetTree,0,A,C)}}})),p),{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:p,listRefresh:y,statefulTotalCount:o,trackItemSizes:b,itemSize:d}},Je(gr,Zd),{singleton:!0}),lF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function J0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!lF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const vi=Ve(([{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=Oe(),m=Oe(),p=re(0);let v=null,b=null,y=null;function g(){v&&(v(),v=null),y&&(y(),y=null),b&&(clearTimeout(b),b=null),Te(o,!1)}return pe(Z(h,Ee(e,s,t,p,l,c,f),Ee(r,u,d),de(([[T,S,E,C,I,A,O,L],D,V,k])=>{const _=J0(T),{align:F,behavior:N,offset:R}=_,H=C-1,M=X0(_,S,H);let B=yi(M,S.offsetTree,D)+A;F==="end"?(B+=V+hn(S.sizeTree,M)[1]-E+k,M===H&&(B+=O)):F==="center"?B+=(V+hn(S.sizeTree,M)[1]-E+k)/2:B-=I,R&&(B+=R);const K=oe=>{g(),oe?(L("retrying to scroll to",{location:T},Qt.DEBUG),Te(h,T)):(Te(m,!0),L("list did not change, scroll successful",{},Qt.DEBUG))};if(g(),N==="smooth"){let oe=!1;y=We(n,te=>{oe=oe||te}),v=In(a,()=>{K(oe)})}else v=In(Z(n,cF(150)),K);return b=setTimeout(()=>{g()},1200),Te(o,!0),L("scrolling from index to",{index:M,top:B,behavior:N},Qt.DEBUG),{top:B,behavior:N}})),i),{scrollToIndex:h,scrollTargetReached:m,topListHeight:p}},Je(Mn,Bt,gr),{singleton:!0});function cF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const bi="up",wi="down",uF="none",dF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},fF=0,xi=Ve(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=re(!1),a=re(!0),l=Oe(),c=Oe(),u=re(4),d=re(fF),f=Ft(Z(R0(Z(we(t),ss(1),An(!0)),Z(we(t),ss(1),An(!1),$0(100))),et()),!1),h=Ft(Z(R0(Z(s,An(!0)),Z(s,An(!1),$0(200))),et()),!1);pe(Z(Pt(we(t),we(d)),de(([y,g])=>y<=g),et()),a),pe(Z(a,mr(50)),c);const m=Xt(Z(Pt(e,we(n),we(r),we(o),we(u)),On((y,[{scrollTop:g,scrollHeight:T},S,E,C,I])=>{const A=g+S-T>-I,O={viewportHeight:S,scrollTop:g,scrollHeight:T};if(A){let D,V;return g>y.state.scrollTop?(D="SCROLLED_DOWN",V=y.state.scrollTop-g):(D="SIZE_DECREASED",V=y.state.scrollTop-g||y.scrollTopDelta),{atBottom:!0,state:O,atBottomBecause:D,scrollTopDelta:V}}let L;return O.scrollHeight>y.state.scrollHeight?L="SIZE_INCREASED":S<y.state.viewportHeight?L="VIEWPORT_HEIGHT_DECREASING":g<y.state.scrollTop?L="SCROLLING_UPWARDS":L="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:L,state:O}},dF),et((y,g)=>y&&y.atBottom===g.atBottom))),p=Ft(Z(e,On((y,{scrollTop:g,scrollHeight:T,viewportHeight:S})=>{if(j0(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}),ve(y=>y.changed),de(y=>y.jump)),0);pe(Z(m,de(y=>y.atBottom)),i),pe(Z(i,mr(50)),l);const v=re(wi);pe(Z(e,de(({scrollTop:y})=>y),et(),On((y,g)=>Lt(h)?{direction:y.direction,prevScrollTop:g}:{direction:g<y.prevScrollTop?bi:wi,prevScrollTop:g},{direction:wi,prevScrollTop:0}),de(y=>y.direction)),v),pe(Z(e,mr(50),An(uF)),v);const b=re(0);return pe(Z(f,ve(y=>!y),An(0)),b),pe(Z(t,mr(100),Ee(f),ve(([y,g])=>!!g),On(([y,g],[T])=>[g,T],[0,0]),de(([y,g])=>g-y)),b),{isScrolling:f,isAtTop:a,isAtBottom:i,atBottomState:m,atTopStateChange:c,atBottomStateChange:l,scrollDirection:v,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:b,lastJumpDueToItemResize:p}},Je(Bt)),yr=Ve(([{log:e}])=>{const t=re(!1),n=Xt(Z(t,ve(r=>r),et()));return We(t,r=>{r&&Lt(e)("props updated",{},Qt.DEBUG)}),{propsReady:t,didMount:n}},Je(gr),{singleton:!0});function Jd(e,t){e==0?t():requestAnimationFrame(()=>Jd(e-1,t))}function ef(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Si=Ve(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=re(!0),l=re(0),c=re(!0);return pe(Z(i,Ee(l),ve(([u,d])=>!!d),An(!1)),a),pe(Z(i,Ee(l),ve(([u,d])=>!!d),An(!1)),c),We(Z(Pt(t,i),Ee(a,e,n,c),ve(([[,u],d,{sizeTree:f},h,m])=>u&&(!Ye(f)||zd(h))&&!d&&!m),Ee(l)),([,u])=>{In(s,()=>{Te(c,!0)}),Jd(4,()=>{In(r,()=>{Te(a,!0)}),Te(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Je(Mn,Bt,vi,yr),{singleton:!0});function ew(e){return e?e==="smooth"?"smooth":"auto":!1}const hF=(e,t)=>typeof e=="function"?ew(e(t)):t&&ew(e),pF=Ve(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=re(!1),d=Oe();let f=null;function h(p){Te(o,{index:"LAST",align:"end",behavior:p})}We(Z(Pt(Z(we(e),ss(1)),a),Ee(we(u),n,s,c),de(([[p,v],b,y,g,T])=>{let S=v&&g,E="auto";return S&&(E=hF(b,y||T),S=S&&!!E),{totalCount:p,shouldFollow:S,followOutputBehavior:E}}),ve(({shouldFollow:p})=>p)),({totalCount:p,followOutputBehavior:v})=>{f&&(f(),f=null),f=In(t,()=>{Lt(l)("following output to ",{totalCount:p},Qt.DEBUG),h(v),f=null})});function m(p){const v=In(r,b=>{p&&!b.atBottom&&b.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Lt(l)("scrolling to bottom due to increased size",{},Qt.DEBUG),h("auto"))});setTimeout(v,100)}return We(Z(Pt(we(u),e,i),ve(([p,,v])=>p&&v),On(({value:p},[,v])=>({refreshed:p===v,value:v}),{refreshed:!1,value:0}),ve(({refreshed:p})=>p),Ee(u,e)),([,p])=>{Lt(s)&&m(p!==!1)}),We(d,()=>{m(Lt(u)!==!1)}),We(Pt(we(u),r),([p,v])=>{p&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},Je(Mn,xi,vi,Si,yr,gr,Bt));function mF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const tw=Ve(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Oe(),i=Oe(),a=Xt(Z(s,de(mF)));return pe(Z(a,de(l=>l.totalCount)),e),pe(Z(a,de(l=>l.groupIndices)),t),pe(Z(Pt(r,n,o),ve(([l,c])=>al(c)),de(([l,c,u])=>hn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),et(),de(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Je(Mn,Bt));function Ti(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function nw(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const ll="top",cl="bottom",rw="none";function ow(e,t,n){return typeof e=="number"?n===bi&&t===ll||n===wi&&t===cl?e:0:n===bi?t===ll?e.main:e.reverse:t===cl?e.main:e.reverse}function sw(e,t){return typeof e=="number"?e:e[t]||0}const tf=Ve(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Oe(),i=re(0),a=re(0),l=re(0),c=Ft(Z(Pt(we(e),we(t),we(r),we(s,Ti),we(l),we(i),we(o),we(n),we(a)),de(([u,d,f,[h,m],p,v,b,y,g])=>{const T=u-y,S=v+b,E=Math.max(f-T,0);let C=rw;const I=sw(g,ll),A=sw(g,cl);return h-=y,h+=f+b,m+=f+b,m-=y,h>u+S-I&&(C=bi),m<u-E+d+A&&(C=wi),C!==rw?[Math.max(T-f-ow(p,ll,C)-I,0),T-E-b+d+ow(p,cl,C)+A]:null}),ve(u=>u!=null),et(Ti)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Je(Bt),{singleton:!0});function gF(e,t,n){if(al(t)){const r=Q0(e,t);return[{index:hn(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 nf={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function iw(e,t,n){if(e.length===0)return[];if(!al(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=sl(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 ul(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 p=e[e.length-1];u=p.offset+p.size}const d=n-l,f=a+d*i+(d-1)*r,h=c,m=f-u;return{items:iw(e,o,s),topItems:iw(t,o,s),topListHeight:t.reduce((p,v)=>v.size+p,0),offsetTop:c,offsetBottom:m,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function aw(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=ef(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:s[d+l]}));return ul(c,[],a,o,n,r)}const qr=Ve(([{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:m}])=>{const p=re([]),v=re(0),b=Oe();pe(s.topItemsIndexes,p);const y=Ft(Z(Pt(h,m,we(i,Ti),we(t),we(e),we(u),c,we(p),we(r),we(o),n),ve(([E,C,,I,,,,,,,A])=>{const O=A&&A.length!==I;return E&&!C&&!O}),de(([,,[E,C],I,A,O,L,D,V,k,_])=>{const F=A,{sizeTree:N,offsetTree:R}=F,H=Lt(v);if(I===0)return{...nf,totalCount:I};if(E===0&&C===0)return H===0?{...nf,totalCount:I}:aw(H,O,A,V,k,_||[]);if(Ye(N))return H>0?null:ul(gF(ef(O,I),F,_),[],I,k,F,V);const M=[];if(D.length>0){const G=D[0],$=D[D.length-1];let j=0;for(const W of sl(N,G,$)){const Y=W.value,Q=Math.max(W.start,G),fe=Math.min(W.end,$);for(let U=Q;U<=fe;U++)M.push({index:U,size:Y,offset:j,data:_&&_[U]}),j+=Y}}if(!L)return ul([],M,I,k,F,V);const B=D.length>0?D[D.length-1]+1:0,K=rF(R,E,C,B);if(K.length===0)return null;const oe=I-1,te=nl([],G=>{for(const $ of K){const j=$.value;let W=j.offset,Y=$.start;const Q=j.size;if(j.offset<E){Y+=Math.floor((E-j.offset+k)/(Q+k));const U=Y-$.start;W+=U*Q+U*k}Y<B&&(W+=(B-Y)*Q,Y=B);const fe=Math.min($.end,oe);for(let U=Y;U<=fe&&!(W>=C);U++)G.push({index:U,size:Q,offset:W,data:_&&_[U]}),W+=Q+k}});return ul(te,M,I,k,F,V)}),ve(E=>E!==null),et()),nf);pe(Z(n,ve(zd),de(E=>E==null?void 0:E.length)),t),pe(Z(y,de(E=>E.topListHeight)),d),pe(d,l),pe(Z(y,de(E=>[E.top,E.bottom])),a),pe(Z(y,de(E=>E.items)),b);const g=Xt(Z(y,ve(({items:E})=>E.length>0),Ee(t,n),ve(([{items:E},C])=>E[E.length-1].originalIndex===C-1),de(([,E,C])=>[E-1,C]),et(Ti),de(([E])=>E))),T=Xt(Z(y,mr(200),ve(({items:E,topItems:C})=>E.length>0&&E[0].originalIndex===C.length),de(({items:E})=>E[0].index),et())),S=Xt(Z(y,ve(({items:E})=>E.length>0),de(({items:E})=>{let C=0,I=E.length-1;for(;E[C].type==="group"&&C<I;)C++;for(;E[I].type==="group"&&I>C;)I--;return{startIndex:E[C].index,endIndex:E[I].index}}),et(nw)));return{listState:y,topItemsIndexes:p,endReached:g,startReached:T,rangeChanged:S,itemsRendered:b,initialItemCount:v,...f}},Je(Mn,tw,tf,Si,vi,xi,yr,Zd),{singleton:!0}),yF=Ve(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(pe(Z(a,Ee(s),ve(([,l])=>l!==0),Ee(o,e,t,r,n),de(([[,l],c,u,d,f,h=[]])=>aw(l,c,u,d,f,h))),i),{}),Je(Mn,Si,qr,yr),{singleton:!0}),lw=Ve(([{scrollVelocity:e}])=>{const t=re(!1),n=Oe(),r=re(!1);return pe(Z(e,Ee(r,t,n),ve(([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}),et()),t),We(Z(Pt(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}},Je(xi),{singleton:!0}),vF=Ve(([{topItemsIndexes:e}])=>{const t=re(0);return pe(Z(t,ve(n=>n>0),de(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Je(qr)),cw=Ve(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Oe(),i=Ft(Z(Pt(e,r,t,n,o),de(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return pe(we(i),s),{totalListHeight:i,totalListHeightChanged:s}},Je(Bt,qr),{singleton:!0});function uw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const bF=uw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),wF=Ve(([{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:m}])=>{const p=Xt(Z(l,Ee(a),On(([,b,y,g],[{items:T,totalCount:S,bottom:E,offsetBottom:C},I])=>{const A=E+C;let O=0;return y===S&&b.length>0&&T.length>0&&(T[0].originalIndex===0&&b[0].originalIndex===0||(O=A-g,O!==0&&(O+=I))),[O,T,S,A]},[0,[],0,0]),ve(([b])=>b!==0),Ee(t,i,r,s,h,m),ve(([,b,y,g,,,T])=>!T&&!g&&b!==0&&y===bi),de(([[b],,,,,y])=>(y("Upward scrolling compensation",{amount:b},Qt.DEBUG),b))));function v(b){b>0?(Te(e,{top:-b,behavior:"auto"}),Te(n,0)):(Te(n,0),Te(e,{top:-b,behavior:"auto"}))}return We(Z(p,Ee(n,o)),([b,y,g])=>{g&&bF()?Te(n,y-b):v(-b)}),We(Z(Pt(Ft(o,!1),n,m),ve(([b,y,g])=>!b&&!g&&y!==0),de(([b,y])=>y),mr(1)),v),pe(Z(u,de(b=>({top:-b}))),e),We(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 I=gi(T,0);let A=0,O=0;for(;A<b;){A++,C+=I;let L=g.length===O+1?1/0:g[O+1]-g[O]-1;A+L>b&&(C-=I,L=b-A+1),A+=L,C+=E(L),O++}return C}})),b=>{Te(n,b),requestAnimationFrame(()=>{Te(e,{top:b}),requestAnimationFrame(()=>{Te(n,0),Te(m,!1)})})}),{deviation:n}},Je(Bt,xi,qr,Mn,gr,Zd)),xF=Ve(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=re(0);return We(Z(e,Ee(r),ve(([,o])=>o!==0),de(([,o])=>({top:o}))),o=>{In(Z(n,ss(1),ve(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{Te(t,o)})})}),{initialScrollTop:r}},Je(yr,Bt,qr),{singleton:!0}),SF=Ve(([{viewportHeight:e},{totalListHeight:t}])=>{const n=re(!1),r=Ft(Z(Pt(n,e,t),ve(([o])=>o),de(([,o,s])=>Math.max(0,o-s)),mr(0),et()),0);return{alignToBottom:n,paddingTopAddition:r}},Je(Bt,cw),{singleton:!0}),rf=Ve(([{scrollTo:e,scrollContainerState:t}])=>{const n=Oe(),r=Oe(),o=Oe(),s=re(!1),i=re(void 0);return pe(Z(Pt(n,r),de(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),pe(Z(e,Ee(r),de(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Je(Bt)),TF=({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,EF=Ve(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Oe();return pe(Z(u,Ee(e,o,t,s,i,a,r),Ee(n),de(([[d,f,h,m,p,v,b,y],g])=>{const{done:T,behavior:S,align:E,calculateViewLocation:C=TF,...I}=d,A=X0(d,f,m-1),O=yi(A,f.offsetTree,g)+p+v,L=O+hn(f.sizeTree,A)[1],D=y+v,V=y+h-b,k=C({itemTop:O,itemBottom:L,viewportTop:D,viewportBottom:V,locationParams:{behavior:S,align:E,...I}});return k?T&&In(Z(l,ve(_=>_===!1),ss(Lt(l)?1:2)),T):T&&T(),k}),ve(d=>d!==null)),c),{scrollIntoView:u}},Je(Mn,Bt,vi,qr,gr),{singleton:!0}),CF=Ve(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Oe(),u=re(void 0),d=re(null),f=re(null);return pe(a,d),pe(l,f),We(Z(c,Ee(e,n,i,d,f,r)),([h,m,p,v,b,y,g])=>{const T=iF(m.sizeTree);v&&b!==null&&y!==null&&(p=b.scrollTop-y.offsetTop),p-=g,h({ranges:T,scrollTop:p})}),pe(Z(u,ve(zd),de(PF)),o),pe(Z(s,Ee(u),ve(([,h])=>h!==void 0),et(),de(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},Je(Mn,Bt,Si,yr,rf));function PF(e){return{offset:e.scrollTop,index:0,align:"start"}}const kF=Ve(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Je(tf,yF,yr,lw,cw,xF,SF,rf,EF,gr)),dw=Ve(([{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:m},p,v,b,{listState:y,topItemsIndexes:g,...T},{scrollToIndex:S},E,{topItemCount:C},{groupCounts:I},A])=>(pe(T.rangeChanged,A.scrollSeekRangeChanged),pe(Z(A.windowViewportRect,de(O=>O.visibleHeight)),p.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:m,topItemsIndexes:g,topItemCount:C,groupCounts:I,fixedItemHeight:n,defaultItemHeight:r,gap:u,...b,statefulTotalCount:c,listState:y,scrollToIndex:S,trackItemSizes:o,itemSize:s,groupIndices:l,...T,...A,...p,sizes:d,...v}),Je(Mn,Si,Bt,CF,pF,qr,vi,wF,vF,tw,kF)),of="-webkit-sticky",fw="sticky",hw=uw(()=>{if(typeof document>"u")return fw;const e=document.createElement("div");return e.style.position=of,e.style.position===of?of:fw});function sf(e,t){const n=w.useRef(null),r=w.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,d;if(t){const f=t.getBoundingClientRect(),h=l.top-f.top;u=f.height-Math.max(0,h),d=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=Ud(r),i=w.useCallback(()=>{r(s.current)},[r,s]);return w.useEffect(()=>{if(t){t.addEventListener("scroll",i);const a=new ResizeObserver(()=>{requestAnimationFrame(i)});return a.observe(t),()=>{t.removeEventListener("scroll",i),a.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const dl=w.createContext(void 0),pw=w.createContext(void 0);function af(e){return e}const IF=Ve(([e,t])=>({...e,...t}),Je(dw,Ve(()=>{const e=re(l=>`Item ${l}`),t=re(null),n=re(l=>`Group ${l}`),r=re({}),o=re(af),s=re("div"),i=re(Gr),a=(l,c=null)=>Ft(Z(r,de(u=>u[l]),et()),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")}}))),AF=({height:e})=>w.createElement("div",{style:{height:e}}),OF={position:hw(),zIndex:1,overflowAnchor:"none"},_F={overflowAnchor:"none"},mw=w.memo(function({showTopList:t=!1}){const n=Ie("listState"),r=on("sizeRanges"),o=Ie("useWindowScroll"),s=Ie("customScrollParent"),i=on("windowScrollContainerState"),a=on("scrollContainerState"),l=s||o?i:a,c=Ie("itemContent"),u=Ie("context"),d=Ie("groupContent"),f=Ie("trackItemSizes"),h=Ie("itemSize"),m=Ie("log"),p=on("gap"),{callbackRef:v}=B0(r,h,f,t?Gr:l,m,p,s),[b,y]=w.useState(0);uf("deviation",k=>{b!==k&&y(k)});const g=Ie("EmptyPlaceholder"),T=Ie("ScrollSeekPlaceholder")||AF,S=Ie("ListComponent"),E=Ie("ItemComponent"),C=Ie("GroupComponent"),I=Ie("computeItemKey"),A=Ie("isSeeking"),O=Ie("groupIndices").length>0,L=Ie("alignToBottom"),D=Ie("initialItemFinalLocationReached"),V=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:b!==0?b:L?"auto":0,...D?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?w.createElement(g,dt(g,u)):w.createElement(S,{...dt(S,u),ref:v,style:V,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(k=>{const _=k.originalIndex,F=I(_+n.firstItemIndex,k.data,u);return A?w.createElement(T,{...dt(T,u),key:F,index:k.index,height:k.size,type:k.type||"item",...k.type==="group"?{}:{groupIndex:k.groupIndex}}):k.type==="group"?w.createElement(C,{...dt(C,u),key:F,"data-index":_,"data-known-size":k.size,"data-item-index":k.index,style:OF},d(k.index,u)):w.createElement(E,{...dt(E,u),...gw(E,k.data),key:F,"data-index":_,"data-known-size":k.size,"data-item-index":k.index,"data-item-group-index":k.groupIndex,style:_F},O?c(k.index,k.groupIndex,k.data,u):c(k.index,k.data,u))}))}),MF={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},as=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),DF={width:"100%",position:hw(),top:0,zIndex:1};function dt(e,t){if(typeof e!="string")return{context:t}}function gw(e,t){return{item:typeof e=="string"?void 0:t}}const NF=w.memo(function(){const t=Ie("HeaderComponent"),n=on("headerHeight"),r=Ie("headerFooterTag"),o=_n(w.useMemo(()=>i=>n(fn(i,"height")),[n])),s=Ie("context");return t?w.createElement(r,{ref:o},w.createElement(t,dt(t,s))):null}),LF=w.memo(function(){const t=Ie("FooterComponent"),n=on("footerHeight"),r=Ie("headerFooterTag"),o=_n(w.useMemo(()=>i=>n(fn(i,"height")),[n])),s=Ie("context");return t?w.createElement(r,{ref:o},w.createElement(t,dt(t,s))):null});function lf({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),f=n("context"),{scrollerRef:h,scrollByCallback:m,scrollToCallback:p}=z0(l,u,c,d);return t("scrollTo",p),t("scrollBy",m),w.createElement(c,{ref:h,style:{...MF,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...dt(c,f)},i)})}function cf({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),f=n("deviation"),h=n("customScrollParent"),m=n("context"),{scrollerRef:p,scrollByCallback:v,scrollToCallback:b}=z0(l,u,c,Gr,h);return UL(()=>(p.current=h||window,()=>{p.current=null}),[p,h]),t("windowScrollTo",b),t("scrollBy",v),w.createElement(c,{style:{position:"relative",...s,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...dt(c,m)},i)})}const FF=({children:e})=>{const t=w.useContext(dl),n=on("viewportHeight"),r=on("fixedItemHeight"),o=Ie("alignToBottom"),s=_n(w.useMemo(()=>pi(n,i=>fn(i,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:as(o),ref:s,"data-viewport-type":"element"},e)},VF=({children:e})=>{const t=w.useContext(dl),n=on("windowViewportRect"),r=on("fixedItemHeight"),o=Ie("customScrollParent"),s=sf(n,o),i=Ie("alignToBottom");return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:as(i),"data-viewport-type":"window"},e)},$F=({children:e})=>{const t=Ie("TopItemListComponent")||"div",n=Ie("headerHeight"),r={...DF,marginTop:`${n}px`},o=Ie("context");return w.createElement(t,{style:r,...dt(t,o)},e)},RF=w.memo(function(t){const n=Ie("useWindowScroll"),r=Ie("topItemsIndexes").length>0,o=Ie("customScrollParent"),s=o||n?zF:jF,i=o||n?VF:FF;return w.createElement(s,{...t},r&&w.createElement($F,null,w.createElement(mw,{showTopList:!0})),w.createElement(i,null,w.createElement(NF,null),w.createElement(mw,null),w.createElement(LF,null)))}),{Component:BF,usePublisher:on,useEmitterValue:Ie,useEmitter:uf}=Hd(IF,{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"}},RF),jF=lf({usePublisher:on,useEmitterValue:Ie,useEmitter:uf}),zF=cf({usePublisher:on,useEmitterValue:Ie,useEmitter:uf}),df=BF,yw={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},WF={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:vw,ceil:bw,floor:fl,min:ff,max:Ei}=Math;function HF(e){return{...WF,items:e}}function ww(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 UF(e,t){return e&&e.column===t.column&&e.row===t.row}function hl(e,t){return e&&e.width===t.width&&e.height===t.height}const GF=Ve(([{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:m},{windowViewportRect:p,useWindowScroll:v,customScrollParent:b,windowScrollContainerState:y,windowScrollTo:g},T])=>{const S=re(0),E=re(0),C=re(yw),I=re({height:0,width:0}),A=re({height:0,width:0}),O=Oe(),L=Oe(),D=re(0),V=re(null),k=re({row:0,column:0}),_=Oe(),F=Oe(),N=re(!1),R=re(0),H=re(!0),M=re(!1);We(Z(m,Ee(R),ve(([$,j])=>!!j)),()=>{Te(H,!1),Te(E,0)}),We(Z(Pt(m,H,A,I,R,M),ve(([$,j,W,Y,,Q])=>$&&!j&&W.height!==0&&Y.height!==0&&!Q)),([,,,,$])=>{Te(M,!0),Jd(1,()=>{Te(O,$)}),In(Z(r),()=>{Te(n,[0,0]),Te(H,!0)})}),pe(Z(F,ve($=>$!=null&&$.scrollTop>0),An(0)),E),We(Z(m,Ee(F),ve(([,$])=>$!=null)),([,$])=>{$&&(Te(I,$.viewport),Te(A,$==null?void 0:$.item),Te(k,$.gap),$.scrollTop>0&&(Te(N,!0),In(Z(r,ss(1)),j=>{Te(N,!1)}),Te(i,{top:$.scrollTop})))}),pe(Z(I,de(({height:$})=>$)),o),pe(Z(Pt(we(I,hl),we(A,hl),we(k,($,j)=>$&&$.column===j.column&&$.row===j.row),we(r)),de(([$,j,W,Y])=>({viewport:$,item:j,gap:W,scrollTop:Y}))),_),pe(Z(Pt(we(S),t,we(k,UF),we(A,hl),we(I,hl),we(V),we(E),we(N),we(H),we(R)),ve(([,,,,,,,$])=>!$),de(([$,[j,W],Y,Q,fe,U,Ae,,Ke,Be])=>{const{row:Ce,column:q}=Y,{height:ie,width:z}=Q,{width:ee}=fe;if(Ae===0&&($===0||ee===0))return yw;if(z===0){const zt=ef(Be,$),ro=zt===0?Math.max(Ae-1,0):zt;return HF(ww(zt,ro,U))}const ye=Sw(ee,z,q);let ue,je;Ke?j===0&&W===0&&Ae>0?(ue=0,je=Ae-1):(ue=ye*fl((j+Ce)/(ie+Ce)),je=ye*bw((W+Ce)/(ie+Ce))-1,je=ff($-1,Ei(je,ye-1)),ue=ff(je,Ei(0,ue))):(ue=0,je=-1);const ne=ww(ue,je,U),{top:le,bottom:Ne}=xw(fe,Y,Q,ne),tt=bw($/ye),Vt=tt*ie+(tt-1)*Ce-Ne;return{items:ne,offsetTop:le,offsetBottom:Vt,top:le,bottom:Ne,itemHeight:ie,itemWidth:z}})),C),pe(Z(V,ve($=>$!==null),de($=>$.length)),S),pe(Z(Pt(I,A,C,k),ve(([$,j,{items:W}])=>W.length>0&&j.height!==0&&$.height!==0),de(([$,j,{items:W},Y])=>{const{top:Q,bottom:fe}=xw($,Y,j,W);return[Q,fe]}),et(Ti)),n);const B=re(!1);pe(Z(r,Ee(B),de(([$,j])=>j||$!==0)),B);const K=Xt(Z(we(C),ve(({items:$})=>$.length>0),Ee(S,B),ve(([{items:$},j,W])=>W&&$[$.length-1].index===j-1),de(([,$])=>$-1),et())),oe=Xt(Z(we(C),ve(({items:$})=>$.length>0&&$[0].index===0),An(0),et())),te=Xt(Z(we(C),Ee(N),ve(([{items:$},j])=>$.length>0&&!j),de(([{items:$}])=>({startIndex:$[0].index,endIndex:$[$.length-1].index})),et(nw),mr(0)));pe(te,f.scrollSeekRangeChanged),pe(Z(O,Ee(I,A,S,k),de(([$,j,W,Y,Q])=>{const fe=J0($),{align:U,behavior:Ae,offset:Ke}=fe;let Be=fe.index;Be==="LAST"&&(Be=Y-1),Be=Ei(0,Be,ff(Y-1,Be));let Ce=hf(j,Q,W,Be);return U==="end"?Ce=vw(Ce-j.height+W.height):U==="center"&&(Ce=vw(Ce-j.height/2+W.height/2)),Ke&&(Ce+=Ke),{top:Ce,behavior:Ae}})),i);const G=Ft(Z(C,de($=>$.offsetBottom+$.bottom)),0);return pe(Z(p,de($=>({width:$.visibleWidth,height:$.visibleHeight}))),I),{data:V,totalCount:S,viewportDimensions:I,itemDimensions:A,scrollTop:r,scrollHeight:L,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:O,smoothScrollTargetReached:a,windowViewportRect:p,windowScrollTo:g,useWindowScroll:v,customScrollParent:b,windowScrollContainerState:y,deviation:D,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:k,restoreStateFrom:F,...f,initialTopMostItemIndex:R,gridState:C,totalListHeight:G,...d,startReached:oe,endReached:K,rangeChanged:te,stateChanged:_,propsReady:h,stateRestoreInProgress:N,...T}},Je(tf,Bt,xi,lw,yr,rf,gr));function xw(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=hf(e,t,n,r[0].index),i=hf(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function hf(e,t,n,r){const o=Sw(e.width,n.width,t.column),s=fl(r/o),i=s*n.height+Ei(0,s-1)*t.row;return i>0?i+t.row:i}function Sw(e,t,n){return Ei(1,fl((e+n)/(fl(t)+n)))}const YF=Ve(([e,t])=>({...e,...t}),Je(GF,Ve(()=>{const e=re(c=>`Item ${c}`),t=re({}),n=re(null),r=re("virtuoso-grid-item"),o=re("virtuoso-grid-list"),s=re(af),i=re("div"),a=re(Gr),l=(c,u=null)=>Ft(Z(t,de(d=>d[c]),et()),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")}}))),qF=w.memo(function(){const t=ot("gridState"),n=ot("listClassName"),r=ot("itemClassName"),o=ot("itemContent"),s=ot("computeItemKey"),i=ot("isSeeking"),a=pn("scrollHeight"),l=ot("ItemComponent"),c=ot("ListComponent"),u=ot("ScrollSeekPlaceholder"),d=ot("context"),f=pn("itemDimensions"),h=pn("gap"),m=ot("log"),p=ot("stateRestoreInProgress"),v=_n(w.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:Ew("row-gap",getComputedStyle(b).rowGap,m),column:Ew("column-gap",getComputedStyle(b).columnGap,m)})},[a,f,h,m]));return p?null:w.createElement(c,{ref:v,className:n,...dt(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?w.createElement(u,{key:y,...dt(u,d),index:b.index,height:t.itemHeight,width:t.itemWidth}):w.createElement(l,{...dt(l,d),className:r,"data-index":b.index,key:y},o(b.index,b.data,d))}))}),KF=w.memo(function(){const t=ot("HeaderComponent"),n=pn("headerHeight"),r=ot("headerFooterTag"),o=_n(w.useMemo(()=>i=>n(fn(i,"height")),[n])),s=ot("context");return t?w.createElement(r,{ref:o},w.createElement(t,dt(t,s))):null}),ZF=w.memo(function(){const t=ot("FooterComponent"),n=pn("footerHeight"),r=ot("headerFooterTag"),o=_n(w.useMemo(()=>i=>n(fn(i,"height")),[n])),s=ot("context");return t?w.createElement(r,{ref:o},w.createElement(t,dt(t,s))):null}),XF=({children:e})=>{const t=w.useContext(pw),n=pn("itemDimensions"),r=pn("viewportDimensions"),o=_n(w.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]));return w.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),w.createElement("div",{style:as(!1),ref:o},e)},QF=({children:e})=>{const t=w.useContext(pw),n=pn("windowViewportRect"),r=pn("itemDimensions"),o=ot("customScrollParent"),s=sf(n,o);return w.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),w.createElement("div",{ref:s,style:as(!1)},e)},JF=w.memo(function({...t}){const n=ot("useWindowScroll"),r=ot("customScrollParent"),o=r||n?t2:e2,s=r||n?QF:XF;return w.createElement(o,{...t},w.createElement(s,null,w.createElement(KF,null),w.createElement(qF,null),w.createElement(ZF,null)))}),{Component:xB,usePublisher:pn,useEmitterValue:ot,useEmitter:Tw}=Hd(YF,{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"}},JF),e2=lf({usePublisher:pn,useEmitterValue:ot,useEmitter:Tw}),t2=cf({usePublisher:pn,useEmitterValue:ot,useEmitter:Tw});function Ew(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Qt.WARN),t==="normal"?0:parseInt(t??"0",10)}const n2=Ve(([e,t])=>({...e,...t}),Je(dw,Ve(()=>{const e=re(l=>w.createElement("td",null,"Item $",l)),t=re(null),n=re(null),r=re(null),o=re({}),s=re(af),i=re(Gr),a=(l,c=null)=>Ft(Z(o,de(u=>u[l]),et()),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")}}))),r2=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e}})),o2=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e,padding:0,border:0}})),s2={overflowAnchor:"none"},i2=w.memo(function(){const t=He("listState"),n=mn("sizeRanges"),r=He("useWindowScroll"),o=He("customScrollParent"),s=mn("windowScrollContainerState"),i=mn("scrollContainerState"),a=o||r?s:i,l=He("itemContent"),c=He("trackItemSizes"),u=He("itemSize"),d=He("log"),{callbackRef:f,ref:h}=B0(n,u,c,a,d,void 0,o),[m,p]=w.useState(0);pf("deviation",F=>{m!==F&&(h.current.style.marginTop=`${F}px`,p(F))});const v=He("EmptyPlaceholder"),b=He("ScrollSeekPlaceholder")||r2,y=He("FillerRow")||o2,g=He("TableBodyComponent"),T=He("TableRowComponent"),S=He("computeItemKey"),E=He("isSeeking"),C=He("paddingTopAddition"),I=He("firstItemIndex"),A=He("statefulTotalCount"),O=He("context");if(A===0&&v)return w.createElement(v,dt(v,O));const L=t.offsetTop+C+m,D=t.offsetBottom,V=L>0?w.createElement(y,{height:L,key:"padding-top",context:O}):null,k=D>0?w.createElement(y,{height:D,key:"padding-bottom",context:O}):null,_=t.items.map(F=>{const N=F.originalIndex,R=S(N+I,F.data,O);return E?w.createElement(b,{...dt(b,O),key:R,index:F.index,height:F.size,type:F.type||"item"}):w.createElement(T,{...dt(T,O),...gw(T,F.data),key:R,"data-index":N,"data-known-size":F.size,"data-item-index":F.index,style:s2},l(F.index,F.data,O))});return w.createElement(g,{ref:f,"data-testid":"virtuoso-item-list",...dt(g,O)},[V,..._,k])}),a2=({children:e})=>{const t=w.useContext(dl),n=mn("viewportHeight"),r=mn("fixedItemHeight"),o=_n(w.useMemo(()=>pi(n,s=>fn(s,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:as(!1),ref:o,"data-viewport-type":"element"},e)},l2=({children:e})=>{const t=w.useContext(dl),n=mn("windowViewportRect"),r=mn("fixedItemHeight"),o=He("customScrollParent"),s=sf(n,o);return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:as(!1),"data-viewport-type":"window"},e)},c2=w.memo(function(t){const n=He("useWindowScroll"),r=He("customScrollParent"),o=mn("fixedHeaderHeight"),s=mn("fixedFooterHeight"),i=He("fixedHeaderContent"),a=He("fixedFooterContent"),l=He("context"),c=_n(w.useMemo(()=>pi(o,y=>fn(y,"height")),[o])),u=_n(w.useMemo(()=>pi(s,y=>fn(y,"height")),[s])),d=r||n?f2:d2,f=r||n?l2:a2,h=He("TableComponent"),m=He("TableHeadComponent"),p=He("TableFooterComponent"),v=i?w.createElement(m,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...dt(m,l)},i()):null,b=a?w.createElement(p,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...dt(p,l)},a()):null;return w.createElement(d,{...t},w.createElement(f,null,w.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...dt(h,l)},[v,w.createElement(i2,{key:"TableBody"}),b])))}),{Component:u2,usePublisher:mn,useEmitterValue:He,useEmitter:pf}=Hd(n2,{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"}},c2),d2=lf({usePublisher:mn,useEmitterValue:He,useEmitter:pf}),f2=cf({usePublisher:mn,useEmitterValue:He,useEmitter:pf}),h2=u2,Cw=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>x.jsxs("div",{className:De("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:[s,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(M0,{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(Py,{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(w.Fragment,{children:[x.jsx(Ey,{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(zI,{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]}),Ci=w.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:m,componentName:p,placeholder:v,hideLeft:b=!1,required:y,disabled:g,reportStatus:T},S)=>{const E=z_(),C=T!==void 0?T:E.input.iconFeedback,I=d??h,A=Et(),O=e??A.inputOptionalLabel;return x.jsxs("fieldset",{ref:S,form:u,disabled:g,"data-error":!!c,"aria-disabled":g,"data-component":p,"data-interactive":!!s,className:De("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[x.jsxs("label",{form:u,htmlFor:I,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(Cw,{info:a,hideLeft:b,reportStatus:C,title:m,placeholder:v,children:O||n?x.jsxs(w.Fragment,{children:[y?null:x.jsx("span",{"aria-disabled":g,className:"text-opacity-70 aria-disabled:text-disabled",children:O}),n?x.jsx(w.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 ${f}`,children:[t?x.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,i?x.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:i}):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})]})}),p2=e=>x.jsx(w.Fragment,{children:e.children}),m2={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},g2={caseSensitive:!1,sort:!1},y2=[],v2=w.forwardRef(function(t,n){return x.jsx(lt.ul,{...t,ref:n,className:"w-full rounded-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(er,{children:t.children})})}),b2=w.forwardRef(function({item:t,context:n,...r},o){return x.jsx(lt.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),w2={List:v2,Item:b2},ls=320,mf=40,x2=w.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,...m},p)=>{const v=w.useRef(null),b=w.useRef(null),y=m.value??m.defaultValue??"",g=Et(),[T,S]=w.useState(()=>Math.min(ls,mf*e.length)),[E,C]=w.useState(!1),[I,A]=w.useState(""),[O,L]=w.useState(y),[D,V]=w.useState(()=>{var q;return((q=e.find(ie=>ie.value===y))==null?void 0:q.label)??y}),[k,_]=w.useState(null),F=w.useRef(y2),N=t&&I!==""?[{value:I,label:I,"data-dynamic":"true"},...e]:e,R=new Ur(N,["value","label"],g2).search(I),H=()=>{C(!1),S(0)},M=R.filter(q=>q.hidden!==!0),B=t?void 0:`^(${e.map(q=>`${fc(q.value)}${q.label?"|"+fc(q.label):""}`).join("|")})$`;w.useEffect(()=>{if(m.value){const q=e.find(ie=>ie.value===m.value);L((q==null?void 0:q.label)??m.value)}},[m.value]),w.useEffect(()=>{E||S(0)},[E]),w.useEffect(()=>{if(!E)return;const q=G.floating;if(q.current===null)return;let ie=0;Array.from(q.current.querySelectorAll("li")).slice(0,Math.min(R.length,10)).forEach(ye=>{const ue=ye.getBoundingClientRect();ie+=ue.height});const ee=Math.min(ie,ls);S(ee)},[I,E]);const{x:K,y:oe,strategy:te,refs:G,context:$}=zr({open:E,transform:!0,strategy:"absolute",onOpenChange:C,whileElementsMounted:ai,middleware:[li(4),Ob({padding:10,elementContext:"reference",apply(q){var ue;const ie=(ue=v.current)==null?void 0:ue.getBoundingClientRect().width,z=q.elements.floating.querySelector("ul"),ee=(z==null?void 0:z.getBoundingClientRect().height)||0,ye=Math.min(ee<mf?ls:ee,ls);xs.flushSync(()=>setTimeout(()=>{const je=(z==null?void 0:z.getBoundingClientRect().height)??0;return je<mf?void S(ye):void S(Math.min(je,ls))},50)),Object.assign(q.elements.floating.style,{width:`${ie}px`,maxWidth:`${ie}px`,maxHeight:`${ls}`})}})]}),j=f0($,m2),{getReferenceProps:W,getFloatingProps:Y,getItemProps:Q}=Wr([Hr($,{role:"listbox"}),jr($),Dd($,{cols:0,listRef:F,loop:!0,virtual:!0,allowEscape:!0,activeIndex:k,selectedIndex:k,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:q=>_(ie=>q??ie)})]);w.useEffect(()=>{const q=G.reference.current;if(q)return Os(q)},[]);const fe=(q,ie)=>{L(q.value);const z=G.reference.current;if(!z)return;z==null||z.setAttribute("data-value",q.value),z.value=q.value;const ee=new Event("change",{bubbles:!1,cancelable:!0});z.dispatchEvent(ee),m.onChange&&m.onChange(ee),V(q.label??""),H(),A(""),_(ie)},U=q=>{var z;const ie=q.target.value;return A(ie),!E&&ie===""?C(!0):(q.target.name=m.name||"",ie?C(!0):(z=m.onChange)==null?void 0:z.call(m,q))},Ae=()=>{var q;C(!0),A(""),(q=G.reference.current)==null||q.focus()},Ke=()=>{C(!0),A("")},Be=()=>{var q;(q=G.reference.current)==null||q.setAttribute("data-value",""),A(""),L(""),V(""),uc(G.reference.current),H()},Ce=m.id||m.name;return x.jsxs(Ci,{...m,left:d,error:f,ref:v,form:m.form,name:m.name,feedback:n,hideLeft:c,required:h,title:m.title,container:l,rightLabel:i,interactive:s,id:m.name||m.id,optionalText:a,componentName:"autocomplete",labelClassName:r,placeholder:m.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:Ae,children:[x.jsx(Eu,{size:20}),x.jsx("span",{className:"sr-only",children:g.inputCaretDown})]}),O?x.jsx("button",{type:"button",onClick:Be,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",...W({...m,onChange:U,onFocus:Ke,pattern:B,ref:G.setReference,name:`${Ce}-shadow`,id:`${Ce}-shadow`,onClick:q=>q.currentTarget.focus(),onKeyDown(q){var ie,z;if(q.key==="ArrowDown"){let ee=k+1;return ee>R.length-1&&(ee=0),(ie=b.current)==null||ie.scrollIntoView({index:ee}),_(ee)}if(q.key==="ArrowUp"){let ee=k-1;return ee<0&&(ee=R.length-1),(z=b.current)==null||z.scrollIntoView({index:ee}),_(ee)}if(q.key==="Escape")return q.currentTarget.blur(),H();if(q.key==="Enter"){if(k!==null&&R[k])return q.preventDefault(),fe(R[k],k);if(R.length===1)return q.preventDefault(),fe(R[0],0)}}}),"data-value":O,"data-error":!!f,"data-name":Ce,"data-target":Ce,required:h,value:E?I:D||O,"aria-autocomplete":"list",autoComplete:"off",className:De("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",m.className)}),x.jsx("input",{id:Ce,name:Ce,type:"hidden","data-origin":Ce,ref:p,required:h,defaultValue:m.value||O||void 0}),x.jsx(Rr,{preserveTabOrder:!0,children:E?x.jsx(Zo,{guards:!0,returnFocus:!1,context:$,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("ul",{...Y({ref:G.setFloating,style:{...j.styles,position:te,left:(K??0)+(O?26:18),top:oe??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:[R.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||g.autocompleteEmpty})}):null,x.jsx(df,{ref:b,data:M,components:w2,hidden:M.length===0,className:"rounded-lg border-floating-border bg-floating-background p-0 text-foreground",style:{height:T},itemContent:(q,ie)=>{const z=ie.Render??p2,ee=O===ie.value||O===ie.label,ye=k===q,ue=ie.label??ie.value;return x.jsx("button",{"data-value":ie.value,...Q({ref:je=>void(F.current[q]=je),role:"option",type:"button","aria-checked":ee,"aria-current":ee,"aria-selected":ee,"aria-busy":ie.disabled,onClick:()=>fe(ie,q),className:`cursor-pointer w-full p-2 text-left ${ee?"bg-primary-hover text-primary-foreground":""} ${ye?"bg-floating-hover text-floating-foreground":""}`}),children:x.jsx(z,{...m,label:ie.label,value:ie.value,children:ue})})}})]})}):null})]})});class cs extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof cs&&(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 cs(this)}}const gf=w.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:s,container:i,...a},l)=>x.jsxs("label",{"data-task":t,"data-component":"checkbox","data-disabled":a.disabled,"aria-disabled":a.disabled,className:De("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",i),children:[x.jsx("input",{...a,ref:l,type:"checkbox","data-task":t,className:De("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:De("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),S2=e=>x.jsx(w.Fragment,{children:e.children}),T2={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},E2={caseSensitive:!1,sort:!1},Pw=[],C2=w.forwardRef(function(t,n){return x.jsx(lt.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(er,{children:t.children})})}),P2=w.forwardRef(function({item:t,context:n,...r},o){return x.jsx(lt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),k2={List:C2,Item:P2},I2=e=>{const t=Et(),n=w.useRef(null),r=w.Children.count(e.children),[o,s]=w.useState(!1);return w.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]),x.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?x.jsxs(pc,{size:"small","data-multicounter":"true",children:[r," ",t.multiComboboxSelectedLabel]}):e.children})},A2=w.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:m=!1,...p},v)=>{const b=w.useMemo(()=>new cs(r.map(z=>[z.value,z])),[r]),y=w.useRef(null),g=w.useRef(null),T=p.value??p.defaultValue??Pw,S=Et(),[E,C]=w.useState(0),[I,A]=w.useState(!1),[O,L]=w.useState(""),[D,V]=w.useState(()=>{const z=new cs;return T.forEach(ee=>{const ye=b.get(ee);return ye?z.set(ee,ye):void 0}),z}),k=w.useMemo(()=>Array.from(D.keys()),[D]),[_,F]=w.useState(()=>{const z=new Set(T);return r.reduce((ee,ye)=>z.has(ye.value)?[...ee,ye.label??ye.value]:ee,[])??T}),[N,R]=w.useState(null),H=w.useRef(Pw),M=m&&O!==""?[{value:O,label:O,"data-dynamic":"true"},...r]:r,B=new Ur(M,["value","label"],E2).search(O);w.useEffect(()=>{I||C(0)},[I]),w.useEffect(()=>{p.value&&V(new cs(p.value.map(z=>[z,b.get(z)])))},[p.value,b]);const{x:K,y:oe,strategy:te,refs:G,context:$}=zr({open:I,transform:!0,strategy:"absolute",onOpenChange:A,whileElementsMounted:ai,middleware:[li(4),Ob({padding:10,elementContext:"reference",apply(z){var ue;const ee=(ue=y.current)==null?void 0:ue.getBoundingClientRect().width,ye=360;xs.flushSync(()=>setTimeout(()=>C(ye),200)),Object.assign(z.elements.floating.style,{width:`${ee}px`,maxWidth:`${ee}px`,maxHeight:`${ye}px`,height:`${ye}px`})}})]}),j=f0($,T2),{getReferenceProps:W,getFloatingProps:Y,getItemProps:Q}=Wr([Hr($,{role:"listbox"}),jr($),Dd($,{cols:0,listRef:H,loop:!0,virtual:!0,allowEscape:!0,activeIndex:N,selectedIndex:N,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:z=>R(ee=>z??ee)})]);w.useEffect(()=>{const z=G.reference.current;if(z)return Os(z)},[]);const fe=(z,ee)=>{const ye=D.clone();D.has(z.value)?ye.delete(z.value):ye.set(z.value,z),V(ye);const ue=G.reference.current;if(!ue)return;ue==null||ue.setAttribute("data-value",z.value),ue.value=Array.from(ye.values());const je=new Event("change",{bubbles:!1,cancelable:!0});ue.dispatchEvent(je),p.onChange&&p.onChange(je),F(ne=>ne.concat(z.label??"")),L(""),R(ee)},U=z=>{const ee=z.target.value;return L(ee),!I&&ee===""?A(!0):(z.target.name=p.name||"",ee?A(!0):void 0)},Ae=()=>{var z;A(!0),L(""),(z=G.reference.current)==null||z.focus()},Ke=()=>{A(!0),L("")},Be=()=>{var z;(z=G.reference.current)==null||z.setAttribute("data-value",""),L(""),uc(G.reference.current),A(!1)},Ce=p.id||p.name,q=D.map(z=>x.jsx(pc,{size:"small",children:z.label??z.value},`multicombobox-${z.value}-x`)),ie=B.filter(z=>z.hidden!==!0);return x.jsxs(Ci,{...p,left:e,error:t,ref:y,form:p.form,name:p.name,feedback:d,hideLeft:f,required:h,title:p.title,container:o,rightLabel:s,interactive:i,id:p.name||p.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:p.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:Ae,children:[x.jsx(Eu,{size:20}),x.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),D?x.jsx("button",{type:"button",onClick:Be,className:"transition-colors link:text-danger",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("button",{...W({...p,onFocus:Ke,id:`${Ce}-shadow`,name:`${Ce}-shadow`,ref:G.setReference}),type:"button","data-name":Ce,"data-target":Ce,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":k.join(","),value:I?O:_||D,className:De("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",p.className),children:x.jsx(I2,{label:c,children:q})}),x.jsx("input",{id:Ce,name:Ce,type:"hidden","data-origin":Ce,ref:v,required:h,defaultValue:p.value||k||void 0}),x.jsx(Rr,{preserveTabOrder:!0,children:I?x.jsx(Zo,{guards:!0,returnFocus:!1,context:$,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("div",{...Y({ref:G.setFloating,style:{...j.styles,position:te,left:(K??0)+(D?26:18),top:oe??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:O,onChange:U,title:p.title,placeholder:S.multiComboboxInnerPlaceholder,onKeyDown:z=>{var ee,ye;if(z.key==="ArrowDown"){let ue=N+1;return ue>B.length-1&&(ue=0),(ee=g.current)==null||ee.scrollIntoView({index:ue}),R(ue)}if(z.key==="ArrowUp"){let ue=N-1;return ue<0&&(ue=B.length-1),(ye=g.current)==null||ye.scrollIntoView({index:ue}),R(ue)}if(z.key==="Escape")return z.currentTarget.blur(),A(!1);if(z.key==="Enter"){if(N!==null&&B[N])return z.preventDefault(),fe(B[N],N);if(B.length===1)return z.preventDefault(),fe(B[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"}),B.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:a||S.autocompleteEmpty})}):null,x.jsx(df,{ref:g,data:ie,components:k2,hidden:ie.length===0,style:{height:D.size===0?E-49:E-86},className:"border-floating-border bg-floating-background p-0 text-foreground",itemContent:(z,ee)=>{const ye=ee.Render??S2,ue=D.has(ee.value)||D.has(ee.label??""),je=N===z,ne=ee.label??ee.value;return x.jsx("button",{"data-value":ee.value,...Q({ref:le=>void(H.current[z]=le),role:"option",type:"button","aria-checked":ue,"aria-current":ue,"aria-selected":ue,"aria-busy":ee.disabled,onClick:()=>fe(ee,z)}),className:`w-full cursor-pointer p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${ue||je?"bg-floating-hover text-floating-foreground":""}`,children:x.jsx(gf,{onChange:hc,checked:ue,"aria-checked":ue,onClick:le=>(le.stopPropagation(),void le.preventDefault()),children:x.jsx(ye,{...p,label:ee.label,value:ee.value,children:ne})})})}}),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:q})]})}):null})]})}),kw=(e,t,n,r)=>w.forwardRef(({info:s,left:i,next:a,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:h,type:m="text",labelClassName:p,feedback:v=null,hideLeft:b=!1,...y},g)=>{const T=e,S=y.id??y.name,E=w.useRef(null);return w.useEffect(()=>{if(E.current===null)return;const C=E.current,I=Os(E.current),A=r==null?void 0:r(C),O=L=>{const D=L;if(D.key==="Enter"&&C.enterKeyHint==="next"){const V=C.getAttribute("data-next");if(V){const k=document.getElementById(V);if(k)return k.focus(),void D.preventDefault()}}};return C.addEventListener("keydown",O),()=>{A==null||A(),I(),C.removeEventListener("keydown",O)}},[]),x.jsx(Ci,{...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:p,placeholder:y.placeholder,children:x.jsx(T,{...n,...y,id:S,name:S,type:m,"data-next":a,"aria-busy":y.disabled,"aria-disabled":y.disabled,"aria-readonly":y.readOnly,ref:cc(g,E),className:De("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)})})}),Pi=kw(lv,"input",{type:"text"}),Iw=new Date(1970,11,31),yf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Aw={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},O2={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")},vf=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},_2=w.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=t||Uu(),l=w.useId(),c=Et(),u=w.useMemo(()=>new Intl.DateTimeFormat(a),[a]),[d,f]=w.useState(e||void 0),[h,m]=w.useState(!1),p=vf(u,Iw).flatMap(C=>it.keyof(yf,C.type)?yf[C.type](C.value):[]),v=vf(u,Iw).reduce((C,I)=>C+(it.keyof(Aw,I.type)?Aw[I.type](I.value):""),""),[b,y]=w.useState(d?vf(u,d).reduce((C,I)=>C+(it.keyof(yf,I.type)?O2[I.type](d,I.value):""),""):""),g=C=>{const I=C.target.value;if(y(I),p.length===I.length&&p.every((O,L)=>{const D=I.charAt(L);return typeof O=="string"?D===O:O.test(D)})){const O=Do(QO(I,v,new Date));return f(O),r==null?void 0:r(O)}return f(void 0),r==null?void 0:r(void 0)},T=C=>(f(C),r==null||r(C),y(C?JA(C,v):"")),S=Dy(d),E=S?d.toISOString():void 0;return x.jsx(Pi,{...s,mask:p,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:x.jsxs(w.Fragment,{children:[x.jsx("input",{"data-origin":s.name,defaultValue:E,form:s.form,hidden:!0,id:s.name,name:s.name,ref:i,type:"date"}),x.jsx(Qo,{open:h,onChange:m,trigger:x.jsxs("span",{"aria-labelledby":l,children:[x.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),x.jsx(BI,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(Iv,{...s,locale:a,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:S?d:void 0})})]})})}),M2=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],D2=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],N2=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],L2=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Ow=(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 _w(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?L2:N2:t.binary?D2:M2,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=Ow(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=Ow(Number(e),t.locale,i),c=n[a];return s+l+r+c}var bf={exports:{}},pl={exports:{}},$e={};/** @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])"],Ts=WM.join(","),Yb=typeof Element>"u",Ro=Yb?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ss=!Yb&&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},Es=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},qM=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},UM=function(t,n,r){if(Es(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ts));return n&&Ro.call(t,Ts)&&o.unshift(t),o=o.filter(r),o},GM=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Es(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=Ro.call(a,Ts);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Es(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},Kb=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Zb=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||qM(t))&&!Kb(t)?0:t.tabIndex},YM=function(t,n){var r=Zb(t);return r<0&&n&&!Kb(t)?0:r},KM=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Xb=function(t){return t.tagName==="INPUT"},ZM=function(t){return Xb(t)&&t.type==="hidden"},XM=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},QM=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},JM=function(t){if(!t.name)return!0;var n=t.form||Ss(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=QM(o,t.form);return!i||i===t},eD=function(t){return Xb(t)&&t.type==="radio"},tD=function(t){return eD(t)&&!JM(t)},nD=function(t){var n,r=t&&Ss(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=Ss(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},Qb=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},rD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Ro.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Ro.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=Ss(t);if(l&&!l.shadowRoot&&o(l)===!0)return Qb(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(nD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Qb(t);return!1},oD=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 Ro.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},iD=function(t,n){return!(n.disabled||Es(n)||ZM(n)||rD(n,t)||XM(n)||oD(n))},kd=function(t,n){return!(tD(n)||Zb(n)<0||!iD(t,n))},aD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},sD=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=YM(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)},Yi=function(t,n){n=n||{};var r;return n.getShadowRoot?r=GM([t],n.includeContainer,{filter:kd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:aD}):r=UM(t,n.includeContainer,kd.bind(null,n)),sD(r)},lD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ro.call(t,Ts)===!1?!1:kd(n,t)};function Jb(e,t,n){let{reference:r,floating:o}=e;const i=Rr(t),a=Ed(t),s=Sd(a),l=sr(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(jo(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const cD=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}=Jb(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:x,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=x??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}=Jb(c,p,l)),y=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function Pd(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}=Vo(t,e),h=Gb(f),g=s[p?d==="floating"?"reference":"floating":d],v=ws(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,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},T=ws(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:m,offsetParent:x,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 uD=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}=Vo(e,t)||{};if(c==null)return{};const d=Gb(u),p={x:n,y:r},f=Ed(o),h=Sd(f),y=await a.getDimensions(c),g=f==="y",v=g?"top":"left",m=g?"bottom":"right",x=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[x]:0;(!C||!await(a.isElement==null?void 0:a.isElement(w)))&&(C=s.floating[x]||i.floating[h]);const k=S/2-T/2,I=C/2-y[h]/2-1,A=On(d[v],I),F=On(d[m],I),N=A,V=C-y[h]-F,P=C/2-y[h]/2+k,O=Td(N,P,V),L=!l.arrow&&jo(o)!=null&&P!==O&&i.reference[h]/2-(P<N?A:F)-y[h]/2<0,j=L?P<N?P-N:P-V:0;return{[f]:p[f]+j,data:{[f]:O,centerOffset:P-O-j,...L&&{alignmentOffset:j}},reset:L}}}),dD=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}=Vo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=sr(o),m=Rr(s),x=sr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=p||(x||!y?[xs(s)]:$M(s)),w=h!=="none";!p&&w&&T.push(...BM(s,y,h,S));const C=[s,...T],k=await Pd(t,g),I=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[v]),d){const P=RM(o,a,S);I.push(k[P[0]],k[P[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every(P=>P<=0)){var F,N;const P=(((F=i.flip)==null?void 0:F.index)||0)+1,O=C[P];if(O)return{data:{index:P,overflows:A},reset:{placement:O}};let L=(N=A.filter(j=>j.overflows[0]<=0).sort((j,D)=>j.overflows[1]-D.overflows[1])[0])==null?void 0:N.placement;if(!L)switch(f){case"bestFit":{var V;const j=(V=A.filter(D=>{if(w){const q=Rr(D.placement);return q===m||q==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(q=>q>0).reduce((q,M)=>q+M,0)]).sort((D,q)=>D[1]-q[1])[0])==null?void 0:V[0];j&&(L=j);break}case"initialPlacement":L=s;break}if(o!==L)return{reset:{placement:L}}}return{}}}};async function fD(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=sr(n),s=jo(n),l=Rr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=Vo(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 pD=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 fD(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}}}}},hD=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}=Vo(e,t),c={x:n,y:r},u=await Pd(t,l),d=Rr(sr(o)),p=Ub(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],x=f-u[v];f=Td(m,f,x)}if(a){const g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",m=h+u[g],x=h-u[v];h=Td(m,h,x)}const y=s.fn({...t,[p]:f,[d]:h});return{...y,data:{x:y.x-n,y:y.y-r}}}}},mD=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}=Vo(e,t),l=await Pd(t,s),c=sr(n),u=jo(n),d=Rr(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=On(f-l[h],g),x=On(p-l[y],v),S=!t.middlewareData.shift;let T=m,w=x;if(d?w=u||S?On(x,v):v:T=u||S?On(m,g):g,S&&!u){const k=Jt(l.left,0),I=Jt(l.right,0),A=Jt(l.top,0),F=Jt(l.bottom,0);d?w=p-2*(k!==0||I!==0?k+I:Jt(l.left,l.right)):T=f-2*(A!==0||F!==0?A+F:Jt(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 ex(e){const t=Qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Et(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=bs(n)!==i||bs(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ad(e){return Qe(e)?e:e.contextElement}function $o(e){const t=Ad(e);if(!Et(t))return ar(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ex(t);let a=(i?bs(n.width):n.width)/r,s=(i?bs(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const gD=ar(0);function tx(e){const t=Ht(e);return!hd()||!t.visualViewport?gD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ht(e)?!1:t}function $r(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ad(e);let a=ar(1);t&&(r?Qe(r)&&(a=$o(r)):a=$o(e));const s=vD(i,n,r)?tx(i):ar(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=Ht(i),f=r&&Qe(r)?Ht(r):r;let h=p,y=md(h);for(;y&&r&&f!==h;){const g=$o(y),v=y.getBoundingClientRect(),m=Qt(y),x=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+=x,c+=S,h=Ht(y),y=md(h)}}return ws({width:u,height:d,x:l,y:c})}function yD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Wn(r),s=t?vs(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ar(1);const u=ar(0),d=Et(r);if((d||!d&&!i)&&((rr(r)!=="body"||Gi(a))&&(l=ys(r)),Et(r))){const p=$r(r);c=$o(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 bD(e){return Array.from(e.getClientRects())}function nx(e){return $r(Wn(e)).left+ys(e).scrollLeft}function xD(e){const t=Wn(e),n=ys(e),r=e.ownerDocument.body,o=Jt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Jt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+nx(e);const s=-n.scrollTop;return Qt(r).direction==="rtl"&&(a+=Jt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function wD(e,t){const n=Ht(e),r=Wn(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=hd();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function TD(e,t){const n=$r(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Et(e)?$o(e):ar(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 rx(e,t,n){let r;if(t==="viewport")r=wD(e,n);else if(t==="document")r=xD(Wn(e));else if(Qe(t))r=TD(t,n);else{const o=tx(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return ws(r)}function ox(e,t){const n=qn(e);return n===t||!Qe(n)||or(n)?!1:Qt(n).position==="fixed"||ox(n,t)}function SD(e,t){const n=t.get(e);if(n)return n;let r=ir(e,[],!1).filter(s=>Qe(s)&&rr(s)!=="body"),o=null;const i=Qt(e).position==="fixed";let a=i?qn(e):e;for(;Qe(a)&&!or(a);){const s=Qt(a),l=pd(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Gi(a)&&!l&&ox(e,a))?r=r.filter(u=>u!==a):o=s,a=qn(a)}return t.set(e,r),r}function ED(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?vs(t)?[]:SD(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=rx(t,u,o);return c.top=Jt(d.top,c.top),c.right=On(d.right,c.right),c.bottom=On(d.bottom,c.bottom),c.left=Jt(d.left,c.left),c},rx(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function CD(e){const{width:t,height:n}=ex(e);return{width:t,height:n}}function kD(e,t,n){const r=Et(t),o=Wn(t),i=n==="fixed",a=$r(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=ar(0);if(r||!r&&!i)if((rr(t)!=="body"||Gi(o))&&(s=ys(t)),r){const d=$r(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=nx(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 _d(e){return Qt(e).position==="static"}function ix(e,t){return!Et(e)||Qt(e).position==="fixed"?null:t?t(e):e.offsetParent}function ax(e,t){const n=Ht(e);if(vs(e))return n;if(!Et(e)){let o=qn(e);for(;o&&!or(o);){if(Qe(o)&&!_d(o))return o;o=qn(o)}return n}let r=ix(e,t);for(;r&&OM(r)&&_d(r);)r=ix(r,t);return r&&or(r)&&_d(r)&&!pd(r)?n:r||MM(e)||n}const PD=async function(e){const t=this.getOffsetParent||ax,n=this.getDimensions,r=await n(e.floating);return{reference:kD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function AD(e){return Qt(e).direction==="rtl"}const _D={convertOffsetParentRelativeRectToViewportRelativeRect:yD,getDocumentElement:Wn,getClippingRect:ED,getOffsetParent:ax,getElementRects:PD,getClientRects:bD,getDimensions:CD,getScale:$o,isElement:Qe,isRTL:AD};function ID(e,t){let n=null,r;const o=Wn(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=Lo(u),h=Lo(o.clientWidth-(c+d)),y=Lo(o.clientHeight-(u+p)),g=Lo(c),m={rootMargin:-f+"px "+-h+"px "+-y+"px "+-g+"px",threshold:Jt(0,On(1,l))||1};let x=!0;function S(T){const w=T[0].intersectionRatio;if(w!==l){if(!x)return a();w?a(!1,w):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(S,{...m,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,m)}n.observe(e)}return a(!0),i}function Ki(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=Ad(e),u=o||i?[...c?ir(c):[],...ir(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?ID(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(v=>{let[m]=v;m&&m.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let h,y=l?$r(e):null;l&&g();function g(){const v=$r(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 OD=pD,MD=hD,DD=dD,ND=mD,sx=uD,FD=(e,t,n)=>{const r=new Map,o={platform:_D,...n},i={...o.platform,_c:r};return cD(e,t,{...o,platform:i})};var Cs=typeof document<"u"?E.useLayoutEffect:E.useEffect;function ks(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(!ks(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)&&!ks(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function lx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cx(e,t){const n=lx(e);return Math.round(t*n)/n}function Id(e){const t=_.useRef(e);return Cs(()=>{t.current=e}),t}function LD(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]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=_.useState(r);ks(p,r)||f(r);const[h,y]=_.useState(null),[g,v]=_.useState(null),m=_.useCallback(D=>{D!==w.current&&(w.current=D,y(D))},[]),x=_.useCallback(D=>{D!==C.current&&(C.current=D,v(D))},[]),S=i||h,T=a||g,w=_.useRef(null),C=_.useRef(null),k=_.useRef(u),I=l!=null,A=Id(l),F=Id(o),N=Id(c),V=_.useCallback(()=>{if(!w.current||!C.current)return;const D={placement:t,strategy:n,middleware:p};F.current&&(D.platform=F.current),FD(w.current,C.current,D).then(q=>{const M={...q,isPositioned:N.current!==!1};P.current&&!ks(k.current,M)&&(k.current=M,ka.flushSync(()=>{d(M)}))})},[p,t,n,F,N]);Cs(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(D=>({...D,isPositioned:!1})))},[c]);const P=_.useRef(!1);Cs(()=>(P.current=!0,()=>{P.current=!1}),[]),Cs(()=>{if(S&&(w.current=S),T&&(C.current=T),S&&T){if(A.current)return A.current(S,T,V);V()}},[S,T,V,A,I]);const O=_.useMemo(()=>({reference:w,floating:C,setReference:m,setFloating:x}),[m,x]),L=_.useMemo(()=>({reference:S,floating:T}),[S,T]),j=_.useMemo(()=>{const D={position:n,left:0,top:0};if(!L.floating)return D;const q=cx(L.floating,u.x),M=cx(L.floating,u.y);return s?{...D,transform:"translate("+q+"px, "+M+"px)",...lx(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:M}},[n,s,L.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:V,refs:O,elements:L,floatingStyles:j}),[u,V,O,L,j])}const VD=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?sx({element:r.current,padding:o}).fn(n):{}:r?sx({element:r,padding:o}).fn(n):{}}}},Zi=(e,t)=>({...OD(e),options:[e,t]}),Od=(e,t)=>({...MD(e),options:[e,t]}),Md=(e,t)=>({...DD(e),options:[e,t]}),ux=(e,t)=>({...ND(e),options:[e,t]}),dx=(e,t)=>({...VD(e),options:[e,t]});function Dd(e){return _.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const fx={..._},jD=fx.useInsertionEffect||(e=>e());function Pt(e){const t=_.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return jD(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Nd="ArrowUp",Xi="ArrowDown",zo="ArrowLeft",Bo="ArrowRight";function Ps(e,t,n){return Math.floor(e/t)!==n}function Qi(e,t){return t<0||t>=e.current.length}function Fd(e,t){return Rt(e,{disabledIndices:t})}function px(e,t){return Rt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Rt(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&&As(a,s,o));return s}function RD(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===Nd){if(u&&Nt(n),c===-1)d=l;else if(d=Rt(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}Qi(e,d)&&(d=c)}if(n.key===Xi&&(u&&Nt(n),c===-1?d=s:(d=Rt(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=Rt(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),Qi(e,d)&&(d=c)),r==="both"){const p=Lo(c/i);n.key===Bo&&(u&&Nt(n),c%i!==i-1?(d=Rt(e,{startingIndex:c,disabledIndices:a}),o&&Ps(d,i,p)&&(d=Rt(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Rt(e,{startingIndex:c-c%i-1,disabledIndices:a})),Ps(d,i,p)&&(d=c)),n.key===zo&&(u&&Nt(n),c%i!==0?(d=Rt(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Ps(d,i,p)&&(d=Rt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=Rt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Ps(d,i,p)&&(d=c));const f=Lo(l/i)===p;Qi(e,d)&&(o&&f?d=n.key===zo?l:Rt(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function $D(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 zD(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 As(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 hx=0;function lr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(hx);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():hx=requestAnimationFrame(i)}var ze=typeof document<"u"?E.useLayoutEffect:E.useEffect;function HD(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 WD(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 mx=_.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function qD(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=_.useState(()=>new Map),a=_.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=_.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(HD).forEach((u,d)=>{l.set(u,d)}),WD(o,l)||i(l)},[o]),_.createElement(mx.Provider,{value:_.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function gx(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=_.useContext(mx),[s,l]=_.useState(null),c=_.useRef(null),u=_.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]),_.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function Ho(){return Ho=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ho.apply(this,arguments)}let vx=!1,UD=0;const yx=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+UD++;function GD(){const[e,t]=_.useState(()=>vx?yx():void 0);return ze(()=>{e==null&&t(yx())},[]),_.useEffect(()=>{vx=!0},[]),e}const Wo=fx.useId||GD;let Ji;process.env.NODE_ENV!=="production"&&(Ji=new Set);function _s(){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=Ji)!=null&&e.has(o))){var i;(i=Ji)==null||i.add(o),console.warn(o)}}function YD(){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=Ji)!=null&&e.has(o))){var i;(i=Ji)==null||i.add(o),console.error(o)}}const bx=_.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||_s("The `ref` prop is required for `FloatingArrow`."));const g=Wo(),[v,m]=_.useState(!1);if(ze(()=>{if(!o)return;Qt(o).direction==="rtl"&&m(!0)},[o]),!o)return null;const x=c*2,S=x/2,T=a/2*(l/-8+1),w=s/2*l/4,[C,k]=r.split("-"),I=!!p,A=C==="top"||C==="bottom",F=u&&k==="end"?"bottom":"top";let N=u&&k==="end"?"right":"left";u&&v&&(N=k==="end"?"left":"right");const V=(i==null?void 0:i.x)!=null?u||i.x:"",P=(i==null?void 0:i.y)!=null?u||i.y:"",O=p||"M0,0"+(" H"+a)+(" L"+(a-T)+","+(s-w))+(" Q"+a/2+","+s+" "+T+","+(s-w))+" Z",L={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return _.createElement("svg",Ho({},y,{"aria-hidden":!0,ref:n,width:I?a:a+x,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[N]:V,[F]:P,[C]:A||I?"100%":"calc(100% - "+x/2+"px)",transform:""+L+(f??""),...h}}),x>0&&_.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:d,strokeWidth:x+(p?0:1),d:O}),_.createElement("path",{stroke:x&&!p?y.fill:"none",d:O}),_.createElement("clipPath",{id:g},_.createElement("rect",{x:-S,y:S*(I?-1:1),width:a+x,height:a})))});function xx(){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 wx=_.createContext(null),Tx=_.createContext(null),cr=()=>{var e;return((e=_.useContext(wx))==null?void 0:e.id)||null},ur=()=>_.useContext(Tx);function KD(e){const t=Wo(),n=ur(),o=cr();return ze(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function ZD(e){const{children:t,id:n}=e,r=cr();return _.createElement(wx.Provider,{value:_.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function XD(e){const{children:t}=e,n=_.useRef([]),r=_.useCallback(a=>{n.current=[...n.current,a]},[]),o=_.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=_.useState(()=>xx())[0];return _.createElement(Tx.Provider,{value:_.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function dr(e){return"data-floating-ui-"+e}function Ft(e){const t=E.useRef(e);return ze(()=>{t.current=e}),t}const Sx=dr("safe-polygon");function Ld(e,t,n){return n&&!Fo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Ex(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=ur(),h=cr(),y=Ft(c),g=Ft(l),v=Ft(n),m=_.useRef(),x=_.useRef(-1),S=_.useRef(),T=_.useRef(-1),w=_.useRef(!0),C=_.useRef(!1),k=_.useRef(()=>{}),I=_.useCallback(()=>{var O;const L=(O=o.current.openEvent)==null?void 0:O.type;return(L==null?void 0:L.includes("mouse"))&&L!=="mousedown"},[o]);_.useEffect(()=>{if(!s)return;function O(L){let{open:j}=L;j||(clearTimeout(x.current),clearTimeout(T.current),w.current=!0)}return i.on("openchange",O),()=>{i.off("openchange",O)}},[s,i]),_.useEffect(()=>{if(!s||!y.current||!n)return;function O(j){I()&&r(!1,j,"hover")}const L=Mt(a.floating).documentElement;return L.addEventListener("mouseleave",O),()=>{L.removeEventListener("mouseleave",O)}},[a.floating,n,r,s,y,I]);const A=_.useCallback(function(O,L,j){L===void 0&&(L=!0),j===void 0&&(j="hover");const D=Ld(g.current,"close",m.current);D&&!S.current?(clearTimeout(x.current),x.current=window.setTimeout(()=>r(!1,O,j),D)):L&&(clearTimeout(x.current),r(!1,O,j))},[g,r]),F=Pt(()=>{k.current(),S.current=void 0}),N=Pt(()=>{if(C.current){const O=Mt(a.floating).body;O.style.pointerEvents="",O.removeAttribute(Sx),C.current=!1}});_.useEffect(()=>{if(!s)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function L(M){if(clearTimeout(x.current),w.current=!1,u&&!Fo(m.current)||d>0&&!Ld(g.current,"open"))return;const $=Ld(g.current,"open",m.current);$?x.current=window.setTimeout(()=>{v.current||r(!0,M,"hover")},$):r(!0,M,"hover")}function j(M){if(O())return;k.current();const $=Mt(a.floating);if(clearTimeout(T.current),y.current&&o.current.floatingContext){n||clearTimeout(x.current),S.current=y.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){N(),F(),A(M,!0,"safe-polygon")}});const ie=S.current;$.addEventListener("mousemove",ie),k.current=()=>{$.removeEventListener("mousemove",ie)};return}(m.current==="touch"?!yt(a.floating,M.relatedTarget):!0)&&A(M)}function D(M){O()||o.current.floatingContext&&(y.current==null||y.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){N(),F(),A(M)}})(M))}if(Qe(a.domReference)){var q;const M=a.domReference;return n&&M.addEventListener("mouseleave",D),(q=a.floating)==null||q.addEventListener("mouseleave",D),p&&M.addEventListener("mousemove",L,{once:!0}),M.addEventListener("mouseenter",L),M.addEventListener("mouseleave",j),()=>{var $;n&&M.removeEventListener("mouseleave",D),($=a.floating)==null||$.removeEventListener("mouseleave",D),p&&M.removeEventListener("mousemove",L),M.removeEventListener("mouseenter",L),M.removeEventListener("mouseleave",j)}}},[a,s,e,u,d,p,A,F,N,r,n,v,f,g,y,o]),ze(()=>{var O;if(s&&n&&(O=y.current)!=null&&O.__options.blockPointerEvents&&I()){const j=Mt(a.floating).body;j.setAttribute(Sx,""),j.style.pointerEvents="none",C.current=!0;const D=a.floating;if(Qe(a.domReference)&&D){var L;const q=a.domReference,M=f==null||(L=f.nodesRef.current.find($=>$.id===h))==null||(L=L.context)==null?void 0:L.elements.floating;return M&&(M.style.pointerEvents=""),q.style.pointerEvents="auto",D.style.pointerEvents="auto",()=>{q.style.pointerEvents="",D.style.pointerEvents=""}}}},[s,n,h,a,f,y,I]),ze(()=>{n||(m.current=void 0,F(),N())},[n,F,N]),_.useEffect(()=>()=>{F(),clearTimeout(x.current),clearTimeout(T.current),N()},[s,a.domReference,F,N]);const V=_.useMemo(()=>{function O(L){m.current=L.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(L){const{nativeEvent:j}=L;function D(){!w.current&&!v.current&&r(!0,j,"hover")}u&&!Fo(m.current)||n||d===0||(clearTimeout(T.current),m.current==="touch"?D():T.current=window.setTimeout(D,d))}}},[u,r,n,v,d]),P=_.useMemo(()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(O){A(O.nativeEvent,!1)}}),[A]);return _.useMemo(()=>s?{reference:V,floating:P}:{},[s,V,P])}function QD(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 JD(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 qo=new WeakMap,Is=new WeakSet,Os={},Vd=0;const eN=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Cx=e=>e&&(e.host||Cx(e.parentNode)),tN=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Cx(n);return e.contains(r)?r:null}).filter(n=>n!=null);function nN(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=tN(t,e),s=new Set,l=new Set(a),c=[];Os[o]||(Os[o]=new WeakMap);const u=Os[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(rr(h)!=="script")if(s.has(h))p(h);else{const y=i?h.getAttribute(i):null,g=y!==null&&y!=="false",v=(qo.get(h)||0)+1,m=(u.get(h)||0)+1;qo.set(h,v),u.set(h,m),c.push(h),v===1&&g&&Is.add(h),m===1&&h.setAttribute(o,""),!g&&i&&h.setAttribute(i,"true")}})}return Vd++,()=>{c.forEach(f=>{const h=(qo.get(f)||0)-1,y=(u.get(f)||0)-1;qo.set(f,h),u.set(f,y),h||(!Is.has(f)&&i&&f.removeAttribute(i),Is.delete(f)),y||f.removeAttribute(o)}),Vd--,Vd||(qo=new WeakMap,qo=new WeakMap,Is=new WeakSet,Os={})}}function kx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Mt(e[0]).body;return nN(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Uo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Px(e,t){const n=Yi(e,Uo());t==="prev"&&n.reverse();const r=n.indexOf(mn(Mt(e)));return n.slice(r+1)[0]}function Ax(){return Px(document.body,"next")}function _x(){return Px(document.body,"prev")}function ea(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!yt(n,r)}function rN(e){Yi(e,Uo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function oN(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 iN(e,t,n){const r=e.indexOf(t);function o(a){const s=dr("focus-guard");let l=r+(a?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(s)||yt(n,c));)a?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const jd={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 aN;function Ix(e){e.key==="Tab"&&(e.target,clearTimeout(aN))}const Ms=_.forwardRef(function(t,n){const[r,o]=_.useState();ze(()=>(yd()&&o("button"),document.addEventListener("keydown",Ix),()=>{document.removeEventListener("keydown",Ix)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[dr("focus-guard")]:"",style:jd};return _.createElement("span",Ho({},t,i))}),Ox=_.createContext(null),Mx=dr("portal");function sN(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Wo(),o=Dx(),[i,a]=_.useState(null),s=_.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(Mx,""),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&&!Qe(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(Mx,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function Br(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=sN({id:n,root:r}),[a,s]=_.useState(null),l=_.useRef(null),c=_.useRef(null),u=_.useRef(null),d=_.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return _.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(h){i&&ea(h)&&(h.type==="focusin"?oN:rN)(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]),_.createElement(Ox.Provider,{value:_.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&_.createElement(Ms,{"data-type":"outside",ref:l,onFocus:f=>{if(ea(f,i)){var h;(h=u.current)==null||h.focus()}else{const y=_x()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus()}}}),p&&i&&_.createElement("span",{"aria-owns":i.id,style:jd}),i&&ka.createPortal(t,i),p&&i&&_.createElement(Ms,{"data-type":"outside",ref:c,onFocus:f=>{if(ea(f,i)){var h;(h=d.current)==null||h.focus()}else{const y=Ax()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const Dx=()=>_.useContext(Ox),lN=20;let Hr=[];function Rd(e){Hr=Hr.filter(n=>n.isConnected);let t=e;if(!(!t||rr(t)==="body")){if(!lD(t,Uo())){const n=Yi(t,Uo())[0];n&&(t=n)}Hr.push(t),Hr.length>lN&&(Hr=Hr.slice(-20))}}function Nx(){return Hr.slice().reverse().find(e=>e.isConnected)}const cN=_.forwardRef(function(t,n){return _.createElement("button",Ho({},t,{type:"button",ref:n,tabIndex:-1,style:jd}))});function Go(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:x,floating:S}}=t,T=typeof a=="number"&&a<0,w=qb(x)&&T,C=eN()?i:!0,k=Ft(o),I=Ft(a),A=Ft(s),F=ur(),N=Dx(),V=_.useRef(null),P=_.useRef(null),O=_.useRef(!1),L=_.useRef(!1),j=_.useRef(-1),D=N!=null,q=S==null?void 0:S.firstElementChild,M=(q==null?void 0:q.id)===m?q:S,$=Pt(function(Y){return Y===void 0&&(Y=M),Y?Yi(Y,Uo()):[]}),Q=Pt(Y=>{const U=$(Y);return k.current.map(Z=>x&&Z==="reference"?x:M&&Z==="floating"?M:U).filter(Boolean).flat()});_.useEffect(()=>{if(r||!c)return;function Y(Z){if(Z.key==="Tab"){yt(M,mn(Mt(M)))&&$().length===0&&!w&&Nt(Z);const R=Q(),H=In(Z);k.current[0]==="reference"&&H===x&&(Nt(Z),Z.shiftKey?lr(R[R.length-1]):lr(R[1])),k.current[1]==="floating"&&H===M&&Z.shiftKey&&(Nt(Z),lr(R[0]))}}const U=Mt(M);return U.addEventListener("keydown",Y),()=>{U.removeEventListener("keydown",Y)}},[r,x,M,c,k,w,$,Q]),_.useEffect(()=>{if(r||!S)return;function Y(U){const Z=In(U),H=$().indexOf(Z);H!==-1&&(j.current=H)}return S.addEventListener("focusin",Y),()=>{S.removeEventListener("focusin",Y)}},[r,S,$]),_.useEffect(()=>{if(r||!d)return;function Y(){L.current=!0,setTimeout(()=>{L.current=!1})}function U(Z){const R=Z.relatedTarget;queueMicrotask(()=>{const H=!(yt(x,R)||yt(S,R)||yt(R,S)||yt(N==null?void 0:N.portalNode,R)||R!=null&&R.hasAttribute(dr("focus-guard"))||F&&(zr(F.nodesRef.current,h).find(X=>{var re,z;return yt((re=X.context)==null?void 0:re.elements.floating,R)||yt((z=X.context)==null?void 0:z.elements.domReference,R)})||QD(F.nodesRef.current,h).find(X=>{var re,z;return((re=X.context)==null?void 0:re.elements.floating)===R||((z=X.context)==null?void 0:z.elements.domReference)===R})));if(l&&H&&mn(Mt(M))===Mt(M).body){Et(M)&&(M==null||M.focus());const X=j.current,re=$(),z=re[X]||re[re.length-1]||M;Et(z)&&z.focus()}(w||!c)&&R&&H&&!L.current&&R!==Nx()&&(O.current=!0,y(!1,Z))})}if(S&&Et(x))return x.addEventListener("focusout",U),x.addEventListener("pointerdown",Y),S.addEventListener("focusout",U),()=>{x.removeEventListener("focusout",U),x.removeEventListener("pointerdown",Y),S.removeEventListener("focusout",U)}},[r,x,S,M,c,h,F,N,y,d,l,$,w]),_.useEffect(()=>{var Y;if(r)return;const U=Array.from((N==null||(Y=N.portalNode)==null?void 0:Y.querySelectorAll("["+dr("portal")+"]"))||[]);if(S){const Z=[S,...U,V.current,P.current,k.current.includes("reference")||w?x:null].filter(H=>H!=null),R=c||w?kx(Z,C,!C):kx(Z);return()=>{R()}}},[r,x,S,c,k,N,w,C]),ze(()=>{if(r||!Et(M))return;const Y=Mt(M),U=mn(Y);queueMicrotask(()=>{const Z=Q(M),R=I.current,H=(typeof R=="number"?Z[R]:R.current)||M,X=yt(M,U);!T&&!X&&p&&lr(H,{preventScroll:H===M})})},[r,p,M,T,Q,I]),ze(()=>{if(r||!M)return;let Y=!1;const U=Mt(M),Z=mn(U);let H=v.current.openEvent;const X=f.domReference.current;Rd(Z);function re(z){let{open:xe,reason:Ae,event:Ie,nested:Se}=z;xe&&(H=Ie),Ae==="escape-key"&&f.domReference.current&&Rd(f.domReference.current),Ae==="hover"&&Ie.type==="mouseleave"&&(O.current=!0),Ae==="outside-press"&&(Se?(O.current=!1,Y=!0):O.current=!(Hb(Ie)||vd(Ie)))}return g.on("openchange",re),()=>{g.off("openchange",re);const z=mn(U),xe=yt(S,z)||F&&zr(F.nodesRef.current,h).some(K=>{var se;return yt((se=K.context)==null?void 0:se.elements.floating,z)});(xe||H&&["click","mousedown"].includes(H.type))&&f.domReference.current&&Rd(f.domReference.current);const Ie=X||Z,Se=Yi(Mt(Ie).body,Uo());queueMicrotask(()=>{let K=Nx();!K&&Et(Ie)&&S&&(K=iN(Se,Ie,S)),A.current&&!O.current&&Et(K)&&(!(K!==z&&z!==U.body)||xe)&&K.focus({preventScroll:Y})})}},[r,S,M,A,v,f,g,F,h]),ze(()=>{if(!r&&N)return N.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:y,refs:f}),()=>{N.setFocusManagerState(null)}},[r,N,c,p,y,f,d]),ze(()=>{if(r||!M||typeof MutationObserver!="function"||T)return;const Y=()=>{const Z=M.getAttribute("tabindex"),R=$(),H=mn(Mt(S)),X=R.indexOf(H);X!==-1&&(j.current=X),k.current.includes("floating")||H!==f.domReference.current&&R.length===0?Z!=="0"&&M.setAttribute("tabindex","0"):Z!=="-1"&&M.setAttribute("tabindex","-1")};Y();const U=new MutationObserver(Y);return U.observe(M,{childList:!0,subtree:!0,attributes:!0}),()=>{U.disconnect()}},[r,S,M,f,k,$,T]);function ie(Y){return r||!u||!c?null:_.createElement(cN,{ref:Y==="start"?V:P,onClick:U=>y(!1,U.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&C&&(c?!w:!0)&&(D||c);return _.createElement(_.Fragment,null,J&&_.createElement(Ms,{"data-type":"inside",ref:N==null?void 0:N.beforeInsideRef,onFocus:Y=>{if(c){const Z=Q();lr(o[0]==="reference"?Z[0]:Z[Z.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(O.current=!1,ea(Y,N.portalNode)){const Z=Ax()||x;Z==null||Z.focus()}else{var U;(U=N.beforeOutsideRef.current)==null||U.focus()}}}),!w&&ie("start"),n,ie("end"),J&&_.createElement(Ms,{"data-type":"inside",ref:N==null?void 0:N.afterInsideRef,onFocus:Y=>{if(c)lr(Q()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(O.current=!0),ea(Y,N.portalNode)){const Z=_x()||x;Z==null||Z.focus()}else{var U;(U=N.afterOutsideRef.current)==null||U.focus()}}}))}const $d=new Set,uN=_.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Wo();return ze(()=>{if(!r)return;$d.add(i);const a=/iP(hone|ad|od)|iOS/.test(gd()),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()=>{$d.delete(i),$d.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),_.createElement("div",Ho({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Fx(e){return Et(e.target)&&e.target.tagName==="BUTTON"}function Lx(e){return wd(e)}function ta(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=_.useRef(),p=_.useRef(!1),f=_.useMemo(()=>({onPointerDown(h){d.current=h.pointerType},onMouseDown(h){const y=d.current;h.button===0&&s!=="click"&&(Fo(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}Fo(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||Fx(h))&&(h.key===" "&&!Lx(i)&&(h.preventDefault(),p.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!u||Fx(h)||Lx(i)||h.key===" "&&p.current&&(p.current=!1,r(!(n&&l),h.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return _.useMemo(()=>a?{reference:f}:{},[a,f])}function dN(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 Vx(e){return e!=null&&e.clientX!=null}function fN(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=_.useRef(!1),p=_.useRef(null),[f,h]=_.useState(),[y,g]=_.useState([]),v=Pt((w,C)=>{d.current||r.current.openEvent&&!Vx(r.current.openEvent)||a.setPositionReference(dN(i,{x:w,y:C,axis:l,dataRef:r,pointerType:f}))}),m=Pt(w=>{c!=null||u!=null||(n?p.current||g([]):v(w.clientX,w.clientY))}),x=Fo(f)?o:n,S=_.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const w=Ht(o);function C(k){const I=In(k);yt(o,I)?(w.removeEventListener("mousemove",C),p.current=null):v(k.clientX,k.clientY)}if(!r.current.openEvent||Vx(r.current.openEvent)){w.addEventListener("mousemove",C);const k=()=>{w.removeEventListener("mousemove",C),p.current=null};return p.current=k,k}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,v]);_.useEffect(()=>S(),[S,y]),_.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),_.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=_.useMemo(()=>{function w(C){let{pointerType:k}=C;h(k)}return{onPointerDown:w,onPointerEnter:w,onMouseMove:m,onMouseEnter:m}},[m]);return _.useMemo(()=>s?{reference:T}:{},[s,T])}const pN={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},hN={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},jx=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 Wr(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=ur(),g=Pt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?g:l,m=_.useRef(!1),x=_.useRef(!1),{escapeKey:S,outsidePress:T}=jx(f),{escapeKey:w,outsidePress:C}=jx(h),k=Pt(P=>{var O;if(!n||!a||!s||P.key!=="Escape")return;const L=(O=i.current.floatingContext)==null?void 0:O.nodeId,j=y?zr(y.nodesRef.current,L):[];if(!S&&(P.stopPropagation(),j.length>0)){let D=!0;if(j.forEach(q=>{var M;if((M=q.context)!=null&&M.open&&!q.context.dataRef.current.__escapeKeyBubbles){D=!1;return}}),!D)return}r(!1,NM(P)?P.nativeEvent:P,"escape-key")}),I=Pt(P=>{var O;const L=()=>{var j;k(P),(j=In(P))==null||j.removeEventListener("keydown",L)};(O=In(P))==null||O.addEventListener("keydown",L)}),A=Pt(P=>{var O;const L=m.current;m.current=!1;const j=x.current;if(x.current=!1,c==="click"&&j||L||typeof v=="function"&&!v(P))return;const D=In(P),q="["+dr("inert")+"]",M=Mt(o.floating).querySelectorAll(q);let $=Qe(D)?D:null;for(;$&&!or($);){const Y=qn($);if(or(Y)||!Qe(Y))break;$=Y}if(M.length&&Qe(D)&&!FM(D)&&!yt(D,o.floating)&&Array.from(M).every(Y=>!yt($,Y)))return;if(Et(D)&&V){const Y=D.clientWidth>0&&D.scrollWidth>D.clientWidth,U=D.clientHeight>0&&D.scrollHeight>D.clientHeight;let Z=U&&P.offsetX>D.clientWidth;if(U&&Qt(D).direction==="rtl"&&(Z=P.offsetX<=D.offsetWidth-D.clientWidth),Z||Y&&P.offsetY>D.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 xd(P,(U=Y.context)==null?void 0:U.elements.floating)});if(xd(P,o.floating)||xd(P,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,P,"outside-press")}),F=Pt(P=>{var O;const L=()=>{var j;A(P),(j=In(P))==null||j.removeEventListener(c,L)};(O=In(P))==null||O.addEventListener(c,L)});_.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=T;function P(j){r(!1,j,"ancestor-scroll")}const O=Mt(o.floating);s&&O.addEventListener("keydown",w?I:k,w),v&&O.addEventListener(c,C?F:A,C);let L=[];return p&&(Qe(o.domReference)&&(L=ir(o.domReference)),Qe(o.floating)&&(L=L.concat(ir(o.floating))),!Qe(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(ir(o.reference.contextElement)))),L=L.filter(j=>{var D;return j!==((D=O.defaultView)==null?void 0:D.visualViewport)}),L.forEach(j=>{j.addEventListener("scroll",P,{passive:!0})}),()=>{s&&O.removeEventListener("keydown",w?I:k,w),v&&O.removeEventListener(c,C?F:A,C),L.forEach(j=>{j.removeEventListener("scroll",P)})}},[i,o,s,v,c,n,r,p,a,S,T,k,w,I,A,C,F]),_.useEffect(()=>{m.current=!1},[v,c]);const N=_.useMemo(()=>({onKeyDown:k,[pN[d]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[k,r,u,d]),V=_.useMemo(()=>({onKeyDown:k,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[hN[c]]:()=>{m.current=!0}}),[k,c]);return _.useMemo(()=>a?{reference:N,floating:V}:{},[a,N,V])}function mN(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Wo(),i=_.useRef({}),[a]=_.useState(()=>xx()),s=cr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!Qe(f)&&YD("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=_.useState(r.reference),u=Pt((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=_.useMemo(()=>({setPositionReference:c}),[]),p=_.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return _.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function qr(e){e===void 0&&(e={});const{nodeId:t}=e,n=mN({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=_.useState(null),[s,l]=_.useState(null),u=(o==null?void 0:o.reference)||i,d=_.useRef(null),p=ur();ze(()=>{u&&(d.current=u)},[u]);const f=LD({...e,elements:{...o,...s&&{reference:s}}}),h=_.useCallback(x=>{const S=Qe(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l(S),f.refs.setReference(S)},[f.refs]),y=_.useCallback(x=>{(Qe(x)||x===null)&&(d.current=x,a(x)),(Qe(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!Qe(x))&&f.refs.setReference(x)},[f.refs]),g=_.useMemo(()=>({...f.refs,setReference:y,setPositionReference:h,domReference:d}),[f.refs,y,h]),v=_.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),m=_.useMemo(()=>({...f,...r,refs:g,elements:v,nodeId:t}),[f,g,v,t,r]);return ze(()=>{r.dataRef.current.floatingContext=m;const x=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);x&&(x.context=m)}),_.useMemo(()=>({...f,context:m,refs:g,elements:v}),[f,g,v,m])}function gN(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=_.useRef(!1),u=_.useRef(),d=_.useRef(!0);_.useEffect(()=>{if(!s)return;const f=Ht(a.domReference);function h(){!n&&Et(a.domReference)&&a.domReference===mn(Mt(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]),_.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]),_.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=_.useMemo(()=>({onPointerDown(f){vd(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const h=In(f.nativeEvent);if(l&&Qe(h))try{if(yd()&&Wb())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!d.current&&!wd(h))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const h=f.relatedTarget,y=f.nativeEvent,g=Qe(h)&&h.hasAttribute(dr("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||yt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,m)||yt(a.domReference,m)||g||r(!1,y,"focus")})}}),[i,a.domReference,r,l]);return _.useMemo(()=>s?{reference:p}:{},[s,p])}const Rx="active",$x="selected";function zd(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Rx]:a,[$x]: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&&[Rx,$x].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 Ur(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=_.useCallback(s=>zd(s,e,"reference"),t),i=_.useCallback(s=>zd(s,e,"floating"),n),a=_.useCallback(s=>zd(s,e,"item"),r);return _.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let zx=!1;function Ds(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Bx(e,t){return Ds(t,e===Nd||e===Xi,e===zo||e===Bo)}function Bd(e,t,n){return Ds(t,e===Xi,n?e===zo:e===Bo)||e==="Enter"||e===" "||e===""}function vN(e,t,n){return Ds(t,n?e===zo:e===Bo,e===Xi)}function Hx(e,t,n){return Ds(t,n?e===Bo:e===zo,e===Nd)}function Hd(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:x="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:w,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||_s("`useListNavigation` looping must be enabled to allow escaping."),h||_s("`useListNavigation` must be virtual to allow escaping.")),x==="vertical"&&S>1&&_s("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=cr(),A=ur(),F=Pt(s),N=_.useRef(y),V=_.useRef(c??-1),P=_.useRef(null),O=_.useRef(!0),L=_.useRef(F),j=_.useRef(!!o.floating),D=_.useRef(n),q=_.useRef(!1),M=_.useRef(!1),$=Ft(m),Q=Ft(n),ie=Ft(T),J=Ft(o.floating),Y=Ft(c),[U,Z]=_.useState(),[R,H]=_.useState(),X=Pt(function(K,se,G){G===void 0&&(G=!1);function ee(de){h?(Z(de.id),A==null||A.events.emit("virtualfocus",de),w&&(w.current=de)):lr(de,{preventScroll:!0,sync:Wb()&&yd()?zx||q.current:!1})}const ye=K.current[se.current];ye&&ee(ye),requestAnimationFrame(()=>{const de=K.current[se.current]||ye;if(!de)return;ye||ee(de);const Re=ie.current;Re&&z&&(G||!O.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof Re=="boolean"?{block:"nearest",inline:"nearest"}:Re))})});ze(()=>{document.createElement("div").focus({get preventScroll(){return zx=!0,!1}})},[]),ze(()=>{l&&(n&&o.floating?N.current&&c!=null&&(M.current=!0,V.current=c,F(c)):j.current&&(V.current=-1,L.current(null)))},[l,n,o.floating,c,F]),ze(()=>{if(l&&n&&o.floating)if(a==null){if(q.current=!1,Y.current!=null)return;if(j.current&&(V.current=-1,X(i,V)),(!D.current||!j.current)&&N.current&&(P.current!=null||N.current===!0&&P.current==null)){let K=0;const se=()=>{i.current[0]==null?(K<2&&(K?requestAnimationFrame:queueMicrotask)(se),K++):(V.current=P.current==null||Bd(P.current,x,f)||p?Fd(i,$.current):px(i,$.current),P.current=null,F(V.current))};se()}}else Qi(i,a)||(V.current=a,X(i,V,M.current),M.current=!1)},[l,n,o.floating,a,Y,p,i,x,f,F,X,$]),ze(()=>{var K;if(!l||o.floating||!A||h||!j.current)return;const se=A.nodesRef.current,G=(K=se.find(de=>de.id===I))==null||(K=K.context)==null?void 0:K.elements.floating,ee=mn(Mt(o.floating)),ye=se.some(de=>de.context&&yt(de.context.elements.floating,ee));G&&!ye&&O.current&&G.focus({preventScroll:!0})},[l,o.floating,A,I,h]),ze(()=>{if(!l||!A||!h||I)return;function K(se){H(se.id),w&&(w.current=se)}return A.events.on("virtualfocus",K),()=>{A.events.off("virtualfocus",K)}},[l,A,h,I,w]),ze(()=>{L.current=F,j.current=!!o.floating}),ze(()=>{n||(P.current=null)},[n]),ze(()=>{D.current=n},[n]);const re=a!=null,z=_.useMemo(()=>{function K(G){if(!n)return;const ee=i.current.indexOf(G);ee!==-1&&F(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"||(V.current=-1,X(i,V),F(null),h||lr(J.current,{preventScroll:!0}))}}}},[n,J,X,g,i,F,h]),xe=Pt(K=>{if(O.current=!1,q.current=!0,!Q.current&&K.currentTarget===J.current)return;if(p&&Hx(K.key,x,f)){Nt(K),r(!1,K.nativeEvent,"list-navigation"),Et(o.domReference)&&!h&&o.domReference.focus();return}const se=V.current,G=Fd(i,m),ee=px(i,m);if(K.key==="Home"&&(Nt(K),V.current=G,F(V.current)),K.key==="End"&&(Nt(K),V.current=ee,F(V.current)),S>1){const ye=C||Array.from({length:i.current.length},()=>({width:1,height:1})),de=$D(ye,S,k),Re=de.findIndex(ce=>ce!=null&&!As(i.current,ce,m)),oe=de.reduce((ce,$e,Ze)=>$e!=null&&!As(i.current,$e,m)?Ze:ce,-1);if(V.current=de[RD({current:de.map(ce=>ce!=null?i.current[ce]:null)},{event:K,orientation:x,loop:d,cols:S,disabledIndices:BD([...m||i.current.map((ce,$e)=>As(i.current,$e)?$e:void 0),void 0],de),minIndex:Re,maxIndex:oe,prevIndex:zD(V.current>ee?G:V.current,ye,de,S,K.key===Xi?"bl":K.key===Bo?"tr":"tl"),stopEvent:!0})],F(V.current),x==="both")return}if(Bx(K.key,x)){if(Nt(K),n&&!h&&mn(K.currentTarget.ownerDocument)===K.currentTarget){V.current=Bd(K.key,x,f)?G:ee,F(V.current);return}Bd(K.key,x,f)?d?V.current=se>=ee?u&&se!==i.current.length?-1:G:Rt(i,{startingIndex:se,disabledIndices:m}):V.current=Math.min(ee,Rt(i,{startingIndex:se,disabledIndices:m})):d?V.current=se<=G?u&&se!==-1?i.current.length:ee:Rt(i,{startingIndex:se,decrement:!0,disabledIndices:m}):V.current=Math.max(G,Rt(i,{startingIndex:se,decrement:!0,disabledIndices:m})),Qi(i,V.current)?F(null):F(V.current)}}),Ae=_.useMemo(()=>h&&n&&re&&{"aria-activedescendant":R||U},[h,n,re,R,U]),Ie=_.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...!qb(o.domReference)&&Ae,onKeyDown:xe,onPointerMove(){O.current=!0}}),[Ae,xe,o.domReference,x]),Se=_.useMemo(()=>{function K(G){y==="auto"&&Hb(G.nativeEvent)&&(N.current=!0)}function se(G){N.current=y,y==="auto"&&vd(G.nativeEvent)&&(N.current=!0)}return{...Ae,onKeyDown(G){O.current=!1;const ee=G.key.indexOf("Arrow")===0,ye=vN(G.key,x,f),de=Hx(G.key,x,f),Re=Bx(G.key,x),oe=(p?ye:Re)||G.key==="Enter"||G.key.trim()==="";if(h&&n){const Ct=A==null?void 0:A.nodesRef.current.find(Lt=>Lt.parentId==null),pt=A&&Ct?JD(A.nodesRef.current,Ct.id):null;if(ee&&pt&&w){const Lt=new KeyboardEvent("keydown",{key:G.key,bubbles:!0});if(ye||de){var ce,$e;const wn=((ce=pt.context)==null?void 0:ce.elements.domReference)===G.currentTarget,$n=de&&!wn?($e=pt.context)==null?void 0:$e.elements.domReference:ye?i.current.find(xr=>(xr==null?void 0:xr.id)===U):null;$n&&(Nt(G),$n.dispatchEvent(Lt),H(void 0))}if(Re&&pt.context&&pt.context.open&&pt.parentId&&G.currentTarget!==pt.context.elements.domReference){var Ze;Nt(G),(Ze=pt.context.elements.domReference)==null||Ze.dispatchEvent(Lt);return}}return xe(G)}if(!(!n&&!v&&ee)){if(oe&&(P.current=p&&Re?null:G.key),p){ye&&(Nt(G),n?(V.current=Fd(i,$.current),F(V.current)):r(!0,G.nativeEvent,"list-navigation"));return}Re&&(c!=null&&(V.current=c),Nt(G),!n&&v?r(!0,G.nativeEvent,"list-navigation"):xe(G),n&&F(V.current))}},onFocus(){n&&!h&&F(null)},onPointerDown:se,onMouseDown:K,onClick:K}},[U,Ae,xe,$,y,i,p,F,r,n,v,x,f,c,A,h,w]);return _.useMemo(()=>l?{reference:Se,floating:Ie,item:z}:{},[l,Se,Ie,z])}const yN=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Gr(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=yN.get(a))!=null?n:a,l=Wo(),u=cr()!=null,d=_.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=_.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=_.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 _.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const Wx=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Yo(e,t){return typeof e=="function"?e(t):e}function bN(e,t){const[n,r]=_.useState(e);return e&&!n&&r(!0),_.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function xN(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]=_.useState("unmounted"),c=bN(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 qx(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=_.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]=_.useState(()=>({...Yo(i,c),...Yo(n,c)})),{isMounted:y,status:g}=xN(e,{duration:a}),v=Ft(n),m=Ft(r),x=Ft(o),S=Ft(i);return ze(()=>{const T=Yo(v.current,c),w=Yo(x.current,c),C=Yo(S.current,c),k=Yo(m.current,c)||Object.keys(T).reduce((I,A)=>(I[A]="",I),{});if(g==="initial"&&h(I=>({transitionProperty:I.transitionProperty,...C,...T})),g==="open"&&h({transitionProperty:Object.keys(k).map(Wx).join(","),transitionDuration:d+"ms",...C,...k}),g==="close"){const I=w||T;h({transitionProperty:Object.keys(I).map(Wx).join(","),transitionDuration:p+"ms",...C,...I})}},[p,x,v,m,S,d,g,c]),{isMounted:y,styles:f}}function wN(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=_.useRef(),y=_.useRef(""),g=_.useRef((n=f??a)!=null?n:-1),v=_.useRef(null),m=Pt(s),x=Pt(l),S=Ft(u),T=Ft(p);ze(()=>{r&&(clearTimeout(h.current),v.current=null,y.current="")},[r]),ze(()=>{if(r&&y.current===""){var A;g.current=(A=f??a)!=null?A:-1}},[r,f,a]);const w=Pt(A=>{A?o.current.typing||(o.current.typing=A,x(A)):o.current.typing&&(o.current.typing=A,x(A))}),C=Pt(A=>{function F(L,j,D){const q=S.current?S.current(j,D):j.find(M=>(M==null?void 0:M.toLocaleLowerCase().indexOf(D.toLocaleLowerCase()))===0);return q?L.indexOf(q):-1}const N=i.current;if(y.current.length>0&&y.current[0]!==" "&&(F(N,N,y.current)===-1?w(!1):A.key===" "&&Nt(A)),N==null||T.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(Nt(A),w(!0)),N.every(L=>{var j,D;return L?((j=L[0])==null?void 0:j.toLocaleLowerCase())!==((D=L[1])==null?void 0:D.toLocaleLowerCase()):!0})&&y.current===A.key&&(y.current="",g.current=v.current),y.current+=A.key,clearTimeout(h.current),h.current=setTimeout(()=>{y.current="",g.current=v.current,w(!1)},d);const P=g.current,O=F(N,[...N.slice((P||0)+1),...N.slice(0,(P||0)+1)],y.current);O!==-1?(m(O),v.current=O):A.key!==" "&&(y.current="",w(!1))}),k=_.useMemo(()=>({onKeyDown:C}),[C]),I=_.useMemo(()=>({onKeyDown:C,onKeyUp(A){A.key===" "&&w(!1)}}),[C,w]);return _.useMemo(()=>c?{reference:k,floating:I}:{},[c,k,I])}function Ux(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 TN(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Gx(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=In(S),A=S.type==="mouseleave",F=yt(y.floating,I),N=yt(y.domReference,I),V=y.domReference.getBoundingClientRect(),P=y.floating.getBoundingClientRect(),O=h.split("-")[0],L=p>P.right-P.width/2,j=f>P.bottom-P.height/2,D=TN(k,V),q=P.width>V.width,M=P.height>V.height,$=(q?V:P).left,Q=(q?V:P).right,ie=(M?V:P).top,J=(M?V:P).bottom;if(F&&(i=!0,!A))return;if(N&&(i=!1),N&&!A){i=!0;return}if(A&&Qe(S.relatedTarget)&&yt(y.floating,S.relatedTarget)||m&&zr(m.nodesRef.current,v).some(Z=>{let{context:R}=Z;return R==null?void 0:R.open}))return;if(O==="top"&&f>=V.bottom-1||O==="bottom"&&f<=V.top+1||O==="left"&&p>=V.right-1||O==="right"&&p<=V.left+1)return T();let Y=[];switch(O){case"top":Y=[[$,V.top+1],[$,P.bottom-1],[Q,P.bottom-1],[Q,V.top+1]];break;case"bottom":Y=[[$,P.top+1],[$,V.bottom-1],[Q,V.bottom-1],[Q,P.top+1]];break;case"left":Y=[[P.right-1,J],[P.right-1,ie],[V.left+1,ie],[V.left+1,J]];break;case"right":Y=[[V.right-1,J],[V.right-1,ie],[P.left+1,ie],[P.left+1,J]];break}function U(Z){let[R,H]=Z;switch(O){case"top":{const X=[q?R+t/2:L?R+t*4:R-t*4,H+t+1],re=[q?R-t/2:L?R+t*4:R-t*4,H+t+1],z=[[P.left,L||q?P.bottom-t:P.top],[P.right,L?q?P.bottom-t:P.top:P.bottom-t]];return[X,re,...z]}case"bottom":{const X=[q?R+t/2:L?R+t*4:R-t*4,H-t],re=[q?R-t/2:L?R+t*4:R-t*4,H-t],z=[[P.left,L||q?P.top+t:P.bottom],[P.right,L?q?P.top+t:P.bottom:P.top+t]];return[X,re,...z]}case"left":{const X=[R+t+1,M?H+t/2:j?H+t*4:H-t*4],re=[R+t+1,M?H-t/2:j?H+t*4:H-t*4];return[...[[j||M?P.right-t:P.left,P.top],[j?M?P.right-t:P.left:P.right-t,P.bottom]],X,re]}case"right":{const X=[R-t,M?H+t/2:j?H+t*4:H-t*4],re=[R-t,M?H-t/2:j?H+t*4:H-t*4],z=[[j||M?P.left+t:P.right,P.top],[j?M?P.left+t:P.right:P.left+t,P.bottom]];return[X,re,...z]}}}if(!Ux([w,C],Y)){if(i&&!D)return T();if(!A&&r){const Z=c(S.clientX,S.clientY);if(Z!==null&&Z<.1)return T()}Ux([w,C],U([p,f]))?!i&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const Ko=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[Zi(10),Md({fallbackAxisSideDirection:"end"}),Od(),dx({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=qr({open:n,middleware:i,transform:!0,whileElementsMounted:Ki,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=ta(l),u=Wr(l),d=Gr(l),{getReferenceProps:p,getFloatingProps:f}=Ur([c,u,d]);return b.jsxs(E.Fragment,{children:[b.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&b.jsx(Br,{preserveTabOrder:!0,id:`${t}-portal`,children:b.jsx(Go,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:b.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:[b.jsx(bx,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),b.jsx("header",{className:"mb-2",children:b.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},SN=e=>{const t=E.useRef(null),n=E.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=E.useState(!1),{context:s,refs:l}=qr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=ta(s),u=Gr(s),d=Wr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=Ur([c,u,d]);return b.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[b.jsx(fo,{...f(e),as:gt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:b.jsx(gt.span,{layoutId:o,children:e.trigger})}),b.jsx(Qn,{children:i?b.jsx(Br,{root:t,children:b.jsx(Go,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:b.jsx(gt.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Yx=300,EN=500,Kx=(e="")=>He("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),Wd=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Zx=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(Wd),m=cr(),x=ur(),S=KD(),T=gx(),w=m!==null,{floatingStyles:C,refs:k,context:I}=qr({nodeId:S,open:c,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:Ki,placement:w?"right":"bottom-start",middleware:[Zi({mainAxis:w?0:4,alignmentAxis:w?-4:0}),Md(),Od()]}),A=Gr(I,{role:"menu",enabled:!0}),F=Wr(I,{bubbles:!0}),N=Ex(I,{move:!1,enabled:n,delay:{open:Yx},handleClose:Gx({blockPointerEvents:!0})}),V=ta(I,{event:"mousedown",toggle:!w,ignoreMouse:w,keyboardHandlers:!0}),P=Hd(I,{loop:!0,listRef:y,activeIndex:f,nested:w,onNavigate:h}),O=wN(I,{activeIndex:f,listRef:g,resetMs:EN,onMatch:c?h:void 0}),{getReferenceProps:L,getFloatingProps:j,getItemProps:D}=Ur([N,V,A,F,P,O]);E.useEffect(()=>{if(!x)return;function M(){u(!1)}function $(Q){Q.nodeId!==S&&Q.parentId===m&&u(!1)}return x.events.on("click",M),x.events.on("menuopen",$),()=>{x.events.off("click",M),x.events.off("menuopen",$)}},[x,S,m]),E.useEffect(()=>{c&&x&&x.events.emit("menuopen",{parentId:m,nodeId:S})},[x,c,S,m]);const q=o?s.className:He(Kx(s.className));return b.jsxs(ZD,{id:S,children:[b.jsx(E.Fragment,{children:s.asChild?b.jsx(No,{...L(v.getItemProps({...s,onFocus(M){var $;($=s.onFocus)==null||$.call(s,M),p(!1),v.setHasFocusInside(!0)}})),children:a,ref:Dd([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}):b.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:Dd([k.setReference,T.ref,l]),tabIndex:w?v.activeIndex===T.index?0:-1:void 0,...L(v.getItemProps({...s,onFocus(M){var $;($=s.onFocus)==null||$.call(s,M),p(!1),v.setHasFocusInside(!0)}})),children:[a,w&&b.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[b.jsx("span",{className:"sr-only",children:"Next menu"}),b.jsx(Du,{size:14})]})]})}),b.jsx(Wd.Provider,{value:{activeIndex:f,setActiveIndex:h,getItemProps:D,setHasFocusInside:p,isOpen:c},children:b.jsx(qD,{elementsRef:y,labelsRef:g,children:c&&b.jsx(Br,{preserveTabOrder:!0,children:b.jsx(Go,{context:I,modal:!1,initialFocus:w?-1:0,returnFocus:!w,children:b.jsx(t,{...j(),ref:k.setFloating,style:{...s.style,...C},className:He("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})})})})})]})}),CN=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(Wd),s=gx({label:n?null:e}),l=ur(),c=s.index===a.activeIndex;return b.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:Dd([s.ref,i]),className:Kx(`${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?b.jsx(t,{size:16}):null]})}),kN=E.forwardRef((e,t)=>cr()!==null?b.jsx(Zx,{...e,isParent:!1,ref:t}):b.jsx(XD,{children:b.jsx(Zx,{...e,isParent:!0,ref:t})})),PN=(e,t)=>vi()?t:window.matchMedia(e).matches,AN=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(PN(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},_N=e=>{const t=E.useRef(vi()?"":document.documentElement.style.overflowY);E.useEffect(()=>{const n=document.documentElement;e?(t.current=document.documentElement.style.overflowY,n.style.overflowY="hidden",n.style.padding=Dh(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",IN={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:gn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:gn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:gn}},ON={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:gn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:gn}},qd={drawer:e=>e==="left"?IN:ON,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}}},MN=co("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"}}),DN={top:0,left:0,right:0,bottom:-1},NN=e=>e*.62,FN=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=NN(window.outerHeight);return s<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(s)}};return b.jsx(gt.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:DN,whileDrag:{cursor:"grabbing"},className:He("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?b.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Ud={drawer:"right",sheet:"none",dialog:"none"},LN=({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})=>{_N(e);const m=E.useId(),x=E.useId(),S=AN("(min-width: 64rem)"),T=f!=="dialog",w=S?f==="drawer"?h:Ud[f]:d?Ud[f]:Ud.sheet,C=S||d?qd[f]:qd.sheet,k=typeof C=="function"?C(w):C,I=S||d?f:"sheet",{refs:A,context:F}=qr({open:e,onOpenChange:s}),N=ta(F),V=Gr(F),P=Wr(F,{escapeKey:!0,referencePress:!0,outsidePress:y}),{getReferenceProps:O,getFloatingProps:L}=Ur([N,V,P]),j=o,D=Co(void 0),q=()=>s(!1);return b.jsxs(E.Fragment,{children:[o?b.jsx(E.Fragment,{children:r?b.jsx(No,{ref:A.setReference,...O({layoutId:a}),children:j}):b.jsx(gt.button,{ref:A.setReference,...O(),layoutId:a,type:"button",children:j})}):null,b.jsx(Br,{children:b.jsx(Qn,{mode:"wait",presenceAffectsLayout:!0,children:e?b.jsx(uN,{lockScroll:!1,className:He(`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:b.jsx(Go,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:F,children:b.jsxs(gt.div,{...v,exit:"exit",animate:"enter",initial:"initial",variants:k,"data-component":"modal",ref:A.setFloating,"aria-modal":e,layoutId:a,className:He(MN({position:w,type:I}),l),style:I==="drawer"?{width:D}:{height:D},...t?{"aria-labelledby":m,"aria-describedby":x}:{"aria-label":g},...L(),children:[t?b.jsx("header",{className:"relative w-full",children:t?b.jsx("h2",{id:m,className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,b.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:i}),n?b.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:n}):null,u?b.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:b.jsx("button",{type:"button",onClick:q,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:b.jsx(Fu,{})})}):null,T&&c?b.jsx(FN,{value:D,onChange:s,sheet:I==="sheet",parent:A.floating,position:w}):null]})})}):null})})]})},VN=e=>b.jsx(gt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),Xx=({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=xc,...d})=>{const[p,f]=E.useState(o??!1),h=E.useRef(null),y=e||"span",g=N=>{f(N),u==null||u(N)},{refs:v,floatingStyles:m,context:x}=qr({open:p,placement:r,transform:!0,strategy:"absolute",whileElementsMounted:Ki,onOpenChange:o?void 0:g,middleware:[Od(),Zi(5),Md({fallbackAxisSideDirection:"start"}),dx({padding:5,element:h})]}),S=Ex(x,{move:!0,delay:{open:Yx},enabled:s?a:!1,handleClose:l?Gx():null}),T=gN(x,{enabled:s?i:!1}),w=ta(x,{enabled:s?l:!1}),C=Wr(x,{enabled:s}),k=Gr(x,{role:"tooltip",enabled:s}),I=fN(x,{enabled:!!s&&!!c}),{getReferenceProps:A,getFloatingProps:F}=Ur([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]),b.jsxs(E.Fragment,{children:[b.jsx(y,{ref:v.setReference,...A(d),children:t}),p&&b.jsx(Br,{preserveTabOrder:!0,children:b.jsxs(uo,{...F(),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:[b.jsx(bx,{ref:h,context:x,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),n]})})]})};class Ns{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++)Ns.getDescendantProperty(s[l],i,r);else i&&Ns.getDescendantProperty(s,i,r)}else r.push(t);return r}}class Yr{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=Yr.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=Ns.getDescendantProperty(o,this.keys[i]);let s=!1;for(let l=0;l<a.length;l++){const c=Yr.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=Yr.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 Yr.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 Fs=0,fr=1,Zo=2,Qx=4;function Jx(e){return()=>e}function jN(e){e()}function na(e,t){return n=>e(t(n))}function e0(e,t){return()=>e(t)}function t0(e,t){return n=>e(t,n)}function Gd(e){return e!==void 0}function RN(...e){return()=>{e.map(jN)}}function Xo(){}function Ls(e,t){return t(e),e}function $N(e,t){return t(e)}function ot(...e){return e}function Ke(e,t){return e(fr,t)}function Oe(e,t){e(Fs,t)}function Yd(e){e(Zo)}function $t(e){return e(Qx)}function be(e,t){return Ke(e,t0(t,Fs))}function Mn(e,t){const n=e(fr,r=>{n(),t(r)});return n}function n0(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function r0(e,t){return e===t}function it(e=r0){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ee(e){return t=>n=>{e(n)&&t(n)}}function he(e){return t=>na(t,e)}function Dn(e){return t=>()=>{t(e)}}function te(e,...t){const n=zN(...t);return(r,o)=>{switch(r){case Zo:Yd(e);return;case fr:return Ke(e,n(o))}}}function Nn(e,t){return n=>r=>{n(t=e(t,r))}}function Qo(e){return t=>n=>{e>0?e--:t(n)}}function pr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function De(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,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 zN(...e){return t=>e.reduceRight($N,t)}function BN(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case fr:return i?n===i?void 0:(r(),n=i,t=Ke(e,i),t):(r(),Xo);case Zo:r(),n=null;return}}}function le(e){let t=e;const n=je();return(r,o)=>{switch(r){case Fs:t=o;break;case fr:{o(t);break}case Qx:return t}return n(r,o)}}function zt(e,t){return Ls(le(t),n=>be(e,n))}function je(){const e=[];return(t,n)=>{switch(t){case Fs:e.slice().forEach(r=>{r(n)});return;case Zo:e.splice(0,e.length);return;case fr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function en(e){return Ls(je(),t=>be(e,t))}function qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:HN(),singleton:n}}const HN=()=>Symbol();function WN(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 At(...e){const t=je(),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 Zo:{Yd(t);return}case fr:return r===o&&a(n),Ke(t,a)}}}function ke(e,t=r0){return te(e,it(t))}function o0(...e){return function(t,n){switch(t){case Zo:return;case fr:return RN(...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 qN={0:"debug",3:"error",1:"log",2:"warn"},UN=()=>typeof globalThis>"u"?window:globalThis,hr=qe(()=>{const e=le(3);return{log:le((t,n,r=1)=>{var o;const i=(o=UN().VIRTUOSO_LOG_LEVEL)!=null?o:$t(e);r>=i&&console[qN[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Fn(e,t,n){return Kd(e,t,n).callbackRef}function Kd(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 i0(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=GN(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?a0("column-gap",getComputedStyle(u).columnGap,o):a0("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return Kd(c,n,l)}function GN(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 a0(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 Zd(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}=Kd(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=qe(()=>{const e=je(),t=je(),n=le(0),r=je(),o=le(0),i=je(),a=je(),s=le(0),l=le(0),c=le(0),u=le(0),d=je(),p=je(),f=le(!1),h=le(!1),y=le(!1);return be(te(e,he(({scrollTop:g})=>g)),t),be(te(e,he(({scrollHeight:g})=>g)),a),be(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}),ra={lvl:0};function s0(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function tt(e){return e===ra}function oa(e,t){if(!tt(e))return t===e.k?e.v:t<e.k?oa(e.l,t):oa(e.r,t)}function vn(e,t,n="k"){if(tt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=vn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return vn(e.l,t,n)}function nn(e,t,n){return tt(e)?u0(t,n,1):t===e.k?_t(e,{k:t,v:n}):t<e.k?d0(_t(e,{l:nn(e.l,t,n)})):d0(_t(e,{r:nn(e.r,t,n)}))}function Jo(){return ra}function Vs(e,t,n){if(tt(e))return[];const r=vn(e,t)[0];return YN(Qd(e,r,n))}function Xd(e,t){if(tt(e))return ra;const{k:n,l:r,r:o}=e;if(t===n){if(tt(r))return o;if(tt(o))return r;{const[i,a]=c0(r);return js(_t(e,{k:i,l:l0(r),v:a}))}}else return t<n?js(_t(e,{l:Xd(r,t)})):js(_t(e,{r:Xd(o,t)}))}function Kr(e){return tt(e)?[]:[...Kr(e.l),{k:e.k,v:e.v},...Kr(e.r)]}function Qd(e,t,n){if(tt(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(Qd(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(Qd(i,t,n))),s}function js(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(Jd(t))return f0(_t(e,{lvl:n-1}));if(!tt(t)&&!tt(t.r))return _t(t.r,{l:_t(t,{r:t.r.l}),lvl:n,r:_t(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(Jd(e))return ef(_t(e,{lvl:n-1}));if(!tt(r)&&!tt(r.l)){const o=r.l,i=Jd(o)?r.lvl-1:r.lvl;return _t(o,{l:_t(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:ef(_t(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function _t(e,t){return u0(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 l0(e){return tt(e.r)?e.l:js(_t(e,{r:l0(e.r)}))}function Jd(e){return tt(e)||e.lvl>e.r.lvl}function c0(e){return tt(e.r)?[e.k,e.v]:c0(e.r)}function u0(e,t,n,r=ra,o=ra){return{k:e,l:r,lvl:n,r:o,v:t}}function d0(e){return ef(f0(e))}function f0(e){const{l:t}=e;return!tt(t)&&t.lvl===e.lvl?_t(t,{r:_t(e,{l:t.r})}):e}function ef(e){const{lvl:t,r:n}=e;return!tt(n)&&!tt(n.r)&&n.lvl===t&&n.r.lvl===t?_t(n,{l:_t(e,{r:n.l}),lvl:t+1}):e}function YN(e){return s0(e,({k:t,v:n})=>({index:t,value:n}))}function p0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ia(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const tf=qe(()=>({recalcInProgress:le(!1)}),[],{singleton:!0});function h0(e,t,n){return e[Rs(e,t,n)]}function Rs(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 KN(e,t,n,r){const o=Rs(e,t,r),i=Rs(e,n,r,o);return e.slice(o,i+1)}function yn(e,t){return Math.round(e.getBoundingClientRect()[t])}function $s(e){return!tt(e.groupOffsetTree)}function nf({index:e},t){return t===e?0:t<e?-1:1}function ZN(){return{groupIndices:[],groupOffsetTree:Jo(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Jo()}}function XN(e,t){let n=tt(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),tt(e)){e=nn(e,0,i);continue}const s=Vs(e,a-1,o+1);if(s.some(oF(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=Xd(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=nn(e,o+1,p));c&&(e=nn(e,a,i))}return[e,n]}function QN(e){return typeof e.groupIndex<"u"}function JN({offset:e},t){return t===e?0:t<e?-1:1}function aa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=h0(t,e,nf),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function m0(e,t){if(!$s(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function g0(e,t,n){if(QN(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=m0(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function eF(e,t,n,r=0){return r>0&&(t=Math.max(t,h0(e,r,nf).offset)),s0(KN(e,t,n,JN),rF)}function tF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,tn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&tt(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((h,y)=>nn(nn(h,y,p),y+1,f),a)}else[a,s]=XN(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=rf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>nn(p,f,aa(f,d,o)),Jo()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function nF(e){return Kr(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 v0(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 rf(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Rs(o,t-1,nf),s=o[l].offset;const c=vn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===vn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Vs(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 rF(e){return{index:e.index,value:e}}function oF(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 iF={offsetHeight:"height",offsetWidth:"width"},Ln=qe(([{log:e},{recalcInProgress:t}])=>{const n=je(),r=je(),o=zt(r,0),i=je(),a=je(),s=le(0),l=le([]),c=le(void 0),u=le(void 0),d=le((T,w)=>yn(T,iF[w])),p=le(void 0),f=le(0),h=ZN(),y=zt(te(n,De(l,e,f),Nn(tF,h),it()),h),g=zt(te(l,it(),Nn((T,w)=>({current:w,prev:T.current}),{current:[],prev:[]}),he(({prev:T})=>T)),[]);be(te(l,Ee(T=>T.length>0),De(y,f),he(([T,w,C])=>{const k=T.reduce((I,A,F)=>nn(I,A,aa(A,w.offsetTree,C)||F),Jo());return{...w,groupIndices:T,groupOffsetTree:k}})),y),be(te(r,De(y),Ee(([T,{lastIndex:w}])=>T<w),he(([T,{lastIndex:w,lastSize:C}])=>[{endIndex:w,size:C,startIndex:T}])),n),be(c,u);const v=zt(te(c,he(T=>T===void 0)),!0);be(te(u,Ee(T=>T!==void 0&&tt($t(y).sizeTree)),he(T=>[{endIndex:0,size:T,startIndex:0}])),n);const m=en(te(n,De(y),Nn(({sizes:T},[w,C])=>({changed:C!==T,sizes:C}),{changed:!1,sizes:h}),he(T=>T.changed)));Ke(te(s,Nn((T,w)=>({diff:T.prev-w,prev:w}),{diff:0,prev:0}),he(T=>T.diff)),T=>{const{groupIndices:w}=$t(y);if(T>0)Oe(t,!0),Oe(i,T+v0(T,w));else if(T<0){const C=$t(g);C.length>0&&(T-=v0(-T,C)),Oe(a,T)}}),Ke(te(s,De(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 x=en(i);be(te(i,De(y),he(([T,w])=>{const C=w.groupIndices.length>0,k=[],I=w.lastSize;if(C){const A=oa(w.sizeTree,0);let F=0,N=0;for(;F<T;){const P=w.groupIndices[N],O=w.groupIndices.length===N+1?1/0:w.groupIndices[N+1]-P-1;k.push({endIndex:P,size:A,startIndex:P}),k.push({endIndex:P+1+O-1,size:I,startIndex:P+1}),N++,F+=O+1}const V=Kr(w.sizeTree);return F!==T&&V.shift(),V.reduce((P,{k:O,v:L})=>{let j=P.ranges;return P.prevSize!==0&&(j=[...P.ranges,{endIndex:O+T-1,size:P.prevSize,startIndex:P.prevIndex}]),{prevIndex:O+T,prevSize:L,ranges:j}},{prevIndex:T,prevSize:0,ranges:k}).ranges}return Kr(w.sizeTree).reduce((A,{k:F,v:N})=>({prevIndex:F+T,prevSize:N,ranges:[...A.ranges,{endIndex:F+T-1,size:A.prevSize,startIndex:A.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const S=en(te(a,De(y,f),he(([T,{offsetTree:w},C])=>{const k=-T;return aa(k,w,C)})));return be(te(a,De(y,f),he(([T,w,C])=>{if(w.groupIndices.length>0){if(tt(w.sizeTree))return w;let k=Jo();const I=$t(g);let A=0,F=0,N=0;for(;A<-T;){N=I[F];const V=I[F+1]-N-1;F++,A+=V+1}if(k=Kr(w.sizeTree).reduce((V,{k:P,v:O})=>nn(V,Math.max(0,P+T),O),k),A!==-T){const V=oa(w.sizeTree,N);k=nn(k,0,V);const P=vn(w.sizeTree,-T+1)[1];k=nn(k,1,P)}return{...w,sizeTree:k,...rf(w.offsetTree,0,k,C)}}else{const k=Kr(w.sizeTree).reduce((I,{k:A,v:F})=>nn(I,Math.max(0,A+T),F),Jo());return{...w,sizeTree:k,...rf(w.offsetTree,0,k,C)}}})),y),{beforeUnshiftWith:x,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}},ot(hr,tf),{singleton:!0});function aF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const y0=qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=je(),a=je(),s=en(te(i,he(aF)));return be(te(s,he(l=>l.totalCount)),n),be(te(s,he(l=>l.groupIndices)),e),be(te(At(o,t,r),Ee(([l,c])=>$s(c)),he(([l,c,u])=>vn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),it(),he(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},ot(Ln,Wt)),mr=qe(([{log:e}])=>{const t=le(!1),n=en(te(t,Ee(r=>r),it()));return Ke(t,r=>{r&&$t(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},ot(hr),{singleton:!0}),sF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function b0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!sF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const sa=qe(([{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=je(),h=je(),y=le(0);let g=null,v=null,m=null;function x(){g&&(g(),g=null),m&&(m(),m=null),v&&(clearTimeout(v),v=null),Oe(l,!1)}return be(te(f,De(n,d,r,y,s,a,p),De(e,i,o),he(([[S,T,w,C,k,I,A,F],N,V,P])=>{const O=b0(S),{align:L,behavior:j,offset:D}=O,q=C-1,M=g0(O,T,q);let $=aa(M,T.offsetTree,N)+I;L==="end"?($+=V+vn(T.sizeTree,M)[1]-w+P,M===q&&($+=A)):L==="center"?$+=(V+vn(T.sizeTree,M)[1]-w+P)/2:$-=k,D&&($+=D);const Q=ie=>{x(),ie?(F("retrying to scroll to",{location:S},tn.DEBUG),Oe(f,S)):(Oe(h,!0),F("list did not change, scroll successful",{},tn.DEBUG))};if(x(),j==="smooth"){let ie=!1;m=Ke(t,J=>{ie=ie||J}),g=Mn(u,()=>{Q(ie)})}else g=Mn(te(t,lF(150)),Q);return v=setTimeout(()=>{x()},1200),Oe(l,!0),F("scrolling from index to",{behavior:j,index:M,top:$},tn.DEBUG),{behavior:j,top:$}})),c),{scrollTargetReached:h,scrollToIndex:f,topListHeight:y}},ot(Ln,Wt,hr),{singleton:!0});function lF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function of(e,t){e==0?t():requestAnimationFrame(()=>{of(e-1,t)})}function af(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const la=qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=le(!0),l=le(0),c=le(!0);return be(te(a,De(l),Ee(([u,d])=>!!d),Dn(!1)),s),be(te(a,De(l),Ee(([u,d])=>!!d),Dn(!1)),c),Ke(te(At(t,a),De(s,n,e,c),Ee(([[,u],d,{sizeTree:p},f,h])=>u&&(!tt(p)||Gd(f))&&!d&&!h),De(l)),([,u])=>{Mn(o,()=>{Oe(c,!0)}),of(4,()=>{Mn(r,()=>{Oe(s,!0)}),Oe(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},ot(Ln,Wt,sa,mr),{singleton:!0});function x0(e,t){return Math.abs(e-t)<1.01}const ca="up",ua="down",cF="none",uF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},dF=0,da=qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=le(!1),s=le(!0),l=je(),c=je(),u=le(4),d=le(dF),p=zt(te(o0(te(ke(o),Qo(1),Dn(!0)),te(ke(o),Qo(1),Dn(!1),n0(100))),it()),!1),f=zt(te(o0(te(n,Dn(!0)),te(n,Dn(!1),n0(200))),it()),!1);be(te(At(ke(o),ke(d)),he(([m,x])=>m<=x),it()),s),be(te(s,pr(50)),c);const h=en(te(At(r,ke(i),ke(t),ke(e),ke(u)),Nn((m,[{scrollHeight:x,scrollTop:S},T,w,C,k])=>{const I=S+T-x>-k,A={scrollHeight:x,scrollTop:S,viewportHeight:T};if(I){let N,V;return S>m.state.scrollTop?(N="SCROLLED_DOWN",V=m.state.scrollTop-S):(N="SIZE_DECREASED",V=m.state.scrollTop-S||m.scrollTopDelta),{atBottom:!0,atBottomBecause:N,scrollTopDelta:V,state:A}}let F;return A.scrollHeight>m.state.scrollHeight?F="SIZE_INCREASED":T<m.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":S<m.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:A}},uF),it((m,x)=>m&&m.atBottom===x.atBottom))),y=zt(te(r,Nn((m,{scrollHeight:x,scrollTop:S,viewportHeight:T})=>{if(x0(m.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:S};{const w=x-(S+T)<1;return m.scrollTop!==S&&w?{changed:!0,jump:m.scrollTop-S,scrollHeight:x,scrollTop:S}:{changed:!0,jump:0,scrollHeight:x,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ee(m=>m.changed),he(m=>m.jump)),0);be(te(h,he(m=>m.atBottom)),a),be(te(a,pr(50)),l);const g=le(ua);be(te(r,he(({scrollTop:m})=>m),it(),Nn((m,x)=>$t(f)?{direction:m.direction,prevScrollTop:x}:{direction:x<m.prevScrollTop?ca:ua,prevScrollTop:x},{direction:ua,prevScrollTop:0}),he(m=>m.direction)),g),be(te(r,pr(50),Dn(cF)),g);const v=le(0);return be(te(p,Ee(m=>!m),Dn(0)),v),be(te(o,pr(100),De(p),Ee(([m,x])=>!!x),Nn(([m,x],[S])=>[x,S],[0,0]),he(([m,x])=>x-m)),v),{atBottomState:h,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:y,scrollDirection:g,scrollVelocity:v}},ot(Wt)),zs="top",Bs="bottom",w0="none";function T0(e,t,n){return typeof e=="number"?n===ca&&t===zs||n===ua&&t===Bs?e:0:n===ca?t===zs?e.main:e.reverse:t===Bs?e.main:e.reverse}function S0(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const sf=qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=je(),a=le(0),s=le(0),l=le(0),c=zt(te(At(ke(r),ke(o),ke(n),ke(i,ia),ke(l),ke(a),ke(t),ke(e),ke(s)),he(([u,d,p,[f,h],y,g,v,m,x])=>{const S=u-m,T=g+v,w=Math.max(p-S,0);let C=w0;const k=S0(x,zs),I=S0(x,Bs);return f-=m,f+=p+v,h+=p+v,h-=m,f>u+T-k&&(C=ca),h<u-w+d+I&&(C=ua),C!==w0?[Math.max(S-p-T0(y,zs,C)-k,0),S-w-v+d+T0(y,Bs,C)+I]:null}),Ee(u=>u!=null),it(ia)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},ot(Wt),{singleton:!0});function fF(e,t,n){if($s(t)){const r=m0(e,t);return[{index:vn(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 lf={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Hs(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:C0(e,o,i),offsetBottom:h,offsetTop:c,top:f,topItems:C0(t,o,i),topListHeight:t.reduce((y,g)=>g.size+y,0),totalCount:n}}function E0(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=af(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return Hs(c,[],s,o,n,r)}function C0(e,t,n){if(e.length===0)return[];if(!$s(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=Vs(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 Zr=qe(([{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=le([]),g=le(0),v=je();be(i.topItemsIndexes,y);const m=zt(te(At(f,h,ke(l,ia),ke(o),ke(r),ke(c),u,ke(y),ke(t),ke(n),e),Ee(([w,C,,k,,,,,,,I])=>{const A=I&&I.length!==k;return w&&!C&&!A}),he(([,,[w,C],k,I,A,F,N,V,P,O])=>{const L=I,{offsetTree:j,sizeTree:D}=L,q=$t(g);if(k===0)return{...lf,totalCount:k};if(w===0&&C===0)return q===0?{...lf,totalCount:k}:E0(q,A,I,V,P,O||[]);if(tt(D))return q>0?null:Hs(fF(af(A,k),L,O),[],k,P,L,V);const M=[];if(N.length>0){const Y=N[0],U=N[N.length-1];let Z=0;for(const R of Vs(D,Y,U)){const H=R.value,X=Math.max(R.start,Y),re=Math.min(R.end,U);for(let z=X;z<=re;z++)M.push({data:O==null?void 0:O[z],index:z,offset:Z,size:H}),Z+=H}}if(!F)return Hs([],M,k,P,L,V);const $=N.length>0?N[N.length-1]+1:0,Q=eF(j,w,C,$);if(Q.length===0)return null;const ie=k-1,J=Ls([],Y=>{for(const U of Q){const Z=U.value;let R=Z.offset,H=U.start;const X=Z.size;if(Z.offset<w){H+=Math.floor((w-Z.offset+P)/(X+P));const z=H-U.start;R+=z*X+z*P}H<$&&(R+=($-H)*X,H=$);const re=Math.min(U.end,ie);for(let z=H;z<=re&&!(R>=C);z++)Y.push({data:O==null?void 0:O[z],index:z,offset:R,size:X}),R+=X+P}});return Hs(J,M,k,P,L,V)}),Ee(w=>w!==null),it()),lf);be(te(e,Ee(Gd),he(w=>w==null?void 0:w.length)),o),be(te(m,he(w=>w.topListHeight)),d),be(d,s),be(te(m,he(w=>[w.top,w.bottom])),a),be(te(m,he(w=>w.items)),v);const x=en(te(m,Ee(({items:w})=>w.length>0),De(o,e),Ee(([{items:w},C])=>w[w.length-1].originalIndex===C-1),he(([,w,C])=>[w-1,C]),it(ia),he(([w])=>w))),S=en(te(m,pr(200),Ee(({items:w,topItems:C})=>w.length>0&&w[0].originalIndex===C.length),he(({items:w})=>w[0].index),it())),T=en(te(m,Ee(({items:w})=>w.length>0),he(({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}}),it(p0)));return{endReached:x,initialItemCount:g,itemsRendered:v,listState:m,rangeChanged:T,startReached:S,topItemsIndexes:y,...p}},ot(Ln,y0,sf,la,sa,da,mr,tf),{singleton:!0}),k0=qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=je(),a=zt(te(At(n,e,r,t,o),he(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return be(ke(a),i),{totalListHeight:a,totalListHeightChanged:i}},ot(Wt,Zr),{singleton:!0}),pF=qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=le(!1),r=zt(te(At(n,e,t),Ee(([o])=>o),he(([,o,i])=>Math.max(0,o-i)),pr(0),it()),0);return{alignToBottom:n,paddingTopAddition:r}},ot(Wt,k0),{singleton:!0});function P0(e){return e?e==="smooth"?"smooth":"auto":!1}const hF=(e,t)=>typeof e=="function"?P0(e(t)):t&&P0(e),mF=qe(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=le(!1),d=je();let p=null;function f(y){Oe(o,{align:"end",behavior:y,index:"LAST"})}Ke(te(At(te(ke(t),Qo(1)),a),De(ke(u),r,i,c),he(([[y,g],v,m,x,S])=>{let T=g&&x,w="auto";return T&&(w=hF(v,m||S),T=T&&!!w),{followOutputBehavior:w,shouldFollow:T,totalCount:y}}),Ee(({shouldFollow:y})=>y)),({followOutputBehavior:y,totalCount:g})=>{p&&(p(),p=null),p=Mn(e,()=>{$t(l)("following output to ",{totalCount:g},tn.DEBUG),f(y),p=null})});function h(y){const g=Mn(n,v=>{y&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!p&&($t(l)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(g,100)}return Ke(te(At(ke(u),t,s),Ee(([y,,g])=>y&&g),Nn(({value:y},[,g])=>({refreshed:y===g,value:g}),{refreshed:!1,value:0}),Ee(({refreshed:y})=>y),De(u,t)),([,y])=>{$t(i)&&h(y!==!1)}),Ke(d,()=>{h($t(u)!==!1)}),Ke(At(ke(u),n),([y,g])=>{y&&!g.atBottom&&g.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},ot(Ln,da,sa,la,mr,hr,Wt)),gF=qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(be(te(s,De(i),Ee(([,l])=>l!==0),De(o,r,t,n,e),he(([[,l],c,u,d,p,f=[]])=>E0(l,c,u,d,p,f))),a),{}),ot(Ln,la,Zr,mr),{singleton:!0}),vF=qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=le(0);return Ke(te(e,De(r),Ee(([,o])=>o!==0),he(([,o])=>({top:o}))),o=>{Mn(te(n,Qo(1),Ee(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Oe(t,o)})})}),{initialScrollTop:r}},ot(mr,Wt,Zr),{singleton:!0}),yF=({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,bF=qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=je();return be(te(u,De(t,l,n,i,o,r,s),De(e),he(([[d,p,f,h,y,g,v,m],x])=>{const{align:S,behavior:T,calculateViewLocation:w=yF,done:C,...k}=d,I=g0(d,p,h-1),A=aa(I,p.offsetTree,x)+y+g,F=A+vn(p.sizeTree,I)[1],N=m+g,V=m+f-v,P=w({itemBottom:F,itemTop:A,locationParams:{align:S,behavior:T,...k},viewportBottom:V,viewportTop:N});return P?C&&Mn(te(a,Ee(O=>!O),Qo($t(a)?1:2)),C):C&&C(),P}),Ee(d=>d!==null)),c),{scrollIntoView:u}},ot(Ln,Wt,sa,Zr,hr),{singleton:!0}),A0=qe(([{scrollVelocity:e}])=>{const t=le(!1),n=je(),r=le(!1);return be(te(e,De(r,t,n),Ee(([o,i])=>!!i),he(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),it()),t),Ke(te(At(t,e,n),De(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},ot(da),{singleton:!0}),cf=qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=je(),r=je(),o=je(),i=le(!1),a=le(void 0);return be(te(At(n,r),he(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),be(te(t,De(r),he(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},ot(Wt)),xF=qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=je(),u=le(void 0),d=le(null),p=le(null);return be(s,d),be(l,p),Ke(te(c,De(t,r,a,d,p,n)),([f,h,y,g,v,m,x])=>{const S=nF(h.sizeTree);g&&v!==null&&m!==null&&(y=v.scrollTop-m.offsetTop),y-=x,f({ranges:S,scrollTop:y})}),be(te(u,Ee(Gd),he(wF)),o),be(te(i,De(u),Ee(([,f])=>f!==void 0),it(),he(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},ot(Ln,Wt,la,mr,cf));function wF(e){return{align:"start",index:0,offset:e.scrollTop}}const TF=qe(([{topItemsIndexes:e}])=>{const t=le(0);return be(te(t,Ee(n=>n>=0),he(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},ot(Zr));function _0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const SF=_0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),EF=qe(([{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,De(a),Nn(([,v,m,x],[{bottom:S,items:T,offsetBottom:w,totalCount:C},k])=>{const I=S+w;let A=0;return m===C&&v.length>0&&T.length>0&&(T[0].originalIndex===0&&v[0].originalIndex===0||(A=I-x,A!==0&&(A+=k))),[A,T,C,I]},[0,[],0,0]),Ee(([v])=>v!==0),De(r,s,n,o,f,h),Ee(([,v,m,x,,,S])=>!S&&!x&&v!==0&&m===ca),he(([[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,De(e,i)),([v,m,x])=>{x&&SF()?Oe(e,m-v):g(-v)}),Ke(te(At(zt(i,!1),e,h),Ee(([v,m,x])=>!v&&!x&&m!==0),he(([v,m])=>m),pr(1)),g),be(te(d,he(v=>({top:-v}))),t),Ke(te(c,De(p,u),he(([v,{groupIndices:m,lastSize:x,sizeTree:S},T])=>{function w(C){return C*(x+T)}if(m.length===0)return w(v);{let C=0;const k=oa(S,0);let I=0,A=0;for(;I<v;){I++,C+=k;let F=m.length===A+1?1/0:m[A+1]-m[A]-1;I+F>v&&(C-=k,F=v-I+1),I+=F,C+=w(F),A++}return C}})),v=>{Oe(e,v),requestAnimationFrame(()=>{Oe(t,{top:v}),requestAnimationFrame(()=>{Oe(e,0),Oe(h,!1)})})}),{deviation:e}},ot(Wt,da,Zr,Ln,hr,tf)),CF=qe(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),ot(sf,gF,mr,A0,k0,vF,pF,cf,bF,hr)),I0=qe(([{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:x,...S},{scrollToIndex:T},w,{topItemCount:C},{groupCounts:k},I])=>(be(S.rangeChanged,I.scrollSeekRangeChanged),be(te(I.windowViewportRect,he(A=>A.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:x,totalCount:u,...v,groupIndices:i,itemSize:a,listState:m,scrollToIndex:T,statefulTotalCount:c,trackItemSizes:d,...S,...I,...y,sizes:l,...g}),ot(Ln,la,Wt,xF,mF,Zr,sa,EF,TF,y0,CF));function kF(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 Ws=typeof document<"u"?E.useLayoutEffect:E.useEffect;function uf(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 x=g[t.required[m]];Oe(x,v[m])}for(const m of o)if(m in v){const x=g[t.optional[m]];Oe(x,v[m])}g.propsReady&&Oe(g.propsReady,!0)}function c(g){return i.reduce((v,m)=>(v[m]=x=>{const S=g[t.methods[m]];Oe(S,x)},v),{})}function u(g){return a.reduce((v,m)=>(v[m]=BN(g[t.events[m]]),v),{})}const d=E.forwardRef((g,v)=>{const{children:m,...x}=g,[S]=E.useState(()=>Ls(WN(e),C=>{l(C,x)})),[T]=E.useState(e0(u,S));Ws(()=>{for(const C of a)C in x&&Ke(T[C],x[C]);return()=>{Object.values(T).map(Yd)}},[x,T,S]),Ws(()=>{l(S,x)}),E.useImperativeHandle(v,Jx(c(S)));const w=n;return b.jsx(s.Provider,{value:S,children:n?b.jsx(w,{...kF([...r,...o,...a],x),children:m}):m})}),p=g=>E.useCallback(t0(Oe,E.useContext(s)[g]),[g]),f=g=>{const v=E.useContext(s)[g],m=E.useCallback(x=>Ke(v,x),[v]);return E.useSyncExternalStore(m,()=>$t(v),()=>$t(v))},h=g=>{const v=E.useContext(s)[g],[m,x]=E.useState(e0($t,v));return Ws(()=>Ke(v,S=>{S!==m&&x(Jx(S))}),[v,m]),m},y=E.version.startsWith("18")?f:h;return{Component:d,useEmitter:(g,v)=>{const m=E.useContext(s)[g];Ws(()=>Ke(m,v),[v,m])},useEmitterValue:y,usePublisher:p}}const qs=E.createContext(void 0),O0=E.createContext(void 0),M0=typeof document<"u"?E.useLayoutEffect:E.useEffect;function df(e){return"self"in e}function PF(e){return"body"in e}function D0(e,t,n,r=Xo,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(PF(g)||df(g)){const m=df(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():hi.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;df(f)?(g=Math.max(yn(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=yn(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)),x0(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 ff="-webkit-sticky",N0="sticky",F0=_0(()=>{if(typeof document>"u")return N0;const e=document.createElement("div");return e.style.position=ff,e.style.position===ff?ff:N0});function pf(e){return e}const AF=qe(()=>{const e=le(l=>`Item ${l}`),t=le(null),n=le(l=>`Group ${l}`),r=le({}),o=le(pf),i=le("div"),a=le(Xo),s=(l,c=null)=>zt(te(r,he(u=>u[l]),it()),c);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),_F=qe(([e,t])=>({...e,...t}),ot(I0,AF)),IF=({height:e})=>b.jsx("div",{style:{height:e}}),OF={overflowAnchor:"none",position:F0(),zIndex:1},L0={overflowAnchor:"none"},MF={...L0,display:"inline-block",height:"100%"},V0=E.memo(function({showTopList:e=!1}){const t=Pe("listState"),n=cn("sizeRanges"),r=Pe("useWindowScroll"),o=Pe("customScrollParent"),i=cn("windowScrollContainerState"),a=cn("scrollContainerState"),s=o||r?i:a,l=Pe("itemContent"),c=Pe("context"),u=Pe("groupContent"),d=Pe("trackItemSizes"),p=Pe("itemSize"),f=Pe("log"),h=cn("gap"),y=Pe("horizontalDirection"),{callbackRef:g}=i0(n,p,d,e?Xo:s,f,h,o,y,Pe("skipAnimationFrameInResizeObserver")),[v,m]=E.useState(0);gf("deviation",P=>{v!==P&&m(P)});const x=Pe("EmptyPlaceholder"),S=Pe("ScrollSeekPlaceholder")||IF,T=Pe("ListComponent"),w=Pe("ItemComponent"),C=Pe("GroupComponent"),k=Pe("computeItemKey"),I=Pe("isSeeking"),A=Pe("groupIndices").length>0,F=Pe("alignToBottom"),N=Pe("initialItemFinalLocationReached"),V=e?{}:{boxSizing:"border-box",...y?{display:"inline-block",height:"100%",marginLeft:v!==0?v:F?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:F?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...N?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?b.jsx(x,{...at(x,c)}):b.jsx(T,{...at(T,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:g,style:V,children:(e?t.topItems:t.items).map(P=>{const O=P.originalIndex,L=k(O+t.firstItemIndex,P.data,c);return I?E.createElement(S,{...at(S,c),height:P.size,index:P.index,key:L,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?E.createElement(C,{...at(C,c),"data-index":O,"data-item-index":P.index,"data-known-size":P.size,key:L,style:OF},u(P.index,c)):E.createElement(w,{...at(w,c),...j0(w,P.data),"data-index":O,"data-item-group-index":P.groupIndex,"data-item-index":P.index,"data-known-size":P.size,key:L,style:y?MF:L0},A?l(P.index,P.groupIndex,P.data,c):l(P.index,P.data,c))})})}),DF={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},NF={outline:"none",overflowX:"auto",position:"relative"},ei=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),FF={position:F0(),top:0,width:"100%",zIndex:1};function at(e,t){if(typeof e!="string")return{context:t}}function j0(e,t){return{item:typeof e=="string"?void 0:t}}const LF=E.memo(function(){const e=Pe("HeaderComponent"),t=cn("headerHeight"),n=Pe("HeaderFooterTag"),r=Fn(E.useMemo(()=>i=>{t(yn(i,"height"))},[t]),!0,Pe("skipAnimationFrameInResizeObserver")),o=Pe("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...at(e,o)})}):null}),VF=E.memo(function(){const e=Pe("FooterComponent"),t=cn("footerHeight"),n=Pe("HeaderFooterTag"),r=Fn(E.useMemo(()=>i=>{t(yn(i,"height"))},[t]),!0,Pe("skipAnimationFrameInResizeObserver")),o=Pe("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...at(e,o)})}):null});function hf({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}=D0(a,l,s,c,void 0,d);return e("scrollTo",h),e("scrollBy",p),b.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?NF:DF,...o},tabIndex:0,...i,...at(s,u),children:r})})}function mf({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}=D0(a,l,s,h,d);return M0(()=>{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),b.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...at(s,p),children:r})})}const jF=({children:e})=>{const t=E.useContext(qs),n=cn("viewportHeight"),r=cn("fixedItemHeight"),o=Pe("alignToBottom"),i=Pe("horizontalDirection"),a=E.useMemo(()=>na(n,l=>yn(l,i?"width":"height")),[n,i]),s=Fn(a,!0,Pe("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.jsx("div",{"data-viewport-type":"element",ref:s,style:ei(o),children:e})},RF=({children:e})=>{const t=E.useContext(qs),n=cn("windowViewportRect"),r=cn("fixedItemHeight"),o=Pe("customScrollParent"),i=Zd(n,o,Pe("skipAnimationFrameInResizeObserver")),a=Pe("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.jsx("div",{"data-viewport-type":"window",ref:i,style:ei(a),children:e})},$F=({children:e})=>{const t=Pe("TopItemListComponent")||"div",n=Pe("headerHeight"),r={...FF,marginTop:`${n}px`},o=Pe("context");return b.jsx(t,{style:r,...at(t,o),children:e})},zF=E.memo(function(e){const t=Pe("useWindowScroll"),n=Pe("topItemsIndexes").length>0,r=Pe("customScrollParent"),o=Pe("context"),i=r||t?WF:HF,a=r||t?RF:jF;return b.jsxs(i,{...e,...at(i,o),children:[n&&b.jsx($F,{children:b.jsx(V0,{showTopList:!0})}),b.jsxs(a,{children:[b.jsx(LF,{}),b.jsx(V0,{}),b.jsx(VF,{})]})]})}),{Component:BF,useEmitter:gf,useEmitterValue:Pe,usePublisher:cn}=uf(_F,{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:{}},zF),HF=hf({useEmitter:gf,useEmitterValue:Pe,usePublisher:cn}),WF=mf({useEmitter:gf,useEmitterValue:Pe,usePublisher:cn}),vf=BF,qF=qe(()=>{const e=le(l=>b.jsxs("td",{children:["Item $",l]})),t=le(null),n=le(null),r=le(null),o=le({}),i=le(pf),a=le(Xo),s=(l,c=null)=>zt(te(o,he(u=>u[l]),it()),c);return{components:o,computeItemKey:i,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),UF=qe(([e,t])=>({...e,...t}),ot(I0,qF)),GF=({height:e})=>b.jsx("tr",{children:b.jsx("td",{style:{height:e}})}),YF=({height:e})=>b.jsx("tr",{children:b.jsx("td",{style:{border:0,height:e,padding:0}})}),KF={overflowAnchor:"none"},R0=E.memo(function({showTopList:e=!1}){const t=Ne("listState"),n=Ne("computeItemKey"),r=Ne("firstItemIndex"),o=Ne("isSeeking"),i=Ne("ScrollSeekPlaceholder")||GF,a=Ne("context"),s=Ne("TableRowComponent"),l=Ne("fixedHeaderHeight"),c=Ne("itemContent"),u=(e?t.topItems:[]).reduce((p,f,h)=>(h===0?p.push(f.size):p.push(p[h-1]+f.size),p),[]),d=(e?t.topItems:t.items).map(p=>{const f=p.originalIndex,h=n(f+r,p.data,a),y=e?f===0?0:u[f-1]:0;return o?E.createElement(i,{...at(i,a),height:p.size,index:p.index,key:h,type:p.type||"item"}):E.createElement(s,{...at(s,a),...j0(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}:KF},c(p.index,p.data,a))});return b.jsx(b.Fragment,{children:d})}),ZF=E.memo(function(){const e=Ne("listState"),t=Ne("topItemsIndexes").length>0,n=bn("sizeRanges"),r=Ne("useWindowScroll"),o=Ne("customScrollParent"),i=bn("windowScrollContainerState"),a=bn("scrollContainerState"),s=o||r?i:a,l=Ne("trackItemSizes"),c=Ne("itemSize"),u=Ne("log"),{callbackRef:d,ref:p}=i0(n,c,l,s,u,void 0,o,!1,Ne("skipAnimationFrameInResizeObserver")),[f,h]=E.useState(0);yf("deviation",A=>{f!==A&&(p.current.style.marginTop=`${A}px`,h(A))});const y=Ne("EmptyPlaceholder"),g=Ne("FillerRow")||YF,v=Ne("TableBodyComponent"),m=Ne("paddingTopAddition"),x=Ne("statefulTotalCount"),S=Ne("context");if(x===0&&y)return b.jsx(y,{...at(y,S)});const T=(t?e.topItems:[]).reduce((A,F)=>A+F.size,0),w=e.offsetTop+m+f-T,C=e.offsetBottom,k=w>0?b.jsx(g,{context:S,height:w},"padding-top"):null,I=C>0?b.jsx(g,{context:S,height:C},"padding-bottom"):null;return b.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...at(v,S),children:[k,t&&b.jsx(R0,{showTopList:!0}),b.jsx(R0,{}),I]})}),XF=({children:e})=>{const t=E.useContext(qs),n=bn("viewportHeight"),r=bn("fixedItemHeight"),o=Fn(E.useMemo(()=>na(n,i=>yn(i,"height")),[n]),!0,Ne("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.jsx("div",{"data-viewport-type":"element",ref:o,style:ei(!1),children:e})},QF=({children:e})=>{const t=E.useContext(qs),n=bn("windowViewportRect"),r=bn("fixedItemHeight"),o=Ne("customScrollParent"),i=Zd(n,o,Ne("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.jsx("div",{"data-viewport-type":"window",ref:i,style:ei(!1),children:e})},JF=E.memo(function(e){const t=Ne("useWindowScroll"),n=Ne("customScrollParent"),r=bn("fixedHeaderHeight"),o=bn("fixedFooterHeight"),i=Ne("fixedHeaderContent"),a=Ne("fixedFooterContent"),s=Ne("context"),l=Fn(E.useMemo(()=>na(r,v=>yn(v,"height")),[r]),!0,Ne("skipAnimationFrameInResizeObserver")),c=Fn(E.useMemo(()=>na(o,v=>yn(v,"height")),[o]),!0,Ne("skipAnimationFrameInResizeObserver")),u=n||t?nL:tL,d=n||t?QF:XF,p=Ne("TableComponent"),f=Ne("TableHeadComponent"),h=Ne("TableFooterComponent"),y=i?b.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...at(f,s),children:i()},"TableHead"):null,g=a?b.jsx(h,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...at(h,s),children:a()},"TableFoot"):null;return b.jsx(u,{...e,...at(u,s),children:b.jsx(d,{children:b.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...at(p,s),children:[y,b.jsx(ZF,{},"TableBody"),g]})})})}),{Component:eL,useEmitter:yf,useEmitterValue:Ne,usePublisher:bn}=uf(UF,{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:{}},JF),tL=hf({useEmitter:yf,useEmitterValue:Ne,usePublisher:bn}),nL=mf({useEmitter:yf,useEmitterValue:Ne,usePublisher:bn}),rL=eL,$0={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},oL={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:z0,floor:Us,max:fa,min:bf,round:B0}=Math;function H0(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function iL(e){return{...oL,items:e}}function Gs(e,t){return e&&e.width===t.width&&e.height===t.height}function aL(e,t){return e&&e.column===t.column&&e.row===t.row}const sL=qe(([{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:x,windowViewportRect:S},T])=>{const w=le(0),C=le(0),k=le($0),I=le({height:0,width:0}),A=le({height:0,width:0}),F=je(),N=je(),V=le(0),P=le(null),O=le({column:0,row:0}),L=je(),j=je(),D=le(!1),q=le(0),M=le(!0),$=le(!1),Q=le(!1);Ke(te(h,De(q),Ee(([R,H])=>!!H)),()=>{Oe(M,!1)}),Ke(te(At(h,M,A,I,q,$),Ee(([R,H,X,re,,z])=>R&&!H&&X.height!==0&&re.height!==0&&!z)),([,,,,R])=>{Oe($,!0),of(1,()=>{Oe(F,R)}),Mn(te(c),()=>{Oe(t,[0,0]),Oe(M,!0)})}),be(te(j,Ee(R=>R!=null&&R.scrollTop>0),Dn(0)),C),Ke(te(h,De(j),Ee(([,R])=>R!=null)),([,R])=>{R&&(Oe(I,R.viewport),Oe(A,R.item),Oe(O,R.gap),R.scrollTop>0&&(Oe(D,!0),Mn(te(c,Qo(1)),H=>{Oe(D,!1)}),Oe(l,{top:R.scrollTop})))}),be(te(I,he(({height:R})=>R)),d),be(te(At(ke(I,Gs),ke(A,Gs),ke(O,(R,H)=>R&&R.column===H.column&&R.row===H.row),ke(c)),he(([R,H,X,re])=>({gap:X,item:H,scrollTop:re,viewport:R}))),L),be(te(At(ke(w),r,ke(O,aL),ke(A,Gs),ke(I,Gs),ke(P),ke(C),ke(D),ke(M),ke(q)),Ee(([,,,,,,,R])=>!R),he(([R,[H,X],re,z,xe,Ae,Ie,,Se,K])=>{const{column:se,row:G}=re,{height:ee,width:ye}=z,{width:de}=xe;if(Ie===0&&(R===0||de===0))return $0;if(ye===0){const wn=af(K,R),$n=wn+Math.max(Ie-1,0);return iL(H0(wn,$n,Ae))}const Re=W0(de,ye,se);let oe,ce;Se?H===0&&X===0&&Ie>0?(oe=0,ce=Ie-1):(oe=Re*Us((H+G)/(ee+G)),ce=Re*z0((X+G)/(ee+G))-1,ce=bf(R-1,fa(ce,Re-1)),oe=bf(ce,fa(0,oe))):(oe=0,ce=-1);const $e=H0(oe,ce,Ae),{bottom:Ze,top:Ct}=q0(xe,re,z,$e),pt=z0(R/Re),Lt=pt*ee+(pt-1)*G-Ze;return{bottom:Ze,itemHeight:ee,items:$e,itemWidth:ye,offsetBottom:Lt,offsetTop:Ct,top:Ct}})),k),be(te(P,Ee(R=>R!==null),he(R=>R.length)),w),be(te(At(I,A,k,O),Ee(([R,H,{items:X}])=>X.length>0&&H.height!==0&&R.height!==0),he(([R,H,{items:X},re])=>{const{bottom:z,top:xe}=q0(R,re,H,X);return[xe,z]}),it(ia)),t);const ie=le(!1);be(te(c,De(ie),he(([R,H])=>H||R!==0)),ie);const J=en(te(At(k,w),Ee(([{items:R}])=>R.length>0),De(ie),Ee(([[R,H],X])=>{const re=R.items[R.items.length-1].index===H-1;return(X||R.bottom>0&&R.itemHeight>0&&R.offsetBottom===0&&R.items.length===H)&&re}),he(([[,R]])=>R-1),it())),Y=en(te(ke(k),Ee(({items:R})=>R.length>0&&R[0].index===0),Dn(0),it())),U=en(te(ke(k),De(D),Ee(([{items:R},H])=>R.length>0&&!H),he(([{items:R}])=>({endIndex:R[R.length-1].index,startIndex:R[0].index})),it(p0),pr(0)));be(U,f.scrollSeekRangeChanged),be(te(F,De(I,A,w,O),he(([R,H,X,re,z])=>{const xe=b0(R),{align:Ae,behavior:Ie,offset:Se}=xe;let K=xe.index;K==="LAST"&&(K=re-1),K=fa(0,K,bf(re-1,K));let se=xf(H,z,X,K);return Ae==="end"?se=B0(se-H.height+X.height):Ae==="center"&&(se=B0(se-H.height/2+X.height/2)),Se&&(se+=Se),{behavior:Ie,top:se}})),l);const Z=zt(te(k,he(R=>R.offsetBottom+R.bottom)),0);return be(te(S,he(R=>({height:R.visibleHeight,width:R.visibleWidth}))),I),{customScrollParent:g,data:P,deviation:V,footerHeight:o,gap:O,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:A,overscan:n,restoreStateFrom:j,scrollBy:a,scrollContainerState:s,scrollHeight:N,scrollTo:l,scrollToIndex:F,scrollTop:c,smoothScrollTargetReached:u,totalCount:w,useWindowScroll:v,viewportDimensions:I,windowScrollContainerState:m,windowScrollTo:x,windowViewportRect:S,...f,gridState:k,horizontalDirection:Q,initialTopMostItemIndex:q,totalListHeight:Z,...p,endReached:J,propsReady:y,rangeChanged:U,startReached:Y,stateChanged:L,stateRestoreInProgress:D,...T}},ot(sf,Wt,da,A0,mr,cf,hr));function W0(e,t,n){return fa(1,Us((e+n)/(Us(t)+n)))}function q0(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=xf(e,t,n,r[0].index);return{bottom:xf(e,t,n,r[r.length-1].index)+o,top:i}}function xf(e,t,n,r){const o=W0(e.width,n.width,t.column),i=Us(r/o),a=i*n.height+fa(0,i-1)*t.row;return a>0?a+t.row:a}const lL=qe(()=>{const e=le(d=>`Item ${d}`),t=le({}),n=le(null),r=le("virtuoso-grid-item"),o=le("virtuoso-grid-list"),i=le(pf),a=le("div"),s=le(Xo),l=(d,p=null)=>zt(te(t,he(f=>f[d]),it()),p),c=le(!1),u=le(!1);return be(ke(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")}}),cL=qe(([e,t])=>({...e,...t}),ot(sL,lL)),uL=E.memo(function(){const e=lt("gridState"),t=lt("listClassName"),n=lt("itemClassName"),r=lt("itemContent"),o=lt("computeItemKey"),i=lt("isSeeking"),a=un("scrollHeight"),s=lt("ItemComponent"),l=lt("ListComponent"),c=lt("ScrollSeekPlaceholder"),u=lt("context"),d=un("itemDimensions"),p=un("gap"),f=lt("log"),h=lt("stateRestoreInProgress"),y=un("reportReadyState"),g=Fn(E.useMemo(()=>v=>{const m=v.parentElement.parentElement.scrollHeight;a(m);const x=v.firstChild;if(x){const{height:S,width:T}=x.getBoundingClientRect();d({height:S,width:T})}p({column:G0("column-gap",getComputedStyle(v).columnGap,f),row:G0("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return M0(()=>{e.itemHeight>0&&e.itemWidth>0&&y(!0)},[e]),h?null:b.jsx(l,{className:t,ref:g,...at(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?b.jsx(c,{...at(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},m):E.createElement(s,{...at(s,u),className:n,"data-index":v.index,key:m},r(v.index,v.data,u))})})}),dL=E.memo(function(){const e=lt("HeaderComponent"),t=un("headerHeight"),n=lt("headerFooterTag"),r=Fn(E.useMemo(()=>i=>{t(yn(i,"height"))},[t]),!0,!1),o=lt("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...at(e,o)})}):null}),fL=E.memo(function(){const e=lt("FooterComponent"),t=un("footerHeight"),n=lt("headerFooterTag"),r=Fn(E.useMemo(()=>i=>{t(yn(i,"height"))},[t]),!0,!1),o=lt("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...at(e,o)})}):null}),pL=({children:e})=>{const t=E.useContext(O0),n=un("itemDimensions"),r=un("viewportDimensions"),o=Fn(E.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return E.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),b.jsx("div",{ref:o,style:ei(!1),children:e})},hL=({children:e})=>{const t=E.useContext(O0),n=un("windowViewportRect"),r=un("itemDimensions"),o=lt("customScrollParent"),i=Zd(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]),b.jsx("div",{ref:i,style:ei(!1),children:e})},mL=E.memo(function({...e}){const t=lt("useWindowScroll"),n=lt("customScrollParent"),r=n||t?vL:gL,o=n||t?hL:pL,i=lt("context");return b.jsx(r,{...e,...at(r,i),children:b.jsxs(o,{children:[b.jsx(dL,{}),b.jsx(uL,{}),b.jsx(fL,{})]})})}),{useEmitter:U0,useEmitterValue:lt,usePublisher:un}=uf(cL,{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"}},mL),gL=hf({useEmitter:U0,useEmitterValue:lt,usePublisher:un}),vL=mf({useEmitter:U0,useEmitterValue:lt,usePublisher:un});function G0(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 yL=()=>{const e=E.useContext(Ui);return e?e.tweaks:Ju},Y0=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>b.jsxs("div",{className:He("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:b.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?b.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?b.jsx(Xx,{as:"button",type:"button","aria-description":r,title:b.jsxs("span",{className:"cursor-help",children:[b.jsx("span",{className:"sr-only",children:r}),b.jsx(iy,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:b.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?b.jsxs(E.Fragment,{children:[b.jsx(ry,{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}),b.jsx(TA,{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]}),pa=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:x,reportStatus:S},T)=>{const w=yL(),C=S!==void 0?S:w.input.iconFeedback,k=d??f,I=Ot(),A=e??I.inputOptionalLabel;return b.jsxs("fieldset",{ref:T,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":y,"data-interactive":!!i,className:He("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[b.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:[b.jsx(Y0,{info:s,hideLeft:v,reportStatus:C,title:h,placeholder:g,children:A||n?b.jsxs(E.Fragment,{children:[m?null:b.jsx("span",{"aria-disabled":x,className:"text-opacity-70 aria-disabled:text-disabled",children:A}),n?b.jsx(E.Fragment,{children:n}):null]}):null}),b.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?b.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?b.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),b.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}),b.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})]})}),bL=e=>b.jsx(E.Fragment,{children:e.children}),xL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},wL={caseSensitive:!1,sort:!1},TL=[],SL=E.forwardRef(function(t,n){return b.jsx(gt.ul,{...t,ref:n,className:"w-full rounded-lg border-b border-tooltip-border last:border-transparent",children:b.jsx(Qn,{children:t.children})})}),EL=E.forwardRef(function({item:t,context:n,...r},o){return b.jsx(gt.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),CL={List:SL,Item:EL},ti=320,wf=40,kL=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??"",x=Ot(),[S,T]=E.useState(()=>Math.min(ti,wf*e.length)),[w,C]=E.useState(!1),[k,I]=E.useState(""),[A,F]=E.useState(m),[N,V]=E.useState(()=>{var K;return((K=e.find(se=>se.value===m))==null?void 0:K.label)??m}),[P,O]=E.useState(null),L=E.useRef(TL),j=t&&k!==""?[{value:k,label:k,"data-dynamic":"true"},...e]:e,D=new Yr(j,["value","label"],wL).search(k),q=()=>{C(!1),T(0)},M=D.filter(K=>K.hidden!==!0),$=t?void 0:`^(${e.map(K=>`${bc(K.value)}${K.label?"|"+bc(K.label):""}`).join("|")})$`;E.useEffect(()=>{if(h.value){const K=e.find(se=>se.value===h.value);F((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 se=0;Array.from(K.current.querySelectorAll("li")).slice(0,Math.min(D.length,10)).forEach(ye=>{const de=ye.getBoundingClientRect();se+=de.height});const ee=Math.min(se,ti);T(ee)},[k,w]);const{x:Q,y:ie,strategy:J,refs:Y,context:U}=qr({open:w,transform:!0,strategy:"absolute",onOpenChange:C,whileElementsMounted:Ki,middleware:[Zi(4),ux({padding:10,elementContext:"reference",apply(K){var de;const se=(de=g.current)==null?void 0:de.getBoundingClientRect().width,G=K.elements.floating.querySelector("ul"),ee=(G==null?void 0:G.getBoundingClientRect().height)||0,ye=Math.min(ee<wf?ti:ee,ti);hi.flushSync(()=>setTimeout(()=>{const Re=(G==null?void 0:G.getBoundingClientRect().height)??0;return Re<wf?void T(ye):void T(Math.min(Re,ti))},50)),Object.assign(K.elements.floating.style,{width:`${se}px`,maxWidth:`${se}px`,maxHeight:`${ti}`})}})]}),Z=qx(U,xL),{getReferenceProps:R,getFloatingProps:H,getItemProps:X}=Ur([Gr(U,{role:"listbox"}),Wr(U),Hd(U,{cols:0,listRef:L,loop:!0,virtual:!0,allowEscape:!0,activeIndex:P,selectedIndex:P,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:K=>O(se=>K??se)})]);E.useEffect(()=>{const K=Y.reference.current;if(K)return mi(K)},[]);const re=(K,se)=>{F(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),V(K.label??""),q(),I(""),O(se)},z=K=>{var G;const se=K.target.value;return I(se),!w&&se===""?C(!0):(K.target.name=h.name||"",se?C(!0):(G=h.onChange)==null?void 0:G.call(h,K))},xe=()=>{var K;C(!0),I(""),(K=Y.reference.current)==null||K.focus()},Ae=()=>{C(!0),I("")},Ie=()=>{var K;(K=Y.reference.current)==null||K.setAttribute("data-value",""),I(""),F(""),V(""),vc(Y.reference.current),q()},Se=h.id||h.name;return b.jsxs(pa,{...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:b.jsxs("span",{className:"flex items-center gap-0.5",children:[u,b.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:xe,children:[b.jsx(Mu,{size:20}),b.jsx("span",{className:"sr-only",children:x.inputCaretDown})]}),A?b.jsx("button",{type:"button",onClick:Ie,className:"p-2 transition-colors link:text-danger md:p-1",children:b.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.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:[b.jsx("input",{"data-shadow":"true",...R({...h,onChange:z,onFocus:Ae,pattern:$,ref:Y.setReference,name:`${Se}-shadow`,id:`${Se}-shadow`,onClick:K=>K.currentTarget.focus(),onKeyDown(K){var se,G;if(K.key==="ArrowDown"){let ee=P+1;return ee>D.length-1&&(ee=0),(se=v.current)==null||se.scrollIntoView({index:ee}),O(ee)}if(K.key==="ArrowUp"){let ee=P-1;return ee<0&&(ee=D.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(P!==null&&D[P])return K.preventDefault(),re(D[P],P);if(D.length===1)return K.preventDefault(),re(D[0],0)}}}),"data-value":A,"data-error":!!p,"data-name":Se,"data-target":Se,required:f,value:w?k:N||A,"aria-autocomplete":"list",autoComplete:"off",className:He("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)}),b.jsx("input",{id:Se,name:Se,type:"hidden","data-origin":Se,ref:y,required:f,defaultValue:h.value||A||void 0}),b.jsx(Br,{preserveTabOrder:!0,children:w?b.jsx(Go,{guards:!0,returnFocus:!1,context:U,initialFocus:-1,visuallyHiddenDismiss:!0,children:b.jsxs("ul",{...H({ref:Y.setFloating,style:{...Z.styles,position:J,left:(Q??0)+(A?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:[D.length===0?b.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:b.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:o||x.autocompleteEmpty})}):null,b.jsx(vf,{ref:v,data:M,components:CL,hidden:M.length===0,className:"rounded-lg border-floating-border bg-floating-background p-0 text-foreground",style:{height:S},itemContent:(K,se)=>{const G=se.Render??bL,ee=A===se.value||A===se.label,ye=P===K,de=se.label??se.value;return b.jsx("button",{"data-value":se.value,...X({ref:Re=>void(L.current[K]=Re),role:"option",type:"button","aria-checked":ee,"aria-current":ee,"aria-selected":ee,"aria-busy":se.disabled,onClick:()=>re(se,K),className:`cursor-pointer w-full p-2 text-left ${ee?"bg-primary-hover text-primary-foreground":""} ${ye?"bg-floating-hover text-floating-foreground":""}`}),children:b.jsx(G,{...h,label:se.label,value:se.value,children:de})})}})]})}):null})]})});class ni extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof ni&&(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 ni(this)}}const Tf=E.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:i,container:a,...s},l)=>b.jsxs("label",{"data-task":t,"data-component":"checkbox","data-disabled":s.disabled,"aria-disabled":s.disabled,className:He("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",a),children:[b.jsx("input",{...s,ref:l,type:"checkbox","data-task":t,className:He("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,b.jsx("span",{"data-name":"checkbox-label",className:He("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),PL=e=>b.jsx(E.Fragment,{children:e.children}),AL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},_L={caseSensitive:!1,sort:!1},K0=[],IL=E.forwardRef(function(t,n){return b.jsx(gt.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:b.jsx(Qn,{children:t.children})})}),OL=E.forwardRef(function({item:t,context:n,...r},o){return b.jsx(gt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),ML={List:IL,Item:OL},DL=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]),b.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?b.jsxs(wc,{size:"small","data-multicounter":"true",children:[r," ",t.multiComboboxSelectedLabel]}):e.children})},NL=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 ni(r.map(G=>[G.value,G])),[r]),m=E.useRef(null),x=E.useRef(null),S=y.value??y.defaultValue??K0,T=Ot(),[w,C]=E.useState(0),[k,I]=E.useState(!1),[A,F]=E.useState(""),[N,V]=E.useState(()=>{const G=new ni;return S.forEach(ee=>{const ye=v.get(ee);return ye?G.set(ee,ye):void 0}),G}),P=E.useMemo(()=>Array.from(N.keys()),[N]),[O,L]=E.useState(()=>{const G=new Set(S);return r.reduce((ee,ye)=>G.has(ye.value)?[...ee,ye.label??ye.value]:ee,[])??S}),[j,D]=E.useState(null),q=E.useRef(K0),M=h&&A!==""?[{value:A,label:A,"data-dynamic":"true"},...r]:r,$=new Yr(M,["value","label"],_L).search(A);E.useEffect(()=>{k||C(0)},[k]),E.useEffect(()=>{y.value&&V(new ni(y.value.map(G=>[G,v.get(G)])))},[y.value,v]);const{x:Q,y:ie,strategy:J,refs:Y,context:U}=qr({open:k,transform:!0,strategy:"absolute",onOpenChange:I,whileElementsMounted:Ki,middleware:[Zi(4),ux({padding:10,elementContext:"reference",apply(G){var de;const ee=(de=m.current)==null?void 0:de.getBoundingClientRect().width,ye=360;hi.flushSync(()=>setTimeout(()=>C(ye),200)),Object.assign(G.elements.floating.style,{width:`${ee}px`,maxWidth:`${ee}px`,maxHeight:`${ye}px`,height:`${ye}px`})}})]}),Z=qx(U,AL),{getReferenceProps:R,getFloatingProps:H,getItemProps:X}=Ur([Gr(U,{role:"listbox"}),Wr(U),Hd(U,{cols:0,listRef:q,loop:!0,virtual:!0,allowEscape:!0,activeIndex:j,selectedIndex:j,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:G=>D(ee=>G??ee)})]);E.useEffect(()=>{const G=Y.reference.current;if(G)return mi(G)},[]);const re=(G,ee)=>{const ye=N.clone();ye.has(G.value)?ye.delete(G.value):ye.set(G.value,G),V(ye);const de=Y.reference.current;if(!de)return;de==null||de.setAttribute("data-value",G.value),de.value=Array.from(ye.values());const Re=new Event("change",{bubbles:!1,cancelable:!0});de.dispatchEvent(Re),y.onChange&&y.onChange(Re),L(oe=>oe.concat(G.label??"")),F(""),D(ee)},z=G=>{const ee=G.target.value;return F(ee),!k&&ee===""?I(!0):(G.target.name=y.name||"",ee?I(!0):void 0)},xe=()=>{var G;I(!0),F(""),(G=Y.reference.current)==null||G.focus()},Ae=()=>{I(!0),F("")},Ie=()=>{var G;(G=Y.reference.current)==null||G.setAttribute("data-value",""),F(""),vc(Y.reference.current),I(!1)},Se=y.id||y.name,K=N.map(G=>b.jsx(wc,{size:"small",children:G.label??G.value},`multicombobox-${G.value}-x`)),se=$.filter(G=>G.hidden!==!0);return b.jsxs(pa,{...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:b.jsxs("span",{className:"flex items-center gap-0.5",children:[b.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:xe,children:[b.jsx(Mu,{size:20}),b.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),N?b.jsx("button",{type:"button",onClick:Ie,className:"transition-colors link:text-danger",children:b.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.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:[b.jsx("button",{...R({...y,onFocus:Ae,id:`${Se}-shadow`,name:`${Se}-shadow`,ref:Y.setReference}),type:"button","data-name":Se,"data-target":Se,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":P.join(","),value:k?A:O||N,className:He("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:b.jsx(DL,{label:c,children:K})}),b.jsx("input",{id:Se,name:Se,type:"hidden","data-origin":Se,ref:g,required:f,defaultValue:y.value||P||void 0}),b.jsx(Br,{preserveTabOrder:!0,children:k?b.jsx(Go,{guards:!0,returnFocus:!1,context:U,initialFocus:-1,visuallyHiddenDismiss:!0,children:b.jsxs("div",{...H({ref:Y.setFloating,style:{...Z.styles,position:J,left:(Q??0)+(N?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:[b.jsx("input",{autoFocus:!0,value:A,onChange:z,title:y.title,placeholder:T.multiComboboxInnerPlaceholder,onKeyDown:G=>{var ee,ye;if(G.key==="ArrowDown"){let de=j+1;return de>$.length-1&&(de=0),(ee=x.current)==null||ee.scrollIntoView({index:de}),D(de)}if(G.key==="ArrowUp"){let de=j-1;return de<0&&(de=$.length-1),(ye=x.current)==null||ye.scrollIntoView({index:de}),D(de)}if(G.key==="Escape")return G.currentTarget.blur(),I(!1);if(G.key==="Enter"){if(j!==null&&$[j])return G.preventDefault(),re($[j],j);if($.length===1)return G.preventDefault(),re($[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?b.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:b.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||T.autocompleteEmpty})}):null,b.jsx(vf,{ref:x,data:se,components:ML,hidden:se.length===0,style:{height:N.size===0?w-49:w-86},className:"border-floating-border bg-floating-background p-0 text-foreground",itemContent:(G,ee)=>{const ye=ee.Render??PL,de=N.has(ee.value)||N.has(ee.label??""),Re=j===G,oe=ee.label??ee.value;return b.jsx("button",{"data-value":ee.value,...X({ref:ce=>void(q.current[G]=ce),role:"option",type:"button","aria-checked":de,"aria-current":de,"aria-selected":de,"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 ${de||Re?"bg-floating-hover text-floating-foreground":""}`,children:b.jsx(Tf,{onChange:xc,checked:de,"aria-checked":de,onClick:ce=>(ce.stopPropagation(),void ce.preventDefault()),children:b.jsx(ye,{...y,label:ee.label,value:ee.value,children:oe})})})}}),N.size===0?null:b.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})]})}),Z0=(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},x)=>{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=mi(w.current),I=r==null?void 0:r(C),A=F=>{const N=F;if(N.key==="Enter"&&C.enterKeyHint==="next"){const V=C.getAttribute("data-next");if(V){const P=document.getElementById(V);if(P)return P.focus(),void N.preventDefault()}}};return C.addEventListener("keydown",A),()=>{I==null||I(),k(),C.removeEventListener("keydown",A)}},[]),b.jsx(pa,{...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:b.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:gc(x,w),className:He("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)})})}),ha=Z0(By,"input",{type:"text"}),X0=new Date(1970,11,31),Sf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Q0={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},FL={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")},Ef=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},LL=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=ed(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=Ef(u,X0).flatMap(C=>ht.keyof(Sf,C.type)?Sf[C.type](C.value):[]),g=Ef(u,X0).reduce((C,k)=>C+(ht.keyof(Q0,k.type)?Q0[k.type](k.value):""),""),[v,m]=E.useState(d?Ef(u,d).reduce((C,k)=>C+(ht.keyof(Sf,k.type)?FL[k.type](d,k.value):""),""):""),x=C=>{const k=C.target.value;if(m(k),y.length===k.length&&y.every((A,F)=>{const N=k.charAt(F);return typeof A=="string"?N===A:A.test(N)})){const A=_o(NI(k,g,new Date));return p(A),r==null?void 0:r(A)}return p(void 0),r==null?void 0:r(void 0)},S=C=>(p(C),r==null||r(C),m(C?N_(C,g):"")),T=py(d),w=T?d.toISOString():void 0;return b.jsx(ha,{...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:x,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??g,right:b.jsxs(E.Fragment,{children:[b.jsx("input",{"data-origin":i.name,defaultValue:w,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),b.jsx(Ko,{open:f,onChange:h,trigger:b.jsxs("span",{"aria-labelledby":l,children:[b.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),b.jsx(xA,{})]}),buttonProps:{"aria-describedby":l},children:b.jsx(lb,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:T?d:void 0})})]})})}),VL=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],jL=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],RL=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],$L=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],J0=(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 ew(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?$L:RL:t.binary?jL:VL,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=J0(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=J0(Number(e),t.locale,a),c=n[s];return i+l+r+c}var Ys={exports:{}},Ks={exports:{}},Ue={};/** @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 tw;function zL(){if(tw)return Ue;tw=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 x(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 x(T)===c}return Ue.AsyncMode=l,Ue.ConcurrentMode=c,Ue.ContextConsumer=s,Ue.ContextProvider=a,Ue.Element=t,Ue.ForwardRef=u,Ue.Fragment=r,Ue.Lazy=h,Ue.Memo=f,Ue.Portal=n,Ue.Profiler=i,Ue.StrictMode=o,Ue.Suspense=d,Ue.isAsyncMode=function(T){return S(T)||x(T)===l},Ue.isConcurrentMode=S,Ue.isContextConsumer=function(T){return x(T)===s},Ue.isContextProvider=function(T){return x(T)===a},Ue.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Ue.isForwardRef=function(T){return x(T)===u},Ue.isFragment=function(T){return x(T)===r},Ue.isLazy=function(T){return x(T)===h},Ue.isMemo=function(T){return x(T)===f},Ue.isPortal=function(T){return x(T)===n},Ue.isProfiler=function(T){return x(T)===i},Ue.isStrictMode=function(T){return x(T)===o},Ue.isSuspense=function(T){return x(T)===d},Ue.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)},Ue.typeOf=x,Ue}var Ge={};/** @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 nw;function BL(){return nw||(nw=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 x(z){return typeof z=="string"||typeof z=="function"||z===r||z===c||z===i||z===o||z===d||z===p||typeof z=="object"&&z!==null&&(z.$$typeof===h||z.$$typeof===f||z.$$typeof===a||z.$$typeof===s||z.$$typeof===u||z.$$typeof===g||z.$$typeof===v||z.$$typeof===m||z.$$typeof===y)}function S(z){if(typeof z=="object"&&z!==null){var xe=z.$$typeof;switch(xe){case t:var Ae=z.type;switch(Ae){case l:case c:case r:case i:case o:case d:return Ae;default:var Ie=Ae&&Ae.$$typeof;switch(Ie){case s:case u:case h:case f:case a:return Ie;default:return xe}}case n:return xe}}}var T=l,w=c,C=s,k=a,I=t,A=u,F=r,N=h,V=f,P=n,O=i,L=o,j=d,D=!1;function q(z){return D||(D=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(z)||S(z)===l}function M(z){return S(z)===c}function $(z){return S(z)===s}function Q(z){return S(z)===a}function ie(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function J(z){return S(z)===u}function Y(z){return S(z)===r}function U(z){return S(z)===h}function Z(z){return S(z)===f}function R(z){return S(z)===n}function H(z){return S(z)===i}function X(z){return S(z)===o}function re(z){return S(z)===d}Ge.AsyncMode=T,Ge.ConcurrentMode=w,Ge.ContextConsumer=C,Ge.ContextProvider=k,Ge.Element=I,Ge.ForwardRef=A,Ge.Fragment=F,Ge.Lazy=N,Ge.Memo=V,Ge.Portal=P,Ge.Profiler=O,Ge.StrictMode=L,Ge.Suspense=j,Ge.isAsyncMode=q,Ge.isConcurrentMode=M,Ge.isContextConsumer=$,Ge.isContextProvider=Q,Ge.isElement=ie,Ge.isForwardRef=J,Ge.isFragment=Y,Ge.isLazy=U,Ge.isMemo=Z,Ge.isPortal=R,Ge.isProfiler=H,Ge.isStrictMode=X,Ge.isSuspense=re,Ge.isValidElementType=x,Ge.typeOf=S}()),Ge}var rw;function ow(){return rw||(rw=1,process.env.NODE_ENV==="production"?Ks.exports=zL():Ks.exports=BL()),Ks.exports}/*
|
|
227
187
|
object-assign
|
|
228
188
|
(c) Sindre Sorhus
|
|
229
189
|
@license MIT
|
|
230
|
-
*/var
|
|
231
|
-
Valid keys: `+JSON.stringify(Object.keys(M),null," "));var U=fe(j,Q,te,G,$+"."+Q,n);if(U)return U}return null}return v(B)}function k(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(k);if(M===null||a(M))return!0;var B=d(M);if(B){var K=B.call(M),oe;if(B!==M.entries){for(;!(oe=K.next()).done;)if(!k(oe.value))return!1}else for(;!(oe=K.next()).done;){var te=oe.value;if(te&&!k(te[1]))return!1}}else return!1;return!0;default:return!1}}function _(M,B){return M==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function F(M){var B=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":_(B,M)?"symbol":B}function N(M){if(typeof M>"u"||M===null)return""+M;var B=F(M);if(B==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return B}function R(M){var B=N(M);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function H(M){return!M.constructor||!M.constructor.name?f:M.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Cf}var Pf,zw;function j2(){if(zw)return Pf;zw=1;var e=Sf();function t(){}function n(){}return n.resetWarningCache=t,Pf=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},Pf}if(process.env.NODE_ENV!=="production"){var z2=Lw(),W2=!0;bf.exports=B2()(z2.isElement,W2)}else bf.exports=j2()();var H2=bf.exports;const qe=Qx(H2);var U2=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 ki(e,t){var n=G2(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 G2(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=U2.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var Y2=[".DS_Store","Thumbs.db"];function q2(e){return Jo(this,void 0,void 0,function(){return es(this,function(t){return ml(e)&&K2(e.dataTransfer)?[2,J2(e.dataTransfer,e.type)]:Z2(e)?[2,X2(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Q2(e)]:[2,[]]})})}function K2(e){return ml(e)}function Z2(e){return ml(e)&&ml(e.target)}function ml(e){return typeof e=="object"&&e!==null}function X2(e){return kf(e.target.files).map(function(t){return ki(t)})}function Q2(e){return Jo(this,void 0,void 0,function(){var t;return es(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 ki(r)})]}})})}function J2(e,t){return Jo(this,void 0,void 0,function(){var n,r;return es(this,function(o){switch(o.label){case 0:return e.items?(n=kf(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(eV))]):[3,2];case 1:return r=o.sent(),[2,Ww(Hw(r))];case 2:return[2,Ww(kf(e.files).map(function(s){return ki(s)}))]}})})}function Ww(e){return e.filter(function(t){return Y2.indexOf(t.name)===-1})}function kf(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function eV(e){if(typeof e.webkitGetAsEntry!="function")return Uw(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Gw(t):Uw(e)}function Hw(e){return e.reduce(function(t,n){return Ld(Ld([],b0(t),!1),b0(Array.isArray(n)?Hw(n):[n]),!1)},[])}function Uw(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=ki(t);return Promise.resolve(n)}function tV(e){return Jo(this,void 0,void 0,function(){return es(this,function(t){return[2,e.isDirectory?Gw(e):nV(e)]})})}function Gw(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return Jo(i,void 0,void 0,function(){var l,c,u;return es(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(tV)),o.push(u),s(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function nV(e){return Jo(this,void 0,void 0,function(){return es(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=ki(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var rV=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 Yw(e){return iV(e)||sV(e)||Xw(e)||oV()}function oV(){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 sx(e,t){if(e){if(typeof e=="string")return Of(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 Of(e,t)}}function Of(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 NV(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 LV(e){if(Array.isArray(e))return e}function ix(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 st(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ix(Object(n),!0).forEach(function(r){_f(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ix(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vl(e,t){if(e==null)return{};var n=FV(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 FV(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 Mf=w.forwardRef(function(e,t){var n=e.children,r=vl(e,CV),o=lx(r),s=o.open,i=vl(o,PV);return w.useImperativeHandle(t,function(){return{open:s}},[s]),w.createElement(w.Fragment,null,n(st(st({},i),{},{open:s})))});Mf.displayName="Dropzone";var ax={disabled:!1,getFilesFromEvent:q2,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};Mf.defaultProps=ax,Mf.propTypes={children:qe.func,accept:qe.objectOf(qe.arrayOf(qe.string)),multiple:qe.bool,preventDropOnDocument:qe.bool,noClick:qe.bool,noKeyboard:qe.bool,noDrag:qe.bool,noDragEventsBubbling:qe.bool,minSize:qe.number,maxSize:qe.number,maxFiles:qe.number,disabled:qe.bool,getFilesFromEvent:qe.func,onFileDialogCancel:qe.func,onFileDialogOpen:qe.func,useFsAccessApi:qe.bool,autoFocus:qe.bool,onDragEnter:qe.func,onDragLeave:qe.func,onDragOver:qe.func,onDrop:qe.func,onDropAccepted:qe.func,onDropRejected:qe.func,onError:qe.func,validator:qe.func};var Df={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function lx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=st(st({},ax),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,m=t.onDropRejected,p=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,I=t.onError,A=t.validator,O=w.useMemo(function(){return SV(n)},[n]),L=w.useMemo(function(){return xV(n)},[n]),D=w.useMemo(function(){return typeof v=="function"?v:cx},[v]),V=w.useMemo(function(){return typeof p=="function"?p:cx},[p]),k=w.useRef(null),_=w.useRef(null),F=w.useReducer(VV,Df),N=Af(F,2),R=N[0],H=N[1],M=R.isFocused,B=R.isFileDialogActive,K=w.useRef(typeof window<"u"&&window.isSecureContext&&b&&wV()),oe=function(){!K.current&&B&&setTimeout(function(){if(_.current){var le=_.current.files;le.length||(H({type:"closeDialog"}),V())}},300)};w.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[_,B,V,K]);var te=w.useRef([]),G=function(le){k.current&&k.current.contains(le.target)||(le.preventDefault(),te.current=[])};w.useEffect(function(){return g&&(document.addEventListener("dragover",nx,!1),document.addEventListener("drop",G,!1)),function(){g&&(document.removeEventListener("dragover",nx),document.removeEventListener("drop",G))}},[k,g]),w.useEffect(function(){return!r&&y&&k.current&&k.current.focus(),function(){}},[k,y,r]);var $=w.useCallback(function(ne){I?I(ne):console.error(ne)},[I]),j=w.useCallback(function(ne){ne.preventDefault(),ne.persist(),ee(ne),te.current=[].concat(AV(te.current),[ne.target]),yl(ne)&&Promise.resolve(o(ne)).then(function(le){if(!(gl(ne)&&!C)){var Ne=le.length,tt=Ne>0&&gV({files:le,accept:O,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:A}),Ot=Ne>0&&!tt;H({isDragAccept:tt,isDragReject:Ot,isDragActive:!0,type:"setDraggedFiles"}),c&&c(ne)}}).catch(function(le){return $(le)})},[o,c,$,C,O,i,s,a,l,A]),W=w.useCallback(function(ne){ne.preventDefault(),ne.persist(),ee(ne);var le=yl(ne);if(le&&ne.dataTransfer)try{ne.dataTransfer.dropEffect="copy"}catch{}return le&&d&&d(ne),!1},[d,C]),Y=w.useCallback(function(ne){ne.preventDefault(),ne.persist(),ee(ne);var le=te.current.filter(function(tt){return k.current&&k.current.contains(tt)}),Ne=le.indexOf(ne.target);Ne!==-1&&le.splice(Ne,1),te.current=le,!(le.length>0)&&(H({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),yl(ne)&&u&&u(ne))},[k,u,C]),Q=w.useCallback(function(ne,le){var Ne=[],tt=[];ne.forEach(function(Ot){var Vt=ex(Ot,O),zt=Af(Vt,2),ro=zt[0],bs=zt[1],ws=tx(Ot,i,s),$l=Af(ws,2),ih=$l[0],ah=$l[1],lh=A?A(Ot):null;if(ro&&ih&&!lh)Ne.push(Ot);else{var ch=[bs,ah];lh&&(ch=ch.concat(lh)),tt.push({file:Ot,errors:ch.filter(function(sB){return sB})})}}),(!a&&Ne.length>1||a&&l>=1&&Ne.length>l)&&(Ne.forEach(function(Ot){tt.push({file:Ot,errors:[mV]})}),Ne.splice(0)),H({acceptedFiles:Ne,fileRejections:tt,type:"setFiles"}),f&&f(Ne,tt,le),tt.length>0&&m&&m(tt,le),Ne.length>0&&h&&h(Ne,le)},[H,a,O,i,s,l,f,h,m,A]),fe=w.useCallback(function(ne){ne.preventDefault(),ne.persist(),ee(ne),te.current=[],yl(ne)&&Promise.resolve(o(ne)).then(function(le){gl(ne)&&!C||Q(le,ne)}).catch(function(le){return $(le)}),H({type:"reset"})},[o,Q,$,C]),U=w.useCallback(function(){if(K.current){H({type:"openDialog"}),D();var ne={multiple:a,types:L};window.showOpenFilePicker(ne).then(function(le){return o(le)}).then(function(le){Q(le,null),H({type:"closeDialog"})}).catch(function(le){TV(le)?(V(le),H({type:"closeDialog"})):EV(le)?(K.current=!1,_.current?(_.current.value=null,_.current.click()):$(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."))):$(le)});return}_.current&&(H({type:"openDialog"}),D(),_.current.value=null,_.current.click())},[H,D,V,b,Q,$,L,a]),Ae=w.useCallback(function(ne){!k.current||!k.current.isEqualNode(ne.target)||(ne.key===" "||ne.key==="Enter"||ne.keyCode===32||ne.keyCode===13)&&(ne.preventDefault(),U())},[k,U]),Ke=w.useCallback(function(){H({type:"focus"})},[]),Be=w.useCallback(function(){H({type:"blur"})},[]),Ce=w.useCallback(function(){T||(bV()?setTimeout(U,0):U())},[T,U]),q=function(le){return r?null:le},ie=function(le){return S?null:q(le)},z=function(le){return E?null:q(le)},ee=function(le){C&&le.stopPropagation()},ye=w.useMemo(function(){return function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=ne.refKey,Ne=le===void 0?"ref":le,tt=ne.role,Ot=ne.onKeyDown,Vt=ne.onFocus,zt=ne.onBlur,ro=ne.onClick,bs=ne.onDragEnter,ws=ne.onDragOver,$l=ne.onDragLeave,ih=ne.onDrop,ah=vl(ne,kV);return st(st(_f({onKeyDown:ie(Dn(Ot,Ae)),onFocus:ie(Dn(Vt,Ke)),onBlur:ie(Dn(zt,Be)),onClick:q(Dn(ro,Ce)),onDragEnter:z(Dn(bs,j)),onDragOver:z(Dn(ws,W)),onDragLeave:z(Dn($l,Y)),onDrop:z(Dn(ih,fe)),role:typeof tt=="string"&&tt!==""?tt:"presentation"},Ne,k),!r&&!S?{tabIndex:0}:{}),ah)}},[k,Ae,Ke,Be,Ce,j,W,Y,fe,S,E,r]),ue=w.useCallback(function(ne){ne.stopPropagation()},[]),je=w.useMemo(function(){return function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=ne.refKey,Ne=le===void 0?"ref":le,tt=ne.onChange,Ot=ne.onClick,Vt=vl(ne,IV),zt=_f({accept:O,multiple:a,type:"file",style:{display:"none"},onChange:q(Dn(tt,fe)),onClick:q(Dn(Ot,ue)),tabIndex:-1},Ne,_);return st(st({},zt),Vt)}},[_,n,a,fe,r]);return st(st({},R),{},{isFocused:M&&!r,getRootProps:ye,getInputProps:je,rootRef:k,inputRef:_,open:q(U)})}function VV(e,t){switch(t.type){case"focus":return st(st({},e),{},{isFocused:!0});case"blur":return st(st({},e),{},{isFocused:!1});case"openDialog":return st(st({},Df),{},{isFileDialogActive:!0});case"closeDialog":return st(st({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return st(st({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return st(st({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return st({},Df);default:return e}}function cx(){}const $V={isImage:e=>e.type.includes("image")},RV=e=>{const[t,n]=w.useState({url:"",type:"",size:""});return w.useEffect(()=>{if($V.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:_w(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:_w(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(go,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Oo,{})})]}):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(Cy,{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(go,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Oo,{className:"text-danger"})})]})},BV=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(RV,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),jV=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(BV,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(w.Fragment,{children:e.idle}),zV=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(KI,{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"})]})]}),WV=({idle:e=zV,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=w.useState([]),i=d=>{n==null||n(d),s(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=lx({onDrop:i});return x.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:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(jV,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},HV=["INPUT","SELECT"],ux=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{HV.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},UV=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})},GV=({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:De("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]}),Zr=w.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,...m},p)=>{const v=Et(),b=w.useRef(null),y=m.id??m.name;w.useImperativeHandle(p,()=>b.current),w.useEffect(()=>{if(b.current===null)return;const T=new AbortController,S=b.current,E=Os(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 x.jsx(Ci,{info:n,left:f,error:h,form:m.form,name:m.name,feedback:o,hideLeft:u,required:e,title:m.title,container:c,componentName:"select",rightLabel:a,interactive:i,id:m.name||m.id,optionalText:l,labelClassName:s,placeholder:m.placeholder,right:x.jsx("label",{htmlFor:y,children:x.jsxs("button",{onClick:g,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(Eu,{size:20}),x.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})}),children:x.jsxs("select",{...m,id:y,name:y,value:m.value,required:e,ref:cc(p,b),"data-selected":!!m.value||!1,defaultValue:m.value?void 0:"",title:typeof m.title=="string"?m.title:void 0,className:De("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",m.className),children:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:m.placeholder}),t.map(T=>w.createElement("option",{...T,value:T.value,children:T.label??T.value,key:`${y}-select-option-${T.value}`}))]})})}),YV=w.forwardRef(({children:e,container:t,error:n,...r},o)=>{const s=w.useId(),[i,a]=w.useState(r.checked??!1),l=i,c=w.useRef(null),u=Ms(r.onChange);w.useImperativeHandle(o,()=>c.current),w.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,m;const f=!((h=c.current)!=null&&h.checked);a(f),(m=r==null?void 0:r.onCheck)==null||m.call(r,f),c.current!==null&&(c.current.checked=f,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:De("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||s,onChange:f=>a(f.target.checked),ref:c,type:"checkbox"}),x.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: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||s,className:"ml-3 inline-block text-sm",id:`${s}-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})]})}),qV=e=>{const[t,n]=EI();return w.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:AI(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},KV=kw("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)}),ZV=e=>{const[t,n]=w.useState(0);return w.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const s=()=>{n(o.clientHeight)};return o.addEventListener("resize",s),s(),()=>{o.removeEventListener("resize",s)}},[]),t},XV={Item:w.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:w.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},QV=e=>{const t=w.useRef(null),n=ZV(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(Pi,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(df,{height:n,useWindowScroll:!0,data:e.source,components:XV,itemContent:(r,o)=>x.jsx(w.Fragment,{children:x.jsx(gf,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(go,{children:x.jsx(Cu,{})})}),x.jsx("div",{})]})};var JV=Object.defineProperty,dx=Object.getOwnPropertySymbols,e$=Object.prototype.hasOwnProperty,t$=Object.prototype.propertyIsEnumerable,fx=(e,t,n)=>t in e?JV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,n$=(e,t)=>{for(var n in t||(t={}))e$.call(t,n)&&fx(e,n,t[n]);if(dx)for(var n of dx(t))t$.call(t,n)&&fx(e,n,t[n]);return e},Nf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},r$=(e,t,n,r)=>wl(Nf,e,t,n,r),us=e=>typeof e=="object",vr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!us(e)&&!us(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=>vr(e[r],t[r]))},o$=(e,t)=>(us(e)||Array.isArray(e))&&t?e[t]:e,s$=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,bl=e=>/[0-9.]+/.test(e),hx=e=>["string","number"].includes(typeof e),px=e=>e==null||(e==null?void 0:e.length)===0||e==="",mx={eq:vr,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:px,notEmpty:e=>!px(e),in:(e,t)=>Nf(t,n=>vr(e,n)),notIn:(e,t)=>gx(t,n=>!vr(e,n))},i$=e=>{if(e in mx)return mx[e];throw new Error("Linq - Symbol not found")},ds=(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},wl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=i$(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},a$=(e,t,n,r)=>wl(ds,e,t,n,r),gx=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},l$=(e,t,n,r)=>wl(gx,e,t,n,r),yx=e=>{if(e===null)return null;const t=n$({},e);return Object.keys(t).forEach(n=>t[n]=us(e[n])?yx(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},vx=(e,t)=>{if(us(t)){for(let n=0;n<e.length;n++){const r=e[n];if(vr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(vr(t,r))return!0}return!1},c$=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},u$=e=>ds(e,(t,n,r)=>us(t)?n===r.findIndex(o=>vr(o,t)):n===r.indexOf(t)),d$=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},bx=(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())},f$=(e,t)=>bx(e,n=>n[t]),wx=(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},h$=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},p$=(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 bl(e)&&bl(t)?r.map(i=>Number.parseInt(i)):r},Lf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&bl(e)&&bl(t)){const o=[],[s,i]=h$(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return p$(e,t,r)},m$=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?Lf(r,o,1):Lf(r,s,Number.parseInt(o,10))}return hx(e)&&hx(t)?Lf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Ff=(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},xx=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},g$=(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)},y$=(e,t,n,r)=>wl(g$,e,t,n,r),Sx=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(s$(t))},Tx=(e=>(e.Asc="asc",e.Desc="desc",e))(Tx||{}),v$=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),b$=(e,t)=>e.sort(v$(t)),w$=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ds(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},x$=class uh{constructor(t=[]){this.array=t}static Range(...t){return m$(...t)}static New(t){return new uh(t)}Where(t,n,r){return this.array=a$(this.array,t,n,r),this}Some(t,n,r){return r$(this.array,t,n,r)}All(t,n,r){return l$(this.array,t,n,r)}Reverse(){return this.array=xx(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=y$(this.array,t,n,r),this}Distinct(){return this.array=u$(this.array),this}First(t){return t===void 0?this.array[0]:d$(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?Ff((n,r)=>n+r,0,this.array):Ff((n,r)=>n+o$(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return f$(this.array,t)}GroupWith(t){return bx(this.array,t)}Except(t){return ds(this.array,n=>!vx(t,n))}Intersect(t){return ds(this.array,n=>vx(t,n))}OrderBy(t,n){let r;return r=t?Sx(this.array,t):this.array.toSorted(),this.array=n==="desc"?xx(r):r,this}Includes(t){return Nf(this.array,n=>vr(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 Ff(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(wx(this.array,n=>[t,n]))}Zip(t,n){return wx(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ds(this.array,t).length}Get(t){return this.array[t]}Clone(){return new uh(yx(this.array))}ToObject(t){return c$(this.array,t)}Sort(t){return Array.isArray(t)?b$(this.array,t):Sx(this.array,t)}Unique(t){return w$(this.array,t)}},Ex=x$,fs={};(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()))}}},m=h(()=>window.sessionStorage),p=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=p,e.SessionStorage=m,e.createStorage=h})(fs);const Vf=e=>e.headerLabel??e.thead??e.id,$f=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var hs=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(hs||{});const Rf=e=>e.type==="number"?e.valueAsNumber:e.value,S$=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},T$={},E$=(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})},C$=(e,t,n=T$)=>{const r=Yi()?null:fs.LocalStorage.get(`@components/table-${e}`)||null,[o,s]=ju({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:E$(t,r==null?void 0:r.cols)},i=>{const a=l=>{const c=i.state(),u={...c,...l};return Yi()||fs.LocalStorage.set(`@components/table-${c.name}`,u),u};return a(i.state()),{set:l=>a(l)}});return{...o,...s,name:e}},Bf=(e,t,n,r={})=>{var c,u;const o=e.id,s=e.type??hs.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:_s(),operation:l,label:Vf(e),name:o,type:s,value:"",...r}},jf=()=>{const e=Et(),t=w.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:w.useMemo(()=>({[hs.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[hs.Boolean]:[t.is,t.isNot],[hs.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},P$=e=>{const t=Et(),n=jf(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Bf(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(m=>u===m.id);return Bf(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=Rf(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return x.jsx(w.Fragment,{children:x.jsx(Qo,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(HI,{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(Zr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),x.jsx(Zr,{"data-id":l.id,onChange:s,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Pi,{"data-id":l.id,onChange:a,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:i,children:x.jsx(Oo,{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(Pu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},k$=({filter:e,onDelete:t,set:n})=>{const r=Et(),o=jf(),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=Rf(a.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(Zr,{"data-id":e.id,onChange:s,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),x.jsx(Pi,{"data-id":e.id,onChange:i,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(Oo,{className:"text-danger",size:14})})]})},I$=({item:e,onPointerDown:t})=>{const n=_r(0);return x.jsxs(xy,{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(WI,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},A$=e=>{var l;const t=Et(),n=$f(e.cols),r=kI(),[o,s]=w.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 m=new Ex(e.rows).GroupBy(d),p=e.cols.find(b=>b.id===d);e.setGroups(jS(m).map((b,y)=>{const g=m[b];return{...p,groupId:_s(),groupKey:d,index:y,rows:g,groupName:b}}))},a=()=>e.setGroups([]);return x.jsx(w.Fragment,{children:x.jsxs(Qo,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(qI,{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(Zr,{value:o,title:"Tipo de agrupamento",onChange:i,options:n,placeholder:"Agrupar por..."}),x.jsx(go,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:x.jsx(Oo,{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(zT,{children:x.jsx(by,{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(I$,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},O$=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),_$=(e,t)=>e.toSorted(O$(t)),Cx=(e,t,n)=>({id:_s(),type:n,value:e.id,label:t}),M$=e=>{const t=Et(),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,Cx(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 x.jsx(w.Fragment,{children:x.jsx(Qo,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(Ty,{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(Zr,{options:e.options,value:l.value,onChange:s(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(Zr,{onChange:i(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),x.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:x.jsx(Oo,{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(Pu,{size:14})," ",t.tableSortAddButton]})})]})})})},D$=e=>{const t=Et(),[n,r]=w.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");w.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=Cx(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=Vf(e.col);return x.jsxs("button",{"aria-labelledby":s,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:s,className:"sr-only",children:[t.tableSortDropdownTitle," ",i]}),n==="asc"?x.jsx(RI,{size:14}):null,n==="desc"?x.jsx($I,{size:14}):null,n==="undefined"?x.jsx(Ty,{size:14}):null]})},N$=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(P$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(M$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(A$,{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=Rf(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function L$(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 F$=e=>{const t=w.useId(),n=Et(),r=e.asLink||"button",o=w.useMemo(()=>L$(e.current,e.pages),[e.current,e.pages]),s=e.current<e.pages;return x.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(w.Fragment,{children:[x.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),x.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>x.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(i=>i===null?null:x.jsx(w.Fragment,{children:typeof i=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(r,{href:i,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${i===e.current?"text-primary border-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),s?x.jsx("li",{children:x.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},V$={top:0,left:0,right:0,bottom:-1},$$=e=>{var m;const t=Et(),n=e.filters.filter(p=>p.name===e.header.id),r=n.length>0,o=e.header.allowSort??!0,s=e.header.allowFilter??!0,i=jf(),a=r?UI:GI,l=p=>{const v=p.currentTarget.dataset.id||"";return e.setFilters(b=>b.filter(y=>y.id!==v))},c=w.useCallback(p=>{if(p===null)return;const v=new AbortController;return p.addEventListener("pointerdown",b=>{if(b.target.dataset.type==="resizer")return b.stopPropagation(),b.stopImmediatePropagation()},{signal:v.signal}),()=>v.abort()},[]),u=e.sorters.find(p=>e.header.id===p.value),d=u!=null&&u.type?u.type===Tx.Asc?"ascending":"descending":"none",f=Vf(e.header),h=_r(void 0);return x.jsxs(xy,{...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 ${((m=e.header.thProps)==null?void 0:m.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&&s?x.jsx(Qo,{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(a,{"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?null:x.jsxs("ul",{className:"font-medium",children:[n.map(p=>x.jsx("li",{className:"my-1",children:x.jsx(k$,{onDelete:l,filter:p,set:e.setFilters})},`thead-filter-${p.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(p=>p.concat(Bf(e.header,i.options,i.operations))),children:[x.jsx(Pu,{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(D$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),x.jsx(lt.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:V$,whileDrag:{cursor:"grabbing"},className:"absolute right-0 top-0 block h-full w-1 cursor-col-resize hover:bg-primary active:bg-primary",onDrag:(p,v)=>{const b=p.target,y=h.get()||b.getBoundingClientRect().width,g=v.delta.x;return h.set(Math.abs(y+g))}})]})},R$=e=>x.jsx(by,{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(er,{children:e.headers.map(t=>x.jsx($$,{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}`))})}),Px=w.createContext({}),B$=()=>w.useContext(Px),j$=w.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(er,{children:n.children})})),z$=w.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??""}`})),W$=w.forwardRef(({context:e,...t},n)=>{const r=B$(),o={...t==null?void 0:t.style,top:it.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})}),H$=w.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),U$=w.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),G$={TableHead:W$,Table:z$,TableBody:j$,TableRow:H$,TableFoot:U$},Y$=[0,0,0,0,0,0,0,0,0,0],kx=x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),q$=(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?kx:x.jsx(Ov,{})}),K$=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(w.Fragment,{children:r.map((s,i)=>{var d;const a=`${i},${e}`,l=dc(t,s.id),c=s.Element,u=((d=s.cellProps)==null?void 0:d.className)||"";return w.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?kx:c?x.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):x.jsx(w.Fragment,{children:it.nil(l)?"":l}))})})},Z$=()=>x.jsx(w.Fragment,{}),X$=[{}],Ix=({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=w.useRef(null),[f,h]=w.useState(!1),m=Ms(i),p=Ms(u.loadingMore),v=w.useMemo(()=>{if(u.loading)return Y$;if(c)return u.rows;const b=new Ex(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():_$(b.Select(),r)},[u.rows,t,r,u.loading]);return w.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,y=new IntersectionObserver(g=>{var E;return g[g.length-1].isIntersecting&&p.current?((E=m.current)==null||E.call(m),void h(!0)):h(!1)});return y.observe(b),()=>y.disconnect()},[]),x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg ${a?"border border-table-border":""}`,children:[x.jsx(h2,{useWindowScroll:!0,followOutput:"smooth",components:G$,totalCount:v.length,data:v.length===0?X$:v,fixedFooterContent:f?Z$:null,itemContent:v.length===0?q$:K$,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>x.jsx(R$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,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(F$,{...l}):null]})},Q$=(e,t)=>typeof t=="function"?t(e):t,xl=(e,t,n)=>e===t||n==null?void 0:n(t),J$=e=>{const t=w.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=w.useMemo(()=>$f(e.cols),[e.cols]),[o,s]=ju({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:Q$(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),xl((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),xl((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),xl((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),xl((a==null?void 0:a.cols)??[],i.cols??[],e.setCols),i}]});return x.jsx(Px.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?x.jsx(N$,{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?x.jsx(Ix,{...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}):x.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((i,a)=>x.jsx("div",{className:"min-w-full",children:x.jsx(Ix,{...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 eR=String.prototype.replace,tR=/%20/g,zf={RFC1738:"RFC1738",RFC3986:"RFC3986"},Wf={default:zf.RFC3986,formatters:{RFC1738:function(e){return eR.call(e,tR,"+")},RFC3986:function(e){return String(e)}},RFC1738:zf.RFC1738,RFC3986:zf.RFC3986},nR=Wf,Hf=Object.prototype.hasOwnProperty,Xr=Array.isArray,Nn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),rR=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Xr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Ax=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},oR=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Xr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Hf.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 Xr(t)&&!Xr(n)&&(o=Ax(t,r)),Xr(t)&&Xr(n)?(n.forEach(function(s,i){if(Hf.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 Hf.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},sR=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},iR=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}},Uf=1024,aR=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+=Uf){for(var c=i.length>=Uf?i.slice(l,l+Uf):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===nR.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=Nn[f];continue}if(f<2048){u[u.length]=Nn[192|f>>6]+Nn[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=Nn[224|f>>12]+Nn[128|f>>6&63]+Nn[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=Nn[240|f>>18]+Nn[128|f>>12&63]+Nn[128|f>>6&63]+Nn[128|f&63]}a+=u.join("")}return a},lR=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 rR(n),t},cR=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},uR=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},dR=function(t,n){return[].concat(t,n)},fR=function(t,n){if(Xr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Ox={arrayToObject:Ax,assign:sR,combine:dR,compact:lR,decode:iR,encode:aR,isBuffer:uR,isRegExp:cR,maybeMap:fR,merge:oR},_x=FS,Sl=Ox,Ai=Wf,hR=Object.prototype.hasOwnProperty,Mx={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Ln=Array.isArray,pR=Array.prototype.push,Dx=function(e,t){pR.apply(e,Ln(t)?t:[t])},mR=Date.prototype.toISOString,Nx=Ai.default,St={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Sl.encode,encodeValuesOnly:!1,format:Nx,formatter:Ai.formatters[Nx],indices:!1,serializeDate:function(t){return mR.call(t)},skipNulls:!1,strictNullHandling:!1},gR=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Gf={},yR=function e(t,n,r,o,s,i,a,l,c,u,d,f,h,m,p,v,b,y){for(var g=t,T=y,S=0,E=!1;(T=T.get(Gf))!==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(Gf)>"u"&&(S=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&Ln(g)&&(g=Sl.maybeMap(g,function(M){return M instanceof Date?h(M):M})),g===null){if(i)return c&&!v?c(n,St.encoder,b,"key",m):n;g=""}if(gR(g)||Sl.isBuffer(g)){if(c){var I=v?n:c(n,St.encoder,b,"key",m);return[p(I)+"="+p(c(g,St.encoder,b,"value",m))]}return[p(n)+"="+p(String(g))]}var A=[];if(typeof g>"u")return A;var O;if(r==="comma"&&Ln(g))v&&c&&(g=Sl.maybeMap(g,c)),O=[{value:g.length>0?g.join(",")||null:void 0}];else if(Ln(u))O=u;else{var L=Object.keys(g);O=d?L.sort(d):L}var D=l?n.replace(/\./g,"%2E"):n,V=o&&Ln(g)&&g.length===1?D+"[]":D;if(s&&Ln(g)&&g.length===0)return V+"[]";for(var k=0;k<O.length;++k){var _=O[k],F=typeof _=="object"&&typeof _.value<"u"?_.value:g[_];if(!(a&&F===null)){var N=f&&l?_.replace(/\./g,"%2E"):_,R=Ln(g)?typeof r=="function"?r(V,N):V:V+(f?"."+N:"["+N+"]");y.set(t,S);var H=_x();H.set(Gf,y),Dx(A,e(F,R,r,o,s,i,a,l,r==="comma"&&v&&Ln(g)?null:c,u,d,f,h,m,p,v,b,H))}}return A},vR=function(t){if(!t)return St;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||St.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=Ai.default;if(typeof t.format<"u"){if(!hR.call(Ai.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Ai.formatters[r],s=St.filter;(typeof t.filter=="function"||Ln(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in Mx?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=St.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:St.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:St.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:St.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:St.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?St.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:St.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:St.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:St.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:St.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:St.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:St.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:St.strictNullHandling}},bR=function(e,t){var n=e,r=vR(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):Ln(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=Mx[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=_x(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||Dx(i,yR(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:""},ps=Ox,Yf=Object.prototype.hasOwnProperty,wR=Array.isArray,vt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ps.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},xR=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Lx=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},SR="utf8=%26%2310003%3B",TR="utf8=%E2%9C%93",ER=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]===TR?c="utf-8":i[l]===SR&&(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,m;f===-1?(h=n.decoder(u,vt.decoder,c,"key"),m=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),vt.decoder,c,"key"),m=ps.maybeMap(Lx(u.slice(f+1),n),function(v){return n.decoder(v,vt.decoder,c,"value")})),m&&n.interpretNumericEntities&&c==="iso-8859-1"&&(m=xR(m)),u.indexOf("[]=")>-1&&(m=wR(m)?[m]:m);var p=Yf.call(r,h);p&&n.duplicates==="combine"?r[h]=ps.combine(r[h],m):(!p||n.duplicates==="last")&&(r[h]=m)}return r},CR=function(e,t,n,r){for(var o=r?t:Lx(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},PR=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&&Yf.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&&Yf.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),CR(u,n,r,o)}},kR=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.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"?vt.charset:t.charset,r=typeof t.duplicates>"u"?vt.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:vt.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:vt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:vt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:vt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:vt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:vt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:vt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:vt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:vt.decoder,delimiter:typeof t.delimiter=="string"||ps.isRegExp(t.delimiter)?t.delimiter:vt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:vt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:vt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:vt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:vt.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:vt.strictNullHandling}},IR=function(e,t){var n=kR(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?ER(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=PR(a,r[a],n,typeof e=="string");o=ps.merge(o,l,n)}return n.allowSparse===!0?o:ps.compact(o)},AR=bR,OR=IR,_R=Wf,MR={formats:_R,parse:OR,stringify:AR},Me;(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})(Me||(Me={}));var Fx;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Fx||(Fx={}));const ae=Me.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Qr=e=>{switch(typeof e){case"undefined":return ae.undefined;case"string":return ae.string;case"number":return isNaN(e)?ae.nan:ae.number;case"boolean":return ae.boolean;case"function":return ae.function;case"bigint":return ae.bigint;case"symbol":return ae.symbol;case"object":return Array.isArray(e)?ae.array:e===null?ae.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ae.promise:typeof Map<"u"&&e instanceof Map?ae.map:typeof Set<"u"&&e instanceof Set?ae.set:typeof Date<"u"&&e instanceof Date?ae.date:ae.object;default:return ae.unknown}},X=Me.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 sn 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 sn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Me.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()}}sn.create=e=>new sn(e);const Oi=(e,t)=>{let n;switch(e.code){case X.invalid_type:e.received===ae.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case X.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Me.jsonStringifyReplacer)}`;break;case X.unrecognized_keys:n=`Unrecognized key(s) in object: ${Me.joinValues(e.keys,", ")}`;break;case X.invalid_union:n="Invalid input";break;case X.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Me.joinValues(e.options)}`;break;case X.invalid_enum_value:n=`Invalid enum value. Expected ${Me.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}"`:Me.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,Me.assertNever(e)}return{message:n}};let DR=Oi;function qf(){return DR}const Kf=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 se(e,t){const n=qf(),r=Kf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Oi?void 0:Oi].filter(o=>!!o)});e.common.issues.push(r)}class jt{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 be;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 jt.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 be;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 be=Object.freeze({status:"aborted"}),_i=e=>({status:"dirty",value:e}),Yt=e=>({status:"valid",value:e}),Vx=e=>e.status==="aborted",$x=e=>e.status==="dirty",Tl=e=>e.status==="valid",El=e=>typeof Promise<"u"&&e instanceof Promise;function Cl(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 Rx(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var he;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(he||(he={}));var Mi,Di;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 Bx=(e,t)=>{if(Tl(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 sn(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 Pe{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 Qr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Qr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new jt,ctx:{common:t.parent.common,data:t.data,parsedType:Qr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(El(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:Qr(t)},s=this._parseSync({data:t,path:o.path,parent:o});return Bx(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:Qr(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(El(o)?o:Promise.resolve(o));return Bx(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 Yn({schema:this,typeName:ge.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return qn.create(this,this._def)}nullable(){return to.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Vn.create(this,this._def)}promise(){return Fi.create(this,this._def)}or(t){return Il.create([this,t],this._def)}and(t){return Al.create(this,t,this._def)}transform(t){return new Yn({...xe(this._def),schema:this,typeName:ge.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Nl({...xe(this._def),innerType:this,defaultValue:n,typeName:ge.ZodDefault})}brand(){return new Hx({typeName:ge.ZodBranded,type:this,...xe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ll({...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 Fl.create(this,t)}readonly(){return Vl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const NR=/^c[^\s-]{8,}$/i,LR=/^[0-9a-z]+$/,FR=/^[0-9A-HJKMNP-TV-Z]{26}$/,VR=/^[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,$R=/^[a-z0-9_-]{21}$/i,RR=/^[-+]?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)?)??$/,BR=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,jR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Zf;const zR=/^(?:(?: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])$/,WR=/^(([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})))$/,HR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,jx="((\\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])))",UR=new RegExp(`^${jx}$`);function zx(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 GR(e){return new RegExp(`^${zx(e)}$`)}function YR(e){let t=`${jx}T${zx(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 qR(e,t){return!!((t==="v4"||!t)&&zR.test(e)||(t==="v6"||!t)&&WR.test(e))}class Hn extends Pe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ae.string){const s=this._getOrReturnCtx(t);return se(s,{code:X.invalid_type,expected:ae.string,received:s.parsedType}),be}const r=new jt;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),se(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),se(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?se(o,{code:X.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&se(o,{code:X.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")BR.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"email",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Zf||(Zf=new RegExp(jR,"u")),Zf.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"emoji",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")VR.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"uuid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")$R.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"nanoid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")NR.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"cuid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")LR.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"cuid2",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")FR.test(t.data)||(o=this._getOrReturnCtx(t,o),se(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),se(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),se(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),se(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),se(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),se(o,{code:X.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?YR(s).test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:X.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?UR.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:X.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?GR(s).test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:X.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?RR.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"duration",code:X.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?qR(t.data,s.version)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"ip",code:X.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?HR.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"base64",code:X.invalid_string,message:s.message}),r.dirty()):Me.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,...he.errToObj(r)})}_addCheck(t){return new Hn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...he.errToObj(t)})}url(t){return this._addCheck({kind:"url",...he.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...he.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...he.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...he.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...he.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...he.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...he.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...he.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...he.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,...he.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,...he.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...he.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...he.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...he.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...he.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...he.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...he.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...he.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...he.errToObj(n)})}nonempty(t){return this.min(1,he.errToObj(t))}trim(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Hn({...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}}Hn.create=e=>{var t;return new Hn({checks:[],typeName:ge.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...xe(e)})};function KR(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 Jr extends Pe{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)!==ae.number){const s=this._getOrReturnCtx(t);return se(s,{code:X.invalid_type,expected:ae.number,received:s.parsedType}),be}let r;const o=new jt;for(const s of this._def.checks)s.kind==="int"?Me.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),se(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),se(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),se(r,{code:X.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?KR(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),se(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),se(r,{code:X.not_finite,message:s.message}),o.dirty()):Me.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,he.toString(n))}gt(t,n){return this.setLimit("min",t,!1,he.toString(n))}lte(t,n){return this.setLimit("max",t,!0,he.toString(n))}lt(t,n){return this.setLimit("max",t,!1,he.toString(n))}setLimit(t,n,r,o){return new Jr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:he.toString(o)}]})}_addCheck(t){return new Jr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:he.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:he.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:he.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:he.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:he.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:he.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:he.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:he.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:he.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"&&Me.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)}}Jr.create=e=>new Jr({checks:[],typeName:ge.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...xe(e)});class ms extends Pe{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)!==ae.bigint){const s=this._getOrReturnCtx(t);return se(s,{code:X.invalid_type,expected:ae.bigint,received:s.parsedType}),be}let r;const o=new jt;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),se(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),se(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),se(r,{code:X.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Me.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,he.toString(n))}gt(t,n){return this.setLimit("min",t,!1,he.toString(n))}lte(t,n){return this.setLimit("max",t,!0,he.toString(n))}lt(t,n){return this.setLimit("max",t,!1,he.toString(n))}setLimit(t,n,r,o){return new ms({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:he.toString(o)}]})}_addCheck(t){return new ms({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:he.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:he.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:he.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:he.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:he.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}}ms.create=e=>{var t;return new ms({checks:[],typeName:ge.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...xe(e)})};class Xf extends Pe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ae.boolean){const r=this._getOrReturnCtx(t);return se(r,{code:X.invalid_type,expected:ae.boolean,received:r.parsedType}),be}return Yt(t.data)}}Xf.create=e=>new Xf({typeName:ge.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...xe(e)});class Ni extends Pe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ae.date){const s=this._getOrReturnCtx(t);return se(s,{code:X.invalid_type,expected:ae.date,received:s.parsedType}),be}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return se(s,{code:X.invalid_date}),be}const r=new jt;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),se(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),se(o,{code:X.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Me.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ni({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:he.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:he.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}}Ni.create=e=>new Ni({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ge.ZodDate,...xe(e)});class Qf extends Pe{_parse(t){if(this._getType(t)!==ae.symbol){const r=this._getOrReturnCtx(t);return se(r,{code:X.invalid_type,expected:ae.symbol,received:r.parsedType}),be}return Yt(t.data)}}Qf.create=e=>new Qf({typeName:ge.ZodSymbol,...xe(e)});class Pl extends Pe{_parse(t){if(this._getType(t)!==ae.undefined){const r=this._getOrReturnCtx(t);return se(r,{code:X.invalid_type,expected:ae.undefined,received:r.parsedType}),be}return Yt(t.data)}}Pl.create=e=>new Pl({typeName:ge.ZodUndefined,...xe(e)});class kl extends Pe{_parse(t){if(this._getType(t)!==ae.null){const r=this._getOrReturnCtx(t);return se(r,{code:X.invalid_type,expected:ae.null,received:r.parsedType}),be}return Yt(t.data)}}kl.create=e=>new kl({typeName:ge.ZodNull,...xe(e)});class Jf extends Pe{constructor(){super(...arguments),this._any=!0}_parse(t){return Yt(t.data)}}Jf.create=e=>new Jf({typeName:ge.ZodAny,...xe(e)});class gs extends Pe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Yt(t.data)}}gs.create=e=>new gs({typeName:ge.ZodUnknown,...xe(e)});class br extends Pe{_parse(t){const n=this._getOrReturnCtx(t);return se(n,{code:X.invalid_type,expected:ae.never,received:n.parsedType}),be}}br.create=e=>new br({typeName:ge.ZodNever,...xe(e)});class eh extends Pe{_parse(t){if(this._getType(t)!==ae.undefined){const r=this._getOrReturnCtx(t);return se(r,{code:X.invalid_type,expected:ae.void,received:r.parsedType}),be}return Yt(t.data)}}eh.create=e=>new eh({typeName:ge.ZodVoid,...xe(e)});class Vn extends Pe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ae.array)return se(n,{code:X.invalid_type,expected:ae.array,received:n.parsedType}),be;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(se(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&&(se(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&&(se(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 Fn(n,i,n.path,a)))).then(i=>jt.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Fn(n,i,n.path,a)));return jt.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Vn({...this._def,minLength:{value:t,message:he.toString(n)}})}max(t,n){return new Vn({...this._def,maxLength:{value:t,message:he.toString(n)}})}length(t,n){return new Vn({...this._def,exactLength:{value:t,message:he.toString(n)}})}nonempty(t){return this.min(1,t)}}Vn.create=(e,t)=>new Vn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ge.ZodArray,...xe(t)});function ys(e){if(e instanceof ft){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=qn.create(ys(r))}return new ft({...e._def,shape:()=>t})}else return e instanceof Vn?new Vn({...e._def,type:ys(e.element)}):e instanceof qn?qn.create(ys(e.unwrap())):e instanceof to?to.create(ys(e.unwrap())):e instanceof Gn?Gn.create(e.items.map(t=>ys(t))):e}class ft extends Pe{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=Me.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ae.object){const c=this._getOrReturnCtx(t);return se(c,{code:X.invalid_type,expected:ae.object,received:c.parsedType}),be}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof br&&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 Fn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof br){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&&(se(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 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,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>jt.mergeObjectSync(r,c)):jt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return he.errToObj,new ft({...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=he.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ft({...this._def,unknownKeys:"strip"})}passthrough(){return new ft({...this._def,unknownKeys:"passthrough"})}extend(t){return new ft({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ft({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 ft({...this._def,catchall:t})}pick(t){const n={};return Me.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ft({...this._def,shape:()=>n})}omit(t){const n={};return Me.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ft({...this._def,shape:()=>n})}deepPartial(){return ys(this)}partial(t){const n={};return Me.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new ft({...this._def,shape:()=>n})}required(t){const n={};return Me.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof qn;)s=s._def.innerType;n[r]=s}}),new ft({...this._def,shape:()=>n})}keyof(){return Wx(Me.objectKeys(this.shape))}}ft.create=(e,t)=>new ft({shape:()=>e,unknownKeys:"strip",catchall:br.create(),typeName:ge.ZodObject,...xe(t)}),ft.strictCreate=(e,t)=>new ft({shape:()=>e,unknownKeys:"strict",catchall:br.create(),typeName:ge.ZodObject,...xe(t)}),ft.lazycreate=(e,t)=>new ft({shape:e,unknownKeys:"strip",catchall:br.create(),typeName:ge.ZodObject,...xe(t)});class Il extends Pe{_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 sn(a.ctx.common.issues));return se(n,{code:X.invalid_union,unionErrors:i}),be}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 sn(l));return se(n,{code:X.invalid_union,unionErrors:a}),be}}get options(){return this._def.options}}Il.create=(e,t)=>new Il({options:e,typeName:ge.ZodUnion,...xe(t)});const Un=e=>e instanceof _l?Un(e.schema):e instanceof Yn?Un(e.innerType()):e instanceof Ml?[e.value]:e instanceof eo?e.options:e instanceof Dl?Me.objectValues(e.enum):e instanceof Nl?Un(e._def.innerType):e instanceof Pl?[void 0]:e instanceof kl?[null]:e instanceof qn?[void 0,...Un(e.unwrap())]:e instanceof to?[null,...Un(e.unwrap())]:e instanceof Hx||e instanceof Vl?Un(e.unwrap()):e instanceof Ll?Un(e._def.innerType):[];class th extends Pe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ae.object)return se(n,{code:X.invalid_type,expected:ae.object,received:n.parsedType}),be;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}):(se(n,{code:X.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),be)}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=Un(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 th({typeName:ge.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...xe(r)})}}function nh(e,t){const n=Qr(e),r=Qr(t);if(e===t)return{valid:!0,data:e};if(n===ae.object&&r===ae.object){const o=Me.objectKeys(t),s=Me.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=nh(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===ae.array&&r===ae.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=nh(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ae.date&&r===ae.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Al extends Pe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(Vx(s)||Vx(i))return be;const a=nh(s.value,i.value);return a.valid?(($x(s)||$x(i))&&n.dirty(),{status:n.value,value:a.data}):(se(r,{code:X.invalid_intersection_types}),be)};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}))}}Al.create=(e,t,n)=>new Al({left:e,right:t,typeName:ge.ZodIntersection,...xe(n)});class Gn extends Pe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ae.array)return se(r,{code:X.invalid_type,expected:ae.array,received:r.parsedType}),be;if(r.data.length<this._def.items.length)return se(r,{code:X.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),be;!this._def.rest&&r.data.length>this._def.items.length&&(se(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 Fn(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>jt.mergeArray(n,i)):jt.mergeArray(n,s)}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:ge.ZodTuple,rest:null,...xe(t)})};class Ol extends Pe{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!==ae.object)return se(r,{code:X.invalid_type,expected:ae.object,received:r.parsedType}),be;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Fn(r,a,r.path,a)),value:i._parse(new Fn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?jt.mergeObjectAsync(n,o):jt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Pe?new Ol({keyType:t,valueType:n,typeName:ge.ZodRecord,...xe(r)}):new Ol({keyType:Hn.create(),valueType:t,typeName:ge.ZodRecord,...xe(n)})}}class rh extends Pe{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!==ae.map)return se(r,{code:X.invalid_type,expected:ae.map,received:r.parsedType}),be;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Fn(r,a,r.path,[c,"key"])),value:s._parse(new Fn(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 be;(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 be;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}rh.create=(e,t,n)=>new rh({valueType:t,keyType:e,typeName:ge.ZodMap,...xe(n)});class vs extends Pe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ae.set)return se(r,{code:X.invalid_type,expected:ae.set,received:r.parsedType}),be;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(se(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&&(se(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 be;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 Fn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new vs({...this._def,minSize:{value:t,message:he.toString(n)}})}max(t,n){return new vs({...this._def,maxSize:{value:t,message:he.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}vs.create=(e,t)=>new vs({valueType:e,minSize:null,maxSize:null,typeName:ge.ZodSet,...xe(t)});class Li extends Pe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ae.function)return se(n,{code:X.invalid_type,expected:ae.function,received:n.parsedType}),be;function r(a,l){return Kf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,qf(),Oi].filter(c=>!!c),issueData:{code:X.invalid_arguments,argumentsError:l}})}function o(a,l){return Kf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,qf(),Oi].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 Fi){const a=this;return Yt(async function(...l){const c=new sn([]),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 Yt(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new sn([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new sn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Li({...this._def,args:Gn.create(t).rest(gs.create())})}returns(t){return new Li({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Li({args:t||Gn.create([]).rest(gs.create()),returns:n||gs.create(),typeName:ge.ZodFunction,...xe(r)})}}class _l extends Pe{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})}}_l.create=(e,t)=>new _l({getter:e,typeName:ge.ZodLazy,...xe(t)});class Ml extends Pe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return se(n,{received:n.data,code:X.invalid_literal,expected:this._def.value}),be}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ml.create=(e,t)=>new Ml({value:e,typeName:ge.ZodLiteral,...xe(t)});function Wx(e,t){return new eo({values:e,typeName:ge.ZodEnum,...xe(t)})}class eo extends Pe{constructor(){super(...arguments),Mi.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return se(n,{expected:Me.joinValues(r),received:n.parsedType,code:X.invalid_type}),be}if(Cl(this,Mi)||Rx(this,Mi,new Set(this._def.values)),!Cl(this,Mi).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return se(n,{received:n.data,code:X.invalid_enum_value,options:r}),be}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 eo.create(t,{...this._def,...n})}exclude(t,n=this._def){return eo.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Mi=new WeakMap,eo.create=Wx;class Dl extends Pe{constructor(){super(...arguments),Di.set(this,void 0)}_parse(t){const n=Me.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ae.string&&r.parsedType!==ae.number){const o=Me.objectValues(n);return se(r,{expected:Me.joinValues(o),received:r.parsedType,code:X.invalid_type}),be}if(Cl(this,Di)||Rx(this,Di,new Set(Me.getValidEnumValues(this._def.values))),!Cl(this,Di).has(t.data)){const o=Me.objectValues(n);return se(r,{received:r.data,code:X.invalid_enum_value,options:o}),be}return Yt(t.data)}get enum(){return this._def.values}}Di=new WeakMap,Dl.create=(e,t)=>new Dl({values:e,typeName:ge.ZodNativeEnum,...xe(t)});class Fi extends Pe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ae.promise&&n.common.async===!1)return se(n,{code:X.invalid_type,expected:ae.promise,received:n.parsedType}),be;const r=n.parsedType===ae.promise?n.data:Promise.resolve(n.data);return Yt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Fi.create=(e,t)=>new Fi({type:e,typeName:ge.ZodPromise,...xe(t)});class Yn extends Pe{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=>{se(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 be;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?be:l.status==="dirty"||n.value==="dirty"?_i(l.value):l});{if(n.value==="aborted")return be;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?be:a.status==="dirty"||n.value==="dirty"?_i(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"?be:(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"?be:(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(!Tl(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=>Tl(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);Me.assertNever(o)}}Yn.create=(e,t,n)=>new Yn({schema:e,typeName:ge.ZodEffects,effect:t,...xe(n)}),Yn.createWithPreprocess=(e,t,n)=>new Yn({schema:t,effect:{type:"preprocess",transform:e},typeName:ge.ZodEffects,...xe(n)});class qn extends Pe{_parse(t){return this._getType(t)===ae.undefined?Yt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}qn.create=(e,t)=>new qn({innerType:e,typeName:ge.ZodOptional,...xe(t)});class to extends Pe{_parse(t){return this._getType(t)===ae.null?Yt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}to.create=(e,t)=>new to({innerType:e,typeName:ge.ZodNullable,...xe(t)});class Nl extends Pe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ae.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Nl.create=(e,t)=>new Nl({innerType:e,typeName:ge.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...xe(t)});class Ll extends Pe{_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 El(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new sn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new sn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ll.create=(e,t)=>new Ll({innerType:e,typeName:ge.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...xe(t)});class oh extends Pe{_parse(t){if(this._getType(t)!==ae.nan){const r=this._getOrReturnCtx(t);return se(r,{code:X.invalid_type,expected:ae.nan,received:r.parsedType}),be}return{status:"valid",value:t.data}}}oh.create=e=>new oh({typeName:ge.ZodNaN,...xe(e)});class Hx extends Pe{_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 Fl extends Pe{_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"?be:s.status==="dirty"?(n.dirty(),_i(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"?be: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 Fl({in:t,out:n,typeName:ge.ZodPipeline})}}class Vl extends Pe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Tl(o)&&(o.value=Object.freeze(o.value)),o);return El(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Vl.create=(e,t)=>new Vl({innerType:e,typeName:ge.ZodReadonly,...xe(t)}),ft.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={})),Hn.create,Jr.create,oh.create,ms.create,Xf.create,Ni.create,Qf.create,Pl.create,kl.create,Jf.create,gs.create,br.create,eh.create,Vn.create,ft.create,ft.strictCreate,Il.create,th.create,Al.create,Gn.create,Ol.create,rh.create,vs.create,Li.create,_l.create,Ml.create,eo.create,Dl.create,Fi.create,Yn.create,qn.create,to.create,Yn.createWithPreprocess,Fl.create;const ZR=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},XR=(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]}}},Ux=e=>e.replace(/\[(\d+)]/g,".$1").split("."),gn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):Ux(t),o=structuredClone(e);return XR(o,r,n),o},QR=(e,t)=>e.localeCompare(t),Vi={},Gx=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return Yx(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=Gx(e._def.innerType);return t==="ZodArray"?n??[]:n}},Yx=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,Gx(n)])),qx=(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]=qx(s,o):n[r]=o||s)}return n},JR={sort:QR,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},Kx=e=>{const t=new FormData(e),n=new URLSearchParams(t);return MR.parse(n.toString(),JR)},no=(e,t)=>Ux(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),wr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),sh=e=>{const t=e.dataset.target;if(!t)return wr(e);const n=document.querySelector(`[data-origin="${t}"]`);return wr(n||e)},eB={state:{},loading:!1,useOnChange:!1},Zx=e=>e.dataset.target||e.name,tB=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=fs.LocalStorage.get(t);return ZR(n)?n:{}},clear:()=>void fs.LocalStorage.delete(t),set:n=>fs.LocalStorage.set(t,n)}},nB=(e,t,n=eB)=>{const[r,o]=w.useState(null),s=w.useRef({}),[i,a]=w.useState(()=>it.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??Yx(e)??{}),l=w.useCallback(y=>{var A;const g=y.target,T=y.currentTarget;if(g.dataset.optional==="true")return;const E=Zx(g),C=sh(g)||(T?wr(T):""),I=no(E,e);if(g.setAttribute("data-initialized","true"),I){const O=I.safeParse(C),L=O.success?void 0:((A=O.error.issues[0])==null?void 0:A.message)??"";o(D=>gn(D??{},E,L))}},[]),c=w.useCallback(y=>g=>{const T=g.currentTarget,S=Object.values(s.current).reduce((C,I)=>{var V;const A=I.element,O=I.schema.safeParse(wr(A));if(A.dataset.ignore==="ignore"||O.success)return C;const L=(V=O.error.issues[0])==null?void 0:V.message;A.setAttribute("data-initialized","true");const D=A.dataset.name||A.name||"";return gn(C,D,L)},{}),E=it.empty(S)?null:S;o(E),console.error(E),y==null||y({form:T,errors:E||{}})},[]),u=(y,g=Vi)=>{const T=no(y,e),S=E=>{var I;if(!E)return;const C=E instanceof Date?E.toISOString():E.target.value;a(A=>gn(A,y,C)),(I=g==null?void 0:g.onChange)==null||I.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=Vi)=>{const T=no(y,e);return{...g,name:y,id:y,onChange:E=>{var I;const C=E.target.value;a(A=>gn(A,y,C)),(I=g==null?void 0:g.onChange)==null||I.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:Tr(r,y,void 0),value:Tr(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=Vi)=>{const T=no(y,e);return{...g,name:y,id:y,onChange:E=>{var I;const C=E.target.checked;a(A=>gn(A??{},y,C)),(I=g==null?void 0:g.onChange)==null||I.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:Tr(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=Vi)=>{const T=no(y,e),S=E=>{var I,A;(I=E.persist)==null||I.call(E);const C=E.target.value;(A=g==null?void 0:g.onChange)==null||A.call(g,E),a(O=>gn(O,y,C))};return{...g,loading:n.loading,name:y,id:y,onChange:S,form:t,onInvalid:l,error:Tr(r,y,void 0),required:g.required??!T.isOptional(),value:Tr(i,y,void 0)||(g==null?void 0:g.value)||"",type:it.instance(T,Jr)?"number":(g==null?void 0:g.type)??"text",ref:E=>E===null?void 0:s.current[y]={element:E,schema:T}}},m=(y,g=Vi)=>{const T=no(y,e),S=T._def.typeName==="ZodNumber";return{...g,name:y,id:y,onChange:C=>{var A,O;(A=C.persist)==null||A.call(C);const I=S?C.target.valueAsNumber:C.target.value;(O=g==null?void 0:g.onChange)==null||O.call(g,C),a(L=>gn(L,y,I))},form:t,loading:n.loading,onInvalid:l,error:Tr(r,y,void 0),required:g.required??!T.isOptional(),type:S?"number":(g==null?void 0:g.type)??"text",value:Tr(i,y,void 0)||(g==null?void 0:g.value)||"",ref:C=>C===null?void 0:void(s.current[y]={element:C,schema:T})}};w.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(wr(S)),C=L=>{var F;const D=Zx(L.target);if(!D)return!1;const V=L.target,k=sh(L.target)||(L.relatedTarget?wr(L.relatedTarget):""),_=T.schema.safeParse(k);if(V.setAttribute("value",k),_.success)return S.setCustomValidity(""),o(N=>{if(it.null(N))return null;const R=gn(N,D,void 0);return it.empty(N)||it.nil(N)||it.empty(R)?null:R}),!1;if(S.required){const N=((F=_.error.issues[0])==null?void 0:F.message)||"";S.setCustomValidity(N),o(R=>{if(it.null(R))return null;const H=gn(R,D,N||void 0);return it.empty(H)?null:H})}return!1},I=new AbortController,A=S.getAttribute("data-trigger")||"blur";S.addEventListener(A,C,{signal:I.signal});const O=S.dataset.shadow?!1:S.required?!E.success:!1;return{input:T,hasInitialError:O,unsubscribe:()=>I.abort()}});return y.some(T=>T.hasInitialError)&&o(T=>T===null?{}:T),()=>y.forEach(T=>T.unsubscribe())});const p=y=>g=>{var O;g.preventDefault();const T=g.currentTarget;let S=Kx(T);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(T.elements)).forEach(L=>{if(L.tagName==="SELECT"){const D=L;S=gn(S,D.name,D.value)}if(L.tagName==="INPUT"){const D=L,V=sh(D)||(D?wr(D):"");S=gn(S,D.dataset.target||D.name,V)}});const C=qx(S,i),I=e.safeParse(C),A=()=>{var L;ux(T),(L=n.interceptor)==null||L.clear()};if(I.success){const L=JSON.stringify(I.data);return T.setAttribute("data-json",L),(O=n.interceptor)==null||O.clear(),y==null?void 0:y(g,{form:T,event:g,reset:A,errors:[],success:!0,data:I.data,json:I.data})}return console.group("useForm error"),console.info(I),console.info(I.error.issues),console.error(I.error),console.groupEnd(),T.reportValidity(),y==null?void 0:y(g,{form:T,json:S,event:g,reset:A,data:S,success:!1,errors:I.error.issues.map(L=>({message:L.message,path:L.path.map(D=>String(D))}))})},v=y=>dc(i,y)||"",b=y=>({...y,id:t,name:t});return w.useEffect(()=>{var y;n.interceptor&&((y=n.interceptor)==null||y.set(i))},[i]),{get:v,input:m,state:i,errors:r,select:d,checkbox:f,onSubmit:p,setState:a,textarea:h,onInvalid:c,controller:b,datepicker:u,name:t,disabled:r!==null}},rB=e=>e?JSON.parse(e.getAttribute("data-json")):{},oB=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current};J.Alert=QI,J.Autocomplete=x2,J.Button=go,J.Calendar=Iv,J.Card=Av,J.Checkbox=gf,J.ColType=hs,J.Collapse=Iy,J.ComponentsProvider=B_,J.DatePicker=_2,J.Dropdown=Qo,J.Empty=Ov,J.Expand=zN,J.FileUpload=WV,J.Form=UV,J.Input=Pi,J.InputFeedback=Cw,J.InputField=Ci,J.Menu=UN,J.MenuItem=HN,J.Modal=LL,J.MultiCombobox=A2,J.Notifications=GM,J.Polymorph=mo,J.Radiobox=GV,J.RenderOnView=kT,J.Select=Zr,J.Stats=YM,J.Switch=YV,J.Tab=ZM,J.Table=J$,J.Tabs=qM,J.Tag=pc,J.TaskList=qV,J.Textarea=KV,J.Toolbar=FL,J.Tooltip=M0,J.TransferList=QV,J.createColumns=S$,J.createCssProperties=N_,J.createDesignTokens=bv,J.createFormStorage=tB,J.createOptionCols=$f,J.createStyles=M_,J.createTheme=D_,J.createTokenStyles=L_,J.css=De,J.defaultDarkTheme=$_,J.defaultLightTheme=R_,J.dispatchInput=uc,J.formReset=ux,J.formToJson=Kx,J.getJsonForm=rB,J.getSchemaShape=no,J.initializeInputDataset=Os,J.isReactComponent=wT,J.isReactFC=xT,J.isSsr=Yi,J.mergeRefs=cc,J.negate=ST,J.noop=hc,J.parsers=Ca,J.path=dc,J.reduceTokens=Fo,J.safeRegex=fc,J.splitInto=ap,J.useColorParser=j_,J.useForm=nB,J.useLocale=Uu,J.useNotification=HM,J.usePrevious=oB,J.useReactive=rb,J.useTablePreferences=C$,J.useTranslations=Et,J.uuid=_s,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})});
|
|
190
|
+
*/var Cf,iw;function HL(){if(iw)return Cf;iw=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 Cf=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},Cf}var kf,aw;function Pf(){if(aw)return kf;aw=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return kf=e,kf}var Af,sw;function lw(){return sw||(sw=1,Af=Function.call.bind(Object.prototype.hasOwnProperty)),Af}var _f,cw;function WL(){if(cw)return _f;cw=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Pf(),n={},r=lw();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={})},_f=o,_f}var If,uw;function qL(){if(uw)return If;uw=1;var e=ow(),t=HL(),n=Pf(),r=lw(),o=WL(),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 If=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(M){var $=M&&(c&&M[c]||M[u]);if(typeof $=="function")return $}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:x,element:S(),elementType:T(),instanceOf:w,node:A(),objectOf:k,oneOf:C,oneOfType:I,shape:N,exact:V};function h(M,$){return M===$?M!==0||1/M===1/$:M!==M&&$!==$}function y(M,$){this.message=M,this.data=$&&typeof $=="object"?$:{},this.stack=""}y.prototype=Error.prototype;function g(M){if(process.env.NODE_ENV!=="production")var $={},Q=0;function ie(Y,U,Z,R,H,X,re){if(R=R||p,X=X||Z,re!==n){if(l){var z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw z.name="Invariant Violation",z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var xe=R+":"+Z;!$[xe]&&Q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+R+"`. 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."),$[xe]=!0,Q++)}}return U[Z]==null?Y?U[Z]===null?new y("The "+H+" `"+X+"` is marked as required "+("in `"+R+"`, but its value is `null`.")):new y("The "+H+" `"+X+"` is marked as required in "+("`"+R+"`, but its value is `undefined`.")):null:M(U,Z,R,H,X)}var J=ie.bind(null,!1);return J.isRequired=ie.bind(null,!0),J}function v(M){function $(Q,ie,J,Y,U,Z){var R=Q[ie],H=L(R);if(H!==M){var X=j(R);return new y("Invalid "+Y+" `"+U+"` of type "+("`"+X+"` supplied to `"+J+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return g($)}function m(){return g(a)}function x(M){function $(Q,ie,J,Y,U){if(typeof M!="function")return new y("Property `"+U+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var Z=Q[ie];if(!Array.isArray(Z)){var R=L(Z);return new y("Invalid "+Y+" `"+U+"` of type "+("`"+R+"` supplied to `"+J+"`, expected an array."))}for(var H=0;H<Z.length;H++){var X=M(Z,H,J,Y,U+"["+H+"]",n);if(X instanceof Error)return X}return null}return g($)}function S(){function M($,Q,ie,J,Y){var U=$[Q];if(!s(U)){var Z=L(U);return new y("Invalid "+J+" `"+Y+"` of type "+("`"+Z+"` supplied to `"+ie+"`, expected a single ReactElement."))}return null}return g(M)}function T(){function M($,Q,ie,J,Y){var U=$[Q];if(!e.isValidElementType(U)){var Z=L(U);return new y("Invalid "+J+" `"+Y+"` of type "+("`"+Z+"` supplied to `"+ie+"`, expected a single ReactElement type."))}return null}return g(M)}function w(M){function $(Q,ie,J,Y,U){if(!(Q[ie]instanceof M)){var Z=M.name||p,R=q(Q[ie]);return new y("Invalid "+Y+" `"+U+"` of type "+("`"+R+"` supplied to `"+J+"`, expected ")+("instance of `"+Z+"`."))}return null}return g($)}function C(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function $(Q,ie,J,Y,U){for(var Z=Q[ie],R=0;R<M.length;R++)if(h(Z,M[R]))return null;var H=JSON.stringify(M,function(re,z){var xe=j(z);return xe==="symbol"?String(z):z});return new y("Invalid "+Y+" `"+U+"` of value `"+String(Z)+"` "+("supplied to `"+J+"`, expected one of "+H+"."))}return g($)}function k(M){function $(Q,ie,J,Y,U){if(typeof M!="function")return new y("Property `"+U+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var Z=Q[ie],R=L(Z);if(R!=="object")return new y("Invalid "+Y+" `"+U+"` of type "+("`"+R+"` supplied to `"+J+"`, expected an object."));for(var H in Z)if(r(Z,H)){var X=M(Z,H,J,Y,U+"."+H,n);if(X instanceof Error)return X}return null}return g($)}function I(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var $=0;$<M.length;$++){var Q=M[$];if(typeof Q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+D(Q)+" at index "+$+"."),a}function ie(J,Y,U,Z,R){for(var H=[],X=0;X<M.length;X++){var re=M[X],z=re(J,Y,U,Z,R,n);if(z==null)return null;z.data&&r(z.data,"expectedType")&&H.push(z.data.expectedType)}var xe=H.length>0?", expected one of type ["+H.join(", ")+"]":"";return new y("Invalid "+Z+" `"+R+"` supplied to "+("`"+U+"`"+xe+"."))}return g(ie)}function A(){function M($,Q,ie,J,Y){return P($[Q])?null:new y("Invalid "+J+" `"+Y+"` supplied to "+("`"+ie+"`, expected a ReactNode."))}return g(M)}function F(M,$,Q,ie,J){return new y((M||"React class")+": "+$+" type `"+Q+"."+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function N(M){function $(Q,ie,J,Y,U){var Z=Q[ie],R=L(Z);if(R!=="object")return new y("Invalid "+Y+" `"+U+"` of type `"+R+"` "+("supplied to `"+J+"`, expected `object`."));for(var H in M){var X=M[H];if(typeof X!="function")return F(J,Y,U,H,j(X));var re=X(Z,H,J,Y,U+"."+H,n);if(re)return re}return null}return g($)}function V(M){function $(Q,ie,J,Y,U){var Z=Q[ie],R=L(Z);if(R!=="object")return new y("Invalid "+Y+" `"+U+"` of type `"+R+"` "+("supplied to `"+J+"`, expected `object`."));var H=t({},Q[ie],M);for(var X in H){var re=M[X];if(r(M,X)&&typeof re!="function")return F(J,Y,U,X,j(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(M),null," "));var z=re(Z,X,J,Y,U+"."+X,n);if(z)return z}return null}return g($)}function P(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(P);if(M===null||s(M))return!0;var $=d(M);if($){var Q=$.call(M),ie;if($!==M.entries){for(;!(ie=Q.next()).done;)if(!P(ie.value))return!1}else for(;!(ie=Q.next()).done;){var J=ie.value;if(J&&!P(J[1]))return!1}}else return!1;return!0;default:return!1}}function O(M,$){return M==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function L(M){var $=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":O($,M)?"symbol":$}function j(M){if(typeof M>"u"||M===null)return""+M;var $=L(M);if($==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return $}function D(M){var $=j(M);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function q(M){return!M.constructor||!M.constructor.name?p:M.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},If}var Of,dw;function UL(){if(dw)return Of;dw=1;var e=Pf();function t(){}function n(){}return n.resetWarningCache=t,Of=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},Of}var fw;function GL(){if(fw)return Ys.exports;if(fw=1,process.env.NODE_ENV!=="production"){var e=ow(),t=!0;Ys.exports=qL()(e.isElement,t)}else Ys.exports=UL()();return Ys.exports}var YL=GL();const nt=Cp(YL);function Xr(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())})}typeof SuppressedError=="function"&&SuppressedError;const KL=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 ri(e,t,n){const r=ZL(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&pw(r,"path",i),pw(r,"relativePath",i),r}function ZL(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=KL.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function pw(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const XL=[".DS_Store","Thumbs.db"];function QL(e){return Xr(this,void 0,void 0,function*(){return Zs(e)&&JL(e.dataTransfer)?r2(e.dataTransfer,e.type):e2(e)?t2(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?n2(e):[]})}function JL(e){return Zs(e)}function e2(e){return Zs(e)&&Zs(e.target)}function Zs(e){return typeof e=="object"&&e!==null}function t2(e){return Mf(e.target.files).map(t=>ri(t))}function n2(e){return Xr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>ri(n))})}function r2(e,t){return Xr(this,void 0,void 0,function*(){if(e.items){const n=Mf(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(o2));return hw(mw(r))}return hw(Mf(e.files).map(n=>ri(n)))})}function hw(e){return e.filter(t=>XL.indexOf(t.name)===-1)}function Mf(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 o2(e){if(typeof e.webkitGetAsEntry!="function")return gw(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?vw(t):gw(e,t)}function mw(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?mw(n):[n]],[])}function gw(e,t){return Xr(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,ri(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return ri(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function i2(e){return Xr(this,void 0,void 0,function*(){return e.isDirectory?vw(e):a2(e)})}function vw(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>Xr(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(i2));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function a2(e){return Xr(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=ri(r,e.fullPath);t(o)},r=>{n(r)})})})}var Xs={},yw;function s2(){return yw||(yw=1,Xs.__esModule=!0,Xs.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}),Xs}var l2=s2();const Df=Cp(l2);function bw(e){return d2(e)||u2(e)||Sw(e)||c2()}function c2(){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 u2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function d2(e){if(Array.isArray(e))return Nf(e)}function xw(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 ww(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xw(Object(n),!0).forEach(function(r){Tw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ma(e,t){return h2(e)||p2(e,t)||Sw(e,t)||f2()}function f2(){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 Sw(e,t){if(e){if(typeof e=="string")return Nf(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 Nf(e,t)}}function Nf(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 p2(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 h2(e){if(Array.isArray(e))return e}var m2=typeof Df=="function"?Df:Df.default,g2="file-invalid-type",v2="file-too-large",y2="file-too-small",b2="too-many-files",x2=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:g2,message:"File type must be ".concat(r)}},Ew=function(t){return{code:v2,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Cw=function(t){return{code:y2,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},w2={code:b2,message:"Too many files"};function kw(e,t){var n=e.type==="application/x-moz-file"||m2(e,t);return[n,n?null:x2(t)]}function Pw(e,t,n){if(Qr(e.size))if(Qr(t)&&Qr(n)){if(e.size>n)return[!1,Ew(n)];if(e.size<t)return[!1,Cw(t)]}else{if(Qr(t)&&e.size<t)return[!1,Cw(t)];if(Qr(n)&&e.size>n)return[!1,Ew(n)]}return[!0,null]}function Qr(e){return e!=null}function T2(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=kw(l,n),u=ma(c,1),d=u[0],p=Pw(l,r,o),f=ma(p,1),h=f[0],y=s?s(l):null;return d&&h&&!y})}function Qs(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Js(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 Aw(e){e.preventDefault()}function S2(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function E2(e){return e.indexOf("Edge/")!==-1}function C2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return S2(e)||E2(e)}function Vn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!Qs(r)&&s&&s.apply(void 0,[r].concat(i)),Qs(r)})}}function k2(){return"showOpenFilePicker"in window}function P2(e){if(Qr(e)){var t=Object.entries(e).filter(function(n){var r=ma(n,2),o=r[0],i=r[1],a=!0;return _w(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(Iw))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=ma(r,2),i=o[0],a=o[1];return ww(ww({},n),{},Tw({},i,a))},{});return[{description:"Files",accept:t}]}return e}function A2(e){if(Qr(e))return Object.entries(e).reduce(function(t,n){var r=ma(n,2),o=r[0],i=r[1];return[].concat(bw(t),[o],bw(i))},[]).filter(function(t){return _w(t)||Iw(t)}).join(",")}function _2(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function I2(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function _w(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function Iw(e){return/^.*\.[\w]+$/.test(e)}var O2=["children"],M2=["open"],D2=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],N2=["refKey","onChange","onClick"];function F2(e){return j2(e)||V2(e)||Ow(e)||L2()}function L2(){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 V2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function j2(e){if(Array.isArray(e))return Lf(e)}function Ff(e,t){return z2(e)||$2(e,t)||Ow(e,t)||R2()}function R2(){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 Ow(e,t){if(e){if(typeof e=="string")return Lf(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 Lf(e,t)}}function Lf(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 $2(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 z2(e){if(Array.isArray(e))return e}function Mw(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 ft(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Mw(Object(n),!0).forEach(function(r){Vf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function el(e,t){if(e==null)return{};var n=B2(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 B2(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 jf=E.forwardRef(function(e,t){var n=e.children,r=el(e,O2),o=Nw(r),i=o.open,a=el(o,M2);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(ft(ft({},a),{},{open:i})))});jf.displayName="Dropzone";var Dw={disabled:!1,getFilesFromEvent:QL,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};jf.defaultProps=Dw,jf.propTypes={children:nt.func,accept:nt.objectOf(nt.arrayOf(nt.string)),multiple:nt.bool,preventDropOnDocument:nt.bool,noClick:nt.bool,noKeyboard:nt.bool,noDrag:nt.bool,noDragEventsBubbling:nt.bool,minSize:nt.number,maxSize:nt.number,maxFiles:nt.number,disabled:nt.bool,getFilesFromEvent:nt.func,onFileDialogCancel:nt.func,onFileDialogOpen:nt.func,useFsAccessApi:nt.bool,autoFocus:nt.bool,onDragEnter:nt.func,onDragLeave:nt.func,onDragOver:nt.func,onDrop:nt.func,onDropAccepted:nt.func,onDropRejected:nt.func,onError:nt.func,validator:nt.func};var Rf={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Nw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ft(ft({},Dw),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,x=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,w=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,A=E.useMemo(function(){return A2(n)},[n]),F=E.useMemo(function(){return P2(n)},[n]),N=E.useMemo(function(){return typeof g=="function"?g:Fw},[g]),V=E.useMemo(function(){return typeof y=="function"?y:Fw},[y]),P=E.useRef(null),O=E.useRef(null),L=E.useReducer(H2,Rf),j=Ff(L,2),D=j[0],q=j[1],M=D.isFocused,$=D.isFileDialogActive,Q=E.useRef(typeof window<"u"&&window.isSecureContext&&v&&k2()),ie=function(){!Q.current&&$&&setTimeout(function(){if(O.current){var ce=O.current.files;ce.length||(q({type:"closeDialog"}),V())}},300)};E.useEffect(function(){return window.addEventListener("focus",ie,!1),function(){window.removeEventListener("focus",ie,!1)}},[O,$,V,Q]);var J=E.useRef([]),Y=function(ce){P.current&&P.current.contains(ce.target)||(ce.preventDefault(),J.current=[])};E.useEffect(function(){return x&&(document.addEventListener("dragover",Aw,!1),document.addEventListener("drop",Y,!1)),function(){x&&(document.removeEventListener("dragover",Aw),document.removeEventListener("drop",Y))}},[P,x]),E.useEffect(function(){return!r&&m&&P.current&&P.current.focus(),function(){}},[P,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(F2(J.current),[oe.target]),Js(oe)&&Promise.resolve(o(oe)).then(function(ce){if(!(Qs(oe)&&!C)){var $e=ce.length,Ze=$e>0&&T2({files:ce,accept:A,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),Ct=$e>0&&!Ze;q({isDragAccept:Ze,isDragReject:Ct,isDragActive:!0,type:"setDraggedFiles"}),c&&c(oe)}}).catch(function(ce){return U(ce)})},[o,c,U,C,A,a,i,s,l,I]),R=E.useCallback(function(oe){oe.preventDefault(),oe.persist(),ee(oe);var ce=Js(oe);if(ce&&oe.dataTransfer)try{oe.dataTransfer.dropEffect="copy"}catch{}return ce&&d&&d(oe),!1},[d,C]),H=E.useCallback(function(oe){oe.preventDefault(),oe.persist(),ee(oe);var ce=J.current.filter(function(Ze){return P.current&&P.current.contains(Ze)}),$e=ce.indexOf(oe.target);$e!==-1&&ce.splice($e,1),J.current=ce,!(ce.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Js(oe)&&u&&u(oe))},[P,u,C]),X=E.useCallback(function(oe,ce){var $e=[],Ze=[];oe.forEach(function(Ct){var pt=kw(Ct,A),Lt=Ff(pt,2),wn=Lt[0],$n=Lt[1],xr=Pw(Ct,a,i),wr=Ff(xr,2),Tr=wr[0],B=wr[1],W=I?I(Ct):null;if(wn&&Tr&&!W)$e.push(Ct);else{var Ve=[$n,B];W&&(Ve=Ve.concat(W)),Ze.push({file:Ct,errors:Ve.filter(function(Je){return Je})})}}),(!s&&$e.length>1||s&&l>=1&&$e.length>l)&&($e.forEach(function(Ct){Ze.push({file:Ct,errors:[w2]})}),$e.splice(0)),q({acceptedFiles:$e,fileRejections:Ze,isDragReject:Ze.length>0,type:"setFiles"}),p&&p($e,Ze,ce),Ze.length>0&&h&&h(Ze,ce),$e.length>0&&f&&f($e,ce)},[q,s,A,a,i,l,p,f,h,I]),re=E.useCallback(function(oe){oe.preventDefault(),oe.persist(),ee(oe),J.current=[],Js(oe)&&Promise.resolve(o(oe)).then(function(ce){Qs(oe)&&!C||X(ce,oe)}).catch(function(ce){return U(ce)}),q({type:"reset"})},[o,X,U,C]),z=E.useCallback(function(){if(Q.current){q({type:"openDialog"}),N();var oe={multiple:s,types:F};window.showOpenFilePicker(oe).then(function(ce){return o(ce)}).then(function(ce){X(ce,null),q({type:"closeDialog"})}).catch(function(ce){_2(ce)?(V(ce),q({type:"closeDialog"})):I2(ce)?(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(ce)});return}O.current&&(q({type:"openDialog"}),N(),O.current.value=null,O.current.click())},[q,N,V,v,X,U,F,s]),xe=E.useCallback(function(oe){!P.current||!P.current.isEqualNode(oe.target)||(oe.key===" "||oe.key==="Enter"||oe.keyCode===32||oe.keyCode===13)&&(oe.preventDefault(),z())},[P,z]),Ae=E.useCallback(function(){q({type:"focus"})},[]),Ie=E.useCallback(function(){q({type:"blur"})},[]),Se=E.useCallback(function(){S||(C2()?setTimeout(z,0):z())},[S,z]),K=function(ce){return r?null:ce},se=function(ce){return T?null:K(ce)},G=function(ce){return w?null:K(ce)},ee=function(ce){C&&ce.stopPropagation()},ye=E.useMemo(function(){return function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=oe.refKey,$e=ce===void 0?"ref":ce,Ze=oe.role,Ct=oe.onKeyDown,pt=oe.onFocus,Lt=oe.onBlur,wn=oe.onClick,$n=oe.onDragEnter,xr=oe.onDragOver,wr=oe.onDragLeave,Tr=oe.onDrop,B=el(oe,D2);return ft(ft(Vf({onKeyDown:se(Vn(Ct,xe)),onFocus:se(Vn(pt,Ae)),onBlur:se(Vn(Lt,Ie)),onClick:K(Vn(wn,Se)),onDragEnter:G(Vn($n,Z)),onDragOver:G(Vn(xr,R)),onDragLeave:G(Vn(wr,H)),onDrop:G(Vn(Tr,re)),role:typeof Ze=="string"&&Ze!==""?Ze:"presentation"},$e,P),!r&&!T?{tabIndex:0}:{}),B)}},[P,xe,Ae,Ie,Se,Z,R,H,re,T,w,r]),de=E.useCallback(function(oe){oe.stopPropagation()},[]),Re=E.useMemo(function(){return function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=oe.refKey,$e=ce===void 0?"ref":ce,Ze=oe.onChange,Ct=oe.onClick,pt=el(oe,N2),Lt=Vf({accept:A,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(Vn(Ze,re)),onClick:K(Vn(Ct,de)),tabIndex:-1},$e,O);return ft(ft({},Lt),pt)}},[O,n,s,re,r]);return ft(ft({},D),{},{isFocused:M&&!r,getRootProps:ye,getInputProps:Re,rootRef:P,inputRef:O,open:K(z)})}function H2(e,t){switch(t.type){case"focus":return ft(ft({},e),{},{isFocused:!0});case"blur":return ft(ft({},e),{},{isFocused:!1});case"openDialog":return ft(ft({},Rf),{},{isFileDialogActive:!0});case"closeDialog":return ft(ft({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ft(ft({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ft(ft({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return ft({},Rf);default:return e}}function Fw(){}const W2={isImage:e=>e.type.includes("image")},q2=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(W2.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:ew(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:ew(e.file.size)})},[e.file]),t.type==="img"?b.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[b.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[b.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),b.jsxs("div",{className:"flex flex-col",children:[b.jsx("span",{children:e.file.name}),b.jsx("span",{children:t.size})]})]}),b.jsx(fo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:b.jsx(ko,{})})]}):b.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[b.jsxs("header",{className:"flex flex-row items-center gap-4",children:[b.jsx(oy,{size:48}),b.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[b.jsx("span",{children:e.file.name}),b.jsx("span",{children:t.size})]})]}),b.jsx(fo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:b.jsx(ko,{className:"text-danger"})})]})},U2=e=>b.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>b.jsx(q2,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),G2=e=>e.isDragActive?b.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?b.jsx(U2,{onDeleteFile:e.onDeleteFile,files:e.files}):b.jsx(E.Fragment,{children:e.idle}),Y2=b.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[b.jsx(_A,{size:64}),b.jsxs("p",{children:["You can drag your files or"," ",b.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),K2=({idle:e=Y2,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}=Nw({onDrop:a});return b.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:[b.jsx("input",{...l(r),name:r.name,id:r.name}),b.jsx(G2,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},Z2=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return b.jsx("form",{...e,onSubmit:t})},X2=({children:e,className:t="",size:n,...r})=>b.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:[b.jsx("input",{...r,type:"radio",className:He("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]}),Jr=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=mi(v.current);return T.addEventListener("change",()=>T.setAttribute("data-selected","true"),{once:!0,signal:S.signal}),()=>{w(),S.abort()}},[]);const x=()=>{var S;return(S=v.current)==null?void 0:S.focus()};return b.jsx(pa,{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:b.jsx("label",{htmlFor:m,children:b.jsxs("button",{onClick:x,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[b.jsx(Mu,{size:20}),b.jsx("span",{className:"sr-only",children:g.inputCaretDown})]})}),children:b.jsxs("select",{...h,id:m,name:m,value:h.value,required:e,ref:gc(y,v),"data-selected":!!h.value||!1,defaultValue:h.value?void 0:"",title:typeof h.title=="string"?h.title:void 0,className:He("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:[b.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}`}))]})})}),Q2=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=yi(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 b.jsxs("fieldset",{className:He("flex flex-col flex-wrap justify-center",t),"data-component":"switch",children:[b.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[b.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"}),b.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:b.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"})}),b.jsx("label",{htmlFor:r.id||i,className:"ml-3 inline-block text-sm",id:`${i}-label`,children:b.jsx("span",{className:"font-medium text-foreground",children:e})})]}),b.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),J2=e=>{const[t,n]=rA();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:lA(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),b.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},eV=Z0("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)}),tV=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},nV={Item:E.forwardRef(function(t,n){return b.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return b.jsx("ul",{...t,ref:n,className:"space-y-3"})})},rV=e=>{const t=E.useRef(null),n=tV(t);return b.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[b.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:[b.jsx("header",{className:"border-b border-card-border pb-2"}),b.jsxs("div",{className:"px-8 space-y-2",children:[b.jsx(ha,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),b.jsx(vf,{height:n,useWindowScroll:!0,data:e.source,components:nV,itemContent:(r,o)=>b.jsx(E.Fragment,{children:b.jsx(Tf,{children:b.jsx(e.Item,{data:o})})})})]})]}),b.jsx("div",{children:b.jsx(fo,{children:b.jsx(Du,{})})}),b.jsx("div",{})]})};var oV=Object.defineProperty,Lw=Object.getOwnPropertySymbols,iV=Object.prototype.hasOwnProperty,aV=Object.prototype.propertyIsEnumerable,Vw=(e,t,n)=>t in e?oV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sV=(e,t)=>{for(var n in t||(t={}))iV.call(t,n)&&Vw(e,n,t[n]);if(Lw)for(var n of Lw(t))aV.call(t,n)&&Vw(e,n,t[n]);return e},$f=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},lV=(e,t,n,r)=>nl($f,e,t,n,r),oi=e=>typeof e=="object",gr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!oi(e)&&!oi(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>gr(e[r],t[r]))},cV=(e,t)=>(oi(e)||Array.isArray(e))&&t?e[t]:e,uV=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,tl=e=>/[0-9.]+/.test(e),jw=e=>["string","number"].includes(typeof e),Rw=e=>e==null||(e==null?void 0:e.length)===0||e==="",$w={eq:gr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:Rw,notEmpty:e=>!Rw(e),in:(e,t)=>$f(t,n=>gr(e,n)),notIn:(e,t)=>zw(t,n=>!gr(e,n))},dV=e=>{if(e in $w)return $w[e];throw new Error("Linq - Symbol not found")},ii=(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},nl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=dV(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},fV=(e,t,n,r)=>nl(ii,e,t,n,r),zw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},pV=(e,t,n,r)=>nl(zw,e,t,n,r),Bw=e=>{if(e===null)return null;const t=sV({},e);return Object.keys(t).forEach(n=>t[n]=oi(e[n])?Bw(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Hw=(e,t)=>{if(oi(t)){for(let n=0;n<e.length;n++){const r=e[n];if(gr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(gr(t,r))return!0}return!1},hV=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},mV=e=>ii(e,(t,n,r)=>oi(t)?n===r.findIndex(o=>gr(o,t)):n===r.indexOf(t)),gV=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},Ww=(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())},vV=(e,t)=>Ww(e,n=>n[t]),qw=(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},yV=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},bV=(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 tl(e)&&tl(t)?r.map(a=>Number.parseInt(a)):r},zf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&tl(e)&&tl(t)){const o=[],[i,a]=yV(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return bV(e,t,r)},xV=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?zf(r,o,1):zf(r,i,Number.parseInt(o,10))}return jw(e)&&jw(t)?zf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Bf=(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},Uw=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},wV=(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)},TV=(e,t,n,r)=>nl(wV,e,t,n,r),Gw=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(uV(t))},Yw=(e=>(e.Asc="asc",e.Desc="desc",e))(Yw||{}),SV=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),EV=(e,t)=>e.sort(SV(t)),CV=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ii(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},kV=class xp{constructor(t=[]){this.array=t}static Range(...t){return xV(...t)}static New(t){return new xp(t)}Where(t,n,r){return this.array=fV(this.array,t,n,r),this}Some(t,n,r){return lV(this.array,t,n,r)}All(t,n,r){return pV(this.array,t,n,r)}Reverse(){return this.array=Uw(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=TV(this.array,t,n,r),this}Distinct(){return this.array=mV(this.array),this}First(t){return t===void 0?this.array[0]:gV(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?Bf((n,r)=>n+r,0,this.array):Bf((n,r)=>n+cV(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return vV(this.array,t)}GroupWith(t){return Ww(this.array,t)}Except(t){return ii(this.array,n=>!Hw(t,n))}Intersect(t){return ii(this.array,n=>Hw(t,n))}OrderBy(t,n){let r;return r=t?Gw(this.array,t):this.array.toSorted(),this.array=n==="desc"?Uw(r):r,this}Includes(t){return $f(this.array,n=>gr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return Bf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(qw(this.array,n=>[t,n]))}Zip(t,n){return qw(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ii(this.array,t).length}Get(t){return this.array[t]}Clone(){return new xp(Bw(this.array))}ToObject(t){return hV(this.array,t)}Sort(t){return Array.isArray(t)?EV(this.array,t):Gw(this.array,t)}Unique(t){return CV(this.array,t)}},Kw=kV,Hf={},Zw;function PV(){return Zw||(Zw=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 x=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)}=${x}`]).join(";");document.cookie=S,u()}},f=g=>{const v=new Set,m=x=>{g().removeItem(x);const S=i(g());v.forEach(T=>T(S))};return{delete:m,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(g()):g(),has:x=>{const S=g().getItem(x);return!n(S)},deleteAll:()=>{t(g(),m),v.forEach(x=>x(g()))},get:x=>o(x,g()),set:(x,S)=>{g().setItem(x,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}(Hf)),Hf}var ga=PV();const Wf=e=>e.headerLabel??e.thead??e.id,qf=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var ai=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(ai||{});const Uf=e=>e.type==="number"?e.valueAsNumber:e.value,AV=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},_V={},IV=(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})},OV=(e,t,n=_V)=>{const r=vi()?null:ga.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Zu({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:IV(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return vi()||ga.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},Gf=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??ai.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:gi(),operation:l,label:Wf(e),name:o,type:i,value:"",...r}},Yf=()=>{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(()=>({[ai.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[ai.Boolean]:[t.is,t.isNot],[ai.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},MV=e=>{const t=Ot(),n=Yf(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Gf(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 Gf(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=Uf(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return b.jsx(E.Fragment,{children:b.jsx(Ko,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(EA,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:b.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return b.jsxs("li",{className:"flex flex-nowrap gap-3",children:[b.jsx(Jr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),b.jsx(Jr,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),b.jsx(ha,{"data-id":l.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),b.jsx("div",{className:"mt-5 flex items-center justify-center",children:b.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:b.jsx(ko,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),b.jsx("li",{children:b.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[b.jsx(Nu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},DV=({filter:e,onDelete:t,set:n})=>{const r=Ot(),o=Yf(),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=Uf(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return b.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[b.jsx(Jr,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),b.jsx(ha,{"data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),b.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:b.jsx(ko,{className:"text-danger",size:14})})]})},NV=({item:e,onPointerDown:t})=>{const n=Co(0);return b.jsxs(Jv,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[b.jsx("button",{type:"button",className:"cursor-grab",children:b.jsx(SA,{size:14})}),b.jsx("span",{children:e.groupName})]},e.groupId)},FV=e=>{var l;const t=Ot(),n=qf(e.cols),r=aA(),[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 Kw(e.rows).GroupBy(d),y=e.cols.find(v=>v.id===d);e.setGroups(uT(h).map((v,m)=>{const x=h[v];return{...y,groupId:gi(),groupKey:d,index:m,rows:x,groupName:v}}))},s=()=>e.setGroups([]);return b.jsx(E.Fragment,{children:b.jsxs(Ko,{arrow:!1,title:t.tableGroupLabel,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(AA,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[b.jsxs("div",{className:"flex flex-nowrap items-center",children:[b.jsx(Jr,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),b.jsx(fo,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:b.jsx(ko,{size:16,className:"text-danger"})})]}),e.groups.length>0?b.jsxs("section",{className:"my-4",children:[b.jsx("header",{children:b.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),b.jsx(yS,{children:b.jsx(Xv,{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=>b.jsx(NV,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},LV=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),VV=(e,t)=>e.toSorted(LV(t)),Xw=(e,t,n)=>({label:t,id:gi(),type:n,value:e.id}),jV=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,Xw(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 b.jsx(E.Fragment,{children:b.jsx(Ko,{title:t.tableSortDropdownTitle,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(ny,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:b.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>b.jsxs("li",{className:"flex flex-nowrap gap-3",children:[b.jsx(Jr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),b.jsx(Jr,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),b.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:b.jsx(ko,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),b.jsx("li",{children:b.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[b.jsx(Nu,{size:14})," ",t.tableSortAddButton]})})]})})})},RV=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=Xw(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Wf(e.col);return b.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[b.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?b.jsx(bA,{size:14}):null,n==="desc"?b.jsx(yA,{size:14}):null,n==="undefined"?b.jsx(ny,{size:14}):null]})},$V=e=>b.jsx("header",{className:"min-w-full mb-1",children:b.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[b.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[b.jsx("span",{children:b.jsx(MV,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),b.jsx("span",{children:b.jsx(jV,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),b.jsx("span",{children:b.jsx(FV,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),b.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=>b.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[b.jsxs("span",{children:[b.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),b.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[b.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),b.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=Uf(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function zV(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 BV=e=>{const t=E.useId(),n=Ot(),r=e.asLink||"button",o=E.useMemo(()=>zV(e.current,e.pages),[e.current,e.pages]),i=e.current<e.pages;return b.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[b.jsx("p",{children:b.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?b.jsxs(E.Fragment,{children:[b.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),b.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=>b.jsx("option",{value:a,children:a},`pagination-opt-${a}`))})," "]}):null})}),b.jsx("nav",{children:b.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?b.jsx("li",{children:b.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(a=>a===null?null:b.jsx(E.Fragment,{children:typeof a=="string"?b.jsx("li",{children:"..."}):b.jsx("li",{children:b.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?b.jsx("li",{children:b.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},HV={top:0,left:0,right:0,bottom:-1},WV=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=Yf(),s=r?CA:kA,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===Yw.Asc?"ascending":"descending":"none",f=Wf(e.header);return b.jsxs(Jv,{...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:[b.jsx("span",{className:"flex h-full items-center justify-between px-2 py-4",children:b.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&i?b.jsx(Ko,{arrow:!0,trigger:b.jsxs("span",{children:[b.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",f]}),b.jsx(s,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:b.jsxs("span",{className:"text-lg font-medium",children:[t.tableFilterDropdownTitleUnique," ",b.jsx("span",{className:"text-primary",children:f})]}),children:n.length===0?null:b.jsxs("ul",{className:"font-medium",children:[n.map(y=>b.jsx("li",{className:"my-1",children:b.jsx(DV,{onDelete:c,filter:y,set:e.setFilters})},`thead-filter-${y.id}`)),b.jsx("li",{children:b.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(y=>y.concat(Gf(e.header,a.options,a.operations))),children:[b.jsx(Nu,{size:14})," ",t.tableFilterNewFilter]})})]})}):null,b.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&o?b.jsx(RV,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:b.jsx(gt.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:HV,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`}})]})},qV=e=>b.jsx(Xv,{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:b.jsx(Qn,{children:e.headers.map((t,n)=>b.jsx(WV,{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}`))})}),Qw=E.createContext({}),UV=()=>E.useContext(Qw),GV=E.forwardRef(({context:e,className:t="",...n},r)=>b.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:b.jsx(Qn,{children:n.children})})),YV=E.forwardRef(({context:e,className:t="",...n},r)=>b.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${t??""}`})),KV=E.forwardRef(({context:e,...t},n)=>{const r=UV(),o={...t==null?void 0:t.style,top:ht.number(r.sticky)?`${r.sticky}px`:void 0};return b.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),ZV=E.forwardRef(({context:e,item:t,...n},r)=>b.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),XV=E.forwardRef((e,t)=>e.context.loadingMore?b.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:b.jsx("tr",{role:"row",className:"bg-card-background",children:b.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:b.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),QV={TableHead:KV,Table:YV,TableBody:GV,TableRow:ZV,TableFoot:XV},JV=[0,0,0,0,0,0,0,0,0,0],Jw=b.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),ej=(e,t,n)=>b.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?Jw:b.jsx(ub,{})}),tj=(e,t,n)=>{const r=n.cols,o=n.loading;return b.jsx(E.Fragment,{children:r.map((i,a)=>{var d;const s=`${a},${e}`,l=yc(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?Jw:c?b.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l}):b.jsx(E.Fragment,{children:ht.nil(l)?"":l}))})})},nj=()=>b.jsx(E.Fragment,{}),rj=[{}],e1=({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=yi(a),y=yi(u.loadingMore),g=E.useMemo(()=>{if(u.loading)return JV;if(c)return u.rows;const v=new Kw(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():VV(v.Select(),r)},[u.rows,t,r,u.loading]);return E.useEffect(()=>{if(d.current===null)return()=>{};const v=d.current,m=new IntersectionObserver(x=>{var w;return x[x.length-1].isIntersecting&&y.current?((w=h.current)==null||w.call(h),void f(!0)):f(!1)});return m.observe(v),()=>m.disconnect()},[]),b.jsxs("div",{className:"min-w-full",children:[b.jsxs("div",{className:`group rounded-lg ${s?"border border-table-border":""}`,children:[b.jsx(rL,{useWindowScroll:!0,followOutput:"smooth",components:QV,totalCount:g.length,data:g.length===0?rj:g,fixedFooterContent:p?nj:null,itemContent:g.length===0?ej:tj,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>b.jsx(qV,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),b.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?b.jsx(BV,{...l}):null]})},oj=(e,t)=>typeof t=="function"?t(e):t,rl=(e,t,n)=>e===t||n==null?void 0:n(t),ij=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=E.useMemo(()=>qf(e.cols),[e.cols]),[o,i]=Zu({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},a=>{const s=l=>c=>{const u=a.state();return{...u,[l]:oj(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),rl((s==null?void 0:s.filters)??[],a.filters??[],e.setFilters),rl((s==null?void 0:s.sorters)??[],a.sorters??[],e.setSorters),rl((s==null?void 0:s.groups)??[],a.groups??[],e.setGroups),rl((s==null?void 0:s.cols)??[],a.cols??[],e.setCols),a}]});return b.jsx(Qw.Provider,{value:t,children:b.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?b.jsx($V,{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?b.jsx(e1,{...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}):b.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((a,s)=>b.jsx("div",{className:"min-w-full",children:b.jsx(e1,{...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}`))})]})})},aj=["INPUT","SELECT"],t1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{aj.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Kf,n1;function Zf(){if(n1)return Kf;n1=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Kf={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Kf}var Xf,r1;function o1(){if(r1)return Xf;r1=1;var e=Zf(),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(),x=m.obj[m.prop];if(n(x)){for(var S=[],T=0;T<x.length;++T)typeof x[T]<"u"&&S.push(x[T]);m.obj[m.prop]=S}}},i=function(v,m){for(var x=m&&m.plainObjects?{__proto__:null}:{},S=0;S<v.length;++S)typeof v[S]<"u"&&(x[S]=v[S]);return x},a=function g(v,m,x){if(!m)return v;if(typeof m!="object"&&typeof m!="function"){if(n(v))v.push(m);else if(v&&typeof v=="object")(x&&(x.plainObjects||x.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,x)),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,x):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,x):T[w]=C,T},S)},s=function(v,m){return Object.keys(m).reduce(function(x,S){return x[S]=m[S],x},v)},l=function(g,v,m){var x=g.replace(/\+/g," ");if(m==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},c=1024,u=function(v,m,x,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)),x==="iso-8859-1")return escape(w).replace(/%u[0-9a-f]{4}/gi,function(V){return"%26%23"+parseInt(V.slice(2),16)+"%3B"});for(var C="",k=0;k<w.length;k+=c){for(var I=w.length>=c?w.slice(k,k+c):w,A=[],F=0;F<I.length;++F){var N=I.charCodeAt(F);if(N===45||N===46||N===95||N===126||N>=48&&N<=57||N>=65&&N<=90||N>=97&&N<=122||T===e.RFC1738&&(N===40||N===41)){A[A.length]=I.charAt(F);continue}if(N<128){A[A.length]=r[N];continue}if(N<2048){A[A.length]=r[192|N>>6]+r[128|N&63];continue}if(N<55296||N>=57344){A[A.length]=r[224|N>>12]+r[128|N>>6&63]+r[128|N&63];continue}F+=1,N=65536+((N&1023)<<10|I.charCodeAt(F)&1023),A[A.length]=r[240|N>>18]+r[128|N>>12&63]+r[128|N>>6&63]+r[128|N&63]}C+=A.join("")}return C},d=function(v){for(var m=[{obj:{o:v},prop:"o"}],x=[],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],A=w[I];typeof A=="object"&&A!==null&&x.indexOf(A)===-1&&(m.push({obj:w,prop:I}),x.push(A))}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 x=[],S=0;S<v.length;S+=1)x.push(m(v[S]));return x}return m(v)};return Xf={arrayToObject:i,assign:s,combine:h,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:y,merge:a},Xf}var Qf,i1;function sj(){if(i1)return Qf;i1=1;var e=iT(),t=o1(),n=Zf(),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,x,S,T,w,C,k,I,A,F,N,V,P,O,L,j){for(var D=g,q=j,M=0,$=!1;(q=q.get(p))!==void 0&&!$;){var Q=q.get(g);if(M+=1,typeof Q<"u"){if(Q===M)throw new RangeError("Cyclic object value");$=!0}typeof q.get(p)>"u"&&(M=0)}if(typeof I=="function"?D=I(v,D):D instanceof Date?D=N(D):m==="comma"&&i(D)&&(D=t.maybeMap(D,function(Ie){return Ie instanceof Date?N(Ie):Ie})),D===null){if(T)return k&&!O?k(v,u.encoder,L,"key",V):v;D=""}if(d(D)||t.isBuffer(D)){if(k){var ie=O?v:k(v,u.encoder,L,"key",V);return[P(ie)+"="+P(k(D,u.encoder,L,"value",V))]}return[P(v)+"="+P(String(D))]}var J=[];if(typeof D>"u")return J;var Y;if(m==="comma"&&i(D))O&&k&&(D=t.maybeMap(D,k)),Y=[{value:D.length>0?D.join(",")||null:void 0}];else if(i(I))Y=I;else{var U=Object.keys(D);Y=A?U.sort(A):U}var Z=C?String(v).replace(/\./g,"%2E"):String(v),R=x&&i(D)&&D.length===1?Z+"[]":Z;if(S&&i(D)&&D.length===0)return R+"[]";for(var H=0;H<Y.length;++H){var X=Y[H],re=typeof X=="object"&&X&&typeof X.value<"u"?X.value:D[X];if(!(w&&re===null)){var z=F&&C?String(X).replace(/\./g,"%2E"):String(X),xe=i(D)?typeof m=="function"?m(R,z):R:R+(F?"."+z:"["+z+"]");j.set(g,M);var Ae=e();Ae.set(p,j),s(J,y(re,xe,m,x,S,T,w,C,m==="comma"&&O&&i(D)?null:k,I,A,F,N,V,P,O,L,Ae))}}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 x=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:x,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 Qf=function(y,g){var v=y,m=h(g),x,S;typeof m.filter=="function"?(S=m.filter,v=S("",v)):i(m.filter)&&(S=m.filter,x=S);var T=[];if(typeof v!="object"||v===null)return"";var w=o[m.arrayFormat],C=w==="comma"&&m.commaRoundTrip;x||(x=Object.keys(v)),m.sort&&x.sort(m.sort);for(var k=e(),I=0;I<x.length;++I){var A=x[I],F=v[A];m.skipNulls&&F===null||s(T,f(F,A,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 N=T.join(m.delimiter),V=m.addQueryPrefix===!0?"?":"";return m.charsetSentinel&&(m.charset==="iso-8859-1"?V+="utf8=%26%2310003%3B&":V+="utf8=%E2%9C%93&"),N.length>0?V+N:""},Qf}var Jf,a1;function lj(){if(a1)return Jf;a1=1;var e=o1(),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 x=-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"),x=S,S=m.length);for(S=0;S<m.length;++S)if(S!==x){var w=m[S],C=w.indexOf("]="),k=C===-1?w.indexOf("="):C+1,I,A;k===-1?(I=h.decoder(w,r.decoder,T,"key"),A=h.strictNullHandling?null:""):(I=h.decoder(w.slice(0,k),r.decoder,T,"key"),A=e.maybeMap(i(w.slice(k+1),h,n(y[I])?y[I].length:0),function(N){return h.decoder(N,r.decoder,T,"value")})),A&&h.interpretNumericEntities&&T==="iso-8859-1"&&(A=o(String(A))),w.indexOf("[]=")>-1&&(A=n(A)?[A]:A);var F=t.call(y,I);F&&h.duplicates==="combine"?y[I]=e.combine(y[I],A):(!F||h.duplicates==="last")&&(y[I]=A)}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),x=p.length-1;x>=0;--x){var S,T=p[x];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=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/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=x.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 Jf=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 x=v[m],S=u(x,y[x],h,typeof p=="string");g=e.merge(g,S,h)}return h.allowSparse===!0?g:e.compact(g)},Jf}var ep,s1;function cj(){if(s1)return ep;s1=1;var e=sj(),t=lj(),n=Zf();return ep={formats:n,parse:t,stringify:e},ep}var uj=cj(),Be;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Be||(Be={}));var l1;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(l1||(l1={}));const fe=Be.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),vr=e=>{switch(typeof e){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},ne=Be.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class dn 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 dn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Be.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}dn.create=e=>new dn(e);const va=(e,t)=>{let n;switch(e.code){case ne.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ne.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Be.jsonStringifyReplacer)}`;break;case ne.unrecognized_keys:n=`Unrecognized key(s) in object: ${Be.joinValues(e.keys,", ")}`;break;case ne.invalid_union:n="Invalid input";break;case ne.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Be.joinValues(e.options)}`;break;case ne.invalid_enum_value:n=`Invalid enum value. Expected ${Be.joinValues(e.options)}, received '${e.received}'`;break;case ne.invalid_arguments:n="Invalid function arguments";break;case ne.invalid_return_type:n="Invalid function return type";break;case ne.invalid_date:n="Invalid date";break;case ne.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Be.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ne.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ne.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ne.custom:n="Invalid input";break;case ne.invalid_intersection_types:n="Intersection results could not be merged";break;case ne.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ne.not_finite:n="Number must be finite";break;default:n=t.defaultError,Be.assertNever(e)}return{message:n}};let dj=va;function tp(){return dj}const np=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 ue(e,t){const n=tp(),r=np({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===va?void 0:va].filter(o=>!!o)});e.common.issues.push(r)}class qt{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 Ce;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 qt.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 Ce;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 Ce=Object.freeze({status:"aborted"}),ya=e=>({status:"dirty",value:e}),Zt=e=>({status:"valid",value:e}),c1=e=>e.status==="aborted",u1=e=>e.status==="dirty",si=e=>e.status==="valid",ol=e=>typeof Promise<"u"&&e instanceof Promise;function il(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 d1(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}typeof SuppressedError=="function"&&SuppressedError;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 ba,xa;class jn{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 f1=(e,t)=>{if(si(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 dn(e.common.issues);return this._error=n,this._error}}};function _e(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 Fe{get description(){return this._def.description}_getType(t){return vr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:vr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new qt,ctx:{common:t.parent.common,data:t.data,parsedType:vr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ol(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:vr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return f1(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:vr(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return si(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=>si(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:vr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(ol(o)?o:Promise.resolve(o));return f1(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:ne.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Kn({schema:this,typeName:Te.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Zn.create(this,this._def)}nullable(){return no.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Rn.create(this)}promise(){return Sa.create(this,this._def)}or(t){return ll.create([this,t],this._def)}and(t){return cl.create(this,t,this._def)}transform(t){return new Kn({..._e(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new hl({..._e(this._def),innerType:this,defaultValue:n,typeName:Te.ZodDefault})}brand(){return new g1({typeName:Te.ZodBranded,type:this,..._e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new ml({..._e(this._def),innerType:this,catchValue:n,typeName:Te.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return gl.create(this,t)}readonly(){return vl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const fj=/^c[^\s-]{8,}$/i,pj=/^[0-9a-z]+$/,hj=/^[0-9A-HJKMNP-TV-Z]{26}$/i,mj=/^[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,gj=/^[a-z0-9_-]{21}$/i,vj=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,yj=/^[-+]?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)?)??$/,bj=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,xj="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let rp;const wj=/^(?:(?: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])$/,Tj=/^(?:(?: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])$/,Sj=/^(([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]))$/,Ej=/^(([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])$/,Cj=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kj=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,p1="((\\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])))",Pj=new RegExp(`^${p1}$`);function h1(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 Aj(e){return new RegExp(`^${h1(e)}$`)}function _j(e){let t=`${p1}T${h1(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 Ij(e,t){return!!((t==="v4"||!t)&&wj.test(e)||(t==="v6"||!t)&&Sj.test(e))}function Oj(e,t){if(!vj.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 Mj(e,t){return!!((t==="v4"||!t)&&Tj.test(e)||(t==="v6"||!t)&&Ej.test(e))}class Un extends Fe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ue(i,{code:ne.invalid_type,expected:fe.string,received:i.parsedType}),Ce}const r=new qt;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ue(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),ue(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?ue(o,{code:ne.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ue(o,{code:ne.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")bj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"email",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")rp||(rp=new RegExp(xj,"u")),rp.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"emoji",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")mj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"uuid",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")gj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"nanoid",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")fj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")pj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid2",code:ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")hj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(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),ue(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),ue(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),ue(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),ue(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),ue(o,{code:ne.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?_j(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:ne.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Pj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:ne.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Aj(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:ne.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?yj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"duration",code:ne.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Ij(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ip",code:ne.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Oj(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"jwt",code:ne.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Mj(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cidr",code:ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Cj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64",code:ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?kj.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64url",code:ne.invalid_string,message:i.message}),r.dirty()):Be.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ne.invalid_string,...ve.errToObj(r)})}_addCheck(t){return new Un({...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 Un({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Un({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Un({...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}}Un.create=e=>{var t;return new Un({checks:[],typeName:Te.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};function Dj(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 eo extends Fe{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 ue(i,{code:ne.invalid_type,expected:fe.number,received:i.parsedType}),Ce}let r;const o=new qt;for(const i of this._def.checks)i.kind==="int"?Be.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ue(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),ue(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),ue(r,{code:ne.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Dj(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ue(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),ue(r,{code:ne.not_finite,message:i.message}),o.dirty()):Be.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new eo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new eo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ve.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ve.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ve.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ve.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Be.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}eo.create=e=>new eo({checks:[],typeName:Te.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class li extends Fe{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 qt;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),ue(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),ue(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),ue(r,{code:ne.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Be.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ue(n,{code:ne.invalid_type,expected:fe.bigint,received:n.parsedType}),Ce}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 li({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new li({...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}}li.create=e=>{var t;return new li({checks:[],typeName:Te.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};class op extends Fe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ue(r,{code:ne.invalid_type,expected:fe.boolean,received:r.parsedType}),Ce}return Zt(t.data)}}op.create=e=>new op({typeName:Te.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class wa extends Fe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return ue(i,{code:ne.invalid_type,expected:fe.date,received:i.parsedType}),Ce}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ue(i,{code:ne.invalid_date}),Ce}const r=new qt;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ue(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),ue(o,{code:ne.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Be.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new wa({...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}}wa.create=e=>new wa({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Te.ZodDate,..._e(e)});class ip extends Fe{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ue(r,{code:ne.invalid_type,expected:fe.symbol,received:r.parsedType}),Ce}return Zt(t.data)}}ip.create=e=>new ip({typeName:Te.ZodSymbol,..._e(e)});class al extends Fe{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:ne.invalid_type,expected:fe.undefined,received:r.parsedType}),Ce}return Zt(t.data)}}al.create=e=>new al({typeName:Te.ZodUndefined,..._e(e)});class sl extends Fe{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ue(r,{code:ne.invalid_type,expected:fe.null,received:r.parsedType}),Ce}return Zt(t.data)}}sl.create=e=>new sl({typeName:Te.ZodNull,..._e(e)});class ap extends Fe{constructor(){super(...arguments),this._any=!0}_parse(t){return Zt(t.data)}}ap.create=e=>new ap({typeName:Te.ZodAny,..._e(e)});class ci extends Fe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Zt(t.data)}}ci.create=e=>new ci({typeName:Te.ZodUnknown,..._e(e)});class yr extends Fe{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:ne.invalid_type,expected:fe.never,received:n.parsedType}),Ce}}yr.create=e=>new yr({typeName:Te.ZodNever,..._e(e)});class sp extends Fe{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:ne.invalid_type,expected:fe.void,received:r.parsedType}),Ce}return Zt(t.data)}}sp.create=e=>new sp({typeName:Te.ZodVoid,..._e(e)});class Rn extends Fe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ue(n,{code:ne.invalid_type,expected:fe.array,received:n.parsedType}),Ce;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ue(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&&(ue(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&&(ue(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 jn(n,a,n.path,s)))).then(a=>qt.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new jn(n,a,n.path,s)));return qt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Rn({...this._def,minLength:{value:t,message:ve.toString(n)}})}max(t,n){return new Rn({...this._def,maxLength:{value:t,message:ve.toString(n)}})}length(t,n){return new Rn({...this._def,exactLength:{value:t,message:ve.toString(n)}})}nonempty(t){return this.min(1,t)}}Rn.create=(e,t)=>new Rn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Te.ZodArray,..._e(t)});function ui(e){if(e instanceof bt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Zn.create(ui(r))}return new bt({...e._def,shape:()=>t})}else return e instanceof Rn?new Rn({...e._def,type:ui(e.element)}):e instanceof Zn?Zn.create(ui(e.unwrap())):e instanceof no?no.create(ui(e.unwrap())):e instanceof Yn?Yn.create(e.items.map(t=>ui(t))):e}class bt extends Fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Be.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return ue(c,{code:ne.invalid_type,expected:fe.object,received:c.parsedType}),Ce}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof yr&&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 jn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof yr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(ue(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 jn(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=>qt.mergeObjectSync(r,c)):qt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ve.errToObj,new bt({...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 bt({...this._def,unknownKeys:"strip"})}passthrough(){return new bt({...this._def,unknownKeys:"passthrough"})}extend(t){return new bt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new bt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Te.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new bt({...this._def,catchall:t})}pick(t){const n={};return Be.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new bt({...this._def,shape:()=>n})}omit(t){const n={};return Be.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new bt({...this._def,shape:()=>n})}deepPartial(){return ui(this)}partial(t){const n={};return Be.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new bt({...this._def,shape:()=>n})}required(t){const n={};return Be.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Zn;)i=i._def.innerType;n[r]=i}}),new bt({...this._def,shape:()=>n})}keyof(){return m1(Be.objectKeys(this.shape))}}bt.create=(e,t)=>new bt({shape:()=>e,unknownKeys:"strip",catchall:yr.create(),typeName:Te.ZodObject,..._e(t)}),bt.strictCreate=(e,t)=>new bt({shape:()=>e,unknownKeys:"strict",catchall:yr.create(),typeName:Te.ZodObject,..._e(t)}),bt.lazycreate=(e,t)=>new bt({shape:e,unknownKeys:"strip",catchall:yr.create(),typeName:Te.ZodObject,..._e(t)});class ll extends Fe{_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 dn(s.ctx.common.issues));return ue(n,{code:ne.invalid_union,unionErrors:a}),Ce}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 dn(l));return ue(n,{code:ne.invalid_union,unionErrors:s}),Ce}}get options(){return this._def.options}}ll.create=(e,t)=>new ll({options:e,typeName:Te.ZodUnion,..._e(t)});const Gn=e=>e instanceof dl?Gn(e.schema):e instanceof Kn?Gn(e.innerType()):e instanceof fl?[e.value]:e instanceof to?e.options:e instanceof pl?Be.objectValues(e.enum):e instanceof hl?Gn(e._def.innerType):e instanceof al?[void 0]:e instanceof sl?[null]:e instanceof Zn?[void 0,...Gn(e.unwrap())]:e instanceof no?[null,...Gn(e.unwrap())]:e instanceof g1||e instanceof vl?Gn(e.unwrap()):e instanceof ml?Gn(e._def.innerType):[];class lp extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ue(n,{code:ne.invalid_type,expected:fe.object,received:n.parsedType}),Ce;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}):(ue(n,{code:ne.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ce)}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=Gn(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 lp({typeName:Te.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,..._e(r)})}}function cp(e,t){const n=vr(e),r=vr(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=Be.objectKeys(t),i=Be.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=cp(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=cp(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 cl extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(c1(i)||c1(a))return Ce;const s=cp(i.value,a.value);return s.valid?((u1(i)||u1(a))&&n.dirty(),{status:n.value,value:s.data}):(ue(r,{code:ne.invalid_intersection_types}),Ce)};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}))}}cl.create=(e,t,n)=>new cl({left:e,right:t,typeName:Te.ZodIntersection,..._e(n)});class Yn extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ue(r,{code:ne.invalid_type,expected:fe.array,received:r.parsedType}),Ce;if(r.data.length<this._def.items.length)return ue(r,{code:ne.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ce;!this._def.rest&&r.data.length>this._def.items.length&&(ue(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 jn(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>qt.mergeArray(n,a)):qt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Yn({...this._def,rest:t})}}Yn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yn({items:e,typeName:Te.ZodTuple,rest:null,..._e(t)})};class ul extends Fe{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 ue(r,{code:ne.invalid_type,expected:fe.object,received:r.parsedType}),Ce;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new jn(r,s,r.path,s)),value:a._parse(new jn(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?qt.mergeObjectAsync(n,o):qt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Fe?new ul({keyType:t,valueType:n,typeName:Te.ZodRecord,..._e(r)}):new ul({keyType:Un.create(),valueType:t,typeName:Te.ZodRecord,..._e(n)})}}class up extends Fe{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 ue(r,{code:ne.invalid_type,expected:fe.map,received:r.parsedType}),Ce;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new jn(r,s,r.path,[c,"key"])),value:i._parse(new jn(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 Ce;(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 Ce;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}up.create=(e,t,n)=>new up({valueType:t,keyType:e,typeName:Te.ZodMap,..._e(n)});class di extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ue(r,{code:ne.invalid_type,expected:fe.set,received:r.parsedType}),Ce;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ue(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&&(ue(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 Ce;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 jn(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new di({...this._def,minSize:{value:t,message:ve.toString(n)}})}max(t,n){return new di({...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)}}di.create=(e,t)=>new di({valueType:e,minSize:null,maxSize:null,typeName:Te.ZodSet,..._e(t)});class Ta extends Fe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ue(n,{code:ne.invalid_type,expected:fe.function,received:n.parsedType}),Ce;function r(s,l){return np({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,tp(),va].filter(c=>!!c),issueData:{code:ne.invalid_arguments,argumentsError:l}})}function o(s,l){return np({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,tp(),va].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 Sa){const s=this;return Zt(async function(...l){const c=new dn([]),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 Zt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new dn([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new dn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ta({...this._def,args:Yn.create(t).rest(ci.create())})}returns(t){return new Ta({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ta({args:t||Yn.create([]).rest(ci.create()),returns:n||ci.create(),typeName:Te.ZodFunction,..._e(r)})}}class dl extends Fe{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})}}dl.create=(e,t)=>new dl({getter:e,typeName:Te.ZodLazy,..._e(t)});class fl extends Fe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ue(n,{received:n.data,code:ne.invalid_literal,expected:this._def.value}),Ce}return{status:"valid",value:t.data}}get value(){return this._def.value}}fl.create=(e,t)=>new fl({value:e,typeName:Te.ZodLiteral,..._e(t)});function m1(e,t){return new to({values:e,typeName:Te.ZodEnum,..._e(t)})}class to extends Fe{constructor(){super(...arguments),ba.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{expected:Be.joinValues(r),received:n.parsedType,code:ne.invalid_type}),Ce}if(il(this,ba)||d1(this,ba,new Set(this._def.values)),!il(this,ba).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{received:n.data,code:ne.invalid_enum_value,options:r}),Ce}return Zt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return to.create(t,{...this._def,...n})}exclude(t,n=this._def){return to.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ba=new WeakMap,to.create=m1;class pl extends Fe{constructor(){super(...arguments),xa.set(this,void 0)}_parse(t){const n=Be.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=Be.objectValues(n);return ue(r,{expected:Be.joinValues(o),received:r.parsedType,code:ne.invalid_type}),Ce}if(il(this,xa)||d1(this,xa,new Set(Be.getValidEnumValues(this._def.values))),!il(this,xa).has(t.data)){const o=Be.objectValues(n);return ue(r,{received:r.data,code:ne.invalid_enum_value,options:o}),Ce}return Zt(t.data)}get enum(){return this._def.values}}xa=new WeakMap,pl.create=(e,t)=>new pl({values:e,typeName:Te.ZodNativeEnum,..._e(t)});class Sa extends Fe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return ue(n,{code:ne.invalid_type,expected:fe.promise,received:n.parsedType}),Ce;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Sa.create=(e,t)=>new Sa({type:e,typeName:Te.ZodPromise,..._e(t)});class Kn extends Fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Te.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{ue(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 Ce;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Ce:l.status==="dirty"||n.value==="dirty"?ya(l.value):l});{if(n.value==="aborted")return Ce;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Ce:s.status==="dirty"||n.value==="dirty"?ya(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"?Ce:(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"?Ce:(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(!si(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=>si(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);Be.assertNever(o)}}Kn.create=(e,t,n)=>new Kn({schema:e,typeName:Te.ZodEffects,effect:t,..._e(n)}),Kn.createWithPreprocess=(e,t,n)=>new Kn({schema:t,effect:{type:"preprocess",transform:e},typeName:Te.ZodEffects,..._e(n)});class Zn extends Fe{_parse(t){return this._getType(t)===fe.undefined?Zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Zn.create=(e,t)=>new Zn({innerType:e,typeName:Te.ZodOptional,..._e(t)});class no extends Fe{_parse(t){return this._getType(t)===fe.null?Zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}no.create=(e,t)=>new no({innerType:e,typeName:Te.ZodNullable,..._e(t)});class hl extends Fe{_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}}hl.create=(e,t)=>new hl({innerType:e,typeName:Te.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,..._e(t)});class ml extends Fe{_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 ol(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new dn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new dn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ml.create=(e,t)=>new ml({innerType:e,typeName:Te.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,..._e(t)});class dp extends Fe{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ue(r,{code:ne.invalid_type,expected:fe.nan,received:r.parsedType}),Ce}return{status:"valid",value:t.data}}}dp.create=e=>new dp({typeName:Te.ZodNaN,..._e(e)});class g1 extends Fe{_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 gl extends Fe{_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"?Ce:i.status==="dirty"?(n.dirty(),ya(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"?Ce: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 gl({in:t,out:n,typeName:Te.ZodPipeline})}}class vl extends Fe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(si(o)&&(o.value=Object.freeze(o.value)),o);return ol(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}vl.create=(e,t)=>new vl({innerType:e,typeName:Te.ZodReadonly,..._e(t)}),bt.lazycreate;var Te;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Te||(Te={})),Un.create,eo.create,dp.create,li.create,op.create,wa.create,ip.create,al.create,sl.create,ap.create,ci.create,yr.create,sp.create,Rn.create,bt.create,bt.strictCreate,ll.create,lp.create,cl.create,Yn.create,ul.create,up.create,di.create,Ta.create,dl.create,fl.create,to.create,pl.create,Sa.create,Kn.create,Zn.create,no.create,Kn.createWithPreprocess,gl.create;const Nj=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},Fj=(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]}}},v1=e=>e.replace(/\[(\d+)]/g,".$1").split("."),xn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):v1(t),o=structuredClone(e);return Fj(o,r,n),o},Lj=(e,t)=>e.localeCompare(t),Ea={},y1=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return b1(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=y1(e._def.innerType);return t==="ZodArray"?n??[]:n}},b1=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,y1(n)])),x1=(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]=x1(i,o):n[r]=o||i)}return n},Vj={sort:Lj,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},w1=e=>{const t=new FormData(e),n=new URLSearchParams(t);return uj.parse(n.toString(),Vj)},ro=(e,t)=>v1(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),br=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),fp=e=>{const t=e.dataset.target;if(!t)return br(e);const n=document.querySelector(`[data-origin="${t}"]`);return br(n||e)},jj={state:{},loading:!1,useOnChange:!1},T1=e=>e.dataset.target||e.name,Rj=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=ga.LocalStorage.get(t);return Nj(n)?n:{}},clear:()=>void ga.LocalStorage.delete(t),set:n=>ga.LocalStorage.set(t,n)}},$j=(e,t,n=jj)=>{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)??b1(e)??{}),l=E.useCallback(m=>{var I;const x=m.target,S=m.currentTarget;if(x.dataset.optional==="true")return;const w=T1(x),C=fp(x)||(S?br(S):""),k=ro(w,e);if(x.setAttribute("data-initialized","true"),k){const A=k.safeParse(C),F=A.success?void 0:((I=A.error.issues[0])==null?void 0:I.message)??"";o(N=>xn(N??{},w,F))}},[]),c=E.useCallback(m=>x=>{const S=x.currentTarget,T=Object.values(i.current).reduce((C,k)=>{var V;const I=k.element,A=k.schema.safeParse(br(I));if(I.dataset.ignore==="ignore"||A.success)return C;const F=(V=A.error.issues[0])==null?void 0:V.message;I.setAttribute("data-initialized","true");const N=I.dataset.name||I.name||"";return xn(C,N,F)},{}),w=ht.empty(T)?null:T;o(w),console.error(w),m==null||m({form:S,errors:w||{}})},[]),u=(m,x=Ea)=>{const S=ro(m,e),T=w=>{var k;if(!w)return;const C=w instanceof Date?w.toISOString():w.target.value;s(I=>xn(I,m,C)),(k=x==null?void 0:x.onChange)==null||k.call(x,w)};return{...x,loading:n.loading,name:m,id:m,onChange:T,form:t,date:ht.string(a[m])?new Date(a[m]):a[m],required:x.required??!S.isOptional(),error:r==null?void 0:r[m],ref:w=>{w!==null&&(i.current[m]={element:w,schema:S})}}},d=(m,x=Ea)=>{const S=ro(m,e);return{...x,name:m,id:m,onChange:w=>{var k;const C=w.target.value;s(I=>xn(I,m,C)),(k=x==null?void 0:x.onChange)==null||k.call(x,w)},form:t,loading:n.loading,onInvalid:l,error:Cr(r,m,void 0),value:Cr(a,m,void 0)||"",required:x.required??!S.isOptional(),ref:w=>w!==null?i.current[m]={element:w,schema:S}:void 0}},p=(m,x=Ea)=>{const S=ro(m,e);return{...x,name:m,id:m,onChange:w=>{var k;const C=w.target.checked;s(I=>xn(I??{},m,C)),(k=x==null?void 0:x.onChange)==null||k.call(x,w)},form:t,loading:n.loading,onInvalid:l,error:Cr(r,m,void 0),required:x.required??!S.isOptional(),ref:w=>w!==null?void(i.current[m]={element:w,schema:S}):void 0}},f=(m,x=Ea)=>{const S=ro(m,e),T=w=>{var k,I;(k=w.persist)==null||k.call(w);const C=w.target.value;(I=x==null?void 0:x.onChange)==null||I.call(x,w),s(A=>xn(A,m,C))};return{...x,loading:n.loading,name:m,id:m,onChange:T,form:t,onInvalid:l,error:Cr(r,m,void 0),required:x.required??!S.isOptional(),value:Cr(a,m,void 0)||(x==null?void 0:x.value)||"",type:ht.instance(S,eo)?"number":(x==null?void 0:x.type)??"text",ref:w=>w===null?void 0:i.current[m]={element:w,schema:S}}},h=(m,x=Ea)=>{const S=ro(m,e),T=S._def.typeName==="ZodNumber";return{...x,name:m,id:m,onChange:C=>{var I,A;(I=C.persist)==null||I.call(C);const k=T?C.target.valueAsNumber:C.target.value;(A=x==null?void 0:x.onChange)==null||A.call(x,C),s(F=>xn(F,m,k))},form:t,loading:n.loading,onInvalid:l,error:Cr(r,m,void 0),required:x.required??!S.isOptional(),type:T?"number":(x==null?void 0:x.type)??"text",value:Cr(a,m,void 0)||(x==null?void 0:x.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(br(T)),C=F=>{var L;const N=T1(F.target);if(!N)return!1;const V=F.target,P=fp(F.target)||(F.relatedTarget?br(F.relatedTarget):""),O=S.schema.safeParse(P);if(V.setAttribute("value",P),O.success)return T.setCustomValidity(""),o(j=>{if(ht.null(j))return null;const D=xn(j,N,void 0);return ht.empty(j)||ht.nil(j)||ht.empty(D)?null:D}),!1;if(T.required){const j=((L=O.error.issues[0])==null?void 0:L.message)||"";T.setCustomValidity(j),o(D=>{if(ht.null(D))return null;const q=xn(D,N,j||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 A=T.dataset.shadow?!1:T.required?!w.success:!1;return{input:S,hasInitialError:A,unsubscribe:()=>k.abort()}});return m.some(S=>S.hasInitialError)&&o(S=>S===null?{}:S),()=>m.forEach(S=>S.unsubscribe())});const y=m=>x=>{var A;x.preventDefault();const S=x.currentTarget;let T=w1(S);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(S.elements)).forEach(F=>{if(F.tagName==="SELECT"){const N=F;T=xn(T,N.name,N.value)}if(F.tagName==="INPUT"){const N=F,V=fp(N)||(N?br(N):"");T=xn(T,N.dataset.target||N.name,V)}});const C=x1(T,a),k=e.safeParse(C),I=()=>{var F;t1(S),(F=n.interceptor)==null||F.clear()};if(k.success){const F=JSON.stringify(k.data);return S.setAttribute("data-json",F),(A=n.interceptor)==null||A.clear(),m==null?void 0:m(x,{form:S,event:x,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(x,{form:S,json:T,event:x,reset:I,data:T,success:!1,errors:k.error.issues.map(F=>({message:F.message,path:F.path.map(N=>String(N))}))})},g=m=>yc(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}},zj=e=>e?JSON.parse(e.getAttribute("data-json")):{},Bj=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},Hj=()=>{const e=E.useContext(Ui);return e?e.parser:cs.hsla};ae.Alert=MA,ae.Autocomplete=kL,ae.Button=fo,ae.Calendar=lb,ae.Card=cb,ae.Checkbox=Tf,ae.ColType=ai,ae.Collapse=sy,ae.ComponentsProvider=SO,ae.DatePicker=LL,ae.Dropdown=Ko,ae.Empty=ub,ae.Expand=SN,ae.FileUpload=K2,ae.Form=Z2,ae.Input=ha,ae.InputFeedback=Y0,ae.InputField=pa,ae.Menu=kN,ae.MenuItem=CN,ae.Modal=LN,ae.MultiCombobox=NL,ae.Notifications=kM,ae.Polymorph=uo,ae.Radiobox=X2,ae.RenderOnView=rS,ae.Select=Jr,ae.Stats=PM,ae.Switch=Q2,ae.Tab=IM,ae.Table=ij,ae.Tabs=AM,ae.Tag=wc,ae.TaskList=J2,ae.Textarea=eV,ae.Toolbar=VN,ae.Tooltip=Xx,ae.TransferList=rV,ae.createColumns=AV,ae.createCssProperties=vO,ae.createDesignTokens=Jy,ae.createFormStorage=Rj,ae.createOptionCols=qf,ae.createStyles=mO,ae.createTheme=gO,ae.createTokenStyles=yO,ae.css=He,ae.defaultDarkTheme=wO,ae.defaultLightTheme=TO,ae.dispatchInput=vc,ae.formReset=t1,ae.formToJson=w1,ae.getJsonForm=zj,ae.getSchemaShape=ro,ae.hasVerticalScroll=Dh,ae.initializeInputDataset=mi,ae.isReactComponent=XT,ae.isReactFC=QT,ae.isSsr=vi,ae.mergeRefs=gc,ae.negate=JT,ae.noop=xc,ae.parsers=cs,ae.path=yc,ae.reduceTokens=Do,ae.safeRegex=bc,ae.splitInto=Lh,ae.useColorParser=Hj,ae.useForm=$j,ae.useLocale=ed,ae.useNotification=EM,ae.usePrevious=Bj,ae.useReactive=jb,ae.useTablePreferences=OV,ae.useTranslations=Ot,ae.uuid=gi,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})});
|
|
237
197
|
//# sourceMappingURL=index.umd.js.map
|