@g4rcez/components 0.0.29 → 0.0.31

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.
Files changed (65) hide show
  1. package/dist/components/core/button.d.ts +1 -1
  2. package/dist/components/core/button.d.ts.map +1 -1
  3. package/dist/components/core/button.js +2 -1
  4. package/dist/components/core/polymorph.d.ts +1 -1
  5. package/dist/components/core/polymorph.d.ts.map +1 -1
  6. package/dist/components/core/resizable.d.ts.map +1 -1
  7. package/dist/components/core/resizable.js +43 -4
  8. package/dist/components/display/alert.d.ts +3 -4
  9. package/dist/components/display/alert.d.ts.map +1 -1
  10. package/dist/components/display/alert.js +8 -7
  11. package/dist/components/display/calendar.d.ts +1 -1
  12. package/dist/components/display/calendar.d.ts.map +1 -1
  13. package/dist/components/display/calendar.js +6 -5
  14. package/dist/components/display/card.d.ts +4 -3
  15. package/dist/components/display/card.d.ts.map +1 -1
  16. package/dist/components/display/card.js +2 -2
  17. package/dist/components/display/list.d.ts +16 -0
  18. package/dist/components/display/list.d.ts.map +1 -0
  19. package/dist/components/display/list.js +35 -0
  20. package/dist/components/display/tabs.d.ts.map +1 -1
  21. package/dist/components/display/tabs.js +21 -8
  22. package/dist/components/floating/modal.d.ts +5 -3
  23. package/dist/components/floating/modal.d.ts.map +1 -1
  24. package/dist/components/floating/modal.js +14 -13
  25. package/dist/components/form/autocomplete.d.ts.map +1 -1
  26. package/dist/components/form/autocomplete.js +26 -19
  27. package/dist/components/form/checkbox.d.ts +3 -1
  28. package/dist/components/form/checkbox.d.ts.map +1 -1
  29. package/dist/components/form/checkbox.js +5 -4
  30. package/dist/components/form/date-picker.d.ts +3 -3
  31. package/dist/components/form/date-picker.d.ts.map +1 -1
  32. package/dist/components/form/date-picker.js +12 -7
  33. package/dist/components/form/input-field.d.ts.map +1 -1
  34. package/dist/components/form/input-field.js +2 -2
  35. package/dist/components/form/input.d.ts.map +1 -1
  36. package/dist/components/form/input.js +4 -5
  37. package/dist/components/form/select.d.ts.map +1 -1
  38. package/dist/components/form/select.js +7 -6
  39. package/dist/components/form/switch.d.ts +4 -3
  40. package/dist/components/form/switch.d.ts.map +1 -1
  41. package/dist/components/form/switch.js +28 -7
  42. package/dist/hooks/use-click-outside.d.ts +3 -0
  43. package/dist/hooks/use-click-outside.d.ts.map +1 -0
  44. package/dist/hooks/use-click-outside.js +17 -0
  45. package/dist/hooks/use-form.d.ts +18 -5
  46. package/dist/hooks/use-form.d.ts.map +1 -1
  47. package/dist/hooks/use-form.js +62 -18
  48. package/dist/index.css +1 -1
  49. package/dist/index.d.ts +2 -0
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +1 -0
  52. package/dist/index.js.map +1 -1
  53. package/dist/index.mjs +11962 -11936
  54. package/dist/index.mjs.map +1 -1
  55. package/dist/index.umd.js +49 -49
  56. package/dist/index.umd.js.map +1 -1
  57. package/dist/lib/dom.d.ts +2 -1
  58. package/dist/lib/dom.d.ts.map +1 -1
  59. package/dist/lib/dom.js +9 -13
  60. package/dist/preset/preset.tailwind.d.ts.map +1 -1
  61. package/dist/preset/preset.tailwind.js +4 -2
  62. package/dist/preset/src/styles/theme.js +4 -4
  63. package/dist/styles/theme.js +4 -4
  64. package/package.json +3 -3
  65. package/README.md +0 -36
package/dist/index.umd.js CHANGED
@@ -1,140 +1,140 @@
1
- (function(ee,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],b):(ee=typeof globalThis<"u"?globalThis:ee||self,b(ee.components={},ee.React,ee["react/jsx-runtime"],ee.ReactDOM))})(this,function(ee,b,x,Hd){"use strict";var HL=Object.defineProperty;var UL=(ee,b,x)=>b in ee?HL(ee,b,{enumerable:!0,configurable:!0,writable:!0,value:x}):ee[b]=x;var se=(ee,b,x)=>UL(ee,typeof b!="symbol"?b+"":b,x);function Ud(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 _=Ud(b),Gd=Ud(Hd);function Yd(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=Yd(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function V0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Yd(e))&&(r&&(r+=" "),r+=t);return r}const qd=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Kd=V0,si=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Kd(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=qd(u)||qd(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...s,...a}[m]):{...s,...a}[m]===y})?[...c,d,f]:c},[]);return Kd(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};function Zd(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Zd(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function $0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Zd(e))&&(r&&(r+=" "),r+=t);return r}var Xd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function R0(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var j0=Error,B0=EvalError,z0=RangeError,W0=ReferenceError,Jd=SyntaxError,Ko=TypeError,H0=URIError,U0=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==o||i.enumerable!==!0)return!1}return!0},ef=typeof Symbol<"u"&&Symbol,G0=U0,Y0=function(){return typeof ef!="function"||typeof Symbol!="function"||typeof ef("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:G0()},Qa={__proto__:null,foo:{}},q0=Object,K0=function(){return{__proto__:Qa}.foo===Qa.foo&&!(Qa instanceof q0)},Z0="Function.prototype.bind called on incompatible ",X0=Object.prototype.toString,Q0=Math.max,J0="[object Function]",tf=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var s=0;s<n.length;s+=1)r[s+t.length]=n[s];return r},ew=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},tw=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},nw=function(t){var n=this;if(typeof n!="function"||X0.apply(n)!==J0)throw new TypeError(Z0+n);for(var r=ew(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,tf(r,arguments));return Object(u)===u?u:this}return n.apply(t,tf(r,arguments))},i=Q0(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+tw(a,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},rw=nw,Ja=Function.prototype.bind||rw,ow=Function.prototype.call,sw=Object.prototype.hasOwnProperty,iw=Ja,aw=iw.call(ow,sw),Te,lw=j0,cw=B0,uw=z0,dw=W0,Ur=Jd,Gr=Ko,fw=H0,nf=Function,el=function(e){try{return nf('"use strict"; return ('+e+").constructor;")()}catch{}},vr=Object.getOwnPropertyDescriptor;if(vr)try{vr({},"")}catch{vr=null}var tl=function(){throw new Gr},hw=vr?function(){try{return arguments.callee,tl}catch{try{return vr(arguments,"callee").get}catch{return tl}}}():tl,Yr=Y0(),pw=K0(),yt=Object.getPrototypeOf||(pw?function(e){return e.__proto__}:null),qr={},mw=typeof Uint8Array>"u"||!yt?Te:yt(Uint8Array),br={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Te:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Te:ArrayBuffer,"%ArrayIteratorPrototype%":Yr&&yt?yt([][Symbol.iterator]()):Te,"%AsyncFromSyncIteratorPrototype%":Te,"%AsyncFunction%":qr,"%AsyncGenerator%":qr,"%AsyncGeneratorFunction%":qr,"%AsyncIteratorPrototype%":qr,"%Atomics%":typeof Atomics>"u"?Te:Atomics,"%BigInt%":typeof BigInt>"u"?Te:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Te:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Te:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Te:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":lw,"%eval%":eval,"%EvalError%":cw,"%Float32Array%":typeof Float32Array>"u"?Te:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Te:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Te:FinalizationRegistry,"%Function%":nf,"%GeneratorFunction%":qr,"%Int8Array%":typeof Int8Array>"u"?Te:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Te:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Te:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Yr&&yt?yt(yt([][Symbol.iterator]())):Te,"%JSON%":typeof JSON=="object"?JSON:Te,"%Map%":typeof Map>"u"?Te:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Yr||!yt?Te:yt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Te:Promise,"%Proxy%":typeof Proxy>"u"?Te:Proxy,"%RangeError%":uw,"%ReferenceError%":dw,"%Reflect%":typeof Reflect>"u"?Te:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Te:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Yr||!yt?Te:yt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Te:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Yr&&yt?yt(""[Symbol.iterator]()):Te,"%Symbol%":Yr?Symbol:Te,"%SyntaxError%":Ur,"%ThrowTypeError%":hw,"%TypedArray%":mw,"%TypeError%":Gr,"%Uint8Array%":typeof Uint8Array>"u"?Te:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Te:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Te:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Te:Uint32Array,"%URIError%":fw,"%WeakMap%":typeof WeakMap>"u"?Te:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Te:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Te:WeakSet};if(yt)try{null.error}catch(e){var gw=yt(yt(e));br["%Error.prototype%"]=gw}var yw=function e(t){var n;if(t==="%AsyncFunction%")n=el("async function () {}");else if(t==="%GeneratorFunction%")n=el("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=el("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&yt&&(n=yt(o.prototype))}return br[t]=n,n},rf={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Zo=Ja,ii=aw,vw=Zo.call(Function.call,Array.prototype.concat),bw=Zo.call(Function.apply,Array.prototype.splice),of=Zo.call(Function.call,String.prototype.replace),ai=Zo.call(Function.call,String.prototype.slice),ww=Zo.call(Function.call,RegExp.prototype.exec),xw=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Tw=/\\(\\)?/g,Sw=function(t){var n=ai(t,0,1),r=ai(t,-1);if(n==="%"&&r!=="%")throw new Ur("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Ur("invalid intrinsic syntax, expected opening `%`");var o=[];return of(t,xw,function(s,i,a,l){o[o.length]=a?of(l,Tw,"$1"):i||s}),o},Ew=function(t,n){var r=t,o;if(ii(rf,r)&&(o=rf[r],r="%"+o[0]+"%"),ii(br,r)){var s=br[r];if(s===qr&&(s=yw(r)),typeof s>"u"&&!n)throw new Gr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new Ur("intrinsic "+t+" does not exist!")},Kr=function(t,n){if(typeof t!="string"||t.length===0)throw new Gr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Gr('"allowMissing" argument must be a boolean');if(ww(/^%?[^%]*%?$/,t)===null)throw new Ur("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Sw(t),o=r.length>0?r[0]:"",s=Ew("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],bw(r,vw([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=ai(f,0,1),p=ai(f,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new Ur("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,i="%"+o+"%",ii(br,i))a=br[i];else if(a!=null){if(!(f in a)){if(!n)throw new Gr("base intrinsic for "+t+" exists, but the property is not available.");return}if(vr&&u+1>=r.length){var m=vr(a,f);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else d=ii(a,f),a=a[f];d&&!l&&(br[i]=a)}}return a},sf={exports:{}},nl,af;function rl(){if(af)return nl;af=1;var e=Kr,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return nl=t,nl}var Cw=Kr,li=Cw("%Object.getOwnPropertyDescriptor%",!0);if(li)try{li([],"length")}catch{li=null}var lf=li,cf=rl(),Pw=Jd,Zr=Ko,uf=lf,kw=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Zr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Zr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Zr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Zr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Zr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Zr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!uf&&uf(t,n);if(cf)cf(t,n,{configurable:i===null&&l?l.configurable:!i,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:s===null&&l?l.writable:!s});else if(a||!o&&!s&&!i)t[n]=r;else throw new Pw("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ol=rl(),df=function(){return!!ol};df.hasArrayLengthDefineBug=function(){if(!ol)return null;try{return ol([],"length",{value:1}).length!==1}catch{return!0}};var Ow=df,Iw=Kr,ff=kw,_w=Ow(),hf=lf,pf=Ko,Aw=Iw("%Math.floor%"),Dw=function(t,n){if(typeof t!="function")throw new pf("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Aw(n)!==n)throw new pf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&hf){var i=hf(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(_w?ff(t,"length",n,!0,!0):ff(t,"length",n)),t};(function(e){var t=Ja,n=Kr,r=Dw,o=Ko,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=rl(),c=n("%Math.max%");e.exports=function(f){if(typeof f!="function")throw new o("a function is required");var h=a(t,i,arguments);return r(h,1+c(0,f.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(sf);var Mw=sf.exports,mf=Kr,gf=Mw,Nw=gf(mf("String.prototype.indexOf")),Fw=function(t,n){var r=mf(t,!!n);return typeof r=="function"&&Nw(t,".prototype.")>-1?gf(r):r};const Lw=R0(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var sl=typeof Map=="function"&&Map.prototype,il=Object.getOwnPropertyDescriptor&&sl?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ci=sl&&il&&typeof il.get=="function"?il.get:null,yf=sl&&Map.prototype.forEach,al=typeof Set=="function"&&Set.prototype,ll=Object.getOwnPropertyDescriptor&&al?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ui=al&&ll&&typeof ll.get=="function"?ll.get:null,vf=al&&Set.prototype.forEach,Vw=typeof WeakMap=="function"&&WeakMap.prototype,Xo=Vw?WeakMap.prototype.has:null,$w=typeof WeakSet=="function"&&WeakSet.prototype,Qo=$w?WeakSet.prototype.has:null,Rw=typeof WeakRef=="function"&&WeakRef.prototype,bf=Rw?WeakRef.prototype.deref:null,jw=Boolean.prototype.valueOf,Bw=Object.prototype.toString,zw=Function.prototype.toString,Ww=String.prototype.match,cl=String.prototype.slice,zn=String.prototype.replace,Hw=String.prototype.toUpperCase,wf=String.prototype.toLowerCase,xf=RegExp.prototype.test,Tf=Array.prototype.concat,cn=Array.prototype.join,Uw=Array.prototype.slice,Sf=Math.floor,ul=typeof BigInt=="function"?BigInt.prototype.valueOf:null,dl=Object.getOwnPropertySymbols,fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Xr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ot=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Xr||!0)?Symbol.toStringTag:null,Ef=Object.prototype.propertyIsEnumerable,Cf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Pf(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||xf.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Sf(-e):Sf(e);if(r!==e){var o=String(r),s=cl.call(t,o.length+1);return zn.call(o,n,"$&_")+"."+zn.call(zn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return zn.call(t,n,"$&_")}var hl=Lw,kf=hl.custom,Of=Af(kf)?kf:null,Gw=function e(t,n,r,o){var s=n||{};if(Wn(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Wn(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=Wn(s,"customInspect")?s.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Wn(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Wn(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Mf(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Pf(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Pf(t,c):c}var u=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return pl(t)?"[Array]":"[Object]";var d=ux(s,r);if(typeof o>"u")o=[];else if(Df(o,t)>=0)return"[Circular]";function f(R,C,I){if(C&&(o=Uw.call(o),o.push(C)),I){var M={depth:s.depth};return Wn(s,"quoteStyle")&&(M.quoteStyle=s.quoteStyle),e(R,M,r+1,o)}return e(R,s,r+1,o)}if(typeof t=="function"&&!_f(t)){var h=tx(t),p=di(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+cn.call(p,", ")+" }":"")}if(Af(t)){var m=Xr?zn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):fl.call(t);return typeof t=="object"&&!Xr?Jo(m):m}if(ax(t)){for(var y="<"+wf.call(String(t.nodeName)),v=t.attributes||[],w=0;w<v.length;w++)y+=" "+v[w].name+"="+If(Yw(v[w].value),"double",s);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+wf.call(String(t.nodeName))+">",y}if(pl(t)){if(t.length===0)return"[]";var g=di(t,f);return d&&!cx(g)?"["+gl(g,d)+"]":"[ "+cn.call(g,", ")+" ]"}if(Kw(t)){var S=di(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!Ef.call(t,"cause")?"{ ["+String(t)+"] "+cn.call(Tf.call("[cause]: "+f(t.cause),S),", ")+" }":S.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+cn.call(S,", ")+" }"}if(typeof t=="object"&&i){if(Of&&typeof t[Of]=="function"&&hl)return hl(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(nx(t)){var T=[];return yf&&yf.call(t,function(R,C){T.push(f(C,t,!0)+" => "+f(R,t))}),Nf("Map",ci.call(t),T,d)}if(sx(t)){var E=[];return vf&&vf.call(t,function(R){E.push(f(R,t))}),Nf("Set",ui.call(t),E,d)}if(rx(t))return ml("WeakMap");if(ix(t))return ml("WeakSet");if(ox(t))return ml("WeakRef");if(Xw(t))return Jo(f(Number(t)));if(Jw(t))return Jo(f(ul.call(t)));if(Qw(t))return Jo(jw.call(t));if(Zw(t))return Jo(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Xd<"u"&&t===Xd)return"{ [object globalThis] }";if(!qw(t)&&!_f(t)){var k=di(t,f),A=Cf?Cf(t)===Object.prototype:t instanceof Object||t.constructor===Object,D=t instanceof Object?"":"null prototype",O=!A&&Ot&&Object(t)===t&&Ot in t?cl.call(Hn(t),8,-1):D?"Object":"",V=A||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",F=V+(O||D?"["+cn.call(Tf.call([],O||[],D||[]),": ")+"] ":"");return k.length===0?F+"{}":d?F+"{"+gl(k,d)+"}":F+"{ "+cn.call(k,", ")+" }"}return String(t)};function If(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Yw(e){return zn.call(String(e),/"/g,"&quot;")}function pl(e){return Hn(e)==="[object Array]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function qw(e){return Hn(e)==="[object Date]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function _f(e){return Hn(e)==="[object RegExp]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Kw(e){return Hn(e)==="[object Error]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Zw(e){return Hn(e)==="[object String]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Xw(e){return Hn(e)==="[object Number]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Qw(e){return Hn(e)==="[object Boolean]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Af(e){if(Xr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!fl)return!1;try{return fl.call(e),!0}catch{}return!1}function Jw(e){if(!e||typeof e!="object"||!ul)return!1;try{return ul.call(e),!0}catch{}return!1}var ex=Object.prototype.hasOwnProperty||function(e){return e in this};function Wn(e,t){return ex.call(e,t)}function Hn(e){return Bw.call(e)}function tx(e){if(e.name)return e.name;var t=Ww.call(zw.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Df(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function nx(e){if(!ci||!e||typeof e!="object")return!1;try{ci.call(e);try{ui.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function rx(e){if(!Xo||!e||typeof e!="object")return!1;try{Xo.call(e,Xo);try{Qo.call(e,Qo)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function ox(e){if(!bf||!e||typeof e!="object")return!1;try{return bf.call(e),!0}catch{}return!1}function sx(e){if(!ui||!e||typeof e!="object")return!1;try{ui.call(e);try{ci.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function ix(e){if(!Qo||!e||typeof e!="object")return!1;try{Qo.call(e,Qo);try{Xo.call(e,Xo)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function ax(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Mf(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Mf(cl.call(e,0,t.maxStringLength),t)+r}var o=zn.call(zn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lx);return If(o,"single",t)}function lx(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+Hw.call(t.toString(16))}function Jo(e){return"Object("+e+")"}function ml(e){return e+" { ? }"}function Nf(e,t,n,r){var o=r?gl(n,r):cn.call(n,", ");return e+" ("+t+") {"+o+"}"}function cx(e){for(var t=0;t<e.length;t++)if(Df(e[t],`
2
- `)>=0)return!1;return!0}function ux(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=cn.call(Array(e.indent+1)," ");else return null;return{base:n,prev:cn.call(Array(t+1),n)}}function gl(e,t){if(e.length===0)return"";var n=`
1
+ (function(ee,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],b):(ee=typeof globalThis<"u"?globalThis:ee||self,b(ee.components={},ee.React,ee["react/jsx-runtime"],ee.ReactDOM))})(this,function(ee,b,x,Zd){"use strict";var BL=Object.defineProperty;var zL=(ee,b,x)=>b in ee?BL(ee,b,{enumerable:!0,configurable:!0,writable:!0,value:x}):ee[b]=x;var ie=(ee,b,x)=>zL(ee,typeof b!="symbol"?b+"":b,x);function Xd(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const A=Xd(b),Qd=Xd(Zd);function Jd(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=Jd(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function $0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Jd(e))&&(r&&(r+=" "),r+=t);return r}const ef=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,tf=$0,as=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return tf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const f=ef(u)||ef(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[m,g]=p;return Array.isArray(g)?g.includes({...i,...a}[m]):{...i,...a}[m]===g})?[...c,d,f]:c},[]);return tf(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};function nf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=nf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function R0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=nf(e))&&(r&&(r+=" "),r+=t);return r}var rf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function j0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function B0(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var z0=Error,W0=EvalError,H0=RangeError,U0=ReferenceError,of=SyntaxError,Zo=TypeError,G0=URIError,Y0=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0},sf=typeof Symbol<"u"&&Symbol,q0=Y0,K0=function(){return typeof sf!="function"||typeof Symbol!="function"||typeof sf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:q0()},tl={__proto__:null,foo:{}},Z0=Object,X0=function(){return{__proto__:tl}.foo===tl.foo&&!(tl instanceof Z0)},Q0="Function.prototype.bind called on incompatible ",J0=Object.prototype.toString,ew=Math.max,tw="[object Function]",af=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var i=0;i<n.length;i+=1)r[i+t.length]=n[i];return r},nw=function(t,n){for(var r=[],o=n,i=0;o<t.length;o+=1,i+=1)r[i]=t[o];return r},rw=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},ow=function(t){var n=this;if(typeof n!="function"||J0.apply(n)!==tw)throw new TypeError(Q0+n);for(var r=nw(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,af(r,arguments));return Object(u)===u?u:this}return n.apply(t,af(r,arguments))},s=ew(0,n.length-r.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(o=Function("binder","return function ("+rw(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},iw=ow,nl=Function.prototype.bind||iw,sw=Function.prototype.call,aw=Object.prototype.hasOwnProperty,lw=nl,cw=lw.call(sw,aw),Te,uw=z0,dw=W0,fw=H0,hw=U0,Yr=of,qr=Zo,pw=G0,lf=Function,rl=function(e){try{return lf('"use strict"; return ('+e+").constructor;")()}catch{}},yr=Object.getOwnPropertyDescriptor;if(yr)try{yr({},"")}catch{yr=null}var ol=function(){throw new qr},mw=yr?function(){try{return arguments.callee,ol}catch{try{return yr(arguments,"callee").get}catch{return ol}}}():ol,Kr=K0(),gw=X0(),yt=Object.getPrototypeOf||(gw?function(e){return e.__proto__}:null),Zr={},yw=typeof Uint8Array>"u"||!yt?Te:yt(Uint8Array),vr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Te:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Te:ArrayBuffer,"%ArrayIteratorPrototype%":Kr&&yt?yt([][Symbol.iterator]()):Te,"%AsyncFromSyncIteratorPrototype%":Te,"%AsyncFunction%":Zr,"%AsyncGenerator%":Zr,"%AsyncGeneratorFunction%":Zr,"%AsyncIteratorPrototype%":Zr,"%Atomics%":typeof Atomics>"u"?Te:Atomics,"%BigInt%":typeof BigInt>"u"?Te:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Te:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Te:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Te:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":uw,"%eval%":eval,"%EvalError%":dw,"%Float32Array%":typeof Float32Array>"u"?Te:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Te:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Te:FinalizationRegistry,"%Function%":lf,"%GeneratorFunction%":Zr,"%Int8Array%":typeof Int8Array>"u"?Te:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Te:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Te:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Kr&&yt?yt(yt([][Symbol.iterator]())):Te,"%JSON%":typeof JSON=="object"?JSON:Te,"%Map%":typeof Map>"u"?Te:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Kr||!yt?Te:yt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Te:Promise,"%Proxy%":typeof Proxy>"u"?Te:Proxy,"%RangeError%":fw,"%ReferenceError%":hw,"%Reflect%":typeof Reflect>"u"?Te:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Te:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Kr||!yt?Te:yt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Te:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Kr&&yt?yt(""[Symbol.iterator]()):Te,"%Symbol%":Kr?Symbol:Te,"%SyntaxError%":Yr,"%ThrowTypeError%":mw,"%TypedArray%":yw,"%TypeError%":qr,"%Uint8Array%":typeof Uint8Array>"u"?Te:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Te:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Te:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Te:Uint32Array,"%URIError%":pw,"%WeakMap%":typeof WeakMap>"u"?Te:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Te:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Te:WeakSet};if(yt)try{null.error}catch(e){var vw=yt(yt(e));vr["%Error.prototype%"]=vw}var bw=function e(t){var n;if(t==="%AsyncFunction%")n=rl("async function () {}");else if(t==="%GeneratorFunction%")n=rl("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=rl("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&yt&&(n=yt(o.prototype))}return vr[t]=n,n},cf={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Xo=nl,ls=cw,ww=Xo.call(Function.call,Array.prototype.concat),xw=Xo.call(Function.apply,Array.prototype.splice),uf=Xo.call(Function.call,String.prototype.replace),cs=Xo.call(Function.call,String.prototype.slice),Tw=Xo.call(Function.call,RegExp.prototype.exec),Sw=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ew=/\\(\\)?/g,Cw=function(t){var n=cs(t,0,1),r=cs(t,-1);if(n==="%"&&r!=="%")throw new Yr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Yr("invalid intrinsic syntax, expected opening `%`");var o=[];return uf(t,Sw,function(i,s,a,l){o[o.length]=a?uf(l,Ew,"$1"):s||i}),o},Pw=function(t,n){var r=t,o;if(ls(cf,r)&&(o=cf[r],r="%"+o[0]+"%"),ls(vr,r)){var i=vr[r];if(i===Zr&&(i=bw(r)),typeof i>"u"&&!n)throw new qr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Yr("intrinsic "+t+" does not exist!")},Xr=function(t,n){if(typeof t!="string"||t.length===0)throw new qr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new qr('"allowMissing" argument must be a boolean');if(Tw(/^%?[^%]*%?$/,t)===null)throw new Yr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Cw(t),o=r.length>0?r[0]:"",i=Pw("%"+o+"%",n),s=i.name,a=i.value,l=!1,c=i.alias;c&&(o=c[0],xw(r,ww([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=cs(f,0,1),p=cs(f,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new Yr("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,s="%"+o+"%",ls(vr,s))a=vr[s];else if(a!=null){if(!(f in a)){if(!n)throw new qr("base intrinsic for "+t+" exists, but the property is not available.");return}if(yr&&u+1>=r.length){var m=yr(a,f);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else d=ls(a,f),a=a[f];d&&!l&&(vr[s]=a)}}return a},df={exports:{}},il,ff;function sl(){if(ff)return il;ff=1;var e=Xr,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return il=t,il}var kw=Xr,us=kw("%Object.getOwnPropertyDescriptor%",!0);if(us)try{us([],"length")}catch{us=null}var hf=us,pf=sl(),Ow=of,Qr=Zo,mf=hf,Iw=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Qr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Qr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Qr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Qr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Qr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Qr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!mf&&mf(t,n);if(pf)pf(t,n,{configurable:s===null&&l?l.configurable:!s,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:i===null&&l?l.writable:!i});else if(a||!o&&!i&&!s)t[n]=r;else throw new Ow("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},al=sl(),gf=function(){return!!al};gf.hasArrayLengthDefineBug=function(){if(!al)return null;try{return al([],"length",{value:1}).length!==1}catch{return!0}};var Aw=gf,_w=Xr,yf=Iw,Dw=Aw(),vf=hf,bf=Zo,Mw=_w("%Math.floor%"),Nw=function(t,n){if(typeof t!="function")throw new bf("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Mw(n)!==n)throw new bf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in t&&vf){var s=vf(t,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!r)&&(Dw?yf(t,"length",n,!0,!0):yf(t,"length",n)),t};(function(e){var t=nl,n=Xr,r=Nw,o=Zo,i=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(s,i),l=sl(),c=n("%Math.max%");e.exports=function(f){if(typeof f!="function")throw new o("a function is required");var h=a(t,s,arguments);return r(h,1+c(0,f.length-(arguments.length-1)),!0)};var u=function(){return a(t,i,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(df);var Fw=df.exports,wf=Xr,xf=Fw,Lw=xf(wf("String.prototype.indexOf")),Vw=function(t,n){var r=wf(t,!!n);return typeof r=="function"&&Lw(t,".prototype.")>-1?xf(r):r};const $w=B0(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ll=typeof Map=="function"&&Map.prototype,cl=Object.getOwnPropertyDescriptor&&ll?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ds=ll&&cl&&typeof cl.get=="function"?cl.get:null,Tf=ll&&Map.prototype.forEach,ul=typeof Set=="function"&&Set.prototype,dl=Object.getOwnPropertyDescriptor&&ul?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,fs=ul&&dl&&typeof dl.get=="function"?dl.get:null,Sf=ul&&Set.prototype.forEach,Rw=typeof WeakMap=="function"&&WeakMap.prototype,Qo=Rw?WeakMap.prototype.has:null,jw=typeof WeakSet=="function"&&WeakSet.prototype,Jo=jw?WeakSet.prototype.has:null,Bw=typeof WeakRef=="function"&&WeakRef.prototype,Ef=Bw?WeakRef.prototype.deref:null,zw=Boolean.prototype.valueOf,Ww=Object.prototype.toString,Hw=Function.prototype.toString,Uw=String.prototype.match,fl=String.prototype.slice,zn=String.prototype.replace,Gw=String.prototype.toUpperCase,Cf=String.prototype.toLowerCase,Pf=RegExp.prototype.test,kf=Array.prototype.concat,cn=Array.prototype.join,Yw=Array.prototype.slice,Of=Math.floor,hl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,pl=Object.getOwnPropertySymbols,ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Jr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ot=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Jr||!0)?Symbol.toStringTag:null,If=Object.prototype.propertyIsEnumerable,Af=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function _f(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Pf.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Of(-e):Of(e);if(r!==e){var o=String(r),i=fl.call(t,o.length+1);return zn.call(o,n,"$&_")+"."+zn.call(zn.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return zn.call(t,n,"$&_")}var gl=$w,Df=gl.custom,Mf=Lf(Df)?Df:null,qw=function e(t,n,r,o){var i=n||{};if(Wn(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Wn(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Wn(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Wn(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Wn(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return $f(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?_f(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?_f(t,c):c}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return yl(t)?"[Array]":"[Object]";var d=fx(i,r);if(typeof o>"u")o=[];else if(Vf(o,t)>=0)return"[Circular]";function f($,C,I){if(C&&(o=Yw.call(o),o.push(C)),I){var M={depth:i.depth};return Wn(i,"quoteStyle")&&(M.quoteStyle=i.quoteStyle),e($,M,r+1,o)}return e($,i,r+1,o)}if(typeof t=="function"&&!Ff(t)){var h=rx(t),p=hs(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+cn.call(p,", ")+" }":"")}if(Lf(t)){var m=Jr?zn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):ml.call(t);return typeof t=="object"&&!Jr?ei(m):m}if(cx(t)){for(var g="<"+Cf.call(String(t.nodeName)),v=t.attributes||[],w=0;w<v.length;w++)g+=" "+v[w].name+"="+Nf(Kw(v[w].value),"double",i);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+Cf.call(String(t.nodeName))+">",g}if(yl(t)){if(t.length===0)return"[]";var y=hs(t,f);return d&&!dx(y)?"["+bl(y,d)+"]":"[ "+cn.call(y,", ")+" ]"}if(Xw(t)){var S=hs(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!If.call(t,"cause")?"{ ["+String(t)+"] "+cn.call(kf.call("[cause]: "+f(t.cause),S),", ")+" }":S.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+cn.call(S,", ")+" }"}if(typeof t=="object"&&s){if(Mf&&typeof t[Mf]=="function"&&gl)return gl(t,{depth:u-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(ox(t)){var T=[];return Tf&&Tf.call(t,function($,C){T.push(f(C,t,!0)+" => "+f($,t))}),Rf("Map",ds.call(t),T,d)}if(ax(t)){var E=[];return Sf&&Sf.call(t,function($){E.push(f($,t))}),Rf("Set",fs.call(t),E,d)}if(ix(t))return vl("WeakMap");if(lx(t))return vl("WeakSet");if(sx(t))return vl("WeakRef");if(Jw(t))return ei(f(Number(t)));if(tx(t))return ei(f(hl.call(t)));if(ex(t))return ei(zw.call(t));if(Qw(t))return ei(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof rf<"u"&&t===rf)return"{ [object globalThis] }";if(!Zw(t)&&!Ff(t)){var P=hs(t,f),D=Af?Af(t)===Object.prototype:t instanceof Object||t.constructor===Object,_=t instanceof Object?"":"null prototype",O=!D&&Ot&&Object(t)===t&&Ot in t?fl.call(Hn(t),8,-1):_?"Object":"",V=D||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",F=V+(O||_?"["+cn.call(kf.call([],O||[],_||[]),": ")+"] ":"");return P.length===0?F+"{}":d?F+"{"+bl(P,d)+"}":F+"{ "+cn.call(P,", ")+" }"}return String(t)};function Nf(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Kw(e){return zn.call(String(e),/"/g,"&quot;")}function yl(e){return Hn(e)==="[object Array]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Zw(e){return Hn(e)==="[object Date]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Ff(e){return Hn(e)==="[object RegExp]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Xw(e){return Hn(e)==="[object Error]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Qw(e){return Hn(e)==="[object String]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Jw(e){return Hn(e)==="[object Number]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function ex(e){return Hn(e)==="[object Boolean]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Lf(e){if(Jr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!ml)return!1;try{return ml.call(e),!0}catch{}return!1}function tx(e){if(!e||typeof e!="object"||!hl)return!1;try{return hl.call(e),!0}catch{}return!1}var nx=Object.prototype.hasOwnProperty||function(e){return e in this};function Wn(e,t){return nx.call(e,t)}function Hn(e){return Ww.call(e)}function rx(e){if(e.name)return e.name;var t=Uw.call(Hw.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Vf(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function ox(e){if(!ds||!e||typeof e!="object")return!1;try{ds.call(e);try{fs.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function ix(e){if(!Qo||!e||typeof e!="object")return!1;try{Qo.call(e,Qo);try{Jo.call(e,Jo)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function sx(e){if(!Ef||!e||typeof e!="object")return!1;try{return Ef.call(e),!0}catch{}return!1}function ax(e){if(!fs||!e||typeof e!="object")return!1;try{fs.call(e);try{ds.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function lx(e){if(!Jo||!e||typeof e!="object")return!1;try{Jo.call(e,Jo);try{Qo.call(e,Qo)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function cx(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function $f(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return $f(fl.call(e,0,t.maxStringLength),t)+r}var o=zn.call(zn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ux);return Nf(o,"single",t)}function ux(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+Gw.call(t.toString(16))}function ei(e){return"Object("+e+")"}function vl(e){return e+" { ? }"}function Rf(e,t,n,r){var o=r?bl(n,r):cn.call(n,", ");return e+" ("+t+") {"+o+"}"}function dx(e){for(var t=0;t<e.length;t++)if(Vf(e[t],`
2
+ `)>=0)return!1;return!0}function fx(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=cn.call(Array(e.indent+1)," ");else return null;return{base:n,prev:cn.call(Array(t+1),n)}}function bl(e,t){if(e.length===0)return"";var n=`
3
3
  `+t.prev+t.base;return n+cn.call(e,","+n)+`
4
- `+t.prev}function di(e,t){var n=pl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Wn(e,o)?t(e[o],e):""}var s=typeof dl=="function"?dl(e):[],i;if(Xr){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)Wn(e,l)&&(n&&String(Number(l))===l&&l<e.length||Xr&&i["$"+l]instanceof Symbol||(xf.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof dl=="function")for(var c=0;c<s.length;c++)Ef.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var Ff=Kr,Qr=Fw,dx=Gw,fx=Ko,fi=Ff("%WeakMap%",!0),hi=Ff("%Map%",!0),hx=Qr("WeakMap.prototype.get",!0),px=Qr("WeakMap.prototype.set",!0),mx=Qr("WeakMap.prototype.has",!0),gx=Qr("Map.prototype.get",!0),yx=Qr("Map.prototype.set",!0),vx=Qr("Map.prototype.has",!0),yl=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},bx=function(e,t){var n=yl(e,t);return n&&n.value},wx=function(e,t,n){var r=yl(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},xx=function(e,t){return!!yl(e,t)},Tx=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new fx("Side channel does not contain "+dx(s))},get:function(s){if(fi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return hx(t,s)}else if(hi){if(n)return gx(n,s)}else if(r)return bx(r,s)},has:function(s){if(fi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return mx(t,s)}else if(hi){if(n)return vx(n,s)}else if(r)return xx(r,s);return!1},set:function(s,i){fi&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new fi),px(t,s,i)):hi?(n||(n=new hi),yx(n,s,i)):(r||(r={key:{},next:null}),wx(r,s,i))}};return o},Sx=String.prototype.replace,Ex=/%20/g,vl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Lf={default:vl.RFC3986,formatters:{RFC1738:function(e){return Sx.call(e,Ex,"+")},RFC3986:function(e){return String(e)}},RFC1738:vl.RFC1738,RFC3986:vl.RFC3986},Cx=Lf,bl=Object.prototype.hasOwnProperty,wr=Array.isArray,un=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Px=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(wr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Vf=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},kx=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(wr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!bl.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return wr(t)&&!wr(n)&&(o=Vf(t,r)),wr(t)&&wr(n)?(n.forEach(function(s,i){if(bl.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return bl.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},Ox=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},Ix=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},_x=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;++l){var c=i.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||s===Cx.RFC1738&&(c===40||c===41)){a+=i.charAt(l);continue}if(c<128){a=a+un[c];continue}if(c<2048){a=a+(un[192|c>>6]+un[128|c&63]);continue}if(c<55296||c>=57344){a=a+(un[224|c>>12]+un[128|c>>6&63]+un[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|i.charCodeAt(l)&1023),a+=un[240|c>>18]+un[128|c>>12&63]+un[128|c>>6&63]+un[128|c&63]}return a},Ax=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return Px(n),t},Dx=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Mx=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Nx=function(t,n){return[].concat(t,n)},Fx=function(t,n){if(wr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},$f={arrayToObject:Vf,assign:Ox,combine:Nx,compact:Ax,decode:Ix,encode:_x,isBuffer:Mx,isRegExp:Dx,maybeMap:Fx,merge:kx},Lx=$f,Rf=Lf,Vx=Date.prototype.toISOString,jf=Rf.default;Lx.encode,Rf.formatters[jf];var $x=$f;$x.decode;var Bf=e=>Array.isArray(e),wl=e=>e===void 0,xl=e=>e===null,Rx=Function.bind.call(Function.call,Object.prototype.toString),jx=e=>!!e&&Rx(e)==="[object Error]"||e instanceof Error,zf=(e,t)=>e instanceof t,Bx=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},zx=e=>Object.prototype.toString.call(e)==="[object Date]"&&zf(e,Date),Pn={array:Bf,date:zx,empty:e=>xl(e)||wl(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:zf,isError:jx,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>xl(e)||wl(e),null:xl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Bf(e)&&typeof e=="object",primitive:Bx,string:e=>typeof e=="string",undefined:wl},Tl=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const s=`${+o[0]}`===o[0];e[r]=s?[]:{}}if(typeof e[r]!="object"){const s=`${+o[0]}`===o[0];e[r]=Tl(s?[]:{},o,n)}else e[r]=Tl(e[r],o,n)}else e[r]=n;return e},Wx=e=>Object.keys(e),Hx=e=>e.replace("[",".").replace("]","").split("."),Wf=(e,t,n)=>{const r=Array.isArray(t)?t:Hx(t),o=structuredClone(e);return Tl(o,r,n),o};const Sl="-";function Ux(e){const t=Yx(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(Sl);return a[0]===""&&a.length!==1&&a.shift(),Hf(a,t)||Gx(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Hf(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Hf(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Sl);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Uf=/^\[(.+)\]$/;function Gx(e){if(Uf.test(e)){const t=Uf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Yx(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Kx(Object.entries(e.classGroups),n).forEach(([s,i])=>{El(i,r,s,t)}),r}function El(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Gf(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(qx(o)){El(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{El(i,Gf(t,s),n,r)})})}function Gf(e,t){let n=e;return t.split(Sl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function qx(e){return e.isThemeGetter}function Kx(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 Zx(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 Yf="!";function Xx(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let c=0,u=0,d;for(let y=0;y<a.length;y++){let v=a[y];if(c===0){if(v===o&&(r||a.slice(y,y+s)===t)){l.push(a.slice(u,y)),u=y+s;continue}if(v==="/"){d=y;continue}}v==="["?c++:v==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(Yf),p=h?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function Qx(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 Jx(e){return{cache:Zx(e.cacheSize),parseClassName:Xx(e),...Ux(e)}}const e1=/\s+/;function t1(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(e1).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=Qx(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Yf: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 n1(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=qf(t))&&(r&&(r+=" "),r+=n);return r}function qf(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=qf(e[r]))&&(n&&(n+=" "),n+=t);return n}function r1(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=Jx(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=t1(l,n);return o(l,u),u}return function(){return s(n1.apply(null,arguments))}}function Ue(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Kf=/^\[(?:([a-z-]+):)?(.+)\]$/i,o1=/^\d+\/\d+$/,s1=new Set(["px","full","screen"]),i1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,a1=/\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$/,l1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,c1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,u1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function kn(e){return xr(e)||s1.has(e)||o1.test(e)}function Un(e){return Jr(e,"length",v1)}function xr(e){return!!e&&!Number.isNaN(Number(e))}function pi(e){return Jr(e,"number",xr)}function es(e){return!!e&&Number.isInteger(Number(e))}function d1(e){return e.endsWith("%")&&xr(e.slice(0,-1))}function ve(e){return Kf.test(e)}function Gn(e){return i1.test(e)}const f1=new Set(["length","size","percentage"]);function h1(e){return Jr(e,f1,Zf)}function p1(e){return Jr(e,"position",Zf)}const m1=new Set(["image","url"]);function g1(e){return Jr(e,m1,w1)}function y1(e){return Jr(e,"",b1)}function ts(){return!0}function Jr(e,t,n){const r=Kf.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function v1(e){return a1.test(e)&&!l1.test(e)}function Zf(){return!1}function b1(e){return c1.test(e)}function w1(e){return u1.test(e)}function x1(){const e=Ue("colors"),t=Ue("spacing"),n=Ue("blur"),r=Ue("brightness"),o=Ue("borderColor"),s=Ue("borderRadius"),i=Ue("borderSpacing"),a=Ue("borderWidth"),l=Ue("contrast"),c=Ue("grayscale"),u=Ue("hueRotate"),d=Ue("invert"),f=Ue("gap"),h=Ue("gradientColorStops"),p=Ue("gradientColorStopPositions"),m=Ue("inset"),y=Ue("margin"),v=Ue("opacity"),w=Ue("padding"),g=Ue("saturate"),S=Ue("scale"),T=Ue("sepia"),E=Ue("skew"),k=Ue("space"),A=Ue("translate"),D=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",ve,t],F=()=>[ve,t],R=()=>["",kn,Un],C=()=>["auto",xr,ve],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],G=()=>["","0",ve],P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[xr,pi],Z=()=>[xr,ve];return{cacheSize:500,separator:":",theme:{colors:[ts],spacing:[kn,Un],blur:["none","",Gn,ve],brightness:j(),borderColor:[e],borderRadius:["none","","full",Gn,ve],borderSpacing:F(),borderWidth:R(),contrast:j(),grayscale:G(),hueRotate:Z(),invert:G(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[d1,Un],inset:V(),margin:V(),opacity:j(),padding:F(),saturate:j(),scale:j(),sepia:G(),skew:Z(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[Gn]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...I(),ve]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",es,ve]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:G()}],shrink:[{shrink:G()}],order:[{order:["first","last","none",es,ve]}],"grid-cols":[{"grid-cols":[ts]}],"col-start-end":[{col:["auto",{span:["full",es,ve]},ve]}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":[ts]}],"row-start-end":[{row:["auto",{span:[es,ve]},ve]}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ve,t]}],"min-w":[{"min-w":[ve,t,"min","max","fit"]}],"max-w":[{"max-w":[ve,t,"none","full","min","max","fit","prose",{screen:[Gn]},Gn]}],h:[{h:[ve,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Gn,Un]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pi]}],"font-family":[{font:[ts]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ve]}],"line-clamp":[{"line-clamp":["none",xr,pi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",kn,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",kn,Un]}],"underline-offset":[{"underline-offset":["auto",kn,ve]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),p1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",h1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},g1]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...M(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:M()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...M()]}],"outline-offset":[{"outline-offset":[kn,ve]}],"outline-w":[{outline:[kn,Un]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[kn,Un]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Gn,y1]}],"shadow-color":[{shadow:[ts]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...L(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":L()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Gn,ve]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[g]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[es,ve]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ve]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[kn,Un,pi]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const T1=r1(x1),Cl=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},S1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),E1=e=>Pn.function(e),pt=(...e)=>T1($0(e)),Pl=(e,t)=>{var r;if(!e)return;if([window.HTMLInputElement,window.HTMLSelectElement,window.HTMLTextAreaElement].indexOf(e.__proto__.constructor)>-1){const o=(r=Object.getOwnPropertyDescriptor(e.__proto__,"value"))==null?void 0:r.set,s=new Event("input",{bubbles:!0});return o==null||o.call(e,t),e.dispatchEvent(s),s}},eo=b.forwardRef(function({as:t,...n},r){const o=t||"span";return x.jsx(o,{...n,ref:r})}),C1=si("inline-flex duration-700 enabled:hover:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-10 p-2 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-md",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",main:"bg-primary text-primary-foreground",warn:"bg-warn text-warn-foreground",danger:"bg-danger text-danger-foreground",secondary:"bg-secondary-background text-secondary-foreground disabled:text-secondary-subtle",success:"bg-success text-success-foreground",info:"bg-info text-info-foreground"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),ns=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:s="button",size:i,rounded:a,...l},c){const u=r||l.disabled;return x.jsxs(eo,{...l,ref:c,type:s,"data-theme":o,"data-loading":r,disabled:u,"aria-busy":u||r,as:l.as??"button",onClick:u?void 0:l.onClick,className:pt(C1({size:i,rounded:a,theme:o}),t),children:[l.children,n]})}),P1=e=>x.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:e.buttons.map(t=>x.jsx("li",{className:"flex flex-1",children:x.jsx("button",{...t,type:t.type||"button","data-active":e.active===t.name?"true":"false",className:pt("flex flex-1 items-center gap-1.5 rounded-sm border-r-2 px-4 py-2 last:border-r-0","cursor-pointer justify-center whitespace-nowrap align-middle font-medium","focus-visible:ring-ring shadow-sm focus-visible:outline-none focus-visible:ring-2 disabled:text-opacity-80","data-[active=true]:bg-main-bg text-body data-[active=true]:text-main transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50")})},`button-group-${t.name}`))}),k1=si("inline-flex rounded-pill gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{raw:"",main:"bg-primary-subtle text-primary-hover",warn:"bg-warn-subtle text-warn-hover",danger:"bg-danger-subtle text-danger-hover",secondary:"bg-secondary-background text-secondary-foreground",success:"bg-success-subtle text-success-hover",info:"bg-info-subtle text-info-hover",loading:"animate-pulse bg-disabled duration-700 opacity-70",disabled:"bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"main",size:"default"}}),O1=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,size:s,...i},a){return x.jsxs(eo,{...i,ref:a,"data-theme":o,as:i.as??"span",className:pt(k1({size:s,theme:o}),t),children:[i.children,n]})});/**
4
+ `+t.prev}function hs(e,t){var n=yl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Wn(e,o)?t(e[o],e):""}var i=typeof pl=="function"?pl(e):[],s;if(Jr){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in e)Wn(e,l)&&(n&&String(Number(l))===l&&l<e.length||Jr&&s["$"+l]instanceof Symbol||(Pf.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof pl=="function")for(var c=0;c<i.length;c++)If.call(e,i[c])&&r.push("["+t(i[c])+"]: "+t(e[i[c]],e));return r}var jf=Xr,eo=Vw,hx=qw,px=Zo,ps=jf("%WeakMap%",!0),ms=jf("%Map%",!0),mx=eo("WeakMap.prototype.get",!0),gx=eo("WeakMap.prototype.set",!0),yx=eo("WeakMap.prototype.has",!0),vx=eo("Map.prototype.get",!0),bx=eo("Map.prototype.set",!0),wx=eo("Map.prototype.has",!0),wl=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},xx=function(e,t){var n=wl(e,t);return n&&n.value},Tx=function(e,t,n){var r=wl(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Sx=function(e,t){return!!wl(e,t)},Ex=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new px("Side channel does not contain "+hx(i))},get:function(i){if(ps&&i&&(typeof i=="object"||typeof i=="function")){if(t)return mx(t,i)}else if(ms){if(n)return vx(n,i)}else if(r)return xx(r,i)},has:function(i){if(ps&&i&&(typeof i=="object"||typeof i=="function")){if(t)return yx(t,i)}else if(ms){if(n)return wx(n,i)}else if(r)return Sx(r,i);return!1},set:function(i,s){ps&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new ps),gx(t,i,s)):ms?(n||(n=new ms),bx(n,i,s)):(r||(r={key:{},next:null}),Tx(r,i,s))}};return o},Cx=String.prototype.replace,Px=/%20/g,xl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Bf={default:xl.RFC3986,formatters:{RFC1738:function(e){return Cx.call(e,Px,"+")},RFC3986:function(e){return String(e)}},RFC1738:xl.RFC1738,RFC3986:xl.RFC3986},kx=Bf,Tl=Object.prototype.hasOwnProperty,br=Array.isArray,un=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Ox=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(br(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},zf=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},Ix=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(br(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Tl.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return br(t)&&!br(n)&&(o=zf(t,r)),br(t)&&br(n)?(n.forEach(function(i,s){if(Tl.call(t,s)){var a=t[s];a&&typeof a=="object"&&i&&typeof i=="object"?t[s]=e(a,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var a=n[s];return Tl.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},Ax=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},_x=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Dx=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;++l){var c=s.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===kx.RFC1738&&(c===40||c===41)){a+=s.charAt(l);continue}if(c<128){a=a+un[c];continue}if(c<2048){a=a+(un[192|c>>6]+un[128|c&63]);continue}if(c<55296||c>=57344){a=a+(un[224|c>>12]+un[128|c>>6&63]+un[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|s.charCodeAt(l)&1023),a+=un[240|c>>18]+un[128|c>>12&63]+un[128|c>>6&63]+un[128|c&63]}return a},Mx=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return Ox(n),t},Nx=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Fx=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Lx=function(t,n){return[].concat(t,n)},Vx=function(t,n){if(br(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Wf={arrayToObject:zf,assign:Ax,combine:Lx,compact:Mx,decode:_x,encode:Dx,isBuffer:Fx,isRegExp:Nx,maybeMap:Vx,merge:Ix},$x=Wf,Hf=Bf,Rx=Date.prototype.toISOString,Uf=Hf.default;$x.encode,Hf.formatters[Uf];var jx=Wf;jx.decode;var Gf=e=>Array.isArray(e),Sl=e=>e===void 0,El=e=>e===null,Bx=Function.bind.call(Function.call,Object.prototype.toString),zx=e=>!!e&&Bx(e)==="[object Error]"||e instanceof Error,Yf=(e,t)=>e instanceof t,Wx=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Hx=e=>Object.prototype.toString.call(e)==="[object Date]"&&Yf(e,Date),Pn={array:Gf,date:Hx,empty:e=>El(e)||Sl(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:Yf,isError:zx,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>El(e)||Sl(e),null:El,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Gf(e)&&typeof e=="object",primitive:Wx,string:e=>typeof e=="string",undefined:Sl},Cl=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const i=`${+o[0]}`===o[0];e[r]=i?[]:{}}if(typeof e[r]!="object"){const i=`${+o[0]}`===o[0];e[r]=Cl(i?[]:{},o,n)}else e[r]=Cl(e[r],o,n)}else e[r]=n;return e},Ux=e=>Object.keys(e),Gx=e=>e.replace("[",".").replace("]","").split("."),qf=(e,t,n)=>{const r=Array.isArray(t)?t:Gx(t),o=structuredClone(e);return Cl(o,r,n),o};const Pl="-";function Yx(e){const t=Kx(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(s){const a=s.split(Pl);return a[0]===""&&a.length!==1&&a.shift(),Kf(a,t)||qx(s)}function i(s,a){const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function Kf(e,t){var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Kf(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Pl);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const Zf=/^\[(.+)\]$/;function qx(e){if(Zf.test(e)){const t=Zf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Kx(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Xx(Object.entries(e.classGroups),n).forEach(([i,s])=>{kl(s,r,i,t)}),r}function kl(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Xf(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(Zx(o)){kl(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{kl(s,Xf(t,i),n,r)})})}function Xf(e,t){let n=e;return t.split(Pl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Zx(e){return e.isThemeGetter}function Xx(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e}function Qx(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const Qf="!";function Jx(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length;function s(a){const l=[];let c=0,u=0,d;for(let g=0;g<a.length;g++){let v=a[g];if(c===0){if(v===o&&(r||a.slice(g,g+i)===t)){l.push(a.slice(u,g)),u=g+i;continue}if(v==="/"){d=g;continue}}v==="["?c++:v==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(Qf),p=h?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:s})}:s}function e1(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function t1(e){return{cache:Qx(e.cacheSize),parseClassName:Jx(e),...Yx(e)}}const n1=/\s+/;function r1(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(n1).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(s);let d=!!u,f=r(d?c.substring(0,u):c);if(!f){if(!d)return{isTailwindClass:!1,originalClassName:s};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:s};d=!1}const h=e1(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Qf:h,classGroupId:f,originalClassName:s,hasPostfixModifier:d}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=s,u=a+l;return i.has(u)?!1:(i.add(u),o(l,c).forEach(d=>i.add(a+d)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function o1(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Jf(t))&&(r&&(r+=" "),r+=n);return r}function Jf(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Jf(e[r]))&&(n&&(n+=" "),n+=t);return n}function i1(e,...t){let n,r,o,i=s;function s(l){const c=t.reduce((u,d)=>d(u),e());return n=t1(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=r1(l,n);return o(l,u),u}return function(){return i(o1.apply(null,arguments))}}function Ue(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const eh=/^\[(?:([a-z-]+):)?(.+)\]$/i,s1=/^\d+\/\d+$/,a1=new Set(["px","full","screen"]),l1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,c1=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,u1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,d1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,f1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function kn(e){return wr(e)||a1.has(e)||s1.test(e)}function Un(e){return to(e,"length",w1)}function wr(e){return!!e&&!Number.isNaN(Number(e))}function gs(e){return to(e,"number",wr)}function ti(e){return!!e&&Number.isInteger(Number(e))}function h1(e){return e.endsWith("%")&&wr(e.slice(0,-1))}function ve(e){return eh.test(e)}function Gn(e){return l1.test(e)}const p1=new Set(["length","size","percentage"]);function m1(e){return to(e,p1,th)}function g1(e){return to(e,"position",th)}const y1=new Set(["image","url"]);function v1(e){return to(e,y1,T1)}function b1(e){return to(e,"",x1)}function ni(){return!0}function to(e,t,n){const r=eh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function w1(e){return c1.test(e)&&!u1.test(e)}function th(){return!1}function x1(e){return d1.test(e)}function T1(e){return f1.test(e)}function S1(){const e=Ue("colors"),t=Ue("spacing"),n=Ue("blur"),r=Ue("brightness"),o=Ue("borderColor"),i=Ue("borderRadius"),s=Ue("borderSpacing"),a=Ue("borderWidth"),l=Ue("contrast"),c=Ue("grayscale"),u=Ue("hueRotate"),d=Ue("invert"),f=Ue("gap"),h=Ue("gradientColorStops"),p=Ue("gradientColorStopPositions"),m=Ue("inset"),g=Ue("margin"),v=Ue("opacity"),w=Ue("padding"),y=Ue("saturate"),S=Ue("scale"),T=Ue("sepia"),E=Ue("skew"),P=Ue("space"),D=Ue("translate"),_=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",ve,t],F=()=>[ve,t],$=()=>["",kn,Un],C=()=>["auto",wr,ve],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],Y=()=>["","0",ve],k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[wr,gs],Z=()=>[wr,ve];return{cacheSize:500,separator:":",theme:{colors:[ni],spacing:[kn,Un],blur:["none","",Gn,ve],brightness:R(),borderColor:[e],borderRadius:["none","","full",Gn,ve],borderSpacing:F(),borderWidth:$(),contrast:R(),grayscale:Y(),hueRotate:Z(),invert:Y(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[h1,Un],inset:V(),margin:V(),opacity:R(),padding:F(),saturate:R(),scale:R(),sepia:Y(),skew:Z(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[Gn]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...I(),ve]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ti,ve]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:Y()}],shrink:[{shrink:Y()}],order:[{order:["first","last","none",ti,ve]}],"grid-cols":[{"grid-cols":[ni]}],"col-start-end":[{col:["auto",{span:["full",ti,ve]},ve]}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":[ni]}],"row-start-end":[{row:["auto",{span:[ti,ve]},ve]}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ve,t]}],"min-w":[{"min-w":[ve,t,"min","max","fit"]}],"max-w":[{"max-w":[ve,t,"none","full","min","max","fit","prose",{screen:[Gn]},Gn]}],h:[{h:[ve,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Gn,Un]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",gs]}],"font-family":[{font:[ni]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ve]}],"line-clamp":[{"line-clamp":["none",wr,gs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",kn,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",kn,Un]}],"underline-offset":[{"underline-offset":["auto",kn,ve]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),g1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",m1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},v1]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...M(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:M()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...M()]}],"outline-offset":[{"outline-offset":[kn,ve]}],"outline-w":[{outline:[kn,Un]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[kn,Un]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Gn,b1]}],"shadow-color":[{shadow:[ni]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...L(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":L()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Gn,ve]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[ti,ve]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ve]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[kn,Un,gs]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const E1=i1(S1),Ol=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},C1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),P1=e=>Pn.function(e),Xe=(...e)=>E1(R0(e)),ys=(e,t)=>{const n=new Event("input",{bubbles:!0});return e==null||e.dispatchEvent(n),n},vs=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},no=b.forwardRef(function({as:t,...n},r){const o=t||"span";return x.jsx(o,{...n,ref:r})}),k1=as("inline-flex duration-700 enabled:hover:bg-opacity-80 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring ease-normal",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-10 p-2 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-md",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",primary:"bg-primary text-primary-foreground",main:"bg-primary text-primary-foreground",warn:"bg-warn text-warn-foreground",danger:"bg-danger text-danger-foreground",secondary:"bg-secondary-background text-secondary-foreground disabled:text-secondary-subtle",success:"bg-success text-success-foreground",info:"bg-info text-info-foreground"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),xr=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return x.jsxs(no,{...l,ref:c,type:i,"data-theme":o,"data-loading":r,disabled:u,"aria-busy":u||r,as:l.as??"button",onClick:u?void 0:l.onClick,className:Xe(k1({size:s,rounded:a,theme:o}),t),children:[l.children,n]})}),O1=e=>x.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:e.buttons.map(t=>x.jsx("li",{className:"flex flex-1",children:x.jsx("button",{...t,type:t.type||"button","data-active":e.active===t.name?"true":"false",className:Xe("flex flex-1 items-center gap-1.5 rounded-sm border-r-2 px-4 py-2 last:border-r-0","cursor-pointer justify-center whitespace-nowrap align-middle font-medium","focus-visible:ring-ring shadow-sm focus-visible:outline-none focus-visible:ring-2 disabled:text-opacity-80","data-[active=true]:bg-main-bg text-body data-[active=true]:text-main transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50")})},`button-group-${t.name}`))}),I1=as("inline-flex rounded-pill gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{raw:"",main:"bg-primary-subtle text-primary-hover",warn:"bg-warn-subtle text-warn-hover",danger:"bg-danger-subtle text-danger-hover",secondary:"bg-secondary-background text-secondary-foreground",success:"bg-success-subtle text-success-hover",info:"bg-info-subtle text-info-hover",loading:"animate-pulse bg-disabled duration-700 opacity-70",disabled:"bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"main",size:"default"}}),A1=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,size:i,...s},a){return x.jsxs(no,{...s,ref:a,"data-theme":o,as:s.as??"span",className:Xe(I1({size:i,theme:o}),t),children:[s.children,n]})}),ro=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),bs=b.createContext({}),ws=b.createContext(null),Il=typeof document<"u",xs=Il?b.useLayoutEffect:b.useEffect,nh=b.createContext({strict:!1}),Ts=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),rh="data-"+Ts("framerAppearId"),_1={skipAnimations:!1,useManualTiming:!1};function D1(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(c){i.has(c)&&(l.schedule(c),e()),c(s)}const l={schedule:(c,u=!1,d=!1)=>{const h=d&&r?t:n;return u&&i.add(c),h.has(c)||h.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(s=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const Ss=["read","resolveKeyframes","update","preRender","render","postRender"],M1=40;function oh(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Ss.reduce((v,w)=>(v[w]=D1(i),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=s,h=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,M1),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:Ss.reduce((v,w)=>{const y=s[w];return v[w]=(S,T=!1,E=!1)=>(n||p(),y.schedule(S,T,E)),v},{}),cancel:v=>{for(let w=0;w<Ss.length;w++)s[Ss[w]].cancel(v)},state:o,steps:s}}const{schedule:Al,cancel:GL}=oh(queueMicrotask,!1);function oo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const ih=b.createContext({});let sh=!1;function N1(e,t,n,r,o){const{visualElement:i}=b.useContext(bs),s=b.useContext(nh),a=b.useContext(ws),l=b.useContext(ro).reducedMotion,c=b.useRef();r=r||s.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=b.useContext(ih);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&L1(c.current,n,o,d),b.useInsertionEffect(()=>{u&&u.update(n,a)});const f=b.useRef(!!(n[rh]&&!window.HandoffComplete));return xs(()=>{u&&(u.updateFeatures(),Al.render(u.render),f.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(f.current=!1,sh||(sh=!0,queueMicrotask(F1))))}),u}function F1(){window.HandoffComplete=!0}function L1(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ah(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&oo(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function ah(e){if(e)return e.options.allowProjection!==!1?e.projection:ah(e.parent)}function V1(e,t,n){return b.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):oo(n)&&(n.current=r))},[t])}function ri(e){return typeof e=="string"||Array.isArray(e)}function oi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const _l=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Dl=["initial",..._l];function Es(e){return oi(e.animate)||Dl.some(t=>ri(e[t]))}function lh(e){return!!(Es(e)||e.variants)}function $1(e,t){if(Es(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ri(n)?n:void 0,animate:ri(r)?r:void 0}}return e.inherit!==!1?t:{}}function R1(e){const{initial:t,animate:n}=$1(e,b.useContext(bs));return b.useMemo(()=>({initial:t,animate:n}),[ch(t),ch(n)])}function ch(e){return Array.isArray(e)?e.join(" "):e}const uh={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},io={};for(const e in uh)io[e]={isEnabled:t=>uh[e].some(n=>!!t[n])};function j1(e){for(const t in e)io[t]={...io[t],...e[t]}}const ii=b.createContext({}),B1=Symbol.for("motionComponentSymbol"),wt=e=>e;let so=wt,tn=wt;process.env.NODE_ENV!=="production"&&(so=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},tn=(e,t)=>{if(!e)throw new Error(t)});function z1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&j1(e);function i(a,l){let c;const u={...b.useContext(ro),...a,layoutId:W1(a)},{isStatic:d}=u,f=R1(a),h=r(a,d);if(!d&&Il){H1(u,e);const p=U1(u);c=p.MeasureLayout,f.visualElement=N1(o,h,u,t,p.ProjectionNode)}return x.jsxs(bs.Provider,{value:f,children:[c&&f.visualElement?x.jsx(c,{visualElement:f.visualElement,...u}):null,n(o,a,V1(h,f.visualElement,l),h,d,f.visualElement)]})}const s=b.forwardRef(i);return s[B1]=o,s}function W1({layoutId:e}){const t=b.useContext(ii).id;return t&&e!==void 0?t+"-"+e:e}function H1(e,t){const n=b.useContext(nh).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?so(!1,r):tn(!1,r)}}function U1(e){const{drag:t,layout:n}=io;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function G1(e){function t(r,o={}){return z1(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const Y1=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ml(e){return typeof e!="string"||e.includes("-")?!1:!!(Y1.indexOf(e)>-1||/[A-Z]/u.test(e))}const Cs={};function q1(e){Object.assign(Cs,e)}const si=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Yn=new Set(si);function dh(e,{layout:t,layoutId:n}){return Yn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Cs[e]||e==="opacity")}const xt=e=>!!(e&&e.getVelocity),K1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Z1=si.length;function X1(e,t,n){let r="";for(let o=0;o<Z1;o++){const i=si[o];if(e[i]!==void 0){const s=K1[i]||i;r+=`${s}(${e[i]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const fh=e=>t=>typeof t=="string"&&t.startsWith(e),hh=fh("--"),Q1=fh("var(--"),Nl=e=>Q1(e)?J1.test(e.split("/*")[0].trim()):!1,J1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,eT=(e,t)=>t&&typeof e=="number"?t.transform(e):e,qn=(e,t,n)=>n>t?t:n<e?e:n,ao={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ai={...ao,transform:e=>qn(0,1,e)},Ps={...ao,default:1},li=e=>Math.round(e*1e5)/1e5,Fl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,tT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,nT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ci(e){return typeof e=="string"}function rT(e){return e==null}const ui=e=>({test:t=>ci(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kn=ui("deg"),dn=ui("%"),fe=ui("px"),oT=ui("vh"),iT=ui("vw"),ph={...dn,parse:e=>dn.parse(e)/100,transform:e=>dn.transform(e*100)},mh={...ao,transform:Math.round},gh={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,size:fe,top:fe,right:fe,bottom:fe,left:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,rotate:Kn,rotateX:Kn,rotateY:Kn,rotateZ:Kn,scale:Ps,scaleX:Ps,scaleY:Ps,scaleZ:Ps,skew:Kn,skewX:Kn,skewY:Kn,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:ai,originX:ph,originY:ph,originZ:fe,zIndex:mh,backgroundPositionX:fe,backgroundPositionY:fe,fillOpacity:ai,strokeOpacity:ai,numOctaves:mh};function Ll(e,t,n){const{style:r,vars:o,transform:i,transformOrigin:s}=e;let a=!1,l=!1,c=!0;for(const u in t){const d=t[u];if(hh(u)){o[u]=d;continue}const f=gh[u],h=eT(d,f);if(Yn.has(u)){if(a=!0,i[u]=h,!c)continue;d!==(f.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,s[u]=h):r[u]=h}if(t.transform||(a||n?r.transform=X1(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:d="50%",originZ:f=0}=s;r.transformOrigin=`${u} ${d} ${f}`}}const Vl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yh(e,t,n){for(const r in t)!xt(t[r])&&!dh(r,n)&&(e[r]=t[r])}function sT({transformTemplate:e},t){return b.useMemo(()=>{const n=Vl();return Ll(n,t,e),Object.assign({},n.vars,n.style)},[t])}function aT(e,t){const n=e.style||{},r={};return yh(r,n,e),Object.assign(r,sT(e,t)),r}function lT(e,t){const n={},r=aT(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const cT=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ks(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||cT.has(e)}let vh=e=>!ks(e);function bh(e){e&&(vh=t=>t.startsWith("on")?!ks(t):e(t))}try{bh(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"||(vh(o)||n===!0&&ks(o)||!t&&!ks(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function wh(e,t,n){return typeof e=="string"?e:fe.transform(t+n*e)}function dT(e,t,n){const r=wh(t,e.x,e.width),o=wh(n,e.y,e.height);return`${r} ${o}`}const fT={offset:"stroke-dashoffset",array:"stroke-dasharray"},hT={offset:"strokeDashoffset",array:"strokeDasharray"};function pT(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?fT:hT;e[i.offset]=fe.transform(-r);const s=fe.transform(t),a=fe.transform(n);e[i.array]=`${s} ${a}`}function $l(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Ll(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=dT(p,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),s!==void 0&&pT(f,s,a,l,!1)}const xh=()=>({...Vl(),attrs:{}}),Rl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function mT(e,t,n,r){const o=b.useMemo(()=>{const i=xh();return $l(i,t,Rl(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};yh(i,e.style,e),o.style={...i,...o.style}}return o}function gT(e=!1){return(n,r,o,{latestValues:i},s)=>{const l=(Ml(n)?mT:lT)(r,i,s,n),c=uT(r,typeof n=="string",e),u=n!==b.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=b.useMemo(()=>xt(d)?d.get():d,[d]);return b.createElement(n,{...u,children:f})}}function Th(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 Sh=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 Eh(e,t,n,r){Th(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Sh.has(o)?o:Ts(o),t.attrs[o])}function jl(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(xt(o[s])||t.style&&xt(t.style[s])||dh(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),i}function Ch(e,t,n){const r=jl(e,t,n);for(const o in e)if(xt(e[o])||xt(t[o])){const i=si.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}function Ph(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Bl(e,t,n,r){if(typeof t=="function"){const[o,i]=Ph(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]=Ph(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function Zn(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const zl=e=>Array.isArray(e),yT=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),vT=e=>zl(e)?e[e.length-1]||0:e;function Os(e){const t=xt(e)?e.get():e;return yT(t)?t.toValue():t}const kh=new Set(["opacity","clipPath","filter","transform"]);function Oh(e){if(Yn.has(e))return"transform";if(kh.has(e))return Ts(e)}function Is(e,t){e.indexOf(t)===-1&&e.push(t)}function As(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function bT([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}function wT({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,i,s,a){const l={latestValues:TT(o,i,s,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Ih=e=>(t,n)=>{const r=b.useContext(bs),o=b.useContext(ws),i=()=>wT(e,t,r,o,n);return n?i():Zn(i)};function xT(e,t){const n=Oh(t);n&&Is(e,n)}function Ah(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const i=Bl(e,r[o]);if(i){const{transitionEnd:s,transition:a,...l}=i;n(l,s)}}}function TT(e,t,n,r,o){var i;const s={},a=[],l=r&&((i=e.style)===null||i===void 0?void 0:i.willChange)===void 0,c=o(e,{});for(const g in c)s[g]=Os(c[g]);let{initial:u,animate:d}=e;const f=Es(e),h=lh(e);t&&h&&!f&&e.inherit!==!1&&(u===void 0&&(u=t.initial),d===void 0&&(d=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?d:u;return m&&typeof m!="boolean"&&!oi(m)&&Ah(e,m,(g,v)=>{for(const w in g){let y=g[w];if(Array.isArray(y)){const S=p?y.length-1:0;y=y[S]}y!==null&&(s[w]=y)}for(const w in v)s[w]=v[w]}),l&&(d&&u!==!1&&!oi(d)&&Ah(e,d,g=>{for(const v in g)xT(a,v)}),a.length&&(s.willChange=a.join(","))),s}const{schedule:De,cancel:fn,state:Tt,steps:Wl}=oh(typeof requestAnimationFrame<"u"?requestAnimationFrame:wt,!0),ST={useVisualState:Ih({scrapeMotionValuesFromProps:Ch,createRenderState:xh,onMount:(e,t,{renderState:n,latestValues:r})=>{De.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),De.render(()=>{$l(n,r,Rl(t.tagName),e.transformTemplate),Eh(t,n)})}})},ET={useVisualState:Ih({applyWillChange:!0,scrapeMotionValuesFromProps:jl,createRenderState:Vl})};function CT(e,{forwardMotionProps:t=!1},n,r){return{...Ml(e)?ST:ET,preloadedFeatures:n,useRender:gT(t),createVisualElement:r,Component:e}}function On(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const _h=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function _s(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const PT=e=>t=>_h(t)&&e(t,_s(t));function In(e,t,n,r){return On(e,t,PT(n),r)}const kT=(e,t)=>n=>t(e(n)),An=(...e)=>e.reduce(kT);function Dh(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Mh=Dh("dragHorizontal"),Nh=Dh("dragVertical");function Fh(e){let t=!1;if(e==="y")t=Nh();else if(e==="x")t=Mh();else{const n=Mh(),r=Nh();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Lh(){const e=Fh(!0);return e?(e(),!1):!0}class Xn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Vh(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||Lh())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&De.postRender(()=>l(i,s))};return In(e.current,n,o,{passive:!e.getProps()[r]})}class OT extends Xn{mount(){this.unmount=An(Vh(this.node,!0),Vh(this.node,!1))}unmount(){}}class IT extends Xn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=An(On(this.node.current,"focus",()=>this.onFocus()),On(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const $h=(e,t)=>t?e===t?!0:$h(e,t.parentElement):!1;function Hl(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,_s(n))}class AT extends Xn{constructor(){super(...arguments),this.removeStartListeners=wt,this.removeEndListeners=wt,this.removeAccessibleListeners=wt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=In(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:d}=this.node.getProps(),f=!d&&!$h(this.node.current,a.target)?u:c;f&&De.update(()=>f(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=In(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=An(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Hl("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&De.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=On(this.node.current,"keyup",s),Hl("down",(a,l)=>{this.startPress(a,l)})},n=On(this.node.current,"keydown",t),r=()=>{this.isPressing&&Hl("cancel",(i,s)=>this.cancelPress(i,s))},o=On(this.node.current,"blur",r);this.removeAccessibleListeners=An(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&De.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Lh()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&De.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=In(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=On(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=An(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ul=new WeakMap,Gl=new WeakMap,_T=e=>{const t=Ul.get(e.target);t&&t(e)},DT=e=>{e.forEach(_T)};function MT({root:e,...t}){const n=e||document;Gl.has(n)||Gl.set(n,{});const r=Gl.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(DT,{root:e,...t})),r[o]}function NT(e,t,n){const r=MT(t);return Ul.set(e,n),r.observe(e),()=>{Ul.delete(e),r.unobserve(e)}}const FT={some:0,all:1};class LT extends Xn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:FT[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return NT(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(VT(t,n))&&this.startObserver()}unmount(){}}function VT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $T={inView:{Feature:LT},tap:{Feature:AT},focus:{Feature:IT},hover:{Feature:OT}};function Rh(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Ds(e,t,n){const r=e.getProps();return Bl(r,t,n!==void 0?n:r.custom,e)}const _n=e=>e*1e3,Dn=e=>e/1e3,RT={type:"spring",stiffness:500,damping:25,restSpeed:10},jT=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),BT={type:"keyframes",duration:.8},zT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},WT=(e,{keyframes:t})=>t.length>2?BT:Yn.has(e)?e.startsWith("scale")?jT(t[1]):RT:zT;function HT({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Yl(e,t){return e[t]||e.default||e}const UT=e=>e!==null;function Ms(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(UT),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let Ns;function GT(){Ns=void 0}const Qn={now:()=>(Ns===void 0&&Qn.set(Tt.isProcessing||_1.useManualTiming?Tt.timestamp:performance.now()),Ns),set:e=>{Ns=e,queueMicrotask(GT)}},jh=e=>/^0[^.\s]+$/u.test(e);function YT(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||jh(e):!0}const Bh=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),qT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function KT(e){const t=qT.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const ZT=4;function zh(e,t,n=1){tn(n<=ZT,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=KT(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return Bh(s)?parseFloat(s):s}return Nl(o)?zh(o,t,n+1):o}const XT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Wh=e=>e===ao||e===fe,Hh=(e,t)=>parseFloat(e.split(", ")[t]),Uh=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Hh(o[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Hh(i[1],e):0}},QT=new Set(["x","y","z"]),JT=si.filter(e=>!QT.has(e));function eS(e){const t=[];return JT.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const lo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Uh(4,13),y:Uh(5,14)};lo.translateX=lo.x,lo.translateY=lo.y;const Gh=e=>t=>t.test(e),Yh=[ao,fe,dn,Kn,iT,oT,{test:e=>e==="auto",parse:e=>e}],qh=e=>Yh.find(Gh(e)),Tr=new Set;let ql=!1,Kl=!1;function Kh(){if(Kl){const e=Array.from(Tr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=eS(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Kl=!1,ql=!1,Tr.forEach(e=>e.complete()),Tr.clear()}function Zh(){Tr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Kl=!0)})}function tS(){Zh(),Kh()}class Zl{constructor(t,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Tr.add(this),ql||(ql=!0,De.read(Zh),De.resolveKeyframes(Kh))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const s=o==null?void 0:o.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&s===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Tr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Tr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Xl=(e,t)=>n=>!!(ci(n)&&nT.test(n)&&n.startsWith(e)||t&&!rT(n)&&Object.prototype.hasOwnProperty.call(n,t)),Xh=(e,t,n)=>r=>{if(!ci(r))return r;const[o,i,s,a]=r.match(Fl);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},nS=e=>qn(0,255,e),Ql={...ao,transform:e=>Math.round(nS(e))},Sr={test:Xl("rgb","red"),parse:Xh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ql.transform(e)+", "+Ql.transform(t)+", "+Ql.transform(n)+", "+li(ai.transform(r))+")"};function rS(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Jl={test:Xl("#"),parse:rS,transform:Sr.transform},co={test:Xl("hsl","hue"),parse:Xh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+dn.transform(li(t))+", "+dn.transform(li(n))+", "+li(ai.transform(r))+")"},It={test:e=>Sr.test(e)||Jl.test(e)||co.test(e),parse:e=>Sr.test(e)?Sr.parse(e):co.test(e)?co.parse(e):Jl.parse(e),transform:e=>ci(e)?e:e.hasOwnProperty("red")?Sr.transform(e):co.transform(e)};function oS(e){var t,n;return isNaN(e)&&ci(e)&&(((t=e.match(Fl))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(tT))===null||n===void 0?void 0:n.length)||0)>0}const Qh="number",Jh="color",iS="var",sS="var(",ep="${}",aS=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function di(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(aS,l=>(It.test(l)?(r.color.push(i),o.push(Jh),n.push(It.parse(l))):l.startsWith(sS)?(r.var.push(i),o.push(iS),n.push(l)):(r.number.push(i),o.push(Qh),n.push(parseFloat(l))),++i,ep)).split(ep);return{values:n,split:a,indexes:r,types:o}}function tp(e){return di(e).values}function np(e){const{split:t,types:n}=di(e),r=t.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],o[s]!==void 0){const a=n[s];a===Qh?i+=li(o[s]):a===Jh?i+=It.transform(o[s]):i+=o[s]}return i}}const lS=e=>typeof e=="number"?0:e;function cS(e){const t=tp(e);return np(e)(t.map(lS))}const Jn={test:oS,parse:tp,createTransformer:np,getAnimatableNone:cS},uS=new Set(["brightness","contrast","saturate","opacity"]);function dS(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Fl)||[];if(!r)return e;const o=n.replace(r,"");let i=uS.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const fS=/\b([a-z-]*)\(.*?\)/gu,ec={...Jn,getAnimatableNone:e=>{const t=e.match(fS);return t?t.map(dS).join(" "):e}},hS={...gh,color:It,backgroundColor:It,outlineColor:It,fill:It,stroke:It,borderColor:It,borderTopColor:It,borderRightColor:It,borderBottomColor:It,borderLeftColor:It,filter:ec,WebkitFilter:ec},tc=e=>hS[e];function rp(e,t){let n=tc(e);return n!==ec&&(n=Jn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const pS=new Set(["auto","none","0"]);function mS(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!pS.has(i)&&di(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=rp(n,o)}class op extends Zl{constructor(t,n,r,o){super(t,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Nl(c))){const u=zh(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!XT.has(r)||t.length!==2)return;const[o,i]=t,s=qh(o),a=qh(i);if(s!==a)if(Wh(s)&&Wh(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)YT(t[o])&&r.push(o);r.length&&mS(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=lo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=lo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function ip(e){let t;return()=>(t===void 0&&(t=e()),t)}const sp=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Jn.test(e)||e==="0")&&!e.startsWith("url("));function gS(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function yS(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=sp(o,t),a=sp(i,t);return so(s===a,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!s||!a?!1:gS(e)||n==="spring"&&r}class ap{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&tS(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!yS(t,r,o,i))if(s)this.options.duration=0;else{l==null||l(Ms(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function lp(e,t){return t?e*(1e3/t):0}const vS=5;function cp(e,t,n){const r=Math.max(t-vS,0);return lp(n-e(r),t-r)}const nc=.001,bS=.01,up=10,wS=.05,xS=1;function TS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;so(e<=_n(up),"Spring duration must be 10 seconds or less");let s=1-t;s=qn(wS,xS,s),e=qn(bS,up,Dn(e)),s<1?(o=c=>{const u=c*s,d=u*e,f=u-n,h=rc(c,s),p=Math.exp(-d);return nc-f/h*p},i=c=>{const d=c*s*e,f=d*n+n,h=Math.pow(s,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=rc(Math.pow(c,2),s);return(-o(c)+nc>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-nc+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=ES(o,i,a);if(e=_n(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const SS=12;function ES(e,t,n){let r=n;for(let o=1;o<SS;o++)r=r-e(r)/t(r);return r}function rc(e,t){return e*Math.sqrt(1-t*t)}const CS=["duration","bounce"],PS=["stiffness","damping","mass"];function dp(e,t){return t.some(n=>e[n]!==void 0)}function kS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!dp(e,PS)&&dp(e,CS)){const n=TS(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function fp({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:f}=kS({...r,velocity:-Dn(r.velocity||0)}),h=d||0,p=l/(2*Math.sqrt(a*c)),m=i-o,g=Dn(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),t||(t=v?.005:.5);let w;if(p<1){const y=rc(g,p);w=S=>{const T=Math.exp(-p*g*S);return i-T*((h+p*g*m)/y*Math.sin(y*S)+m*Math.cos(y*S))}}else if(p===1)w=y=>i-Math.exp(-g*y)*(m+(h+g*m)*y);else{const y=g*Math.sqrt(p*p-1);w=S=>{const T=Math.exp(-p*g*S),E=Math.min(y*S,300);return i-T*((h+p*g*m)*Math.sinh(E)+y*m*Math.cosh(E))/y}}return{calculatedDuration:f&&u||null,next:y=>{const S=w(y);if(f)s.done=y>=u;else{let T=h;y!==0&&(p<1?T=cp(w,y,S):T=0);const E=Math.abs(T)<=n,P=Math.abs(i-S)<=t;s.done=E&&P}return s.value=s.done?i:S,s}}}function hp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=D=>a!==void 0&&D<a||l!==void 0&&D>l,p=D=>a===void 0?l:l===void 0||Math.abs(a-D)<Math.abs(l-D)?a:l;let m=n*t;const g=d+m,v=s===void 0?g:s(g);v!==g&&(m=v-d);const w=D=>-m*Math.exp(-D/r),y=D=>v+w(D),S=D=>{const _=w(D),O=y(D);f.done=Math.abs(_)<=c,f.value=f.done?v:O};let T,E;const P=D=>{h(f.value)&&(T=D,E=fp({keyframes:[f.value,p(f.value)],velocity:cp(y,D,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return P(0),{calculatedDuration:null,next:D=>{let _=!1;return!E&&T===void 0&&(_=!0,S(D),P(D)),T!==void 0&&D>=T?E.next(D-T):(!_&&S(D),f)}}}const pp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,OS=1e-7,IS=12;function AS(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=pp(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>OS&&++a<IS);return s}function fi(e,t,n,r){if(e===t&&n===r)return wt;const o=i=>AS(i,0,1,e,n);return i=>i===0||i===1?i:pp(o(i),t,r)}const _S=fi(.42,0,1,1),DS=fi(0,0,.58,1),mp=fi(.42,0,.58,1),MS=e=>Array.isArray(e)&&typeof e[0]!="number",gp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yp=e=>t=>1-e(1-t),oc=e=>1-Math.sin(Math.acos(e)),vp=yp(oc),NS=gp(oc),bp=fi(.33,1.53,.69,.99),ic=yp(bp),FS=gp(ic),wp={linear:wt,easeIn:_S,easeInOut:mp,easeOut:DS,circIn:oc,circInOut:NS,circOut:vp,backIn:ic,backInOut:FS,backOut:bp,anticipate:e=>(e*=2)<1?.5*ic(e):.5*(2-Math.pow(2,-10*(e-1)))},xp=e=>{if(Array.isArray(e)){tn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return fi(t,n,r,o)}else if(typeof e=="string")return tn(wp[e]!==void 0,`Invalid easing type '${e}'`),wp[e];return e},hi=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ze=(e,t,n)=>e+(t-e)*n;function sc(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function LS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=sc(l,a,e+1/3),i=sc(l,a,e),s=sc(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function Fs(e,t){return n=>n>0?t:e}const ac=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},VS=[Jl,Sr,co],$S=e=>VS.find(t=>t.test(e));function Tp(e){const t=$S(e);if(so(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===co&&(n=LS(n)),n}const Sp=(e,t)=>{const n=Tp(e),r=Tp(t);if(!n||!r)return Fs(e,t);const o={...n};return i=>(o.red=ac(n.red,r.red,i),o.green=ac(n.green,r.green,i),o.blue=ac(n.blue,r.blue,i),o.alpha=Ze(n.alpha,r.alpha,i),Sr.transform(o))},lc=new Set(["none","hidden"]);function RS(e,t){return lc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function jS(e,t){return n=>Ze(e,t,n)}function cc(e){return typeof e=="number"?jS:typeof e=="string"?Nl(e)?Fs:It.test(e)?Sp:WS:Array.isArray(e)?Ep:typeof e=="object"?It.test(e)?Sp:BS:Fs}function Ep(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>cc(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function BS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=cc(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function zS(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][o[s]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[i]=l,o[s]++}return r}const WS=(e,t)=>{const n=Jn.createTransformer(t),r=di(e),o=di(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?lc.has(e)&&!o.values.length||lc.has(t)&&!r.values.length?RS(e,t):An(Ep(zS(r,o),o.values),n):(so(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Fs(e,t))};function Cp(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ze(e,t,n):cc(e)(e,t)}function HS(e,t,n){const r=[],o=n||Cp,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||wt:t;a=An(l,a)}r.push(a)}return r}function Pp(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(tn(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=HS(t,r,o),a=s.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const d=hi(e[u],e[u+1],c);return s[u](d)};return n?c=>l(qn(e[0],e[i-1],c)):l}function US(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=hi(0,t,r);e.push(Ze(n,1,o))}}function GS(e){const t=[0];return US(t,e.length-1),t}function YS(e,t){return e.map(n=>n*t)}function qS(e,t){return e.map(()=>t||mp).splice(0,e.length-1)}function Ls({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=MS(r)?r.map(xp):xp(r),i={done:!1,value:t[0]},s=YS(n&&n.length===t.length?n:GS(t),e),a=Pp(s,t,{ease:Array.isArray(o)?o:qS(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const kp=2e4;function KS(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<kp;)t+=n,r=e.next(t);return t>=kp?1/0:t}const ZS=e=>{const t=({timestamp:n})=>e(n);return{start:()=>De.update(t,!0),stop:()=>fn(t),now:()=>Tt.isProcessing?Tt.timestamp:Qn.now()}},XS={decay:hp,inertia:hp,tween:Ls,keyframes:Ls,spring:fp},QS=e=>e/100;class uc extends ap{constructor({KeyframeResolver:t=Zl,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:i}=this.options,s=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(i,s,r,o):this.resolver=new t(i,s,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=XS[n]||Ls;let l,c;a!==Ls&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&tn(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=An(QS,Cp(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});i==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=KS(u));const{calculatedDuration:d}=u,f=d+o,h=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:D}=this.options;return{done:!0,value:D[D.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),w=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let y=this.currentTime,S=i;if(h){const D=Math.min(this.currentTime,u)/d;let _=Math.floor(D),O=D%1;!O&&D>=1&&(O=1),O===1&&_--,_=Math.min(_,h+1),!!(_%2)&&(p==="reverse"?(O=1-O,m&&(O-=m/d)):p==="mirror"&&(S=s)),y=qn(0,1,O)*d}const T=w?{done:!1,value:l[0]}:S.next(y);a&&(T.value=a(T.value));let{done:E}=T;!w&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return P&&o!==void 0&&(T.value=Ms(l,this.options,o)),g&&g(T.value),P&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Dn(t.calculatedDuration):0}get time(){return Dn(this.currentTime)}set time(t){t=_n(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Dn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=ZS,onPlay:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Op=e=>Array.isArray(e)&&typeof e[0]=="number";function Ip(e){return!!(!e||typeof e=="string"&&e in dc||Op(e)||Array.isArray(e)&&e.every(Ip))}const pi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,dc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pi([0,.65,.55,1]),circOut:pi([.55,0,1,.45]),backIn:pi([.31,.01,.66,-.59]),backOut:pi([.33,1.53,.69,.99])};function JS(e){return Ap(e)||dc.easeOut}function Ap(e){if(e)return Op(e)?pi(e):Array.isArray(e)?e.map(JS):dc[e]}function eE(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Ap(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const tE=ip(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Vs=10,nE=2e4;function rE(e){return e.type==="spring"||!Ip(e.ease)}function oE(e,t){const n=new uc({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<nE;)r=n.sample(i),o.push(r.value),i+=Vs;return{times:void 0,keyframes:o,duration:i-Vs,ease:"linear"}}class _p extends ap{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new op(o,(i,s)=>this.onKeyframesResolved(i,s),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(rE(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,...p}=this.options,m=oE(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,i=m.times,s=m.ease,a="keyframes"}const u=eE(l.owner.current,c,t,{...this.options,duration:o,times:i,ease:s});return u.startTime=Qn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;l.set(Ms(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:i,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Dn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Dn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=_n(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return wt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return wt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:s,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,...f}=this.options,h=new uc({...f,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),p=_n(this.time);c.setWithVelocity(h.sample(p-Vs).value,h.sample(p).value,Vs)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=t;return tE()&&r&&kh.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function iE(e,t){let n;const r=()=>{const{currentTime:o}=t,s=(o===null?0:o.value)/100;n!==s&&e(s),n=s};return De.update(r,!0),()=>fn(r)}const sE=ip(()=>window.ScrollTimeline!==void 0);class aE{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>{if(sE()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),iE(o=>{r.time=r.duration*o},t)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const fc=(e,t,n,r={},o,i,s)=>a=>{const l=Yl(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-_n(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:i?void 0:o};HT(l)||(d={...d,...WT(e,d)}),d.duration&&(d.duration=_n(d.duration)),d.repeatDelay&&(d.repeatDelay=_n(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!i&&t.get()!==void 0){const h=Ms(d.keyframes,l);if(h!==void 0)return De.update(()=>{d.onUpdate(h),d.onComplete()}),new aE([])}return!i&&_p.supports(d)?new _p(d):new uc(d)};class hc{constructor(){this.subscriptions=[]}add(t){return Is(this.subscriptions,t),()=>As(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Dp=new Set;function pc(e,t,n){e||Dp.has(t)||(console.warn(t),Dp.add(t))}const Mp=30,lE=e=>!isNaN(parseFloat(e)),mi={current:void 0};class Np{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Qn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Qn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=lE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&pc(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new hc);const r=this.events[t].add(n);return t==="change"?()=>{r(),De.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return mi.current&&mi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Qn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Mp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Mp);return lp(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function uo(e,t){return new Np(e,t)}function cE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,uo(n))}function uE(e,t){const n=Ds(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=vT(i[s]);cE(e,s,a)}}function Fp(e){return e.getProps()[rh]}class dE extends Np{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=Oh(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const i=this.counts.get(n)-1;this.counts.set(n,i),i===0&&(As(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function fE(e){return!!(xt(e)&&e.add)}function mc(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new dE("auto"),e.addValue("willChange",r)),fE(r))return r.add(t)}function hE({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Lp(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),h=l[d];if(h===void 0||u&&hE(u,d))continue;const p={delay:n,elapsed:0,...Yl(s||{},d)};let m=!1;if(window.HandoffAppearAnimations){const v=Fp(e);if(v){const w=window.HandoffAppearAnimations(v,d,f,De);w!==null&&(p.elapsed=w,m=!0)}}f.start(fc(d,f,h,e.shouldReduceMotion&&Yn.has(d)?{type:!1}:p,e,m,mc(e,d)));const g=f.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{De.update(()=>{a&&uE(e,a)})}),c}function gc(e,t,n={}){var r;const o=Ds(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(Lp(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return pE(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function pE(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(mE).forEach((c,u)=>{c.notify("AnimationStart",t),s.push(gc(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function mE(e,t){return e.sortNodePosition(t)}function gE(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>gc(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=gc(e,t,n);else{const o=typeof t=="function"?Ds(e,t,n.custom):t;r=Promise.all(Lp(e,o,n))}return r.then(()=>{De.postRender(()=>{e.notify("AnimationComplete",t)})})}const yE=[..._l].reverse(),vE=_l.length;function bE(e){return t=>Promise.all(t.map(({animation:n,options:r})=>gE(e,n,r)))}function wE(e){let t=bE(e),n=Vp(),r=!0;const o=l=>(c,u)=>{var d;const f=Ds(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function i(l){t=l(e)}function s(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],f=new Set;let h={},p=1/0;for(let g=0;g<vE;g++){const v=yE[g],w=n[v],y=c[v]!==void 0?c[v]:u[v],S=ri(y),T=v===l?w.isActive:null;T===!1&&(p=g);let E=y===u[v]&&y!==c[v]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...h},!w.isActive&&T===null||!y&&!w.prevProp||oi(y)||typeof y=="boolean")continue;let D=xE(w.prevProp,y)||v===l&&w.isActive&&!E&&S||g>p&&S,_=!1;const O=Array.isArray(y)?y:[y];let V=O.reduce(o(v),{});T===!1&&(V={});const{prevResolvedValues:F={}}=w,$={...F,...V},C=I=>{D=!0,f.has(I)&&(_=!0,f.delete(I)),w.needsAnimating[I]=!0;const M=e.getValue(I);M&&(M.liveStyle=!1)};for(const I in $){const M=V[I],L=F[I];if(h.hasOwnProperty(I))continue;let H=!1;zl(M)&&zl(L)?H=!Rh(M,L):H=M!==L,H?M!=null?C(I):f.add(I):M!==void 0&&f.has(I)?C(I):w.protectedKeys[I]=!0}w.prevProp=y,w.prevResolvedValues=V,w.isActive&&(h={...h,...V}),r&&e.blockInitialAnimation&&(D=!1),D&&(!E||_)&&d.push(...O.map(I=>({animation:I,options:{type:v}})))}if(f.size){const g={};f.forEach(v=>{const w=e.getBaseTarget(v),y=e.getValue(v);y&&(y.liveStyle=!0),g[v]=w??null}),d.push({animation:g})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=s(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Vp(),r=!0}}}function xE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Rh(t,e):!1}function Er(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Vp(){return{animate:Er(!0),whileInView:Er(),whileHover:Er(),whileTap:Er(),whileDrag:Er(),whileFocus:Er(),exit:Er()}}class TE extends Xn{constructor(t){super(t),t.animationState||(t.animationState=wE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();oi(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let SE=0;class EE extends Xn{constructor(){super(...arguments),this.id=SE++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const CE={animation:{Feature:TE},exit:{Feature:EE}},$p=(e,t)=>Math.abs(e-t);function PE(e,t){const n=$p(e.x,t.x),r=$p(e.y,t.y);return Math.sqrt(n**2+r**2)}class Rp{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=vc(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=PE(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:p}=d,{timestamp:m}=Tt;this.history.push({...p,timestamp:m});const{onStart:g,onMove:v}=this.handlers;f||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=yc(f,this.transformPagePoint),De.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=vc(d.type==="pointercancel"?this.lastMoveEventInfo:yc(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,g),p&&p(d,g)},!_h(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=_s(t),a=yc(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=Tt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,vc(a,this.history)),this.removeListeners=An(In(this.contextWindow,"pointermove",this.handlePointerMove),In(this.contextWindow,"pointerup",this.handlePointerUp),In(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),fn(this.updatePoint)}}function yc(e,t){return t?{point:t(e.point)}:e}function jp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vc({point:e},t){return{point:e,delta:jp(e,Bp(t)),offset:jp(e,kE(t)),velocity:OE(t,.1)}}function kE(e){return e[0]}function Bp(e){return e[e.length-1]}function OE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Bp(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>_n(t)));)n--;if(!r)return{x:0,y:0};const i=Dn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const zp=1e-4,IE=1-zp,AE=1+zp,Wp=.01,_E=0-Wp,DE=0+Wp;function Wt(e){return e.max-e.min}function ME(e,t,n){return Math.abs(e-t)<=n}function Hp(e,t,n,r=.5){e.origin=r,e.originPoint=Ze(t.min,t.max,e.origin),e.scale=Wt(n)/Wt(t),e.translate=Ze(n.min,n.max,e.origin)-e.originPoint,(e.scale>=IE&&e.scale<=AE||isNaN(e.scale))&&(e.scale=1),(e.translate>=_E&&e.translate<=DE||isNaN(e.translate))&&(e.translate=0)}function gi(e,t,n,r){Hp(e.x,t.x,n.x,r?r.originX:void 0),Hp(e.y,t.y,n.y,r?r.originY:void 0)}function Up(e,t,n){e.min=n.min+t.min,e.max=e.min+Wt(t)}function NE(e,t,n){Up(e.x,t.x,n.x),Up(e.y,t.y,n.y)}function Gp(e,t,n){e.min=t.min-n.min,e.max=e.min+Wt(t)}function yi(e,t,n){Gp(e.x,t.x,n.x),Gp(e.y,t.y,n.y)}function FE(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ze(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ze(n,e,r.max):Math.min(e,n)),e}function Yp(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function LE(e,{top:t,left:n,bottom:r,right:o}){return{x:Yp(e.x,n,o),y:Yp(e.y,t,r)}}function qp(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function VE(e,t){return{x:qp(e.x,t.x),y:qp(e.y,t.y)}}function $E(e,t){let n=.5;const r=Wt(e),o=Wt(t);return o>r?n=hi(t.min,t.max-r,e.min):r>o&&(n=hi(e.min,e.max-o,t.min)),qn(0,1,n)}function RE(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const bc=.35;function jE(e=bc){return e===!1?e=0:e===!0&&(e=bc),{x:Kp(e,"left","right"),y:Kp(e,"top","bottom")}}function Kp(e,t,n){return{min:Zp(e,t),max:Zp(e,n)}}function Zp(e,t){return typeof e=="number"?e:e[t]||0}const Xp=()=>({translate:0,scale:1,origin:0,originPoint:0}),fo=()=>({x:Xp(),y:Xp()}),Qp=()=>({min:0,max:0}),st=()=>({x:Qp(),y:Qp()});function Zt(e){return[e("x"),e("y")]}function Jp({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function BE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function zE(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function wc(e){return e===void 0||e===1}function xc({scale:e,scaleX:t,scaleY:n}){return!wc(e)||!wc(t)||!wc(n)}function Cr(e){return xc(e)||em(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function em(e){return tm(e.x)||tm(e.y)}function tm(e){return e&&e!=="0%"}function $s(e,t,n){const r=e-n,o=t*r;return n+o}function nm(e,t,n,r,o){return o!==void 0&&(e=$s(e,o,r)),$s(e,n,r)+t}function Tc(e,t=0,n=1,r,o){e.min=nm(e.min,t,n,r,o),e.max=nm(e.max,t,n,r,o)}function rm(e,{x:t,y:n}){Tc(e.x,t.translate,t.scale,t.originPoint),Tc(e.y,n.translate,n.scale,n.originPoint)}const om=.999999999999,im=1.0000000000001;function WE(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ho(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,rm(e,s)),r&&Cr(i.latestValues)&&ho(e,i.latestValues))}t.x<im&&t.x>om&&(t.x=1),t.y<im&&t.y>om&&(t.y=1)}function er(e,t){e.min=e.min+t,e.max=e.max+t}function sm(e,t,n,r,o=.5){const i=Ze(e.min,e.max,o);Tc(e,t,n,i,r)}function ho(e,t){sm(e.x,t.x,t.scaleX,t.scale,t.originX),sm(e.y,t.y,t.scaleY,t.scale,t.originY)}function am(e,t){return Jp(zE(e.getBoundingClientRect(),t))}function HE(e,t,n){const r=am(e,n),{scroll:o}=t;return o&&(er(r.x,o.offset.x),er(r.y,o.offset.y)),r}const lm=({current:e})=>e?e.ownerDocument.defaultView:null,UE=new WeakMap;class GE{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=st(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(_s(u,"page").point)},i=(u,d)=>{var f;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Fh(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Zt(v=>{let w=this.getAxisMotionValue(v).get()||0;if(dn.test(w)){const{projection:y}=this.visualElement;if(y&&y.layout){const S=y.layout.layoutBox[v];S&&(w=Wt(S)*(parseFloat(w)/100))}}this.originPoint[v]=w}),m&&De.postRender(()=>m(u,d)),(f=this.removeWillChange)===null||f===void 0||f.call(this),this.removeWillChange=mc(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:g}=d;if(h&&this.currentDirection===null){this.currentDirection=YE(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>Zt(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Rp(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:lm(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&De.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Rs(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=FE(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&oo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=LE(o.layoutBox,n):this.constraints=!1,this.elastic=jE(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Zt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=RE(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!oo(t))return!1;const r=t.current;tn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=HE(r,o.root,this.visualElement.getTransformPagePoint());let s=VE(o.layout.layoutBox,i);if(n){const a=n(BE(s));this.hasMutatedConstraints=!!a,a&&(s=Jp(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Zt(u=>{if(!Rs(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(fc(t,r,0,n,this.visualElement,!1,mc(this.visualElement,t)))}stopAnimation(){Zt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Zt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Zt(n=>{const{drag:r}=this.getProps();if(!Rs(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(t[n]-Ze(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!oo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Zt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=$E({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Zt(s=>{if(!Rs(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Ze(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;UE.set(this.visualElement,this);const t=this.visualElement.current,n=In(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();oo(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),De.read(r);const s=On(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Zt(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=bc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Rs(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function YE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class qE extends Xn{constructor(t){super(t),this.removeGroupControls=wt,this.removeListeners=wt,this.controls=new GE(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||wt}unmount(){this.removeGroupControls(),this.removeListeners()}}const cm=e=>(t,n)=>{e&&De.postRender(()=>e(t,n))};class KE extends Xn{constructor(){super(...arguments),this.removePointerDownListener=wt}onPointerDown(t){this.session=new Rp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:lm(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:cm(t),onStart:cm(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&De.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=In(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function ZE(){const e=b.useContext(ws);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=b.useId();return b.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const js={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function um(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const n=um(e,t.target.x),r=um(e,t.target.y);return`${n}% ${r}%`}},XE={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Jn.parse(e);if(o.length>5)return r;const i=Jn.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=Ze(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}};class QE extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;q1(JE),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),js.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||De.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Al.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function dm(e){const[t,n]=ZE(),r=b.useContext(ii);return x.jsx(QE,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(ih),isPresent:t,safeToRemove:n})}const JE={borderRadius:{...vi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vi,borderTopRightRadius:vi,borderBottomLeftRadius:vi,borderBottomRightRadius:vi,boxShadow:XE},fm=["TopLeft","TopRight","BottomLeft","BottomRight"],eC=fm.length,hm=e=>typeof e=="string"?parseFloat(e):e,pm=e=>typeof e=="number"||fe.test(e);function tC(e,t,n,r,o,i){o?(e.opacity=Ze(0,n.opacity!==void 0?n.opacity:1,nC(r)),e.opacityExit=Ze(t.opacity!==void 0?t.opacity:1,0,rC(r))):i&&(e.opacity=Ze(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<eC;s++){const a=`border${fm[s]}Radius`;let l=mm(t,a),c=mm(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||pm(l)===pm(c)?(e[a]=Math.max(Ze(hm(l),hm(c),r),0),(dn.test(c)||dn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ze(t.rotate||0,n.rotate||0,r))}function mm(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const nC=gm(0,.5,vp),rC=gm(.5,.95,wt);function gm(e,t,n){return r=>r<e?0:r>t?1:n(hi(e,t,r))}function ym(e,t){e.min=t.min,e.max=t.max}function Xt(e,t){ym(e.x,t.x),ym(e.y,t.y)}function vm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function bm(e,t,n,r,o){return e-=t,e=$s(e,1/n,r),o!==void 0&&(e=$s(e,1/o,r)),e}function oC(e,t=0,n=1,r=.5,o,i=e,s=e){if(dn.test(t)&&(t=parseFloat(t),t=Ze(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Ze(i.min,i.max,r);e===i&&(a-=t),e.min=bm(e.min,t,n,a,o),e.max=bm(e.max,t,n,a,o)}function wm(e,t,[n,r,o],i,s){oC(e,t[n],t[r],t[o],t.scale,i,s)}const iC=["x","scaleX","originX"],sC=["y","scaleY","originY"];function xm(e,t,n,r){wm(e.x,t,iC,n?n.x:void 0,r?r.x:void 0),wm(e.y,t,sC,n?n.y:void 0,r?r.y:void 0)}function Tm(e){return e.translate===0&&e.scale===1}function Sm(e){return Tm(e.x)&&Tm(e.y)}function aC(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function Em(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Cm(e){return Wt(e.x)/Wt(e.y)}function Pm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class lC{constructor(){this.members=[]}add(t){Is(this.members,t),t.scheduleRender()}remove(t){if(As(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function cC(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const uC=(e,t)=>e.depth-t.depth;class dC{constructor(){this.children=[],this.isDirty=!1}add(t){Is(this.children,t),this.isDirty=!0}remove(t){As(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(uC),this.isDirty=!1,this.children.forEach(t)}}function fC(e,t){const n=Qn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(fn(r),e(i-t))};return De.read(r,!0),()=>fn(r)}function hC(e){return e instanceof SVGElement&&e.tagName!=="svg"}function pC(e,t,n){const r=xt(e)?e:uo(e);return r.start(fc("",r,t,n)),r.animation}const Pr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Sc=["","X","Y","Z"],mC={visibility:"hidden"},km=1e3;let gC=0;function Ec(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Om(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Fp(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?Om(e.parent):!1:!1}function Im({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t==null?void 0:t()){this.id=gC++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,window.MotionDebug&&(Pr.totalNodes=Pr.resolvedTargetDeltas=Pr.recalculatedProjection=0),this.nodes.forEach(bC),this.nodes.forEach(EC),this.nodes.forEach(CC),this.nodes.forEach(wC),window.MotionDebug&&window.MotionDebug.record(Pr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new dC)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new hc),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=hC(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=fC(f,250),js.hasAnimatedSinceResize&&(js.hasAnimatedSinceResize=!1,this.nodes.forEach(_m))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||AC,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),w=!this.targetLayout||!Em(this.targetLayout,p)||h,y=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,y);const S={...Yl(m,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||_m(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,fn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(PC),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Om(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Am);return}this.isUpdating||this.nodes.forEach(TC),this.isUpdating=!1,this.nodes.forEach(SC),this.nodes.forEach(yC),this.nodes.forEach(vC),this.clearAllSnapshots();const a=Qn.now();Tt.delta=qn(0,1e3/60,a-Tt.timestamp),Tt.timestamp=a,Tt.isProcessing=!0,Wl.update.process(Tt),Wl.preRender.process(Tt),Wl.render.process(Tt),Tt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Al.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xC),this.sharedNodes.forEach(kC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,De.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){De.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=st(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Sm(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||Cr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),_C(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return st();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(er(a.x,l.offset.x),er(a.y,l.offset.y)),a}removeElementScroll(s){const a=st();Xt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;if(c!==this.root&&u&&d.layoutScroll){if(u.isRoot){Xt(a,s);const{scroll:f}=this.root;f&&(er(a.x,-f.offset.x),er(a.y,-f.offset.y))}er(a.x,u.offset.x),er(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const l=st();Xt(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ho(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Cr(u.latestValues)&&ho(l,u.latestValues)}return Cr(this.latestValues)&&ho(l,this.latestValues),l}removeTransform(s){const a=st();Xt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Cr(c.latestValues))continue;xc(c.latestValues)&&c.updateSnapshot();const u=st(),d=c.measurePageBox();Xt(u,d),xm(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Cr(this.latestValues)&&xm(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Tt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Tt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),yi(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=st(),this.targetWithTransforms=st()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),NE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Xt(this.target,this.layout.layoutBox),rm(this.target,this.targetDelta)):Xt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),yi(this.relativeTargetOrigin,this.target,h.target),Xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&Pr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||xc(this.parent.latestValues)||em(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Tt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Xt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;WE(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=st());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(vm(this.prevProjectionDelta.x,this.projectionDelta.x),vm(this.prevProjectionDelta.y,this.projectionDelta.y)),gi(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Pm(this.projectionDelta.x,this.prevProjectionDelta.x)||!Pm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&Pr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=fo(),this.projectionDelta=fo(),this.projectionDeltaWithTransform=fo()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=fo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=st(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,g=this.getStack(),v=!g||g.members.length<=1,w=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(IC));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const T=S/1e3;Dm(d.x,s.x,T),Dm(d.y,s.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(yi(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),OC(this.relativeTarget,this.relativeTargetOrigin,f,T),y&&aC(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=st()),Xt(y,this.relativeTarget)),m&&(this.animationValues=u,tC(u,c,this.latestValues,T,w,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(fn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=De.update(()=>{js.hasAnimatedSinceResize=!0,this.currentAnimation=pC(0,km,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(km),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&Vm(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||st();const d=Wt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=Wt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Xt(a,l),ho(a,u),gi(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new lC),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Ec("z",s,c,this.animationValues);for(let u=0;u<Sc.length;u++)Ec(`rotate${Sc[u]}`,s,c,this.animationValues),Ec(`skew${Sc[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return mC;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Os(s==null?void 0:s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Os(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!Cr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=cC(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in Cs){if(f[m]===void 0)continue;const{correct:g,applyTo:v}=Cs[m],w=c.transform==="none"?f[m]:g(f[m],d);if(v){const y=v.length;for(let S=0;S<y;S++)c[v[S]]=w}else c[m]=w}return this.options.layoutId&&(c.pointerEvents=d===this?Os(s==null?void 0:s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Am),this.root.sharedNodes.clear()}}}function yC(e){e.updateLayout()}function vC(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?Zt(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=Wt(f);f.min=r[d].min,f.max=f.min+h}):Vm(i,n.layoutBox,r)&&Zt(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=Wt(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=fo();gi(a,r,n.layoutBox);const l=fo();s?gi(l,e.applyTransform(o,!0),n.measuredBox):gi(l,r,n.layoutBox);const c=!Sm(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=st();yi(p,n.layoutBox,f.layoutBox);const m=st();yi(m,r,h.layoutBox),Em(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function bC(e){window.MotionDebug&&Pr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function wC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function xC(e){e.clearSnapshot()}function Am(e){e.clearMeasurements()}function TC(e){e.isLayoutDirty=!1}function SC(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function _m(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function EC(e){e.resolveTargetDelta()}function CC(e){e.calcProjection()}function PC(e){e.resetSkewAndRotation()}function kC(e){e.removeLeadSnapshot()}function Dm(e,t,n){e.translate=Ze(t.translate,0,n),e.scale=Ze(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Mm(e,t,n,r){e.min=Ze(t.min,n.min,r),e.max=Ze(t.max,n.max,r)}function OC(e,t,n,r){Mm(e.x,t.x,n.x,r),Mm(e.y,t.y,n.y,r)}function IC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const AC={duration:.45,ease:[.4,0,.1,1]},Nm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Fm=Nm("applewebkit/")&&!Nm("chrome/")?Math.round:wt;function Lm(e){e.min=Fm(e.min),e.max=Fm(e.max)}function _C(e){Lm(e.x),Lm(e.y)}function Vm(e,t,n){return e==="position"||e==="preserve-aspect"&&!ME(Cm(t),Cm(n),.2)}const DC=Im({attachResizeListener:(e,t)=>On(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Cc={current:void 0},$m=Im({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Cc.current){const e=new DC({});e.mount(window),e.setOptions({layoutScroll:!0}),Cc.current=e}return Cc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),MC={pan:{Feature:KE},drag:{Feature:qE,ProjectionNode:$m,MeasureLayout:dm}},Pc={current:null},Rm={current:!1};function NC(){if(Rm.current=!0,!!Il)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Pc.current=e.matches;e.addListener(t),t()}else Pc.current=!1}function FC(e,t,n){for(const r in t){const o=t[r],i=n[r];if(xt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&pc(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(xt(i))e.addValue(r,uo(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,uo(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const jm=new WeakMap,LC=[...Yh,It,Jn],VC=e=>LC.find(Gh(e)),Bm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],$C=Dl.length;class RC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.applyWillChange=!1,this.resolveKeyframes=(f,h,p,m)=>new this.KeyframeResolver(f,h,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Zl,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,De.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Es(n),this.isVariantNode=lh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&xt(h)&&h.set(l[f],!1)}}mount(t){this.current=t,jm.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)),Rm.current||NC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Pc.current,process.env.NODE_ENV!=="production"&&pc(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){jm.delete(this.current),this.projection&&this.projection.unmount(),fn(this.notifyUpdate),fn(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){const r=Yn.has(t),o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&De.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in io){const n=io[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):st()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Bm.length;r++){const o=Bm[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=FC(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<$C;r++){const o=Dl[r],i=this.props[o];(ri(i)||i===!1)&&(n[o]=i)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=uo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Bh(o)||jh(o))?o=parseFloat(o):!VC(o)&&Jn.test(n)&&(o=rp(t,n)),this.setBaseTarget(t,xt(o)?o.get():o)),xt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const s=Bl(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!xt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new hc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class zm extends RC{constructor(){super(...arguments),this.KeyframeResolver=op}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function jC(e){return window.getComputedStyle(e)}class BC extends zm{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Th}readValueFromInstance(t,n){if(Yn.has(n)){const r=tc(n);return r&&r.default||0}else{const r=jC(t),o=(hh(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return am(t,n)}build(t,n,r){Ll(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return jl(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;xt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class zC extends zm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=st}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Yn.has(n)){const r=tc(n);return r&&r.default||0}return n=Sh.has(n)?n:Ts(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Ch(t,n,r)}build(t,n,r){$l(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Eh(t,n,r,o)}mount(t){this.isSVGTag=Rl(t.tagName),super.mount(t)}}const WC=(e,t)=>Ml(e)?new zC(t):new BC(t,{allowProjection:e!==b.Fragment}),HC={...CE,...$T,...MC,...{layout:{ProjectionNode:$m,MeasureLayout:dm}}},Ht=G1((e,t)=>CT(e,t,HC,WC));function Wm(){const e=b.useRef(!1);return xs(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Hm(){const e=Wm(),[t,n]=b.useState(0),r=b.useCallback(()=>{e.current&&n(t+1)},[t]);return[b.useCallback(()=>De.postRender(r),[r]),t]}class UC extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function GC({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),o=b.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=b.useContext(ro);return b.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:c}=o.current;if(t||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return i&&(u.nonce=i),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
5
+ [data-motion-pop-id="${n}"] {
6
+ position: absolute !important;
7
+ width: ${s}px !important;
8
+ height: ${a}px !important;
9
+ top: ${l}px !important;
10
+ left: ${c}px !important;
11
+ }
12
+ `),()=>{document.head.removeChild(u)}},[t]),x.jsx(UC,{isPresent:t,childRef:r,sizeRef:o,children:A.cloneElement(e,{ref:r})})}const kc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=Zn(YC),l=b.useId(),c=b.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const d of a.values())if(!d)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),i?[Math.random()]:[n]);return b.useMemo(()=>{a.forEach((u,d)=>a.set(d,!1))},[n]),A.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=x.jsx(GC,{isPresent:n,children:e})),x.jsx(ws.Provider,{value:c,children:e})};function YC(){return new Map}function qC(e){return b.useEffect(()=>()=>e(),[])}const kr=e=>e.key||"";function KC(e,t){e.forEach(n=>{const r=kr(n);t.set(r,n)})}function ZC(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const Bs=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{tn(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(ii).forceRender||Hm()[0],l=Wm(),c=ZC(e);let u=c;const d=b.useRef(new Map).current,f=b.useRef(u),h=b.useRef(new Map).current,p=b.useRef(!0);if(xs(()=>{p.current=!1,KC(c,h),f.current=u}),qC(()=>{p.current=!0,h.clear(),d.clear()}),p.current)return x.jsx(x.Fragment,{children:u.map(w=>x.jsx(kc,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s,children:w},kr(w)))});u=[...u];const m=f.current.map(kr),g=c.map(kr),v=m.length;for(let w=0;w<v;w++){const y=m[w];g.indexOf(y)===-1&&!d.has(y)&&d.set(y,void 0)}return s==="wait"&&d.size&&(u=[]),d.forEach((w,y)=>{if(g.indexOf(y)!==-1)return;const S=h.get(y);if(!S)return;const T=m.indexOf(y);let E=w;if(!E){const P=()=>{d.delete(y);const D=Array.from(h.keys()).filter(_=>!g.includes(_));if(D.forEach(_=>h.delete(_)),f.current=c.filter(_=>{const O=kr(_);return O===y||D.includes(O)}),!d.size){if(l.current===!1)return;a(),r&&r()}};E=x.jsx(kc,{isPresent:!1,onExitComplete:P,custom:t,presenceAffectsLayout:i,mode:s,children:S},kr(S)),d.set(y,E)}u.splice(T,0,E)}),u=u.map(w=>{const y=w.key;return d.has(y)?w:x.jsx(kc,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:w},kr(w))}),process.env.NODE_ENV!=="production"&&s==="wait"&&u.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x.jsx(x.Fragment,{children:d.size?u:u.map(w=>b.cloneElement(w))})};function XC({children:e,isValidProp:t,...n}){t&&bh(t),n={...b.useContext(ro),...n},n.isStatic=Zn(()=>n.isStatic);const r=b.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(ro.Provider,{value:r,children:e})}const QC=b.createContext(null),JC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Um(){const e=new Set,t=new WeakMap,n=()=>e.forEach(JC);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 Gm=e=>e===!0,eP=e=>Gm(e===!0)||e==="id",tP=({children:e,id:t,inherit:n=!0})=>{const r=b.useContext(ii),o=b.useContext(QC),[i,s]=Hm(),a=b.useRef(null),l=r.id||o;a.current===null&&(eP(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:Gm(n)&&r.group||Um()});const c=b.useMemo(()=>({...a.current,forceRender:i}),[s]);return x.jsx(ii.Provider,{value:c,children:e})},Ym=b.createContext(null);function nP(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,s=e[o+i];if(!s)return e;const a=e[o],l=s.layout,c=Ze(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?bT(e,o,o+i):e}function rP({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=Zn(()=>Ht(t)),l=[],c=b.useRef(!1);tn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,f)=>{const h=l.findIndex(p=>d===p.value);h!==-1?l[h].layout=f[n]:l.push({value:d,layout:f[n]}),l.sort(sP)},updateOrder:(d,f,h)=>{if(c.current)return;const p=nP(l,d,f,h);l!==p&&(c.current=!0,r(p.map(iP).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{c.current=!1}),x.jsx(a,{...i,ref:s,ignoreStrict:!0,children:x.jsx(Ym.Provider,{value:u,children:e})})}const oP=b.forwardRef(rP);function iP(e){return e.value}function sP(e,t){return e.layout.min-t.layout.min}function Or(e){const t=Zn(()=>uo(e)),{isStatic:n}=b.useContext(ro);if(n){const[,r]=b.useState(e);b.useEffect(()=>t.on("change",r),[])}return t}const aP=e=>e&&typeof e=="object"&&e.mix,lP=e=>aP(e)?e.mix:void 0;function cP(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],s=e[3+n],a=Pp(o,i,{mixer:lP(i[0]),...s});return t?a(r):a}function qm(e,t){const n=Or(t()),r=()=>n.set(t());return r(),xs(()=>{const o=()=>De.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),fn(r)}}),n}function uP(e){mi.current=[],e();const t=qm(mi.current,e);return mi.current=void 0,t}function dP(e,t,n,r){if(typeof e=="function")return uP(e);const o=typeof t=="function"?t:cP(t,n,r);return Array.isArray(e)?Km(e,o):Km([e],([i])=>o(i))}function Km(e,t){const n=Zn(()=>[]);return qm(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Zm(e,t=0){return xt(e)?e:Or(t)}function fP({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...s},a){const l=Zn(()=>Ht(r)),c=b.useContext(Ym),u={x:Zm(t.x),y:Zm(t.y)},d=dP([u.x,u.y],([m,g])=>m||g?1:"unset");tn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:h,updateOrder:p}=c;return x.jsx(l,{drag:f,...s,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(m,g)=>{const{velocity:v}=g;v[f]&&p(n,u[f].get(),v[f]),o&&o(m,g)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const hP=b.forwardRef(fP),zs={Group:oP,Item:hP};class pP{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 mP=()=>new pP;function gP(){return Zn(mP)}/**
5
13
  * @license lucide-react v0.414.0 - ISC
6
14
  *
7
15
  * This source code is licensed under the ISC license.
8
16
  * See the LICENSE file in the root directory of this source tree.
9
- */const I1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Xf=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
17
+ */const yP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Xm=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
10
18
  * @license lucide-react v0.414.0 - ISC
11
19
  *
12
20
  * This source code is licensed under the ISC license.
13
21
  * See the LICENSE file in the root directory of this source tree.
14
- */var _1={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"};/**
22
+ */var vP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
15
23
  * @license lucide-react v0.414.0 - ISC
16
24
  *
17
25
  * This source code is licensed under the ISC license.
18
26
  * See the LICENSE file in the root directory of this source tree.
19
- */const A1=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>b.createElement("svg",{ref:l,..._1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Xf("lucide",o),...a},[...i.map(([c,u])=>b.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
27
+ */const bP=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>b.createElement("svg",{ref:l,...vP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Xm("lucide",o),...a},[...s.map(([c,u])=>b.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
20
28
  * @license lucide-react v0.414.0 - ISC
21
29
  *
22
30
  * This source code is licensed under the ISC license.
23
31
  * See the LICENSE file in the root directory of this source tree.
24
- */const st=(e,t)=>{const n=b.forwardRef(({className:r,...o},s)=>b.createElement(A1,{ref:s,iconNode:t,className:Xf(`lucide-${I1(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
32
+ */const at=(e,t)=>{const n=b.forwardRef(({className:r,...o},i)=>b.createElement(bP,{ref:i,iconNode:t,className:Xm(`lucide-${yP(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
25
33
  * @license lucide-react v0.414.0 - ISC
26
34
  *
27
35
  * This source code is licensed under the ISC license.
28
36
  * See the LICENSE file in the root directory of this source tree.
29
- */const D1=st("ArrowDown01",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
37
+ */const wP=at("ArrowDown01",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
30
38
  * @license lucide-react v0.414.0 - ISC
31
39
  *
32
40
  * This source code is licensed under the ISC license.
33
41
  * See the LICENSE file in the root directory of this source tree.
34
- */const M1=st("ArrowUp01",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
42
+ */const xP=at("ArrowUp01",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
35
43
  * @license lucide-react v0.414.0 - ISC
36
44
  *
37
45
  * This source code is licensed under the ISC license.
38
46
  * See the LICENSE file in the root directory of this source tree.
39
- */const Qf=st("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
47
+ */const Qm=at("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
40
48
  * @license lucide-react v0.414.0 - ISC
41
49
  *
42
50
  * This source code is licensed under the ISC license.
43
51
  * See the LICENSE file in the root directory of this source tree.
44
- */const N1=st("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
52
+ */const TP=at("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
45
53
  * @license lucide-react v0.414.0 - ISC
46
54
  *
47
55
  * This source code is licensed under the ISC license.
48
56
  * See the LICENSE file in the root directory of this source tree.
49
- */const Jf=st("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
57
+ */const Jm=at("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
50
58
  * @license lucide-react v0.414.0 - ISC
51
59
  *
52
60
  * This source code is licensed under the ISC license.
53
61
  * See the LICENSE file in the root directory of this source tree.
54
- */const F1=st("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
62
+ */const SP=at("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
55
63
  * @license lucide-react v0.414.0 - ISC
56
64
  *
57
65
  * This source code is licensed under the ISC license.
58
66
  * See the LICENSE file in the root directory of this source tree.
59
- */const kl=st("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
67
+ */const Oc=at("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
60
68
  * @license lucide-react v0.414.0 - ISC
61
69
  *
62
70
  * This source code is licensed under the ISC license.
63
71
  * See the LICENSE file in the root directory of this source tree.
64
- */const L1=st("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
72
+ */const EP=at("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
65
73
  * @license lucide-react v0.414.0 - ISC
66
74
  *
67
75
  * This source code is licensed under the ISC license.
68
76
  * See the LICENSE file in the root directory of this source tree.
69
- */const eh=st("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
77
+ */const eg=at("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
70
78
  * @license lucide-react v0.414.0 - ISC
71
79
  *
72
80
  * This source code is licensed under the ISC license.
73
81
  * See the LICENSE file in the root directory of this source tree.
74
- */const V1=st("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
82
+ */const CP=at("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
75
83
  * @license lucide-react v0.414.0 - ISC
76
84
  *
77
85
  * This source code is licensed under the ISC license.
78
86
  * See the LICENSE file in the root directory of this source tree.
79
- */const $1=st("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
87
+ */const PP=at("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
80
88
  * @license lucide-react v0.414.0 - ISC
81
89
  *
82
90
  * This source code is licensed under the ISC license.
83
91
  * See the LICENSE file in the root directory of this source tree.
84
- */const R1=st("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
92
+ */const kP=at("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
85
93
  * @license lucide-react v0.414.0 - ISC
86
94
  *
87
95
  * This source code is licensed under the ISC license.
88
96
  * See the LICENSE file in the root directory of this source tree.
89
- */const j1=st("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
97
+ */const tg=at("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
90
98
  * @license lucide-react v0.414.0 - ISC
91
99
  *
92
100
  * This source code is licensed under the ISC license.
93
101
  * See the LICENSE file in the root directory of this source tree.
94
- */const B1=st("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
102
+ */const OP=at("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
95
103
  * @license lucide-react v0.414.0 - ISC
96
104
  *
97
105
  * This source code is licensed under the ISC license.
98
106
  * See the LICENSE file in the root directory of this source tree.
99
- */const Ol=st("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
107
+ */const Ic=at("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
100
108
  * @license lucide-react v0.414.0 - ISC
101
109
  *
102
110
  * This source code is licensed under the ISC license.
103
111
  * See the LICENSE file in the root directory of this source tree.
104
- */const z1=st("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
112
+ */const IP=at("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
105
113
  * @license lucide-react v0.414.0 - ISC
106
114
  *
107
115
  * This source code is licensed under the ISC license.
108
116
  * See the LICENSE file in the root directory of this source tree.
109
- */const to=st("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
117
+ */const po=at("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
110
118
  * @license lucide-react v0.414.0 - ISC
111
119
  *
112
120
  * This source code is licensed under the ISC license.
113
121
  * See the LICENSE file in the root directory of this source tree.
114
- */const W1=st("Ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);/**
122
+ */const AP=at("Ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);/**
115
123
  * @license lucide-react v0.414.0 - ISC
116
124
  *
117
125
  * This source code is licensed under the ISC license.
118
126
  * See the LICENSE file in the root directory of this source tree.
119
- */const H1=st("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
127
+ */const _P=at("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
120
128
  * @license lucide-react v0.414.0 - ISC
121
129
  *
122
130
  * This source code is licensed under the ISC license.
123
131
  * See the LICENSE file in the root directory of this source tree.
124
- */const th=st("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
132
+ */const ng=at("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
125
133
  * @license lucide-react v0.414.0 - ISC
126
134
  *
127
135
  * This source code is licensed under the ISC license.
128
136
  * See the LICENSE file in the root directory of this source tree.
129
- */const U1=st("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),no=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),mi=b.createContext({}),gi=b.createContext(null),Il=typeof document<"u",yi=Il?b.useLayoutEffect:b.useEffect,nh=b.createContext({strict:!1}),vi=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),rh="data-"+vi("framerAppearId"),G1={skipAnimations:!1,useManualTiming:!1};function Y1(e){let t=new Set,n=new Set,r=!1,o=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function a(c){s.has(c)&&(l.schedule(c),e()),c(i)}const l={schedule:(c,u=!1,d=!1)=>{const h=d&&r?t:n;return u&&s.add(c),h.has(c)||h.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(i=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const bi=["read","resolveKeyframes","update","preRender","render","postRender"],q1=40;function oh(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=bi.reduce((v,w)=>(v[w]=Y1(s),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,q1),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:bi.reduce((v,w)=>{const g=i[w];return v[w]=(S,T=!1,E=!1)=>(n||p(),g.schedule(S,T,E)),v},{}),cancel:v=>{for(let w=0;w<bi.length;w++)i[bi[w]].cancel(v)},state:o,steps:i}}const{schedule:_l,cancel:KL}=oh(queueMicrotask,!1);function ro(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const sh=b.createContext({});let ih=!1;function K1(e,t,n,r,o){const{visualElement:s}=b.useContext(mi),i=b.useContext(nh),a=b.useContext(gi),l=b.useContext(no).reducedMotion,c=b.useRef();r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=b.useContext(sh);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&X1(c.current,n,o,d),b.useInsertionEffect(()=>{u&&u.update(n,a)});const f=b.useRef(!!(n[rh]&&!window.HandoffComplete));return yi(()=>{u&&(u.updateFeatures(),_l.render(u.render),f.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(f.current=!1,ih||(ih=!0,queueMicrotask(Z1))))}),u}function Z1(){window.HandoffComplete=!0}function X1(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:ah(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&ro(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function ah(e){if(e)return e.options.allowProjection!==!1?e.projection:ah(e.parent)}function Q1(e,t,n){return b.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ro(n)&&(n.current=r))},[t])}function rs(e){return typeof e=="string"||Array.isArray(e)}function os(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Al=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Dl=["initial",...Al];function wi(e){return os(e.animate)||Dl.some(t=>rs(e[t]))}function lh(e){return!!(wi(e)||e.variants)}function J1(e,t){if(wi(e)){const{initial:n,animate:r}=e;return{initial:n===!1||rs(n)?n:void 0,animate:rs(r)?r:void 0}}return e.inherit!==!1?t:{}}function eT(e){const{initial:t,animate:n}=J1(e,b.useContext(mi));return b.useMemo(()=>({initial:t,animate:n}),[ch(t),ch(n)])}function ch(e){return Array.isArray(e)?e.join(" "):e}const uh={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},oo={};for(const e in uh)oo[e]={isEnabled:t=>uh[e].some(n=>!!t[n])};function tT(e){for(const t in e)oo[t]={...oo[t],...e[t]}}const ss=b.createContext({}),nT=Symbol.for("motionComponentSymbol"),wt=e=>e;let so=wt,en=wt;process.env.NODE_ENV!=="production"&&(so=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},en=(e,t)=>{if(!e)throw new Error(t)});function rT({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&tT(e);function s(a,l){let c;const u={...b.useContext(no),...a,layoutId:oT(a)},{isStatic:d}=u,f=eT(a),h=r(a,d);if(!d&&Il){sT(u,e);const p=iT(u);c=p.MeasureLayout,f.visualElement=K1(o,h,u,t,p.ProjectionNode)}return x.jsxs(mi.Provider,{value:f,children:[c&&f.visualElement?x.jsx(c,{visualElement:f.visualElement,...u}):null,n(o,a,Q1(h,f.visualElement,l),h,d,f.visualElement)]})}const i=b.forwardRef(s);return i[nT]=o,i}function oT({layoutId:e}){const t=b.useContext(ss).id;return t&&e!==void 0?t+"-"+e:e}function sT(e,t){const n=b.useContext(nh).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?so(!1,r):en(!1,r)}}function iT(e){const{drag:t,layout:n}=oo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function aT(e){function t(r,o={}){return rT(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const lT=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ml(e){return typeof e!="string"||e.includes("-")?!1:!!(lT.indexOf(e)>-1||/[A-Z]/u.test(e))}const xi={};function cT(e){Object.assign(xi,e)}const is=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Yn=new Set(is);function dh(e,{layout:t,layoutId:n}){return Yn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!xi[e]||e==="opacity")}const xt=e=>!!(e&&e.getVelocity),uT={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},dT=is.length;function fT(e,t,n){let r="";for(let o=0;o<dT;o++){const s=is[o];if(e[s]!==void 0){const i=uT[s]||s;r+=`${i}(${e[s]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const fh=e=>t=>typeof t=="string"&&t.startsWith(e),hh=fh("--"),hT=fh("var(--"),Nl=e=>hT(e)?pT.test(e.split("/*")[0].trim()):!1,pT=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mT=(e,t)=>t&&typeof e=="number"?t.transform(e):e,qn=(e,t,n)=>n>t?t:n<e?e:n,io={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},as={...io,transform:e=>qn(0,1,e)},Ti={...io,default:1},ls=e=>Math.round(e*1e5)/1e5,Fl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,gT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,yT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function cs(e){return typeof e=="string"}function vT(e){return e==null}const us=e=>({test:t=>cs(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kn=us("deg"),dn=us("%"),fe=us("px"),bT=us("vh"),wT=us("vw"),ph={...dn,parse:e=>dn.parse(e)/100,transform:e=>dn.transform(e*100)},mh={...io,transform:Math.round},gh={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,size:fe,top:fe,right:fe,bottom:fe,left:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,rotate:Kn,rotateX:Kn,rotateY:Kn,rotateZ:Kn,scale:Ti,scaleX:Ti,scaleY:Ti,scaleZ:Ti,skew:Kn,skewX:Kn,skewY:Kn,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:as,originX:ph,originY:ph,originZ:fe,zIndex:mh,backgroundPositionX:fe,backgroundPositionY:fe,fillOpacity:as,strokeOpacity:as,numOctaves:mh};function Ll(e,t,n){const{style:r,vars:o,transform:s,transformOrigin:i}=e;let a=!1,l=!1,c=!0;for(const u in t){const d=t[u];if(hh(u)){o[u]=d;continue}const f=gh[u],h=mT(d,f);if(Yn.has(u)){if(a=!0,s[u]=h,!c)continue;d!==(f.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,i[u]=h):r[u]=h}if(t.transform||(a||n?r.transform=fT(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:d="50%",originZ:f=0}=i;r.transformOrigin=`${u} ${d} ${f}`}}const Vl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yh(e,t,n){for(const r in t)!xt(t[r])&&!dh(r,n)&&(e[r]=t[r])}function xT({transformTemplate:e},t){return b.useMemo(()=>{const n=Vl();return Ll(n,t,e),Object.assign({},n.vars,n.style)},[t])}function TT(e,t){const n=e.style||{},r={};return yh(r,n,e),Object.assign(r,xT(e,t)),r}function ST(e,t){const n={},r=TT(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 ET=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Si(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ET.has(e)}let vh=e=>!Si(e);function bh(e){e&&(vh=t=>t.startsWith("on")?!Si(t):e(t))}try{bh(require("@emotion/is-prop-valid").default)}catch{}function CT(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(vh(o)||n===!0&&Si(o)||!t&&!Si(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function wh(e,t,n){return typeof e=="string"?e:fe.transform(t+n*e)}function PT(e,t,n){const r=wh(t,e.x,e.width),o=wh(n,e.y,e.height);return`${r} ${o}`}const kT={offset:"stroke-dashoffset",array:"stroke-dasharray"},OT={offset:"strokeDashoffset",array:"strokeDasharray"};function IT(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?kT:OT;e[s.offset]=fe.transform(-r);const i=fe.transform(t),a=fe.transform(n);e[s.array]=`${i} ${a}`}function $l(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Ll(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=PT(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&IT(f,i,a,l,!1)}const xh=()=>({...Vl(),attrs:{}}),Rl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function _T(e,t,n,r){const o=b.useMemo(()=>{const s=xh();return $l(s,t,Rl(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};yh(s,e.style,e),o.style={...s,...o.style}}return o}function AT(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Ml(n)?_T:ST)(r,s,i,n),c=CT(r,typeof n=="string",e),u=n!==b.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=b.useMemo(()=>xt(d)?d.get():d,[d]);return b.createElement(n,{...u,children:f})}}function Th(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 Sh=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 Eh(e,t,n,r){Th(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Sh.has(o)?o:vi(o),t.attrs[o])}function jl(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(xt(o[i])||t.style&&xt(t.style[i])||dh(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),s}function Ch(e,t,n){const r=jl(e,t,n);for(const o in e)if(xt(e[o])||xt(t[o])){const s=is.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}function Ph(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Bl(e,t,n,r){if(typeof t=="function"){const[o,s]=Ph(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]=Ph(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function Zn(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const zl=e=>Array.isArray(e),DT=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),MT=e=>zl(e)?e[e.length-1]||0:e;function Ei(e){const t=xt(e)?e.get():e;return DT(t)?t.toValue():t}const kh=new Set(["opacity","clipPath","filter","transform"]);function Oh(e){if(Yn.has(e))return"transform";if(kh.has(e))return vi(e)}function Ci(e,t){e.indexOf(t)===-1&&e.push(t)}function Pi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function NT([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[s]=e.splice(t,1);e.splice(o,0,s)}return e}function FT({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,s,i,a){const l={latestValues:VT(o,s,i,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Ih=e=>(t,n)=>{const r=b.useContext(mi),o=b.useContext(gi),s=()=>FT(e,t,r,o,n);return n?s():Zn(s)};function LT(e,t){const n=Oh(t);n&&Ci(e,n)}function _h(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const s=Bl(e,r[o]);if(s){const{transitionEnd:i,transition:a,...l}=s;n(l,i)}}}function VT(e,t,n,r,o){var s;const i={},a=[],l=r&&((s=e.style)===null||s===void 0?void 0:s.willChange)===void 0,c=o(e,{});for(const y in c)i[y]=Ei(c[y]);let{initial:u,animate:d}=e;const f=wi(e),h=lh(e);t&&h&&!f&&e.inherit!==!1&&(u===void 0&&(u=t.initial),d===void 0&&(d=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?d:u;return m&&typeof m!="boolean"&&!os(m)&&_h(e,m,(y,v)=>{for(const w in y){let g=y[w];if(Array.isArray(g)){const S=p?g.length-1:0;g=g[S]}g!==null&&(i[w]=g)}for(const w in v)i[w]=v[w]}),l&&(d&&u!==!1&&!os(d)&&_h(e,d,y=>{for(const v in y)LT(a,v)}),a.length&&(i.willChange=a.join(","))),i}const{schedule:Ae,cancel:fn,state:Tt,steps:Wl}=oh(typeof requestAnimationFrame<"u"?requestAnimationFrame:wt,!0),$T={useVisualState:Ih({scrapeMotionValuesFromProps:Ch,createRenderState:xh,onMount:(e,t,{renderState:n,latestValues:r})=>{Ae.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Ae.render(()=>{$l(n,r,Rl(t.tagName),e.transformTemplate),Eh(t,n)})}})},RT={useVisualState:Ih({applyWillChange:!0,scrapeMotionValuesFromProps:jl,createRenderState:Vl})};function jT(e,{forwardMotionProps:t=!1},n,r){return{...Ml(e)?$T:RT,preloadedFeatures:n,useRender:AT(t),createVisualElement:r,Component:e}}function On(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Ah=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ki(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const BT=e=>t=>Ah(t)&&e(t,ki(t));function In(e,t,n,r){return On(e,t,BT(n),r)}const zT=(e,t)=>n=>t(e(n)),_n=(...e)=>e.reduce(zT);function Dh(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Mh=Dh("dragHorizontal"),Nh=Dh("dragVertical");function Fh(e){let t=!1;if(e==="y")t=Nh();else if(e==="x")t=Mh();else{const n=Mh(),r=Nh();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Lh(){const e=Fh(!0);return e?(e(),!1):!0}class Xn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Vh(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(s,i)=>{if(s.pointerType==="touch"||Lh())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Ae.postRender(()=>l(s,i))};return In(e.current,n,o,{passive:!e.getProps()[r]})}class WT extends Xn{mount(){this.unmount=_n(Vh(this.node,!0),Vh(this.node,!1))}unmount(){}}class HT extends Xn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_n(On(this.node.current,"focus",()=>this.onFocus()),On(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const $h=(e,t)=>t?e===t?!0:$h(e,t.parentElement):!1;function Hl(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,ki(n))}class UT extends Xn{constructor(){super(...arguments),this.removeStartListeners=wt,this.removeEndListeners=wt,this.removeAccessibleListeners=wt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=In(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:d}=this.node.getProps(),f=!d&&!$h(this.node.current,a.target)?u:c;f&&Ae.update(()=>f(a,l))},{passive:!(r.onTap||r.onPointerUp)}),i=In(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=_n(s,i),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const i=a=>{a.key!=="Enter"||!this.checkPressEnd()||Hl("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Ae.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=On(this.node.current,"keyup",i),Hl("down",(a,l)=>{this.startPress(a,l)})},n=On(this.node.current,"keydown",t),r=()=>{this.isPressing&&Hl("cancel",(s,i)=>this.cancelPress(s,i))},o=On(this.node.current,"blur",r);this.removeAccessibleListeners=_n(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Ae.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Lh()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Ae.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=In(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=On(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_n(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ul=new WeakMap,Gl=new WeakMap,GT=e=>{const t=Ul.get(e.target);t&&t(e)},YT=e=>{e.forEach(GT)};function qT({root:e,...t}){const n=e||document;Gl.has(n)||Gl.set(n,{});const r=Gl.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(YT,{root:e,...t})),r[o]}function KT(e,t,n){const r=qT(t);return Ul.set(e,n),r.observe(e),()=>{Ul.delete(e),r.unobserve(e)}}const ZT={some:0,all:1};class XT extends Xn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:ZT[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 KT(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(QT(t,n))&&this.startObserver()}unmount(){}}function QT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const JT={inView:{Feature:XT},tap:{Feature:UT},focus:{Feature:HT},hover:{Feature:WT}};function Rh(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Oi(e,t,n){const r=e.getProps();return Bl(r,t,n!==void 0?n:r.custom,e)}const An=e=>e*1e3,Dn=e=>e/1e3,eS={type:"spring",stiffness:500,damping:25,restSpeed:10},tS=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),nS={type:"keyframes",duration:.8},rS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},oS=(e,{keyframes:t})=>t.length>2?nS:Yn.has(e)?e.startsWith("scale")?tS(t[1]):eS:rS;function sS({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Yl(e,t){return e[t]||e.default||e}const iS=e=>e!==null;function Ii(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(iS),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}let _i;function aS(){_i=void 0}const Qn={now:()=>(_i===void 0&&Qn.set(Tt.isProcessing||G1.useManualTiming?Tt.timestamp:performance.now()),_i),set:e=>{_i=e,queueMicrotask(aS)}},jh=e=>/^0[^.\s]+$/u.test(e);function lS(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||jh(e):!0}const Bh=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),cS=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function uS(e){const t=cS.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const dS=4;function zh(e,t,n=1){en(n<=dS,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=uS(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Bh(i)?parseFloat(i):i}return Nl(o)?zh(o,t,n+1):o}const fS=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Wh=e=>e===io||e===fe,Hh=(e,t)=>parseFloat(e.split(", ")[t]),Uh=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Hh(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?Hh(s[1],e):0}},hS=new Set(["x","y","z"]),pS=is.filter(e=>!hS.has(e));function mS(e){const t=[];return pS.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ao={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Uh(4,13),y:Uh(5,14)};ao.translateX=ao.x,ao.translateY=ao.y;const Gh=e=>t=>t.test(e),Yh=[io,fe,dn,Kn,wT,bT,{test:e=>e==="auto",parse:e=>e}],qh=e=>Yh.find(Gh(e)),Tr=new Set;let ql=!1,Kl=!1;function Kh(){if(Kl){const e=Array.from(Tr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=mS(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Kl=!1,ql=!1,Tr.forEach(e=>e.complete()),Tr.clear()}function Zh(){Tr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Kl=!0)})}function gS(){Zh(),Kh()}class Zl{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Tr.add(this),ql||(ql=!0,Ae.read(Zh),Ae.resolveKeyframes(Kh))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Tr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Tr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Xl=(e,t)=>n=>!!(cs(n)&&yT.test(n)&&n.startsWith(e)||t&&!vT(n)&&Object.prototype.hasOwnProperty.call(n,t)),Xh=(e,t,n)=>r=>{if(!cs(r))return r;const[o,s,i,a]=r.match(Fl);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},yS=e=>qn(0,255,e),Ql={...io,transform:e=>Math.round(yS(e))},Sr={test:Xl("rgb","red"),parse:Xh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ql.transform(e)+", "+Ql.transform(t)+", "+Ql.transform(n)+", "+ls(as.transform(r))+")"};function vS(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Jl={test:Xl("#"),parse:vS,transform:Sr.transform},lo={test:Xl("hsl","hue"),parse:Xh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+dn.transform(ls(t))+", "+dn.transform(ls(n))+", "+ls(as.transform(r))+")"},It={test:e=>Sr.test(e)||Jl.test(e)||lo.test(e),parse:e=>Sr.test(e)?Sr.parse(e):lo.test(e)?lo.parse(e):Jl.parse(e),transform:e=>cs(e)?e:e.hasOwnProperty("red")?Sr.transform(e):lo.transform(e)};function bS(e){var t,n;return isNaN(e)&&cs(e)&&(((t=e.match(Fl))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(gT))===null||n===void 0?void 0:n.length)||0)>0}const Qh="number",Jh="color",wS="var",xS="var(",ep="${}",TS=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ds(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(TS,l=>(It.test(l)?(r.color.push(s),o.push(Jh),n.push(It.parse(l))):l.startsWith(xS)?(r.var.push(s),o.push(wS),n.push(l)):(r.number.push(s),o.push(Qh),n.push(parseFloat(l))),++s,ep)).split(ep);return{values:n,split:a,indexes:r,types:o}}function tp(e){return ds(e).values}function np(e){const{split:t,types:n}=ds(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===Qh?s+=ls(o[i]):a===Jh?s+=It.transform(o[i]):s+=o[i]}return s}}const SS=e=>typeof e=="number"?0:e;function ES(e){const t=tp(e);return np(e)(t.map(SS))}const Jn={test:bS,parse:tp,createTransformer:np,getAnimatableNone:ES},CS=new Set(["brightness","contrast","saturate","opacity"]);function PS(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Fl)||[];if(!r)return e;const o=n.replace(r,"");let s=CS.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const kS=/\b([a-z-]*)\(.*?\)/gu,ec={...Jn,getAnimatableNone:e=>{const t=e.match(kS);return t?t.map(PS).join(" "):e}},OS={...gh,color:It,backgroundColor:It,outlineColor:It,fill:It,stroke:It,borderColor:It,borderTopColor:It,borderRightColor:It,borderBottomColor:It,borderLeftColor:It,filter:ec,WebkitFilter:ec},tc=e=>OS[e];function rp(e,t){let n=tc(e);return n!==ec&&(n=Jn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const IS=new Set(["auto","none","0"]);function _S(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!IS.has(s)&&ds(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=rp(n,o)}class op extends Zl{constructor(t,n,r,o){super(t,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Nl(c))){const u=zh(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!fS.has(r)||t.length!==2)return;const[o,s]=t,i=qh(o),a=qh(s);if(i!==a)if(Wh(i)&&Wh(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++)lS(t[o])&&r.push(o);r.length&&_S(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ao[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=ao[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function sp(e){let t;return()=>(t===void 0&&(t=e()),t)}const ip=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Jn.test(e)||e==="0")&&!e.startsWith("url("));function AS(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 DS(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=ip(o,t),a=ip(s,t);return so(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:AS(e)||n==="spring"&&r}class ap{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&gS(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!DS(t,r,o,s))if(i)this.options.duration=0;else{l==null||l(Ii(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function lp(e,t){return t?e*(1e3/t):0}const MS=5;function cp(e,t,n){const r=Math.max(t-MS,0);return lp(n-e(r),t-r)}const nc=.001,NS=.01,up=10,FS=.05,LS=1;function VS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;so(e<=An(up),"Spring duration must be 10 seconds or less");let i=1-t;i=qn(FS,LS,i),e=qn(NS,up,Dn(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=rc(c,i),p=Math.exp(-d);return nc-f/h*p},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=rc(Math.pow(c,2),i);return(-o(c)+nc>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-nc+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=RS(o,s,a);if(e=An(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const $S=12;function RS(e,t,n){let r=n;for(let o=1;o<$S;o++)r=r-e(r)/t(r);return r}function rc(e,t){return e*Math.sqrt(1-t*t)}const jS=["duration","bounce"],BS=["stiffness","damping","mass"];function dp(e,t){return t.some(n=>e[n]!==void 0)}function zS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!dp(e,BS)&&dp(e,jS)){const n=VS(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function fp({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],i={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:f}=zS({...r,velocity:-Dn(r.velocity||0)}),h=d||0,p=l/(2*Math.sqrt(a*c)),m=s-o,y=Dn(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),t||(t=v?.005:.5);let w;if(p<1){const g=rc(y,p);w=S=>{const T=Math.exp(-p*y*S);return s-T*((h+p*y*m)/g*Math.sin(g*S)+m*Math.cos(g*S))}}else if(p===1)w=g=>s-Math.exp(-y*g)*(m+(h+y*m)*g);else{const g=y*Math.sqrt(p*p-1);w=S=>{const T=Math.exp(-p*y*S),E=Math.min(g*S,300);return s-T*((h+p*y*m)*Math.sinh(E)+g*m*Math.cosh(E))/g}}return{calculatedDuration:f&&u||null,next:g=>{const S=w(g);if(f)i.done=g>=u;else{let T=h;g!==0&&(p<1?T=cp(w,g,S):T=0);const E=Math.abs(T)<=n,k=Math.abs(s-S)<=t;i.done=E&&k}return i.value=i.done?s:S,i}}}function hp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=n*t;const y=d+m,v=i===void 0?y:i(y);v!==y&&(m=v-d);const w=A=>-m*Math.exp(-A/r),g=A=>v+w(A),S=A=>{const D=w(A),O=g(A);f.done=Math.abs(D)<=c,f.value=f.done?v:O};let T,E;const k=A=>{h(f.value)&&(T=A,E=fp({keyframes:[f.value,p(f.value)],velocity:cp(g,A,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:A=>{let D=!1;return!E&&T===void 0&&(D=!0,S(A),k(A)),T!==void 0&&A>=T?E.next(A-T):(!D&&S(A),f)}}}const pp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,WS=1e-7,HS=12;function US(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=pp(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>WS&&++a<HS);return i}function fs(e,t,n,r){if(e===t&&n===r)return wt;const o=s=>US(s,0,1,e,n);return s=>s===0||s===1?s:pp(o(s),t,r)}const GS=fs(.42,0,1,1),YS=fs(0,0,.58,1),mp=fs(.42,0,.58,1),qS=e=>Array.isArray(e)&&typeof e[0]!="number",gp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yp=e=>t=>1-e(1-t),oc=e=>1-Math.sin(Math.acos(e)),vp=yp(oc),KS=gp(oc),bp=fs(.33,1.53,.69,.99),sc=yp(bp),ZS=gp(sc),wp={linear:wt,easeIn:GS,easeInOut:mp,easeOut:YS,circIn:oc,circInOut:KS,circOut:vp,backIn:sc,backInOut:ZS,backOut:bp,anticipate:e=>(e*=2)<1?.5*sc(e):.5*(2-Math.pow(2,-10*(e-1)))},xp=e=>{if(Array.isArray(e)){en(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return fs(t,n,r,o)}else if(typeof e=="string")return en(wp[e]!==void 0,`Invalid easing type '${e}'`),wp[e];return e},hs=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ze=(e,t,n)=>e+(t-e)*n;function ic(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function XS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=ic(l,a,e+1/3),s=ic(l,a,e),i=ic(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function Ai(e,t){return n=>n>0?t:e}const ac=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},QS=[Jl,Sr,lo],JS=e=>QS.find(t=>t.test(e));function Tp(e){const t=JS(e);if(so(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===lo&&(n=XS(n)),n}const Sp=(e,t)=>{const n=Tp(e),r=Tp(t);if(!n||!r)return Ai(e,t);const o={...n};return s=>(o.red=ac(n.red,r.red,s),o.green=ac(n.green,r.green,s),o.blue=ac(n.blue,r.blue,s),o.alpha=Ze(n.alpha,r.alpha,s),Sr.transform(o))},lc=new Set(["none","hidden"]);function eE(e,t){return lc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function tE(e,t){return n=>Ze(e,t,n)}function cc(e){return typeof e=="number"?tE:typeof e=="string"?Nl(e)?Ai:It.test(e)?Sp:oE:Array.isArray(e)?Ep:typeof e=="object"?It.test(e)?Sp:nE:Ai}function Ep(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>cc(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function nE(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=cc(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function rE(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 oE=(e,t)=>{const n=Jn.createTransformer(t),r=ds(e),o=ds(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?lc.has(e)&&!o.values.length||lc.has(t)&&!r.values.length?eE(e,t):_n(Ep(rE(r,o),o.values),n):(so(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Ai(e,t))};function Cp(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ze(e,t,n):cc(e)(e,t)}function sE(e,t,n){const r=[],o=n||Cp,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||wt:t;a=_n(l,a)}r.push(a)}return r}function Pp(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(en(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=sE(t,r,o),a=i.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const d=hs(e[u],e[u+1],c);return i[u](d)};return n?c=>l(qn(e[0],e[s-1],c)):l}function iE(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=hs(0,t,r);e.push(Ze(n,1,o))}}function aE(e){const t=[0];return iE(t,e.length-1),t}function lE(e,t){return e.map(n=>n*t)}function cE(e,t){return e.map(()=>t||mp).splice(0,e.length-1)}function Di({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=qS(r)?r.map(xp):xp(r),s={done:!1,value:t[0]},i=lE(n&&n.length===t.length?n:aE(t),e),a=Pp(i,t,{ease:Array.isArray(o)?o:cE(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const kp=2e4;function uE(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<kp;)t+=n,r=e.next(t);return t>=kp?1/0:t}const dE=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ae.update(t,!0),stop:()=>fn(t),now:()=>Tt.isProcessing?Tt.timestamp:Qn.now()}},fE={decay:hp,inertia:hp,tween:Di,keyframes:Di,spring:fp},hE=e=>e/100;class uc extends ap{constructor({KeyframeResolver:t=Zl,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:s}=this.options,i=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(s,i,r,o):this.resolver=new t(s,i,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=fE[n]||Di;let l,c;a!==Di&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&en(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=_n(hE,Cp(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=uE(u));const{calculatedDuration:d}=u,f=d+o,h=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),w=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,S=s;if(h){const A=Math.min(this.currentTime,u)/d;let D=Math.floor(A),O=A%1;!O&&A>=1&&(O=1),O===1&&D--,D=Math.min(D,h+1),!!(D%2)&&(p==="reverse"?(O=1-O,m&&(O-=m/d)):p==="mirror"&&(S=i)),g=qn(0,1,O)*d}const T=w?{done:!1,value:l[0]}:S.next(g);a&&(T.value=a(T.value));let{done:E}=T;!w&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&o!==void 0&&(T.value=Ii(l,this.options,o)),y&&y(T.value),k&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Dn(t.calculatedDuration):0}get time(){return Dn(this.currentTime)}set time(t){t=An(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Dn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=dE,onPlay:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Op=e=>Array.isArray(e)&&typeof e[0]=="number";function Ip(e){return!!(!e||typeof e=="string"&&e in dc||Op(e)||Array.isArray(e)&&e.every(Ip))}const ps=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,dc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ps([0,.65,.55,1]),circOut:ps([.55,0,1,.45]),backIn:ps([.31,.01,.66,-.59]),backOut:ps([.33,1.53,.69,.99])};function pE(e){return _p(e)||dc.easeOut}function _p(e){if(e)return Op(e)?ps(e):Array.isArray(e)?e.map(pE):dc[e]}function mE(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=_p(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const gE=sp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Mi=10,yE=2e4;function vE(e){return e.type==="spring"||!Ip(e.ease)}function bE(e,t){const n=new uc({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<yE;)r=n.sample(s),o.push(r.value),s+=Mi;return{times:void 0,keyframes:o,duration:s-Mi,ease:"linear"}}class Ap extends ap{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new op(o,(s,i)=>this.onKeyframesResolved(s,i),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:s,ease:i,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(vE(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,...p}=this.options,m=bE(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,s=m.times,i=m.ease,a="keyframes"}const u=mE(l.owner.current,c,t,{...this.options,duration:o,times:s,ease:i});return u.startTime=Qn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;l.set(Ii(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:s,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Dn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Dn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=An(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return wt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return wt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,...f}=this.options,h=new uc({...f,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),p=An(this.time);c.setWithVelocity(h.sample(p-Mi).value,h.sample(p).value,Mi)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;return gE()&&r&&kh.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}function wE(e,t){let n;const r=()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i};return Ae.update(r,!0),()=>fn(r)}const xE=sp(()=>window.ScrollTimeline!==void 0);class TE{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>{if(xE()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),wE(o=>{r.time=r.duration*o},t)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const fc=(e,t,n,r={},o,s,i)=>a=>{const l=Yl(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-An(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),i&&i()},onStop:i,name:e,motionValue:t,element:s?void 0:o};sS(l)||(d={...d,...oS(e,d)}),d.duration&&(d.duration=An(d.duration)),d.repeatDelay&&(d.repeatDelay=An(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!s&&t.get()!==void 0){const h=Ii(d.keyframes,l);if(h!==void 0)return Ae.update(()=>{d.onUpdate(h),d.onComplete()}),new TE([])}return!s&&Ap.supports(d)?new Ap(d):new uc(d)};class hc{constructor(){this.subscriptions=[]}add(t){return Ci(this.subscriptions,t),()=>Pi(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Dp=new Set;function pc(e,t,n){e||Dp.has(t)||(console.warn(t),Dp.add(t))}const Mp=30,SE=e=>!isNaN(parseFloat(e)),ms={current:void 0};class Np{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=Qn.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Qn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=SE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&pc(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new hc);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ae.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return ms.current&&ms.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Qn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Mp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Mp);return lp(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function co(e,t){return new Np(e,t)}function EE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,co(n))}function CE(e,t){const n=Oi(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=MT(s[i]);EE(e,i,a)}}function Fp(e){return e.getProps()[rh]}class PE extends Np{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=Oh(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const s=this.counts.get(n)-1;this.counts.set(n,s),s===0&&(Pi(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function kE(e){return!!(xt(e)&&e.add)}function mc(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new PE("auto"),e.addValue("willChange",r)),kE(r))return r.add(t)}function OE({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Lp(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&&OE(u,d))continue;const p={delay:n,elapsed:0,...Yl(i||{},d)};let m=!1;if(window.HandoffAppearAnimations){const v=Fp(e);if(v){const w=window.HandoffAppearAnimations(v,d,f,Ae);w!==null&&(p.elapsed=w,m=!0)}}f.start(fc(d,f,h,e.shouldReduceMotion&&Yn.has(d)?{type:!1}:p,e,m,mc(e,d)));const y=f.animation;y&&c.push(y)}return a&&Promise.all(c).then(()=>{Ae.update(()=>{a&&CE(e,a)})}),c}function gc(e,t,n={}){var r;const o=Oi(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(Lp(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return IE(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 IE(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(_E).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(gc(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function _E(e,t){return e.sortNodePosition(t)}function AE(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>gc(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=gc(e,t,n);else{const o=typeof t=="function"?Oi(e,t,n.custom):t;r=Promise.all(Lp(e,o,n))}return r.then(()=>{Ae.postRender(()=>{e.notify("AnimationComplete",t)})})}const DE=[...Al].reverse(),ME=Al.length;function NE(e){return t=>Promise.all(t.map(({animation:n,options:r})=>AE(e,n,r)))}function FE(e){let t=NE(e),n=Vp(),r=!0;const o=l=>(c,u)=>{var d;const f=Oi(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],f=new Set;let h={},p=1/0;for(let y=0;y<ME;y++){const v=DE[y],w=n[v],g=c[v]!==void 0?c[v]:u[v],S=rs(g),T=v===l?w.isActive:null;T===!1&&(p=y);let E=g===u[v]&&g!==c[v]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...h},!w.isActive&&T===null||!g&&!w.prevProp||os(g)||typeof g=="boolean")continue;let A=LE(w.prevProp,g)||v===l&&w.isActive&&!E&&S||y>p&&S,D=!1;const O=Array.isArray(g)?g:[g];let V=O.reduce(o(v),{});T===!1&&(V={});const{prevResolvedValues:F={}}=w,R={...F,...V},C=I=>{A=!0,f.has(I)&&(D=!0,f.delete(I)),w.needsAnimating[I]=!0;const M=e.getValue(I);M&&(M.liveStyle=!1)};for(const I in R){const M=V[I],L=F[I];if(h.hasOwnProperty(I))continue;let H=!1;zl(M)&&zl(L)?H=!Rh(M,L):H=M!==L,H?M!=null?C(I):f.add(I):M!==void 0&&f.has(I)?C(I):w.protectedKeys[I]=!0}w.prevProp=g,w.prevResolvedValues=V,w.isActive&&(h={...h,...V}),r&&e.blockInitialAnimation&&(A=!1),A&&(!E||D)&&d.push(...O.map(I=>({animation:I,options:{type:v}})))}if(f.size){const y={};f.forEach(v=>{const w=e.getBaseTarget(v),g=e.getValue(v);g&&(g.liveStyle=!0),y[v]=w??null}),d.push({animation:y})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Vp(),r=!0}}}function LE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Rh(t,e):!1}function Er(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Vp(){return{animate:Er(!0),whileInView:Er(),whileHover:Er(),whileTap:Er(),whileDrag:Er(),whileFocus:Er(),exit:Er()}}class VE extends Xn{constructor(t){super(t),t.animationState||(t.animationState=FE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();os(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let $E=0;class RE extends Xn{constructor(){super(...arguments),this.id=$E++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const jE={animation:{Feature:VE},exit:{Feature:RE}},$p=(e,t)=>Math.abs(e-t);function BE(e,t){const n=$p(e.x,t.x),r=$p(e.y,t.y);return Math.sqrt(n**2+r**2)}class Rp{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=vc(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=BE(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:p}=d,{timestamp:m}=Tt;this.history.push({...p,timestamp:m});const{onStart:y,onMove:v}=this.handlers;f||(y&&y(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=yc(f,this.transformPagePoint),Ae.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=vc(d.type==="pointercancel"?this.lastMoveEventInfo:yc(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,y),p&&p(d,y)},!Ah(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=ki(t),a=yc(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=Tt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,vc(a,this.history)),this.removeListeners=_n(In(this.contextWindow,"pointermove",this.handlePointerMove),In(this.contextWindow,"pointerup",this.handlePointerUp),In(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),fn(this.updatePoint)}}function yc(e,t){return t?{point:t(e.point)}:e}function jp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vc({point:e},t){return{point:e,delta:jp(e,Bp(t)),offset:jp(e,zE(t)),velocity:WE(t,.1)}}function zE(e){return e[0]}function Bp(e){return e[e.length-1]}function WE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Bp(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>An(t)));)n--;if(!r)return{x:0,y:0};const s=Dn(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}const zp=1e-4,HE=1-zp,UE=1+zp,Wp=.01,GE=0-Wp,YE=0+Wp;function Wt(e){return e.max-e.min}function qE(e,t,n){return Math.abs(e-t)<=n}function Hp(e,t,n,r=.5){e.origin=r,e.originPoint=Ze(t.min,t.max,e.origin),e.scale=Wt(n)/Wt(t),e.translate=Ze(n.min,n.max,e.origin)-e.originPoint,(e.scale>=HE&&e.scale<=UE||isNaN(e.scale))&&(e.scale=1),(e.translate>=GE&&e.translate<=YE||isNaN(e.translate))&&(e.translate=0)}function gs(e,t,n,r){Hp(e.x,t.x,n.x,r?r.originX:void 0),Hp(e.y,t.y,n.y,r?r.originY:void 0)}function Up(e,t,n){e.min=n.min+t.min,e.max=e.min+Wt(t)}function KE(e,t,n){Up(e.x,t.x,n.x),Up(e.y,t.y,n.y)}function Gp(e,t,n){e.min=t.min-n.min,e.max=e.min+Wt(t)}function ys(e,t,n){Gp(e.x,t.x,n.x),Gp(e.y,t.y,n.y)}function ZE(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ze(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ze(n,e,r.max):Math.min(e,n)),e}function Yp(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 XE(e,{top:t,left:n,bottom:r,right:o}){return{x:Yp(e.x,n,o),y:Yp(e.y,t,r)}}function qp(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 QE(e,t){return{x:qp(e.x,t.x),y:qp(e.y,t.y)}}function JE(e,t){let n=.5;const r=Wt(e),o=Wt(t);return o>r?n=hs(t.min,t.max-r,e.min):r>o&&(n=hs(e.min,e.max-o,t.min)),qn(0,1,n)}function eC(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const bc=.35;function tC(e=bc){return e===!1?e=0:e===!0&&(e=bc),{x:Kp(e,"left","right"),y:Kp(e,"top","bottom")}}function Kp(e,t,n){return{min:Zp(e,t),max:Zp(e,n)}}function Zp(e,t){return typeof e=="number"?e:e[t]||0}const Xp=()=>({translate:0,scale:1,origin:0,originPoint:0}),uo=()=>({x:Xp(),y:Xp()}),Qp=()=>({min:0,max:0}),it=()=>({x:Qp(),y:Qp()});function Zt(e){return[e("x"),e("y")]}function Jp({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function nC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function rC(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function wc(e){return e===void 0||e===1}function xc({scale:e,scaleX:t,scaleY:n}){return!wc(e)||!wc(t)||!wc(n)}function Cr(e){return xc(e)||em(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function em(e){return tm(e.x)||tm(e.y)}function tm(e){return e&&e!=="0%"}function Ni(e,t,n){const r=e-n,o=t*r;return n+o}function nm(e,t,n,r,o){return o!==void 0&&(e=Ni(e,o,r)),Ni(e,n,r)+t}function Tc(e,t=0,n=1,r,o){e.min=nm(e.min,t,n,r,o),e.max=nm(e.max,t,n,r,o)}function rm(e,{x:t,y:n}){Tc(e.x,t.translate,t.scale,t.originPoint),Tc(e.y,n.translate,n.scale,n.originPoint)}const om=.999999999999,sm=1.0000000000001;function oC(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&fo(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,rm(e,i)),r&&Cr(s.latestValues)&&fo(e,s.latestValues))}t.x<sm&&t.x>om&&(t.x=1),t.y<sm&&t.y>om&&(t.y=1)}function er(e,t){e.min=e.min+t,e.max=e.max+t}function im(e,t,n,r,o=.5){const s=Ze(e.min,e.max,o);Tc(e,t,n,s,r)}function fo(e,t){im(e.x,t.x,t.scaleX,t.scale,t.originX),im(e.y,t.y,t.scaleY,t.scale,t.originY)}function am(e,t){return Jp(rC(e.getBoundingClientRect(),t))}function sC(e,t,n){const r=am(e,n),{scroll:o}=t;return o&&(er(r.x,o.offset.x),er(r.y,o.offset.y)),r}const lm=({current:e})=>e?e.ownerDocument.defaultView:null,iC=new WeakMap;class aC{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=it(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ki(u,"page").point)},s=(u,d)=>{var f;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Fh(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Zt(v=>{let w=this.getAxisMotionValue(v).get()||0;if(dn.test(w)){const{projection:g}=this.visualElement;if(g&&g.layout){const S=g.layout.layoutBox[v];S&&(w=Wt(S)*(parseFloat(w)/100))}}this.originPoint[v]=w}),m&&Ae.postRender(()=>m(u,d)),(f=this.removeWillChange)===null||f===void 0||f.call(this),this.removeWillChange=mc(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:y}=d;if(h&&this.currentDirection===null){this.currentDirection=lC(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>Zt(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Rp(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:lm(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Ae.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Fi(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=ZE(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&ro(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=XE(o.layoutBox,n):this.constraints=!1,this.elastic=tC(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Zt(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=eC(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ro(t))return!1;const r=t.current;en(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=sC(r,o.root,this.visualElement.getTransformPagePoint());let i=QE(o.layout.layoutBox,s);if(n){const a=n(nC(i));this.hasMutatedConstraints=!!a,a&&(i=Jp(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Zt(u=>{if(!Fi(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(fc(t,r,0,n,this.visualElement,!1,mc(this.visualElement,t)))}stopAnimation(){Zt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Zt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Zt(n=>{const{drag:r}=this.getProps();if(!Fi(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-Ze(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ro(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Zt(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=JE({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Zt(i=>{if(!Fi(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Ze(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;iC.set(this.visualElement,this);const t=this.visualElement.current,n=In(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ro(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ae.read(r);const i=On(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Zt(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=bc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function Fi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function lC(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class cC extends Xn{constructor(t){super(t),this.removeGroupControls=wt,this.removeListeners=wt,this.controls=new aC(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 cm=e=>(t,n)=>{e&&Ae.postRender(()=>e(t,n))};class uC extends Xn{constructor(){super(...arguments),this.removePointerDownListener=wt}onPointerDown(t){this.session=new Rp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:lm(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:cm(t),onStart:cm(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&Ae.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=In(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function dC(){const e=b.useContext(gi);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=b.useId();return b.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const Li={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function um(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const n=um(e,t.target.x),r=um(e,t.target.y);return`${n}% ${r}%`}},fC={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Jn.parse(e);if(o.length>5)return r;const s=Jn.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=Ze(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class hC extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;cT(pC),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Li.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||Ae.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),_l.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function dm(e){const[t,n]=dC(),r=b.useContext(ss);return x.jsx(hC,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(sh),isPresent:t,safeToRemove:n})}const pC={borderRadius:{...vs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vs,borderTopRightRadius:vs,borderBottomLeftRadius:vs,borderBottomRightRadius:vs,boxShadow:fC},fm=["TopLeft","TopRight","BottomLeft","BottomRight"],mC=fm.length,hm=e=>typeof e=="string"?parseFloat(e):e,pm=e=>typeof e=="number"||fe.test(e);function gC(e,t,n,r,o,s){o?(e.opacity=Ze(0,n.opacity!==void 0?n.opacity:1,yC(r)),e.opacityExit=Ze(t.opacity!==void 0?t.opacity:1,0,vC(r))):s&&(e.opacity=Ze(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<mC;i++){const a=`border${fm[i]}Radius`;let l=mm(t,a),c=mm(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||pm(l)===pm(c)?(e[a]=Math.max(Ze(hm(l),hm(c),r),0),(dn.test(c)||dn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ze(t.rotate||0,n.rotate||0,r))}function mm(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const yC=gm(0,.5,vp),vC=gm(.5,.95,wt);function gm(e,t,n){return r=>r<e?0:r>t?1:n(hs(e,t,r))}function ym(e,t){e.min=t.min,e.max=t.max}function Xt(e,t){ym(e.x,t.x),ym(e.y,t.y)}function vm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function bm(e,t,n,r,o){return e-=t,e=Ni(e,1/n,r),o!==void 0&&(e=Ni(e,1/o,r)),e}function bC(e,t=0,n=1,r=.5,o,s=e,i=e){if(dn.test(t)&&(t=parseFloat(t),t=Ze(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Ze(s.min,s.max,r);e===s&&(a-=t),e.min=bm(e.min,t,n,a,o),e.max=bm(e.max,t,n,a,o)}function wm(e,t,[n,r,o],s,i){bC(e,t[n],t[r],t[o],t.scale,s,i)}const wC=["x","scaleX","originX"],xC=["y","scaleY","originY"];function xm(e,t,n,r){wm(e.x,t,wC,n?n.x:void 0,r?r.x:void 0),wm(e.y,t,xC,n?n.y:void 0,r?r.y:void 0)}function Tm(e){return e.translate===0&&e.scale===1}function Sm(e){return Tm(e.x)&&Tm(e.y)}function TC(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function Em(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Cm(e){return Wt(e.x)/Wt(e.y)}function Pm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class SC{constructor(){this.members=[]}add(t){Ci(this.members,t),t.scheduleRender()}remove(t){if(Pi(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function EC(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const CC=(e,t)=>e.depth-t.depth;class PC{constructor(){this.children=[],this.isDirty=!1}add(t){Ci(this.children,t),this.isDirty=!0}remove(t){Pi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(CC),this.isDirty=!1,this.children.forEach(t)}}function kC(e,t){const n=Qn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(fn(r),e(s-t))};return Ae.read(r,!0),()=>fn(r)}function OC(e){return e instanceof SVGElement&&e.tagName!=="svg"}function IC(e,t,n){const r=xt(e)?e:co(e);return r.start(fc("",r,t,n)),r.animation}const Pr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Sc=["","X","Y","Z"],_C={visibility:"hidden"},km=1e3;let AC=0;function Ec(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Om(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Fp(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?Om(e.parent):!1:!1}function Im({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=AC++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,window.MotionDebug&&(Pr.totalNodes=Pr.resolvedTargetDeltas=Pr.recalculatedProjection=0),this.nodes.forEach(NC),this.nodes.forEach(RC),this.nodes.forEach(jC),this.nodes.forEach(FC),window.MotionDebug&&window.MotionDebug.record(Pr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new PC)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new hc),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=OC(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=kC(f,250),Li.hasAnimatedSinceResize&&(Li.hasAnimatedSinceResize=!1,this.nodes.forEach(Am))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||UC,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),w=!this.targetLayout||!Em(this.targetLayout,p)||h,g=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const S={...Yl(m,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||Am(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,fn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(BC),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Om(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(_m);return}this.isUpdating||this.nodes.forEach(VC),this.isUpdating=!1,this.nodes.forEach($C),this.nodes.forEach(DC),this.nodes.forEach(MC),this.clearAllSnapshots();const a=Qn.now();Tt.delta=qn(0,1e3/60,a-Tt.timestamp),Tt.timestamp=a,Tt.isProcessing=!0,Wl.update.process(Tt),Wl.preRender.process(Tt),Wl.render.process(Tt),Tt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,_l.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(LC),this.sharedNodes.forEach(zC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ae.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ae.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=it(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:i,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Sm(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Cr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),GC(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return it();const a=i.measureViewportBox(),{scroll:l}=this.root;return l&&(er(a.x,l.offset.x),er(a.y,l.offset.y)),a}removeElementScroll(i){const a=it();Xt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;if(c!==this.root&&u&&d.layoutScroll){if(u.isRoot){Xt(a,i);const{scroll:f}=this.root;f&&(er(a.x,-f.offset.x),er(a.y,-f.offset.y))}er(a.x,u.offset.x),er(a.y,u.offset.y)}}return a}applyTransform(i,a=!1){const l=it();Xt(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&fo(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Cr(u.latestValues)&&fo(l,u.latestValues)}return Cr(this.latestValues)&&fo(l,this.latestValues),l}removeTransform(i){const a=it();Xt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Cr(c.latestValues))continue;xc(c.latestValues)&&c.updateSnapshot();const u=it(),d=c.measurePageBox();Xt(u,d),xm(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Cr(this.latestValues)&&xm(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Tt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Tt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=it(),this.relativeTargetOrigin=it(),ys(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=it(),this.targetWithTransforms=it()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),KE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Xt(this.target,this.layout.layoutBox),rm(this.target,this.targetDelta)):Xt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=it(),this.relativeTargetOrigin=it(),ys(this.relativeTargetOrigin,this.target,h.target),Xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&Pr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||xc(this.parent.latestValues)||em(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Tt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Xt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;oC(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=it());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(vm(this.prevProjectionDelta.x,this.projectionDelta.x),vm(this.prevProjectionDelta.y,this.projectionDelta.y)),gs(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Pm(this.projectionDelta.x,this.prevProjectionDelta.x)||!Pm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&Pr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),i){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=uo(),this.projectionDelta=uo(),this.projectionDeltaWithTransform=uo()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=uo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=it(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,y=this.getStack(),v=!y||y.members.length<=1,w=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(HC));this.animationProgress=0;let g;this.mixTargetDelta=S=>{const T=S/1e3;Dm(d.x,i.x,T),Dm(d.y,i.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ys(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),WC(this.relativeTarget,this.relativeTargetOrigin,f,T),g&&TC(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=it()),Xt(g,this.relativeTarget)),m&&(this.animationValues=u,gC(u,c,this.latestValues,T,w,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(fn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ae.update(()=>{Li.hasAnimatedSinceResize=!0,this.currentAnimation=IC(0,km,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(km),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&&Vm(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||it();const d=Wt(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=Wt(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}Xt(a,l),fo(a,u),gs(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new SC),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Ec("z",i,c,this.animationValues);for(let u=0;u<Sc.length;u++)Ec(`rotate${Sc[u]}`,i,c,this.animationValues),Ec(`skew${Sc[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return _C;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Ei(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Ei(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Cr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=EC(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in xi){if(f[m]===void 0)continue;const{correct:y,applyTo:v}=xi[m],w=c.transform==="none"?f[m]:y(f[m],d);if(v){const g=v.length;for(let S=0;S<g;S++)c[v[S]]=w}else c[m]=w}return this.options.layoutId&&(c.pointerEvents=d===this?Ei(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(_m),this.root.sharedNodes.clear()}}}function DC(e){e.updateLayout()}function MC(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?Zt(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=Wt(f);f.min=r[d].min,f.max=f.min+h}):Vm(s,n.layoutBox,r)&&Zt(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=Wt(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=uo();gs(a,r,n.layoutBox);const l=uo();i?gs(l,e.applyTransform(o,!0),n.measuredBox):gs(l,r,n.layoutBox);const c=!Sm(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=it();ys(p,n.layoutBox,f.layoutBox);const m=it();ys(m,r,h.layoutBox),Em(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function NC(e){window.MotionDebug&&Pr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function FC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function LC(e){e.clearSnapshot()}function _m(e){e.clearMeasurements()}function VC(e){e.isLayoutDirty=!1}function $C(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Am(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function RC(e){e.resolveTargetDelta()}function jC(e){e.calcProjection()}function BC(e){e.resetSkewAndRotation()}function zC(e){e.removeLeadSnapshot()}function Dm(e,t,n){e.translate=Ze(t.translate,0,n),e.scale=Ze(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Mm(e,t,n,r){e.min=Ze(t.min,n.min,r),e.max=Ze(t.max,n.max,r)}function WC(e,t,n,r){Mm(e.x,t.x,n.x,r),Mm(e.y,t.y,n.y,r)}function HC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const UC={duration:.45,ease:[.4,0,.1,1]},Nm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Fm=Nm("applewebkit/")&&!Nm("chrome/")?Math.round:wt;function Lm(e){e.min=Fm(e.min),e.max=Fm(e.max)}function GC(e){Lm(e.x),Lm(e.y)}function Vm(e,t,n){return e==="position"||e==="preserve-aspect"&&!qE(Cm(t),Cm(n),.2)}const YC=Im({attachResizeListener:(e,t)=>On(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Cc={current:void 0},$m=Im({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Cc.current){const e=new YC({});e.mount(window),e.setOptions({layoutScroll:!0}),Cc.current=e}return Cc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),qC={pan:{Feature:uC},drag:{Feature:cC,ProjectionNode:$m,MeasureLayout:dm}},Pc={current:null},Rm={current:!1};function KC(){if(Rm.current=!0,!!Il)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Pc.current=e.matches;e.addListener(t),t()}else Pc.current=!1}function ZC(e,t,n){for(const r in t){const o=t[r],s=n[r];if(xt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&pc(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(xt(s))e.addValue(r,co(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,co(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const jm=new WeakMap,XC=[...Yh,It,Jn],QC=e=>XC.find(Gh(e)),Bm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],JC=Dl.length;class eP{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.applyWillChange=!1,this.resolveKeyframes=(f,h,p,m)=>new this.KeyframeResolver(f,h,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Zl,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,Ae.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=wi(n),this.isVariantNode=lh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&xt(h)&&h.set(l[f],!1)}}mount(t){this.current=t,jm.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)),Rm.current||KC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Pc.current,process.env.NODE_ENV!=="production"&&pc(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){jm.delete(this.current),this.projection&&this.projection.unmount(),fn(this.notifyUpdate),fn(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){const r=Yn.has(t),o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Ae.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in oo){const n=oo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):it()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Bm.length;r++){const o=Bm[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=ZC(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<JC;r++){const o=Dl[r],s=this.props[o];(rs(s)||s===!1)&&(n[o]=s)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=co(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Bh(o)||jh(o))?o=parseFloat(o):!QC(o)&&Jn.test(n)&&(o=rp(t,n)),this.setBaseTarget(t,xt(o)?o.get():o)),xt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=Bl(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!xt(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new hc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class zm extends eP{constructor(){super(...arguments),this.KeyframeResolver=op}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function tP(e){return window.getComputedStyle(e)}class nP extends zm{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Th}readValueFromInstance(t,n){if(Yn.has(n)){const r=tc(n);return r&&r.default||0}else{const r=tP(t),o=(hh(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return am(t,n)}build(t,n,r){Ll(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return jl(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;xt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class rP extends zm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=it}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Yn.has(n)){const r=tc(n);return r&&r.default||0}return n=Sh.has(n)?n:vi(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Ch(t,n,r)}build(t,n,r){$l(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Eh(t,n,r,o)}mount(t){this.isSVGTag=Rl(t.tagName),super.mount(t)}}const oP=(e,t)=>Ml(e)?new rP(t):new nP(t,{allowProjection:e!==b.Fragment}),sP={...jE,...JT,...qC,...{layout:{ProjectionNode:$m,MeasureLayout:dm}}},Ht=aT((e,t)=>jT(e,t,sP,oP));function Wm(){const e=b.useRef(!1);return yi(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Hm(){const e=Wm(),[t,n]=b.useState(0),r=b.useCallback(()=>{e.current&&n(t+1)},[t]);return[b.useCallback(()=>Ae.postRender(r),[r]),t]}class iP extends _.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function aP({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),o=b.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=b.useContext(no);return b.useInsertionEffect(()=>{const{width:i,height:a,top:l,left:c}=o.current;if(t||!r.current||!i||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return s&&(u.nonce=s),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
130
- [data-motion-pop-id="${n}"] {
131
- position: absolute !important;
132
- width: ${i}px !important;
133
- height: ${a}px !important;
134
- top: ${l}px !important;
135
- left: ${c}px !important;
136
- }
137
- `),()=>{document.head.removeChild(u)}},[t]),x.jsx(iP,{isPresent:t,childRef:r,sizeRef:o,children:_.cloneElement(e,{ref:r})})}const kc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const a=Zn(lP),l=b.useId(),c=b.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const d of a.values())if(!d)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),s?[Math.random()]:[n]);return b.useMemo(()=>{a.forEach((u,d)=>a.set(d,!1))},[n]),_.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),i==="popLayout"&&(e=x.jsx(aP,{isPresent:n,children:e})),x.jsx(gi.Provider,{value:c,children:e})};function lP(){return new Map}function cP(e){return b.useEffect(()=>()=>e(),[])}const kr=e=>e.key||"";function uP(e,t){e.forEach(n=>{const r=kr(n);t.set(r,n)})}function dP(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const Vi=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:s=!0,mode:i="sync"})=>{en(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(ss).forceRender||Hm()[0],l=Wm(),c=dP(e);let u=c;const d=b.useRef(new Map).current,f=b.useRef(u),h=b.useRef(new Map).current,p=b.useRef(!0);if(yi(()=>{p.current=!1,uP(c,h),f.current=u}),cP(()=>{p.current=!0,h.clear(),d.clear()}),p.current)return x.jsx(x.Fragment,{children:u.map(w=>x.jsx(kc,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:s,mode:i,children:w},kr(w)))});u=[...u];const m=f.current.map(kr),y=c.map(kr),v=m.length;for(let w=0;w<v;w++){const g=m[w];y.indexOf(g)===-1&&!d.has(g)&&d.set(g,void 0)}return i==="wait"&&d.size&&(u=[]),d.forEach((w,g)=>{if(y.indexOf(g)!==-1)return;const S=h.get(g);if(!S)return;const T=m.indexOf(g);let E=w;if(!E){const k=()=>{d.delete(g);const A=Array.from(h.keys()).filter(D=>!y.includes(D));if(A.forEach(D=>h.delete(D)),f.current=c.filter(D=>{const O=kr(D);return O===g||A.includes(O)}),!d.size){if(l.current===!1)return;a(),r&&r()}};E=x.jsx(kc,{isPresent:!1,onExitComplete:k,custom:t,presenceAffectsLayout:s,mode:i,children:S},kr(S)),d.set(g,E)}u.splice(T,0,E)}),u=u.map(w=>{const g=w.key;return d.has(g)?w:x.jsx(kc,{isPresent:!0,presenceAffectsLayout:s,mode:i,children:w},kr(w))}),process.env.NODE_ENV!=="production"&&i==="wait"&&u.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x.jsx(x.Fragment,{children:d.size?u:u.map(w=>b.cloneElement(w))})};function fP({children:e,isValidProp:t,...n}){t&&bh(t),n={...b.useContext(no),...n},n.isStatic=Zn(()=>n.isStatic);const r=b.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(no.Provider,{value:r,children:e})}const hP=b.createContext(null),pP=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Um(){const e=new Set,t=new WeakMap,n=()=>e.forEach(pP);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 Gm=e=>e===!0,mP=e=>Gm(e===!0)||e==="id",gP=({children:e,id:t,inherit:n=!0})=>{const r=b.useContext(ss),o=b.useContext(hP),[s,i]=Hm(),a=b.useRef(null),l=r.id||o;a.current===null&&(mP(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:Gm(n)&&r.group||Um()});const c=b.useMemo(()=>({...a.current,forceRender:s}),[i]);return x.jsx(ss.Provider,{value:c,children:e})},Ym=b.createContext(null);function yP(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const s=r>0?1:-1,i=e[o+s];if(!i)return e;const a=e[o],l=i.layout,c=Ze(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?NT(e,o,o+s):e}function vP({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=Zn(()=>Ht(t)),l=[],c=b.useRef(!1);en(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,f)=>{const h=l.findIndex(p=>d===p.value);h!==-1?l[h].layout=f[n]:l.push({value:d,layout:f[n]}),l.sort(xP)},updateOrder:(d,f,h)=>{if(c.current)return;const p=yP(l,d,f,h);l!==p&&(c.current=!0,r(p.map(wP).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{c.current=!1}),x.jsx(a,{...s,ref:i,ignoreStrict:!0,children:x.jsx(Ym.Provider,{value:u,children:e})})}const bP=b.forwardRef(vP);function wP(e){return e.value}function xP(e,t){return e.layout.min-t.layout.min}function ho(e){const t=Zn(()=>co(e)),{isStatic:n}=b.useContext(no);if(n){const[,r]=b.useState(e);b.useEffect(()=>t.on("change",r),[])}return t}const TP=e=>e&&typeof e=="object"&&e.mix,SP=e=>TP(e)?e.mix:void 0;function EP(...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=Pp(o,s,{mixer:SP(s[0]),...i});return t?a(r):a}function qm(e,t){const n=ho(t()),r=()=>n.set(t());return r(),yi(()=>{const o=()=>Ae.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),fn(r)}}),n}function CP(e){ms.current=[],e();const t=qm(ms.current,e);return ms.current=void 0,t}function PP(e,t,n,r){if(typeof e=="function")return CP(e);const o=typeof t=="function"?t:EP(t,n,r);return Array.isArray(e)?Km(e,o):Km([e],([s])=>o(s))}function Km(e,t){const n=Zn(()=>[]);return qm(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Zm(e,t=0){return xt(e)?e:ho(t)}function kP({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=Zn(()=>Ht(r)),c=b.useContext(Ym),u={x:Zm(t.x),y:Zm(t.y)},d=PP([u.x,u.y],([m,y])=>m||y?1:"unset");en(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:h,updateOrder:p}=c;return x.jsx(l,{drag:f,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:s,onDrag:(m,y)=>{const{velocity:v}=y;v[f]&&p(n,u[f].get(),v[f]),o&&o(m,y)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const OP=b.forwardRef(kP),$i={Group:bP,Item:OP};class IP{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 _P=()=>new IP;function AP(){return Zn(_P)}const Xm={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},DP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Qm=e=>x.jsx(Ht.section,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:e.open,animate:e.open.toString(),"aria-hidden":!e.open,className:e.className,exit:Xm.false,transition:DP,variants:Xm,children:e.children}),MP=si("px-4 py-4 border relative rounded-lg text-sm",{variants:{theme:{neutral:"border-border bg-background",danger:"text-danger-contrast bg-danger/10 border-danger/50",success:"text-success-contrast bg-success/10 border-success/50"}},defaultVariants:{theme:"neutral"}}),NP=b.forwardRef(function({className:t,theme:n,onClose:r,open:o,...s},i){return x.jsx("div",{"data-open":!!o,"aria-hidden":!o,className:"data-[open=true]:mb-4 isolate data-[open=true]:pointer-events-auto pointer-events-none",children:x.jsx(Qm,{"data-open":!!o,open:!!o,children:x.jsxs(eo,{...s,className:pt(MP({theme:n}),t),ref:i,"data-theme":n,role:"alert",as:s.as??"div",children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[n==="success"?x.jsx(eh,{size:20}):null,n==="danger"?x.jsx(L1,{size:20}):null,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:s.title})]}),s.children,o!==void 0?x.jsx("button",{type:"button",onClick:()=>r==null?void 0:r(!1),className:"text-foreground hover:text-danger absolute right-3 top-3 transition-colors duration-300 ease-in-out",children:x.jsx(th,{size:20})}):null]})})})});function Be(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Ge(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function po(e,t){const n=Be(e);return isNaN(t)?Ge(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Ri(e,t){const n=Be(e);if(isNaN(t))return Ge(e,NaN);if(!t)return n;const r=n.getDate(),o=Ge(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const s=o.getDate();return r>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const Jm=6048e5,FP=864e5,LP=6e4,VP=36e5,$P=1e3;let RP={};function Or(){return RP}function hn(e,t){var a,l,c,u;const n=Or(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Be(e),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function mo(e){return hn(e,{weekStartsOn:1})}function eg(e){const t=Be(e),n=t.getFullYear(),r=Ge(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=mo(r),s=Ge(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=mo(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function go(e){const t=Be(e);return t.setHours(0,0,0,0),t}function ji(e){const t=Be(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function jP(e,t){const n=go(e),r=go(t),o=+n-ji(n),s=+r-ji(r);return Math.round((o-s)/FP)}function BP(e){const t=eg(e),n=Ge(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),mo(n)}function tg(e,t){const n=t*7;return po(e,n)}function ng(e,t){return Ri(e,t*12)}function zP(e){return Ge(e,Date.now())}function WP(e,t){const n=go(e),r=go(t);return+n==+r}function HP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function UP(e){if(!HP(e)&&typeof e!="number")return!1;const t=Be(e);return!isNaN(Number(t))}function rg(e,t){const n=Be(e.start),r=Be(e.end);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let a=1;const l=[];for(;+i<=s;)l.push(Be(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function og(e){const t=Be(e);return t.setDate(1),t.setHours(0,0,0,0),t}function GP(e){const t=Be(e),n=Ge(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function YP(e,t){var a,l;const n=Or(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=Be(e),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const qP={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},KP=(e,t,n)=>{let r;const o=qP[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Oc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const ZP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},XP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},QP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},JP={date:Oc({formats:ZP,defaultWidth:"full"}),time:Oc({formats:XP,defaultWidth:"full"}),dateTime:Oc({formats:QP,defaultWidth:"full"})},ek={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},tk=(e,t,n,r)=>ek[e];function bs(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const nk={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},rk={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ok={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},sk={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ik={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"}},ak={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"}},lk={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:bs({values:nk,defaultWidth:"wide"}),quarter:bs({values:rk,defaultWidth:"wide",argumentCallback:e=>e-1}),month:bs({values:ok,defaultWidth:"wide"}),day:bs({values:sk,defaultWidth:"wide"}),dayPeriod:bs({values:ik,defaultWidth:"wide",formattingValues:ak,defaultFormattingWidth:"wide"})};function ws(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?uk(a,d=>d.test(i)):ck(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 ck(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function uk(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function dk(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 fk=/^(\d+)(th|st|nd|rd)?/i,hk=/\d+/i,pk={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},mk={any:[/^b/i,/^(a|c)/i]},gk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},yk={any:[/1/i,/2/i,/3/i,/4/i]},vk={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},bk={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]},wk={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},xk={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]},Tk={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},Sk={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}},Ek={ordinalNumber:dk({matchPattern:fk,parsePattern:hk,valueCallback:e=>parseInt(e,10)}),era:ws({matchPatterns:pk,defaultMatchWidth:"wide",parsePatterns:mk,defaultParseWidth:"any"}),quarter:ws({matchPatterns:gk,defaultMatchWidth:"wide",parsePatterns:yk,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ws({matchPatterns:vk,defaultMatchWidth:"wide",parsePatterns:bk,defaultParseWidth:"any"}),day:ws({matchPatterns:wk,defaultMatchWidth:"wide",parsePatterns:xk,defaultParseWidth:"any"}),dayPeriod:ws({matchPatterns:Tk,defaultMatchWidth:"any",parsePatterns:Sk,defaultParseWidth:"any"})},sg={code:"en-US",formatDistance:KP,formatLong:JP,formatRelative:tk,localize:lk,match:Ek,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ck(e){const t=Be(e);return jP(t,GP(t))+1}function ig(e){const t=Be(e),n=+mo(t)-+BP(t);return Math.round(n/Jm)+1}function Ic(e,t){var u,d,f,h;const n=Be(e),r=n.getFullYear(),o=Or(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=Ge(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=hn(i,t),l=Ge(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=hn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function Pk(e,t){var a,l,c,u;const n=Or(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=Ic(e,t),s=Ge(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),hn(s,t)}function ag(e,t){const n=Be(e),r=+hn(n,t)-+Pk(n,t);return Math.round(r/Jm)+1}function Ve(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const tr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ve(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ve(n+1,2)},d(e,t){return Ve(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ve(e.getHours()%12||12,t.length)},H(e,t){return Ve(e.getHours(),t.length)},m(e,t){return Ve(e.getMinutes(),t.length)},s(e,t){return Ve(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ve(o,t.length)}},yo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},lg={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return tr.y(e,t)},Y:function(e,t,n,r){const o=Ic(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return Ve(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ve(s,t.length)},R:function(e,t){const n=eg(e);return Ve(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ve(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ve(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ve(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return tr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ve(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=ag(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ve(o,t.length)},I:function(e,t,n){const r=ig(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ve(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):tr.d(e,t)},D:function(e,t,n){const r=Ck(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ve(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ve(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ve(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Ve(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=yo.noon:r===0?o=yo.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=yo.evening:r>=12?o=yo.afternoon:r>=4?o=yo.morning:o=yo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return tr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):tr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ve(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ve(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):tr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):tr.s(e,t)},S:function(e,t){return tr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ug(r);case"XXXX":case"XX":return Ir(r);case"XXXXX":case"XXX":default:return Ir(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ug(r);case"xxxx":case"xx":return Ir(r);case"xxxxx":case"xxx":default:return Ir(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+cg(r,":");case"OOOO":default:return"GMT"+Ir(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+cg(r,":");case"zzzz":default:return"GMT"+Ir(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Ve(r,t.length)},T:function(e,t,n){const r=e.getTime();return Ve(r,t.length)}};function cg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+Ve(s,2)}function ug(e,t){return e%60===0?(e>0?"-":"+")+Ve(Math.abs(e)/60,2):Ir(e,t)}function Ir(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ve(Math.trunc(r/60),2),s=Ve(r%60,2);return n+o+t+s}const dg=(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"})}},fg=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},_c={p:fg,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return dg(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}}",dg(r,t)).replace("{{time}}",fg(o,t))}},kk=/^D+$/,Ok=/^Y+$/,Ik=["D","DD","YY","YYYY"];function hg(e){return kk.test(e)}function pg(e){return Ok.test(e)}function Ac(e,t,n){const r=_k(e,t,n);if(console.warn(r),Ik.includes(e))throw new RangeError(r)}function _k(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Ak=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Dk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Mk=/^'([^]*?)'?$/,Nk=/''/g,Fk=/[a-zA-Z]/;function Lk(e,t,n){var u,d,f,h;const r=Or(),o=r.locale??sg,s=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=Be(e);if(!UP(a))throw new RangeError("Invalid time value");let l=t.match(Dk).map(p=>{const m=p[0];if(m==="p"||m==="P"){const y=_c[m];return y(p,o.formatLong)}return p}).join("").match(Ak).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:Vk(p)};if(lg[m])return{isToken:!0,value:p};if(m.match(Fk))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(pg(m)||hg(m))&&Ac(m,t,String(e));const y=lg[m[0]];return y(a,m,o.localize,c)}).join("")}function Vk(e){const t=e.match(Mk);return t?t[1].replace(Nk,"'"):e}function $k(){return Object.assign({},Or())}function Rk(e){let n=Be(e).getDay();return n===0&&(n=7),n}function jk(e,t){const n=t instanceof Date?Ge(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const Bk=10;class mg{constructor(){se(this,"subPriority",0)}validate(t,n){return!0}}class zk extends mg{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 Wk extends mg{constructor(){super(...arguments);se(this,"priority",Bk);se(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Ge(n,jk(n,Date))}}class De{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new zk(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class Hk extends De{constructor(){super(...arguments);se(this,"priority",140);se(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const at={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},pn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function lt(e,t){return e&&{value:t(e.value),rest:e.rest}}function Xe(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function mn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*VP+s*LP+i*$P),rest:t.slice(n[0].length)}}function gg(e){return Xe(at.anyDigitsSigned,e)}function et(e,t){switch(e){case 1:return Xe(at.singleDigit,t);case 2:return Xe(at.twoDigits,t);case 3:return Xe(at.threeDigits,t);case 4:return Xe(at.fourDigits,t);default:return Xe(new RegExp("^\\d{1,"+e+"}"),t)}}function Bi(e,t){switch(e){case 1:return Xe(at.singleDigitSigned,t);case 2:return Xe(at.twoDigitsSigned,t);case 3:return Xe(at.threeDigitsSigned,t);case 4:return Xe(at.fourDigitsSigned,t);default:return Xe(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Dc(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function yg(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 vg(e){return e%400===0||e%4===0&&e%100!==0}class Uk extends De{constructor(){super(...arguments);se(this,"priority",130);se(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return lt(et(4,n),s);case"yo":return lt(o.ordinalNumber(n,{unit:"year"}),s);default:return lt(et(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const s=n.getFullYear();if(o.isTwoDigitYear){const a=yg(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 Gk extends De{constructor(){super(...arguments);se(this,"priority",130);se(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return lt(et(4,n),s);case"Yo":return lt(o.ordinalNumber(n,{unit:"year"}),s);default:return lt(et(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=Ic(n,s);if(o.isTwoDigitYear){const l=yg(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),hn(n,s)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),hn(n,s)}}class Yk extends De{constructor(){super(...arguments);se(this,"priority",130);se(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return Bi(r==="R"?4:r.length,n)}set(n,r,o){const s=Ge(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),mo(s)}}class qk extends De{constructor(){super(...arguments);se(this,"priority",130);se(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return Bi(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class Kk extends De{constructor(){super(...arguments);se(this,"priority",120);se(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return et(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class Zk extends De{constructor(){super(...arguments);se(this,"priority",120);se(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return et(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"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 Xk extends De{constructor(){super(...arguments);se(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);se(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return lt(Xe(at.month,n),s);case"MM":return lt(et(2,n),s);case"Mo":return lt(o.ordinalNumber(n,{unit:"month"}),s);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class Qk extends De{constructor(){super(...arguments);se(this,"priority",110);se(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const s=i=>i-1;switch(r){case"L":return lt(Xe(at.month,n),s);case"LL":return lt(et(2,n),s);case"Lo":return lt(o.ordinalNumber(n,{unit:"month"}),s);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function Jk(e,t,n){const r=Be(e),o=ag(r,n)-t;return r.setDate(r.getDate()-o*7),r}class eO extends De{constructor(){super(...arguments);se(this,"priority",100);se(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return Xe(at.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return et(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return hn(Jk(n,o,s),s)}}function tO(e,t){const n=Be(e),r=ig(n)-t;return n.setDate(n.getDate()-r*7),n}class nO extends De{constructor(){super(...arguments);se(this,"priority",100);se(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return Xe(at.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return et(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return mo(tO(n,o))}}const rO=[31,28,31,30,31,30,31,31,30,31,30,31],oO=[31,29,31,30,31,30,31,31,30,31,30,31];class sO extends De{constructor(){super(...arguments);se(this,"priority",90);se(this,"subPriority",1);se(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return Xe(at.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return et(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=vg(o),i=n.getMonth();return s?r>=1&&r<=oO[i]:r>=1&&r<=rO[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class iO extends De{constructor(){super(...arguments);se(this,"priority",90);se(this,"subpriority",1);se(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return Xe(at.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return et(r.length,n)}}validate(n,r){const o=n.getFullYear();return vg(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function Mc(e,t,n){var d,f,h,p;const r=Or(),o=(n==null?void 0:n.weekStartsOn)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,s=Be(e),i=s.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(i+c)%7:(l+c)%7-(i+c)%7;return po(s,u)}class aO extends De{constructor(){super(...arguments);se(this,"priority",90);se(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=Mc(n,o,s),n.setHours(0,0,0,0),n}}class lO extends De{constructor(){super(...arguments);se(this,"priority",90);se(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return lt(et(r.length,n),i);case"eo":return lt(o.ordinalNumber(n,{unit:"day"}),i);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=Mc(n,o,s),n.setHours(0,0,0,0),n}}class cO extends De{constructor(){super(...arguments);se(this,"priority",90);se(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return lt(et(r.length,n),i);case"co":return lt(o.ordinalNumber(n,{unit:"day"}),i);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=Mc(n,o,s),n.setHours(0,0,0,0),n}}function uO(e,t){const n=Be(e),r=Rk(n),o=t-r;return po(n,o)}class dO extends De{constructor(){super(...arguments);se(this,"priority",90);se(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return et(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return lt(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiii":return lt(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return lt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return lt(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=uO(n,o),n.setHours(0,0,0,0),n}}class fO extends De{constructor(){super(...arguments);se(this,"priority",80);se(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Dc(o),0,0,0),n}}class hO extends De{constructor(){super(...arguments);se(this,"priority",80);se(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Dc(o),0,0,0),n}}class pO extends De{constructor(){super(...arguments);se(this,"priority",80);se(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Dc(o),0,0,0),n}}class mO extends De{constructor(){super(...arguments);se(this,"priority",70);se(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Xe(at.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return et(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const s=n.getHours()>=12;return s&&o<12?n.setHours(o+12,0,0,0):!s&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class gO extends De{constructor(){super(...arguments);se(this,"priority",70);se(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return Xe(at.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return et(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class yO extends De{constructor(){super(...arguments);se(this,"priority",70);se(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Xe(at.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return et(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class vO extends De{constructor(){super(...arguments);se(this,"priority",70);se(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return Xe(at.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return et(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const s=o<=24?o%24:o;return n.setHours(s,0,0,0),n}}class bO extends De{constructor(){super(...arguments);se(this,"priority",60);se(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Xe(at.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return et(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class wO extends De{constructor(){super(...arguments);se(this,"priority",50);se(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Xe(at.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return et(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class xO extends De{constructor(){super(...arguments);se(this,"priority",30);se(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return lt(et(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class TO extends De{constructor(){super(...arguments);se(this,"priority",10);se(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return mn(pn.basicOptionalMinutes,n);case"XX":return mn(pn.basic,n);case"XXXX":return mn(pn.basicOptionalSeconds,n);case"XXXXX":return mn(pn.extendedOptionalSeconds,n);case"XXX":default:return mn(pn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ge(n,n.getTime()-ji(n)-o)}}class SO extends De{constructor(){super(...arguments);se(this,"priority",10);se(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return mn(pn.basicOptionalMinutes,n);case"xx":return mn(pn.basic,n);case"xxxx":return mn(pn.basicOptionalSeconds,n);case"xxxxx":return mn(pn.extendedOptionalSeconds,n);case"xxx":default:return mn(pn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ge(n,n.getTime()-ji(n)-o)}}class EO extends De{constructor(){super(...arguments);se(this,"priority",40);se(this,"incompatibleTokens","*")}parse(n){return gg(n)}set(n,r,o){return[Ge(n,o*1e3),{timestampIsSet:!0}]}}class CO extends De{constructor(){super(...arguments);se(this,"priority",20);se(this,"incompatibleTokens","*")}parse(n){return gg(n)}set(n,r,o){return[Ge(n,o),{timestampIsSet:!0}]}}const PO={G:new Hk,y:new Uk,Y:new Gk,R:new Yk,u:new qk,Q:new Kk,q:new Zk,M:new Xk,L:new Qk,w:new eO,I:new nO,d:new sO,D:new iO,E:new aO,e:new lO,c:new cO,i:new dO,a:new fO,b:new hO,B:new pO,h:new mO,H:new gO,K:new yO,k:new vO,m:new bO,s:new wO,S:new xO,X:new TO,x:new SO,t:new EO,T:new CO},kO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,OO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,IO=/^'([^]*?)'?$/,_O=/''/g,AO=/\S/,DO=/[a-zA-Z]/;function MO(e,t,n,r){var m,y,v,w;const o=$k(),s=o.locale??sg,i=o.firstWeekContainsDate??((y=(m=o.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,a=o.weekStartsOn??((w=(v=o.locale)==null?void 0:v.options)==null?void 0:w.weekStartsOn)??0;if(t==="")return e===""?Be(n):Ge(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new Wk],u=t.match(OO).map(g=>{const S=g[0];if(S in _c){const T=_c[S];return T(g,s.formatLong)}return g}).join("").match(kO),d=[];for(let g of u){pg(g)&&Ac(g,t,e),hg(g)&&Ac(g,t,e);const S=g[0],T=PO[S];if(T){const{incompatibleTokens:E}=T;if(Array.isArray(E)){const A=d.find(D=>E.includes(D.token)||D.token===S);if(A)throw new RangeError(`The format string mustn't contain \`${A.fullToken}\` and \`${g}\` at the same time`)}else if(T.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);d.push({token:S,fullToken:g});const k=T.run(e,g,s.match,l);if(!k)return Ge(n,NaN);c.push(k.setter),e=k.rest}else{if(S.match(DO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(g==="''"?g="'":S==="'"&&(g=NO(g)),e.indexOf(g)===0)e=e.slice(g.length);else return Ge(n,NaN)}}if(e.length>0&&AO.test(e))return Ge(n,NaN);const f=c.map(g=>g.priority).sort((g,S)=>S-g).filter((g,S,T)=>T.indexOf(g)===S).map(g=>c.filter(S=>S.priority===g).sort((S,T)=>T.subPriority-S.subPriority)).map(g=>g[0]);let h=Be(n);if(isNaN(h.getTime()))return Ge(n,NaN);const p={};for(const g of f){if(!g.validate(h,l))return Ge(n,NaN);const S=g.set(h,p,l);Array.isArray(S)?(h=S[0],Object.assign(p,S[1])):h=S}return Ge(n,h)}function NO(e){return e.match(IO)[1].replace(_O,"'")}function FO(e,t){const n=Be(e),r=Be(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function LO(e){return WP(e,zP(e))}function VO(e,t){return po(e,-t)}function bg(e,t){return Ri(e,-t)}function $O(e,t){return tg(e,-t)}function RO(e,t){return ng(e,-t)}var St=function(){return St=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},St.apply(this,arguments)};function Nc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Fc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}typeof SuppressedError=="function"&&SuppressedError;var xs=function(e){return e.replace(new RegExp(" ","g")," ")},wg=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)},jO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},xg=function(e,t,n){var r=e.length-2,o=jO(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},Tg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Sg=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},BO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Lc=function(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t},zO=function(e){return e==="money"||e==="currency"},WO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return St(St({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Vc=function(e,t){var n=wg(Tg(e),t.fraction.length),r="".concat(t.currency).concat(xg(n,t.group,t.decimal));return xs(r)},HO=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,s=o===void 0?"BRL":o,i=e.currencyDisplay,a=i===void 0?"symbol":i;e.mask;var l=e.onChange,c=Nc(e,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(t,function(){return u.current});var d=b.useMemo(function(){var p=WO(r,s,a);return p.currency=xs("".concat(p.currency.trim()," ")),p.literal=xs(p.literal.trim()),p},[r,s]),f=function(p){var m=Vc(p.target.value,d),y=Sg(m);p.target.value=m,p.target.setAttribute("data-number",y.toString()),l==null||l(p),y!==0&&(u.current.selectionEnd=m.length)},h=c.defaultValue?Vc(c.defaultValue,d):void 0;return b.createElement("input",St({},c,{value:typeof c.value=="string"?Vc(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),UO=1,GO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},YO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return St(St({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},$c=function(e,t){var n=wg(Tg(e),t.fraction.length),r="".concat(xg(n,t.group,t.decimal)," ").concat(t.percentSign);return xs(r)},qO=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,s=e.onKeyUp,i=Nc(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=Fc(b.useState(function(){var v,w;return(w=(v=i.value)===null||v===void 0?void 0:v.toString())!==null&&w!==void 0?w:""}),2),c=l[0],u=l[1];b.useImperativeHandle(t,function(){return a.current}),b.useEffect(function(){var v,w=Number.parseFloat("".concat((v=i.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u($c(w,d))},[i.value]);var d=b.useMemo(function(){var v=YO(r);return v.percentSign=xs("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-UO,h=function(v){var w,g=a.current;g&&(g.setSelectionRange(f,f),v&&((w=i.onFocus)===null||w===void 0||w.call(i,v)))},p=function(v){var w=v.currentTarget;if(w.selectionStart!==null){var g=w.selectionStart,S=w.selectionEnd,T=g!==S,E=f<g;!T&&E&&h()}s==null||s(v)},m=function(v){var w=$c(v.target.value,d),g=Sg(w);u(w),v.target.value=w,v.target.setAttribute("data-number",g.toString()),o==null||o(v)};b.useEffect(function(){return h()},[c]);var y=i.defaultValue?$c(i.defaultValue,d):void 0;return b.createElement("input",St({},i,{defaultValue:y,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),Ts={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},KO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=zi[s];i===void 0?r.push(s.replace(Ts.dots,"\\.").replace(Ts.openParenthesis,"\\(").replace(Ts.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ts.leadingBars,"\\")},Ss=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Rc(o,n);var s=KO(o);return n?"^".concat(s,"$"):s},ZO=function(e){return e.replace(Ts.escape,"\\$&")},Rc=function(e,t){var n=e.map(function(r){return typeof r=="string"?ZO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},zi={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},XO=/\d/,Eg="(dd) 9dddd-dddd",Cg="(dd) dddd-dddd",Pg="ddd.ddd.ddd-dd",kg="dd.ddd.ddd/dddd-dd",Wi=function(e){return e.replace(/\D/g,"")},QO=["2",/[0-3]/,":",/[0-5]/,/\d/],JO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],$t={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Pg,isoDate:"dddd-dd-dd",cnpj:kg,telephone:Cg,cellphone:Eg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Wi(e).length<=11?Pg:kg},int:function(e){return e===void 0&&(e=""),XO.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=Wi(e);return t.length<11?Cg:Eg},time:function(e){var t=Wi(e),n=t[0];return n==="2"?QO:JO}},Rt=function(e,t,n){var r;return n===void 0&&(n={}),St({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Ss(e,"",!0),infinity:n.infinity},n)},_t={cellTelephone:Rt($t.cellTelephone,"tel"),cellphone:Rt($t.cellphone,"tel"),cep:Rt($t.cep,"decimal"),cnpj:Rt($t.cnpj,"decimal"),color:Rt($t.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Rt($t.cpf,"decimal"),cpfCnpj:Rt($t.cpfCnpj,"decimal",{transform:Wi}),creditCard:Rt($t.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Rt($t.date,"decimal"),int:Rt($t.int,"decimal",{pattern:"[0-9]+"}),isoDate:Rt($t.isoDate,"decimal"),telephone:Rt($t.telephone,"tel"),time:Rt($t.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Rt($t.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Og(e,t,n,r){var o,s;r===void 0&&(r=zi);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=i[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var h=d instanceof RegExp?{regex:d}:d;h.regex.test(f)&&(a+=(s=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&s!==void 0?s:f),c+=1,l+=1}return a}var Ig=function(e){return e},eI=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Ss(e,n,t));return r.test(n)};function tI(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t.current}var nI=b.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,s=o===void 0?!0:o,i=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,h=Nc(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=Lc(a),y=Lc(d),v=Lc(u),w=b.useRef(eI(u,s,h.value||h.defaultValue)),g=f??"input",S=Fc(b.useState(""),2),T=S[0],E=S[1],k=tI(T),A=b.useCallback(function(I,M){var L,H,G=(L=I??M)!==null&&L!==void 0?L:"";if(u===void 0)return G;var P=(H=G==null?void 0:G.toString())!==null&&H!==void 0?H:"";return Og(P,typeof u=="function"?u(P):u,i??Ig,c??zi)},[i,u,c]),D=Fc(b.useState(function(){return A(h.value,h.defaultValue)}),2),O=D[0],V=D[1],F=A(h.defaultValue,h.defaultValue),R=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var I=u(O);return Array.isArray(I)?Rc(I,s):Ss(u,O,s)}return typeof u=="string"?Ss(u,O,s):Rc(u,s)},[l,O,s,u]);b.useEffect(function(){if(h.value!==void 0){var I=A(h.value,h.defaultValue);V(I),p.current!==null&&(p.current.value=I)}},[h.value,u,i,h.defaultValue]);var C=function(I){var M,L,H,G,P,j=I.currentTarget,Z=I.target.value;if(v.current===void 0)return V(Z),(M=y.current)===null||M===void 0||M.call(y,Z),(L=m.current)===null||L===void 0||L.call(m,I),d==null?void 0:d(Z);var re=new RegExp(Ss(v.current,Z,s)),J=(H=j.selectionEnd)!==null&&H!==void 0?H:0,U=function(Y,oe,z){if(Y.type!=="number")return Y.setSelectionRange(oe,z)};if(r&&w.current&&Z.length>=O.length)return j.value=O,U(j,J-1,J-1);var N=!1;Z.length<k.length&&(w.current=!1,N=!0),re.test(Z)&&(w.current=!0);var B=J,W=Z[B-1],$=Og(Z,typeof v.current=="function"?v.current(Z):v.current,i??Ig,c??zi);for(j.value=$,V($);B<$.length&&$.charAt(B-1)!==W;)B+=1;N?U(j,J,J):U(j,B,B),I.target.value=$,E($),(G=y.current)===null||G===void 0||G.call(y,$),(P=m.current)===null||P===void 0||P.call(m,I)};return b.createElement(g,St({},h,{ref:p,pattern:R,onChange:C,defaultValue:_g(h.defaultValue)?F:void 0,value:_g(h.value)?A(h.value,h.value):h.value}))}),_g=function(e){return typeof e=="string"},Ag=b.forwardRef(function(e,t){return zO(e.mask)?b.createElement(HO,St({},e,{mask:void 0,ref:t})):GO(e.mask)?b.createElement(qO,St({},e,{mask:void 0,ref:t})):b.createElement(nI,St({},e,{ref:t}))}),jt=function(e){return function(t){return b.createElement(Ag,St({},e,t))}};jt(_t.cellTelephone),jt(_t.cellphone),jt(_t.cep),jt(_t.cnpj),jt(_t.color),jt(_t.cpf),jt(_t.cpfCnpj),jt(_t.creditCard),jt(_t.date),jt(_t.int),jt(_t.isoDate),jt(_t.telephone),jt(_t.time),jt(_t.uuid);var Dg=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&BO(_t,t.mask)?_t[t.mask]:{mask:t.mask}},[t.mask]),o=St(St({},t),r);return b.createElement(Ag,St({},o,{ref:n}))}),jc={},Bc={exports:{}},zc={};/**
137
+ */const DP=at("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),rg={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},MP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},og=e=>x.jsx(Ht.section,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,animate:e.open.toString(),"aria-hidden":!e.open,className:e.className,exit:rg.false,transition:MP,variants:rg,children:e.children}),NP=as("px-4 py-4 border relative rounded-lg text-sm",{variants:{theme:{neutral:"border-border bg-background",danger:"text-danger-contrast bg-danger/10 border-danger/50",success:"text-success-foreground bg-success/10 border-success/50",info:"text-info bg-info/10 border-info/50"}},defaultVariants:{theme:"neutral"}}),FP=b.forwardRef(function({className:t,theme:n,onClose:r,open:o=!0,...i},s){return x.jsx("div",{"data-open":!!o,"aria-hidden":!o,className:"pointer-events-none isolate data-[open=true]:pointer-events-auto data-[open=true]:mb-4",children:x.jsx(og,{"data-open":!!o,open:!!o,children:x.jsxs(no,{...i,className:Xe(NP({theme:n}),t),ref:s,"data-theme":n,role:"alert",as:i.as??"div",children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[n==="success"?x.jsx(eg,{size:20}):null,n==="info"?x.jsx(tg,{size:20}):null,n==="danger"?x.jsx(EP,{size:20}):null,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,r!==void 0?x.jsx("button",{type:"button",onClick:()=>r(!1),className:"duration-300 ease-in-out absolute right-3 top-3 text-foreground transition-colors hover:text-danger",children:x.jsx(ng,{size:20})}):null]})})})});function Be(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Ge(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function mo(e,t){const n=Be(e);return isNaN(t)?Ge(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Ws(e,t){const n=Be(e);if(isNaN(t))return Ge(e,NaN);if(!t)return n;const r=n.getDate(),o=Ge(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const i=o.getDate();return r>=i?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const ig=6048e5,LP=864e5,VP=6e4,$P=36e5,RP=1e3;let jP={};function Ir(){return jP}function hn(e,t){var a,l,c,u;const n=Ir(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Be(e),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function go(e){return hn(e,{weekStartsOn:1})}function sg(e){const t=Be(e),n=t.getFullYear(),r=Ge(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=go(r),i=Ge(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=go(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function yo(e){const t=Be(e);return t.setHours(0,0,0,0),t}function Hs(e){const t=Be(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function BP(e,t){const n=yo(e),r=yo(t),o=+n-Hs(n),i=+r-Hs(r);return Math.round((o-i)/LP)}function zP(e){const t=sg(e),n=Ge(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),go(n)}function ag(e,t){const n=t*7;return mo(e,n)}function lg(e,t){return Ws(e,t*12)}function WP(e){return Ge(e,Date.now())}function HP(e,t){const n=yo(e),r=yo(t);return+n==+r}function UP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function GP(e){if(!UP(e)&&typeof e!="number")return!1;const t=Be(e);return!isNaN(Number(t))}function cg(e,t){const n=Be(e.start),r=Be(e.end);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=1;const l=[];for(;+s<=i;)l.push(Be(s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function ug(e){const t=Be(e);return t.setDate(1),t.setHours(0,0,0,0),t}function YP(e){const t=Be(e),n=Ge(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function qP(e,t){var a,l;const n=Ir(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=Be(e),i=o.getDay(),s=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const KP={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ZP=(e,t,n)=>{let r;const o=KP[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Ac(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const XP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},QP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},JP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ek={date:Ac({formats:XP,defaultWidth:"full"}),time:Ac({formats:QP,defaultWidth:"full"}),dateTime:Ac({formats:JP,defaultWidth:"full"})},tk={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},nk=(e,t,n,r)=>tk[e];function bi(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):s;o=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const rk={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ok={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ik={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},sk={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ak={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},lk={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ck={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:bi({values:rk,defaultWidth:"wide"}),quarter:bi({values:ok,defaultWidth:"wide",argumentCallback:e=>e-1}),month:bi({values:ik,defaultWidth:"wide"}),day:bi({values:sk,defaultWidth:"wide"}),dayPeriod:bi({values:ak,defaultWidth:"wide",formattingValues:lk,defaultFormattingWidth:"wide"})};function wi(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?dk(a,d=>d.test(s)):uk(a,d=>d.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(s.length);return{value:c,rest:u}}}function uk(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function dk(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function fk(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(o.length);return{value:s,rest:a}}}const hk=/^(\d+)(th|st|nd|rd)?/i,pk=/\d+/i,mk={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},gk={any:[/^b/i,/^(a|c)/i]},yk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},vk={any:[/1/i,/2/i,/3/i,/4/i]},bk={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},wk={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},xk={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Tk={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Sk={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ek={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ck={ordinalNumber:fk({matchPattern:hk,parsePattern:pk,valueCallback:e=>parseInt(e,10)}),era:wi({matchPatterns:mk,defaultMatchWidth:"wide",parsePatterns:gk,defaultParseWidth:"any"}),quarter:wi({matchPatterns:yk,defaultMatchWidth:"wide",parsePatterns:vk,defaultParseWidth:"any",valueCallback:e=>e+1}),month:wi({matchPatterns:bk,defaultMatchWidth:"wide",parsePatterns:wk,defaultParseWidth:"any"}),day:wi({matchPatterns:xk,defaultMatchWidth:"wide",parsePatterns:Tk,defaultParseWidth:"any"}),dayPeriod:wi({matchPatterns:Sk,defaultMatchWidth:"any",parsePatterns:Ek,defaultParseWidth:"any"})},dg={code:"en-US",formatDistance:ZP,formatLong:ek,formatRelative:nk,localize:ck,match:Ck,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Pk(e){const t=Be(e);return BP(t,YP(t))+1}function fg(e){const t=Be(e),n=+go(t)-+zP(t);return Math.round(n/ig)+1}function _c(e,t){var u,d,f,h;const n=Be(e),r=n.getFullYear(),o=Ir(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,s=Ge(e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=hn(s,t),l=Ge(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=hn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function kk(e,t){var a,l,c,u;const n=Ir(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=_c(e,t),i=Ge(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),hn(i,t)}function hg(e,t){const n=Be(e),r=+hn(n,t)-+kk(n,t);return Math.round(r/ig)+1}function Ve(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const tr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ve(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ve(n+1,2)},d(e,t){return Ve(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ve(e.getHours()%12||12,t.length)},H(e,t){return Ve(e.getHours(),t.length)},m(e,t){return Ve(e.getMinutes(),t.length)},s(e,t){return Ve(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ve(o,t.length)}},vo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},pg={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return tr.y(e,t)},Y:function(e,t,n,r){const o=_c(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return Ve(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ve(i,t.length)},R:function(e,t){const n=sg(e);return Ve(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ve(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ve(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ve(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return tr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ve(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=hg(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ve(o,t.length)},I:function(e,t,n){const r=fg(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ve(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):tr.d(e,t)},D:function(e,t,n){const r=Pk(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ve(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Ve(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Ve(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Ve(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=vo.noon:r===0?o=vo.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=vo.evening:r>=12?o=vo.afternoon:r>=4?o=vo.morning:o=vo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return tr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):tr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ve(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ve(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):tr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):tr.s(e,t)},S:function(e,t){return tr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return gg(r);case"XXXX":case"XX":return Ar(r);case"XXXXX":case"XXX":default:return Ar(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return gg(r);case"xxxx":case"xx":return Ar(r);case"xxxxx":case"xxx":default:return Ar(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+mg(r,":");case"OOOO":default:return"GMT"+Ar(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+mg(r,":");case"zzzz":default:return"GMT"+Ar(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Ve(r,t.length)},T:function(e,t,n){const r=e.getTime();return Ve(r,t.length)}};function mg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+Ve(i,2)}function gg(e,t){return e%60===0?(e>0?"-":"+")+Ve(Math.abs(e)/60,2):Ar(e,t)}function Ar(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ve(Math.trunc(r/60),2),i=Ve(r%60,2);return n+o+t+i}const yg=(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"})}},vg=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Dc={p:vg,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return yg(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}}",yg(r,t)).replace("{{time}}",vg(o,t))}},Ok=/^D+$/,Ik=/^Y+$/,Ak=["D","DD","YY","YYYY"];function bg(e){return Ok.test(e)}function wg(e){return Ik.test(e)}function Mc(e,t,n){const r=_k(e,t,n);if(console.warn(r),Ak.includes(e))throw new RangeError(r)}function _k(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Dk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Mk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Nk=/^'([^]*?)'?$/,Fk=/''/g,Lk=/[a-zA-Z]/;function Vk(e,t,n){var u,d,f,h;const r=Ir(),o=r.locale??dg,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,s=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=Be(e);if(!GP(a))throw new RangeError("Invalid time value");let l=t.match(Mk).map(p=>{const m=p[0];if(m==="p"||m==="P"){const g=Dc[m];return g(p,o.formatLong)}return p}).join("").match(Dk).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:$k(p)};if(pg[m])return{isToken:!0,value:p};if(m.match(Lk))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(wg(m)||bg(m))&&Mc(m,t,String(e));const g=pg[m[0]];return g(a,m,o.localize,c)}).join("")}function $k(e){const t=e.match(Nk);return t?t[1].replace(Fk,"'"):e}function Rk(){return Object.assign({},Ir())}function jk(e){let n=Be(e).getDay();return n===0&&(n=7),n}function Bk(e,t){const n=t instanceof Date?Ge(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const zk=10;class xg{constructor(){ie(this,"subPriority",0)}validate(t,n){return!0}}class Wk extends xg{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class Hk extends xg{constructor(){super(...arguments);ie(this,"priority",zk);ie(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Ge(n,Bk(n,Date))}}class Me{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new Wk(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class Uk extends Me{constructor(){super(...arguments);ie(this,"priority",140);ie(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const lt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},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 ct(e,t){return e&&{value:t(e.value),rest:e.rest}}function Qe(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function mn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(o*$P+i*VP+s*RP),rest:t.slice(n[0].length)}}function Tg(e){return Qe(lt.anyDigitsSigned,e)}function tt(e,t){switch(e){case 1:return Qe(lt.singleDigit,t);case 2:return Qe(lt.twoDigits,t);case 3:return Qe(lt.threeDigits,t);case 4:return Qe(lt.fourDigits,t);default:return Qe(new RegExp("^\\d{1,"+e+"}"),t)}}function Us(e,t){switch(e){case 1:return Qe(lt.singleDigitSigned,t);case 2:return Qe(lt.twoDigitsSigned,t);case 3:return Qe(lt.threeDigitsSigned,t);case 4:return Qe(lt.fourDigitsSigned,t);default:return Qe(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Nc(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Sg(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,s=Math.trunc(i/100)*100,a=e>=i%100;o=e+s-(a?100:0)}return n?o:1-o}function Eg(e){return e%400===0||e%4===0&&e%100!==0}class Gk extends Me{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const i=s=>({year:s,isTwoDigitYear:r==="yy"});switch(r){case"y":return ct(tt(4,n),i);case"yo":return ct(o.ordinalNumber(n,{unit:"year"}),i);default:return ct(tt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const a=Sg(o.year,i);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}}class Yk extends Me{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const i=s=>({year:s,isTwoDigitYear:r==="YY"});switch(r){case"Y":return ct(tt(4,n),i);case"Yo":return ct(o.ordinalNumber(n,{unit:"year"}),i);default:return ct(tt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const s=_c(n,i);if(o.isTwoDigitYear){const l=Sg(o.year,s);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),hn(n,i)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),hn(n,i)}}class qk extends Me{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return Us(r==="R"?4:r.length,n)}set(n,r,o){const i=Ge(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),go(i)}}class Kk extends Me{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return Us(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class Zk extends Me{constructor(){super(...arguments);ie(this,"priority",120);ie(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return tt(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class Xk extends Me{constructor(){super(...arguments);ie(this,"priority",120);ie(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return tt(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class Qk extends Me{constructor(){super(...arguments);ie(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ie(this,"priority",110)}parse(n,r,o){const i=s=>s-1;switch(r){case"M":return ct(Qe(lt.month,n),i);case"MM":return ct(tt(2,n),i);case"Mo":return ct(o.ordinalNumber(n,{unit:"month"}),i);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class Jk extends Me{constructor(){super(...arguments);ie(this,"priority",110);ie(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const i=s=>s-1;switch(r){case"L":return ct(Qe(lt.month,n),i);case"LL":return ct(tt(2,n),i);case"Lo":return ct(o.ordinalNumber(n,{unit:"month"}),i);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function eO(e,t,n){const r=Be(e),o=hg(r,n)-t;return r.setDate(r.getDate()-o*7),r}class tO extends Me{constructor(){super(...arguments);ie(this,"priority",100);ie(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return Qe(lt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return hn(eO(n,o,i),i)}}function nO(e,t){const n=Be(e),r=fg(n)-t;return n.setDate(n.getDate()-r*7),n}class rO extends Me{constructor(){super(...arguments);ie(this,"priority",100);ie(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return Qe(lt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return go(nO(n,o))}}const oO=[31,28,31,30,31,30,31,31,30,31,30,31],iO=[31,29,31,30,31,30,31,31,30,31,30,31];class sO extends Me{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"subPriority",1);ie(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return Qe(lt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return tt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=Eg(o),s=n.getMonth();return i?r>=1&&r<=iO[s]:r>=1&&r<=oO[s]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class aO extends Me{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"subpriority",1);ie(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return Qe(lt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return tt(r.length,n)}}validate(n,r){const o=n.getFullYear();return Eg(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function Fc(e,t,n){var d,f,h,p;const r=Ir(),o=(n==null?void 0:n.weekStartsOn)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,i=Be(e),s=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(s+c)%7:(l+c)%7-(s+c)%7;return mo(i,u)}class lO extends Me{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Fc(n,o,i),n.setHours(0,0,0,0),n}}class cO extends Me{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,i){const s=a=>{const l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return ct(tt(r.length,n),s);case"eo":return ct(o.ordinalNumber(n,{unit:"day"}),s);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Fc(n,o,i),n.setHours(0,0,0,0),n}}class uO extends Me{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,i){const s=a=>{const l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return ct(tt(r.length,n),s);case"co":return ct(o.ordinalNumber(n,{unit:"day"}),s);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Fc(n,o,i),n.setHours(0,0,0,0),n}}function dO(e,t){const n=Be(e),r=jk(n),o=t-r;return mo(n,o)}class fO extends Me{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const i=s=>s===0?7:s;switch(r){case"i":case"ii":return tt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return ct(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiii":return ct(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return ct(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return ct(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=dO(n,o),n.setHours(0,0,0,0),n}}class hO extends Me{constructor(){super(...arguments);ie(this,"priority",80);ie(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Nc(o),0,0,0),n}}class pO extends Me{constructor(){super(...arguments);ie(this,"priority",80);ie(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Nc(o),0,0,0),n}}class mO extends Me{constructor(){super(...arguments);ie(this,"priority",80);ie(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Nc(o),0,0,0),n}}class gO extends Me{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Qe(lt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class yO extends Me{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return Qe(lt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class vO extends Me{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Qe(lt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class bO extends Me{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return Qe(lt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class wO extends Me{constructor(){super(...arguments);ie(this,"priority",60);ie(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Qe(lt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class xO extends Me{constructor(){super(...arguments);ie(this,"priority",50);ie(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Qe(lt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class TO extends Me{constructor(){super(...arguments);ie(this,"priority",30);ie(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return ct(tt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class SO extends Me{constructor(){super(...arguments);ie(this,"priority",10);ie(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return mn(pn.basicOptionalMinutes,n);case"XX":return mn(pn.basic,n);case"XXXX":return mn(pn.basicOptionalSeconds,n);case"XXXXX":return mn(pn.extendedOptionalSeconds,n);case"XXX":default:return mn(pn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ge(n,n.getTime()-Hs(n)-o)}}class EO extends Me{constructor(){super(...arguments);ie(this,"priority",10);ie(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return mn(pn.basicOptionalMinutes,n);case"xx":return mn(pn.basic,n);case"xxxx":return mn(pn.basicOptionalSeconds,n);case"xxxxx":return mn(pn.extendedOptionalSeconds,n);case"xxx":default:return mn(pn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ge(n,n.getTime()-Hs(n)-o)}}class CO extends Me{constructor(){super(...arguments);ie(this,"priority",40);ie(this,"incompatibleTokens","*")}parse(n){return Tg(n)}set(n,r,o){return[Ge(n,o*1e3),{timestampIsSet:!0}]}}class PO extends Me{constructor(){super(...arguments);ie(this,"priority",20);ie(this,"incompatibleTokens","*")}parse(n){return Tg(n)}set(n,r,o){return[Ge(n,o),{timestampIsSet:!0}]}}const kO={G:new Uk,y:new Gk,Y:new Yk,R:new qk,u:new Kk,Q:new Zk,q:new Xk,M:new Qk,L:new Jk,w:new tO,I:new rO,d:new sO,D:new aO,E:new lO,e:new cO,c:new uO,i:new fO,a:new hO,b:new pO,B:new mO,h:new gO,H:new yO,K:new vO,k:new bO,m:new wO,s:new xO,S:new TO,X:new SO,x:new EO,t:new CO,T:new PO},OO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,IO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,AO=/^'([^]*?)'?$/,_O=/''/g,DO=/\S/,MO=/[a-zA-Z]/;function NO(e,t,n,r){var m,g,v,w;const o=Rk(),i=o.locale??dg,s=o.firstWeekContainsDate??((g=(m=o.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,a=o.weekStartsOn??((w=(v=o.locale)==null?void 0:v.options)==null?void 0:w.weekStartsOn)??0;if(t==="")return e===""?Be(n):Ge(n,NaN);const l={firstWeekContainsDate:s,weekStartsOn:a,locale:i},c=[new Hk],u=t.match(IO).map(y=>{const S=y[0];if(S in Dc){const T=Dc[S];return T(y,i.formatLong)}return y}).join("").match(OO),d=[];for(let y of u){wg(y)&&Mc(y,t,e),bg(y)&&Mc(y,t,e);const S=y[0],T=kO[S];if(T){const{incompatibleTokens:E}=T;if(Array.isArray(E)){const D=d.find(_=>E.includes(_.token)||_.token===S);if(D)throw new RangeError(`The format string mustn't contain \`${D.fullToken}\` and \`${y}\` at the same time`)}else if(T.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${y}\` and any other token at the same time`);d.push({token:S,fullToken:y});const P=T.run(e,y,i.match,l);if(!P)return Ge(n,NaN);c.push(P.setter),e=P.rest}else{if(S.match(MO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(y==="''"?y="'":S==="'"&&(y=FO(y)),e.indexOf(y)===0)e=e.slice(y.length);else return Ge(n,NaN)}}if(e.length>0&&DO.test(e))return Ge(n,NaN);const f=c.map(y=>y.priority).sort((y,S)=>S-y).filter((y,S,T)=>T.indexOf(y)===S).map(y=>c.filter(S=>S.priority===y).sort((S,T)=>T.subPriority-S.subPriority)).map(y=>y[0]);let h=Be(n);if(isNaN(h.getTime()))return Ge(n,NaN);const p={};for(const y of f){if(!y.validate(h,l))return Ge(n,NaN);const S=y.set(h,p,l);Array.isArray(S)?(h=S[0],Object.assign(p,S[1])):h=S}return Ge(n,h)}function FO(e){return e.match(AO)[1].replace(_O,"'")}function LO(e,t){const n=Be(e),r=Be(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function VO(e){return HP(e,WP(e))}function $O(e,t){return mo(e,-t)}function Cg(e,t){return Ws(e,-t)}function RO(e,t){return ag(e,-t)}function jO(e,t){return lg(e,-t)}var St=function(){return St=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},St.apply(this,arguments)};function Lc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Vc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var xi=function(e){return e.replace(new RegExp(" ","g")," ")},Pg=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},BO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},kg=function(e,t,n){var r=e.length-2,o=BO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Og=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Ig=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},zO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},$c=function(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t},WO=function(e){return e==="money"||e==="currency"},HO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return St(St({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Rc=function(e,t){var n=Pg(Og(e),t.fraction.length),r="".concat(t.currency).concat(kg(n,t.group,t.decimal));return xi(r)},UO=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,s=e.currencyDisplay,a=s===void 0?"symbol":s;e.mask;var l=e.onChange,c=Lc(e,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(t,function(){return u.current});var d=b.useMemo(function(){var p=HO(r,i,a);return p.currency=xi("".concat(p.currency.trim()," ")),p.literal=xi(p.literal.trim()),p},[r,i]),f=function(p){var m=Rc(p.target.value,d),g=Ig(m);p.target.value=m,p.target.setAttribute("data-number",g.toString()),l==null||l(p),g!==0&&(u.current.selectionEnd=m.length)},h=c.defaultValue?Rc(c.defaultValue,d):void 0;return b.createElement("input",St({},c,{value:typeof c.value=="string"?Rc(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),GO=1,YO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},qO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return St(St({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},jc=function(e,t){var n=Pg(Og(e),t.fraction.length),r="".concat(kg(n,t.group,t.decimal)," ").concat(t.percentSign);return xi(r)},KO=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,s=Lc(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=Vc(b.useState(function(){var v,w;return(w=(v=s.value)===null||v===void 0?void 0:v.toString())!==null&&w!==void 0?w:""}),2),c=l[0],u=l[1];b.useImperativeHandle(t,function(){return a.current}),b.useEffect(function(){var v,w=Number.parseFloat("".concat((v=s.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(jc(w,d))},[s.value]);var d=b.useMemo(function(){var v=qO(r);return v.percentSign=xi("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-GO,h=function(v){var w,y=a.current;y&&(y.setSelectionRange(f,f),v&&((w=s.onFocus)===null||w===void 0||w.call(s,v)))},p=function(v){var w=v.currentTarget;if(w.selectionStart!==null){var y=w.selectionStart,S=w.selectionEnd,T=y!==S,E=f<y;!T&&E&&h()}i==null||i(v)},m=function(v){var w=jc(v.target.value,d),y=Ig(w);u(w),v.target.value=w,v.target.setAttribute("data-number",y.toString()),o==null||o(v)};b.useEffect(function(){return h()},[c]);var g=s.defaultValue?jc(s.defaultValue,d):void 0;return b.createElement("input",St({},s,{defaultValue:g,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),Ti={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},ZO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=Gs[i];s===void 0?r.push(i.replace(Ti.dots,"\\.").replace(Ti.openParenthesis,"\\(").replace(Ti.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ti.leadingBars,"\\")},Si=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Bc(o,n);var i=ZO(o);return n?"^".concat(i,"$"):i},XO=function(e){return e.replace(Ti.escape,"\\$&")},Bc=function(e,t){var n=e.map(function(r){return typeof r=="string"?XO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Gs={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},QO=/\d/,Ag="(dd) 9dddd-dddd",_g="(dd) dddd-dddd",Dg="ddd.ddd.ddd-dd",Mg="dd.ddd.ddd/dddd-dd",Ys=function(e){return e.replace(/\D/g,"")},JO=["2",/[0-3]/,":",/[0-5]/,/\d/],eI=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],$t={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Dg,isoDate:"dddd-dd-dd",cnpj:Mg,telephone:_g,cellphone:Ag,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Ys(e).length<=11?Dg:Mg},int:function(e){return e===void 0&&(e=""),QO.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=Ys(e);return t.length<11?_g:Ag},time:function(e){var t=Ys(e),n=t[0];return n==="2"?JO:eI}},Rt=function(e,t,n){var r;return n===void 0&&(n={}),St({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Si(e,"",!0),infinity:n.infinity},n)},At={cellTelephone:Rt($t.cellTelephone,"tel"),cellphone:Rt($t.cellphone,"tel"),cep:Rt($t.cep,"decimal"),cnpj:Rt($t.cnpj,"decimal"),color:Rt($t.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Rt($t.cpf,"decimal"),cpfCnpj:Rt($t.cpfCnpj,"decimal",{transform:Ys}),creditCard:Rt($t.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Rt($t.date,"decimal"),int:Rt($t.int,"decimal",{pattern:"[0-9]+"}),isoDate:Rt($t.isoDate,"decimal"),telephone:Rt($t.telephone,"tel"),time:Rt($t.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Rt($t.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Ng(e,t,n,r){var o,i;r===void 0&&(r=Gs);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=s[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var h=d instanceof RegExp?{regex:d}:d;h.regex.test(f)&&(a+=(i=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return a}var Fg=function(e){return e},tI=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Si(e,n,t));return r.test(n)};function nI(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t.current}var rI=b.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,s=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,h=Lc(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=$c(a),g=$c(d),v=$c(u),w=b.useRef(tI(u,i,h.value||h.defaultValue)),y=f??"input",S=Vc(b.useState(""),2),T=S[0],E=S[1],P=nI(T),D=b.useCallback(function(I,M){var L,H,Y=(L=I??M)!==null&&L!==void 0?L:"";if(u===void 0)return Y;var k=(H=Y==null?void 0:Y.toString())!==null&&H!==void 0?H:"";return Ng(k,typeof u=="function"?u(k):u,s??Fg,c??Gs)},[s,u,c]),_=Vc(b.useState(function(){return D(h.value,h.defaultValue)}),2),O=_[0],V=_[1],F=D(h.defaultValue,h.defaultValue),$=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var I=u(O);return Array.isArray(I)?Bc(I,i):Si(u,O,i)}return typeof u=="string"?Si(u,O,i):Bc(u,i)},[l,O,i,u]);b.useEffect(function(){if(h.value!==void 0){var I=D(h.value,h.defaultValue);V(I),p.current!==null&&(p.current.value=I)}},[h.value,u,s,h.defaultValue]);var C=function(I){var M,L,H,Y,k,R=I.currentTarget,Z=I.target.value;if(v.current===void 0)return V(Z),(M=g.current)===null||M===void 0||M.call(g,Z),(L=m.current)===null||L===void 0||L.call(m,I),d==null?void 0:d(Z);var oe=new RegExp(Si(v.current,Z,i)),J=(H=R.selectionEnd)!==null&&H!==void 0?H:0,G=function(z,te,B){if(z.type!=="number")return z.setSelectionRange(te,B)};if(r&&w.current&&Z.length>=O.length)return R.value=O,G(R,J-1,J-1);var N=!1;Z.length<P.length&&(w.current=!1,N=!0),oe.test(Z)&&(w.current=!0);var j=J,W=Z[j-1],U=Ng(Z,typeof v.current=="function"?v.current(Z):v.current,s??Fg,c??Gs);for(R.value=U,V(U);j<U.length&&U.charAt(j-1)!==W;)j+=1;N?G(R,J,J):G(R,j,j),I.target.value=U,E(U),(Y=g.current)===null||Y===void 0||Y.call(g,U),(k=m.current)===null||k===void 0||k.call(m,I)};return b.createElement(y,St({},h,{ref:p,pattern:$,onChange:C,defaultValue:Lg(h.defaultValue)?F:void 0,value:Lg(h.value)?D(h.value,h.value):h.value}))}),Lg=function(e){return typeof e=="string"},Vg=b.forwardRef(function(e,t){return WO(e.mask)?b.createElement(UO,St({},e,{mask:void 0,ref:t})):YO(e.mask)?b.createElement(KO,St({},e,{mask:void 0,ref:t})):b.createElement(rI,St({},e,{ref:t}))}),jt=function(e){return function(t){return b.createElement(Vg,St({},e,t))}};jt(At.cellTelephone),jt(At.cellphone),jt(At.cep),jt(At.cnpj),jt(At.color),jt(At.cpf),jt(At.cpfCnpj),jt(At.creditCard),jt(At.date),jt(At.int),jt(At.isoDate),jt(At.telephone),jt(At.time),jt(At.uuid);var $g=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&zO(At,t.mask)?At[t.mask]:{mask:t.mask}},[t.mask]),o=St(St({},t),r);return b.createElement(Vg,St({},o,{ref:n}))}),zc={},Wc={exports:{}},Hc={};/**
138
138
  * @license React
139
139
  * use-sync-external-store-shim.production.min.js
140
140
  *
@@ -142,7 +142,7 @@
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 Mg;function rI(){if(Mg)return zc;Mg=1;var e=b;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(d,f){var h=f(),p=r({inst:{value:h,getSnapshot:f}}),m=p[0].inst,y=p[1];return s(function(){m.value=h,m.getSnapshot=f,l(m)&&y({inst:m})},[d,h,f]),o(function(){return l(m)&&y({inst:m}),d(function(){l(m)&&y({inst:m})})},[d]),i(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return zc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,zc}var Ng={};/**
145
+ */var Rg;function oI(){if(Rg)return Hc;Rg=1;var e=b;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(d,f){var h=f(),p=r({inst:{value:h,getSnapshot:f}}),m=p[0].inst,g=p[1];return i(function(){m.value=h,m.getSnapshot=f,l(m)&&g({inst:m})},[d,h,f]),o(function(){return l(m)&&g({inst:m}),d(function(){l(m)&&g({inst:m})})},[d]),s(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Hc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Hc}var jg={};/**
146
146
  * @license React
147
147
  * use-sync-external-store-shim.development.js
148
148
  *
@@ -150,7 +150,7 @@
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 Fg;function oI(){return Fg||(Fg=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=b,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(g){{for(var S=arguments.length,T=new Array(S>1?S-1:0),E=1;E<S;E++)T[E-1]=arguments[E];r("error",g,T)}}function r(g,S,T){{var E=t.ReactDebugCurrentFrame,k=E.getStackAddendum();k!==""&&(S+="%s",T=T.concat([k]));var A=T.map(function(D){return String(D)});A.unshift("Warning: "+S),Function.prototype.apply.call(console[g],console,A)}}function o(g,S){return g===S&&(g!==0||1/g===1/S)||g!==g&&S!==S}var s=typeof Object.is=="function"?Object.is:o,i=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,d=!1;function f(g,S,T){u||e.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=S();if(!d){var k=S();s(E,k)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var A=i({inst:{value:E,getSnapshot:S}}),D=A[0].inst,O=A[1];return l(function(){D.value=E,D.getSnapshot=S,h(D)&&O({inst:D})},[g,E,S]),a(function(){h(D)&&O({inst:D});var V=function(){h(D)&&O({inst:D})};return g(V)},[g]),c(E),E}function h(g){var S=g.getSnapshot,T=g.value;try{var E=S();return!s(T,E)}catch{return!0}}function p(g,S,T){return S()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!m,v=y?p:f,w=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;Ng.useSyncExternalStore=w,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ng}var Lg;function Vg(){return Lg||(Lg=1,process.env.NODE_ENV==="production"?Bc.exports=rI():Bc.exports=oI()),Bc.exports}/**
153
+ */var Bg;function iI(){return Bg||(Bg=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=b,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(y){{for(var S=arguments.length,T=new Array(S>1?S-1:0),E=1;E<S;E++)T[E-1]=arguments[E];r("error",y,T)}}function r(y,S,T){{var E=t.ReactDebugCurrentFrame,P=E.getStackAddendum();P!==""&&(S+="%s",T=T.concat([P]));var D=T.map(function(_){return String(_)});D.unshift("Warning: "+S),Function.prototype.apply.call(console[y],console,D)}}function o(y,S){return y===S&&(y!==0||1/y===1/S)||y!==y&&S!==S}var i=typeof Object.is=="function"?Object.is:o,s=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,d=!1;function f(y,S,T){u||e.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=S();if(!d){var P=S();i(E,P)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var D=s({inst:{value:E,getSnapshot:S}}),_=D[0].inst,O=D[1];return l(function(){_.value=E,_.getSnapshot=S,h(_)&&O({inst:_})},[y,E,S]),a(function(){h(_)&&O({inst:_});var V=function(){h(_)&&O({inst:_})};return y(V)},[y]),c(E),E}function h(y){var S=y.getSnapshot,T=y.value;try{var E=S();return!i(T,E)}catch{return!0}}function p(y,S,T){return S()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!m,v=g?p:f,w=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;jg.useSyncExternalStore=w,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),jg}var zg;function Wg(){return zg||(zg=1,process.env.NODE_ENV==="production"?Wc.exports=oI():Wc.exports=iI()),Wc.exports}/**
154
154
  * @license React
155
155
  * use-sync-external-store-shim/with-selector.production.min.js
156
156
  *
@@ -158,7 +158,7 @@
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 $g;function sI(){if($g)return jc;$g=1;var e=b,t=Vg();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return jc.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function v(E){if(!w){if(w=!0,g=E,E=f(E),h!==void 0&&m.hasValue){var k=m.value;if(h(k,E))return S=k}return S=E}if(k=S,r(g,E))return k;var A=f(E);return h!==void 0&&h(k,A)?k:(g=E,S=A)}var w=!1,g,S,T=d===void 0?null:d;return[function(){return v(u())},T===null?void 0:function(){return v(T())}]},[u,d,f,h]);var y=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},jc}var Rg={};/**
161
+ */var Hg;function sI(){if(Hg)return zc;Hg=1;var e=b,t=Wg();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return zc.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function v(E){if(!w){if(w=!0,y=E,E=f(E),h!==void 0&&m.hasValue){var P=m.value;if(h(P,E))return S=P}return S=E}if(P=S,r(y,E))return P;var D=f(E);return h!==void 0&&h(P,D)?P:(y=E,S=D)}var w=!1,y,S,T=d===void 0?null:d;return[function(){return v(u())},T===null?void 0:function(){return v(T())}]},[u,d,f,h]);var g=o(c,p[0],p[1]);return s(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},zc}var Ug={};/**
162
162
  * @license React
163
163
  * use-sync-external-store-shim/with-selector.development.js
164
164
  *
@@ -166,31 +166,31 @@
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 jg;function iI(){return jg||(jg=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=b,t=Vg();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,p){var m=s(null),y;m.current===null?(y={hasValue:!1,value:null},m.current=y):y=m.current;var v=a(function(){var T=!1,E,k,A=function(F){if(!T){T=!0,E=F;var R=h(F);if(p!==void 0&&y.hasValue){var C=y.value;if(p(C,R))return k=C,C}return k=R,R}var I=E,M=k;if(r(I,F))return M;var L=h(F);return p!==void 0&&p(M,L)?M:(E=F,k=L,L)},D=f===void 0?null:f,O=function(){return A(d())},V=D===null?void 0:function(){return A(D())};return[O,V]},[d,f,h,p]),w=v[0],g=v[1],S=o(u,w,g);return i(function(){y.hasValue=!0,y.value=S},[S]),l(S),S}Rg.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Rg}process.env.NODE_ENV==="production"?sI():iI();const vo=e=>{const t=b.useRef(e??{});return b.useEffect(()=>void(t.current=e),[e]),t},aI=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},lI=e=>Object.entries(e),Bg=e=>e instanceof Promise,zg=(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),cI=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,d)=>n(f=>zg(u,f,s,d));return Bg(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))},uI=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>zg(c,u,s,o.current));return Bg(a)?a.then(c=>l(c)):l(a)},Wc=(e,t,n)=>{const[r,o]=b.useState(()=>e),s=vo(r),i=vo((n==null?void 0:n.props)??{}),a=vo(t),l=vo((n==null?void 0:n.postMiddleware)??[]),c=vo((n==null?void 0:n.interceptor)??[]),u=b.useRef(e),d=aI(r),f=vo(d),h=b.useRef(null);b.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(y=>{y(r,d,m)})},[r,l,d]);const[p]=b.useState(()=>{const m=()=>i.current,y=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>f.current});return lI(y).reduce((v,[w,g])=>({...v,[w]:n!=null&&n.debug?cI(w,g,o,m,h,c.current):uI(w,g,o,m,h,c.current)}),{})});return[r,p,i.current]},dI=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function fI(e,t){return b.useRef(dI(e,t)).current}function Hc(e,t,n){var r,o,s,i,a;t==null&&(t=100);function l(){var u=Date.now()-i;u<t&&u>=0?r=setTimeout(l,t-u):(r=null,n||(a=e.apply(s,o),s=o=null))}var c=function(){s=this,o=arguments,i=Date.now();var u=n&&!r;return r||(r=setTimeout(l,t)),u&&(a=e.apply(s,o),s=o=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=e.apply(s,o),s=o=null,clearTimeout(r),r=null)},c}Hc.debounce=Hc;var hI=Hc;const Wg=Qd(hI);function pI(e){let{debounce:t,scroll:n,polyfill:r,offsetSize:o}={debounce:0,scroll:!1,offsetSize:!1};const s=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[i,a]=b.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=b.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:i}),c=t?typeof t=="number"?t:t.scroll:null,u=t?typeof t=="number"?t:t.resize:null,d=b.useRef(!1);b.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[f,h,p]=b.useMemo(()=>{const w=()=>{if(!l.current.element)return;const{left:g,top:S,width:T,height:E,bottom:k,right:A,x:D,y:O}=l.current.element.getBoundingClientRect(),V={left:g,top:S,width:T,height:E,bottom:k,right:A,x:D,y:O};l.current.element instanceof HTMLElement&&o&&(V.height=l.current.element.offsetHeight,V.width=l.current.element.offsetWidth),Object.freeze(V),d.current&&!vI(l.current.lastBounds,V)&&a(l.current.lastBounds=V)};return[w,u?Wg(w,u):w,c?Wg(w,c):w]},[a,o,c,u]);function m(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(w=>w.removeEventListener("scroll",p,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function y(){l.current.element&&(l.current.resizeObserver=new s(p),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(w=>w.addEventListener("scroll",p,{capture:!0,passive:!0})))}const v=w=>{!w||w===l.current.element||(m(),l.current.element=w,l.current.scrollContainers=Hg(w),y())};return gI(p,!!n),mI(h),b.useEffect(()=>{m(),y()},[n,p,h]),b.useEffect(()=>m,[]),[v,i,f]}function mI(e){b.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function gI(e,t){b.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function Hg(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:o}=window.getComputedStyle(e);return[n,r,o].some(s=>s==="auto"||s==="scroll")&&t.push(e),[...t,...Hg(e.parentElement)]}const yI=["x","y","top","bottom","left","right","width","height"],vI=(e,t)=>yI.every(n=>e[n]===t[n]),bI=({children:e})=>{const[t,n]=pI();return x.jsx(Ht.div,{animate:{height:n.height>0?n.height:"auto"},children:x.jsx("div",{ref:t,children:e})})},wI={type:"spring",bounce:.1,duration:.3},Ug=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.5}),Gg={middle:{x:"0%",opacity:1},enter:Ug(1),exit:Ug(-1)},Yg={exit:{visibility:"hidden"}},xI=e=>{const t=hn(og(e));return rg({start:t,end:po(t,41)})},qg=(e,t)=>e.toLocaleDateString(t,{month:"long"}),TI=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=og(new Date(e).setMonth(r)),s=qg(o,t);return x.jsx("option",{value:s,"data-index":r,children:s},s)}),Uc={ArrowLeft:(e,t)=>t==="days"?VO(e,1):bg(e,1),ArrowRight:(e,t)=>t==="days"?po(e,1):Ri(e,1),ArrowUp:(e,t)=>t==="days"?$O(e,1):RO(e,1),ArrowDown:(e,t)=>t==="days"?tg(e,1):ng(e,1)},Kg=(e,t=0)=>{const n=e.toISOString(),r=()=>{const o=document.querySelector(`button[data-date="${n}"]`);if(o)return o.focus({preventScroll:!1})};t===0&&r(),setTimeout(r,t)},_r=e=>e.getFullYear().toString().padStart(4,"0"),Zg=({locale:e,disabledDate:t,markToday:n=!0,autoFocusToday:r=!0,date:o,onChange:s})=>{const i=o||new Date,[a,l]=Wc({date:i,isAnimating:!1,year:_r(i),direction:void 0,months:TI(i,e),week:rg({start:hn(i),end:YP(i)})},p=>({onChangeYear:m=>({year:m}),setToday:()=>({date:go(new Date)}),onExitComplete:()=>(Kg(p.state().date,200),{isAnimating:!1}),date:m=>{const y=m(p.state().date);return{date:y,year:_r(y)}},nextMonth:()=>{const m=p.state();if(m.isAnimating)return m;const y=Ri(m.date,1);return{date:y,isAnimating:!0,direction:1,year:_r(y)}},previousMonth:()=>{const m=p.state();if(m.isAnimating)return m;const y=bg(m.date,1);return{date:y,isAnimating:!0,direction:-1,year:_r(y)}},onSelectDate:m=>{const y=m.currentTarget.dataset.date||"",v=new Date(y);return{date:v,year:_r(v)}},onChangeMonth:m=>{const y=m.target.value,w=Array.from(m.target.options).find(g=>g.value===y);if(w){const g=w.dataset.index||"",S=new Date(p.state().date);return S.setMonth(+g),{date:S,year:_r(S)}}return p.state()},onKeyDown:m=>{const y=m.key;if(y in Uc){(y==="ArrowUp"||y==="ArrowDown")&&m.preventDefault();const v=p.state().date,w=Pn.keyof(Uc,y)?Uc[y](v,m.shiftKey?"month":"days"):null;if(w!==null)return Kg(w),{date:w,year:_r(w)}}return p.state()}})),c=xI(a.date),u=a.date.toISOString(),d=qg(a.date,e);b.useEffect(()=>s==null?void 0:s(a.date),[u]);const f=fI(p=>{l.date(m=>{const y=new Date(m);return y.setFullYear(+p),y})},700),h=p=>{const m=p.currentTarget.value;l.onChangeYear(m),f(m)};return x.jsx(fP,{transition:wI,children:x.jsxs("div",{className:"relative overflow-hidden",children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(bI,{children:x.jsx(Vi,{presenceAffectsLayout:!0,mode:"popLayout",initial:!1,custom:a.direction,onExitComplete:l.onExitComplete,children:x.jsxs(Ht.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(Ht.button,{onClick:l.previousMonth,variants:Yg,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(F1,{className:"h-4 w-4"})}),x.jsx(Ht.span,{variants:Gg,custom:a.direction,className:"absolute z-normal isolate inset-0 flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"w-fit flex items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{style:{width:`${d.length}ch`},value:d,onChange:l.onChangeMonth,className:"appearance-none capitalize bg-transparent proportional-nums hover:text-primary cursor-pointer w-fit",children:a.months}),x.jsx(Dg,{mask:"int",value:a.year,maxLength:4,placeholder:"YYYY",onChange:h,style:{width:`${a.year.length}ch`},className:"w-16 bg-transparent appearance-none hover:text-primary cursor-pointer"})]})}),x.jsx(Ht.button,{variants:Yg,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:l.nextMonth,children:x.jsx(kl,{className:"h-4 w-4"})}),x.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),x.jsx("div",{className:"mt-4 grid grid-cols-7 gap-y-4",children:a.week.map(p=>x.jsx("span",{className:"font-medium capitalize text-sm",children:p.toLocaleDateString(e,{weekday:"short"})},p.toString()))}),x.jsx(Ht.ul,{onKeyDown:l.onKeyDown,variants:Gg,custom:a.direction,className:"mt-4 pb-2 grid grid-cols-7 gap-y-4",children:c.map(p=>{const m=p.toISOString(),y=m===u,v=LO(p)&&n,w=(t==null?void 0:t(p))||!1,g=!FO(p,a.date)||w;return x.jsx("li",{className:"w-full flex items-center justify-center",children:x.jsx("button",{type:"button","data-date":m,disabled:w,onClick:l.onSelectDate,"data-view":a.date.getMonth().toString(),className:`size-8 disabled:cursor-not-allowed rounded-full font-semibold flex items-center justify-center proportional-nums ${v?"text-primary":""} ${g?"text-disabled":""} ${y?"bg-primary text-primary-foreground":""}`,children:p.getDate()})},m)})})]},d)})})}),x.jsx("footer",{className:"text-center text-primary mt-2",children:x.jsx("button",{className:"hover:scale-105 transition-transform duration-300",type:"button",onClick:l.setToday,children:"Today"})})]})})},Xg=({children:e,title:t,container:n="",header:r=null,className:o="",...s})=>x.jsxs(eo,{...s,as:"div",className:pt("rounded-card flex flex-col gap-4 bg-card-background py-4 pb-8 border-card-border border shadow",n),children:[t?x.jsx("header",{className:"w-full px-8 pb-4 mb-2 border-b border-card-border font-medium text-xl",children:t}):r,x.jsx("div",{className:`min-w-full px-8 ${o}`,children:e})]}),SI=e=>x.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[x.jsxs("header",{className:"p-6 items-start flex gap-4",children:[x.jsx("div",{className:pt("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:x.jsx("div",{children:x.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("header",{children:x.jsx("h3",{className:"text-base leading-none",children:e.title})}),x.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?x.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),Qg=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]},Jg={inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>x.jsxs(b.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]})},EI=b.createContext({translations:Jg}),tn=()=>{const e=b.useContext(EI);return e?e.translations:Jg};function nr(e){return ey(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mn(e){var t;return(t=(ey(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ey(e){return e instanceof Node||e instanceof Bt(e).Node}function je(e){return e instanceof Element||e instanceof Bt(e).Element}function ct(e){return e instanceof HTMLElement||e instanceof Bt(e).HTMLElement}function Gc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function Es(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ut(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function CI(e){return["table","td","th"].includes(nr(e))}function Hi(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Yc(e){const t=qc(),n=je(e)?Ut(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function PI(e){let t=Nn(e);for(;ct(t)&&!rr(t);){if(Yc(t))return t;if(Hi(t))return null;t=Nn(t)}return null}function qc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function rr(e){return["html","body","#document"].includes(nr(e))}function Ut(e){return Bt(e).getComputedStyle(e)}function Ui(e){return je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nn(e){if(nr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gc(e)&&e.host||Mn(e);return Gc(t)?t.host:t}function ty(e){const t=Nn(e);return rr(t)?e.ownerDocument?e.ownerDocument.body:e.body:ct(t)&&Es(t)?t:ty(t)}function or(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ty(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Bt(o);return s?t.concat(i,i.visualViewport||[],Es(o)?o:[],i.frameElement&&n?or(i.frameElement):[]):t.concat(o,or(o,[],n))}function nn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function ut(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Gc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Kc(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function ny(){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 ry(e){return e.mozInputSource===0&&e.isTrusted?!0:Qc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Zc(e){return kI()?!1:!Qc()&&e.width===0&&e.height===0||Qc()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Xc(){return/apple/i.test(navigator.vendor)}function Qc(){const e=/android/i;return e.test(Kc())||e.test(ny())}function oy(){return Kc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function kI(){return ny().includes("jsdom/")}function Cs(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function OI(e){return"nativeEvent"in e}function II(e){return e.matches("html,body")}function vt(e){return(e==null?void 0:e.ownerDocument)||document}function Jc(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Fn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const _I="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function eu(e){return ct(e)&&e.matches(_I)}function Et(e){e.preventDefault(),e.stopPropagation()}function sy(e){return e?e.getAttribute("role")==="combobox"&&eu(e):!1}const gn=Math.min,Gt=Math.max,Gi=Math.round,bo=Math.floor,sr=e=>({x:e,y:e}),AI={left:"right",right:"left",bottom:"top",top:"bottom"},DI={start:"end",end:"start"};function tu(e,t,n){return Gt(e,gn(t,n))}function wo(e,t){return typeof e=="function"?e(t):e}function ir(e){return e.split("-")[0]}function xo(e){return e.split("-")[1]}function iy(e){return e==="x"?"y":"x"}function nu(e){return e==="y"?"height":"width"}function Ar(e){return["top","bottom"].includes(ir(e))?"y":"x"}function ru(e){return iy(Ar(e))}function MI(e,t,n){n===void 0&&(n=!1);const r=xo(e),o=ru(e),s=nu(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Yi(i)),[i,Yi(i)]}function NI(e){const t=Yi(e);return[ou(e),t,ou(t)]}function ou(e){return e.replace(/start|end/g,t=>DI[t])}function FI(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 LI(e,t,n,r){const o=xo(e);let s=FI(ir(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(ou)))),s}function Yi(e){return e.replace(/left|right|bottom|top/g,t=>AI[t])}function VI(e){return{top:0,right:0,bottom:0,left:0,...e}}function ay(e){return typeof e!="number"?VI(e):{top:e,right:e,bottom:e,left:e}}function qi(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
169
+ */var Gg;function aI(){return Gg||(Gg=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=b,t=Wg();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,p){var m=i(null),g;m.current===null?(g={hasValue:!1,value:null},m.current=g):g=m.current;var v=a(function(){var T=!1,E,P,D=function(F){if(!T){T=!0,E=F;var $=h(F);if(p!==void 0&&g.hasValue){var C=g.value;if(p(C,$))return P=C,C}return P=$,$}var I=E,M=P;if(r(I,F))return M;var L=h(F);return p!==void 0&&p(M,L)?M:(E=F,P=L,L)},_=f===void 0?null:f,O=function(){return D(d())},V=_===null?void 0:function(){return D(_())};return[O,V]},[d,f,h,p]),w=v[0],y=v[1],S=o(u,w,y);return s(function(){g.hasValue=!0,g.value=S},[S]),l(S),S}Ug.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ug}process.env.NODE_ENV==="production"?sI():aI();const bo=e=>{const t=b.useRef(e??{});return b.useEffect(()=>void(t.current=e),[e]),t},lI=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},cI=e=>Object.entries(e),Yg=e=>e instanceof Promise,qg=(e,t,n,r)=>t===e?n.reduce((o,i)=>i(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,i)=>i(o,t,r),{...t,...e}):n.reduce((o,i)=>i(o,t,r),e),uI=(e,t,n,r,o,i)=>(...s)=>{const a=performance.now(),l=t(...s),c=(u,d)=>n(f=>qg(u,f,i,d));return Yg(l)?l.then(u=>{o.current={method:e,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:e,props:r(),time:performance.now()-a},void c(l,o.current))},dI=(e,t,n,r,o,i)=>(...s)=>{o.current={method:e,time:0,props:r()};const a=t(...s),l=c=>n(u=>qg(c,u,i,o.current));return Yg(a)?a.then(c=>l(c)):l(a)},Uc=(e,t,n)=>{const[r,o]=b.useState(()=>e),i=bo(r),s=bo((n==null?void 0:n.props)??{}),a=bo(t),l=bo((n==null?void 0:n.postMiddleware)??[]),c=bo((n==null?void 0:n.interceptor)??[]),u=b.useRef(e),d=lI(r),f=bo(d),h=b.useRef(null);b.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(g=>{g(r,d,m)})},[r,l,d]);const[p]=b.useState(()=>{const m=()=>s.current,g=a.current({props:m,state:()=>i.current,initialState:u.current,previousState:()=>f.current});return cI(g).reduce((v,[w,y])=>({...v,[w]:n!=null&&n.debug?uI(w,y,o,m,h,c.current):dI(w,y,o,m,h,c.current)}),{})});return[r,p,s.current]},fI=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function hI(e,t){return b.useRef(fI(e,t)).current}const pI={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0},mI=()=>{const[e,t]=b.useState(null),n=Or(pI),r=b.useMemo(()=>new window.ResizeObserver(o=>{if(o[0]){const i=o[0].contentRect;n.set({x:i.x,y:i.y,width:i.width,height:i.height,top:i.top,left:i.left,bottom:i.bottom,right:i.right})}}),[]);return b.useEffect(()=>{if(e)return r.observe(e),()=>{r.disconnect()}},[e]),[t,n]},gI=({children:e})=>{const[t,n]=mI(),r=n.get().height;return x.jsx(Ht.div,{animate:{height:r>0?r:"auto"},children:x.jsx("div",{ref:t,children:e})})},yI={type:"spring",bounce:.1,duration:.3},Kg=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.5}),Zg={middle:{x:"0%",opacity:1},enter:Kg(1),exit:Kg(-1)},Xg={exit:{visibility:"hidden"}},vI=e=>{const t=hn(ug(e));return cg({start:t,end:mo(t,41)})},Qg=(e,t)=>e.toLocaleDateString(t,{month:"long"}),bI=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=ug(new Date(e).setMonth(r)),i=Qg(o,t);return x.jsx("option",{value:i,"data-index":r,children:i},i)}),Gc={ArrowLeft:(e,t)=>t==="days"?$O(e,1):Cg(e,1),ArrowRight:(e,t)=>t==="days"?mo(e,1):Ws(e,1),ArrowUp:(e,t)=>t==="days"?RO(e,1):jO(e,1),ArrowDown:(e,t)=>t==="days"?ag(e,1):lg(e,1)},Jg=(e,t=0)=>{const n=e.toISOString(),r=()=>{const o=document.querySelector(`button[data-date="${n}"]`);if(o)return o.focus({preventScroll:!1})};t===0&&r(),setTimeout(r,t)},_r=e=>e.getFullYear().toString().padStart(4,"0"),ey=({locale:e,disabledDate:t,markToday:n=!0,autoFocusToday:r=!0,date:o,onChange:i})=>{const s=o||new Date,[a,l]=Uc({date:s,isAnimating:!1,year:_r(s),direction:void 0,months:bI(s,e),week:cg({start:hn(s),end:qP(s)})},p=>({onChangeYear:m=>({year:m}),setToday:()=>({date:yo(new Date)}),onExitComplete:()=>(Jg(p.state().date,200),{isAnimating:!1}),date:m=>{const g=m(p.state().date);return{date:g,year:_r(g)}},nextMonth:()=>{const m=p.state();if(m.isAnimating)return m;const g=Ws(m.date,1);return{date:g,isAnimating:!0,direction:1,year:_r(g)}},previousMonth:()=>{const m=p.state();if(m.isAnimating)return m;const g=Cg(m.date,1);return{date:g,isAnimating:!0,direction:-1,year:_r(g)}},onSelectDate:m=>{const g=m.currentTarget.dataset.date||"",v=new Date(g);return{date:v,year:_r(v)}},onChangeMonth:m=>{const g=m.target.value,w=Array.from(m.target.options).find(y=>y.value===g);if(w){const y=w.dataset.index||"",S=new Date(p.state().date);return S.setMonth(+y),{date:S,year:_r(S)}}return p.state()},onKeyDown:m=>{const g=m.key;if(g in Gc){(g==="ArrowUp"||g==="ArrowDown")&&m.preventDefault();const v=p.state().date,w=Pn.keyof(Gc,g)?Gc[g](v,m.shiftKey?"month":"days"):null;if(w!==null)return Jg(w),{date:w,year:_r(w)}}return p.state()}})),c=vI(a.date),u=a.date.toISOString(),d=Qg(a.date,e);b.useEffect(()=>i==null?void 0:i(a.date),[u]);const f=hI(p=>{l.date(m=>{const g=new Date(m);return g.setFullYear(+p),g})},1200),h=p=>{const m=p.currentTarget.value;l.onChangeYear(m),f(m)};return x.jsx(XC,{transition:yI,children:x.jsxs("div",{className:"relative overflow-hidden",children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(gI,{children:x.jsx(Bs,{initial:!1,mode:"popLayout",presenceAffectsLayout:!0,custom:a.direction,onExitComplete:l.onExitComplete,children:x.jsxs(Ht.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(Ht.button,{onClick:l.previousMonth,variants:Xg,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(SP,{className:"h-4 w-4"})}),x.jsx(Ht.span,{variants:Zg,custom:a.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{style:{width:`${d.length}ch`},value:d,onChange:l.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:a.months}),x.jsx($g,{mask:"int",value:a.year,maxLength:4,placeholder:"YYYY",onChange:h,style:{width:`${a.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(Ht.button,{variants:Xg,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:l.nextMonth,children:x.jsx(Oc,{className:"h-4 w-4"})}),x.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),x.jsx("div",{className:"mt-4 grid grid-cols-7 gap-y-4",children:a.week.map(p=>x.jsx("span",{className:"text-sm font-medium capitalize",children:p.toLocaleDateString(e,{weekday:"short"})},p.toString()))}),x.jsx(Ht.ul,{onKeyDown:l.onKeyDown,variants:Zg,custom:a.direction,className:"mt-4 grid grid-cols-7 gap-y-4 pb-2",children:c.map(p=>{const m=p.toISOString(),g=m===u,v=VO(p)&&n,w=(t==null?void 0:t(p))||!1,y=!LO(p,a.date)||w;return x.jsx("li",{className:"flex w-full items-center justify-center",children:x.jsx("button",{type:"button","data-date":m,disabled:w,onClick:l.onSelectDate,"data-view":a.date.getMonth().toString(),className:Xe(`flex size-8 items-center justify-center rounded-full font-semibold proportional-nums disabled:cursor-not-allowed ${v?"text-primary":""} ${y?"text-disabled":""} ${g?"bg-primary text-primary-foreground":""}`),children:p.getDate()})},m)})})]},d)})})}),x.jsx("footer",{className:"mt-2 text-center text-primary",children:x.jsx("button",{className:"duration-300 transition-transform hover:scale-105",type:"button",onClick:l.setToday,children:"Today"})})]})})},ty=({children:e,title:t,as:n="div",container:r="",header:o=null,className:i="",...s})=>x.jsxs(no,{...s,as:n,className:Xe("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",r),children:[t?x.jsx("header",{className:"mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",children:t}):o,x.jsx("div",{className:Xe("min-w-full px-8",i),children:e})]}),wI=e=>x.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[x.jsxs("header",{className:"p-6 items-start flex gap-4",children:[x.jsx("div",{className:Xe("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:x.jsx("div",{children:x.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("header",{children:x.jsx("h3",{className:"text-base leading-none",children:e.title})}),x.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?x.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),ny=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]};function nr(e){return ry(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mn(e){var t;return(t=(ry(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ry(e){return e instanceof Node||e instanceof Bt(e).Node}function je(e){return e instanceof Element||e instanceof Bt(e).Element}function ut(e){return e instanceof HTMLElement||e instanceof Bt(e).HTMLElement}function Yc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function Ei(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ut(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function xI(e){return["table","td","th"].includes(nr(e))}function qs(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function qc(e){const t=Kc(),n=je(e)?Ut(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function TI(e){let t=Nn(e);for(;ut(t)&&!rr(t);){if(qc(t))return t;if(qs(t))return null;t=Nn(t)}return null}function Kc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function rr(e){return["html","body","#document"].includes(nr(e))}function Ut(e){return Bt(e).getComputedStyle(e)}function Ks(e){return je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nn(e){if(nr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yc(e)&&e.host||Mn(e);return Yc(t)?t.host:t}function oy(e){const t=Nn(e);return rr(t)?e.ownerDocument?e.ownerDocument.body:e.body:ut(t)&&Ei(t)?t:oy(t)}function or(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=oy(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Bt(o);if(i){const a=Zc(s);return t.concat(s,s.visualViewport||[],Ei(o)?o:[],a&&n?or(a):[])}return t.concat(o,or(o,[],n))}function Zc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function dt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Yc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Xc(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function iy(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function sy(e){return e.mozInputSource===0&&e.isTrusted?!0:eu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Qc(e){return SI()?!1:!eu()&&e.width===0&&e.height===0||eu()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Jc(){return/apple/i.test(navigator.vendor)}function eu(){const e=/android/i;return e.test(Xc())||e.test(iy())}function ay(){return Xc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function SI(){return iy().includes("jsdom/")}function Ci(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function EI(e){return"nativeEvent"in e}function CI(e){return e.matches("html,body")}function vt(e){return(e==null?void 0:e.ownerDocument)||document}function tu(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Fn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const PI="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function nu(e){return ut(e)&&e.matches(PI)}function Et(e){e.preventDefault(),e.stopPropagation()}function ly(e){return e?e.getAttribute("role")==="combobox"&&nu(e):!1}const gn=Math.min,Gt=Math.max,Zs=Math.round,wo=Math.floor,ir=e=>({x:e,y:e}),kI={left:"right",right:"left",bottom:"top",top:"bottom"},OI={start:"end",end:"start"};function ru(e,t,n){return Gt(e,gn(t,n))}function xo(e,t){return typeof e=="function"?e(t):e}function sr(e){return e.split("-")[0]}function To(e){return e.split("-")[1]}function cy(e){return e==="x"?"y":"x"}function ou(e){return e==="y"?"height":"width"}function Dr(e){return["top","bottom"].includes(sr(e))?"y":"x"}function iu(e){return cy(Dr(e))}function II(e,t,n){n===void 0&&(n=!1);const r=To(e),o=iu(e),i=ou(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Xs(s)),[s,Xs(s)]}function AI(e){const t=Xs(e);return[su(e),t,su(t)]}function su(e){return e.replace(/start|end/g,t=>OI[t])}function _I(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function DI(e,t,n,r){const o=To(e);let i=_I(sr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(su)))),i}function Xs(e){return e.replace(/left|right|bottom|top/g,t=>kI[t])}function MI(e){return{top:0,right:0,bottom:0,left:0,...e}}function uy(e){return typeof e!="number"?MI(e):{top:e,right:e,bottom:e,left:e}}function Qs(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
170
170
  * tabbable 6.2.0
171
171
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
172
- */var $I=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ki=$I.join(","),ly=typeof Element>"u",To=ly?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Zi=!ly&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Xi=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},RI=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},jI=function(t,n,r){if(Xi(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ki));return n&&To.call(t,Ki)&&o.unshift(t),o=o.filter(r),o},BI=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Xi(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=To.call(i,Ki);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!Xi(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&f){var h=e(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return o},cy=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},uy=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||RI(t))&&!cy(t)?0:t.tabIndex},zI=function(t,n){var r=uy(t);return r<0&&n&&!cy(t)?0:r},WI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},dy=function(t){return t.tagName==="INPUT"},HI=function(t){return dy(t)&&t.type==="hidden"},UI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},GI=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},YI=function(t){if(!t.name)return!0;var n=t.form||Zi(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=GI(o,t.form);return!s||s===t},qI=function(t){return dy(t)&&t.type==="radio"},KI=function(t){return qI(t)&&!YI(t)},ZI=function(t){var n,r=t&&Zi(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,d;r=Zi(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return s},fy=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},XI=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=To.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(To.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=Zi(t);if(l&&!l.shadowRoot&&o(l)===!0)return fy(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(ZI(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return fy(t);return!1},QI=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return To.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},JI=function(t,n){return!(n.disabled||Xi(n)||HI(n)||XI(n,t)||UI(n)||QI(n))},su=function(t,n){return!(KI(n)||uy(n)<0||!JI(t,n))},e_=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},t_=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=zI(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(WI).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Ps=function(t,n){n=n||{};var r;return n.getShadowRoot?r=BI([t],n.includeContainer,{filter:su.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:e_}):r=jI(t,n.includeContainer,su.bind(null,n)),t_(r)},n_=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return To.call(t,Ki)===!1?!1:su(n,t)};function hy(e,t,n){let{reference:r,floating:o}=e;const s=Ar(t),i=ru(t),a=nu(i),l=ir(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(xo(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}const r_=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}=hy(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:y,fn:v}=a[m],{x:w,y:g,data:S,reset:T}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=w??u,d=g??d,h={...h,[y]:{...h[y],...S}},T&&p<=50&&(p++,typeof T=="object"&&(T.placement&&(f=T.placement),T.rects&&(c=T.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:d}=hy(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function iu(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=wo(t,e),p=ay(h),y=a[f?d==="floating"?"reference":"floating":d],v=qi(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},T=qi(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:g,strategy:l}):w);return{top:(v.top-T.top+p.top)/S.y,bottom:(T.bottom-v.bottom+p.bottom)/S.y,left:(v.left-T.left+p.left)/S.x,right:(T.right-v.right+p.right)/S.x}}const o_=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=wo(e,t)||{};if(c==null)return{};const d=ay(u),f={x:n,y:r},h=ru(o),p=nu(h),m=await i.getDimensions(c),y=h==="y",v=y?"top":"left",w=y?"bottom":"right",g=y?"clientHeight":"clientWidth",S=s.reference[p]+s.reference[h]-f[h]-s.floating[p],T=f[h]-s.reference[h],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let k=E?E[g]:0;(!k||!await(i.isElement==null?void 0:i.isElement(E)))&&(k=a.floating[g]||s.floating[p]);const A=S/2-T/2,D=k/2-m[p]/2-1,O=gn(d[v],D),V=gn(d[w],D),F=O,R=k-m[p]-V,C=k/2-m[p]/2+A,I=tu(F,C,R),M=!l.arrow&&xo(o)!=null&&C!==I&&s.reference[p]/2-(C<F?O:V)-m[p]/2<0,L=M?C<F?C-F:C-R:0;return{[h]:f[h]+L,data:{[h]:I,centerOffset:C-I-L,...M&&{alignmentOffset:L}},reset:M}}}),s_=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=wo(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=ir(o),w=Ar(a),g=ir(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=f||(g||!m?[Yi(a)]:NI(a)),E=p!=="none";!f&&E&&T.push(...LI(a,m,p,S));const k=[a,...T],A=await iu(t,y),D=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&D.push(A[v]),d){const C=MI(o,i,S);D.push(A[C[0]],A[C[1]])}if(O=[...O,{placement:o,overflows:D}],!D.every(C=>C<=0)){var V,F;const C=(((V=s.flip)==null?void 0:V.index)||0)+1,I=k[C];if(I)return{data:{index:C,overflows:O},reset:{placement:I}};let M=(F=O.filter(L=>L.overflows[0]<=0).sort((L,H)=>L.overflows[1]-H.overflows[1])[0])==null?void 0:F.placement;if(!M)switch(h){case"bestFit":{var R;const L=(R=O.filter(H=>{if(E){const G=Ar(H.placement);return G===w||G==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(G=>G>0).reduce((G,P)=>G+P,0)]).sort((H,G)=>H[1]-G[1])[0])==null?void 0:R[0];L&&(M=L);break}case"initialPlacement":M=a;break}if(o!==M)return{reset:{placement:M}}}return{}}}};async function i_(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=ir(n),a=xo(n),l=Ar(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=wo(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const a_=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 i_(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}}}}},l_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:y=>{let{x:v,y:w}=y;return{x:v,y:w}}},...l}=wo(e,t),c={x:n,y:r},u=await iu(t,l),d=Ar(ir(o)),f=iy(d);let h=c[f],p=c[d];if(s){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",w=h+u[y],g=h-u[v];h=tu(w,h,g)}if(i){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",w=p+u[y],g=p-u[v];p=tu(w,p,g)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},c_=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=wo(e,t),l=await iu(t,a),c=ir(n),u=xo(n),d=Ar(n)==="y",{width:f,height:h}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const y=h-l.top-l.bottom,v=f-l.left-l.right,w=gn(h-l[p],y),g=gn(f-l[m],v),S=!t.middlewareData.shift;let T=w,E=g;if(d?E=u||S?gn(g,v):v:T=u||S?gn(w,y):y,S&&!u){const A=Gt(l.left,0),D=Gt(l.right,0),O=Gt(l.top,0),V=Gt(l.bottom,0);d?E=f-2*(A!==0||D!==0?A+D:Gt(l.left,l.right)):T=h-2*(O!==0||V!==0?O+V:Gt(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:T});const k=await o.getDimensions(s.floating);return f!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function py(e){const t=Ut(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ct(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Gi(n)!==s||Gi(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function au(e){return je(e)?e:e.contextElement}function So(e){const t=au(e);if(!ct(t))return sr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=py(t);let i=(s?Gi(n.width):n.width)/r,a=(s?Gi(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const u_=sr(0);function my(e){const t=Bt(e);return!qc()||!t.visualViewport?u_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function d_(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function Dr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=au(e);let i=sr(1);t&&(r?je(r)&&(i=So(r)):i=So(e));const a=d_(s,n,r)?my(s):sr(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const f=Bt(s),h=r&&je(r)?Bt(r):r;let p=f,m=p.frameElement;for(;m&&r&&h!==p;){const y=So(m),v=m.getBoundingClientRect(),w=Ut(m),g=v.left+(m.clientLeft+parseFloat(w.paddingLeft))*y.x,S=v.top+(m.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=g,c+=S,p=Bt(m),m=p.frameElement}}return qi({width:u,height:d,x:l,y:c})}function f_(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Mn(r),a=t?Hi(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=sr(1);const u=sr(0),d=ct(r);if((d||!d&&!s)&&((nr(r)!=="body"||Es(i))&&(l=Ui(r)),ct(r))){const f=Dr(r);c=So(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function h_(e){return Array.from(e.getClientRects())}function gy(e){return Dr(Mn(e)).left+Ui(e).scrollLeft}function p_(e){const t=Mn(e),n=Ui(e),r=e.ownerDocument.body,o=Gt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Gt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+gy(e);const a=-n.scrollTop;return Ut(r).direction==="rtl"&&(i+=Gt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function m_(e,t){const n=Bt(e),r=Mn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=qc();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function g_(e,t){const n=Dr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ct(e)?So(e):sr(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function yy(e,t,n){let r;if(t==="viewport")r=m_(e,n);else if(t==="document")r=p_(Mn(e));else if(je(t))r=g_(t,n);else{const o=my(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return qi(r)}function vy(e,t){const n=Nn(e);return n===t||!je(n)||rr(n)?!1:Ut(n).position==="fixed"||vy(n,t)}function y_(e,t){const n=t.get(e);if(n)return n;let r=or(e,[],!1).filter(a=>je(a)&&nr(a)!=="body"),o=null;const s=Ut(e).position==="fixed";let i=s?Nn(e):e;for(;je(i)&&!rr(i);){const a=Ut(i),l=Yc(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Es(i)&&!l&&vy(e,i))?r=r.filter(u=>u!==i):o=a,i=Nn(i)}return t.set(e,r),r}function v_(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Hi(t)?[]:y_(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=yy(t,u,o);return c.top=Gt(d.top,c.top),c.right=gn(d.right,c.right),c.bottom=gn(d.bottom,c.bottom),c.left=Gt(d.left,c.left),c},yy(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function b_(e){const{width:t,height:n}=py(e);return{width:t,height:n}}function w_(e,t,n){const r=ct(t),o=Mn(t),s=n==="fixed",i=Dr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=sr(0);if(r||!r&&!s)if((nr(t)!=="body"||Es(o))&&(a=Ui(t)),r){const d=Dr(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=gy(o));const c=i.left+a.scrollLeft-l.x,u=i.top+a.scrollTop-l.y;return{x:c,y:u,width:i.width,height:i.height}}function lu(e){return Ut(e).position==="static"}function by(e,t){return!ct(e)||Ut(e).position==="fixed"?null:t?t(e):e.offsetParent}function wy(e,t){const n=Bt(e);if(Hi(e))return n;if(!ct(e)){let o=Nn(e);for(;o&&!rr(o);){if(je(o)&&!lu(o))return o;o=Nn(o)}return n}let r=by(e,t);for(;r&&CI(r)&&lu(r);)r=by(r,t);return r&&rr(r)&&lu(r)&&!Yc(r)?n:r||PI(e)||n}const x_=async function(e){const t=this.getOffsetParent||wy,n=this.getDimensions,r=await n(e.floating);return{reference:w_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function T_(e){return Ut(e).direction==="rtl"}const S_={convertOffsetParentRelativeRectToViewportRelativeRect:f_,getDocumentElement:Mn,getClippingRect:v_,getOffsetParent:wy,getElementRects:x_,getClientRects:h_,getDimensions:b_,getScale:So,isElement:je,isRTL:T_};function E_(e,t){let n=null,r;const o=Mn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=bo(u),p=bo(o.clientWidth-(c+d)),m=bo(o.clientHeight-(u+f)),y=bo(c),w={rootMargin:-h+"px "+-p+"px "+-m+"px "+-y+"px",threshold:Gt(0,gn(1,l))||1};let g=!0;function S(T){const E=T[0].intersectionRatio;if(E!==l){if(!g)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(S,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return i(!0),s}function Qi(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=au(e),u=o||s?[...c?or(c):[],...or(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=c&&a?E_(c,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(v=>{let[w]=v;w&&w.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?Dr(e):null;l&&y();function y(){const v=Dr(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,p=requestAnimationFrame(y)}return n(),()=>{var v;u.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const C_=a_,P_=l_,k_=s_,O_=c_,xy=o_,I_=(e,t,n)=>{const r=new Map,o={platform:S_,...n},s={...o.platform,_c:r};return r_(e,t,{...o,platform:s})};var Ji=typeof document<"u"?b.useLayoutEffect:b.useEffect;function ea(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ea(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!ea(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ty(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Sy(e,t){const n=Ty(e);return Math.round(t*n)/n}function Ey(e){const t=_.useRef(e);return Ji(()=>{t.current=e}),t}function __(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=_.useState(r);ea(f,r)||h(r);const[p,m]=_.useState(null),[y,v]=_.useState(null),w=_.useCallback(L=>{L!==E.current&&(E.current=L,m(L))},[]),g=_.useCallback(L=>{L!==k.current&&(k.current=L,v(L))},[]),S=s||p,T=i||y,E=_.useRef(null),k=_.useRef(null),A=_.useRef(u),D=l!=null,O=Ey(l),V=Ey(o),F=_.useCallback(()=>{if(!E.current||!k.current)return;const L={placement:t,strategy:n,middleware:f};V.current&&(L.platform=V.current),I_(E.current,k.current,L).then(H=>{const G={...H,isPositioned:!0};R.current&&!ea(A.current,G)&&(A.current=G,Gd.flushSync(()=>{d(G)}))})},[f,t,n,V]);Ji(()=>{c===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(L=>({...L,isPositioned:!1})))},[c]);const R=_.useRef(!1);Ji(()=>(R.current=!0,()=>{R.current=!1}),[]),Ji(()=>{if(S&&(E.current=S),T&&(k.current=T),S&&T){if(O.current)return O.current(S,T,F);F()}},[S,T,F,O,D]);const C=_.useMemo(()=>({reference:E,floating:k,setReference:w,setFloating:g}),[w,g]),I=_.useMemo(()=>({reference:S,floating:T}),[S,T]),M=_.useMemo(()=>{const L={position:n,left:0,top:0};if(!I.floating)return L;const H=Sy(I.floating,u.x),G=Sy(I.floating,u.y);return a?{...L,transform:"translate("+H+"px, "+G+"px)",...Ty(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:G}},[n,a,I.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:F,refs:C,elements:I,floatingStyles:M}),[u,F,C,I,M])}const A_=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?xy({element:r.current,padding:o}).fn(n):{}:r?xy({element:r,padding:o}).fn(n):{}}}},ta=(e,t)=>({...C_(e),options:[e,t]}),cu=(e,t)=>({...P_(e),options:[e,t]}),uu=(e,t)=>({...k_(e),options:[e,t]}),D_=(e,t)=>({...O_(e),options:[e,t]}),Cy=(e,t)=>({...A_(e),options:[e,t]});function Py(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 ky={..._},M_=ky.useInsertionEffect||(e=>e());function Ct(e){const t=_.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return M_(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const du="ArrowUp",ks="ArrowDown",Eo="ArrowLeft",Co="ArrowRight";function na(e,t,n){return Math.floor(e/t)!==n}function Os(e,t){return t<0||t>=e.current.length}function fu(e,t){return At(e,{disabledIndices:t})}function Oy(e,t){return At(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function At(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:s=1}=t===void 0?{}:t;const i=e.current;let a=n;do a+=r?-s:s;while(a>=0&&a<=i.length-1&&ra(i,a,o));return a}function N_(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===du){if(u&&Et(n),c===-1)d=l;else if(d=At(e,{startingIndex:d,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||d<0)){const f=c%s,h=l%s,p=l-(h-f);h===f?d=l:d=h>f?p:p-s}Os(e,d)&&(d=c)}if(n.key===ks&&(u&&Et(n),c===-1?d=a:(d=At(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(d=At(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),Os(e,d)&&(d=c)),r==="both"){const f=bo(c/s);n.key===Co&&(u&&Et(n),c%s!==s-1?(d=At(e,{startingIndex:c,disabledIndices:i}),o&&na(d,s,f)&&(d=At(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(d=At(e,{startingIndex:c-c%s-1,disabledIndices:i})),na(d,s,f)&&(d=c)),n.key===Eo&&(u&&Et(n),c%s!==0?(d=At(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&na(d,s,f)&&(d=At(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(d=At(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),na(d,s,f)&&(d=c));const h=bo(l/s)===f;Os(e,d)&&(o&&h?d=n.key===Eo?l:At(e,{startingIndex:c-c%s-1,disabledIndices:i}):d=c)}return d}function F_(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 L_(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 V_(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ra(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let Iy=0;function ar(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Iy);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():Iy=requestAnimationFrame(s)}var Ie=typeof document<"u"?b.useLayoutEffect:b.useEffect;function $_(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function R_(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 _y=_.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function j_(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,s]=_.useState(()=>new Map),i=_.useCallback(l=>{s(c=>new Map(c).set(l,null))},[]),a=_.useCallback(l=>{s(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Ie(()=>{const l=new Map(o);Array.from(l.keys()).sort($_).forEach((u,d)=>{l.set(u,d)}),R_(o,l)||s(l)},[o]),_.createElement(_y.Provider,{value:_.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function Ay(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=_.useContext(_y),[a,l]=_.useState(null),c=_.useRef(null),u=_.useCallback(d=>{if(c.current=d,a!==null&&(s.current[a]=d,i)){var f;const h=t!==void 0;i.current[a]=h?t:(f=d==null?void 0:d.textContent)!=null?f:null}},[a,s,i,t]);return Ie(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ie(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),_.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function Po(){return Po=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Po.apply(this,arguments)}let Dy=!1,B_=0;const My=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+B_++;function z_(){const[e,t]=_.useState(()=>Dy?My():void 0);return Ie(()=>{e==null&&t(My())},[]),_.useEffect(()=>{Dy=!0},[]),e}const ko=ky.useId||z_;let Is;process.env.NODE_ENV!=="production"&&(Is=new Set);function oa(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Is)!=null&&e.has(o))){var s;(s=Is)==null||s.add(o),console.warn(o)}}function W_(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Is)!=null&&e.has(o))){var s;(s=Is)==null||s.add(o),console.error(o)}}const Ny=_.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:s}},width:i=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:f,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||oa("The `ref` prop is required for `FloatingArrow`."));const y=ko(),[v,w]=_.useState(!1);if(Ie(()=>{if(!o)return;Ut(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const g=c*2,S=g/2,T=i/2*(l/-8+1),E=a/2*l/4,[k,A]=r.split("-"),D=!!f,O=k==="top"||k==="bottom",V=u&&A==="end"?"bottom":"top";let F=u&&A==="end"?"right":"left";u&&v&&(F=A==="end"?"left":"right");const R=(s==null?void 0:s.x)!=null?u||s.x:"",C=(s==null?void 0:s.y)!=null?u||s.y:"",I=f||"M0,0"+(" H"+i)+(" L"+(i-T)+","+(a-E))+(" Q"+i/2+","+a+" "+T+","+(a-E))+" Z",M={top:D?"rotate(180deg)":"",left:D?"rotate(90deg)":"rotate(-90deg)",bottom:D?"":"rotate(180deg)",right:D?"rotate(-90deg)":"rotate(90deg)"}[k];return _.createElement("svg",Po({},m,{"aria-hidden":!0,ref:n,width:D?i:i+g,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[F]:R,[V]:C,[k]:O||D?"100%":"calc(100% - "+g/2+"px)",transform:""+M+(h??""),...p}}),g>0&&_.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:d,strokeWidth:g+(f?0:1),d:I}),_.createElement("path",{stroke:g&&!f?m.fill:"none",d:I}),_.createElement("clipPath",{id:y},_.createElement("rect",{x:-S,y:S*(D?-1:1),width:i+g,height:i})))});function Fy(){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 Ly=_.createContext(null),Vy=_.createContext(null),lr=()=>{var e;return((e=_.useContext(Ly))==null?void 0:e.id)||null},cr=()=>_.useContext(Vy);function H_(e){const t=ko(),n=cr(),o=lr();return Ie(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function U_(e){const{children:t,id:n}=e,r=lr();return _.createElement(Ly.Provider,{value:_.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function G_(e){const{children:t}=e,n=_.useRef([]),r=_.useCallback(i=>{n.current=[...n.current,i]},[]),o=_.useCallback(i=>{n.current=n.current.filter(a=>a!==i)},[]),s=_.useState(()=>Fy())[0];return _.createElement(Vy.Provider,{value:_.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function ur(e){return"data-floating-ui-"+e}function Pt(e){const t=b.useRef(e);return Ie(()=>{t.current=e}),t}const $y=ur("safe-polygon");function hu(e,t,n){return n&&!Cs(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Ry(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,h=cr(),p=lr(),m=Pt(c),y=Pt(l),v=Pt(n),w=_.useRef(),g=_.useRef(-1),S=_.useRef(),T=_.useRef(-1),E=_.useRef(!0),k=_.useRef(!1),A=_.useRef(()=>{}),D=_.useCallback(()=>{var I;const M=(I=o.current.openEvent)==null?void 0:I.type;return(M==null?void 0:M.includes("mouse"))&&M!=="mousedown"},[o]);_.useEffect(()=>{if(!a)return;function I(M){let{open:L}=M;L||(clearTimeout(g.current),clearTimeout(T.current),E.current=!0)}return s.on("openchange",I),()=>{s.off("openchange",I)}},[a,s]),_.useEffect(()=>{if(!a||!m.current||!n)return;function I(L){D()&&r(!1,L,"hover")}const M=vt(i.floating).documentElement;return M.addEventListener("mouseleave",I),()=>{M.removeEventListener("mouseleave",I)}},[i.floating,n,r,a,m,D]);const O=_.useCallback(function(I,M,L){M===void 0&&(M=!0),L===void 0&&(L="hover");const H=hu(y.current,"close",w.current);H&&!S.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,I,L),H)):M&&(clearTimeout(g.current),r(!1,I,L))},[y,r]),V=Ct(()=>{A.current(),S.current=void 0}),F=Ct(()=>{if(k.current){const I=vt(i.floating).body;I.style.pointerEvents="",I.removeAttribute($y),k.current=!1}});_.useEffect(()=>{if(!a)return;function I(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function M(P){if(clearTimeout(g.current),E.current=!1,u&&!Cs(w.current)||d>0&&!hu(y.current,"open"))return;const j=hu(y.current,"open",w.current);j?g.current=window.setTimeout(()=>{v.current||r(!0,P,"hover")},j):r(!0,P,"hover")}function L(P){if(I())return;A.current();const j=vt(i.floating);if(clearTimeout(T.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),S.current=m.current({...o.current.floatingContext,tree:h,x:P.clientX,y:P.clientY,onClose(){F(),V(),O(P,!0,"safe-polygon")}});const re=S.current;j.addEventListener("mousemove",re),A.current=()=>{j.removeEventListener("mousemove",re)};return}(w.current==="touch"?!ut(i.floating,P.relatedTarget):!0)&&O(P)}function H(P){I()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:P.clientX,y:P.clientY,onClose(){F(),V(),O(P)}})(P))}if(je(i.domReference)){var G;const P=i.domReference;return n&&P.addEventListener("mouseleave",H),(G=i.floating)==null||G.addEventListener("mouseleave",H),f&&P.addEventListener("mousemove",M,{once:!0}),P.addEventListener("mouseenter",M),P.addEventListener("mouseleave",L),()=>{var j;n&&P.removeEventListener("mouseleave",H),(j=i.floating)==null||j.removeEventListener("mouseleave",H),f&&P.removeEventListener("mousemove",M),P.removeEventListener("mouseenter",M),P.removeEventListener("mouseleave",L)}}},[i,a,e,u,d,f,O,V,F,r,n,v,h,y,m,o]),Ie(()=>{var I;if(a&&n&&(I=m.current)!=null&&I.__options.blockPointerEvents&&D()){const L=vt(i.floating).body;L.setAttribute($y,""),L.style.pointerEvents="none",k.current=!0;const H=i.floating;if(je(i.domReference)&&H){var M;const G=i.domReference,P=h==null||(M=h.nodesRef.current.find(j=>j.id===p))==null||(M=M.context)==null?void 0:M.elements.floating;return P&&(P.style.pointerEvents=""),G.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{G.style.pointerEvents="",H.style.pointerEvents=""}}}},[a,n,p,i,h,m,D]),Ie(()=>{n||(w.current=void 0,V(),F())},[n,V,F]),_.useEffect(()=>()=>{V(),clearTimeout(g.current),clearTimeout(T.current),F()},[a,i.domReference,V,F]);const R=_.useMemo(()=>{function I(M){w.current=M.pointerType}return{onPointerDown:I,onPointerEnter:I,onMouseMove(M){const{nativeEvent:L}=M;function H(){!E.current&&!v.current&&r(!0,L,"hover")}u&&!Cs(w.current)||n||d===0||(clearTimeout(T.current),w.current==="touch"?H():T.current=window.setTimeout(H,d))}}},[u,r,n,v,d]),C=_.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(I){O(I.nativeEvent,!1)}}),[O]);return _.useMemo(()=>a?{reference:R,floating:C}:{},[a,R,C])}function Y_(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function Mr(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function q_(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),Mr(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let Oo=new WeakMap,sa=new WeakSet,ia={},pu=0;const K_=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,jy=e=>e&&(e.host||jy(e.parentNode)),Z_=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=jy(n);return e.contains(r)?r:null}).filter(n=>n!=null);function X_(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=Z_(t,e),a=new Set,l=new Set(i),c=[];ia[o]||(ia[o]=new WeakMap);const u=ia[o];i.forEach(d),f(t),a.clear();function d(h){!h||a.has(h)||(a.add(h),h.parentNode&&d(h.parentNode))}function f(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(nr(p)!=="script")if(a.has(p))f(p);else{const m=s?p.getAttribute(s):null,y=m!==null&&m!=="false",v=(Oo.get(p)||0)+1,w=(u.get(p)||0)+1;Oo.set(p,v),u.set(p,w),c.push(p),v===1&&y&&sa.add(p),w===1&&p.setAttribute(o,""),!y&&s&&p.setAttribute(s,"true")}})}return pu++,()=>{c.forEach(h=>{const p=(Oo.get(h)||0)-1,m=(u.get(h)||0)-1;Oo.set(h,p),u.set(h,m),p||(!sa.has(h)&&s&&h.removeAttribute(s),sa.delete(h)),m||h.removeAttribute(o)}),pu--,pu||(Oo=new WeakMap,Oo=new WeakMap,sa=new WeakSet,ia={})}}function By(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=vt(e[0]).body;return X_(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Io=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function zy(e,t){const n=Ps(e,Io());t==="prev"&&n.reverse();const r=n.indexOf(nn(vt(e)));return n.slice(r+1)[0]}function Wy(){return zy(document.body,"next")}function Hy(){return zy(document.body,"prev")}function _s(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ut(n,r)}function Q_(e){Ps(e,Io()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function J_(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function eA(e,t,n){const r=e.indexOf(t);function o(i){const a=ur("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||ut(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const mu={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let tA;function Uy(e){e.key==="Tab"&&(e.target,clearTimeout(tA))}const aa=_.forwardRef(function(t,n){const[r,o]=_.useState();Ie(()=>(Xc()&&o("button"),document.addEventListener("keydown",Uy),()=>{document.removeEventListener("keydown",Uy)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ur("focus-guard")]:"",style:mu};return _.createElement("span",Po({},t,s))}),Gy=_.createContext(null),Yy=ur("portal");function nA(e){e===void 0&&(e={});const{id:t,root:n}=e,r=ko(),o=qy(),[s,i]=_.useState(null),a=_.useRef(null);return Ie(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),Ie(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Yy,""),l.appendChild(c),a.current=c,i(c)},[t,r]),Ie(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!je(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(Yy,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function As(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=nA({id:n,root:r}),[i,a]=_.useState(null),l=_.useRef(null),c=_.useRef(null),u=_.useRef(null),d=_.useRef(null),f=!!i&&!i.modal&&i.open&&o&&!!(r||s);return _.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function h(p){s&&_s(p)&&(p.type==="focusin"?J_:Q_)(s)}return s.addEventListener("focusin",h,!0),s.addEventListener("focusout",h,!0),()=>{s.removeEventListener("focusin",h,!0),s.removeEventListener("focusout",h,!0)}},[s,o,i==null?void 0:i.modal]),_.createElement(Gy.Provider,{value:_.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s])},f&&s&&_.createElement(aa,{"data-type":"outside",ref:l,onFocus:h=>{if(_s(h,s)){var p;(p=u.current)==null||p.focus()}else{const m=Hy()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),f&&s&&_.createElement("span",{"aria-owns":s.id,style:mu}),s&&Gd.createPortal(t,s),f&&s&&_.createElement(aa,{"data-type":"outside",ref:c,onFocus:h=>{if(_s(h,s)){var p;(p=d.current)==null||p.focus()}else{const m=Wy()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,h.nativeEvent))}}}))}const qy=()=>_.useContext(Gy),Ky=20;let Nr=[];function gu(e){Nr=Nr.filter(n=>n.isConnected);let t=e;if(!(!t||nr(t)==="body")){if(!n_(t,Io())){const n=Ps(t,Io())[0];n&&(t=n)}Nr.push(t),Nr.length>Ky&&(Nr=Nr.slice(-Ky))}}function Zy(){return Nr.slice().reverse().find(e=>e.isConnected)}const rA=_.forwardRef(function(t,n){return _.createElement("button",Po({},t,{type:"button",ref:n,tabIndex:-1,style:mu}))});function la(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:f,refs:h,nodeId:p,onOpenChange:m,events:y,dataRef:v,floatingId:w,elements:{domReference:g,floating:S}}=t,T=typeof i=="number"&&i<0,E=sy(g)&&T,k=K_()?s:!0,A=Pt(o),D=Pt(i),O=Pt(a),V=cr(),F=qy(),R=_.useRef(null),C=_.useRef(null),I=_.useRef(!1),M=_.useRef(!1),L=_.useRef(-1),H=F!=null,G=S==null?void 0:S.firstElementChild,P=(G==null?void 0:G.id)===w?G:S,j=Ct(function(U){return U===void 0&&(U=P),U?Ps(U,Io()):[]}),Z=Ct(U=>{const N=j(U);return A.current.map(B=>g&&B==="reference"?g:P&&B==="floating"?P:N).filter(Boolean).flat()});_.useEffect(()=>{if(r||!c)return;function U(B){if(B.key==="Tab"){ut(P,nn(vt(P)))&&j().length===0&&!E&&Et(B);const W=Z(),$=Fn(B);A.current[0]==="reference"&&$===g&&(Et(B),B.shiftKey?ar(W[W.length-1]):ar(W[1])),A.current[1]==="floating"&&$===P&&B.shiftKey&&(Et(B),ar(W[0]))}}const N=vt(P);return N.addEventListener("keydown",U),()=>{N.removeEventListener("keydown",U)}},[r,g,P,c,A,E,j,Z]),_.useEffect(()=>{if(r||!S)return;function U(N){const B=Fn(N),$=j().indexOf(B);$!==-1&&(L.current=$)}return S.addEventListener("focusin",U),()=>{S.removeEventListener("focusin",U)}},[r,S,j]),_.useEffect(()=>{if(r||!d)return;function U(){M.current=!0,setTimeout(()=>{M.current=!1})}function N(B){const W=B.relatedTarget;queueMicrotask(()=>{const $=!(ut(g,W)||ut(S,W)||ut(W,S)||ut(F==null?void 0:F.portalNode,W)||W!=null&&W.hasAttribute(ur("focus-guard"))||V&&(Mr(V.nodesRef.current,p).find(Y=>{var oe,z;return ut((oe=Y.context)==null?void 0:oe.elements.floating,W)||ut((z=Y.context)==null?void 0:z.elements.domReference,W)})||Y_(V.nodesRef.current,p).find(Y=>{var oe,z;return((oe=Y.context)==null?void 0:oe.elements.floating)===W||((z=Y.context)==null?void 0:z.elements.domReference)===W})));if(l&&$&&nn(vt(P))===vt(P).body){ct(P)&&(P==null||P.focus());const Y=L.current,oe=j(),z=oe[Y]||oe[oe.length-1]||P;ct(z)&&z.focus()}(E||!c)&&W&&$&&!M.current&&W!==Zy()&&(I.current=!0,m(!1,B))})}if(S&&ct(g))return g.addEventListener("focusout",N),g.addEventListener("pointerdown",U),S.addEventListener("focusout",N),()=>{g.removeEventListener("focusout",N),g.removeEventListener("pointerdown",U),S.removeEventListener("focusout",N)}},[r,g,S,P,c,p,V,F,m,d,l,j,E]),_.useEffect(()=>{var U;if(r)return;const N=Array.from((F==null||(U=F.portalNode)==null?void 0:U.querySelectorAll("["+ur("portal")+"]"))||[]);if(S){const B=[S,...N,R.current,C.current,A.current.includes("reference")||E?g:null].filter($=>$!=null),W=c||E?By(B,k,!k):By(B);return()=>{W()}}},[r,g,S,c,A,F,E,k]),Ie(()=>{if(r||!ct(P))return;const U=vt(P),N=nn(U);queueMicrotask(()=>{const B=Z(P),W=D.current,$=(typeof W=="number"?B[W]:W.current)||P,Y=ut(P,N);!T&&!Y&&f&&ar($,{preventScroll:$===P})})},[r,f,P,T,Z,D]),Ie(()=>{if(r||!P)return;let U=!1;const N=vt(P),B=nn(N);let $=v.current.openEvent;const Y=h.domReference.current;gu(B);function oe(z){let{open:Ne,reason:rt,event:He,nested:ot}=z;Ne&&($=He),rt==="escape-key"&&h.domReference.current&&gu(h.domReference.current),rt==="hover"&&He.type==="mouseleave"&&(I.current=!0),rt==="outside-press"&&(ot?(I.current=!1,U=!0):I.current=!(ry(He)||Zc(He)))}return y.on("openchange",oe),()=>{y.off("openchange",oe);const z=nn(N),Ne=ut(S,z)||V&&Mr(V.nodesRef.current,p).some(de=>{var Ee;return ut((Ee=de.context)==null?void 0:Ee.elements.floating,z)});(Ne||$&&["click","mousedown"].includes($.type))&&h.domReference.current&&gu(h.domReference.current);const He=Y||B,ot=Ps(vt(He).body,Io());queueMicrotask(()=>{let de=Zy();!de&&ct(He)&&S&&(de=eA(ot,He,S)),O.current&&!I.current&&ct(de)&&(!(de!==z&&z!==N.body)||Ne)&&de.focus({preventScroll:U})})}},[r,S,P,O,v,h,y,V,p]),Ie(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:m,refs:h}),()=>{F.setFocusManagerState(null)}},[r,F,c,f,m,h,d]),Ie(()=>{if(r||!P||typeof MutationObserver!="function"||T)return;const U=()=>{const B=P.getAttribute("tabindex"),W=j(),$=nn(vt(S)),Y=W.indexOf($);Y!==-1&&(L.current=Y),A.current.includes("floating")||$!==h.domReference.current&&W.length===0?B!=="0"&&P.setAttribute("tabindex","0"):B!=="-1"&&P.setAttribute("tabindex","-1")};U();const N=new MutationObserver(U);return N.observe(P,{childList:!0,subtree:!0,attributes:!0}),()=>{N.disconnect()}},[r,S,P,h,A,j,T]);function re(U){return r||!u||!c?null:_.createElement(rA,{ref:U==="start"?R:C,onClick:N=>m(!1,N.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&k&&(c?!E:!0)&&(H||c);return _.createElement(_.Fragment,null,J&&_.createElement(aa,{"data-type":"inside",ref:F==null?void 0:F.beforeInsideRef,onFocus:U=>{if(c){const B=Z();ar(o[0]==="reference"?B[0]:B[B.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(I.current=!1,_s(U,F.portalNode)){const B=Wy()||g;B==null||B.focus()}else{var N;(N=F.beforeOutsideRef.current)==null||N.focus()}}}),!E&&re("start"),n,re("end"),J&&_.createElement(aa,{"data-type":"inside",ref:F==null?void 0:F.afterInsideRef,onFocus:U=>{if(c)ar(Z()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(I.current=!0),_s(U,F.portalNode)){const B=Hy()||g;B==null||B.focus()}else{var N;(N=F.afterOutsideRef.current)==null||N.focus()}}}))}const yu=new Set,oA=_.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=ko();return Ie(()=>{if(!r)return;yu.add(s);const i=/iP(hone|ad|od)|iOS/.test(Kc()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,f=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,y=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(y))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{yu.delete(s),yu.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[s,r]),_.createElement("div",Po({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Xy(e){return ct(e.target)&&e.target.tagName==="BUTTON"}function Qy(e){return eu(e)}function vu(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=_.useRef(),f=_.useRef(!1),h=_.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(Cs(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent,"click"):(p.preventDefault(),r(!0,p.nativeEvent,"click"))))},onClick(p){const m=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}Cs(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){d.current=void 0,!(p.defaultPrevented||!u||Xy(p))&&(p.key===" "&&!Qy(s)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Xy(p)||Qy(s)||p.key===" "&&f.current&&(f.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return _.useMemo(()=>i?{reference:h}:{},[i,h])}const sA={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},iA={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Jy=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function Ds(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:p}=t,m=cr(),y=Ct(typeof l=="function"?l:()=>!1),v=typeof l=="function"?y:l,w=_.useRef(!1),g=_.useRef(!1),{escapeKey:S,outsidePress:T}=Jy(h),{escapeKey:E,outsidePress:k}=Jy(p),A=Ct(C=>{var I;if(!n||!i||!a||C.key!=="Escape")return;const M=(I=s.current.floatingContext)==null?void 0:I.nodeId,L=m?Mr(m.nodesRef.current,M):[];if(!S&&(C.stopPropagation(),L.length>0)){let H=!0;if(L.forEach(G=>{var P;if((P=G.context)!=null&&P.open&&!G.context.dataRef.current.__escapeKeyBubbles){H=!1;return}}),!H)return}r(!1,OI(C)?C.nativeEvent:C,"escape-key")}),D=Ct(C=>{var I;const M=()=>{var L;A(C),(L=Fn(C))==null||L.removeEventListener("keydown",M)};(I=Fn(C))==null||I.addEventListener("keydown",M)}),O=Ct(C=>{var I;const M=w.current;w.current=!1;const L=g.current;if(g.current=!1,c==="click"&&L||M||typeof v=="function"&&!v(C))return;const H=Fn(C),G="["+ur("inert")+"]",P=vt(o.floating).querySelectorAll(G);let j=je(H)?H:null;for(;j&&!rr(j);){const U=Nn(j);if(rr(U)||!je(U))break;j=U}if(P.length&&je(H)&&!II(H)&&!ut(H,o.floating)&&Array.from(P).every(U=>!ut(j,U)))return;if(ct(H)&&R){const U=H.clientWidth>0&&H.scrollWidth>H.clientWidth,N=H.clientHeight>0&&H.scrollHeight>H.clientHeight;let B=N&&C.offsetX>H.clientWidth;if(N&&Ut(H).direction==="rtl"&&(B=C.offsetX<=H.offsetWidth-H.clientWidth),B||U&&C.offsetY>H.clientHeight)return}const Z=(I=s.current.floatingContext)==null?void 0:I.nodeId,re=m&&Mr(m.nodesRef.current,Z).some(U=>{var N;return Jc(C,(N=U.context)==null?void 0:N.elements.floating)});if(Jc(C,o.floating)||Jc(C,o.domReference)||re)return;const J=m?Mr(m.nodesRef.current,Z):[];if(J.length>0){let U=!0;if(J.forEach(N=>{var B;if((B=N.context)!=null&&B.open&&!N.context.dataRef.current.__outsidePressBubbles){U=!1;return}}),!U)return}r(!1,C,"outside-press")}),V=Ct(C=>{var I;const M=()=>{var L;O(C),(L=Fn(C))==null||L.removeEventListener(c,M)};(I=Fn(C))==null||I.addEventListener(c,M)});_.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=S,s.current.__outsidePressBubbles=T;function C(L){r(!1,L,"ancestor-scroll")}const I=vt(o.floating);a&&I.addEventListener("keydown",E?D:A,E),v&&I.addEventListener(c,k?V:O,k);let M=[];return f&&(je(o.domReference)&&(M=or(o.domReference)),je(o.floating)&&(M=M.concat(or(o.floating))),!je(o.reference)&&o.reference&&o.reference.contextElement&&(M=M.concat(or(o.reference.contextElement)))),M=M.filter(L=>{var H;return L!==((H=I.defaultView)==null?void 0:H.visualViewport)}),M.forEach(L=>{L.addEventListener("scroll",C,{passive:!0})}),()=>{a&&I.removeEventListener("keydown",E?D:A,E),v&&I.removeEventListener(c,k?V:O,k),M.forEach(L=>{L.removeEventListener("scroll",C)})}},[s,o,a,v,c,n,r,f,i,S,T,A,E,D,O,k,V]),_.useEffect(()=>{w.current=!1},[v,c]);const F=_.useMemo(()=>({onKeyDown:A,[sA[d]]:C=>{u&&r(!1,C.nativeEvent,"reference-press")}}),[A,r,u,d]),R=_.useMemo(()=>({onKeyDown:A,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[iA[c]]:()=>{w.current=!0}}),[A,c]);return _.useMemo(()=>i?{reference:F,floating:R}:{},[i,F,R])}function aA(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=ko(),s=_.useRef({}),[i]=_.useState(()=>Fy()),a=lr()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!je(h)&&W_("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=_.useState(r.reference),u=Ct((h,p,m)=>{s.current.openEvent=h?p:void 0,i.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),d=_.useMemo(()=>({setPositionReference:c}),[]),f=_.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return _.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[t,u,f,i,o,d])}function Ms(e){e===void 0&&(e={});const{nodeId:t}=e,n=aA({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=_.useState(null),[a,l]=_.useState(null),u=(o==null?void 0:o.reference)||s,d=_.useRef(null),f=cr();Ie(()=>{u&&(d.current=u)},[u]);const h=__({...e,elements:{...o,...a&&{reference:a}}}),p=_.useCallback(g=>{const S=je(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(S),h.refs.setReference(S)},[h.refs]),m=_.useCallback(g=>{(je(g)||g===null)&&(d.current=g,i(g)),(je(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!je(g))&&h.refs.setReference(g)},[h.refs]),y=_.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),v=_.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),w=_.useMemo(()=>({...h,...r,refs:y,elements:v,nodeId:t}),[h,y,v,t,r]);return Ie(()=>{r.dataRef.current.floatingContext=w;const g=f==null?void 0:f.nodesRef.current.find(S=>S.id===t);g&&(g.context=w)}),_.useMemo(()=>({...h,context:w,refs:y,elements:v}),[h,y,v,w])}function lA(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=_.useRef(!1),u=_.useRef(),d=_.useRef(!0);_.useEffect(()=>{if(!a)return;const h=Bt(i.domReference);function p(){!n&&ct(i.domReference)&&i.domReference===nn(vt(i.domReference))&&(c.current=!0)}function m(){d.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),_.useEffect(()=>{if(!a)return;function h(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,a]),_.useEffect(()=>()=>{clearTimeout(u.current)},[]);const f=_.useMemo(()=>({onPointerDown(h){Zc(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=Fn(h.nativeEvent);if(l&&je(p))try{if(Xc()&&oy())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!eu(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,y=je(p)&&p.hasAttribute(ur("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const w=nn(i.domReference?i.domReference.ownerDocument:document);!p&&w===i.domReference||ut((v=s.current.floatingContext)==null?void 0:v.refs.floating.current,w)||ut(i.domReference,w)||y||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return _.useMemo(()=>a?{reference:f}:{},[a,f])}const ev="active",tv="selected";function bu(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[ev]:i,[tv]: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&&[ev,tv].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),i[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(y=>y(...p)).find(y=>y!==void 0)}}}else i[c]=u}),i),{})}}function Ns(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=_.useCallback(a=>bu(a,e,"reference"),t),s=_.useCallback(a=>bu(a,e,"floating"),n),i=_.useCallback(a=>bu(a,e,"item"),r);return _.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let nv=!1;function ca(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function rv(e,t){return ca(t,e===du||e===ks,e===Eo||e===Co)}function wu(e,t,n){return ca(t,e===ks,n?e===Eo:e===Co)||e==="Enter"||e===" "||e===""}function cA(e,t,n){return ca(t,n?e===Eo:e===Co,e===ks)}function ov(e,t,n){return ca(t,n?e===Co:e===Eo,e===du)}function sv(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:v=!0,disabledIndices:w=void 0,orientation:g="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:E,itemSizes:k,dense:A=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||oa("`useListNavigation` looping must be enabled to allow escaping."),p||oa("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&S>1&&oa("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const D=lr(),O=cr(),V=Ct(a),F=_.useRef(m),R=_.useRef(c??-1),C=_.useRef(null),I=_.useRef(!0),M=_.useRef(V),L=_.useRef(!!o.floating),H=_.useRef(n),G=_.useRef(!1),P=_.useRef(!1),j=Pt(w),Z=Pt(n),re=Pt(T),J=Pt(o.floating),U=Pt(c),[N,B]=_.useState(),[W,$]=_.useState(),Y=Ct(function(de,Ee,ce){ce===void 0&&(ce=!1);function ke(Oe){p?(B(Oe.id),O==null||O.events.emit("virtualfocus",Oe),E&&(E.current=Oe)):ar(Oe,{preventScroll:!0,sync:oy()&&Xc()?nv||G.current:!1})}const ft=de.current[Ee.current];ft&&ke(ft),requestAnimationFrame(()=>{const Oe=de.current[Ee.current]||ft;if(!Oe)return;ft||ke(Oe);const ht=re.current;ht&&z&&(ce||!I.current)&&(Oe.scrollIntoView==null||Oe.scrollIntoView(typeof ht=="boolean"?{block:"nearest",inline:"nearest"}:ht))})});Ie(()=>{document.createElement("div").focus({get preventScroll(){return nv=!0,!1}})},[]),Ie(()=>{l&&(n&&o.floating?F.current&&c!=null&&(P.current=!0,R.current=c,V(c)):L.current&&(R.current=-1,M.current(null)))},[l,n,o.floating,c,V]),Ie(()=>{if(l&&n&&o.floating)if(i==null){if(G.current=!1,U.current!=null)return;if(L.current&&(R.current=-1,Y(s,R)),(!H.current||!L.current)&&F.current&&(C.current!=null||F.current===!0&&C.current==null)){let de=0;const Ee=()=>{s.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(Ee),de++):(R.current=C.current==null||wu(C.current,g,h)||f?fu(s,j.current):Oy(s,j.current),C.current=null,V(R.current))};Ee()}}else Os(s,i)||(R.current=i,Y(s,R,P.current),P.current=!1)},[l,n,o.floating,i,U,f,s,g,h,V,Y,j]),Ie(()=>{var de;if(!l||o.floating||!O||p||!L.current)return;const Ee=O.nodesRef.current,ce=(de=Ee.find(Oe=>Oe.id===D))==null||(de=de.context)==null?void 0:de.elements.floating,ke=nn(vt(o.floating)),ft=Ee.some(Oe=>Oe.context&&ut(Oe.context.elements.floating,ke));ce&&!ft&&I.current&&ce.focus({preventScroll:!0})},[l,o.floating,O,D,p]),Ie(()=>{if(!l||!O||!p||D)return;function de(Ee){$(Ee.id),E&&(E.current=Ee)}return O.events.on("virtualfocus",de),()=>{O.events.off("virtualfocus",de)}},[l,O,p,D,E]),Ie(()=>{M.current=V,L.current=!!o.floating}),Ie(()=>{n||(C.current=null)},[n]),Ie(()=>{H.current=n},[n]);const oe=i!=null,z=_.useMemo(()=>{function de(ce){if(!n)return;const ke=s.current.indexOf(ce);ke!==-1&&V(ke)}return{onFocus(ce){let{currentTarget:ke}=ce;de(ke)},onClick:ce=>{let{currentTarget:ke}=ce;return ke.focus({preventScroll:!0})},...y&&{onMouseMove(ce){let{currentTarget:ke}=ce;de(ke)},onPointerLeave(ce){let{pointerType:ke}=ce;!I.current||ke==="touch"||(R.current=-1,Y(s,R),V(null),p||ar(J.current,{preventScroll:!0}))}}}},[n,J,Y,y,s,V,p]),Ne=Ct(de=>{if(I.current=!1,G.current=!0,!Z.current&&de.currentTarget===J.current)return;if(f&&ov(de.key,g,h)){Et(de),r(!1,de.nativeEvent,"list-navigation"),ct(o.domReference)&&!p&&o.domReference.focus();return}const Ee=R.current,ce=fu(s,w),ke=Oy(s,w);if(de.key==="Home"&&(Et(de),R.current=ce,V(R.current)),de.key==="End"&&(Et(de),R.current=ke,V(R.current)),S>1){const ft=k||Array.from({length:s.current.length},()=>({width:1,height:1})),Oe=F_(ft,S,A),ht=Oe.findIndex(ae=>ae!=null&&!ra(s.current,ae,w)),Q=Oe.reduce((ae,_e,Ke)=>_e!=null&&!ra(s.current,_e,w)?Ke:ae,-1);if(R.current=Oe[N_({current:Oe.map(ae=>ae!=null?s.current[ae]:null)},{event:de,orientation:g,loop:d,cols:S,disabledIndices:V_([...w||s.current.map((ae,_e)=>ra(s.current,_e)?_e:void 0),void 0],Oe),minIndex:ht,maxIndex:Q,prevIndex:L_(R.current>ke?ce:R.current,ft,Oe,S,de.key===ks?"bl":de.key===Co?"tr":"tl"),stopEvent:!0})],V(R.current),g==="both")return}if(rv(de.key,g)){if(Et(de),n&&!p&&nn(de.currentTarget.ownerDocument)===de.currentTarget){R.current=wu(de.key,g,h)?ce:ke,V(R.current);return}wu(de.key,g,h)?d?R.current=Ee>=ke?u&&Ee!==s.current.length?-1:ce:At(s,{startingIndex:Ee,disabledIndices:w}):R.current=Math.min(ke,At(s,{startingIndex:Ee,disabledIndices:w})):d?R.current=Ee<=ce?u&&Ee!==-1?s.current.length:ke:At(s,{startingIndex:Ee,decrement:!0,disabledIndices:w}):R.current=Math.max(ce,At(s,{startingIndex:Ee,decrement:!0,disabledIndices:w})),Os(s,R.current)?V(null):V(R.current)}}),rt=_.useMemo(()=>p&&n&&oe&&{"aria-activedescendant":W||N},[p,n,oe,W,N]),He=_.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!sy(o.domReference)&&rt,onKeyDown:Ne,onPointerMove(){I.current=!0}}),[rt,Ne,o.domReference,g]),ot=_.useMemo(()=>{function de(ce){m==="auto"&&ry(ce.nativeEvent)&&(F.current=!0)}function Ee(ce){F.current=m,m==="auto"&&Zc(ce.nativeEvent)&&(F.current=!0)}return{...rt,onKeyDown(ce){I.current=!1;const ke=ce.key.indexOf("Arrow")===0,ft=cA(ce.key,g,h),Oe=ov(ce.key,g,h),ht=rv(ce.key,g),Q=(f?ft:ht)||ce.key==="Enter"||ce.key.trim()==="";if(p&&n){const kt=O==null?void 0:O.nodesRef.current.find(Vt=>Vt.parentId==null),Nt=O&&kt?q_(O.nodesRef.current,kt.id):null;if(ke&&Nt&&E){const Vt=new KeyboardEvent("keydown",{key:ce.key,bubbles:!0});if(ft||Oe){var ae,_e;const Hr=((ae=Nt.context)==null?void 0:ae.elements.domReference)===ce.currentTarget,Yo=Oe&&!Hr?(_e=Nt.context)==null?void 0:_e.elements.domReference:ft?s.current.find(qo=>(qo==null?void 0:qo.id)===N):null;Yo&&(Et(ce),Yo.dispatchEvent(Vt),$(void 0))}if(ht&&Nt.context&&Nt.context.open&&Nt.parentId&&ce.currentTarget!==Nt.context.elements.domReference){var Ke;Et(ce),(Ke=Nt.context.elements.domReference)==null||Ke.dispatchEvent(Vt);return}}return Ne(ce)}if(!(!n&&!v&&ke)){if(Q&&(C.current=f&&ht?null:ce.key),f){ft&&(Et(ce),n?(R.current=fu(s,j.current),V(R.current)):r(!0,ce.nativeEvent,"list-navigation"));return}ht&&(c!=null&&(R.current=c),Et(ce),!n&&v?r(!0,ce.nativeEvent,"list-navigation"):Ne(ce),n&&V(R.current))}},onFocus(){n&&!p&&V(null)},onPointerDown:Ee,onMouseDown:de,onClick:de}},[N,rt,Ne,j,m,s,f,V,r,n,v,g,h,c,O,p,E]);return _.useMemo(()=>l?{reference:ot,floating:He,item:z}:{},[l,ot,He,z])}const uA=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Fs(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=uA.get(i))!=null?n:i,l=ko(),u=lr()!=null,d=_.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,i]),f=_.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),h=_.useCallback(p=>{let{active:m,selected:y}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...v,"aria-selected":m&&y};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,i]);return _.useMemo(()=>s?{reference:d,floating:f,item:h}:{},[s,d,f,h])}const iv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function _o(e,t){return typeof e=="function"?e(t):e}function dA(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 fA(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=(typeof o=="number"?o:o.close)||0,[a,l]=_.useState("unmounted"),c=dA(n,i);return!c&&a==="close"&&l("unmounted"),Ie(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function hA(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:s,duration:i=250}=t,a=e.placement,l=a.split("-")[0],c=_.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",d=(u?i:i.open)||0,f=(u?i:i.close)||0,[h,p]=_.useState(()=>({..._o(s,c),..._o(n,c)})),{isMounted:m,status:y}=fA(e,{duration:i}),v=Pt(n),w=Pt(r),g=Pt(o),S=Pt(s);return Ie(()=>{const T=_o(v.current,c),E=_o(g.current,c),k=_o(S.current,c),A=_o(w.current,c)||Object.keys(T).reduce((D,O)=>(D[O]="",D),{});if(y==="initial"&&p(D=>({transitionProperty:D.transitionProperty,...k,...T})),y==="open"&&p({transitionProperty:Object.keys(A).map(iv).join(","),transitionDuration:d+"ms",...k,...A}),y==="close"){const D=E||T;p({transitionProperty:Object.keys(D).map(iv).join(","),transitionDuration:f+"ms",...k,...D})}},[f,g,v,w,S,d,y,c]),{isMounted:m,styles:h}}function pA(e,t){var n;const{open:r,dataRef:o}=e,{listRef:s,activeIndex:i,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:h=null}=t,p=_.useRef(),m=_.useRef(""),y=_.useRef((n=h??i)!=null?n:-1),v=_.useRef(null),w=Ct(a),g=Ct(l),S=Pt(u),T=Pt(f);Ie(()=>{r&&(clearTimeout(p.current),v.current=null,m.current="")},[r]),Ie(()=>{if(r&&m.current===""){var O;y.current=(O=h??i)!=null?O:-1}},[r,h,i]);const E=Ct(O=>{O?o.current.typing||(o.current.typing=O,g(O)):o.current.typing&&(o.current.typing=O,g(O))}),k=Ct(O=>{function V(M,L,H){const G=S.current?S.current(L,H):L.find(P=>(P==null?void 0:P.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return G?M.indexOf(G):-1}const F=s.current;if(m.current.length>0&&m.current[0]!==" "&&(V(F,F,m.current)===-1?E(!1):O.key===" "&&Et(O)),F==null||T.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(Et(O),E(!0)),F.every(M=>{var L,H;return M?((L=M[0])==null?void 0:L.toLocaleLowerCase())!==((H=M[1])==null?void 0:H.toLocaleLowerCase()):!0})&&m.current===O.key&&(m.current="",y.current=v.current),m.current+=O.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",y.current=v.current,E(!1)},d);const C=y.current,I=V(F,[...F.slice((C||0)+1),...F.slice(0,(C||0)+1)],m.current);I!==-1?(w(I),v.current=I):O.key!==" "&&(m.current="",E(!1))}),A=_.useMemo(()=>({onKeyDown:k}),[k]),D=_.useMemo(()=>({onKeyDown:k,onKeyUp(O){O.key===" "&&E(!1)}}),[k,E]);return _.useMemo(()=>c?{reference:A,floating:D}:{},[c,A,D])}function av(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 mA(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function gA(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,s=!1,i=null,a=null,l=performance.now();function c(d,f){const h=performance.now(),p=h-l;if(i===null||a===null||p===0)return i=d,a=f,l=h,null;const m=d-i,y=f-a,w=Math.sqrt(m*m+y*y)/p;return i=d,a=f,l=h,w}const u=d=>{let{x:f,y:h,placement:p,elements:m,onClose:y,nodeId:v,tree:w}=d;return function(S){function T(){clearTimeout(o),y()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||f==null||h==null)return;const{clientX:E,clientY:k}=S,A=[E,k],D=Fn(S),O=S.type==="mouseleave",V=ut(m.floating,D),F=ut(m.domReference,D),R=m.domReference.getBoundingClientRect(),C=m.floating.getBoundingClientRect(),I=p.split("-")[0],M=f>C.right-C.width/2,L=h>C.bottom-C.height/2,H=mA(A,R),G=C.width>R.width,P=C.height>R.height,j=(G?R:C).left,Z=(G?R:C).right,re=(P?R:C).top,J=(P?R:C).bottom;if(V&&(s=!0,!O))return;if(F&&(s=!1),F&&!O){s=!0;return}if(O&&je(S.relatedTarget)&&ut(m.floating,S.relatedTarget)||w&&Mr(w.nodesRef.current,v).some(B=>{let{context:W}=B;return W==null?void 0:W.open}))return;if(I==="top"&&h>=R.bottom-1||I==="bottom"&&h<=R.top+1||I==="left"&&f>=R.right-1||I==="right"&&f<=R.left+1)return T();let U=[];switch(I){case"top":U=[[j,R.top+1],[j,C.bottom-1],[Z,C.bottom-1],[Z,R.top+1]];break;case"bottom":U=[[j,C.top+1],[j,R.bottom-1],[Z,R.bottom-1],[Z,C.top+1]];break;case"left":U=[[C.right-1,J],[C.right-1,re],[R.left+1,re],[R.left+1,J]];break;case"right":U=[[R.right-1,J],[R.right-1,re],[C.left+1,re],[C.left+1,J]];break}function N(B){let[W,$]=B;switch(I){case"top":{const Y=[G?W+t/2:M?W+t*4:W-t*4,$+t+1],oe=[G?W-t/2:M?W+t*4:W-t*4,$+t+1],z=[[C.left,M||G?C.bottom-t:C.top],[C.right,M?G?C.bottom-t:C.top:C.bottom-t]];return[Y,oe,...z]}case"bottom":{const Y=[G?W+t/2:M?W+t*4:W-t*4,$-t],oe=[G?W-t/2:M?W+t*4:W-t*4,$-t],z=[[C.left,M||G?C.top+t:C.bottom],[C.right,M?G?C.top+t:C.bottom:C.top+t]];return[Y,oe,...z]}case"left":{const Y=[W+t+1,P?$+t/2:L?$+t*4:$-t*4],oe=[W+t+1,P?$-t/2:L?$+t*4:$-t*4];return[...[[L||P?C.right-t:C.left,C.top],[L?P?C.right-t:C.left:C.right-t,C.bottom]],Y,oe]}case"right":{const Y=[W-t,P?$+t/2:L?$+t*4:$-t*4],oe=[W-t,P?$-t/2:L?$+t*4:$-t*4],z=[[L||P?C.left+t:C.right,C.top],[L?P?C.left+t:C.right:C.left+t,C.bottom]];return[Y,oe,...z]}}}if(!av([E,k],U)){if(s&&!H)return T();if(!O&&r){const B=c(S.clientX,S.clientY);if(B!==null&&B<.1)return T()}av([E,k],N([f,h]))?!s&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const lv=({children:e,as:t,title:n,...r})=>{const[o,s]=b.useState(!1),i=b.useRef(null),a=t||"span",{refs:l,floatingStyles:c,context:u}=Ms({open:o,onOpenChange:s,whileElementsMounted:Qi,transform:!0,middleware:[ta(5),uu({fallbackAxisSideDirection:"start"}),cu(),Cy({element:i,padding:5})]}),d=Ry(u,{move:!0}),f=lA(u),h=Ds(u),p=Fs(u,{role:"tooltip"}),{getReferenceProps:m,getFloatingProps:y}=Ns([d,f,h,p]);return x.jsxs(b.Fragment,{children:[x.jsx(a,{ref:l.setReference,...m(r),children:n}),x.jsx(As,{children:o&&x.jsxs(eo,{...y(),ref:l.setFloating,style:c,className:"bg-tooltip-background z-tooltip text-tooltip-foreground border border-tooltip-border p-3 rounded-lg",children:[x.jsx(Ny,{ref:i,context:u,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})},cv=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>x.jsxs("div",{className:pt("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:x.jsxs("span",{className:"flex items-center gap-1 group-hover:text-primary group-focus-within:text-primary transition-colors group-error:text-danger",children:[s,e||r?x.jsxs("span",{className:"flex gap-1 items-center justify-center",children:[r?x.jsx(lv,{title:x.jsxs("span",{children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(j1,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:r}):null,e?x.jsxs(b.Fragment,{children:[x.jsx(eh,{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(V1,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),o]}),ua=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:s,right:i,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:h,title:p,placeholder:m,hideLeft:y,required:v})=>{const w=d??h,g=tn(),S=e??g.inputOptionalLabel;return x.jsxs("fieldset",{form:u,"data-error":!!c,"data-interactive":!!s,className:pt("group inline-flex gap-1.5 w-full",r),children:[x.jsxs("label",{form:u,htmlFor:w,className:"inline-flex w-full cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-error:text-danger group-hover:border-primary",children:[!y&&!n?x.jsx(cv,{info:a,hideLeft:y,reportStatus:!0,title:p,placeholder:m,children:S||n?x.jsxs(b.Fragment,{children:[v?null:x.jsx("span",{className:"text-opacity-70",children:S}),n?x.jsx(b.Fragment,{children:n}):null]}):null}):null,x.jsxs("div",{className:`relative group flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-focus-within:border-primary group-hover:border-primary group-error:border-danger ${f}`,children:[t?x.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,i?x.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:i}):null]})]}),x.jsx("p",{className:"group-error:block empty:hidden group-error:text-danger hidden text-xs group-has-[input:not(:focus):invalid[data-initialized=true]]:block",children:c}),x.jsx("p",{className:"text-xs group-assert:block group-error:hidden empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block",children:o})]})},dr=b.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:s,interactive:i,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:d,left:f,error:h,...p},m)=>{const y=tn(),v=b.useRef(null),w=p.id??p.name;return b.useEffect(()=>{if(v.current===null)return;const g=v.current,S=()=>g.setAttribute("data-initialized","true"),T=()=>g.setAttribute("data-selected","true");return g.addEventListener("focus",S),g.addEventListener("change",T),()=>{g.removeEventListener("focus",S),g.removeEventListener("change",T)}},[]),x.jsx(ua,{container:pt("group inline-block w-full",c),error:h,feedback:o,hideLeft:u,left:f,info:n,optionalText:l,rightLabel:a,interactive:i,form:p.form,id:p.name||p.id,name:p.name,labelClassName:s,title:p.title,placeholder:p.placeholder,required:e,right:x.jsx("label",{htmlFor:w,children:x.jsxs("button",{type:"button",className:"hover:text-primary transition-colors",children:[x.jsx(Jf,{size:20}),x.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})}),children:x.jsxs("select",{...p,ref:Cl(m,v),id:w,name:w,value:p.value,required:e,"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:pt("input bg-transparent text-foreground select group h-11 w-full flex-1 rounded-md p-2 placeholder-input-placeholder outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",p.className),children:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(g=>x.jsx("option",{...g,children:g.label??g.value},`${w}-select-option-${g.value}`))]})})}),uv=b.createContext(""),yA=e=>{const[t,n]=Qg(e.active),r=ho(0),o=ho(0),s=b.useRef(null),i=e.useHash?"a":"button";b.useEffect(()=>{const c=s.current;if(c===null)return;const u=p=>{if(!p)return;const m=p.getBoundingClientRect();o.set(m.width),r.set(p.offsetLeft)},d=()=>{const p=c.querySelector("li[data-active=true]");return void u(p)};window.addEventListener("resize",d);let f=c.querySelector("li[data-active=true]");const h=window.location.hash.replace(/^#/,"");if(e.active===""&&h!==""&&(f=c.querySelector(`li[data-id=${h}]`),n(h)),f===null){f=c.querySelector("li[data-id]");const p=f.getAttribute("data-id")||"";n(p)}return u(f),()=>window.removeEventListener("resize",d)},[]),b.useEffect(()=>{e.onChange&&e.onChange(t)},[e.onChange,t]);const a=b.Children.toArray(e.children),l=c=>{const u=c.currentTarget,d=u.getBoundingClientRect();o.set(d.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return x.jsx(uv.Provider,{value:t,children:x.jsx(Xg,{className:e.className,container:"pt-0",header:x.jsxs("header",{ref:s,className:"border-b border-card-border relative mb-2",children:[x.jsx(Ht.div,{layout:!0,initial:!1,"aria-hidden":"true",style:{left:r,width:o},transition:{type:"tween",left:r,width:o},className:"w-28 h-0.5 bg-primary absolute bottom-0 duration-300 transition-all hidden lg:block"}),x.jsxs("nav",{children:[x.jsx(dr,{onChange:c=>n(c.target.value),value:t,hideLeft:!0,container:"container rounded mt-4 lg:mt-0 min-w-full lg:hidden inline-flex px-6 w-full mx-auto",labelClassName:"border-transparent rounded-none",rightLabel:null,options:a.map(c=>{const u=c.props;return{value:u.id,label:u.label??u.title}})}),x.jsx("ul",{className:"hidden lg:flex divide-x divide-card-border overflow-x-auto justify-between md:justify-start",children:a.map(c=>{const u=c.props;return x.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"data-[active=true]:text-primary w-full md:w-auto",children:x.jsx(i,{"data-id":u.id,onClick:l,"aria-current":"page",className:"px-10 py-4 block font-medium w-full whitespace-nowrap",href:e.useHash?`#${u.id}`:void 0,children:u.title})},`tab-header-${u.id}`)})})]})]}),children:e.children})})},vA=()=>b.useContext(uv),bA=e=>{const t=vA();return x.jsx(b.Fragment,{children:e.id===t?e.children:null})},Ao=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),s=b.useMemo(()=>[ta(10),uu({fallbackAxisSideDirection:"end"}),cu(),Cy({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=Ms({open:n,middleware:s,transform:!0,whileElementsMounted:Qi,onOpenChange:(p,m)=>{var v;const y=m==null?void 0:m.relatedTarget;y&&y.dataset.floating==="true"&&!p||(r(p),(v=e.onChange)==null||v.call(e,p))}}),c=vu(l),u=Ds(l),d=Fs(l),{getReferenceProps:f,getFloatingProps:h}=Ns([c,u,d]);return x.jsxs(b.Fragment,{children:[x.jsx("button",{ref:i.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(As,{id:`${t}-portal`,children:x.jsx(la,{restoreFocus:e.restoreFocus??!0,returnFocus:e.restoreFocus??!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:x.jsxs("div",{className:"bg-floating-background relative min-w-96 isolate z-floating border shadow-2xl p-6 border-floating-border rounded-lg",ref:i.setFloating,style:a,"aria-labelledby":t,...h(),children:[x.jsx(Ny,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),x.jsx("header",{className:"mb-2",children:x.jsx("h3",{className:"leading-snug font-medium text-2xl tracking-wide text-left",children:e.title})}),e.children]})})})]})};function wA(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function xA(...e){return t=>e.forEach(n=>wA(n,t))}var dv=_.forwardRef((e,t)=>{const{children:n,...r}=e,o=_.Children.toArray(n),s=o.find(SA);if(s){const i=s.props.children,a=o.map(l=>l===s?_.Children.count(i)>1?_.Children.only(null):_.isValidElement(i)?i.props.children:null:l);return x.jsx(xu,{...r,ref:t,children:_.isValidElement(i)?_.cloneElement(i,void 0,a):null})}return x.jsx(xu,{...r,ref:t,children:n})});dv.displayName="Slot";var xu=_.forwardRef((e,t)=>{const{children:n,...r}=e;if(_.isValidElement(n)){const o=CA(n);return _.cloneElement(n,{...EA(r,n.props),ref:t?xA(t,o):o})}return _.Children.count(n)>1?_.Children.only(null):null});xu.displayName="SlotClone";var TA=({children:e})=>x.jsx(x.Fragment,{children:e});function SA(e){return _.isValidElement(e)&&e.type===TA}function EA(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 CA(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const da=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),fv=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),hv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},pv=(e,t)=>{const n=fv(t,hv.basic,e)||fv(t,hv.extend,e);return n===void 0||n===e?void 0:n},fa=()=>typeof window>"u",Tu=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),PA=(e,t)=>fa()?t:window.matchMedia(e).matches,kA=(e,t=!0)=>{const[n,r]=b.useState(t);return b.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(PA(e,t));return s(),o.addListener?(o.addListener(s),()=>o.removeListener?o.removeListener(s):void 0):(o.addEventListener("change",s),()=>o.removeEventListener("change",s))},[e]),n},Ln="600ms",mv=e=>({initial:{[e]:"-60%",opacity:.8,animationDuration:Ln},enter:{[e]:0,opacity:1,animationDuration:Ln},exit:{[e]:["-50%","-90%"],opacity:0,animationDuration:Ln}}),OA=mv("left"),IA=mv("right"),gv={drawer:e=>e==="left"?OA:IA,sheet:{initial:{opacity:.5,scaleY:.5,animationDuration:Ln,originY:"bottom"},enter:{opacity:1,scaleY:1,animationDuration:Ln,originY:"bottom"},exit:{opacity:.1,scaleY:.5,animationDuration:Ln,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:Ln},enter:{opacity:1,scale:[1.05,1],animationDuration:Ln},exit:{opacity:0,scale:.97,animationDuration:Ln}}},_A=si("isolate ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] w-auto h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] container h-[inherit] rounded-lg py-8",sheet:"w-full absolute bottom-0 max-h-[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"}}),AA={top:0,left:0,right:0,bottom:-1},DA=e=>e*.62,MA=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.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=DA(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return x.jsx(Ht.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:AA,whileDrag:{cursor:"grabbing"},className:pt("absolute rounded-lg",e.sheet?"cursor-row-resize":"bg-floating-border cursor-col-resize",e.sheet?"w-full py-2 top-1 h-3 flex justify-center":e.position==="left"?"top-1/2 right-5 h-10 w-2":"top-1/2 left-2 h-10 w-2"),children:e.sheet?x.jsx("div",{className:"bg-floating-border rounded-lg w-1/4 h-2"}):null})},yv={drawer:"right",sheet:"none",dialog:"none"},NA=({type:e="dialog",resizer:t=!0,...n})=>{const r=b.useId(),o=b.useId(),s=kA("(min-width: 48rem)"),i=e==="drawer"||!s,a=s?e==="drawer"?n.position:yv[e]:yv.sheet,l=s?gv[e]:gv.sheet,c=typeof l=="function"?l(a):l,u=s?e:"sheet",{refs:d,context:f}=Ms({open:n.open,onOpenChange:n.onChange}),h=vu(f),p=Fs(f),m=Ds(f,{escapeKey:!0,referencePress:!0,outsidePress:!1}),{getReferenceProps:y,getFloatingProps:v}=Ns([h,p,m]),w=n.trigger,g=ho(void 0);return x.jsxs(b.Fragment,{children:[n.trigger?x.jsx(b.Fragment,{children:n.asChild?x.jsx(dv,{ref:d.setReference,...y(),children:w}):x.jsx("button",{ref:d.setReference,...y(),type:"button",children:w})}):null,x.jsx(As,{children:x.jsx(Vi,{presenceAffectsLayout:!0,children:n.open&&x.jsx(oA,{lockScroll:!0,className:`relative !overflow-clip h-[100dvh] z-floating bg-floating-overlay/70 ${u==="drawer"?"":"grid justify-center p-8"}`,children:x.jsx(la,{modal:!0,closeOnFocusOut:!0,context:f,children:x.jsxs(Ht.div,{animate:"enter","aria-describedby":o,"aria-labelledby":r,className:_A({position:a,type:u}),exit:"exit",initial:"initial",ref:d.setFloating,variants:c,style:s?{width:g}:{height:g},...v(),children:[i&&t?x.jsx(MA,{onChange:n.onChange,sheet:!s,value:g,parent:d.floating,position:a}):null,n.title||n.closable?x.jsxs("header",{className:"w-full relative",children:[n.title?x.jsx("h2",{className:"px-8 pb-4 border-b border-floating-border text-3xl font-medium leading-relaxed",children:n.title}):null,n.closable!==!1?x.jsx("nav",{className:"absolute -top-2.5 lg:-top-1 right-4 lg:right-8",children:x.jsx("button",{type:"button",onClick:()=>n.onChange(!1),className:"p-1 transition-colors opacity-70 hover:opacity-100 hover:text-danger focus:text-danger",children:x.jsx(th,{})})}):null]}):null,x.jsx("section",{className:"flex-1 px-8 overflow-y-auto",children:n.children}),n.footer?x.jsx("footer",{className:"px-8 border-t border-floating-border pt-4 w-full",children:n.footer}):null]})})})})})]})};class ha{static getDescendantProperty(t,n,r=[]){let o,s,i,a,l,c;if(n){if(i=n.indexOf("."),i===-1?o=n:(o=n.slice(0,i),s=n.slice(i+1)),a=t[o],a!==null&&typeof a<"u")if(!s&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)ha.getDescendantProperty(a[l],s,r);else s&&ha.getDescendantProperty(a,s,r)}else r.push(t);return r}}class Do{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const s=Do.isMatch(o,t,this.options.caseSensitive);s&&n.push({item:o,score:s})}else for(let s=0;s<this.keys.length;s++){const i=ha.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=Do.isMatch(i[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Do.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return Do.indexesOfFirstLetter(t,n).forEach((i,a)=>{let l=i+1;o[a]=[i];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(i=>i!==!1),o.length?o.sort((i,a)=>i.length===1?i[0]-a[0]:(i=i[i.length-1]-i[0],a=a[a.length-1]-a[0],i-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,s)=>o!==r?!1:s).filter(o=>o!==!1)}}const vv=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},bv=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>x.jsx("li",{...o,ref:s,role:"option","aria-selected":e,className:"w-full last:border-transparent border-b border-tooltip-border",children:x.jsx("button",{type:"button",onClick:n,"aria-selected":e,className:`p-2 w-full text-left cursor-pointer ${e?"bg-primary text-primary-foreground":""} ${t?"bg-primary-subtle text-primary-foreground":""}`,children:r.label??r.value})})),FA={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},LA={caseSensitive:!1,sort:!1},VA=[],$A=b.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,interactive:o,rightLabel:s,optionalText:i,container:a,hideLeft:l=!1,right:c,left:u,error:d,required:f=!1,...h},p)=>{const m=tn(),y=b.useRef(null),[v,w]=b.useState(!1),[g,S]=b.useState(""),[T,E]=b.useState(h.value??h.defaultValue??""),[k,A]=b.useState(h.value??h.defaultValue??""),[D,O]=b.useState(null),V=b.useRef(VA),F=vv(D),R=t&&g!==""?[{value:g,label:g,"data-dynamic":"true"},...e]:e,C=new Do(R,["value","label"],LA).search(g),I=t?void 0:`^(${e.map($=>`${Tu($.value)}${$.label?"|"+Tu($.label):""}`).join("|")})$`;b.useEffect(()=>{if(h.value){E(h.value);const $=e.find(Y=>Y.value===h.value);E(($==null?void 0:$.label)??h.value)}},[h.value]);const{x:M,y:L,strategy:H,refs:G,context:P}=Ms({open:v,transform:!0,onOpenChange:w,whileElementsMounted:Qi,middleware:[ta(4),D_({padding:10,apply($){Object.assign($.elements.floating.style,{width:`${$.rects.reference.width}px`,maxHeight:`${Math.min(480,$.availableHeight)}px`})}})]});b.useImperativeHandle(p,()=>{var $;return($=G.domReference)==null?void 0:$.current},[G]);const j=hA(P,FA),{getReferenceProps:Z,getFloatingProps:re,getItemProps:J}=Ns([Fs(P,{role:"listbox"}),Ds(P),sv(P,{listRef:V,loop:!0,activeIndex:D,allowEscape:!0,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:D,virtual:!0,onNavigate:$=>{const Y=C.length-1;if($===null&&F===0)return O(Y);if($===null&&F===Y)return O(0);const oe=$??F??null;return oe===null?void 0:O(oe)}})]),U=$=>{var oe;E($.value),A($.label??"");const Y=Pl(y.current,$.value);Y&&((oe=h.onChange)==null||oe.call(h,Y)),w(!1),S("")},N=$=>{var oe;const Y=$.target.value;return S(Y),!v&&Y===""?w(!0):($.target.name=h.name||"",Y?w(!0):(oe=h.onChange)==null?void 0:oe.call(h,$))},B=()=>{w(!0),S("")},W=()=>{S(""),E(""),A(""),Pl(G.reference.current,""),w(!1)};return x.jsxs(ua,{...h,container:pt("group inline-block w-full",a),error:d,feedback:n,form:h.form,hideLeft:l,id:h.name||h.id,interactive:o,labelClassName:r,left:u,name:h.name,optionalText:i,placeholder:h.placeholder,required:f,rightLabel:s,title:h.title,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"link:text-primary transition-colors",children:[x.jsx(Jf,{size:20}),x.jsx("span",{className:"sr-only",children:m.inputCaretDown})]}),T?x.jsx("button",{type:"button",onClick:W,className:"link:text-danger transition-colors",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("input",{ref:y,required:f,type:"hidden",name:h.name,defaultValue:h.value||T||void 0}),x.jsx("input",{...Z({...h,onChange:N,onFocus:B,pattern:I,ref:G.setReference,name:void 0,onClick:$=>$.currentTarget.focus(),onKeyDown($){if($.key==="Escape")return $.currentTarget.blur(),w(!1);if($.key==="Enter"){if(D!==null&&C[D])return $.preventDefault(),U(C[D]);if(C.length===1)return $.preventDefault(),U(C[0])}}}),required:f,value:v?g:k||T,"aria-autocomplete":"list",autoComplete:"off",className:pt("input text-foreground text-base group h-11 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",c||g?"pe-12":"",u?"ps-8":"",h.className)}),x.jsx(As,{preserveTabOrder:!0,children:v?x.jsx(la,{guards:!0,returnFocus:!1,context:P,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsx("ul",{...re({ref:G.setFloating,style:{position:H,left:M??0,top:L??0,...j.styles}}),"data-floating":"true",className:"bg-floating-background shadow-floating text-foreground list-none p-0 m-0 rounded-t-lg rounded-b-lg overflow-auto origin-[top_center] overflow-y-auto z-floating",children:C.map(($,Y)=>b.createElement(bv,{...J({onClick:()=>U($),ref:oe=>void(V.current[Y]=oe),selected:D===Y,active:T===$.value}),key:`${$.value}-option`,option:$,selected:D===Y,active:T===$.value}))})}):null})]})}),wv=({children:e,className:t="",size:n,...r})=>x.jsxs("label",{"data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group font-normal flex items-center gap-2 data-[disabled=true]:cursor-not-allowed",children:[x.jsx("input",{...r,type:"checkbox",className:pt("form-checkbox size-4 rounded border-card-border text-primary focus:ring-primary appearance-none inline-block bg-origin-border group-aria-disabled:cursor-not-allowed disabled:opacity-70",t),...r}),e]}),Ls=b.forwardRef(({type:e="text",feedback:t=null,info:n,labelClassName:r,next:o,interactive:s,rightLabel:i,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,...h},p)=>{const m=h.id??h.name,y=b.useRef(null);return b.useEffect(()=>{if(y.current===null)return;const v=y.current,w=()=>v.setAttribute("data-initialized","true"),g=S=>{const T=S;if(T.key==="Enter"&&v.enterKeyHint==="next"){const E=v.getAttribute("data-next");if(E){const k=document.getElementById(E);if(k)return k.focus(),void T.preventDefault()}}};return v.addEventListener("keydown",g),v.addEventListener("focus",w),()=>{v.removeEventListener("keydown",g),v.removeEventListener("focus",w)}},[]),x.jsx(ua,{info:n,container:pt("group inline-block w-full",l),error:f,feedback:t,hideLeft:c,left:d,optionalText:a,right:u,rightLabel:i,interactive:s,form:h.form,id:h.name||h.id,name:h.name,labelClassName:r,title:h.title,placeholder:h.placeholder,required:h.required,children:x.jsx(Dg,{...h,type:e,"data-next":o,ref:Cl(p,y),id:m,name:m,className:pt("input text-foreground group h-11 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",u?"pe-4":"",d?"ps-4":"",h.className)})})}),xv=new Date(1970,11,31),Su={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Tv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},RA={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},jA=({date:e,locale:t,disabledDate:n,autoFocusToday:r,onChange:o,markToday:s,...i})=>{const a=b.useId(),l=tn(),c=b.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[u,d]=b.useState(e||void 0),[f,h]=b.useState(!1),p=c.formatToParts(xv).flatMap(S=>Pn.keyof(Su,S.type)?Su[S.type](S.value):[]),m=c.formatToParts(xv).reduce((S,T)=>S+(Pn.keyof(Tv,T.type)?Tv[T.type](T.value):""),""),[y,v]=b.useState(u?c.formatToParts(u).reduce((S,T)=>S+(Pn.keyof(Su,T.type)?RA[T.type](u,T.value):""),""):""),w=S=>{const T=S.target.value;if(v(T),p.length===T.length&&p.every((k,A)=>{const D=T.charAt(A);return typeof k=="string"?D===k:k.test(D)})){const k=go(MO(T,m,new Date));d(k),o==null||o(k)}},g=S=>{d(S),o==null||o(S),v(Lk(S,m))};return x.jsx(Ls,{...i,mask:p,value:y,onChange:w,className:"uppercase",formNoValidate:!f,placeholder:m,required:i.required??!0,error:f?void 0:i.error,name:i.name?`${i.name}-picker`:i.name,right:x.jsxs(b.Fragment,{children:[x.jsx("input",{defaultValue:u==null?void 0:u.toISOString(),hidden:!0,type:"date",name:i.name}),x.jsx(Ao,{open:f,restoreFocus:!0,onChange:h,trigger:x.jsxs("span",{"aria-labelledby":a,children:[x.jsx("span",{id:a,className:"sr-only",children:l.datePickerCalendarButtonLabel}),x.jsx(N1,{})]}),buttonProps:{"aria-describedby":a},children:x.jsx(Zg,{...i,locale:t,date:u,onChange:g,markToday:s,disabledDate:n,autoFocusToday:r})})]})})},BA=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],zA=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],WA=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],HA=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Sv=(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 Ev(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?HA:WA:t.binary?zA:BA,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,s=o?"-":t.signed?"+":"";o&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){const u=Sv(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=Sv(Number(e),t.locale,i),c=n[a];return s+l+r+c}var Eu={exports:{}},pa={exports:{}},Fe={};/** @license React v16.13.1
172
+ */var NI=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Js=NI.join(","),dy=typeof Element>"u",So=dy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ea=!dy&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},ta=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&e(t.parentNode);return s},FI=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},LI=function(t,n,r){if(ta(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Js));return n&&So.call(t,Js)&&o.unshift(t),o=o.filter(r),o},VI=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!ta(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=So.call(s,Js);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!ta(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var h=e(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:s,candidates:h})}else i.unshift.apply(i,s.children)}}return o},fy=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},hy=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||FI(t))&&!fy(t)?0:t.tabIndex},$I=function(t,n){var r=hy(t);return r<0&&n&&!fy(t)?0:r},RI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},py=function(t){return t.tagName==="INPUT"},jI=function(t){return py(t)&&t.type==="hidden"},BI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},zI=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},WI=function(t){if(!t.name)return!0;var n=t.form||ea(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=zI(o,t.form);return!i||i===t},HI=function(t){return py(t)&&t.type==="radio"},UI=function(t){return HI(t)&&!WI(t)},GI=function(t){var n,r=t&&ea(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=ea(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},my=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},YI=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=So.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(So.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=ea(t);if(l&&!l.shadowRoot&&o(l)===!0)return my(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(GI(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return my(t);return!1},qI=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return So.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},KI=function(t,n){return!(n.disabled||ta(n)||jI(n)||YI(n,t)||BI(n)||qI(n))},au=function(t,n){return!(UI(n)||hy(n)<0||!KI(t,n))},ZI=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},XI=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=$I(a,s),c=s?e(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(RI).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Pi=function(t,n){n=n||{};var r;return n.getShadowRoot?r=VI([t],n.includeContainer,{filter:au.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ZI}):r=LI(t,n.includeContainer,au.bind(null,n)),XI(r)},QI=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return So.call(t,Js)===!1?!1:au(n,t)};function gy(e,t,n){let{reference:r,floating:o}=e;const i=Dr(t),s=iu(t),a=ou(s),l=sr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(To(t)){case"start":h[s]-=f*(n&&c?-1:1);break;case"end":h[s]+=f*(n&&c?-1:1);break}return h}const JI=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=gy(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:g,fn:v}=a[m],{x:w,y,data:S,reset:T}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=w??u,d=y??d,h={...h,[g]:{...h[g],...S}},T&&p<=50&&(p++,typeof T=="object"&&(T.placement&&(f=T.placement),T.rects&&(c=T.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:d}=gy(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function lu(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=xo(t,e),p=uy(h),g=a[f?d==="floating"?"reference":"floating":d],v=Qs(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},T=Qs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:y,strategy:l}):w);return{top:(v.top-T.top+p.top)/S.y,bottom:(T.bottom-v.bottom+p.bottom)/S.y,left:(v.left-T.left+p.left)/S.x,right:(T.right-v.right+p.right)/S.x}}const eA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=xo(e,t)||{};if(c==null)return{};const d=uy(u),f={x:n,y:r},h=iu(o),p=ou(h),m=await s.getDimensions(c),g=h==="y",v=g?"top":"left",w=g?"bottom":"right",y=g?"clientHeight":"clientWidth",S=i.reference[p]+i.reference[h]-f[h]-i.floating[p],T=f[h]-i.reference[h],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let P=E?E[y]:0;(!P||!await(s.isElement==null?void 0:s.isElement(E)))&&(P=a.floating[y]||i.floating[p]);const D=S/2-T/2,_=P/2-m[p]/2-1,O=gn(d[v],_),V=gn(d[w],_),F=O,$=P-m[p]-V,C=P/2-m[p]/2+D,I=ru(F,C,$),M=!l.arrow&&To(o)!=null&&C!==I&&i.reference[p]/2-(C<F?O:V)-m[p]/2<0,L=M?C<F?C-F:C-$:0;return{[h]:f[h]+L,data:{[h]:I,centerOffset:C-I-L,...M&&{alignmentOffset:L}},reset:M}}}),tA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=xo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=sr(o),w=Dr(a),y=sr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=f||(y||!m?[Xs(a)]:AI(a)),E=p!=="none";!f&&E&&T.push(...DI(a,m,p,S));const P=[a,...T],D=await lu(t,g),_=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&_.push(D[v]),d){const C=II(o,s,S);_.push(D[C[0]],D[C[1]])}if(O=[...O,{placement:o,overflows:_}],!_.every(C=>C<=0)){var V,F;const C=(((V=i.flip)==null?void 0:V.index)||0)+1,I=P[C];if(I)return{data:{index:C,overflows:O},reset:{placement:I}};let M=(F=O.filter(L=>L.overflows[0]<=0).sort((L,H)=>L.overflows[1]-H.overflows[1])[0])==null?void 0:F.placement;if(!M)switch(h){case"bestFit":{var $;const L=($=O.filter(H=>{if(E){const Y=Dr(H.placement);return Y===w||Y==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(Y=>Y>0).reduce((Y,k)=>Y+k,0)]).sort((H,Y)=>H[1]-Y[1])[0])==null?void 0:$[0];L&&(M=L);break}case"initialPlacement":M=a;break}if(o!==M)return{reset:{placement:M}}}return{}}}};async function nA(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=sr(n),a=To(n),l=Dr(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=xo(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const rA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await nA(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},oA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:v,y:w}=g;return{x:v,y:w}}},...l}=xo(e,t),c={x:n,y:r},u=await lu(t,l),d=Dr(sr(o)),f=cy(d);let h=c[f],p=c[d];if(i){const g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",w=h+u[g],y=h-u[v];h=ru(w,h,y)}if(s){const g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",w=p+u[g],y=p-u[v];p=ru(w,p,y)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},iA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=xo(e,t),l=await lu(t,a),c=sr(n),u=To(n),d=Dr(n)==="y",{width:f,height:h}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const g=h-l.top-l.bottom,v=f-l.left-l.right,w=gn(h-l[p],g),y=gn(f-l[m],v),S=!t.middlewareData.shift;let T=w,E=y;if(d?E=u||S?gn(y,v):v:T=u||S?gn(w,g):g,S&&!u){const D=Gt(l.left,0),_=Gt(l.right,0),O=Gt(l.top,0),V=Gt(l.bottom,0);d?E=f-2*(D!==0||_!==0?D+_:Gt(l.left,l.right)):T=h-2*(O!==0||V!==0?O+V:Gt(l.top,l.bottom))}await s({...t,availableWidth:E,availableHeight:T});const P=await o.getDimensions(i.floating);return f!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function yy(e){const t=Ut(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ut(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Zs(n)!==i||Zs(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function cu(e){return je(e)?e:e.contextElement}function Eo(e){const t=cu(e);if(!ut(t))return ir(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=yy(t);let s=(i?Zs(n.width):n.width)/r,a=(i?Zs(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const sA=ir(0);function vy(e){const t=Bt(e);return!Kc()||!t.visualViewport?sA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function aA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function Mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=cu(e);let s=ir(1);t&&(r?je(r)&&(s=Eo(r)):s=Eo(e));const a=aA(i,n,r)?vy(i):ir(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=Bt(i),h=r&&je(r)?Bt(r):r;let p=f,m=Zc(p);for(;m&&r&&h!==p;){const g=Eo(m),v=m.getBoundingClientRect(),w=Ut(m),y=v.left+(m.clientLeft+parseFloat(w.paddingLeft))*g.x,S=v.top+(m.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=y,c+=S,p=Bt(m),m=Zc(p)}}return Qs({width:u,height:d,x:l,y:c})}function lA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Mn(r),a=t?qs(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ir(1);const u=ir(0),d=ut(r);if((d||!d&&!i)&&((nr(r)!=="body"||Ei(s))&&(l=Ks(r)),ut(r))){const f=Mr(r);c=Eo(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function cA(e){return Array.from(e.getClientRects())}function by(e){return Mr(Mn(e)).left+Ks(e).scrollLeft}function uA(e){const t=Mn(e),n=Ks(e),r=e.ownerDocument.body,o=Gt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Gt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+by(e);const a=-n.scrollTop;return Ut(r).direction==="rtl"&&(s+=Gt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function dA(e,t){const n=Bt(e),r=Mn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=Kc();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function fA(e,t){const n=Mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ut(e)?Eo(e):ir(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function wy(e,t,n){let r;if(t==="viewport")r=dA(e,n);else if(t==="document")r=uA(Mn(e));else if(je(t))r=fA(t,n);else{const o=vy(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Qs(r)}function xy(e,t){const n=Nn(e);return n===t||!je(n)||rr(n)?!1:Ut(n).position==="fixed"||xy(n,t)}function hA(e,t){const n=t.get(e);if(n)return n;let r=or(e,[],!1).filter(a=>je(a)&&nr(a)!=="body"),o=null;const i=Ut(e).position==="fixed";let s=i?Nn(e):e;for(;je(s)&&!rr(s);){const a=Ut(s),l=qc(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ei(s)&&!l&&xy(e,s))?r=r.filter(u=>u!==s):o=a,s=Nn(s)}return t.set(e,r),r}function pA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?qs(t)?[]:hA(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=wy(t,u,o);return c.top=Gt(d.top,c.top),c.right=gn(d.right,c.right),c.bottom=gn(d.bottom,c.bottom),c.left=Gt(d.left,c.left),c},wy(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function mA(e){const{width:t,height:n}=yy(e);return{width:t,height:n}}function gA(e,t,n){const r=ut(t),o=Mn(t),i=n==="fixed",s=Mr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=ir(0);if(r||!r&&!i)if((nr(t)!=="body"||Ei(o))&&(a=Ks(t)),r){const d=Mr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=by(o));const c=s.left+a.scrollLeft-l.x,u=s.top+a.scrollTop-l.y;return{x:c,y:u,width:s.width,height:s.height}}function uu(e){return Ut(e).position==="static"}function Ty(e,t){return!ut(e)||Ut(e).position==="fixed"?null:t?t(e):e.offsetParent}function Sy(e,t){const n=Bt(e);if(qs(e))return n;if(!ut(e)){let o=Nn(e);for(;o&&!rr(o);){if(je(o)&&!uu(o))return o;o=Nn(o)}return n}let r=Ty(e,t);for(;r&&xI(r)&&uu(r);)r=Ty(r,t);return r&&rr(r)&&uu(r)&&!qc(r)?n:r||TI(e)||n}const yA=async function(e){const t=this.getOffsetParent||Sy,n=this.getDimensions,r=await n(e.floating);return{reference:gA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function vA(e){return Ut(e).direction==="rtl"}const bA={convertOffsetParentRelativeRectToViewportRelativeRect:lA,getDocumentElement:Mn,getClippingRect:pA,getOffsetParent:Sy,getElementRects:yA,getClientRects:cA,getDimensions:mA,getScale:Eo,isElement:je,isRTL:vA};function wA(e,t){let n=null,r;const o=Mn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=wo(u),p=wo(o.clientWidth-(c+d)),m=wo(o.clientHeight-(u+f)),g=wo(c),w={rootMargin:-h+"px "+-p+"px "+-m+"px "+-g+"px",threshold:Gt(0,gn(1,l))||1};let y=!0;function S(T){const E=T[0].intersectionRatio;if(E!==l){if(!y)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(S,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return s(!0),i}function na(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=cu(e),u=o||i?[...c?or(c):[],...or(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?wA(c,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(v=>{let[w]=v;w&&w.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?Mr(e):null;l&&g();function g(){const v=Mr(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,p=requestAnimationFrame(g)}return n(),()=>{var v;u.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const xA=rA,TA=oA,SA=tA,EA=iA,Ey=eA,CA=(e,t,n)=>{const r=new Map,o={platform:bA,...n},i={...o.platform,_c:r};return JI(e,t,{...o,platform:i})};var ra=typeof document<"u"?b.useLayoutEffect:b.useEffect;function oa(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!oa(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!oa(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Cy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Py(e,t){const n=Cy(e);return Math.round(t*n)/n}function ky(e){const t=A.useRef(e);return ra(()=>{t.current=e}),t}function PA(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=A.useState(r);oa(f,r)||h(r);const[p,m]=A.useState(null),[g,v]=A.useState(null),w=A.useCallback(L=>{L!==E.current&&(E.current=L,m(L))},[]),y=A.useCallback(L=>{L!==P.current&&(P.current=L,v(L))},[]),S=i||p,T=s||g,E=A.useRef(null),P=A.useRef(null),D=A.useRef(u),_=l!=null,O=ky(l),V=ky(o),F=A.useCallback(()=>{if(!E.current||!P.current)return;const L={placement:t,strategy:n,middleware:f};V.current&&(L.platform=V.current),CA(E.current,P.current,L).then(H=>{const Y={...H,isPositioned:!0};$.current&&!oa(D.current,Y)&&(D.current=Y,Qd.flushSync(()=>{d(Y)}))})},[f,t,n,V]);ra(()=>{c===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,d(L=>({...L,isPositioned:!1})))},[c]);const $=A.useRef(!1);ra(()=>($.current=!0,()=>{$.current=!1}),[]),ra(()=>{if(S&&(E.current=S),T&&(P.current=T),S&&T){if(O.current)return O.current(S,T,F);F()}},[S,T,F,O,_]);const C=A.useMemo(()=>({reference:E,floating:P,setReference:w,setFloating:y}),[w,y]),I=A.useMemo(()=>({reference:S,floating:T}),[S,T]),M=A.useMemo(()=>{const L={position:n,left:0,top:0};if(!I.floating)return L;const H=Py(I.floating,u.x),Y=Py(I.floating,u.y);return a?{...L,transform:"translate("+H+"px, "+Y+"px)",...Cy(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:Y}},[n,a,I.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:F,refs:C,elements:I,floatingStyles:M}),[u,F,C,I,M])}const kA=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ey({element:r.current,padding:o}).fn(n):{}:r?Ey({element:r,padding:o}).fn(n):{}}}},ia=(e,t)=>({...xA(e),options:[e,t]}),du=(e,t)=>({...TA(e),options:[e,t]}),fu=(e,t)=>({...SA(e),options:[e,t]}),OA=(e,t)=>({...EA(e),options:[e,t]}),Oy=(e,t)=>({...kA(e),options:[e,t]});function Iy(e){return A.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const Ay={...A},IA=Ay.useInsertionEffect||(e=>e());function Ct(e){const t=A.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return IA(()=>{t.current=e}),A.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const hu="ArrowUp",ki="ArrowDown",Co="ArrowLeft",Po="ArrowRight";function sa(e,t,n){return Math.floor(e/t)!==n}function Oi(e,t){return t<0||t>=e.current.length}function pu(e,t){return _t(e,{disabledIndices:t})}function _y(e,t){return _t(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function _t(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const s=e.current;let a=n;do a+=r?-i:i;while(a>=0&&a<=s.length-1&&aa(s,a,o));return a}function AA(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===hu){if(u&&Et(n),c===-1)d=l;else if(d=_t(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:s}),o&&(c-i<a||d<0)){const f=c%i,h=l%i,p=l-(h-f);h===f?d=l:d=h>f?p:p-i}Oi(e,d)&&(d=c)}if(n.key===ki&&(u&&Et(n),c===-1?d=a:(d=_t(e,{startingIndex:c,amount:i,disabledIndices:s}),o&&c+i>l&&(d=_t(e,{startingIndex:c%i-i,amount:i,disabledIndices:s}))),Oi(e,d)&&(d=c)),r==="both"){const f=wo(c/i);n.key===Po&&(u&&Et(n),c%i!==i-1?(d=_t(e,{startingIndex:c,disabledIndices:s}),o&&sa(d,i,f)&&(d=_t(e,{startingIndex:c-c%i-1,disabledIndices:s}))):o&&(d=_t(e,{startingIndex:c-c%i-1,disabledIndices:s})),sa(d,i,f)&&(d=c)),n.key===Co&&(u&&Et(n),c%i!==0?(d=_t(e,{startingIndex:c,decrement:!0,disabledIndices:s}),o&&sa(d,i,f)&&(d=_t(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s}))):o&&(d=_t(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s})),sa(d,i,f)&&(d=c));const h=wo(l/i)===f;Oi(e,d)&&(o&&h?d=n.key===Co?l:_t(e,{startingIndex:c-c%i-1,disabledIndices:s}):d=c)}return d}function _A(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:l}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=s}),c=!0):o++}}),[...r]}function DA(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function MA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function aa(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let Dy=0;function ar(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Dy);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Dy=requestAnimationFrame(i)}var Ae=typeof document<"u"?b.useLayoutEffect:b.useEffect;function NA(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function FA(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const My=A.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function LA(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=A.useState(()=>new Map),s=A.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),a=A.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Ae(()=>{const l=new Map(o);Array.from(l.keys()).sort(NA).forEach((u,d)=>{l.set(u,d)}),FA(o,l)||i(l)},[o]),A.createElement(My.Provider,{value:A.useMemo(()=>({register:s,unregister:a,map:o,elementsRef:n,labelsRef:r}),[s,a,o,n,r])},t)}function Ny(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=A.useContext(My),[a,l]=A.useState(null),c=A.useRef(null),u=A.useCallback(d=>{if(c.current=d,a!==null&&(i.current[a]=d,s)){var f;const h=t!==void 0;s.current[a]=h?t:(f=d==null?void 0:d.textContent)!=null?f:null}},[a,i,s,t]);return Ae(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ae(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),A.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function ko(){return ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ko.apply(this,arguments)}let Fy=!1,VA=0;const Ly=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+VA++;function $A(){const[e,t]=A.useState(()=>Fy?Ly():void 0);return Ae(()=>{e==null&&t(Ly())},[]),A.useEffect(()=>{Fy=!0},[]),e}const Oo=Ay.useId||$A;let Ii;process.env.NODE_ENV!=="production"&&(Ii=new Set);function la(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Ii)!=null&&e.has(o))){var i;(i=Ii)==null||i.add(o),console.warn(o)}}function RA(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Ii)!=null&&e.has(o))){var i;(i=Ii)==null||i.add(o),console.error(o)}}const Vy=A.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:s=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:f,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||la("The `ref` prop is required for `FloatingArrow`."));const g=Oo(),[v,w]=A.useState(!1);if(Ae(()=>{if(!o)return;Ut(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const y=c*2,S=y/2,T=s/2*(l/-8+1),E=a/2*l/4,[P,D]=r.split("-"),_=!!f,O=P==="top"||P==="bottom",V=u&&D==="end"?"bottom":"top";let F=u&&D==="end"?"right":"left";u&&v&&(F=D==="end"?"left":"right");const $=(i==null?void 0:i.x)!=null?u||i.x:"",C=(i==null?void 0:i.y)!=null?u||i.y:"",I=f||"M0,0"+(" H"+s)+(" L"+(s-T)+","+(a-E))+(" Q"+s/2+","+a+" "+T+","+(a-E))+" Z",M={top:_?"rotate(180deg)":"",left:_?"rotate(90deg)":"rotate(-90deg)",bottom:_?"":"rotate(180deg)",right:_?"rotate(-90deg)":"rotate(90deg)"}[P];return A.createElement("svg",ko({},m,{"aria-hidden":!0,ref:n,width:_?s:s+y,height:s,viewBox:"0 0 "+s+" "+(a>s?a:s),style:{position:"absolute",pointerEvents:"none",[F]:$,[V]:C,[P]:O||_?"100%":"calc(100% - "+y/2+"px)",transform:""+M+(h??""),...p}}),y>0&&A.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:d,strokeWidth:y+(f?0:1),d:I}),A.createElement("path",{stroke:y&&!f?m.fill:"none",d:I}),A.createElement("clipPath",{id:g},A.createElement("rect",{x:-S,y:S*(_?-1:1),width:s+y,height:s})))});function $y(){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 Ry=A.createContext(null),jy=A.createContext(null),lr=()=>{var e;return((e=A.useContext(Ry))==null?void 0:e.id)||null},cr=()=>A.useContext(jy);function jA(e){const t=Oo(),n=cr(),o=lr();return Ae(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function BA(e){const{children:t,id:n}=e,r=lr();return A.createElement(Ry.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function zA(e){const{children:t}=e,n=A.useRef([]),r=A.useCallback(s=>{n.current=[...n.current,s]},[]),o=A.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),i=A.useState(()=>$y())[0];return A.createElement(jy.Provider,{value:A.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function ur(e){return"data-floating-ui-"+e}function Pt(e){const t=b.useRef(e);return Ae(()=>{t.current=e}),t}const By=ur("safe-polygon");function mu(e,t,n){return n&&!Ci(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function zy(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,h=cr(),p=lr(),m=Pt(c),g=Pt(l),v=Pt(n),w=A.useRef(),y=A.useRef(-1),S=A.useRef(),T=A.useRef(-1),E=A.useRef(!0),P=A.useRef(!1),D=A.useRef(()=>{}),_=A.useCallback(()=>{var I;const M=(I=o.current.openEvent)==null?void 0:I.type;return(M==null?void 0:M.includes("mouse"))&&M!=="mousedown"},[o]);A.useEffect(()=>{if(!a)return;function I(M){let{open:L}=M;L||(clearTimeout(y.current),clearTimeout(T.current),E.current=!0)}return i.on("openchange",I),()=>{i.off("openchange",I)}},[a,i]),A.useEffect(()=>{if(!a||!m.current||!n)return;function I(L){_()&&r(!1,L,"hover")}const M=vt(s.floating).documentElement;return M.addEventListener("mouseleave",I),()=>{M.removeEventListener("mouseleave",I)}},[s.floating,n,r,a,m,_]);const O=A.useCallback(function(I,M,L){M===void 0&&(M=!0),L===void 0&&(L="hover");const H=mu(g.current,"close",w.current);H&&!S.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>r(!1,I,L),H)):M&&(clearTimeout(y.current),r(!1,I,L))},[g,r]),V=Ct(()=>{D.current(),S.current=void 0}),F=Ct(()=>{if(P.current){const I=vt(s.floating).body;I.style.pointerEvents="",I.removeAttribute(By),P.current=!1}});A.useEffect(()=>{if(!a)return;function I(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function M(k){if(clearTimeout(y.current),E.current=!1,u&&!Ci(w.current)||d>0&&!mu(g.current,"open"))return;const R=mu(g.current,"open",w.current);R?y.current=window.setTimeout(()=>{v.current||r(!0,k,"hover")},R):r(!0,k,"hover")}function L(k){if(I())return;D.current();const R=vt(s.floating);if(clearTimeout(T.current),m.current&&o.current.floatingContext){n||clearTimeout(y.current),S.current=m.current({...o.current.floatingContext,tree:h,x:k.clientX,y:k.clientY,onClose(){F(),V(),O(k,!0,"safe-polygon")}});const oe=S.current;R.addEventListener("mousemove",oe),D.current=()=>{R.removeEventListener("mousemove",oe)};return}(w.current==="touch"?!dt(s.floating,k.relatedTarget):!0)&&O(k)}function H(k){I()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:k.clientX,y:k.clientY,onClose(){F(),V(),O(k)}})(k))}if(je(s.domReference)){var Y;const k=s.domReference;return n&&k.addEventListener("mouseleave",H),(Y=s.floating)==null||Y.addEventListener("mouseleave",H),f&&k.addEventListener("mousemove",M,{once:!0}),k.addEventListener("mouseenter",M),k.addEventListener("mouseleave",L),()=>{var R;n&&k.removeEventListener("mouseleave",H),(R=s.floating)==null||R.removeEventListener("mouseleave",H),f&&k.removeEventListener("mousemove",M),k.removeEventListener("mouseenter",M),k.removeEventListener("mouseleave",L)}}},[s,a,e,u,d,f,O,V,F,r,n,v,h,g,m,o]),Ae(()=>{var I;if(a&&n&&(I=m.current)!=null&&I.__options.blockPointerEvents&&_()){const L=vt(s.floating).body;L.setAttribute(By,""),L.style.pointerEvents="none",P.current=!0;const H=s.floating;if(je(s.domReference)&&H){var M;const Y=s.domReference,k=h==null||(M=h.nodesRef.current.find(R=>R.id===p))==null||(M=M.context)==null?void 0:M.elements.floating;return k&&(k.style.pointerEvents=""),Y.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{Y.style.pointerEvents="",H.style.pointerEvents=""}}}},[a,n,p,s,h,m,_]),Ae(()=>{n||(w.current=void 0,V(),F())},[n,V,F]),A.useEffect(()=>()=>{V(),clearTimeout(y.current),clearTimeout(T.current),F()},[a,s.domReference,V,F]);const $=A.useMemo(()=>{function I(M){w.current=M.pointerType}return{onPointerDown:I,onPointerEnter:I,onMouseMove(M){const{nativeEvent:L}=M;function H(){!E.current&&!v.current&&r(!0,L,"hover")}u&&!Ci(w.current)||n||d===0||(clearTimeout(T.current),w.current==="touch"?H():T.current=window.setTimeout(H,d))}}},[u,r,n,v,d]),C=A.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(I){O(I.nativeEvent,!1)}}),[O]);return A.useMemo(()=>a?{reference:$,floating:C}:{},[a,$,C])}function WA(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Nr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function HA(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),Nr(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}let Io=new WeakMap,ca=new WeakSet,ua={},gu=0;const UA=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Wy=e=>e&&(e.host||Wy(e.parentNode)),GA=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Wy(n);return e.contains(r)?r:null}).filter(n=>n!=null);function YA(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=GA(t,e),a=new Set,l=new Set(s),c=[];ua[o]||(ua[o]=new WeakMap);const u=ua[o];s.forEach(d),f(t),a.clear();function d(h){!h||a.has(h)||(a.add(h),h.parentNode&&d(h.parentNode))}function f(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(nr(p)!=="script")if(a.has(p))f(p);else{const m=i?p.getAttribute(i):null,g=m!==null&&m!=="false",v=(Io.get(p)||0)+1,w=(u.get(p)||0)+1;Io.set(p,v),u.set(p,w),c.push(p),v===1&&g&&ca.add(p),w===1&&p.setAttribute(o,""),!g&&i&&p.setAttribute(i,"true")}})}return gu++,()=>{c.forEach(h=>{const p=(Io.get(h)||0)-1,m=(u.get(h)||0)-1;Io.set(h,p),u.set(h,m),p||(!ca.has(h)&&i&&h.removeAttribute(i),ca.delete(h)),m||h.removeAttribute(o)}),gu--,gu||(Io=new WeakMap,Io=new WeakMap,ca=new WeakSet,ua={})}}function Hy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=vt(e[0]).body;return YA(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Ao=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Uy(e,t){const n=Pi(e,Ao());t==="prev"&&n.reverse();const r=n.indexOf(nn(vt(e)));return n.slice(r+1)[0]}function Gy(){return Uy(document.body,"next")}function Yy(){return Uy(document.body,"prev")}function Ai(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!dt(n,r)}function qA(e){Pi(e,Ao()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function KA(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function ZA(e,t,n){const r=e.indexOf(t);function o(s){const a=ur("focus-guard");let l=r+(s?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||dt(n,c));)s?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const yu={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let XA;function qy(e){e.key==="Tab"&&(e.target,clearTimeout(XA))}const da=A.forwardRef(function(t,n){const[r,o]=A.useState();Ae(()=>(Jc()&&o("button"),document.addEventListener("keydown",qy),()=>{document.removeEventListener("keydown",qy)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ur("focus-guard")]:"",style:yu};return A.createElement("span",ko({},t,i))}),Ky=A.createContext(null),Zy=ur("portal");function QA(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Oo(),o=Xy(),[i,s]=A.useState(null),a=A.useRef(null);return Ae(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),Ae(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Zy,""),l.appendChild(c),a.current=c,s(c)},[t,r]),Ae(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!je(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(Zy,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function _i(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=QA({id:n,root:r}),[s,a]=A.useState(null),l=A.useRef(null),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),f=!!s&&!s.modal&&s.open&&o&&!!(r||i);return A.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function h(p){i&&Ai(p)&&(p.type==="focusin"?KA:qA)(i)}return i.addEventListener("focusin",h,!0),i.addEventListener("focusout",h,!0),()=>{i.removeEventListener("focusin",h,!0),i.removeEventListener("focusout",h,!0)}},[i,o,s==null?void 0:s.modal]),A.createElement(Ky.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i])},f&&i&&A.createElement(da,{"data-type":"outside",ref:l,onFocus:h=>{if(Ai(h,i)){var p;(p=u.current)==null||p.focus()}else{const m=Yy()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),f&&i&&A.createElement("span",{"aria-owns":i.id,style:yu}),i&&Qd.createPortal(t,i),f&&i&&A.createElement(da,{"data-type":"outside",ref:c,onFocus:h=>{if(Ai(h,i)){var p;(p=d.current)==null||p.focus()}else{const m=Gy()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,h.nativeEvent))}}}))}const Xy=()=>A.useContext(Ky),Qy=20;let Fr=[];function vu(e){Fr=Fr.filter(n=>n.isConnected);let t=e;if(!(!t||nr(t)==="body")){if(!QI(t,Ao())){const n=Pi(t,Ao())[0];n&&(t=n)}Fr.push(t),Fr.length>Qy&&(Fr=Fr.slice(-Qy))}}function Jy(){return Fr.slice().reverse().find(e=>e.isConnected)}const JA=A.forwardRef(function(t,n){return A.createElement("button",ko({},t,{type:"button",ref:n,tabIndex:-1,style:yu}))});function fa(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:f,refs:h,nodeId:p,onOpenChange:m,events:g,dataRef:v,floatingId:w,elements:{domReference:y,floating:S}}=t,T=typeof s=="number"&&s<0,E=ly(y)&&T,P=UA()?i:!0,D=Pt(o),_=Pt(s),O=Pt(a),V=cr(),F=Xy(),$=A.useRef(null),C=A.useRef(null),I=A.useRef(!1),M=A.useRef(!1),L=A.useRef(-1),H=F!=null,Y=S==null?void 0:S.firstElementChild,k=(Y==null?void 0:Y.id)===w?Y:S,R=Ct(function(G){return G===void 0&&(G=k),G?Pi(G,Ao()):[]}),Z=Ct(G=>{const N=R(G);return D.current.map(j=>y&&j==="reference"?y:k&&j==="floating"?k:N).filter(Boolean).flat()});A.useEffect(()=>{if(r||!c)return;function G(j){if(j.key==="Tab"){dt(k,nn(vt(k)))&&R().length===0&&!E&&Et(j);const W=Z(),U=Fn(j);D.current[0]==="reference"&&U===y&&(Et(j),j.shiftKey?ar(W[W.length-1]):ar(W[1])),D.current[1]==="floating"&&U===k&&j.shiftKey&&(Et(j),ar(W[0]))}}const N=vt(k);return N.addEventListener("keydown",G),()=>{N.removeEventListener("keydown",G)}},[r,y,k,c,D,E,R,Z]),A.useEffect(()=>{if(r||!S)return;function G(N){const j=Fn(N),U=R().indexOf(j);U!==-1&&(L.current=U)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,R]),A.useEffect(()=>{if(r||!d)return;function G(){M.current=!0,setTimeout(()=>{M.current=!1})}function N(j){const W=j.relatedTarget;queueMicrotask(()=>{const U=!(dt(y,W)||dt(S,W)||dt(W,S)||dt(F==null?void 0:F.portalNode,W)||W!=null&&W.hasAttribute(ur("focus-guard"))||V&&(Nr(V.nodesRef.current,p).find(z=>{var te,B;return dt((te=z.context)==null?void 0:te.elements.floating,W)||dt((B=z.context)==null?void 0:B.elements.domReference,W)})||WA(V.nodesRef.current,p).find(z=>{var te,B;return((te=z.context)==null?void 0:te.elements.floating)===W||((B=z.context)==null?void 0:B.elements.domReference)===W})));if(l&&U&&nn(vt(k))===vt(k).body){ut(k)&&(k==null||k.focus());const z=L.current,te=R(),B=te[z]||te[te.length-1]||k;ut(B)&&B.focus()}(E||!c)&&W&&U&&!M.current&&W!==Jy()&&(I.current=!0,m(!1,j))})}if(S&&ut(y))return y.addEventListener("focusout",N),y.addEventListener("pointerdown",G),S.addEventListener("focusout",N),()=>{y.removeEventListener("focusout",N),y.removeEventListener("pointerdown",G),S.removeEventListener("focusout",N)}},[r,y,S,k,c,p,V,F,m,d,l,R,E]),A.useEffect(()=>{var G;if(r)return;const N=Array.from((F==null||(G=F.portalNode)==null?void 0:G.querySelectorAll("["+ur("portal")+"]"))||[]);if(S){const j=[S,...N,$.current,C.current,D.current.includes("reference")||E?y:null].filter(U=>U!=null),W=c||E?Hy(j,P,!P):Hy(j);return()=>{W()}}},[r,y,S,c,D,F,E,P]),Ae(()=>{if(r||!ut(k))return;const G=vt(k),N=nn(G);queueMicrotask(()=>{const j=Z(k),W=_.current,U=(typeof W=="number"?j[W]:W.current)||k,z=dt(k,N);!T&&!z&&f&&ar(U,{preventScroll:U===k})})},[r,f,k,T,Z,_]),Ae(()=>{if(r||!k)return;let G=!1;const N=vt(k),j=nn(N);let U=v.current.openEvent;const z=h.domReference.current;vu(j);function te(B){let{open:Pe,reason:ot,event:He,nested:it}=B;Pe&&(U=He),ot==="escape-key"&&h.domReference.current&&vu(h.domReference.current),ot==="hover"&&He.type==="mouseleave"&&(I.current=!0),ot==="outside-press"&&(it?(I.current=!1,G=!0):I.current=!(sy(He)||Qc(He)))}return g.on("openchange",te),()=>{g.off("openchange",te);const B=nn(N),Pe=dt(S,B)||V&&Nr(V.nodesRef.current,p).some(de=>{var Ee;return dt((Ee=de.context)==null?void 0:Ee.elements.floating,B)});(Pe||U&&["click","mousedown"].includes(U.type))&&h.domReference.current&&vu(h.domReference.current);const He=z||j,it=Pi(vt(He).body,Ao());queueMicrotask(()=>{let de=Jy();!de&&ut(He)&&S&&(de=ZA(it,He,S)),O.current&&!I.current&&ut(de)&&(!(de!==B&&B!==N.body)||Pe)&&de.focus({preventScroll:G})})}},[r,S,k,O,v,h,g,V,p]),Ae(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:m,refs:h}),()=>{F.setFocusManagerState(null)}},[r,F,c,f,m,h,d]),Ae(()=>{if(r||!k||typeof MutationObserver!="function"||T)return;const G=()=>{const j=k.getAttribute("tabindex"),W=R(),U=nn(vt(S)),z=W.indexOf(U);z!==-1&&(L.current=z),D.current.includes("floating")||U!==h.domReference.current&&W.length===0?j!=="0"&&k.setAttribute("tabindex","0"):j!=="-1"&&k.setAttribute("tabindex","-1")};G();const N=new MutationObserver(G);return N.observe(k,{childList:!0,subtree:!0,attributes:!0}),()=>{N.disconnect()}},[r,S,k,h,D,R,T]);function oe(G){return r||!u||!c?null:A.createElement(JA,{ref:G==="start"?$:C,onClick:N=>m(!1,N.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&P&&(c?!E:!0)&&(H||c);return A.createElement(A.Fragment,null,J&&A.createElement(da,{"data-type":"inside",ref:F==null?void 0:F.beforeInsideRef,onFocus:G=>{if(c){const j=Z();ar(o[0]==="reference"?j[0]:j[j.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(I.current=!1,Ai(G,F.portalNode)){const j=Gy()||y;j==null||j.focus()}else{var N;(N=F.beforeOutsideRef.current)==null||N.focus()}}}),!E&&oe("start"),n,oe("end"),J&&A.createElement(da,{"data-type":"inside",ref:F==null?void 0:F.afterInsideRef,onFocus:G=>{if(c)ar(Z()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(I.current=!0),Ai(G,F.portalNode)){const j=Yy()||y;j==null||j.focus()}else{var N;(N=F.afterOutsideRef.current)==null||N.focus()}}}))}const bu=new Set,e_=A.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Oo();return Ae(()=>{if(!r)return;bu.add(i);const s=/iP(hone|ad|od)|iOS/.test(Xc()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,f=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),s){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,g=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(g))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{bu.delete(i),bu.size===0&&(Object.assign(a,{overflow:"",[c]:""}),s&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[i,r]),A.createElement("div",ko({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function ev(e){return ut(e.target)&&e.target.tagName==="BUTTON"}function tv(e){return nu(e)}function wu(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=A.useRef(),f=A.useRef(!1),h=A.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(Ci(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent,"click"):(p.preventDefault(),r(!0,p.nativeEvent,"click"))))},onClick(p){const m=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}Ci(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){d.current=void 0,!(p.defaultPrevented||!u||ev(p))&&(p.key===" "&&!tv(i)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||ev(p)||tv(i)||p.key===" "&&f.current&&(f.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,l]);return A.useMemo(()=>s?{reference:h}:{},[s,h])}const t_={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},n_={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},nv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function Di(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:p}=t,m=cr(),g=Ct(typeof l=="function"?l:()=>!1),v=typeof l=="function"?g:l,w=A.useRef(!1),y=A.useRef(!1),{escapeKey:S,outsidePress:T}=nv(h),{escapeKey:E,outsidePress:P}=nv(p),D=Ct(C=>{var I;if(!n||!s||!a||C.key!=="Escape")return;const M=(I=i.current.floatingContext)==null?void 0:I.nodeId,L=m?Nr(m.nodesRef.current,M):[];if(!S&&(C.stopPropagation(),L.length>0)){let H=!0;if(L.forEach(Y=>{var k;if((k=Y.context)!=null&&k.open&&!Y.context.dataRef.current.__escapeKeyBubbles){H=!1;return}}),!H)return}r(!1,EI(C)?C.nativeEvent:C,"escape-key")}),_=Ct(C=>{var I;const M=()=>{var L;D(C),(L=Fn(C))==null||L.removeEventListener("keydown",M)};(I=Fn(C))==null||I.addEventListener("keydown",M)}),O=Ct(C=>{var I;const M=w.current;w.current=!1;const L=y.current;if(y.current=!1,c==="click"&&L||M||typeof v=="function"&&!v(C))return;const H=Fn(C),Y="["+ur("inert")+"]",k=vt(o.floating).querySelectorAll(Y);let R=je(H)?H:null;for(;R&&!rr(R);){const G=Nn(R);if(rr(G)||!je(G))break;R=G}if(k.length&&je(H)&&!CI(H)&&!dt(H,o.floating)&&Array.from(k).every(G=>!dt(R,G)))return;if(ut(H)&&$){const G=H.clientWidth>0&&H.scrollWidth>H.clientWidth,N=H.clientHeight>0&&H.scrollHeight>H.clientHeight;let j=N&&C.offsetX>H.clientWidth;if(N&&Ut(H).direction==="rtl"&&(j=C.offsetX<=H.offsetWidth-H.clientWidth),j||G&&C.offsetY>H.clientHeight)return}const Z=(I=i.current.floatingContext)==null?void 0:I.nodeId,oe=m&&Nr(m.nodesRef.current,Z).some(G=>{var N;return tu(C,(N=G.context)==null?void 0:N.elements.floating)});if(tu(C,o.floating)||tu(C,o.domReference)||oe)return;const J=m?Nr(m.nodesRef.current,Z):[];if(J.length>0){let G=!0;if(J.forEach(N=>{var j;if((j=N.context)!=null&&j.open&&!N.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,C,"outside-press")}),V=Ct(C=>{var I;const M=()=>{var L;O(C),(L=Fn(C))==null||L.removeEventListener(c,M)};(I=Fn(C))==null||I.addEventListener(c,M)});A.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=T;function C(L){r(!1,L,"ancestor-scroll")}const I=vt(o.floating);a&&I.addEventListener("keydown",E?_:D,E),v&&I.addEventListener(c,P?V:O,P);let M=[];return f&&(je(o.domReference)&&(M=or(o.domReference)),je(o.floating)&&(M=M.concat(or(o.floating))),!je(o.reference)&&o.reference&&o.reference.contextElement&&(M=M.concat(or(o.reference.contextElement)))),M=M.filter(L=>{var H;return L!==((H=I.defaultView)==null?void 0:H.visualViewport)}),M.forEach(L=>{L.addEventListener("scroll",C,{passive:!0})}),()=>{a&&I.removeEventListener("keydown",E?_:D,E),v&&I.removeEventListener(c,P?V:O,P),M.forEach(L=>{L.removeEventListener("scroll",C)})}},[i,o,a,v,c,n,r,f,s,S,T,D,E,_,O,P,V]),A.useEffect(()=>{w.current=!1},[v,c]);const F=A.useMemo(()=>({onKeyDown:D,[t_[d]]:C=>{u&&r(!1,C.nativeEvent,"reference-press")}}),[D,r,u,d]),$=A.useMemo(()=>({onKeyDown:D,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[n_[c]]:()=>{w.current=!0}}),[D,c]);return A.useMemo(()=>s?{reference:F,floating:$}:{},[s,F,$])}function r_(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Oo(),i=A.useRef({}),[s]=A.useState(()=>$y()),a=lr()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!je(h)&&RA("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=A.useState(r.reference),u=Ct((h,p,m)=>{i.current.openEvent=h?p:void 0,s.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),d=A.useMemo(()=>({setPositionReference:c}),[]),f=A.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return A.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function Mi(e){e===void 0&&(e={});const{nodeId:t}=e,n=r_({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=A.useState(null),[a,l]=A.useState(null),u=(o==null?void 0:o.reference)||i,d=A.useRef(null),f=cr();Ae(()=>{u&&(d.current=u)},[u]);const h=PA({...e,elements:{...o,...a&&{reference:a}}}),p=A.useCallback(y=>{const S=je(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(S),h.refs.setReference(S)},[h.refs]),m=A.useCallback(y=>{(je(y)||y===null)&&(d.current=y,s(y)),(je(h.refs.reference.current)||h.refs.reference.current===null||y!==null&&!je(y))&&h.refs.setReference(y)},[h.refs]),g=A.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),v=A.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),w=A.useMemo(()=>({...h,...r,refs:g,elements:v,nodeId:t}),[h,g,v,t,r]);return Ae(()=>{r.dataRef.current.floatingContext=w;const y=f==null?void 0:f.nodesRef.current.find(S=>S.id===t);y&&(y.context=w)}),A.useMemo(()=>({...h,context:w,refs:g,elements:v}),[h,g,v,w])}function o_(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=A.useRef(!1),u=A.useRef(),d=A.useRef(!0);A.useEffect(()=>{if(!a)return;const h=Bt(s.domReference);function p(){!n&&ut(s.domReference)&&s.domReference===nn(vt(s.domReference))&&(c.current=!0)}function m(){d.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[s.domReference,n,a]),A.useEffect(()=>{if(!a)return;function h(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,a]),A.useEffect(()=>()=>{clearTimeout(u.current)},[]);const f=A.useMemo(()=>({onPointerDown(h){Qc(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=Fn(h.nativeEvent);if(l&&je(p))try{if(Jc()&&ay())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!nu(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,g=je(p)&&p.hasAttribute(ur("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const w=nn(s.domReference?s.domReference.ownerDocument:document);!p&&w===s.domReference||dt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,w)||dt(s.domReference,w)||g||r(!1,m,"focus")})}}),[i,s.domReference,r,l]);return A.useMemo(()=>a?{reference:f}:{},[a,f])}const rv="active",ov="selected";function xu(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[rv]:s,[ov]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[rv,ov].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),s[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(g=>g(...p)).find(g=>g!==void 0)}}}else s[c]=u}),s),{})}}function Ni(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=A.useCallback(a=>xu(a,e,"reference"),t),i=A.useCallback(a=>xu(a,e,"floating"),n),s=A.useCallback(a=>xu(a,e,"item"),r);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}let iv=!1;function ha(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function sv(e,t){return ha(t,e===hu||e===ki,e===Co||e===Po)}function Tu(e,t,n){return ha(t,e===ki,n?e===Co:e===Po)||e==="Enter"||e===" "||e===""}function i_(e,t,n){return ha(t,n?e===Co:e===Po,e===ki)}function av(e,t,n){return ha(t,n?e===Po:e===Co,e===hu)}function lv(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:s,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:v=!0,disabledIndices:w=void 0,orientation:y="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:E,itemSizes:P,dense:D=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||la("`useListNavigation` looping must be enabled to allow escaping."),p||la("`useListNavigation` must be virtual to allow escaping.")),y==="vertical"&&S>1&&la("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const _=lr(),O=cr(),V=Ct(a),F=A.useRef(m),$=A.useRef(c??-1),C=A.useRef(null),I=A.useRef(!0),M=A.useRef(V),L=A.useRef(!!o.floating),H=A.useRef(n),Y=A.useRef(!1),k=A.useRef(!1),R=Pt(w),Z=Pt(n),oe=Pt(T),J=Pt(o.floating),G=Pt(c),[N,j]=A.useState(),[W,U]=A.useState(),z=Ct(function(de,Ee,ce){ce===void 0&&(ce=!1);function Oe(Ie){p?(j(Ie.id),O==null||O.events.emit("virtualfocus",Ie),E&&(E.current=Ie)):ar(Ie,{preventScroll:!0,sync:ay()&&Jc()?iv||Y.current:!1})}const ht=de.current[Ee.current];ht&&Oe(ht),requestAnimationFrame(()=>{const Ie=de.current[Ee.current]||ht;if(!Ie)return;ht||Oe(Ie);const pt=oe.current;pt&&B&&(ce||!I.current)&&(Ie.scrollIntoView==null||Ie.scrollIntoView(typeof pt=="boolean"?{block:"nearest",inline:"nearest"}:pt))})});Ae(()=>{document.createElement("div").focus({get preventScroll(){return iv=!0,!1}})},[]),Ae(()=>{l&&(n&&o.floating?F.current&&c!=null&&(k.current=!0,$.current=c,V(c)):L.current&&($.current=-1,M.current(null)))},[l,n,o.floating,c,V]),Ae(()=>{if(l&&n&&o.floating)if(s==null){if(Y.current=!1,G.current!=null)return;if(L.current&&($.current=-1,z(i,$)),(!H.current||!L.current)&&F.current&&(C.current!=null||F.current===!0&&C.current==null)){let de=0;const Ee=()=>{i.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(Ee),de++):($.current=C.current==null||Tu(C.current,y,h)||f?pu(i,R.current):_y(i,R.current),C.current=null,V($.current))};Ee()}}else Oi(i,s)||($.current=s,z(i,$,k.current),k.current=!1)},[l,n,o.floating,s,G,f,i,y,h,V,z,R]),Ae(()=>{var de;if(!l||o.floating||!O||p||!L.current)return;const Ee=O.nodesRef.current,ce=(de=Ee.find(Ie=>Ie.id===_))==null||(de=de.context)==null?void 0:de.elements.floating,Oe=nn(vt(o.floating)),ht=Ee.some(Ie=>Ie.context&&dt(Ie.context.elements.floating,Oe));ce&&!ht&&I.current&&ce.focus({preventScroll:!0})},[l,o.floating,O,_,p]),Ae(()=>{if(!l||!O||!p||_)return;function de(Ee){U(Ee.id),E&&(E.current=Ee)}return O.events.on("virtualfocus",de),()=>{O.events.off("virtualfocus",de)}},[l,O,p,_,E]),Ae(()=>{M.current=V,L.current=!!o.floating}),Ae(()=>{n||(C.current=null)},[n]),Ae(()=>{H.current=n},[n]);const te=s!=null,B=A.useMemo(()=>{function de(ce){if(!n)return;const Oe=i.current.indexOf(ce);Oe!==-1&&V(Oe)}return{onFocus(ce){let{currentTarget:Oe}=ce;de(Oe)},onClick:ce=>{let{currentTarget:Oe}=ce;return Oe.focus({preventScroll:!0})},...g&&{onMouseMove(ce){let{currentTarget:Oe}=ce;de(Oe)},onPointerLeave(ce){let{pointerType:Oe}=ce;!I.current||Oe==="touch"||($.current=-1,z(i,$),V(null),p||ar(J.current,{preventScroll:!0}))}}}},[n,J,z,g,i,V,p]),Pe=Ct(de=>{if(I.current=!1,Y.current=!0,!Z.current&&de.currentTarget===J.current)return;if(f&&av(de.key,y,h)){Et(de),r(!1,de.nativeEvent,"list-navigation"),ut(o.domReference)&&!p&&o.domReference.focus();return}const Ee=$.current,ce=pu(i,w),Oe=_y(i,w);if(de.key==="Home"&&(Et(de),$.current=ce,V($.current)),de.key==="End"&&(Et(de),$.current=Oe,V($.current)),S>1){const ht=P||Array.from({length:i.current.length},()=>({width:1,height:1})),Ie=_A(ht,S,D),pt=Ie.findIndex(ae=>ae!=null&&!aa(i.current,ae,w)),Q=Ie.reduce((ae,_e,Ke)=>_e!=null&&!aa(i.current,_e,w)?Ke:ae,-1);if($.current=Ie[AA({current:Ie.map(ae=>ae!=null?i.current[ae]:null)},{event:de,orientation:y,loop:d,cols:S,disabledIndices:MA([...w||i.current.map((ae,_e)=>aa(i.current,_e)?_e:void 0),void 0],Ie),minIndex:pt,maxIndex:Q,prevIndex:DA($.current>Oe?ce:$.current,ht,Ie,S,de.key===ki?"bl":de.key===Po?"tr":"tl"),stopEvent:!0})],V($.current),y==="both")return}if(sv(de.key,y)){if(Et(de),n&&!p&&nn(de.currentTarget.ownerDocument)===de.currentTarget){$.current=Tu(de.key,y,h)?ce:Oe,V($.current);return}Tu(de.key,y,h)?d?$.current=Ee>=Oe?u&&Ee!==i.current.length?-1:ce:_t(i,{startingIndex:Ee,disabledIndices:w}):$.current=Math.min(Oe,_t(i,{startingIndex:Ee,disabledIndices:w})):d?$.current=Ee<=ce?u&&Ee!==-1?i.current.length:Oe:_t(i,{startingIndex:Ee,decrement:!0,disabledIndices:w}):$.current=Math.max(ce,_t(i,{startingIndex:Ee,decrement:!0,disabledIndices:w})),Oi(i,$.current)?V(null):V($.current)}}),ot=A.useMemo(()=>p&&n&&te&&{"aria-activedescendant":W||N},[p,n,te,W,N]),He=A.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...!ly(o.domReference)&&ot,onKeyDown:Pe,onPointerMove(){I.current=!0}}),[ot,Pe,o.domReference,y]),it=A.useMemo(()=>{function de(ce){m==="auto"&&sy(ce.nativeEvent)&&(F.current=!0)}function Ee(ce){F.current=m,m==="auto"&&Qc(ce.nativeEvent)&&(F.current=!0)}return{...ot,onKeyDown(ce){I.current=!1;const Oe=ce.key.indexOf("Arrow")===0,ht=i_(ce.key,y,h),Ie=av(ce.key,y,h),pt=sv(ce.key,y),Q=(f?ht:pt)||ce.key==="Enter"||ce.key.trim()==="";if(p&&n){const kt=O==null?void 0:O.nodesRef.current.find(Vt=>Vt.parentId==null),Nt=O&&kt?HA(O.nodesRef.current,kt.id):null;if(Oe&&Nt&&E){const Vt=new KeyboardEvent("keydown",{key:ce.key,bubbles:!0});if(ht||Ie){var ae,_e;const Gr=((ae=Nt.context)==null?void 0:ae.elements.domReference)===ce.currentTarget,qo=Ie&&!Gr?(_e=Nt.context)==null?void 0:_e.elements.domReference:ht?i.current.find(Ko=>(Ko==null?void 0:Ko.id)===N):null;qo&&(Et(ce),qo.dispatchEvent(Vt),U(void 0))}if(pt&&Nt.context&&Nt.context.open&&Nt.parentId&&ce.currentTarget!==Nt.context.elements.domReference){var Ke;Et(ce),(Ke=Nt.context.elements.domReference)==null||Ke.dispatchEvent(Vt);return}}return Pe(ce)}if(!(!n&&!v&&Oe)){if(Q&&(C.current=f&&pt?null:ce.key),f){ht&&(Et(ce),n?($.current=pu(i,R.current),V($.current)):r(!0,ce.nativeEvent,"list-navigation"));return}pt&&(c!=null&&($.current=c),Et(ce),!n&&v?r(!0,ce.nativeEvent,"list-navigation"):Pe(ce),n&&V($.current))}},onFocus(){n&&!p&&V(null)},onPointerDown:Ee,onMouseDown:de,onClick:de}},[N,ot,Pe,R,m,i,f,V,r,n,v,y,h,c,O,p,E]);return A.useMemo(()=>l?{reference:it,floating:He,item:B}:{},[l,it,He,B])}const s_=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Fi(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(n=s_.get(s))!=null?n:s,l=Oo(),u=lr()!=null,d=A.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,s]),f=A.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,s]),h=A.useCallback(p=>{let{active:m,selected:g}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(s){case"select":return{...v,"aria-selected":m&&g};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,s]);return A.useMemo(()=>i?{reference:d,floating:f,item:h}:{},[i,d,f,h])}const cv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function _o(e,t){return typeof e=="function"?e(t):e}function a_(e,t){const[n,r]=A.useState(e);return e&&!n&&r(!0),A.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function l_(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,l]=A.useState("unmounted"),c=a_(n,s);return!c&&a==="close"&&l("unmounted"),Ae(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function c_(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,l=a.split("-")[0],c=A.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",d=(u?s:s.open)||0,f=(u?s:s.close)||0,[h,p]=A.useState(()=>({..._o(i,c),..._o(n,c)})),{isMounted:m,status:g}=l_(e,{duration:s}),v=Pt(n),w=Pt(r),y=Pt(o),S=Pt(i);return Ae(()=>{const T=_o(v.current,c),E=_o(y.current,c),P=_o(S.current,c),D=_o(w.current,c)||Object.keys(T).reduce((_,O)=>(_[O]="",_),{});if(g==="initial"&&p(_=>({transitionProperty:_.transitionProperty,...P,...T})),g==="open"&&p({transitionProperty:Object.keys(D).map(cv).join(","),transitionDuration:d+"ms",...P,...D}),g==="close"){const _=E||T;p({transitionProperty:Object.keys(_).map(cv).join(","),transitionDuration:f+"ms",...P,..._})}},[f,y,v,w,S,d,g,c]),{isMounted:m,styles:h}}function u_(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:h=null}=t,p=A.useRef(),m=A.useRef(""),g=A.useRef((n=h??s)!=null?n:-1),v=A.useRef(null),w=Ct(a),y=Ct(l),S=Pt(u),T=Pt(f);Ae(()=>{r&&(clearTimeout(p.current),v.current=null,m.current="")},[r]),Ae(()=>{if(r&&m.current===""){var O;g.current=(O=h??s)!=null?O:-1}},[r,h,s]);const E=Ct(O=>{O?o.current.typing||(o.current.typing=O,y(O)):o.current.typing&&(o.current.typing=O,y(O))}),P=Ct(O=>{function V(M,L,H){const Y=S.current?S.current(L,H):L.find(k=>(k==null?void 0:k.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return Y?M.indexOf(Y):-1}const F=i.current;if(m.current.length>0&&m.current[0]!==" "&&(V(F,F,m.current)===-1?E(!1):O.key===" "&&Et(O)),F==null||T.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(Et(O),E(!0)),F.every(M=>{var L,H;return M?((L=M[0])==null?void 0:L.toLocaleLowerCase())!==((H=M[1])==null?void 0:H.toLocaleLowerCase()):!0})&&m.current===O.key&&(m.current="",g.current=v.current),m.current+=O.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",g.current=v.current,E(!1)},d);const C=g.current,I=V(F,[...F.slice((C||0)+1),...F.slice(0,(C||0)+1)],m.current);I!==-1?(w(I),v.current=I):O.key!==" "&&(m.current="",E(!1))}),D=A.useMemo(()=>({onKeyDown:P}),[P]),_=A.useMemo(()=>({onKeyDown:P,onKeyUp(O){O.key===" "&&E(!1)}}),[P,E]);return A.useMemo(()=>c?{reference:D,floating:_}:{},[c,D,_])}function uv(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function d_(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function f_(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,s=null,a=null,l=performance.now();function c(d,f){const h=performance.now(),p=h-l;if(s===null||a===null||p===0)return s=d,a=f,l=h,null;const m=d-s,g=f-a,w=Math.sqrt(m*m+g*g)/p;return s=d,a=f,l=h,w}const u=d=>{let{x:f,y:h,placement:p,elements:m,onClose:g,nodeId:v,tree:w}=d;return function(S){function T(){clearTimeout(o),g()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||f==null||h==null)return;const{clientX:E,clientY:P}=S,D=[E,P],_=Fn(S),O=S.type==="mouseleave",V=dt(m.floating,_),F=dt(m.domReference,_),$=m.domReference.getBoundingClientRect(),C=m.floating.getBoundingClientRect(),I=p.split("-")[0],M=f>C.right-C.width/2,L=h>C.bottom-C.height/2,H=d_(D,$),Y=C.width>$.width,k=C.height>$.height,R=(Y?$:C).left,Z=(Y?$:C).right,oe=(k?$:C).top,J=(k?$:C).bottom;if(V&&(i=!0,!O))return;if(F&&(i=!1),F&&!O){i=!0;return}if(O&&je(S.relatedTarget)&&dt(m.floating,S.relatedTarget)||w&&Nr(w.nodesRef.current,v).some(j=>{let{context:W}=j;return W==null?void 0:W.open}))return;if(I==="top"&&h>=$.bottom-1||I==="bottom"&&h<=$.top+1||I==="left"&&f>=$.right-1||I==="right"&&f<=$.left+1)return T();let G=[];switch(I){case"top":G=[[R,$.top+1],[R,C.bottom-1],[Z,C.bottom-1],[Z,$.top+1]];break;case"bottom":G=[[R,C.top+1],[R,$.bottom-1],[Z,$.bottom-1],[Z,C.top+1]];break;case"left":G=[[C.right-1,J],[C.right-1,oe],[$.left+1,oe],[$.left+1,J]];break;case"right":G=[[$.right-1,J],[$.right-1,oe],[C.left+1,oe],[C.left+1,J]];break}function N(j){let[W,U]=j;switch(I){case"top":{const z=[Y?W+t/2:M?W+t*4:W-t*4,U+t+1],te=[Y?W-t/2:M?W+t*4:W-t*4,U+t+1],B=[[C.left,M||Y?C.bottom-t:C.top],[C.right,M?Y?C.bottom-t:C.top:C.bottom-t]];return[z,te,...B]}case"bottom":{const z=[Y?W+t/2:M?W+t*4:W-t*4,U-t],te=[Y?W-t/2:M?W+t*4:W-t*4,U-t],B=[[C.left,M||Y?C.top+t:C.bottom],[C.right,M?Y?C.top+t:C.bottom:C.top+t]];return[z,te,...B]}case"left":{const z=[W+t+1,k?U+t/2:L?U+t*4:U-t*4],te=[W+t+1,k?U-t/2:L?U+t*4:U-t*4];return[...[[L||k?C.right-t:C.left,C.top],[L?k?C.right-t:C.left:C.right-t,C.bottom]],z,te]}case"right":{const z=[W-t,k?U+t/2:L?U+t*4:U-t*4],te=[W-t,k?U-t/2:L?U+t*4:U-t*4],B=[[L||k?C.left+t:C.right,C.top],[L?k?C.left+t:C.right:C.left+t,C.bottom]];return[z,te,...B]}}}if(!uv([E,P],G)){if(i&&!H)return T();if(!O&&r){const j=c(S.clientX,S.clientY);if(j!==null&&j<.1)return T()}uv([E,P],N([f,h]))?!i&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}function h_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function p_(...e){return t=>e.forEach(n=>h_(n,t))}var dv=A.forwardRef((e,t)=>{const{children:n,...r}=e,o=A.Children.toArray(n),i=o.find(g_);if(i){const s=i.props.children,a=o.map(l=>l===i?A.Children.count(s)>1?A.Children.only(null):A.isValidElement(s)?s.props.children:null:l);return x.jsx(Su,{...r,ref:t,children:A.isValidElement(s)?A.cloneElement(s,void 0,a):null})}return x.jsx(Su,{...r,ref:t,children:n})});dv.displayName="Slot";var Su=A.forwardRef((e,t)=>{const{children:n,...r}=e;if(A.isValidElement(n)){const o=v_(n);return A.cloneElement(n,{...y_(r,n.props),ref:t?p_(t,o):o})}return A.Children.count(n)>1?A.Children.only(null):null});Su.displayName="SlotClone";var m_=({children:e})=>x.jsx(x.Fragment,{children:e});function g_(e){return A.isValidElement(e)&&e.type===m_}function y_(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function v_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const pa=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),fv=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),hv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},pv=(e,t)=>{const n=fv(t,hv.basic,e)||fv(t,hv.extend,e);return n===void 0||n===e?void 0:n},ma=()=>typeof window>"u",Eu=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),b_=(e,t)=>ma()?t:window.matchMedia(e).matches,w_=(e,t=!0)=>{const[n,r]=b.useState(t);return b.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(b_(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},Ln="600ms",mv=e=>({initial:{[e]:"-60%",opacity:.8,animationDuration:Ln},enter:{[e]:0,opacity:1,animationDuration:Ln},exit:{[e]:["-50%","-90%"],opacity:0,animationDuration:Ln}}),x_=mv("left"),T_=mv("right"),Cu={drawer:e=>e==="left"?x_:T_,sheet:{initial:{opacity:.5,scaleY:.5,animationDuration:Ln,originY:"bottom"},enter:{opacity:1,scaleY:1,animationDuration:Ln,originY:"bottom"},exit:{opacity:.1,scaleY:.5,animationDuration:Ln,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:Ln},enter:{opacity:1,scale:[1.05,1],animationDuration:Ln},exit:{opacity:0,scale:.97,animationDuration:Ln}}},S_=as("isolate relative ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] w-auto h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] container h-min rounded-lg py-8",sheet:"w-full absolute bottom-0 h-[85vh] max-h-[85vh] max-h-[85svh] pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),E_={top:0,left:0,right:0,bottom:-1},C_=e=>e*.62,P_=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+d))}const i=e.parent.current.getBoundingClientRect(),s=e.value.get()||i.height,a=Math.abs(s-r.delta.y),l=C_(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return x.jsx(Ht.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:E_,whileDrag:{cursor:"grabbing"},className:Xe("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?x.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Pu={drawer:"right",sheet:"none",dialog:"none"},gv=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,...o})=>{const i=b.useId(),s=b.useId(),a=w_("(min-width: 48rem)"),l=e==="drawer"||(r?!1:!a),c=a?e==="drawer"?o.position:Pu[e]:r?Pu[e]:Pu.sheet,u=a||r?Cu[e]:Cu.sheet,d=typeof u=="function"?u(c):u,f=a||r?e:"sheet",{refs:h,context:p}=Mi({open:o.open,onOpenChange:o.onChange}),m=wu(p),g=Fi(p),v=Di(p,{escapeKey:!0,referencePress:!0,outsidePress:!1}),{getReferenceProps:w,getFloatingProps:y}=Ni([m,g,v]),S=o.trigger,T=Or(void 0),E=()=>o.onChange(!1);return x.jsxs(b.Fragment,{children:[o.trigger?x.jsx(b.Fragment,{children:o.asChild?x.jsx(dv,{ref:h.setReference,...w(),children:S}):x.jsx("button",{ref:h.setReference,...w(),type:"button",children:S})}):null,x.jsx(_i,{children:x.jsx(Bs,{presenceAffectsLayout:!0,children:o.open&&x.jsx(e_,{lockScroll:!0,onClick:n?E:void 0,className:`relative z-floating h-[100dvh] !overflow-clip bg-floating-overlay/70 ${f==="drawer"?"":"grid justify-center p-8"}`,children:x.jsx(fa,{modal:!0,closeOnFocusOut:!0,context:p,children:x.jsxs(Ht.div,{animate:"enter","aria-describedby":s,"aria-labelledby":i,className:S_({position:c,type:f}),exit:"exit",initial:"initial",ref:h.setFloating,variants:d,style:a?{width:T}:{height:T},...y(),children:[o.closable!==!1?x.jsx("nav",{className:"absolute top-2 right-2 lg:-top-1 lg:right-8",children:x.jsx("button",{type:"button",onClick:E,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(ng,{})})}):null,l&&t?x.jsx(P_,{onChange:o.onChange,sheet:!a,value:T,parent:h.floating,position:c}):null,o.title?x.jsx("header",{className:"relative w-full",children:o.title?x.jsx("h2",{className:"border-b border-floating-border px-8 pb-4 text-3xl font-medium leading-relaxed",children:o.title}):null}):null,x.jsx("section",{className:"flex-1 overflow-y-auto px-8",children:o.children}),o.footer?x.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:o.footer}):null]})})})})})]})},yv=b.createContext(""),k_=e=>{var o;const[t,n]=b.useState(!1),r=e.items.find(i=>i.props.id===e.active);return x.jsxs("div",{className:"my-4 px-8 flex min-w-full text-center lg:hidden",children:[x.jsx(xr,{className:"min-w-full",onClick:()=>n(!0),children:(o=r==null?void 0:r.props)==null?void 0:o.title}),x.jsx(gv,{closable:!0,forceType:!0,onChange:n,open:t,type:"dialog",children:x.jsx("ul",{className:"mt-4 space-y-4",children:e.items.map(i=>{const s=i.props,a=()=>{e.setActive(s.id),n(!1)};return x.jsx("li",{className:"min-w-full",children:x.jsx(xr,{className:"w-full",onClick:a,theme:s.id===e.active?"primary":"secondary",children:s.title})},s.id)})})})]})},O_=e=>{const[t,n]=ny(e.active),r=Or(0),o=Or(0),i=b.useRef(null),s=e.useHash?"a":"button";b.useEffect(()=>{const c=i.current;if(c===null)return;const u=p=>{if(!p)return;const m=p.getBoundingClientRect();o.set(m.width),r.set(p.offsetLeft)},d=()=>{const p=c.querySelector("li[data-active=true]");return void u(p)};window.addEventListener("resize",d);let f=c.querySelector("li[data-active=true]");const h=window.location.hash.replace(/^#/,"");if(e.active===""&&h!==""&&(f=c.querySelector(`li[data-id=${h}]`),n(h)),f===null){f=c.querySelector("li[data-id]");const p=f.getAttribute("data-id")||"";n(p)}return u(f),()=>window.removeEventListener("resize",d)},[]),b.useEffect(()=>{e.onChange&&e.onChange(t)},[e.onChange,t]);const a=b.Children.toArray(e.children),l=c=>{const u=c.currentTarget,d=u.getBoundingClientRect();o.set(d.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return x.jsx(yv.Provider,{value:t,children:x.jsx(ty,{container:"pt-0",className:e.className,header:x.jsxs("header",{ref:i,className:"relative mb-2 border-b border-card-border",children:[x.jsx(Ht.div,{layout:!0,initial:!1,"aria-hidden":"true",style:{left:r,width:o},transition:{type:"tween",left:r,width:o},className:"duration-300 absolute bottom-0 hidden h-0.5 w-28 bg-primary transition-all lg:block"}),x.jsxs("nav",{children:[x.jsx(k_,{setActive:n,items:a,active:t}),x.jsx("ul",{className:"hidden justify-between divide-x divide-card-border overflow-x-auto md:justify-start lg:flex",children:a.map(c=>{const u=c.props;return x.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"w-full data-[active=true]:text-primary md:w-auto",children:x.jsx(s,{"data-id":u.id,onClick:l,"aria-current":"page",className:"block w-full whitespace-nowrap px-10 py-4 font-medium",href:e.useHash?`#${u.id}`:void 0,children:u.title})},`tab-header-${u.id}`)})})]})]}),children:e.children})})},I_=()=>b.useContext(yv),A_=e=>{const t=I_();return x.jsx(b.Fragment,{children:e.id===t?e.children:null})},Do=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),i=b.useMemo(()=>[ia(10),fu({fallbackAxisSideDirection:"end"}),du(),Oy({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:l}=Mi({open:n,middleware:i,transform:!0,whileElementsMounted:na,onOpenChange:(p,m)=>{var v;const g=m==null?void 0:m.relatedTarget;g&&g.dataset.floating==="true"&&!p||(r(p),(v=e.onChange)==null||v.call(e,p))}}),c=wu(l),u=Di(l),d=Fi(l),{getReferenceProps:f,getFloatingProps:h}=Ni([c,u,d]);return x.jsxs(b.Fragment,{children:[x.jsx("button",{ref:s.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(_i,{id:`${t}-portal`,children:x.jsx(fa,{restoreFocus:e.restoreFocus??!0,returnFocus:e.restoreFocus??!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:x.jsxs("div",{className:"bg-floating-background relative min-w-96 isolate z-floating border shadow-2xl p-6 border-floating-border rounded-lg",ref:s.setFloating,style:a,"aria-labelledby":t,...h(),children:[x.jsx(Vy,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),x.jsx("header",{className:"mb-2",children:x.jsx("h3",{className:"leading-snug font-medium text-2xl tracking-wide text-left",children:e.title})}),e.children]})})})]})},vv=({children:e,as:t,title:n,...r})=>{const[o,i]=b.useState(!1),s=b.useRef(null),a=t||"span",{refs:l,floatingStyles:c,context:u}=Mi({open:o,onOpenChange:i,whileElementsMounted:na,transform:!0,middleware:[ia(5),fu({fallbackAxisSideDirection:"start"}),du(),Oy({element:s,padding:5})]}),d=zy(u,{move:!0}),f=o_(u),h=Di(u),p=Fi(u,{role:"tooltip"}),{getReferenceProps:m,getFloatingProps:g}=Ni([d,f,h,p]);return x.jsxs(b.Fragment,{children:[x.jsx(a,{ref:l.setReference,...m(r),children:n}),x.jsx(_i,{children:o&&x.jsxs(no,{...g(),ref:l.setFloating,style:c,className:"bg-tooltip-background z-tooltip text-tooltip-foreground border border-tooltip-border p-3 rounded-lg",children:[x.jsx(Vy,{ref:s,context:u,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class ga{static getDescendantProperty(t,n,r=[]){let o,i,s,a,l,c;if(n){if(s=n.indexOf("."),s===-1?o=n:(o=n.slice(0,s),i=n.slice(s+1)),a=t[o],a!==null&&typeof a<"u")if(!i&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)ga.getDescendantProperty(a[l],i,r);else i&&ga.getDescendantProperty(a,i,r)}else r.push(t);return r}}class Mo{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const i=Mo.isMatch(o,t,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const s=ga.getDescendantProperty(o,this.keys[i]);let a=!1;for(let l=0;l<s.length;l++){const c=Mo.isMatch(s[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Mo.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return Mo.indexesOfFirstLetter(t,n).forEach((s,a)=>{let l=s+1;o[a]=[s];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(s=>s!==!1),o.length?o.sort((s,a)=>s.length===1?s[0]-a[0]:(s=s[s.length-1]-s[0],a=a[a.length-1]-a[0],s-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}const bv=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},ku={inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>x.jsxs(b.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]})},wv=b.createContext({translations:ku}),__=e=>{const t=b.useMemo(()=>({translations:{...ku,...e.map}}),[e.map]);return x.jsx(wv.Provider,{value:t,children:e.children})},Qt=()=>{const e=b.useContext(wv);return e?e.translations:ku},xv=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>x.jsxs("div",{className:Xe("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:x.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-error:text-danger",children:[i,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(vv,{title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(tg,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:r}):null,e?x.jsxs(b.Fragment,{children:[x.jsx(eg,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),x.jsx(CP,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),o]}),ya=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:h,title:p,placeholder:m,hideLeft:g,required:v})=>{const w=d??h,y=Qt(),S=e??y.inputOptionalLabel;return x.jsxs("fieldset",{form:u,"data-error":!!c,"data-interactive":!!i,className:Xe("group inline-flex w-full gap-1.5",r),children:[x.jsxs("label",{form:u,htmlFor:w,className:"inline-flex w-full cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-hover:border-primary group-error:text-danger",children:[!g&&!n?x.jsx(xv,{info:a,hideLeft:g,reportStatus:!0,title:p,placeholder:m,children:S||n?x.jsxs(b.Fragment,{children:[v?null:x.jsx("span",{className:"text-opacity-70",children:S}),n?x.jsx(b.Fragment,{children:n}):null]}):null}):null,x.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-focus-within:border-primary group-hover:border-primary group-error:border-danger ${f} focus:ring-2 focus:ring-inset focus:ring-primary`,children:[t?x.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,s?x.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:s}):null]})]}),x.jsx("p",{className:"hidden text-xs empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:block group-error:block group-error:text-danger",children:c}),x.jsx("p",{className:"text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})},Tv=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},i)=>x.jsx("li",{...o,ref:i,role:"option","aria-selected":e,className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("button",{type:"button","data-value":r.value,onClick:n,"aria-selected":e,className:`w-full cursor-pointer p-2 text-left ${e?"bg-primary text-primary-foreground":""} ${t?"bg-primary-subtle text-primary-foreground":""}`,children:r.label??r.value})})),D_={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},M_={caseSensitive:!1,sort:!1},N_=[],F_=b.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,interactive:o,rightLabel:i,optionalText:s,container:a,hideLeft:l=!1,right:c,left:u,error:d,required:f=!1,...h},p)=>{const m=Qt(),g=b.useRef(null),[v,w]=b.useState(!1),[y,S]=b.useState(""),[T,E]=b.useState(h.value??h.defaultValue??""),[P,D]=b.useState(h.value??h.defaultValue??""),[_,O]=b.useState(null),V=b.useRef(N_),F=bv(_),$=t&&y!==""?[{value:y,label:y,"data-dynamic":"true"},...e]:e,C=new Mo($,["value","label"],M_).search(y),I=t?void 0:`^(${e.map(z=>`${Eu(z.value)}${z.label?"|"+Eu(z.label):""}`).join("|")})$`;b.useEffect(()=>{const z=Y.reference.current;if(z)return vs(z)},[]),b.useEffect(()=>{if(h.value){const z=e.find(te=>te.value===h.value);E((z==null?void 0:z.label)??h.value)}},[h.value]);const{x:M,y:L,strategy:H,refs:Y,context:k}=Mi({open:v,transform:!0,onOpenChange:w,whileElementsMounted:na,middleware:[ia(4),OA({padding:10,apply(z){Object.assign(z.elements.floating.style,{width:`${z.rects.reference.width}px`,maxHeight:`${Math.min(480,z.availableHeight)}px`})}})]}),R=c_(k,D_),{getReferenceProps:Z,getFloatingProps:oe,getItemProps:J}=Ni([Fi(k,{role:"listbox"}),Di(k),lv(k,{listRef:V,loop:!0,activeIndex:_,allowEscape:!0,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:_,virtual:!0,onNavigate:z=>{const te=C.length-1;if(z===null&&F===0)return O(te);if(z===null&&F===te)return O(0);const B=z??F??null;return B===null?void 0:O(B)}})]),G=z=>{var B,Pe;E(z.value),(B=Y.reference.current)==null||B.setAttribute("data-value",z.value),D(z.label??"");const te=ys(g.current,z.value);te&&((Pe=h.onChange)==null||Pe.call(h,te)),w(!1),S("")},N=z=>{var B;const te=z.target.value;return S(te),!v&&te===""?w(!0):(z.target.name=h.name||"",te?w(!0):(B=h.onChange)==null?void 0:B.call(h,z))},j=()=>{w(!0),S("")},W=()=>{var z;S(""),E(""),(z=Y.reference.current)==null||z.setAttribute("data-value",""),D(""),ys(Y.reference.current),w(!1)},U=h.id||h.name;return x.jsxs(ya,{...h,container:Xe("group inline-block w-full",a),error:d,feedback:n,form:h.form,hideLeft:l,id:h.name||h.id,interactive:o,labelClassName:r,left:u,name:h.name,optionalText:s,placeholder:h.placeholder,required:!0,rightLabel:i,title:h.title,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",children:[x.jsx(Jm,{size:20}),x.jsx("span",{className:"sr-only",children:m.inputCaretDown})]}),T?x.jsx("button",{type:"button",onClick:W,className:"transition-colors link:text-danger",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("input",{...Z({...h,onChange:N,onFocus:j,pattern:I,ref:Y.setReference,name:`${U}-shadow`,id:`${U}-shadow`,onClick:z=>z.currentTarget.focus(),onKeyDown(z){if(z.key==="Escape")return z.currentTarget.blur(),w(!1);if(z.key==="Enter"){if(_!==null&&C[_])return z.preventDefault(),G(C[_]);if(C.length===1)return z.preventDefault(),G(C[0])}}}),"data-value":T,"data-error":!!d,"data-name":U,"data-target":U,required:f,value:v?y:P||T,"aria-autocomplete":"list",autoComplete:"off",className:Xe("input placeholder-input-mask group h-10 py-1 px-2 w-full flex-1 rounded-md bg-transparent text-base text-foreground outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",c||y?"pe-12":"",u?"ps-8":"",h.className)}),x.jsx("input",{id:U,name:U,type:"hidden","data-origin":U,ref:p,required:f,defaultValue:h.value||T||void 0}),x.jsx(_i,{preserveTabOrder:!0,children:v?x.jsx(fa,{guards:!0,returnFocus:!1,context:k,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsx("ul",{...oe({ref:Y.setFloating,style:{position:H,left:M??0,top:L??0,...R.styles}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overflow-auto overflow-y-auto rounded-b-lg rounded-t-lg bg-floating-background p-0 text-foreground shadow-floating",children:C.map((z,te)=>b.createElement(Tv,{...J({onClick:()=>G(z),ref:B=>void(V.current[te]=B),selected:_===te,active:T===z.value}),key:`${z.value}-option`,option:z,selected:_===te,active:T===z.value}))})}):null})]})}),Sv=b.forwardRef(({children:e,error:t,className:n="",size:r,container:o,...i},s)=>x.jsxs("label",{"data-disabled":i.disabled,"aria-disabled":i.disabled,className:Xe("group flex flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed w-fit",o),children:[x.jsx("input",{...i,ref:s,type:"checkbox",className:Xe("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",n)}),e,x.jsx("span",{className:"min-w-full flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:t})]})),Li=b.forwardRef(({type:e="text",feedback:t=null,info:n,labelClassName:r,next:o,interactive:i,rightLabel:s,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,...h},p)=>{const m=h.id??h.name,g=b.useRef(null);return b.useEffect(()=>{if(g.current===null)return;const v=g.current,w=vs(g.current),y=S=>{const T=S;if(T.key==="Enter"&&v.enterKeyHint==="next"){const E=v.getAttribute("data-next");if(E){const P=document.getElementById(E);if(P)return P.focus(),void T.preventDefault()}}};return v.addEventListener("keydown",y),()=>{w(),v.removeEventListener("keydown",y)}},[]),x.jsx(ya,{info:n,container:Xe("group inline-block w-full",l),error:f,feedback:t,hideLeft:c,left:d,optionalText:a,right:u,rightLabel:s,interactive:i,form:h.form,id:h.name||h.id,name:h.name,labelClassName:r,title:h.title,placeholder:h.placeholder,required:h.required,children:x.jsx($g,{...h,type:e,"data-next":o,ref:Ol(p,g),id:m,name:m,className:Xe("input placeholder-input-mask group h-10 py-1 px-2 w-full flex-1 rounded-md bg-transparent text-foreground outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",u?"pe-4":"",d?"ps-4":"",h.className)})})}),Ev=new Date(1970,11,31),Ou={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Cv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},L_={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},V_=b.forwardRef(({date:e,locale:t,disabledDate:n,autoFocusToday:r,onChange:o,markToday:i,...s},a)=>{const l=b.useId(),c=Qt(),u=b.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[d,f]=b.useState(e||void 0),[h,p]=b.useState(!1),m=u.formatToParts(Ev).flatMap(E=>Pn.keyof(Ou,E.type)?Ou[E.type](E.value):[]),g=u.formatToParts(Ev).reduce((E,P)=>E+(Pn.keyof(Cv,P.type)?Cv[P.type](P.value):""),""),[v,w]=b.useState(d?u.formatToParts(d).reduce((E,P)=>E+(Pn.keyof(Ou,P.type)?L_[P.type](d,P.value):""),""):""),y=E=>{const P=E.target.value;if(w(P),m.length===P.length&&m.every((_,O)=>{const V=P.charAt(O);return typeof _=="string"?V===_:_.test(V)})){const _=yo(NO(P,g,new Date));return f(_),o==null?void 0:o(_)}return f(void 0),o==null?void 0:o(void 0)},S=E=>(f(E),o==null||o(E),w(E?Vk(E,g):"")),T=d==null?void 0:d.toISOString();return x.jsx(Li,{...s,mask:m,value:v,"data-value":T,"data-target":s.name,className:"uppercase",formNoValidate:!h,placeholder:g,onChange:y,required:s.required??!0,error:h?void 0:s.error,name:void 0,id:void 0,right:x.jsxs(b.Fragment,{children:[x.jsx("input",{"data-origin":s.name,hidden:!0,type:"date",id:s.name,ref:a,name:s.name,defaultValue:T}),x.jsx(Do,{open:h,restoreFocus:!0,onChange:p,trigger:x.jsxs("span",{"aria-labelledby":l,children:[x.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),x.jsx(TP,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(ey,{...s,locale:t,date:d,onChange:S,markToday:i,disabledDate:n,autoFocusToday:r})})]})})}),$_=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],R_=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],j_=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],B_=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Pv=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function kv(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?B_:j_:t.binary?R_:$_,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const u=Pv(e,t.locale,s);return i+u+r+n[0]}const a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**a,s||(e=e.toPrecision(3));const l=Pv(Number(e),t.locale,s),c=n[a];return i+l+r+c}var Iu={exports:{}},va={exports:{}},Fe={};/** @license React v16.13.1
173
173
  * react-is.production.min.js
174
174
  *
175
175
  * Copyright (c) Facebook, Inc. and its affiliates.
176
176
  *
177
177
  * This source code is licensed under the MIT license found in the
178
178
  * LICENSE file in the root directory of this source tree.
179
- */var Cv;function UA(){if(Cv)return Fe;Cv=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function g(T){if(typeof T=="object"&&T!==null){var E=T.$$typeof;switch(E){case t:switch(T=T.type,T){case l:case c:case r:case s:case o:case d:return T;default:switch(T=T&&T.$$typeof,T){case a:case u:case p:case h:case i:return T;default:return E}}case n:return E}}}function S(T){return g(T)===c}return Fe.AsyncMode=l,Fe.ConcurrentMode=c,Fe.ContextConsumer=a,Fe.ContextProvider=i,Fe.Element=t,Fe.ForwardRef=u,Fe.Fragment=r,Fe.Lazy=p,Fe.Memo=h,Fe.Portal=n,Fe.Profiler=s,Fe.StrictMode=o,Fe.Suspense=d,Fe.isAsyncMode=function(T){return S(T)||g(T)===l},Fe.isConcurrentMode=S,Fe.isContextConsumer=function(T){return g(T)===a},Fe.isContextProvider=function(T){return g(T)===i},Fe.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Fe.isForwardRef=function(T){return g(T)===u},Fe.isFragment=function(T){return g(T)===r},Fe.isLazy=function(T){return g(T)===p},Fe.isMemo=function(T){return g(T)===h},Fe.isPortal=function(T){return g(T)===n},Fe.isProfiler=function(T){return g(T)===s},Fe.isStrictMode=function(T){return g(T)===o},Fe.isSuspense=function(T){return g(T)===d},Fe.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===s||T===o||T===d||T===f||typeof T=="object"&&T!==null&&(T.$$typeof===p||T.$$typeof===h||T.$$typeof===i||T.$$typeof===a||T.$$typeof===u||T.$$typeof===y||T.$$typeof===v||T.$$typeof===w||T.$$typeof===m)},Fe.typeOf=g,Fe}var Le={};/** @license React v16.13.1
179
+ */var Ov;function z_(){if(Ov)return Fe;Ov=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function y(T){if(typeof T=="object"&&T!==null){var E=T.$$typeof;switch(E){case t:switch(T=T.type,T){case l:case c:case r:case i:case o:case d:return T;default:switch(T=T&&T.$$typeof,T){case a:case u:case p:case h:case s:return T;default:return E}}case n:return E}}}function S(T){return y(T)===c}return Fe.AsyncMode=l,Fe.ConcurrentMode=c,Fe.ContextConsumer=a,Fe.ContextProvider=s,Fe.Element=t,Fe.ForwardRef=u,Fe.Fragment=r,Fe.Lazy=p,Fe.Memo=h,Fe.Portal=n,Fe.Profiler=i,Fe.StrictMode=o,Fe.Suspense=d,Fe.isAsyncMode=function(T){return S(T)||y(T)===l},Fe.isConcurrentMode=S,Fe.isContextConsumer=function(T){return y(T)===a},Fe.isContextProvider=function(T){return y(T)===s},Fe.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Fe.isForwardRef=function(T){return y(T)===u},Fe.isFragment=function(T){return y(T)===r},Fe.isLazy=function(T){return y(T)===p},Fe.isMemo=function(T){return y(T)===h},Fe.isPortal=function(T){return y(T)===n},Fe.isProfiler=function(T){return y(T)===i},Fe.isStrictMode=function(T){return y(T)===o},Fe.isSuspense=function(T){return y(T)===d},Fe.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===i||T===o||T===d||T===f||typeof T=="object"&&T!==null&&(T.$$typeof===p||T.$$typeof===h||T.$$typeof===s||T.$$typeof===a||T.$$typeof===u||T.$$typeof===g||T.$$typeof===v||T.$$typeof===w||T.$$typeof===m)},Fe.typeOf=y,Fe}var Le={};/** @license React v16.13.1
180
180
  * react-is.development.js
181
181
  *
182
182
  * Copyright (c) Facebook, Inc. and its affiliates.
183
183
  *
184
184
  * This source code is licensed under the MIT license found in the
185
185
  * LICENSE file in the root directory of this source tree.
186
- */var Pv;function GA(){return Pv||(Pv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function g(z){return typeof z=="string"||typeof z=="function"||z===r||z===c||z===s||z===o||z===d||z===f||typeof z=="object"&&z!==null&&(z.$$typeof===p||z.$$typeof===h||z.$$typeof===i||z.$$typeof===a||z.$$typeof===u||z.$$typeof===y||z.$$typeof===v||z.$$typeof===w||z.$$typeof===m)}function S(z){if(typeof z=="object"&&z!==null){var Ne=z.$$typeof;switch(Ne){case t:var rt=z.type;switch(rt){case l:case c:case r:case s:case o:case d:return rt;default:var He=rt&&rt.$$typeof;switch(He){case a:case u:case p:case h:case i:return He;default:return Ne}}case n:return Ne}}}var T=l,E=c,k=a,A=i,D=t,O=u,V=r,F=p,R=h,C=n,I=s,M=o,L=d,H=!1;function G(z){return H||(H=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(z)||S(z)===l}function P(z){return S(z)===c}function j(z){return S(z)===a}function Z(z){return S(z)===i}function re(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function J(z){return S(z)===u}function U(z){return S(z)===r}function N(z){return S(z)===p}function B(z){return S(z)===h}function W(z){return S(z)===n}function $(z){return S(z)===s}function Y(z){return S(z)===o}function oe(z){return S(z)===d}Le.AsyncMode=T,Le.ConcurrentMode=E,Le.ContextConsumer=k,Le.ContextProvider=A,Le.Element=D,Le.ForwardRef=O,Le.Fragment=V,Le.Lazy=F,Le.Memo=R,Le.Portal=C,Le.Profiler=I,Le.StrictMode=M,Le.Suspense=L,Le.isAsyncMode=G,Le.isConcurrentMode=P,Le.isContextConsumer=j,Le.isContextProvider=Z,Le.isElement=re,Le.isForwardRef=J,Le.isFragment=U,Le.isLazy=N,Le.isMemo=B,Le.isPortal=W,Le.isProfiler=$,Le.isStrictMode=Y,Le.isSuspense=oe,Le.isValidElementType=g,Le.typeOf=S}()),Le}var kv;function Ov(){return kv||(kv=1,process.env.NODE_ENV==="production"?pa.exports=UA():pa.exports=GA()),pa.exports}/*
186
+ */var Iv;function W_(){return Iv||(Iv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function y(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===d||B===f||typeof B=="object"&&B!==null&&(B.$$typeof===p||B.$$typeof===h||B.$$typeof===s||B.$$typeof===a||B.$$typeof===u||B.$$typeof===g||B.$$typeof===v||B.$$typeof===w||B.$$typeof===m)}function S(B){if(typeof B=="object"&&B!==null){var Pe=B.$$typeof;switch(Pe){case t:var ot=B.type;switch(ot){case l:case c:case r:case i:case o:case d:return ot;default:var He=ot&&ot.$$typeof;switch(He){case a:case u:case p:case h:case s:return He;default:return Pe}}case n:return Pe}}}var T=l,E=c,P=a,D=s,_=t,O=u,V=r,F=p,$=h,C=n,I=i,M=o,L=d,H=!1;function Y(B){return H||(H=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),k(B)||S(B)===l}function k(B){return S(B)===c}function R(B){return S(B)===a}function Z(B){return S(B)===s}function oe(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function J(B){return S(B)===u}function G(B){return S(B)===r}function N(B){return S(B)===p}function j(B){return S(B)===h}function W(B){return S(B)===n}function U(B){return S(B)===i}function z(B){return S(B)===o}function te(B){return S(B)===d}Le.AsyncMode=T,Le.ConcurrentMode=E,Le.ContextConsumer=P,Le.ContextProvider=D,Le.Element=_,Le.ForwardRef=O,Le.Fragment=V,Le.Lazy=F,Le.Memo=$,Le.Portal=C,Le.Profiler=I,Le.StrictMode=M,Le.Suspense=L,Le.isAsyncMode=Y,Le.isConcurrentMode=k,Le.isContextConsumer=R,Le.isContextProvider=Z,Le.isElement=oe,Le.isForwardRef=J,Le.isFragment=G,Le.isLazy=N,Le.isMemo=j,Le.isPortal=W,Le.isProfiler=U,Le.isStrictMode=z,Le.isSuspense=te,Le.isValidElementType=y,Le.typeOf=S}()),Le}var Av;function _v(){return Av||(Av=1,process.env.NODE_ENV==="production"?va.exports=z_():va.exports=W_()),va.exports}/*
187
187
  object-assign
188
188
  (c) Sindre Sorhus
189
189
  @license MIT
190
- */var Cu,Iv;function YA(){if(Iv)return Cu;Iv=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(u){return i[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Cu=o()?Object.assign:function(s,i){for(var a,l=r(s),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Cu}var Pu,_v;function ku(){if(_v)return Pu;_v=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Pu=e,Pu}var Ou,Av;function Dv(){return Av||(Av=1,Ou=Function.call.bind(Object.prototype.hasOwnProperty)),Ou}var Iu,Mv;function qA(){if(Mv)return Iu;Mv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ku(),n={},r=Dv();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in s)if(r(s,u)){var d;try{if(typeof s[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=s[u](i,u,l,a,null,t)}catch(p){d=p}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Iu=o,Iu}var _u,Nv;function KA(){if(Nv)return _u;Nv=1;var e=Ov(),t=YA(),n=ku(),r=Dv(),o=qA(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return _u=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(P){var j=P&&(c&&P[c]||P[u]);if(typeof j=="function")return j}var f="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:w(),arrayOf:g,element:S(),elementType:T(),instanceOf:E,node:O(),objectOf:A,oneOf:k,oneOfType:D,shape:F,exact:R};function p(P,j){return P===j?P!==0||1/P===1/j:P!==P&&j!==j}function m(P,j){this.message=P,this.data=j&&typeof j=="object"?j:{},this.stack=""}m.prototype=Error.prototype;function y(P){if(process.env.NODE_ENV!=="production")var j={},Z=0;function re(U,N,B,W,$,Y,oe){if(W=W||f,Y=Y||B,oe!==n){if(l){var z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw z.name="Invariant Violation",z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ne=W+":"+B;!j[Ne]&&Z<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),j[Ne]=!0,Z++)}}return N[B]==null?U?N[B]===null?new m("The "+$+" `"+Y+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+$+" `"+Y+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:P(N,B,W,$,Y)}var J=re.bind(null,!1);return J.isRequired=re.bind(null,!0),J}function v(P){function j(Z,re,J,U,N,B){var W=Z[re],$=M(W);if($!==P){var Y=L(W);return new m("Invalid "+U+" `"+N+"` of type "+("`"+Y+"` supplied to `"+J+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return y(j)}function w(){return y(i)}function g(P){function j(Z,re,J,U,N){if(typeof P!="function")return new m("Property `"+N+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var B=Z[re];if(!Array.isArray(B)){var W=M(B);return new m("Invalid "+U+" `"+N+"` of type "+("`"+W+"` supplied to `"+J+"`, expected an array."))}for(var $=0;$<B.length;$++){var Y=P(B,$,J,U,N+"["+$+"]",n);if(Y instanceof Error)return Y}return null}return y(j)}function S(){function P(j,Z,re,J,U){var N=j[Z];if(!a(N)){var B=M(N);return new m("Invalid "+J+" `"+U+"` of type "+("`"+B+"` supplied to `"+re+"`, expected a single ReactElement."))}return null}return y(P)}function T(){function P(j,Z,re,J,U){var N=j[Z];if(!e.isValidElementType(N)){var B=M(N);return new m("Invalid "+J+" `"+U+"` of type "+("`"+B+"` supplied to `"+re+"`, expected a single ReactElement type."))}return null}return y(P)}function E(P){function j(Z,re,J,U,N){if(!(Z[re]instanceof P)){var B=P.name||f,W=G(Z[re]);return new m("Invalid "+U+" `"+N+"` of type "+("`"+W+"` supplied to `"+J+"`, expected ")+("instance of `"+B+"`."))}return null}return y(j)}function k(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function j(Z,re,J,U,N){for(var B=Z[re],W=0;W<P.length;W++)if(p(B,P[W]))return null;var $=JSON.stringify(P,function(oe,z){var Ne=L(z);return Ne==="symbol"?String(z):z});return new m("Invalid "+U+" `"+N+"` of value `"+String(B)+"` "+("supplied to `"+J+"`, expected one of "+$+"."))}return y(j)}function A(P){function j(Z,re,J,U,N){if(typeof P!="function")return new m("Property `"+N+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var B=Z[re],W=M(B);if(W!=="object")return new m("Invalid "+U+" `"+N+"` of type "+("`"+W+"` supplied to `"+J+"`, expected an object."));for(var $ in B)if(r(B,$)){var Y=P(B,$,J,U,N+"."+$,n);if(Y instanceof Error)return Y}return null}return y(j)}function D(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var j=0;j<P.length;j++){var Z=P[j];if(typeof Z!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(Z)+" at index "+j+"."),i}function re(J,U,N,B,W){for(var $=[],Y=0;Y<P.length;Y++){var oe=P[Y],z=oe(J,U,N,B,W,n);if(z==null)return null;z.data&&r(z.data,"expectedType")&&$.push(z.data.expectedType)}var Ne=$.length>0?", expected one of type ["+$.join(", ")+"]":"";return new m("Invalid "+B+" `"+W+"` supplied to "+("`"+N+"`"+Ne+"."))}return y(re)}function O(){function P(j,Z,re,J,U){return C(j[Z])?null:new m("Invalid "+J+" `"+U+"` supplied to "+("`"+re+"`, expected a ReactNode."))}return y(P)}function V(P,j,Z,re,J){return new m((P||"React class")+": "+j+" type `"+Z+"."+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function F(P){function j(Z,re,J,U,N){var B=Z[re],W=M(B);if(W!=="object")return new m("Invalid "+U+" `"+N+"` of type `"+W+"` "+("supplied to `"+J+"`, expected `object`."));for(var $ in P){var Y=P[$];if(typeof Y!="function")return V(J,U,N,$,L(Y));var oe=Y(B,$,J,U,N+"."+$,n);if(oe)return oe}return null}return y(j)}function R(P){function j(Z,re,J,U,N){var B=Z[re],W=M(B);if(W!=="object")return new m("Invalid "+U+" `"+N+"` of type `"+W+"` "+("supplied to `"+J+"`, expected `object`."));var $=t({},Z[re],P);for(var Y in $){var oe=P[Y];if(r(P,Y)&&typeof oe!="function")return V(J,U,N,Y,L(oe));if(!oe)return new m("Invalid "+U+" `"+N+"` key `"+Y+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(Z[re],null," ")+`
191
- Valid keys: `+JSON.stringify(Object.keys(P),null," "));var z=oe(B,Y,J,U,N+"."+Y,n);if(z)return z}return null}return y(j)}function C(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(C);if(P===null||a(P))return!0;var j=d(P);if(j){var Z=j.call(P),re;if(j!==P.entries){for(;!(re=Z.next()).done;)if(!C(re.value))return!1}else for(;!(re=Z.next()).done;){var J=re.value;if(J&&!C(J[1]))return!1}}else return!1;return!0;default:return!1}}function I(P,j){return P==="symbol"?!0:j?j["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&j instanceof Symbol:!1}function M(P){var j=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":I(j,P)?"symbol":j}function L(P){if(typeof P>"u"||P===null)return""+P;var j=M(P);if(j==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return j}function H(P){var j=L(P);switch(j){case"array":case"object":return"an "+j;case"boolean":case"date":case"regexp":return"a "+j;default:return j}}function G(P){return!P.constructor||!P.constructor.name?f:P.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},_u}var Au,Fv;function ZA(){if(Fv)return Au;Fv=1;var e=ku();function t(){}function n(){}return n.resetWarningCache=t,Au=function(){function r(i,a,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Au}if(process.env.NODE_ENV!=="production"){var XA=Ov(),QA=!0;Eu.exports=KA()(XA.isElement,QA)}else Eu.exports=ZA()();var JA=Eu.exports;const ze=Qd(JA);function Mo(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function No(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(s=c[0]&2?o.return:c[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,c[1])).done)return s;switch(o=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Lv(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 Vv(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var eD=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Vs(e,t){var n=tD(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function tD(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=eD.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var nD=[".DS_Store","Thumbs.db"];function rD(e){return Mo(this,void 0,void 0,function(){return No(this,function(t){return ma(e)&&oD(e.dataTransfer)?[2,lD(e.dataTransfer,e.type)]:sD(e)?[2,iD(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,aD(e)]:[2,[]]})})}function oD(e){return ma(e)}function sD(e){return ma(e)&&ma(e.target)}function ma(e){return typeof e=="object"&&e!==null}function iD(e){return Du(e.target.files).map(function(t){return Vs(t)})}function aD(e){return Mo(this,void 0,void 0,function(){var t;return No(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Vs(r)})]}})})}function lD(e,t){return Mo(this,void 0,void 0,function(){var n,r;return No(this,function(o){switch(o.label){case 0:return e.items?(n=Du(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(cD))]):[3,2];case 1:return r=o.sent(),[2,$v(Rv(r))];case 2:return[2,$v(Du(e.files).map(function(s){return Vs(s)}))]}})})}function $v(e){return e.filter(function(t){return nD.indexOf(t.name)===-1})}function Du(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function cD(e){if(typeof e.webkitGetAsEntry!="function")return jv(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Bv(t):jv(e)}function Rv(e){return e.reduce(function(t,n){return Vv(Vv([],Lv(t),!1),Lv(Array.isArray(n)?Rv(n):[n]),!1)},[])}function jv(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Vs(t);return Promise.resolve(n)}function uD(e){return Mo(this,void 0,void 0,function(){return No(this,function(t){return[2,e.isDirectory?Bv(e):dD(e)]})})}function Bv(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return Mo(i,void 0,void 0,function(){var l,c,u;return No(this,function(d){switch(d.label){case 0:if(a.length)return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=d.sent(),n(l),[3,4];case 3:return c=d.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(uD)),o.push(u),s(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function dD(e){return Mo(this,void 0,void 0,function(){return No(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=Vs(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var fD=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),s=o.replace(/\/.*$/,"");return n.some(function(i){var a=i.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):o===a})}return!0};function zv(e){return mD(e)||pD(e)||Gv(e)||hD()}function hD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
192
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mD(e){if(Array.isArray(e))return Mu(e)}function Wv(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 Hv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wv(Object(n),!0).forEach(function(r){Uv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $s(e,t){return vD(e)||yD(e,t)||Gv(e,t)||gD()}function gD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
193
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gv(e,t){if(e){if(typeof e=="string")return Mu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mu(e,t)}}function Mu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yD(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function vD(e){if(Array.isArray(e))return e}var bD="file-invalid-type",wD="file-too-large",xD="file-too-small",TD="too-many-files",SD=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:bD,message:"File type must be ".concat(n)}},Yv=function(t){return{code:wD,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},qv=function(t){return{code:xD,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},ED={code:TD,message:"Too many files"};function Kv(e,t){var n=e.type==="application/x-moz-file"||fD(e,t);return[n,n?null:SD(t)]}function Zv(e,t,n){if(Fr(e.size))if(Fr(t)&&Fr(n)){if(e.size>n)return[!1,Yv(n)];if(e.size<t)return[!1,qv(t)]}else{if(Fr(t)&&e.size<t)return[!1,qv(t)];if(Fr(n)&&e.size>n)return[!1,Yv(n)]}return[!0,null]}function Fr(e){return e!=null}function CD(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(l){var c=Kv(l,n),u=$s(c,1),d=u[0],f=Zv(l,r,o),h=$s(f,1),p=h[0],m=a?a(l):null;return d&&p&&!m})}function ga(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ya(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Xv(e){e.preventDefault()}function PD(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function kD(e){return e.indexOf("Edge/")!==-1}function OD(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return PD(e)||kD(e)}function yn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t.some(function(a){return!ga(r)&&a&&a.apply(void 0,[r].concat(s)),ga(r)})}}function ID(){return"showOpenFilePicker"in window}function _D(e){if(Fr(e)){var t=Object.entries(e).filter(function(n){var r=$s(n,2),o=r[0],s=r[1],i=!0;return Qv(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),i=!1),(!Array.isArray(s)||!s.every(Jv))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=$s(r,2),s=o[0],i=o[1];return Hv(Hv({},n),{},Uv({},s,i))},{});return[{description:"Files",accept:t}]}return e}function AD(e){if(Fr(e))return Object.entries(e).reduce(function(t,n){var r=$s(n,2),o=r[0],s=r[1];return[].concat(zv(t),[o],zv(s))},[]).filter(function(t){return Qv(t)||Jv(t)}).join(",")}function DD(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function MD(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Qv(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function Jv(e){return/^.*\.[\w]+$/.test(e)}var ND=["children"],FD=["open"],LD=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],VD=["refKey","onChange","onClick"];function $D(e){return BD(e)||jD(e)||eb(e)||RD()}function RD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
194
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BD(e){if(Array.isArray(e))return Fu(e)}function Nu(e,t){return HD(e)||WD(e,t)||eb(e,t)||zD()}function zD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
195
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eb(e,t){if(e){if(typeof e=="string")return Fu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fu(e,t)}}function Fu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function WD(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function HD(e){if(Array.isArray(e))return e}function tb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Qe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tb(Object(n),!0).forEach(function(r){Lu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function va(e,t){if(e==null)return{};var n=UD(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UD(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Vu=b.forwardRef(function(e,t){var n=e.children,r=va(e,ND),o=rb(r),s=o.open,i=va(o,FD);return b.useImperativeHandle(t,function(){return{open:s}},[s]),b.createElement(b.Fragment,null,n(Qe(Qe({},i),{},{open:s})))});Vu.displayName="Dropzone";var nb={disabled:!1,getFilesFromEvent:rD,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Vu.defaultProps=nb,Vu.propTypes={children:ze.func,accept:ze.objectOf(ze.arrayOf(ze.string)),multiple:ze.bool,preventDropOnDocument:ze.bool,noClick:ze.bool,noKeyboard:ze.bool,noDrag:ze.bool,noDragEventsBubbling:ze.bool,minSize:ze.number,maxSize:ze.number,maxFiles:ze.number,disabled:ze.bool,getFilesFromEvent:ze.func,onFileDialogCancel:ze.func,onFileDialogOpen:ze.func,useFsAccessApi:ze.bool,autoFocus:ze.bool,onDragEnter:ze.func,onDragLeave:ze.func,onDragOver:ze.func,onDrop:ze.func,onDropAccepted:ze.func,onDropRejected:ze.func,onError:ze.func,validator:ze.func};var $u={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function rb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Qe(Qe({},nb),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,y=t.onFileDialogOpen,v=t.useFsAccessApi,w=t.autoFocus,g=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,E=t.noDrag,k=t.noDragEventsBubbling,A=t.onError,D=t.validator,O=b.useMemo(function(){return AD(n)},[n]),V=b.useMemo(function(){return _D(n)},[n]),F=b.useMemo(function(){return typeof y=="function"?y:ob},[y]),R=b.useMemo(function(){return typeof m=="function"?m:ob},[m]),C=b.useRef(null),I=b.useRef(null),M=b.useReducer(GD,$u),L=Nu(M,2),H=L[0],G=L[1],P=H.isFocused,j=H.isFileDialogActive,Z=b.useRef(typeof window<"u"&&window.isSecureContext&&v&&ID()),re=function(){!Z.current&&j&&setTimeout(function(){if(I.current){var ae=I.current.files;ae.length||(G({type:"closeDialog"}),R())}},300)};b.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[I,j,R,Z]);var J=b.useRef([]),U=function(ae){C.current&&C.current.contains(ae.target)||(ae.preventDefault(),J.current=[])};b.useEffect(function(){return g&&(document.addEventListener("dragover",Xv,!1),document.addEventListener("drop",U,!1)),function(){g&&(document.removeEventListener("dragover",Xv),document.removeEventListener("drop",U))}},[C,g]),b.useEffect(function(){return!r&&w&&C.current&&C.current.focus(),function(){}},[C,w,r]);var N=b.useCallback(function(Q){A?A(Q):console.error(Q)},[A]),B=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),ke(Q),J.current=[].concat($D(J.current),[Q.target]),ya(Q)&&Promise.resolve(o(Q)).then(function(ae){if(!(ga(Q)&&!k)){var _e=ae.length,Ke=_e>0&&CD({files:ae,accept:O,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:D}),kt=_e>0&&!Ke;G({isDragAccept:Ke,isDragReject:kt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Q)}}).catch(function(ae){return N(ae)})},[o,c,N,k,O,i,s,a,l,D]),W=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),ke(Q);var ae=ya(Q);if(ae&&Q.dataTransfer)try{Q.dataTransfer.dropEffect="copy"}catch{}return ae&&d&&d(Q),!1},[d,k]),$=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),ke(Q);var ae=J.current.filter(function(Ke){return C.current&&C.current.contains(Ke)}),_e=ae.indexOf(Q.target);_e!==-1&&ae.splice(_e,1),J.current=ae,!(ae.length>0)&&(G({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ya(Q)&&u&&u(Q))},[C,u,k]),Y=b.useCallback(function(Q,ae){var _e=[],Ke=[];Q.forEach(function(kt){var Nt=Kv(kt,O),Vt=Nu(Nt,2),Hr=Vt[0],Yo=Vt[1],qo=Zv(kt,i,s),Xa=Nu(qo,2),Rd=Xa[0],jd=Xa[1],Bd=D?D(kt):null;if(Hr&&Rd&&!Bd)_e.push(kt);else{var zd=[Yo,jd];Bd&&(zd=zd.concat(Bd)),Ke.push({file:kt,errors:zd.filter(function(WL){return WL})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(kt){Ke.push({file:kt,errors:[ED]})}),_e.splice(0)),G({acceptedFiles:_e,fileRejections:Ke,type:"setFiles"}),f&&f(_e,Ke,ae),Ke.length>0&&p&&p(Ke,ae),_e.length>0&&h&&h(_e,ae)},[G,a,O,i,s,l,f,h,p,D]),oe=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),ke(Q),J.current=[],ya(Q)&&Promise.resolve(o(Q)).then(function(ae){ga(Q)&&!k||Y(ae,Q)}).catch(function(ae){return N(ae)}),G({type:"reset"})},[o,Y,N,k]),z=b.useCallback(function(){if(Z.current){G({type:"openDialog"}),F();var Q={multiple:a,types:V};window.showOpenFilePicker(Q).then(function(ae){return o(ae)}).then(function(ae){Y(ae,null),G({type:"closeDialog"})}).catch(function(ae){DD(ae)?(R(ae),G({type:"closeDialog"})):MD(ae)?(Z.current=!1,I.current?(I.current.value=null,I.current.click()):N(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):N(ae)});return}I.current&&(G({type:"openDialog"}),F(),I.current.value=null,I.current.click())},[G,F,R,v,Y,N,V,a]),Ne=b.useCallback(function(Q){!C.current||!C.current.isEqualNode(Q.target)||(Q.key===" "||Q.key==="Enter"||Q.keyCode===32||Q.keyCode===13)&&(Q.preventDefault(),z())},[C,z]),rt=b.useCallback(function(){G({type:"focus"})},[]),He=b.useCallback(function(){G({type:"blur"})},[]),ot=b.useCallback(function(){S||(OD()?setTimeout(z,0):z())},[S,z]),de=function(ae){return r?null:ae},Ee=function(ae){return T?null:de(ae)},ce=function(ae){return E?null:de(ae)},ke=function(ae){k&&ae.stopPropagation()},ft=b.useMemo(function(){return function(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=Q.refKey,_e=ae===void 0?"ref":ae,Ke=Q.role,kt=Q.onKeyDown,Nt=Q.onFocus,Vt=Q.onBlur,Hr=Q.onClick,Yo=Q.onDragEnter,qo=Q.onDragOver,Xa=Q.onDragLeave,Rd=Q.onDrop,jd=va(Q,LD);return Qe(Qe(Lu({onKeyDown:Ee(yn(kt,Ne)),onFocus:Ee(yn(Nt,rt)),onBlur:Ee(yn(Vt,He)),onClick:de(yn(Hr,ot)),onDragEnter:ce(yn(Yo,B)),onDragOver:ce(yn(qo,W)),onDragLeave:ce(yn(Xa,$)),onDrop:ce(yn(Rd,oe)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},_e,C),!r&&!T?{tabIndex:0}:{}),jd)}},[C,Ne,rt,He,ot,B,W,$,oe,T,E,r]),Oe=b.useCallback(function(Q){Q.stopPropagation()},[]),ht=b.useMemo(function(){return function(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=Q.refKey,_e=ae===void 0?"ref":ae,Ke=Q.onChange,kt=Q.onClick,Nt=va(Q,VD),Vt=Lu({accept:O,multiple:a,type:"file",style:{display:"none"},onChange:de(yn(Ke,oe)),onClick:de(yn(kt,Oe)),tabIndex:-1},_e,I);return Qe(Qe({},Vt),Nt)}},[I,n,a,oe,r]);return Qe(Qe({},H),{},{isFocused:P&&!r,getRootProps:ft,getInputProps:ht,rootRef:C,inputRef:I,open:de(z)})}function GD(e,t){switch(t.type){case"focus":return Qe(Qe({},e),{},{isFocused:!0});case"blur":return Qe(Qe({},e),{},{isFocused:!1});case"openDialog":return Qe(Qe({},$u),{},{isFileDialogActive:!0});case"closeDialog":return Qe(Qe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Qe(Qe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Qe(Qe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Qe({},$u);default:return e}}function ob(){}const YD={isImage:e=>e.type.includes("image")},qD=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(YD.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Ev(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Ev(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[x.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[x.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(ns,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(to,{})})]}):x.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[x.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[x.jsx($1,{size:48}),x.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(ns,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(to,{className:"text-danger"})})]})},KD=e=>x.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>x.jsx(qD,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),ZD=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(KD,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(b.Fragment,{children:e.idle}),XD=x.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[x.jsx(H1,{size:64}),x.jsxs("p",{children:["You can drag your files or"," ",x.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),QD=({idle:e=XD,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=b.useState([]),i=d=>{n==null||n(d),s(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=rb({onDrop:i});return x.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex text-foreground flex-col items-center justify-center border-2 rounded-lg p-6 border-card-border data-[active=true]:bg-card-background data-[active=true]:border-solid data-[active=false]:border-dashed",children:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(ZD,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},JD=["INPUT","SELECT"],sb=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{JD.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},eM=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return x.jsx("form",{...e,onSubmit:t})},tM=({children:e,className:t="",size:n,...r})=>x.jsxs("label",{"data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group font-normal flex items-center gap-2 data-[disabled=true]:cursor-not-allowed",children:[x.jsx("input",{...r,type:"radio",className:pt("form-radio rounded-full h-4 w-4 app border-card-border text-primary focus:ring-primary appearance-none inline-block bg-origin-border group-aria-disabled:cursor-not-allowed disabled:opacity-70",t),...r}),e]}),nM=({children:e,...t})=>{const n=b.useId(),[r,o]=b.useState(!1),s=t.checked??r,i=a=>{var u;const c=a.target.dataset.checked!=="true";o(c),(u=t==null?void 0:t.onCheck)==null||u.call(t,c)};return x.jsxs("div",{className:"flex items-center",children:[x.jsx("input",{...t,hidden:!0,type:"checkbox",checked:s,onChange:a=>o(a.target.checked)}),x.jsx("button",{type:"button",role:"switch",onClick:i,"aria-checked":s,"data-checked":s,"aria-labelledby":`${n}-label`,className:"relative duration-300 inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary transition-colors ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:x.jsx("span",{"aria-hidden":"true","data-checked":s,className:"data-[checked=false]:bg-disabled duration-300 data-[checked=true]:bg-input-switch inline-block size-5 aspect-square data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out"})}),x.jsx("span",{className:"ml-3 text-sm",id:`${n}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})})]})},ba=0,fr=1,Fo=2,ib=4;function Rs(e,t){return n=>e(t(n))}function rM(e,t){return t(e)}function ab(e,t){return n=>e(t,n)}function lb(e,t){return()=>e(t)}function wa(e,t){return t(e),e}function Ye(...e){return e}function oM(e){e()}function cb(e){return()=>e}function sM(...e){return()=>{e.map(oM)}}function Ru(e){return e!==void 0}function Lr(){}function $e(e,t){return e(fr,t)}function be(e,t){e(ba,t)}function ju(e){e(Fo)}function Dt(e){return e(ib)}function ue(e,t){return $e(e,ab(t,ba))}function vn(e,t){const n=e(fr,r=>{n(),t(r)});return n}function Ce(){const e=[];return(t,n)=>{switch(t){case Fo:e.splice(0,e.length);return;case fr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case ba:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function X(e){let t=e;const n=Ce();return(r,o)=>{switch(r){case fr:o(t);break;case ba:t=o;break;case ib:return t}return n(r,o)}}function iM(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case fr:return s?n===s?void 0:(r(),n=s,t=$e(e,s),t):(r(),Lr);case Fo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Yt(e){return wa(Ce(),t=>ue(e,t))}function Mt(e,t){return wa(X(t),n=>ue(e,n))}function aM(...e){return t=>e.reduceRight(rM,t)}function q(e,...t){const n=aM(...t);return(r,o)=>{switch(r){case fr:return $e(e,n(o));case Fo:ju(e);return}}}function ub(e,t){return e===t}function qe(e=ub){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function pe(e){return t=>n=>{e(n)&&t(n)}}function ie(e){return t=>Rs(t,e)}function bn(e){return t=>()=>t(e)}function wn(e,t){return n=>r=>n(t=e(t,r))}function Lo(e){return t=>n=>{e>0?e--:t(n)}}function hr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function db(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function we(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);$e(s,l=>{const c=n;n=n|a,t[i]=l,c!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const a=()=>s([i].concat(t));n===o?a():r=a}}function fb(...e){return function(t,n){switch(t){case fr:return sM(...e.map(r=>$e(r,n)));case Fo:return;default:throw new Error(`unrecognized action ${t}`)}}}function ge(e,t=ub){return q(e,qe(t))}function bt(...e){const t=Ce(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);$e(s,l=>{n[i]=l,r=r|a,r===o&&be(t,n)})}),function(s,i){switch(s){case fr:return r===o&&i(n),$e(t,i);case Fo:return ju(t);default:throw new Error(`unrecognized action ${s}`)}}}function Me(e,t=[],{singleton:n}={singleton:!0}){return{id:lM(),constructor:e,dependencies:t,singleton:n}}const lM=()=>Symbol();function cM(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const a=o(s.map(l=>n(l)));return i&&t.set(r,a),a};return n(e)}function uM(e,t){const n={},r={};let o=0;const s=e.length;for(;o<s;)r[e[o]]=1,o+=1;for(const i in t)r.hasOwnProperty(i)||(n[i]=t[i]);return n}const xa=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Bu(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),i=Object.keys(t.events||{}),a=b.createContext({});function l(v,w){v.propsReady&&be(v.propsReady,!1);for(const g of r){const S=v[t.required[g]];be(S,w[g])}for(const g of o)if(g in w){const S=v[t.optional[g]];be(S,w[g])}v.propsReady&&be(v.propsReady,!0)}function c(v){return s.reduce((w,g)=>(w[g]=S=>{const T=v[t.methods[g]];be(T,S)},w),{})}function u(v){return i.reduce((w,g)=>(w[g]=iM(v[t.events[g]]),w),{})}const d=b.forwardRef((v,w)=>{const{children:g,...S}=v,[T]=b.useState(()=>wa(cM(e),k=>l(k,S))),[E]=b.useState(lb(u,T));return xa(()=>{for(const k of i)k in S&&$e(E[k],S[k]);return()=>{Object.values(E).map(ju)}},[S,E,T]),xa(()=>{l(T,S)}),b.useImperativeHandle(w,cb(c(T))),b.createElement(a.Provider,{value:T},n?b.createElement(n,uM([...r,...o,...i],S),g):g)}),f=v=>b.useCallback(ab(be,b.useContext(a)[v]),[v]),h=v=>{const g=b.useContext(a)[v],S=b.useCallback(T=>$e(g,T),[g]);return b.useSyncExternalStore(S,()=>Dt(g),()=>Dt(g))},p=v=>{const g=b.useContext(a)[v],[S,T]=b.useState(lb(Dt,g));return xa(()=>$e(g,E=>{E!==S&&T(cb(E))}),[g,S]),S},m=b.version.startsWith("18")?h:p;return{Component:d,usePublisher:f,useEmitterValue:m,useEmitter:(v,w)=>{const S=b.useContext(a)[v];xa(()=>$e(S,w),[w,S])}}}const dM=typeof document<"u"?b.useLayoutEffect:b.useEffect;var qt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(qt||{});const fM={0:"debug",1:"log",2:"warn",3:"error"},hM=()=>typeof globalThis>"u"?window:globalThis,pr=Me(()=>{const e=X(3);return{log:X((n,r,o=1)=>{var s;const i=(s=hM().VIRTUOSO_LOG_LEVEL)!=null?s:Dt(e);o>=i&&console[fM[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function zu(e,t=!0){const n=b.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=b.useMemo(()=>new ResizeObserver(s=>{requestAnimationFrame(()=>{const i=s[0].target;i.offsetParent!==null&&e(i)})}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function xn(e,t=!0){return zu(e,t).callbackRef}function hb(e,t,n,r,o,s,i){const a=b.useCallback(l=>{const c=pM(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",f=i?i.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=i?i.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:p}),s==null||s(mM("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return zu(a,n)}function pM(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i<o;i++){const a=e.item(i);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},qt.ERROR),u===c)continue;const d=s[s.length-1];s.length===0||d.size!==u||d.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function mM(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,qt.WARN),t==="normal"?0:parseInt(t??"0",10)}function rn(e,t){return Math.round(e.getBoundingClientRect()[t])}function pb(e,t){return Math.abs(e-t)<1.01}function mb(e,t,n,r=Lr,o){const s=b.useRef(null),i=b.useRef(null),a=b.useRef(null),l=b.useCallback(d=>{const f=d.target,h=f===window||f===document,p=h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,m=h?document.documentElement.scrollHeight:f.scrollHeight,y=h?window.innerHeight:f.offsetHeight,v=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:y})};d.suppressFlushSync?v():Hd.flushSync(v),i.current!==null&&(p===i.current||p<=0||p===m-y)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);b.useEffect(()=>{const d=o||s.current;return r(o||s.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(d){const f=s.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let p,m,y;f===window?(m=Math.max(rn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,y=document.documentElement.scrollTop):(m=f.scrollHeight,p=rn(f,"height"),y=f.scrollTop);const v=m-p;if(d.top=Math.ceil(Math.max(Math.min(v,d.top),0)),pb(p,m)||d.top===y){e({scrollTop:y,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(i.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,f.scrollTo(d)}function u(d){s.current.scrollBy(d)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const Ft=Me(()=>{const e=Ce(),t=Ce(),n=X(0),r=Ce(),o=X(0),s=Ce(),i=Ce(),a=X(0),l=X(0),c=X(0),u=X(0),d=Ce(),f=Ce(),h=X(!1);return ue(q(e,ie(({scrollTop:p})=>p)),t),ue(q(e,ie(({scrollHeight:p})=>p)),i),ue(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:d,scrollBy:f,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),js={lvl:0};function gb(e,t,n,r=js,o=js){return{k:e,v:t,lvl:n,l:r,r:o}}function We(e){return e===js}function Vo(){return js}function Wu(e,t){if(We(e))return js;const{k:n,l:r,r:o}=e;if(t===n){if(We(r))return o;if(We(o))return r;{const[s,i]=yb(r);return Ta(mt(e,{k:s,v:i,l:vb(r)}))}}else return t<n?Ta(mt(e,{l:Wu(r,t)})):Ta(mt(e,{r:Wu(o,t)}))}function Bs(e,t){if(!We(e))return t===e.k?e.v:t<e.k?Bs(e.l,t):Bs(e.r,t)}function on(e,t,n="k"){if(We(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=on(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return on(e.l,t,n)}function Kt(e,t,n){return We(e)?gb(t,n,1):t===e.k?mt(e,{k:t,v:n}):t<e.k?bb(mt(e,{l:Kt(e.l,t,n)})):bb(mt(e,{r:Kt(e.r,t,n)}))}function Hu(e,t,n){if(We(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(Hu(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Hu(i,t,n))),a}function Vr(e){return We(e)?[]:[...Vr(e.l),{k:e.k,v:e.v},...Vr(e.r)]}function yb(e){return We(e.r)?[e.k,e.v]:yb(e.r)}function vb(e){return We(e.r)?e.l:Ta(mt(e,{r:vb(e.r)}))}function mt(e,t){return gb(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function Uu(e){return We(e)||e.lvl>e.r.lvl}function bb(e){return Gu(xb(e))}function Ta(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(Uu(t))return xb(mt(e,{lvl:r-1}));if(!We(t)&&!We(t.r))return mt(t.r,{l:mt(t,{r:t.r.l}),r:mt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(Uu(e))return Gu(mt(e,{lvl:r-1}));if(!We(n)&&!We(n.l)){const o=n.l,s=Uu(o)?n.lvl-1:n.lvl;return mt(o,{l:mt(e,{r:o.l,lvl:r-1}),r:Gu(mt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Sa(e,t,n){if(We(e))return[];const r=on(e,t)[0];return gM(Hu(e,r,n))}function wb(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i<n;i++){const{index:a,value:l}=t(e[i]);s.push({start:r,end:a-1,value:o}),r=a,o=l}return s.push({start:r,end:1/0,value:o}),s}function gM(e){return wb(e,({k:t,v:n})=>({index:t,value:n}))}function Gu(e){const{r:t,lvl:n}=e;return!We(t)&&!We(t.r)&&t.lvl===n&&t.r.lvl===n?mt(t,{l:mt(e,{r:t.l}),lvl:n+1}):e}function xb(e){const{l:t}=e;return!We(t)&&t.lvl===e.lvl?mt(t,{r:mt(e,{l:t.r})}):e}function Ea(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],a=n(i,t);if(a===0)return s;if(a===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Tb(e,t,n){return e[Ea(e,t,n)]}function yM(e,t,n,r){const o=Ea(e,t,r),s=Ea(e,n,r,o);return e.slice(o,s+1)}const Yu=Me(()=>({recalcInProgress:X(!1)}),[],{singleton:!0});function vM(e){const{size:t,startIndex:n,endIndex:r}=e;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===t}function Sb(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function bM(e,t){let n=We(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),We(e)){e=Kt(e,0,o);continue}const a=Sa(e,s-1,i+1);if(a.some(vM(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(i>=u||o===f)&&(e=Wu(e,u)):(c=f!==o,l=!0),d>i&&i>=u&&f!==o&&(e=Kt(e,i+1,f));c&&(e=Kt(e,s,o))}return[e,n]}function wM(){return{offsetTree:[],sizeTree:Vo(),groupOffsetTree:Vo(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function qu({index:e},t){return t===e?0:t<e?-1:1}function xM({offset:e},t){return t===e?0:t<e?-1:1}function TM(e){return{index:e.index,value:e}}function SM(e,t,n,r=0){return r>0&&(t=Math.max(t,Tb(e,r,qu).offset)),wb(yM(e,t,n,xM),TM)}function Ku(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=Ea(o,t-1,qu),a=o[l].offset;const u=on(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===on(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Sa(n,t,1/0)){const d=c-s,f=d*i+a+d*r;o.push({offset:f,size:u,index:c}),s=c,a=f,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function EM(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,qt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&We(s)&&t.length===2){const f=t[0].size,h=t[1].size;i=n.reduce((p,m)=>Kt(Kt(p,m,f),m+1,h),i)}else[i,a]=bM(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=Ku(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Kt(f,h,zs(h,l,o)),Vo()),groupIndices:n}}function zs(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=Tb(t,e,qu),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function CM(e){return typeof e.groupIndex<"u"}function Eb(e,t,n){if(CM(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Cb(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Cb(e,t){if(!Ca(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Ca(e){return!We(e.groupOffsetTree)}function PM(e){return Vr(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const kM={offsetHeight:"height",offsetWidth:"width"},Tn=Me(([{log:e},{recalcInProgress:t}])=>{const n=Ce(),r=Ce(),o=Mt(r,0),s=Ce(),i=Ce(),a=X(0),l=X([]),c=X(void 0),u=X(void 0),d=X((T,E)=>rn(T,kM[E])),f=X(void 0),h=X(0),p=wM(),m=Mt(q(n,we(l,e,h),wn(EM,p),qe()),p),y=Mt(q(l,qe(),wn((T,E)=>({prev:T.current,current:E}),{prev:[],current:[]}),ie(({prev:T})=>T)),[]);ue(q(l,pe(T=>T.length>0),we(m,h),ie(([T,E,k])=>{const A=T.reduce((D,O,V)=>Kt(D,O,zs(O,E.offsetTree,k)||V),Vo());return{...E,groupIndices:T,groupOffsetTree:A}})),m),ue(q(r,we(m),pe(([T,{lastIndex:E}])=>T<E),ie(([T,{lastIndex:E,lastSize:k}])=>[{startIndex:T,endIndex:E,size:k}])),n),ue(c,u);const v=Mt(q(c,ie(T=>T===void 0)),!0);ue(q(u,pe(T=>T!==void 0&&We(Dt(m).sizeTree)),ie(T=>[{startIndex:0,endIndex:0,size:T}])),n);const w=Yt(q(n,we(m),wn(({sizes:T},[E,k])=>({changed:k!==T,sizes:k}),{changed:!1,sizes:p}),ie(T=>T.changed)));$e(q(a,wn((T,E)=>({diff:T.prev-E,prev:E}),{diff:0,prev:0}),ie(T=>T.diff)),T=>{const{groupIndices:E}=Dt(m);if(T>0)be(t,!0),be(s,T+Sb(T,E));else if(T<0){const k=Dt(y);k.length>0&&(T-=Sb(-T,k)),be(i,T)}}),$e(q(a,we(e)),([T,E])=>{T<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},qt.ERROR)});const g=Yt(s);ue(q(s,we(m),ie(([T,E])=>{const k=E.groupIndices.length>0,A=[],D=E.lastSize;if(k){const O=Bs(E.sizeTree,0);let V=0,F=0;for(;V<T;){const I=E.groupIndices[F],M=E.groupIndices.length===F+1?1/0:E.groupIndices[F+1]-I-1;A.push({startIndex:I,endIndex:I,size:O}),A.push({startIndex:I+1,endIndex:I+1+M-1,size:D}),F++,V+=M+1}const R=Vr(E.sizeTree);return V!==T&&R.shift(),R.reduce((I,{k:M,v:L})=>{let H=I.ranges;return I.prevSize!==0&&(H=[...I.ranges,{startIndex:I.prevIndex,endIndex:M+T-1,size:I.prevSize}]),{ranges:H,prevIndex:M+T,prevSize:L}},{ranges:A,prevIndex:T,prevSize:0}).ranges}return Vr(E.sizeTree).reduce((O,{k:V,v:F})=>({ranges:[...O.ranges,{startIndex:O.prevIndex,endIndex:V+T-1,size:O.prevSize}],prevIndex:V+T,prevSize:F}),{ranges:[],prevIndex:0,prevSize:D}).ranges})),n);const S=Yt(q(i,we(m,h),ie(([T,{offsetTree:E},k])=>{const A=-T;return zs(A,E,k)})));return ue(q(i,we(m,h),ie(([T,E,k])=>{if(E.groupIndices.length>0){if(We(E.sizeTree))return E;let D=Vo();const O=Dt(y);let V=0,F=0,R=0;for(;V<-T;){R=O[F];const I=O[F+1]-R-1;F++,V+=I+1}if(D=Vr(E.sizeTree).reduce((I,{k:M,v:L})=>Kt(I,Math.max(0,M+T),L),D),V!==-T){const I=Bs(E.sizeTree,R);D=Kt(D,0,I);const M=on(E.sizeTree,-T+1)[1];D=Kt(D,1,M)}return{...E,sizeTree:D,...Ku(E.offsetTree,0,D,k)}}else{const D=Vr(E.sizeTree).reduce((O,{k:V,v:F})=>Kt(O,Math.max(0,V+T),F),Vo());return{...E,sizeTree:D,...Ku(E.offsetTree,0,D,k)}}})),m),{data:f,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:S,beforeUnshiftWith:g,firstItemIndex:a,gap:h,sizes:m,listRefresh:w,statefulTotalCount:o,trackItemSizes:v,itemSize:d}},Ye(pr,Yu),{singleton:!0}),OM=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Pb(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!OM)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ws=Me(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:f}])=>{const h=Ce(),p=Ce(),m=X(0);let y=null,v=null,w=null;function g(){y&&(y(),y=null),w&&(w(),w=null),v&&(clearTimeout(v),v=null),be(o,!1)}return ue(q(h,we(e,s,t,m,l,c,f),we(r,u,d),ie(([[S,T,E,k,A,D,O,V],F,R,C])=>{const I=Pb(S),{align:M,behavior:L,offset:H}=I,G=k-1,P=Eb(I,T,G);let j=zs(P,T.offsetTree,F)+D;M==="end"?(j+=R+on(T.sizeTree,P)[1]-E+C,P===G&&(j+=O)):M==="center"?j+=(R+on(T.sizeTree,P)[1]-E+C)/2:j-=A,H&&(j+=H);const Z=re=>{g(),re?(V("retrying to scroll to",{location:S},qt.DEBUG),be(h,S)):(be(p,!0),V("list did not change, scroll successful",{},qt.DEBUG))};if(g(),L==="smooth"){let re=!1;w=$e(n,J=>{re=re||J}),y=vn(a,()=>{Z(re)})}else y=vn(q(n,IM(150)),Z);return v=setTimeout(()=>{g()},1200),be(o,!0),V("scrolling from index to",{index:P,top:j,behavior:L},qt.DEBUG),{top:j,behavior:L}})),i),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},Ye(Tn,Ft,pr),{singleton:!0});function IM(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const Hs="up",Us="down",_M="none",AM={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},DM=0,Gs=Me(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=X(!1),a=X(!0),l=Ce(),c=Ce(),u=X(4),d=X(DM),f=Mt(q(fb(q(ge(t),Lo(1),bn(!0)),q(ge(t),Lo(1),bn(!1),db(100))),qe()),!1),h=Mt(q(fb(q(s,bn(!0)),q(s,bn(!1),db(200))),qe()),!1);ue(q(bt(ge(t),ge(d)),ie(([w,g])=>w<=g),qe()),a),ue(q(a,hr(50)),c);const p=Yt(q(bt(e,ge(n),ge(r),ge(o),ge(u)),wn((w,[{scrollTop:g,scrollHeight:S},T,E,k,A])=>{const D=g+T-S>-A,O={viewportHeight:T,scrollTop:g,scrollHeight:S};if(D){let F,R;return g>w.state.scrollTop?(F="SCROLLED_DOWN",R=w.state.scrollTop-g):(F="SIZE_DECREASED",R=w.state.scrollTop-g||w.scrollTopDelta),{atBottom:!0,state:O,atBottomBecause:F,scrollTopDelta:R}}let V;return O.scrollHeight>w.state.scrollHeight?V="SIZE_INCREASED":T<w.state.viewportHeight?V="VIEWPORT_HEIGHT_DECREASING":g<w.state.scrollTop?V="SCROLLING_UPWARDS":V="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:V,state:O}},AM),qe((w,g)=>w&&w.atBottom===g.atBottom))),m=Mt(q(e,wn((w,{scrollTop:g,scrollHeight:S,viewportHeight:T})=>{if(pb(w.scrollHeight,S))return{scrollTop:g,scrollHeight:S,jump:0,changed:!1};{const E=S-(g+T)<1;return w.scrollTop!==g&&E?{scrollHeight:S,scrollTop:g,jump:w.scrollTop-g,changed:!0}:{scrollHeight:S,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),pe(w=>w.changed),ie(w=>w.jump)),0);ue(q(p,ie(w=>w.atBottom)),i),ue(q(i,hr(50)),l);const y=X(Us);ue(q(e,ie(({scrollTop:w})=>w),qe(),wn((w,g)=>Dt(h)?{direction:w.direction,prevScrollTop:g}:{direction:g<w.prevScrollTop?Hs:Us,prevScrollTop:g},{direction:Us,prevScrollTop:0}),ie(w=>w.direction)),y),ue(q(e,hr(50),bn(_M)),y);const v=X(0);return ue(q(f,pe(w=>!w),bn(0)),v),ue(q(t,hr(100),we(f),pe(([w,g])=>!!g),wn(([w,g],[S])=>[g,S],[0,0]),ie(([w,g])=>g-w)),v),{isScrolling:f,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:y,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:v,lastJumpDueToItemResize:m}},Ye(Ft)),mr=Me(([{log:e}])=>{const t=X(!1),n=Yt(q(t,pe(r=>r),qe()));return $e(t,r=>{r&&Dt(e)("props updated",{},qt.DEBUG)}),{propsReady:t,didMount:n}},Ye(pr),{singleton:!0});function Zu(e,t){e==0?t():requestAnimationFrame(()=>Zu(e-1,t))}function Xu(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Ys=Me(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=X(!0),l=X(0),c=X(!0);return ue(q(i,we(l),pe(([u,d])=>!!d),bn(!1)),a),ue(q(i,we(l),pe(([u,d])=>!!d),bn(!1)),c),$e(q(bt(t,i),we(a,e,n,c),pe(([[,u],d,{sizeTree:f},h,p])=>u&&(!We(f)||Ru(h))&&!d&&!p),we(l)),([,u])=>{vn(s,()=>{be(c,!0)}),Zu(4,()=>{vn(r,()=>{be(a,!0)}),be(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Ye(Tn,Ft,Ws,mr),{singleton:!0});function kb(e){return e?e==="smooth"?"smooth":"auto":!1}const MM=(e,t)=>typeof e=="function"?kb(e(t)):t&&kb(e),NM=Me(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=X(!1),d=Ce();let f=null;function h(m){be(o,{index:"LAST",align:"end",behavior:m})}$e(q(bt(q(ge(e),Lo(1)),a),we(ge(u),n,s,c),ie(([[m,y],v,w,g,S])=>{let T=y&&g,E="auto";return T&&(E=MM(v,w||S),T=T&&!!E),{totalCount:m,shouldFollow:T,followOutputBehavior:E}}),pe(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:y})=>{f&&(f(),f=null),f=vn(t,()=>{Dt(l)("following output to ",{totalCount:m},qt.DEBUG),h(y),f=null})});function p(m){const y=vn(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Dt(l)("scrolling to bottom due to increased size",{},qt.DEBUG),h("auto"))});setTimeout(y,100)}return $e(q(bt(ge(u),e,i),pe(([m,,y])=>m&&y),wn(({value:m},[,y])=>({refreshed:m===y,value:y}),{refreshed:!1,value:0}),pe(({refreshed:m})=>m),we(u,e)),([,m])=>{Dt(s)&&p(m!==!1)}),$e(d,()=>{p(Dt(u)!==!1)}),$e(bt(ge(u),r),([m,y])=>{m&&!y.atBottom&&y.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},Ye(Tn,Gs,Ws,Ys,mr,pr,Ft));function FM(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Ob=Me(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Ce(),i=Ce(),a=Yt(q(s,ie(FM)));return ue(q(a,ie(l=>l.totalCount)),e),ue(q(a,ie(l=>l.groupIndices)),t),ue(q(bt(r,n,o),pe(([l,c])=>Ca(c)),ie(([l,c,u])=>on(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),qe(),ie(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Ye(Tn,Ft));function qs(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Ib(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Pa="top",ka="bottom",_b="none";function Ab(e,t,n){return typeof e=="number"?n===Hs&&t===Pa||n===Us&&t===ka?e:0:n===Hs?t===Pa?e.main:e.reverse:t===ka?e.main:e.reverse}function Db(e,t){return typeof e=="number"?e:e[t]||0}const Qu=Me(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Ce(),i=X(0),a=X(0),l=X(0),c=Mt(q(bt(ge(e),ge(t),ge(r),ge(s,qs),ge(l),ge(i),ge(o),ge(n),ge(a)),ie(([u,d,f,[h,p],m,y,v,w,g])=>{const S=u-w,T=y+v,E=Math.max(f-S,0);let k=_b;const A=Db(g,Pa),D=Db(g,ka);return h-=w,h+=f+v,p+=f+v,p-=w,h>u+T-A&&(k=Hs),p<u-E+d+D&&(k=Us),k!==_b?[Math.max(S-f-Ab(m,Pa,k)-A,0),S-E-v+d+Ab(m,ka,k)+D]:null}),pe(u=>u!=null),qe(qs)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Ye(Ft),{singleton:!0});function LM(e,t,n){if(Ca(t)){const r=Cb(e,t);return[{index:on(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const Ju={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Mb(e,t,n){if(e.length===0)return[];if(!Ca(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=Sa(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=i.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},s.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return s}function Oa(e,t,n,r,o,s){const{lastSize:i,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const d=n-l,f=a+d*i+(d-1)*r,h=c,p=f-u;return{items:Mb(e,o,s),topItems:Mb(t,o,s),topListHeight:t.reduce((m,y)=>y.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function Nb(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=e)break;i++}const a=e+i,l=Xu(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:s[d+l]}));return Oa(c,[],a,o,n,r)}const $r=Me(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:p}])=>{const m=X([]),y=X(0),v=Ce();ue(s.topItemsIndexes,m);const w=Mt(q(bt(h,p,ge(i,qs),ge(t),ge(e),ge(u),c,ge(m),ge(r),ge(o),n),pe(([E,k,,A,,,,,,,D])=>{const O=D&&D.length!==A;return E&&!k&&!O}),ie(([,,[E,k],A,D,O,V,F,R,C,I])=>{const M=D,{sizeTree:L,offsetTree:H}=M,G=Dt(y);if(A===0)return{...Ju,totalCount:A};if(E===0&&k===0)return G===0?{...Ju,totalCount:A}:Nb(G,O,D,R,C,I||[]);if(We(L))return G>0?null:Oa(LM(Xu(O,A),M,I),[],A,C,M,R);const P=[];if(F.length>0){const U=F[0],N=F[F.length-1];let B=0;for(const W of Sa(L,U,N)){const $=W.value,Y=Math.max(W.start,U),oe=Math.min(W.end,N);for(let z=Y;z<=oe;z++)P.push({index:z,size:$,offset:B,data:I&&I[z]}),B+=$}}if(!V)return Oa([],P,A,C,M,R);const j=F.length>0?F[F.length-1]+1:0,Z=SM(H,E,k,j);if(Z.length===0)return null;const re=A-1,J=wa([],U=>{for(const N of Z){const B=N.value;let W=B.offset,$=N.start;const Y=B.size;if(B.offset<E){$+=Math.floor((E-B.offset+C)/(Y+C));const z=$-N.start;W+=z*Y+z*C}$<j&&(W+=(j-$)*Y,$=j);const oe=Math.min(N.end,re);for(let z=$;z<=oe&&!(W>=k);z++)U.push({index:z,size:Y,offset:W,data:I&&I[z]}),W+=Y+C}});return Oa(J,P,A,C,M,R)}),pe(E=>E!==null),qe()),Ju);ue(q(n,pe(Ru),ie(E=>E==null?void 0:E.length)),t),ue(q(w,ie(E=>E.topListHeight)),d),ue(d,l),ue(q(w,ie(E=>[E.top,E.bottom])),a),ue(q(w,ie(E=>E.items)),v);const g=Yt(q(w,pe(({items:E})=>E.length>0),we(t,n),pe(([{items:E},k])=>E[E.length-1].originalIndex===k-1),ie(([,E,k])=>[E-1,k]),qe(qs),ie(([E])=>E))),S=Yt(q(w,hr(200),pe(({items:E,topItems:k})=>E.length>0&&E[0].originalIndex===k.length),ie(({items:E})=>E[0].index),qe())),T=Yt(q(w,pe(({items:E})=>E.length>0),ie(({items:E})=>{let k=0,A=E.length-1;for(;E[k].type==="group"&&k<A;)k++;for(;E[A].type==="group"&&A>k;)A--;return{startIndex:E[k].index,endIndex:E[A].index}}),qe(Ib)));return{listState:w,topItemsIndexes:m,endReached:g,startReached:S,rangeChanged:T,itemsRendered:v,initialItemCount:y,...f}},Ye(Tn,Ob,Qu,Ys,Ws,Gs,mr,Yu),{singleton:!0}),VM=Me(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(ue(q(a,we(s),pe(([,l])=>l!==0),we(o,e,t,r,n),ie(([[,l],c,u,d,f,h=[]])=>Nb(l,c,u,d,f,h))),i),{}),Ye(Tn,Ys,$r,mr),{singleton:!0}),Fb=Me(([{scrollVelocity:e}])=>{const t=X(!1),n=Ce(),r=X(!1);return ue(q(e,we(r,t,n),pe(([o,s])=>!!s),ie(([o,s,i,a])=>{const{exit:l,enter:c}=s;if(i){if(l(o,a))return!1}else if(c(o,a))return!0;return i}),qe()),t),$e(q(bt(t,e,n),we(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Ye(Gs),{singleton:!0}),$M=Me(([{topItemsIndexes:e}])=>{const t=X(0);return ue(q(t,pe(n=>n>0),ie(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Ye($r)),Lb=Me(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Ce(),i=Mt(q(bt(e,r,t,n,o),ie(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return ue(ge(i),s),{totalListHeight:i,totalListHeightChanged:s}},Ye(Ft,$r),{singleton:!0});function Vb(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const RM=Vb(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),jM=Me(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:f},{log:h},{recalcInProgress:p}])=>{const m=Yt(q(l,we(a),wn(([,v,w,g],[{items:S,totalCount:T,bottom:E,offsetBottom:k},A])=>{const D=E+k;let O=0;return w===T&&v.length>0&&S.length>0&&(S[0].originalIndex===0&&v[0].originalIndex===0||(O=D-g,O!==0&&(O+=A))),[O,S,T,D]},[0,[],0,0]),pe(([v])=>v!==0),we(t,i,r,s,h,p),pe(([,v,w,g,,,S])=>!S&&!g&&v!==0&&w===Hs),ie(([[v],,,,,w])=>(w("Upward scrolling compensation",{amount:v},qt.DEBUG),v))));function y(v){v>0?(be(e,{top:-v,behavior:"auto"}),be(n,0)):(be(n,0),be(e,{top:-v,behavior:"auto"}))}return $e(q(m,we(n,o)),([v,w,g])=>{g&&RM()?be(n,w-v):y(-v)}),$e(q(bt(Mt(o,!1),n,p),pe(([v,w,g])=>!v&&!g&&w!==0),ie(([v,w])=>w),hr(1)),y),ue(q(u,ie(v=>({top:-v}))),e),$e(q(c,we(d,f),ie(([v,{lastSize:w,groupIndices:g,sizeTree:S},T])=>{function E(k){return k*(w+T)}if(g.length===0)return E(v);{let k=0;const A=Bs(S,0);let D=0,O=0;for(;D<v;){D++,k+=A;let V=g.length===O+1?1/0:g[O+1]-g[O]-1;D+V>v&&(k-=A,V=v-D+1),D+=V,k+=E(V),O++}return k}})),v=>{be(n,v),requestAnimationFrame(()=>{be(e,{top:v}),requestAnimationFrame(()=>{be(n,0),be(p,!1)})})}),{deviation:n}},Ye(Ft,Gs,$r,Tn,pr,Yu)),BM=Me(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=X(0);return $e(q(e,we(r),pe(([,o])=>o!==0),ie(([,o])=>({top:o}))),o=>{vn(q(n,Lo(1),pe(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{be(t,o)})})}),{initialScrollTop:r}},Ye(mr,Ft,$r),{singleton:!0}),zM=Me(([{viewportHeight:e},{totalListHeight:t}])=>{const n=X(!1),r=Mt(q(bt(n,e,t),pe(([o])=>o),ie(([,o,s])=>Math.max(0,o-s)),hr(0),qe()),0);return{alignToBottom:n,paddingTopAddition:r}},Ye(Ft,Lb),{singleton:!0}),ed=Me(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ce(),r=Ce(),o=Ce(),s=X(!1),i=X(void 0);return ue(q(bt(n,r),ie(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ue(q(e,we(r),ie(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Ye(Ft)),WM=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>e<n?{...i,behavior:o,align:s??"start"}:t>r?{...i,behavior:o,align:s??"end"}:null,HM=Me(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ce();return ue(q(u,we(e,o,t,s,i,a,r),we(n),ie(([[d,f,h,p,m,y,v,w],g])=>{const{done:S,behavior:T,align:E,calculateViewLocation:k=WM,...A}=d,D=Eb(d,f,p-1),O=zs(D,f.offsetTree,g)+m+y,V=O+on(f.sizeTree,D)[1],F=w+y,R=w+h-v,C=k({itemTop:O,itemBottom:V,viewportTop:F,viewportBottom:R,locationParams:{behavior:T,align:E,...A}});return C?S&&vn(q(l,pe(I=>I===!1),Lo(Dt(l)?1:2)),S):S&&S(),C}),pe(d=>d!==null)),c),{scrollIntoView:u}},Ye(Tn,Ft,Ws,$r,pr),{singleton:!0}),UM=Me(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ce(),u=X(void 0),d=X(null),f=X(null);return ue(a,d),ue(l,f),$e(q(c,we(e,n,i,d,f,r)),([h,p,m,y,v,w,g])=>{const S=PM(p.sizeTree);y&&v!==null&&w!==null&&(m=v.scrollTop-w.offsetTop),m-=g,h({ranges:S,scrollTop:m})}),ue(q(u,pe(Ru),ie(GM)),o),ue(q(s,we(u),pe(([,h])=>h!==void 0),qe(),ie(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},Ye(Tn,Ft,Ys,mr,ed));function GM(e){return{offset:e.scrollTop,index:0,align:"start"}}const YM=Me(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Ye(Qu,VM,mr,Fb,Lb,BM,zM,ed,HM,pr)),$b=Me(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,y,v,{listState:w,topItemsIndexes:g,...S},{scrollToIndex:T},E,{topItemCount:k},{groupCounts:A},D])=>(ue(S.rangeChanged,D.scrollSeekRangeChanged),ue(q(D.windowViewportRect,ie(O=>O.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:g,topItemCount:k,groupCounts:A,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:w,scrollToIndex:T,trackItemSizes:o,itemSize:s,groupIndices:l,...S,...D,...m,sizes:d,...y}),Ye(Tn,Ys,Ft,UM,NM,$r,Ws,jM,$M,Ob,YM)),td="-webkit-sticky",Rb="sticky",jb=Vb(()=>{if(typeof document>"u")return Rb;const e=document.createElement("div");return e.style.position=td,e.style.position===td?td:Rb});function nd(e,t){const n=b.useRef(null),r=b.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,d;if(t){const f=t.getBoundingClientRect(),h=l.top-f.top;u=f.height-Math.max(0,h),d=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=zu(r),i=b.useCallback(()=>{r(s.current)},[r,s]);return b.useEffect(()=>{if(t){t.addEventListener("scroll",i);const a=new ResizeObserver(()=>{requestAnimationFrame(i)});return a.observe(t),()=>{t.removeEventListener("scroll",i),a.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const Ia=b.createContext(void 0),Bb=b.createContext(void 0);function rd(e){return e}const qM=Me(([e,t])=>({...e,...t}),Ye($b,Me(()=>{const e=X(l=>`Item ${l}`),t=X(null),n=X(l=>`Group ${l}`),r=X({}),o=X(rd),s=X("div"),i=X(Lr),a=(l,c=null)=>Mt(q(r,ie(u=>u[l]),qe()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}))),KM=({height:e})=>b.createElement("div",{style:{height:e}}),ZM={position:jb(),zIndex:1,overflowAnchor:"none"},XM={overflowAnchor:"none"},zb=b.memo(function({showTopList:t=!1}){const n=Se("listState"),r=Qt("sizeRanges"),o=Se("useWindowScroll"),s=Se("customScrollParent"),i=Qt("windowScrollContainerState"),a=Qt("scrollContainerState"),l=s||o?i:a,c=Se("itemContent"),u=Se("context"),d=Se("groupContent"),f=Se("trackItemSizes"),h=Se("itemSize"),p=Se("log"),m=Qt("gap"),{callbackRef:y}=hb(r,h,f,t?Lr:l,p,m,s),[v,w]=b.useState(0);id("deviation",C=>{v!==C&&w(C)});const g=Se("EmptyPlaceholder"),S=Se("ScrollSeekPlaceholder")||KM,T=Se("ListComponent"),E=Se("ItemComponent"),k=Se("GroupComponent"),A=Se("computeItemKey"),D=Se("isSeeking"),O=Se("groupIndices").length>0,V=Se("alignToBottom"),F=Se("initialItemFinalLocationReached"),R=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:v!==0?v:V?"auto":0,...F?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?b.createElement(g,tt(g,u)):b.createElement(T,{...tt(T,u),ref:y,style:R,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(C=>{const I=C.originalIndex,M=A(I+n.firstItemIndex,C.data,u);return D?b.createElement(S,{...tt(S,u),key:M,index:C.index,height:C.size,type:C.type||"item",...C.type==="group"?{}:{groupIndex:C.groupIndex}}):C.type==="group"?b.createElement(k,{...tt(k,u),key:M,"data-index":I,"data-known-size":C.size,"data-item-index":C.index,style:ZM},d(C.index,u)):b.createElement(E,{...tt(E,u),...Wb(E,C.data),key:M,"data-index":I,"data-known-size":C.size,"data-item-index":C.index,"data-item-group-index":C.groupIndex,style:XM},O?c(C.index,C.groupIndex,C.data,u):c(C.index,C.data,u))}))}),QM={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},$o=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),JM={width:"100%",position:jb(),top:0,zIndex:1};function tt(e,t){if(typeof e!="string")return{context:t}}function Wb(e,t){return{item:typeof e=="string"?void 0:t}}const eN=b.memo(function(){const t=Se("HeaderComponent"),n=Qt("headerHeight"),r=Se("headerFooterTag"),o=xn(b.useMemo(()=>i=>n(rn(i,"height")),[n])),s=Se("context");return t?b.createElement(r,{ref:o},b.createElement(t,tt(t,s))):null}),tN=b.memo(function(){const t=Se("FooterComponent"),n=Qt("footerHeight"),r=Se("headerFooterTag"),o=xn(b.useMemo(()=>i=>n(rn(i,"height")),[n])),s=Se("context");return t?b.createElement(r,{ref:o},b.createElement(t,tt(t,s))):null});function od({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:s,children:i,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),f=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=mb(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),b.createElement(c,{ref:h,style:{...QM,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...tt(c,f)},i)})}function sd({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:s,children:i,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),f=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:y,scrollToCallback:v}=mb(l,u,c,Lr,h);return dM(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",v),t("scrollBy",y),b.createElement(c,{style:{position:"relative",...s,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...tt(c,p)},i)})}const nN=({children:e})=>{const t=b.useContext(Ia),n=Qt("viewportHeight"),r=Qt("fixedItemHeight"),o=Se("alignToBottom"),s=xn(b.useMemo(()=>Rs(n,i=>rn(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:$o(o),ref:s,"data-viewport-type":"element"},e)},rN=({children:e})=>{const t=b.useContext(Ia),n=Qt("windowViewportRect"),r=Qt("fixedItemHeight"),o=Se("customScrollParent"),s=nd(n,o),i=Se("alignToBottom");return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:s,style:$o(i),"data-viewport-type":"window"},e)},oN=({children:e})=>{const t=Se("TopItemListComponent")||"div",n=Se("headerHeight"),r={...JM,marginTop:`${n}px`},o=Se("context");return b.createElement(t,{style:r,...tt(t,o)},e)},sN=b.memo(function(t){const n=Se("useWindowScroll"),r=Se("topItemsIndexes").length>0,o=Se("customScrollParent"),s=o||n?lN:aN,i=o||n?rN:nN;return b.createElement(s,{...t},r&&b.createElement(oN,null,b.createElement(zb,{showTopList:!0})),b.createElement(i,null,b.createElement(eN,null),b.createElement(zb,null),b.createElement(tN,null)))}),{Component:iN,usePublisher:Qt,useEmitterValue:Se,useEmitter:id}=Bu(qM,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},sN),aN=od({usePublisher:Qt,useEmitterValue:Se,useEmitter:id}),lN=sd({usePublisher:Qt,useEmitterValue:Se,useEmitter:id}),cN=iN,Hb={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},uN={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Ub,ceil:Gb,floor:_a,min:ad,max:Ks}=Math;function dN(e){return{...uN,items:e}}function Yb(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function fN(e,t){return e&&e.column===t.column&&e.row===t.row}function Aa(e,t){return e&&e.width===t.width&&e.height===t.height}const hN=Me(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,f,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:w,windowScrollTo:g},S])=>{const T=X(0),E=X(0),k=X(Hb),A=X({height:0,width:0}),D=X({height:0,width:0}),O=Ce(),V=Ce(),F=X(0),R=X(null),C=X({row:0,column:0}),I=Ce(),M=Ce(),L=X(!1),H=X(0),G=X(!0),P=X(!1);$e(q(p,we(H),pe(([N,B])=>!!B)),()=>{be(G,!1),be(E,0)}),$e(q(bt(p,G,D,A,H,P),pe(([N,B,W,$,,Y])=>N&&!B&&W.height!==0&&$.height!==0&&!Y)),([,,,,N])=>{be(P,!0),Zu(1,()=>{be(O,N)}),vn(q(r),()=>{be(n,[0,0]),be(G,!0)})}),ue(q(M,pe(N=>N!=null&&N.scrollTop>0),bn(0)),E),$e(q(p,we(M),pe(([,N])=>N!=null)),([,N])=>{N&&(be(A,N.viewport),be(D,N==null?void 0:N.item),be(C,N.gap),N.scrollTop>0&&(be(L,!0),vn(q(r,Lo(1)),B=>{be(L,!1)}),be(i,{top:N.scrollTop})))}),ue(q(A,ie(({height:N})=>N)),o),ue(q(bt(ge(A,Aa),ge(D,Aa),ge(C,(N,B)=>N&&N.column===B.column&&N.row===B.row),ge(r)),ie(([N,B,W,$])=>({viewport:N,item:B,gap:W,scrollTop:$}))),I),ue(q(bt(ge(T),t,ge(C,fN),ge(D,Aa),ge(A,Aa),ge(R),ge(E),ge(L),ge(G),ge(H)),pe(([,,,,,,,N])=>!N),ie(([N,[B,W],$,Y,oe,z,Ne,,rt,He])=>{const{row:ot,column:de}=$,{height:Ee,width:ce}=Y,{width:ke}=oe;if(Ne===0&&(N===0||ke===0))return Hb;if(ce===0){const Vt=Xu(He,N),Hr=Vt===0?Math.max(Ne-1,0):Vt;return dN(Yb(Vt,Hr,z))}const ft=Kb(ke,ce,de);let Oe,ht;rt?B===0&&W===0&&Ne>0?(Oe=0,ht=Ne-1):(Oe=ft*_a((B+ot)/(Ee+ot)),ht=ft*Gb((W+ot)/(Ee+ot))-1,ht=ad(N-1,Ks(ht,ft-1)),Oe=ad(ht,Ks(0,Oe))):(Oe=0,ht=-1);const Q=Yb(Oe,ht,z),{top:ae,bottom:_e}=qb(oe,$,Y,Q),Ke=Gb(N/ft),Nt=Ke*Ee+(Ke-1)*ot-_e;return{items:Q,offsetTop:ae,offsetBottom:Nt,top:ae,bottom:_e,itemHeight:Ee,itemWidth:ce}})),k),ue(q(R,pe(N=>N!==null),ie(N=>N.length)),T),ue(q(bt(A,D,k,C),pe(([N,B,{items:W}])=>W.length>0&&B.height!==0&&N.height!==0),ie(([N,B,{items:W},$])=>{const{top:Y,bottom:oe}=qb(N,$,B,W);return[Y,oe]}),qe(qs)),n);const j=X(!1);ue(q(r,we(j),ie(([N,B])=>B||N!==0)),j);const Z=Yt(q(ge(k),pe(({items:N})=>N.length>0),we(T,j),pe(([{items:N},B,W])=>W&&N[N.length-1].index===B-1),ie(([,N])=>N-1),qe())),re=Yt(q(ge(k),pe(({items:N})=>N.length>0&&N[0].index===0),bn(0),qe())),J=Yt(q(ge(k),we(L),pe(([{items:N},B])=>N.length>0&&!B),ie(([{items:N}])=>({startIndex:N[0].index,endIndex:N[N.length-1].index})),qe(Ib),hr(0)));ue(J,f.scrollSeekRangeChanged),ue(q(O,we(A,D,T,C),ie(([N,B,W,$,Y])=>{const oe=Pb(N),{align:z,behavior:Ne,offset:rt}=oe;let He=oe.index;He==="LAST"&&(He=$-1),He=Ks(0,He,ad($-1,He));let ot=ld(B,Y,W,He);return z==="end"?ot=Ub(ot-B.height+W.height):z==="center"&&(ot=Ub(ot-B.height/2+W.height/2)),rt&&(ot+=rt),{top:ot,behavior:Ne}})),i);const U=Mt(q(k,ie(N=>N.offsetBottom+N.bottom)),0);return ue(q(m,ie(N=>({width:N.visibleWidth,height:N.visibleHeight}))),A),{data:R,totalCount:T,viewportDimensions:A,itemDimensions:D,scrollTop:r,scrollHeight:V,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:O,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:w,deviation:F,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:C,restoreStateFrom:M,...f,initialTopMostItemIndex:H,gridState:k,totalListHeight:U,...d,startReached:re,endReached:Z,rangeChanged:J,stateChanged:I,propsReady:h,stateRestoreInProgress:L,...S}},Ye(Qu,Ft,Gs,Fb,mr,ed,pr));function qb(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=ld(e,t,n,r[0].index),i=ld(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function ld(e,t,n,r){const o=Kb(e.width,n.width,t.column),s=_a(r/o),i=s*n.height+Ks(0,s-1)*t.row;return i>0?i+t.row:i}function Kb(e,t,n){return Ks(1,_a((e+n)/(_a(t)+n)))}const pN=Me(([e,t])=>({...e,...t}),Ye(hN,Me(()=>{const e=X(c=>`Item ${c}`),t=X({}),n=X(null),r=X("virtuoso-grid-item"),o=X("virtuoso-grid-list"),s=X(rd),i=X("div"),a=X(Lr),l=(c,u=null)=>Mt(q(t,ie(d=>d[c]),qe()),u);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),mN=b.memo(function(){const t=Je("gridState"),n=Je("listClassName"),r=Je("itemClassName"),o=Je("itemContent"),s=Je("computeItemKey"),i=Je("isSeeking"),a=sn("scrollHeight"),l=Je("ItemComponent"),c=Je("ListComponent"),u=Je("ScrollSeekPlaceholder"),d=Je("context"),f=sn("itemDimensions"),h=sn("gap"),p=Je("log"),m=Je("stateRestoreInProgress"),y=xn(b.useMemo(()=>v=>{const w=v.parentElement.parentElement.scrollHeight;a(w);const g=v.firstChild;if(g){const{width:S,height:T}=g.getBoundingClientRect();f({width:S,height:T})}h({row:Xb("row-gap",getComputedStyle(v).rowGap,p),column:Xb("column-gap",getComputedStyle(v).columnGap,p)})},[a,f,h,p]));return m?null:b.createElement(c,{ref:y,className:n,...tt(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(v=>{const w=s(v.index,v.data,d);return i?b.createElement(u,{key:w,...tt(u,d),index:v.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(l,{...tt(l,d),className:r,"data-index":v.index,key:w},o(v.index,v.data,d))}))}),gN=b.memo(function(){const t=Je("HeaderComponent"),n=sn("headerHeight"),r=Je("headerFooterTag"),o=xn(b.useMemo(()=>i=>n(rn(i,"height")),[n])),s=Je("context");return t?b.createElement(r,{ref:o},b.createElement(t,tt(t,s))):null}),yN=b.memo(function(){const t=Je("FooterComponent"),n=sn("footerHeight"),r=Je("headerFooterTag"),o=xn(b.useMemo(()=>i=>n(rn(i,"height")),[n])),s=Je("context");return t?b.createElement(r,{ref:o},b.createElement(t,tt(t,s))):null}),vN=({children:e})=>{const t=b.useContext(Bb),n=sn("itemDimensions"),r=sn("viewportDimensions"),o=xn(b.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]));return b.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),b.createElement("div",{style:$o(!1),ref:o},e)},bN=({children:e})=>{const t=b.useContext(Bb),n=sn("windowViewportRect"),r=sn("itemDimensions"),o=Je("customScrollParent"),s=nd(n,o);return b.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),b.createElement("div",{ref:s,style:$o(!1)},e)},wN=b.memo(function({...t}){const n=Je("useWindowScroll"),r=Je("customScrollParent"),o=r||n?TN:xN,s=r||n?bN:vN;return b.createElement(o,{...t},b.createElement(s,null,b.createElement(gN,null),b.createElement(mN,null),b.createElement(yN,null)))}),{Component:iV,usePublisher:sn,useEmitterValue:Je,useEmitter:Zb}=Bu(pN,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},wN),xN=od({usePublisher:sn,useEmitterValue:Je,useEmitter:Zb}),TN=sd({usePublisher:sn,useEmitterValue:Je,useEmitter:Zb});function Xb(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,qt.WARN),t==="normal"?0:parseInt(t??"0",10)}const SN=Me(([e,t])=>({...e,...t}),Ye($b,Me(()=>{const e=X(l=>b.createElement("td",null,"Item $",l)),t=X(null),n=X(null),r=X(null),o=X({}),s=X(rd),i=X(Lr),a=(l,c=null)=>Mt(q(o,ie(u=>u[l]),qe()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),EN=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e}})),CN=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e,padding:0,border:0}})),PN={overflowAnchor:"none"},kN=b.memo(function(){const t=Re("listState"),n=an("sizeRanges"),r=Re("useWindowScroll"),o=Re("customScrollParent"),s=an("windowScrollContainerState"),i=an("scrollContainerState"),a=o||r?s:i,l=Re("itemContent"),c=Re("trackItemSizes"),u=Re("itemSize"),d=Re("log"),{callbackRef:f,ref:h}=hb(n,u,c,a,d,void 0,o),[p,m]=b.useState(0);cd("deviation",M=>{p!==M&&(h.current.style.marginTop=`${M}px`,m(M))});const y=Re("EmptyPlaceholder"),v=Re("ScrollSeekPlaceholder")||EN,w=Re("FillerRow")||CN,g=Re("TableBodyComponent"),S=Re("TableRowComponent"),T=Re("computeItemKey"),E=Re("isSeeking"),k=Re("paddingTopAddition"),A=Re("firstItemIndex"),D=Re("statefulTotalCount"),O=Re("context");if(D===0&&y)return b.createElement(y,tt(y,O));const V=t.offsetTop+k+p,F=t.offsetBottom,R=V>0?b.createElement(w,{height:V,key:"padding-top",context:O}):null,C=F>0?b.createElement(w,{height:F,key:"padding-bottom",context:O}):null,I=t.items.map(M=>{const L=M.originalIndex,H=T(L+A,M.data,O);return E?b.createElement(v,{...tt(v,O),key:H,index:M.index,height:M.size,type:M.type||"item"}):b.createElement(S,{...tt(S,O),...Wb(S,M.data),key:H,"data-index":L,"data-known-size":M.size,"data-item-index":M.index,style:PN},l(M.index,M.data,O))});return b.createElement(g,{ref:f,"data-testid":"virtuoso-item-list",...tt(g,O)},[R,...I,C])}),ON=({children:e})=>{const t=b.useContext(Ia),n=an("viewportHeight"),r=an("fixedItemHeight"),o=xn(b.useMemo(()=>Rs(n,s=>rn(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:$o(!1),ref:o,"data-viewport-type":"element"},e)},IN=({children:e})=>{const t=b.useContext(Ia),n=an("windowViewportRect"),r=an("fixedItemHeight"),o=Re("customScrollParent"),s=nd(n,o);return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:s,style:$o(!1),"data-viewport-type":"window"},e)},_N=b.memo(function(t){const n=Re("useWindowScroll"),r=Re("customScrollParent"),o=an("fixedHeaderHeight"),s=an("fixedFooterHeight"),i=Re("fixedHeaderContent"),a=Re("fixedFooterContent"),l=Re("context"),c=xn(b.useMemo(()=>Rs(o,w=>rn(w,"height")),[o])),u=xn(b.useMemo(()=>Rs(s,w=>rn(w,"height")),[s])),d=r||n?MN:DN,f=r||n?IN:ON,h=Re("TableComponent"),p=Re("TableHeadComponent"),m=Re("TableFooterComponent"),y=i?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...tt(p,l)},i()):null,v=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...tt(m,l)},a()):null;return b.createElement(d,{...t},b.createElement(f,null,b.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...tt(h,l)},[y,b.createElement(kN,{key:"TableBody"}),v])))}),{Component:AN,usePublisher:an,useEmitterValue:Re,useEmitter:cd}=Bu(SN,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},_N),DN=od({usePublisher:an,useEmitterValue:Re,useEmitter:cd}),MN=sd({usePublisher:an,useEmitterValue:Re,useEmitter:cd}),NN=AN,FN=e=>{const[t,n]=b.useState(0);return b.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const s=()=>{n(o.clientHeight)};return o.addEventListener("resize",s),s(),()=>{o.removeEventListener("resize",s)}},[]),t},LN={Item:b.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:b.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},VN=e=>{const t=b.useRef(null),n=FN(t);return x.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[x.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[x.jsx("header",{className:"border-b border-card-border pb-2"}),x.jsxs("div",{className:"px-8 space-y-2",children:[x.jsx(Ls,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(cN,{height:n,useWindowScroll:!0,data:e.source,components:LN,itemContent:(r,o)=>x.jsx(b.Fragment,{children:x.jsx(wv,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(ns,{children:x.jsx(kl,{})})}),x.jsx("div",{})]})};var $N=Object.defineProperty,Qb=Object.getOwnPropertySymbols,RN=Object.prototype.hasOwnProperty,jN=Object.prototype.propertyIsEnumerable,Jb=(e,t,n)=>t in e?$N(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,BN=(e,t)=>{for(var n in t||(t={}))RN.call(t,n)&&Jb(e,n,t[n]);if(Qb)for(var n of Qb(t))jN.call(t,n)&&Jb(e,n,t[n]);return e},ud=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},zN=(e,t,n,r)=>Ma(ud,e,t,n,r),Ro=e=>typeof e=="object",gr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Ro(e)&&!Ro(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>gr(e[r],t[r]))},WN=(e,t)=>(Ro(e)||Array.isArray(e))&&t?e[t]:e,HN=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Da=e=>/[0-9.]+/.test(e),e0=e=>["string","number"].includes(typeof e),t0=e=>e==null||(e==null?void 0:e.length)===0||e==="",n0={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:t0,notEmpty:e=>!t0(e),in:(e,t)=>ud(t,n=>gr(e,n)),notIn:(e,t)=>r0(t,n=>!gr(e,n))},UN=e=>{if(e in n0)return n0[e];throw new Error("Linq - Symbol not found")},jo=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},Ma=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=UN(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},GN=(e,t,n,r)=>Ma(jo,e,t,n,r),r0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},YN=(e,t,n,r)=>Ma(r0,e,t,n,r),o0=e=>{if(e===null)return null;const t=BN({},e);return Object.keys(t).forEach(n=>t[n]=Ro(e[n])?o0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},s0=(e,t)=>{if(Ro(t)){for(let n=0;n<e.length;n++){const r=e[n];if(gr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(gr(t,r))return!0}return!1},qN=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},KN=e=>jo(e,(t,n,r)=>Ro(t)?n===r.findIndex(o=>gr(o,t)):n===r.indexOf(t)),ZN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},i0=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),s=n.get(o)||[];s.push(r),n.set(o,s)}),Object.fromEntries(n.entries())},XN=(e,t)=>i0(e,n=>n[t]),a0=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const s=t(e[r],r,e);n.push(s)}return n},QN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},JN=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const s=t.charCodeAt(0);for(;o<=s;o+=n)r.push(String.fromCharCode(o));return Da(e)&&Da(t)?r.map(i=>Number.parseInt(i)):r},dd=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Da(e)&&Da(t)){const o=[],[s,i]=QN(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return JN(e,t,r)},eF=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?dd(r,o,1):dd(r,s,Number.parseInt(o,10))}return e0(e)&&e0(t)?dd(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},fd=(e,t,n)=>{let r=t;const o=n.length;for(let s=0;s<o;s++){const i=n[s];r=e(r,i,s,n)}return r},l0=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let s=t[n];t[n]=t[r],t[r]=s}return t},tF=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},nF=(e,t,n,r)=>Ma(tF,e,t,n,r),c0=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(HN(t))},u0=(e=>(e.Asc="asc",e.Desc="desc",e))(u0||{}),rF=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.key,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),oF=(e,t)=>e.sort(rF(t)),sF=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:jo(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},iF=class Wd{constructor(t=[]){this.array=t}static Range(...t){return eF(...t)}static New(t){return new Wd(t)}Where(t,n,r){return this.array=GN(this.array,t,n,r),this}Some(t,n,r){return zN(this.array,t,n,r)}All(t,n,r){return YN(this.array,t,n,r)}Reverse(){return this.array=l0(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=nF(this.array,t,n,r),this}Distinct(){return this.array=KN(this.array),this}First(t){return t===void 0?this.array[0]:ZN(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?fd((n,r)=>n+r,0,this.array):fd((n,r)=>n+WN(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return XN(this.array,t)}GroupWith(t){return i0(this.array,t)}Except(t){return jo(this.array,n=>!s0(t,n))}Intersect(t){return jo(this.array,n=>s0(t,n))}OrderBy(t,n){let r;return r=t?c0(this.array,t):this.array.toSorted(),this.array=n==="desc"?l0(r):r,this}Includes(t){return ud(this.array,n=>gr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return fd(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(a0(this.array,n=>[t,n]))}Zip(t,n){return a0(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:jo(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Wd(o0(this.array))}ToObject(t){return qN(this.array,t)}Sort(t){return Array.isArray(t)?oF(this.array,t):c0(this.array,t)}Unique(t){return sF(this.array,t)}},d0=iF;const f0=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t};var hd={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(y,v)=>{try{Object.keys(y).forEach(v)}catch(w){window.console.log(w)}},n=y=>y==null,r=y=>{const v=typeof y;return v==="string"||v==="number"||v==="boolean"||n(y)},o=(y,v)=>{const w=v.getItem(y);try{return JSON.parse(w)}catch{return w??null}},s=y=>Object.keys(y).reduce((v,w)=>({...v,[w]:o(w,y)}),{}),i=y=>y instanceof Date?y:typeof y=="number"?new Date(new Date*1+y*864e5):y,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(y=>y.split("=")).reduce((y,v)=>(y[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),y),{}),c=new Set,u=()=>{const y=l();c.forEach(v=>v(y))},d=[{name:"expires",parse:y=>`expires=${i(y.expires??a)}`},{name:"maxAge",parse:y=>y.maxAge?`max-age=${i(y.expires??a)}`:""},{name:"path",parse:y=>`path=${y.path??"/"}`},{name:"sameSite",parse:y=>`samesite=${y.sameSite??"strict"}`},{name:"useSecure",parse:y=>`${y.useSecure??!0?"secure":""}`},{name:"domain",parse:y=>{const v=y.domain??"";return v===""?"":`domain=${y.multiDomain?".":""}${v}`}},{name:"partitioned",parse:y=>y.partitioned?"Partitioned":""}],f={json:l,listener:y=>(c.add(y),()=>c.delete(y)),clearListeners:()=>c.clear(),has:y=>document.cookie.split(";").some(v=>v.trim().startsWith(`${y}=`)),deleteAll:()=>{document.cookie.split(";").forEach(y=>{document.cookie=y.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:y=>{const v=f.json()[y];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:y=>{document.cookie=`${encodeURIComponent(y)}=;expires=${new Date().toUTCString()}`,u()},set:(y,v,w={})=>{const g=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=d.reduce((T,E)=>{const k=E.parse(w);return k===""?T:T.concat(k)},[`${encodeURIComponent(y)}=${g}`]).join(";");document.cookie=S,u()}},h=y=>{const v=new Set,w=g=>{y().removeItem(g);const S=s(y());v.forEach(T=>T(S))};return{delete:w,listener:g=>(v.add(g),()=>v.delete(g)),clearListeners:()=>v.clear(),json:(g=!1)=>g?s(y()):y(),has:g=>{const S=y().getItem(g);return!n(S)},deleteAll:()=>{t(y(),w),v.forEach(g=>g(y()))},get:g=>o(g,y()),set:(g,S)=>{y().setItem(g,JSON.stringify(S)),v.forEach(T=>T(y()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(hd);const pd=e=>e.headerLabel??e.thead??e.id,md=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Bo=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Bo||{});const gd=e=>e.type==="number"?e.valueAsNumber:e.value,aF=e=>{let t=[];return e({add:(o,s,i)=>t.push({...i,id:o,thead:s}),remove:o=>t=t.filter(s=>s.id!==o)}),t},lF={},cF=(e,t=lF)=>{const n=fa()?null:hd.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=Wc({name:e,groups:t.groups||(n==null?void 0:n.groups)||[],sorters:t.sorters||(n==null?void 0:n.sorters)||[],filters:t.filters||(n==null?void 0:n.filters)||[],cols:t.cols||(n==null?void 0:n.cols)||[]},s=>{const i=a=>{const l=s.state(),c={...l,...a};return fa()||hd.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>i(a)}});return{...r,...o,name:e}},yd=(e,t,n,r={})=>{var l;const o=e.id,s=e.type??Bo.Text,i=(l=t[s])==null?void 0:l[0].value,a=n[i];return{id:da(),operation:a,label:pd(e),name:o,type:s,value:"",...r}},vd=()=>{const e=tn(),t=b.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{operationOptions:b.useMemo(()=>({[Bo.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Bo.Boolean]:[t.is,t.isNot],[Bo.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},uF=e=>{const t=tn(),{operationOptions:n,operations:r}=vd(),o=()=>{const c=e.cols.at(0);e.set(u=>[...u,yd(c,n,r)])},s=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(f=>f.map(h=>{if(u!==h.id)return h;const p=e.cols.find(m=>d===m.id);return yd(p,n,r,{value:""})}))},i=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(f=>f.map(h=>h.id===u?{...h,operation:r[d]}:h))},a=c=>{const u=c.currentTarget.dataset.id||"";e.set(d=>d.filter(f=>f.id!==u))},l=c=>{const u=c.target.dataset.id||"",d=gd(c.target);e.set(f=>f.map(h=>h.id===u?{...h,value:d}:h))};return x.jsx(b.Fragment,{children:x.jsx(Ao,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(B1,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(c=>{const u=n[c.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(dr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:c.name,"data-id":c.id,onChange:s}),x.jsx(dr,{"data-id":c.id,onChange:i,value:c.operation.value,options:u,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Ls,{"data-id":c.id,onChange:l,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:c.type,value:c.value,optionalText:""}),x.jsx("div",{className:"flex items-center justify-center mt-5",children:x.jsx("button",{"data-id":c.id,type:"button",onClick:a,children:x.jsx(to,{className:"text-danger",size:16})})})]},`filter-select-${c.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(Ol,{size:14})," ",t.tableFilterNewFilter]})})]})})})},dF=({filter:e,onDelete:t,set:n})=>{const r=tn(),{operationOptions:o,operations:s}=vd(),i=l=>{const c=l.target.value,u=l.target.dataset.id||"";n(d=>d.map(f=>f.id===u?{...f,operation:s[c]}:f))},a=l=>{const c=l.target.dataset.id||"",u=gd(l.target);n(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(dr,{"data-id":e.id,onChange:i,options:o[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder,value:e.operation.value}),x.jsx(Ls,{"data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),x.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:x.jsx(to,{className:"text-danger",size:14})})]})},fF=({item:e,onPointerDown:t})=>{const n=ho(0);return x.jsxs($i.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[x.jsx("button",{type:"button",className:"cursor-grab",children:x.jsx(R1,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},hF=e=>{var a;const t=md(e.cols),n=AP(),[r,o]=b.useState(((a=e.groups[0])==null?void 0:a.thead)||""),s=l=>{var m;const c=l.target,u=c.value,d=c.options.selectedIndex,f=((m=c.options.item(d))==null?void 0:m.label)||"";o(f);const h=new d0(e.rows).GroupBy(u),p=e.cols.find(y=>y.id===u);e.setGroups(Wx(h).map((y,v)=>{const w=h[y];return{...p,groupId:da(),groupKey:u,index:v,rows:w,groupName:y}}))},i=()=>e.setGroups([]);return x.jsx(b.Fragment,{children:x.jsxs(Ao,{arrow:!1,title:"Groups",trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(W1,{size:14}),"Groups",e.groups.length>0?` - ${r}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(dr,{value:r,title:"Tipo de agrupamento",onChange:s,options:t,placeholder:"Agrupar por..."}),x.jsx(ns,{className:"mt-4",onClick:i,theme:"raw","data-id":r,children:x.jsx(to,{size:16,className:"text-danger"})})]}),e.groups.length>0?x.jsxs("section",{className:"my-4",children:[x.jsx("header",{children:x.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),x.jsx(gP,{children:x.jsx($i.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:n,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>x.jsx(fF,{item:l,onPointerDown:c=>{n.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},pF=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.value,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),mF=(e,t)=>e.toSorted(pF(t)),h0=(e,t,n)=>({id:da(),type:n,value:e.id,label:t}),gF=e=>{const t=tn(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,h0(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(b.Fragment,{children:x.jsx(Ao,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(Qf,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(dr,{options:e.options,value:l.value,onChange:s(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(dr,{onChange:i(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),x.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:x.jsx(to,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(Ol,{size:14})," ",t.tableSortAddButton]})})]})})})},yF=e=>{const t=tn(),[n,r]=b.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");b.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=h0(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=pd(e.col);return x.jsxs("button",{"aria-labelledby":s,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:s,className:"sr-only",children:[t.tableSortDropdownTitle," ",i]}),n==="asc"?x.jsx(M1,{size:14}):null,n==="desc"?x.jsx(D1,{size:14}):null,n==="undefined"?x.jsx(Qf,{size:14}):null]})},vF=e=>x.jsx("header",{className:"min-w-full mb-1",children:x.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[x.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[x.jsx("span",{children:x.jsx(uF,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(gF,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(hF,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),x.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>x.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[x.jsxs("span",{children:[x.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),x.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[x.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),x.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=gd(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function bF(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2;const o=e-r,s=e+r;for(let a=o>2?o:2;a<=Math.min(t,s);a++)n.push(a);const i=t-2;return s+1!==i&&s+1<t&&n.push("_"),s<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const wF=e=>{const t=b.useId(),n=tn(),r=e.asLink||"button",o=b.useMemo(()=>bF(e.current,e.pages),[e.current,e.pages]),s=e.current<e.pages;return x.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(b.Fragment,{children:[x.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),x.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>x.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(i=>i===null?null:x.jsx(b.Fragment,{children:typeof i=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(r,{href:i,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${i===e.current?"text-primary border-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),s?x.jsx("li",{children:x.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},xF={opacity:1},TF={opacity:.75,backgroundColor:"var(--table-border)"},SF={opacity:0,transition:{duration:.4,type:"spring"}},EF=e=>{var d;const t=tn(),n=e.filters.filter(f=>f.name===e.header.id),o=n.length>0?U1:z1,{operationOptions:s,operations:i}=vd(),a=f=>{const h=f.currentTarget.dataset.id||"";return e.setFilters(p=>p.filter(m=>m.id!==h))},l=e.sorters.find(f=>e.header.id===f.value),c=l!=null&&l.type?l.type===u0.Asc?"ascending":"descending":"none",u=pd(e.header);return x.jsx($i.Item,{...e.header.thProps,as:"th",exit:SF,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader",value:e.header,whileDrag:TF,"aria-sort":c,"aria-busy":e.loading,animate:xF,className:`hidden font-medium px-2 py-4 first:table-cell md:table-cell ${((d=e.header.thProps)==null?void 0:d.className)??""}`,children:x.jsx("span",{className:"flex items-center justify-between",children:x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx(Ao,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",u]}),x.jsx(o,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:x.jsxs("span",{children:[t.tableFilterDropdownTitleUnique," ",x.jsx("span",{className:"text-primary",children:u})]}),children:n.length===0===null?null:x.jsxs("ul",{className:"font-medium",children:[n.map(f=>x.jsx("li",{className:"my-1",children:x.jsx(dF,{onDelete:a,filter:f,set:e.setFilters})},`thead-filter-${f.id}`)),x.jsx("li",{children:x.jsxs("button",{onClick:()=>e.setFilters(f=>f.concat(yd(e.header,s,i))),type:"button",className:"text-primary flex items-center gap-1",children:[x.jsx(Ol,{size:14})," ",t.tableFilterNewFilter]})})]})}),x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),x.jsx(yF,{col:e.header,setSorters:e.setSorters,sorters:e.sorters})]})})})},CF=e=>x.jsx($i.Group,{as:"tr",role:"row",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"bg-table-background border-none text-lg",children:x.jsx(Vi,{children:e.headers.map(t=>x.jsx(EF,{loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),PF=e=>Math.min(Math.max(e+e*(e%2===0?2:4)+10,50),90),kF=b.forwardRef((e,t)=>x.jsx("tbody",{...e,role:"rowgroup",className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:x.jsx(Vi,{children:e.children})})),OF=b.forwardRef((e,t)=>x.jsx("table",{...e,ref:t,role:"table",className:`table min-w-full divide-y divide-table-border table-auto text-left ${e.className??""}`})),IF=b.forwardRef(({context:e,...t},n)=>x.jsx("thead",{...t,role:"rowgroup",className:"bg-card-background shadow-xs group:sticky top-0",ref:n})),_F=b.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${n.className??""}`})),AF=b.forwardRef((e,t)=>e.context.loadingMore?x.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:x.jsx("tr",{role:"row",className:"bg-card-background",children:x.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:x.jsx("span",{className:"block w-full h-2 bg-foreground rounded opacity-60 animate-pulse"})})})}):null),DF={TableHead:IF,Table:OF,TableBody:kF,TableRow:_F,TableFoot:AF},MF=[0,0,0,0,0,0,0,0,0,0],NF=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(b.Fragment,{children:r.map((s,i)=>{const a=`${i},${e}`,l=pv(t,s.id),c=s.Element;return b.createElement("td",{...s.cellProps,"data-matrix":a,role:"cell",key:`accessor-${e}-${i}`,className:"px-2 h-14 border-none first:table-cell hidden md:table-cell"},o?x.jsx("div",{className:"animate-pulse h-2 bg-table-border rounded",style:{width:`${PF(e)}%`}}):c?x.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):x.jsx(b.Fragment,{children:Pn.nil(l)?"":l}))})})},FF=()=>x.jsx(b.Fragment,{}),p0=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:s,sorters:i,cols:a,border:l=!1,setSorters:c,...u})=>{const d=b.useRef(null),[f,h]=b.useState(!1),p=f0(n),m=f0(u.loadingMore),y=b.useMemo(()=>{if(u.loading)return MF;if(r)return u.rows;const v=new d0(u.rows);return e.length>0&&e.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:v.Where(w.name,w.operation.symbol,w.value)),i.length===0?v.Select():mF(v.Select(),i)},[u.rows,e,i,u.loading]);return b.useEffect(()=>{if(d.current===null)return()=>{};const v=d.current,w=new IntersectionObserver(g=>{var E;return g[g.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void h(!0)):h(!1)});return w.observe(v),()=>w.disconnect()},[]),x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg px-1 ${l?"border border-table-border":""}`,children:[x.jsx(NN,{data:y,useWindowScroll:!0,components:DF,totalCount:y.length,itemContent:NF,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:f?FF:null,fixedHeaderContent:()=>x.jsx(CF,{headers:a,sorters:i,filters:e,setCols:o,setSorters:c,setFilters:s,loading:!!u.loading})}),x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),t!==null?x.jsx(wF,{...t}):null]})},LF=(e,t)=>typeof t=="function"?t(e):t,VF=e=>{const t=e.operations??!0,n=b.useMemo(()=>md(e.cols),[e.cols]),[r,o]=Wc({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},s=>{const i=a=>l=>{const c=s.state();return{...c,[a]:LF(c[a],l)}};return{cols:i("cols"),filters:i("filters"),groups:i("groups"),sorters:i("sorters")}},{postMiddleware:[s=>{var i;return(i=e.set)==null||i.call(e,s),s}]});return x.jsxs("div",{className:"relative min-w-full",children:[t?x.jsx(vF,{setCols:o.cols,rows:e.rows,cols:r.cols,filters:r.filters,groups:r.groups,options:n,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):null,r.groups.length===0?x.jsx(p0,{...e,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,groups:r.groups,index:0,optionCols:n,options:n,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):x.jsx("div",{className:"flex flex-wrap gap-4",children:r.groups.map((s,i)=>x.jsx(Ht.div,{className:"min-w-full",children:x.jsx(p0,{...e,pagination:null,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,group:s,groups:r.groups,index:i,optionCols:n,options:n,rows:s.rows,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters})},`group-${s.groupId}`))})]})},m0=(e="")=>pt("w-full min-w-36 outline-none px-2 py-1 items-center flex justify-between text-left","data-[active=true]:bg-primary data-[open]:bg-primary focus:bg-primary aria-expanded:opacity-80","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),bd=b.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),g0=b.forwardRef(({children:e,isParent:t,label:n,...r},o)=>{const s=lr(),i=s!==null,[a,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(null),h=b.useRef([]),p=b.useRef([]),m=b.useContext(bd),y=cr(),v=H_(),w=Ay(),{floatingStyles:g,refs:S,context:T}=Ms({nodeId:v,open:a,transform:!0,onOpenChange:l,whileElementsMounted:Qi,placement:i?"right-start":"bottom-start",middleware:[ta({mainAxis:i?0:4,alignmentAxis:i?-4:0}),uu(),cu()]}),E=Fs(T,{role:"menu",enabled:!0}),k=Ds(T,{bubbles:!0}),A=Ry(T,{enabled:!0,delay:{open:100},handleClose:gA({blockPointerEvents:!0})}),D=vu(T,{event:"mousedown",toggle:!i,ignoreMouse:i,keyboardHandlers:!0}),O=sv(T,{loop:!0,activeIndex:d,virtual:!0,nested:i,allowEscape:!0,listRef:h,scrollItemIntoView:!0,onNavigate:f}),V=pA(T,{activeIndex:d,listRef:p,onMatch:a?f:void 0}),{getReferenceProps:F,getFloatingProps:R,getItemProps:C}=Ns([A,D,E,k,O,V]);b.useEffect(()=>{if(!y)return;const M=()=>l(!1),L=H=>{H.nodeId!==v&&H.parentId===s&&l(!1)};return y.events.on("click",M),y.events.on("menuopen",L),()=>{y.events.off("click",M),y.events.off("menuopen",L)}},[y,v,s]),b.useEffect(()=>{a&&y&&y.events.emit("menuopen",{parentId:s,nodeId:v})},[y,a,v,s]);const I=t?r.className:m0(r.className);return x.jsxs(U_,{id:v,children:[x.jsxs("button",{ref:Py([S.setReference,w.ref,o]),tabIndex:i?m.activeIndex===w.index?0:-1:void 0,"data-open":a?"":void 0,"data-nested":i?"":void 0,role:i?"menuitem":void 0,"data-focus-inside":c?"":void 0,className:I,...F(m.getItemProps({...r,onFocus(M){var L;(L=r.onFocus)==null||L.call(r,M),u(!1),m.setHasFocusInside(!0)}})),children:[n,i&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(kl,{size:14})]})]}),x.jsx(bd.Provider,{value:{activeIndex:d,setActiveIndex:f,getItemProps:C,setHasFocusInside:u,isOpen:a},children:x.jsx(j_,{elementsRef:h,labelsRef:p,children:a&&x.jsx(As,{preserveTabOrder:!0,children:x.jsx(la,{context:T,modal:!1,initialFocus:i?-1:0,returnFocus:!i,children:x.jsx("div",{ref:S.setFloating,style:g,className:"bg-floating-background z-tooltip isolate outline-none items-start border text-left shadow-xl border-floating-border flex flex-col rounded-lg",...R(),children:e})})})})})]})}),$F=b.forwardRef(({label:e,Right:t,disabled:n,...r},o)=>{const s=b.useContext(bd),i=Ay({label:n?null:e}),a=cr(),l=i.index===s.activeIndex;return x.jsxs("button",{...r,ref:Py([i.ref,o]),"data-active":l,type:"button",role:"menuitem",disabled:n,tabIndex:l?0:-1,className:m0(r.className),...s.getItemProps({onClick(c){var u;(u=r.onClick)==null||u.call(r,c),a==null||a.events.emit("click")},onFocus(c){var u;(u=r.onFocus)==null||u.call(r,c),s.setHasFocusInside(!0)}}),children:[e,t?x.jsx(t,{size:16}):null]})}),RF=b.forwardRef((e,t)=>lr()!==null?x.jsx(g0,{...e,isParent:!1,ref:t}):x.jsx(G_,{children:x.jsx(g0,{...e,isParent:!0,ref:t})}));var jF=String.prototype.replace,BF=/%20/g,wd={RFC1738:"RFC1738",RFC3986:"RFC3986"},xd={default:wd.RFC3986,formatters:{RFC1738:function(e){return jF.call(e,BF,"+")},RFC3986:function(e){return String(e)}},RFC1738:wd.RFC1738,RFC3986:wd.RFC3986},zF=xd,Td=Object.prototype.hasOwnProperty,Rr=Array.isArray,Sn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),WF=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Rr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},y0=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},HF=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Rr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Td.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Rr(t)&&!Rr(n)&&(o=y0(t,r)),Rr(t)&&Rr(n)?(n.forEach(function(s,i){if(Td.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 Td.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},UF=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},GF=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Sd=1024,YF=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=Sd){for(var c=i.length>=Sd?i.slice(l,l+Sd):i,u=[],d=0;d<c.length;++d){var f=c.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===zF.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=Sn[f];continue}if(f<2048){u[u.length]=Sn[192|f>>6]+Sn[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=Sn[224|f>>12]+Sn[128|f>>6&63]+Sn[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=Sn[240|f>>18]+Sn[128|f>>12&63]+Sn[128|f>>6&63]+Sn[128|f&63]}a+=u.join("")}return a},qF=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return WF(n),t},KF=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},ZF=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},XF=function(t,n){return[].concat(t,n)},QF=function(t,n){if(Rr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},v0={arrayToObject:y0,assign:UF,combine:XF,compact:qF,decode:GF,encode:YF,isBuffer:ZF,isRegExp:KF,maybeMap:QF,merge:HF},b0=Tx,Na=v0,Zs=xd,JF=Object.prototype.hasOwnProperty,w0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},En=Array.isArray,eL=Array.prototype.push,x0=function(e,t){eL.apply(e,En(t)?t:[t])},tL=Date.prototype.toISOString,T0=Zs.default,gt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Na.encode,encodeValuesOnly:!1,format:T0,formatter:Zs.formatters[T0],indices:!1,serializeDate:function(t){return tL.call(t)},skipNulls:!1,strictNullHandling:!1},nL=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Ed={},rL=function e(t,n,r,o,s,i,a,l,c,u,d,f,h,p,m,y,v,w){for(var g=t,S=w,T=0,E=!1;(S=S.get(Ed))!==void 0&&!E;){var k=S.get(t);if(T+=1,typeof k<"u"){if(k===T)throw new RangeError("Cyclic object value");E=!0}typeof S.get(Ed)>"u"&&(T=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&En(g)&&(g=Na.maybeMap(g,function(P){return P instanceof Date?h(P):P})),g===null){if(i)return c&&!y?c(n,gt.encoder,v,"key",p):n;g=""}if(nL(g)||Na.isBuffer(g)){if(c){var A=y?n:c(n,gt.encoder,v,"key",p);return[m(A)+"="+m(c(g,gt.encoder,v,"value",p))]}return[m(n)+"="+m(String(g))]}var D=[];if(typeof g>"u")return D;var O;if(r==="comma"&&En(g))y&&c&&(g=Na.maybeMap(g,c)),O=[{value:g.length>0?g.join(",")||null:void 0}];else if(En(u))O=u;else{var V=Object.keys(g);O=d?V.sort(d):V}var F=l?n.replace(/\./g,"%2E"):n,R=o&&En(g)&&g.length===1?F+"[]":F;if(s&&En(g)&&g.length===0)return R+"[]";for(var C=0;C<O.length;++C){var I=O[C],M=typeof I=="object"&&typeof I.value<"u"?I.value:g[I];if(!(a&&M===null)){var L=f&&l?I.replace(/\./g,"%2E"):I,H=En(g)?typeof r=="function"?r(R,L):R:R+(f?"."+L:"["+L+"]");w.set(t,T);var G=b0();G.set(Ed,w),x0(D,e(M,H,r,o,s,i,a,l,r==="comma"&&y&&En(g)?null:c,u,d,f,h,p,m,y,v,G))}}return D},oL=function(t){if(!t)return gt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||gt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Zs.default;if(typeof t.format<"u"){if(!JF.call(Zs.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Zs.formatters[r],s=gt.filter;(typeof t.filter=="function"||En(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in w0?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=gt.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:gt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:gt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:gt.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:gt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?gt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:gt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:gt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:gt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:gt.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:gt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:gt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:gt.strictNullHandling}},sL=function(e,t){var n=e,r=oL(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):En(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=w0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=b0(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||x0(i,rL(n[d],d,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var f=i.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},zo=v0,Cd=Object.prototype.hasOwnProperty,iL=Array.isArray,dt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:zo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},aL=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},S0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},lL="utf8=%26%2310003%3B",cL="utf8=%E2%9C%93",uL=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,i=o.split(n.delimiter,s),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<i.length;++l)i[l].indexOf("utf8=")===0&&(i[l]===cL?c="utf-8":i[l]===lL&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],d=u.indexOf("]="),f=d===-1?u.indexOf("="):d+1,h,p;f===-1?(h=n.decoder(u,dt.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),dt.decoder,c,"key"),p=zo.maybeMap(S0(u.slice(f+1),n),function(y){return n.decoder(y,dt.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=aL(p)),u.indexOf("[]=")>-1&&(p=iL(p)?[p]:p);var m=Cd.call(r,h);m&&n.duplicates==="combine"?r[h]=zo.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},dL=function(e,t,n,r){for(var o=r?t:S0(t,n),s=e.length-1;s>=0;--s){var i,a=e[s];if(a==="[]"&&n.parseArrays)i=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?i={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[],i[u]=o):c!=="__proto__"&&(i[c]=o)}o=i}return o},fL=function(t,n,r,o){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&i.exec(s),c=l?s.slice(0,l.index):s,u=[];if(c){if(!r.plainObjects&&Cd.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&&Cd.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),dL(u,n,r,o)}},hL=function(t){if(!t)return dt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?dt.charset:t.charset,r=typeof t.duplicates>"u"?dt.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:dt.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:dt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:dt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:dt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:dt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:dt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:dt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:dt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:dt.decoder,delimiter:typeof t.delimiter=="string"||zo.isRegExp(t.delimiter)?t.delimiter:dt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:dt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:dt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:dt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:dt.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:dt.strictNullHandling}},pL=function(e,t){var n=hL(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?uL(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=fL(a,r[a],n,typeof e=="string");o=zo.merge(o,l,n)}return n.allowSparse===!0?o:zo.compact(o)},mL=sL,gL=pL,yL=xd,vL={formats:yL,parse:gL,stringify:mL},Pe;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Pe||(Pe={}));var E0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(E0||(E0={}));const ne=Pe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),jr=e=>{switch(typeof e){case"undefined":return ne.undefined;case"string":return ne.string;case"number":return isNaN(e)?ne.nan:ne.number;case"boolean":return ne.boolean;case"function":return ne.function;case"bigint":return ne.bigint;case"symbol":return ne.symbol;case"object":return Array.isArray(e)?ne.array:e===null?ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ne.promise:typeof Map<"u"&&e instanceof Map?ne.map:typeof Set<"u"&&e instanceof Set?ne.set:typeof Date<"u"&&e instanceof Date?ne.date:ne.object;default:return ne.unknown}},K=Pe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Jt extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof Jt))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Pe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Jt.create=e=>new Jt(e);const Xs=(e,t)=>{let n;switch(e.code){case K.invalid_type:e.received===ne.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case K.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Pe.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:n=`Unrecognized key(s) in object: ${Pe.joinValues(e.keys,", ")}`;break;case K.invalid_union:n="Invalid input";break;case K.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Pe.joinValues(e.options)}`;break;case K.invalid_enum_value:n=`Invalid enum value. Expected ${Pe.joinValues(e.options)}, received '${e.received}'`;break;case K.invalid_arguments:n="Invalid function arguments";break;case K.invalid_return_type:n="Invalid function return type";break;case K.invalid_date:n="Invalid date";break;case K.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Pe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case K.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case K.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case K.custom:n="Invalid input";break;case K.invalid_intersection_types:n="Intersection results could not be merged";break;case K.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case K.not_finite:n="Number must be finite";break;default:n=t.defaultError,Pe.assertNever(e)}return{message:n}};let bL=Xs;function Pd(){return bL}const kd=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}};function te(e,t){const n=Pd(),r=kd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Xs?void 0:Xs].filter(o=>!!o)});e.common.issues.push(r)}class Lt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return me;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return Lt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return me;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const me=Object.freeze({status:"aborted"}),Qs=e=>({status:"dirty",value:e}),zt=e=>({status:"valid",value:e}),C0=e=>e.status==="aborted",P0=e=>e.status==="dirty",Fa=e=>e.status==="valid",La=e=>typeof Promise<"u"&&e instanceof Promise;function Va(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function k0(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(le||(le={}));var Js,ei;class Cn{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const O0=(e,t)=>{if(Fa(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Jt(e.common.issues);return this._error=n,this._error}}};function ye(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{var l,c;const{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class xe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return jr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Lt,ctx:{common:t.parent.common,data:t.data,parsedType:jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(La(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:jr(t)},s=this._parseSync({data:t,path:o.path,parent:o});return O0(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:jr(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(La(o)?o:Promise.resolve(o));return O0(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:K.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new jn({schema:this,typeName:he.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Bn.create(this,this._def)}nullable(){return Wr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ln.create(this,this._def)}promise(){return ri.create(this,this._def)}or(t){return ja.create([this,t],this._def)}and(t){return Ba.create(this,t,this._def)}transform(t){return new jn({...ye(this._def),schema:this,typeName:he.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ga({...ye(this._def),innerType:this,defaultValue:n,typeName:he.ZodDefault})}brand(){return new D0({typeName:he.ZodBranded,type:this,...ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ya({...ye(this._def),innerType:this,catchValue:n,typeName:he.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return qa.create(this,t)}readonly(){return Ka.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const wL=/^c[^\s-]{8,}$/i,xL=/^[0-9a-z]+$/,TL=/^[0-9A-HJKMNP-TV-Z]{26}$/,SL=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,EL=/^[a-z0-9_-]{21}$/i,CL=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,PL=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,kL="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Od;const OL=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,IL=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,_L=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,I0="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",AL=new RegExp(`^${I0}$`);function _0(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function DL(e){return new RegExp(`^${_0(e)}$`)}function ML(e){let t=`${I0}T${_0(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function NL(e,t){return!!((t==="v4"||!t)&&OL.test(e)||(t==="v6"||!t)&&IL.test(e))}class Vn extends xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ne.string){const s=this._getOrReturnCtx(t);return te(s,{code:K.invalid_type,expected:ne.string,received:s.parsedType}),me}const r=new Lt;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?te(o,{code:K.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&te(o,{code:K.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")PL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"email",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Od||(Od=new RegExp(kL,"u")),Od.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"emoji",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")SL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"uuid",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")EL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"nanoid",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")wL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")xL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid2",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")TL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ulid",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),te(o,{validation:"url",code:K.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"regex",code:K.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?ML(s).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?AL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?DL(s).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?CL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"duration",code:K.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?NL(t.data,s.version)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ip",code:K.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?_L.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"base64",code:K.invalid_string,message:s.message}),r.dirty()):Pe.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:K.invalid_string,...le.errToObj(r)})}_addCheck(t){return new Vn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...le.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...le.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...le.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...le.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...le.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...le.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...le.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...le.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...le.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...le.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...le.errToObj(n)})}nonempty(t){return this.min(1,le.errToObj(t))}trim(){return new Vn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Vn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Vn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Vn.create=e=>{var t;return new Vn({checks:[],typeName:he.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};function FL(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Br extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ne.number){const s=this._getOrReturnCtx(t);return te(s,{code:K.invalid_type,expected:ne.number,received:s.parsedType}),me}let r;const o=new Lt;for(const s of this._def.checks)s.kind==="int"?Pe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:K.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?FL(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_finite,message:s.message}),o.dirty()):Pe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,o){return new Br({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new Br({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:le.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Pe.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Br.create=e=>new Br({checks:[],typeName:he.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Wo extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ne.bigint){const s=this._getOrReturnCtx(t);return te(s,{code:K.invalid_type,expected:ne.bigint,received:s.parsedType}),me}let r;const o=new Lt;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Pe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,o){return new Wo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new Wo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Wo.create=e=>{var t;return new Wo({checks:[],typeName:he.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};class Id extends xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ne.boolean){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:ne.boolean,received:r.parsedType}),me}return zt(t.data)}}Id.create=e=>new Id({typeName:he.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class ti extends xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ne.date){const s=this._getOrReturnCtx(t);return te(s,{code:K.invalid_type,expected:ne.date,received:s.parsedType}),me}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return te(s,{code:K.invalid_date}),me}const r=new Lt;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Pe.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ti({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:le.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:le.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}ti.create=e=>new ti({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:he.ZodDate,...ye(e)});class _d extends xe{_parse(t){if(this._getType(t)!==ne.symbol){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:ne.symbol,received:r.parsedType}),me}return zt(t.data)}}_d.create=e=>new _d({typeName:he.ZodSymbol,...ye(e)});class $a extends xe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:ne.undefined,received:r.parsedType}),me}return zt(t.data)}}$a.create=e=>new $a({typeName:he.ZodUndefined,...ye(e)});class Ra extends xe{_parse(t){if(this._getType(t)!==ne.null){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:ne.null,received:r.parsedType}),me}return zt(t.data)}}Ra.create=e=>new Ra({typeName:he.ZodNull,...ye(e)});class Ad extends xe{constructor(){super(...arguments),this._any=!0}_parse(t){return zt(t.data)}}Ad.create=e=>new Ad({typeName:he.ZodAny,...ye(e)});class Ho extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return zt(t.data)}}Ho.create=e=>new Ho({typeName:he.ZodUnknown,...ye(e)});class yr extends xe{_parse(t){const n=this._getOrReturnCtx(t);return te(n,{code:K.invalid_type,expected:ne.never,received:n.parsedType}),me}}yr.create=e=>new yr({typeName:he.ZodNever,...ye(e)});class Dd extends xe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:ne.void,received:r.parsedType}),me}return zt(t.data)}}Dd.create=e=>new Dd({typeName:he.ZodVoid,...ye(e)});class ln extends xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ne.array)return te(n,{code:K.invalid_type,expected:ne.array,received:n.parsedType}),me;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(te(n,{code:i?K.too_big:K.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(te(n,{code:K.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(te(n,{code:K.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>o.type._parseAsync(new Cn(n,i,n.path,a)))).then(i=>Lt.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Cn(n,i,n.path,a)));return Lt.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new ln({...this._def,minLength:{value:t,message:le.toString(n)}})}max(t,n){return new ln({...this._def,maxLength:{value:t,message:le.toString(n)}})}length(t,n){return new ln({...this._def,exactLength:{value:t,message:le.toString(n)}})}nonempty(t){return this.min(1,t)}}ln.create=(e,t)=>new ln({type:e,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...ye(t)});function Uo(e){if(e instanceof nt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Bn.create(Uo(r))}return new nt({...e._def,shape:()=>t})}else return e instanceof ln?new ln({...e._def,type:Uo(e.element)}):e instanceof Bn?Bn.create(Uo(e.unwrap())):e instanceof Wr?Wr.create(Uo(e.unwrap())):e instanceof Rn?Rn.create(e.items.map(t=>Uo(t))):e}class nt extends xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Pe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ne.object){const c=this._getOrReturnCtx(t);return te(c,{code:K.invalid_type,expected:ne.object,received:c.parsedType}),me}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof yr&&this._def.unknownKeys==="strip"))for(const c in o.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const u=s[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Cn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof yr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(te(o,{code:K.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Cn(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>Lt.mergeObjectSync(r,c)):Lt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new nt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=le.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new nt({...this._def,unknownKeys:"strip"})}passthrough(){return new nt({...this._def,unknownKeys:"passthrough"})}extend(t){return new nt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new nt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:he.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new nt({...this._def,catchall:t})}pick(t){const n={};return Pe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new nt({...this._def,shape:()=>n})}omit(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new nt({...this._def,shape:()=>n})}deepPartial(){return Uo(this)}partial(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new nt({...this._def,shape:()=>n})}required(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Bn;)s=s._def.innerType;n[r]=s}}),new nt({...this._def,shape:()=>n})}keyof(){return A0(Pe.objectKeys(this.shape))}}nt.create=(e,t)=>new nt({shape:()=>e,unknownKeys:"strip",catchall:yr.create(),typeName:he.ZodObject,...ye(t)}),nt.strictCreate=(e,t)=>new nt({shape:()=>e,unknownKeys:"strict",catchall:yr.create(),typeName:he.ZodObject,...ye(t)}),nt.lazycreate=(e,t)=>new nt({shape:e,unknownKeys:"strip",catchall:yr.create(),typeName:he.ZodObject,...ye(t)});class ja extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new Jt(a.ctx.common.issues));return te(n,{code:K.invalid_union,unionErrors:i}),me}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new Jt(l));return te(n,{code:K.invalid_union,unionErrors:a}),me}}get options(){return this._def.options}}ja.create=(e,t)=>new ja({options:e,typeName:he.ZodUnion,...ye(t)});const $n=e=>e instanceof Wa?$n(e.schema):e instanceof jn?$n(e.innerType()):e instanceof Ha?[e.value]:e instanceof zr?e.options:e instanceof Ua?Pe.objectValues(e.enum):e instanceof Ga?$n(e._def.innerType):e instanceof $a?[void 0]:e instanceof Ra?[null]:e instanceof Bn?[void 0,...$n(e.unwrap())]:e instanceof Wr?[null,...$n(e.unwrap())]:e instanceof D0||e instanceof Ka?$n(e.unwrap()):e instanceof Ya?$n(e._def.innerType):[];class Md extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.object)return te(n,{code:K.invalid_type,expected:ne.object,received:n.parsedType}),me;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(te(n,{code:K.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=$n(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new Md({typeName:he.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...ye(r)})}}function Nd(e,t){const n=jr(e),r=jr(t);if(e===t)return{valid:!0,data:e};if(n===ne.object&&r===ne.object){const o=Pe.objectKeys(t),s=Pe.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=Nd(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===ne.array&&r===ne.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=Nd(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ne.date&&r===ne.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ba extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(C0(s)||C0(i))return me;const a=Nd(s.value,i.value);return a.valid?((P0(s)||P0(i))&&n.dirty(),{status:n.value,value:a.data}):(te(r,{code:K.invalid_intersection_types}),me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ba.create=(e,t,n)=>new Ba({left:e,right:t,typeName:he.ZodIntersection,...ye(n)});class Rn extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.array)return te(r,{code:K.invalid_type,expected:ne.array,received:r.parsedType}),me;if(r.data.length<this._def.items.length)return te(r,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&r.data.length>this._def.items.length&&(te(r,{code:K.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Cn(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>Lt.mergeArray(n,i)):Lt.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Rn({...this._def,rest:t})}}Rn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Rn({items:e,typeName:he.ZodTuple,rest:null,...ye(t)})};class za extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.object)return te(r,{code:K.invalid_type,expected:ne.object,received:r.parsedType}),me;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Cn(r,a,r.path,a)),value:i._parse(new Cn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Lt.mergeObjectAsync(n,o):Lt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof xe?new za({keyType:t,valueType:n,typeName:he.ZodRecord,...ye(r)}):new za({keyType:Vn.create(),valueType:t,typeName:he.ZodRecord,...ye(n)})}}class Fd extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.map)return te(r,{code:K.invalid_type,expected:ne.map,received:r.parsedType}),me;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Cn(r,a,r.path,[c,"key"])),value:s._parse(new Cn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Fd.create=(e,t,n)=>new Fd({valueType:t,keyType:e,typeName:he.ZodMap,...ye(n)});class Go extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.set)return te(r,{code:K.invalid_type,expected:ne.set,received:r.parsedType}),me;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(te(r,{code:K.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(te(r,{code:K.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const c=new Set;for(const u of l){if(u.status==="aborted")return me;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>s._parse(new Cn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new Go({...this._def,minSize:{value:t,message:le.toString(n)}})}max(t,n){return new Go({...this._def,maxSize:{value:t,message:le.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Go.create=(e,t)=>new Go({valueType:e,minSize:null,maxSize:null,typeName:he.ZodSet,...ye(t)});class ni extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.function)return te(n,{code:K.invalid_type,expected:ne.function,received:n.parsedType}),me;function r(a,l){return kd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Pd(),Xs].filter(c=>!!c),issueData:{code:K.invalid_arguments,argumentsError:l}})}function o(a,l){return kd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Pd(),Xs].filter(c=>!!c),issueData:{code:K.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof ri){const a=this;return zt(async function(...l){const c=new Jt([]),u=await a._def.args.parseAsync(l,s).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{const a=this;return zt(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new Jt([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new Jt([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ni({...this._def,args:Rn.create(t).rest(Ho.create())})}returns(t){return new ni({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ni({args:t||Rn.create([]).rest(Ho.create()),returns:n||Ho.create(),typeName:he.ZodFunction,...ye(r)})}}class Wa extends xe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Wa.create=(e,t)=>new Wa({getter:e,typeName:he.ZodLazy,...ye(t)});class Ha extends xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return te(n,{received:n.data,code:K.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ha.create=(e,t)=>new Ha({value:e,typeName:he.ZodLiteral,...ye(t)});function A0(e,t){return new zr({values:e,typeName:he.ZodEnum,...ye(t)})}class zr extends xe{constructor(){super(...arguments),Js.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{expected:Pe.joinValues(r),received:n.parsedType,code:K.invalid_type}),me}if(Va(this,Js)||k0(this,Js,new Set(this._def.values)),!Va(this,Js).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{received:n.data,code:K.invalid_enum_value,options:r}),me}return zt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return zr.create(t,{...this._def,...n})}exclude(t,n=this._def){return zr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Js=new WeakMap,zr.create=A0;class Ua extends xe{constructor(){super(...arguments),ei.set(this,void 0)}_parse(t){const n=Pe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ne.string&&r.parsedType!==ne.number){const o=Pe.objectValues(n);return te(r,{expected:Pe.joinValues(o),received:r.parsedType,code:K.invalid_type}),me}if(Va(this,ei)||k0(this,ei,new Set(Pe.getValidEnumValues(this._def.values))),!Va(this,ei).has(t.data)){const o=Pe.objectValues(n);return te(r,{received:r.data,code:K.invalid_enum_value,options:o}),me}return zt(t.data)}get enum(){return this._def.values}}ei=new WeakMap,Ua.create=(e,t)=>new Ua({values:e,typeName:he.ZodNativeEnum,...ye(t)});class ri extends xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.promise&&n.common.async===!1)return te(n,{code:K.invalid_type,expected:ne.promise,received:n.parsedType}),me;const r=n.parsedType===ne.promise?n.data:Promise.resolve(n.data);return zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ri.create=(e,t)=>new ri({type:e,typeName:he.ZodPromise,...ye(t)});class jn extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===he.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{te(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return me;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?me:l.status==="dirty"||n.value==="dirty"?Qs(l.value):l});{if(n.value==="aborted")return me;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?me:a.status==="dirty"||n.value==="dirty"?Qs(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Fa(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Fa(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);Pe.assertNever(o)}}jn.create=(e,t,n)=>new jn({schema:e,typeName:he.ZodEffects,effect:t,...ye(n)}),jn.createWithPreprocess=(e,t,n)=>new jn({schema:t,effect:{type:"preprocess",transform:e},typeName:he.ZodEffects,...ye(n)});class Bn extends xe{_parse(t){return this._getType(t)===ne.undefined?zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Bn.create=(e,t)=>new Bn({innerType:e,typeName:he.ZodOptional,...ye(t)});class Wr extends xe{_parse(t){return this._getType(t)===ne.null?zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Wr.create=(e,t)=>new Wr({innerType:e,typeName:he.ZodNullable,...ye(t)});class Ga extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ne.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ga.create=(e,t)=>new Ga({innerType:e,typeName:he.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ye(t)});class Ya extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return La(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Jt(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Jt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ya.create=(e,t)=>new Ya({innerType:e,typeName:he.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ye(t)});class Ld extends xe{_parse(t){if(this._getType(t)!==ne.nan){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:ne.nan,received:r.parsedType}),me}return{status:"valid",value:t.data}}}Ld.create=e=>new Ld({typeName:he.ZodNaN,...ye(e)});class D0 extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class qa extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?me:s.status==="dirty"?(n.dirty(),Qs(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?me:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new qa({in:t,out:n,typeName:he.ZodPipeline})}}class Ka extends xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Fa(o)&&(o.value=Object.freeze(o.value)),o);return La(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ka.create=(e,t)=>new Ka({innerType:e,typeName:he.ZodReadonly,...ye(t)}),nt.lazycreate;var he;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(he||(he={})),Vn.create,Br.create,Ld.create,Wo.create,Id.create,ti.create,_d.create,$a.create,Ra.create,Ad.create,Ho.create,yr.create,Dd.create,ln.create,nt.create,nt.strictCreate,ja.create,Md.create,Ba.create,Rn.create,za.create,Fd.create,Go.create,ni.create,Wa.create,Ha.create,zr.create,Ua.create,ri.create,jn.create,Bn.create,Wr.create,jn.createWithPreprocess,qa.create;const LL={sort:(e,t)=>e.localeCompare(t),allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},M0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return vL.parse(n.toString(),LL)},N0=e=>e.replace("[",".").replace("]","").split("."),Vd=(e,t)=>N0(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o instanceof ln?o.element:o},t),Za=e=>e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value,VL=e=>{const[t,n]=b.useState(null),r=b.useRef({}),o=(l,c)=>{const u=Vd(l,e);return{...c,name:l,id:l,error:t==null?void 0:t[l],ref:d=>{d!==null&&(r.current[l]={element:d,schema:u})}}},s=(l,c)=>{const u=Vd(l,e);return{...c,name:l,id:l,type:Pn.instance(u,Br)?"number":(c==null?void 0:c.type)??"text",error:t==null?void 0:t[l],ref:d=>{d!==null&&(r.current[l]={element:d,schema:u})}}};b.useEffect(()=>{const l=Object.values(r.current).map(u=>{const d=u.schema.safeParse(Za(u.element)),f=p=>{const m=u.schema.safeParse(Za(p.target)),y=u.element,v=y.name;if(m.success)return y.setCustomValidity(""),n(w=>{const{[v]:g,...S}=w||{};return S===null||Pn.empty(S)?null:S});if(y.required){const w=m.error.issues[0].message;y.setCustomValidity(w),n(g=>({...g,[v]:w}))}},h=u.element.tagName==="INPUT"?"blur":"change";return u.element.addEventListener(h,f),{input:u,hasInitialError:u.element.required?!d.success:!1,unsubscribe:()=>u.element.removeEventListener(h,f)}});return l.some(u=>u.hasInitialError)&&n(u=>u===null?{}:u),()=>l.forEach(u=>u.unsubscribe())});const i=b.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget,d=Object.values(r.current).reduce((h,p)=>{const m=p.element,y=p.schema.safeParse(Za(m));if(y.success)return h;const v=y.error.issues[0].message;return m.setAttribute("data-initialized","true"),{...h,[m.name]:v}},{}),f=Pn.empty(d)?null:{};n(f),l==null||l({form:u,errors:f||{}})},[]),a=b.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget;let d=M0(u);Array.from(u.elements).forEach(f=>{if(f.tagName==="SELECT"){const h=f;d=Wf(d,h.name,h.value)}if(f.tagName==="INPUT"){const h=f;d=Wf(d,h.name,Za(h))}}),l({form:u,json:d,event:c,reset:()=>sb(u)})},[]);return{input:s,select:o,onSubmit:a,errors:t,onInvalid:i,disabled:t!==null}},$L={name:"dark",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},rounded:{pill:"2rem",card:"0.75rem",full:"9999px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",disabled:"hsla(240, 4%, 33%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(210, 40%, 98%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{background:"hsla(0, 0%, 14%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 19%)"},table:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"}}},RL={name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{pill:"2rem",card:"0.75rem",full:"9999px"},colors:{foreground:"hsla(217, 15%, 32%)",background:"hsla(210, 34%, 96%)",disabled:"hsla(240, 10%, 75%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(210, 34%, 96%)"},input:{border:"hsla(218, 22%, 80%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 15%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"}}},jL={cssVariable:(e,t,n)=>`var(--${n})`,rgba:e=>`rgba(${e})`,rgb:e=>`rgb(${e})`,hsl:e=>`hsl(${e})`,hsla:e=>`hsla(${e})`,hex:e=>e,raw:e=>e,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},oi=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return o.concat(t(i,l,a))}return o.concat(oi(i,t,n,a))},[]),F0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return{...o,[l]:t(i,s,a)}}return{...o,[s]:F0(i,t,n,a)}},{}),L0={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},$d=(e,t)=>{const n=t.value||((o,s)=>s),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},BL={default:e=>$d(e,{result:L0.default}),dark:e=>$d(e,{result:L0.dark})},zL=(e,t)=>{const n=(i,a,l)=>({key:`--${l}`,value:`${i}`}),r=oi(e.colors,n),o=oi(e.spacing,n),s=oi(e.rounded,n);return $d(r.concat(o,s),{result:i=>`html${t?`.${t}`:""} {${i}}`,value:(i,a)=>a.replace("hsla(","").replace(")","")})};ee.Alert=NP,ee.Autocomplete=$A,ee.Button=ns,ee.ButtonGroup=P1,ee.Calendar=Zg,ee.Card=Xg,ee.Checkbox=wv,ee.ColType=Bo,ee.Collapse=Qm,ee.DatePicker=jA,ee.Dropdown=Ao,ee.FileUpload=QD,ee.Form=eM,ee.Input=Ls,ee.InputFeedback=cv,ee.InputField=ua,ee.Menu=RF,ee.MenuItem=$F,ee.Modal=NA,ee.Option=bv,ee.Polymorph=eo,ee.Radiobox=tM,ee.Select=dr,ee.Stats=SI,ee.Switch=nM,ee.Tab=bA,ee.Table=VF,ee.Tabs=yA,ee.Tag=O1,ee.Tooltip=lv,ee.TransferList=VN,ee.convertPath=N0,ee.createColumns=aF,ee.createDesignTokens=F0,ee.createOptionCols=md,ee.createStyles=BL,ee.createTheme=zL,ee.css=pt,ee.defaultDarkTheme=$L,ee.defaultLightTheme=RL,ee.dispatchInput=Pl,ee.formReset=sb,ee.formToJson=M0,ee.getSchemaShape=Vd,ee.isReactComponent=S1,ee.isReactFC=E1,ee.isSsr=fa,ee.mergeRefs=Cl,ee.parsers=jL,ee.path=pv,ee.reduceTokens=oi,ee.safeRegex=Tu,ee.useForm=VL,ee.usePrevious=vv,ee.useReactive=Qg,ee.useTablePreferences=cF,ee.uuid=da,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
190
+ */var Au,Dv;function H_(){if(Dv)return Au;Dv=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Au=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Au}var _u,Mv;function Du(){if(Mv)return _u;Mv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return _u=e,_u}var Mu,Nv;function Fv(){return Nv||(Nv=1,Mu=Function.call.bind(Object.prototype.hasOwnProperty)),Mu}var Nu,Lv;function U_(){if(Lv)return Nu;Lv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Du(),n={},r=Fv();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=i[u](s,u,l,a,null,t)}catch(p){d=p}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Nu=o,Nu}var Fu,Vv;function G_(){if(Vv)return Fu;Vv=1;var e=_v(),t=H_(),n=Du(),r=Fv(),o=U_(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Fu=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(k){var R=k&&(c&&k[c]||k[u]);if(typeof R=="function")return R}var f="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:w(),arrayOf:y,element:S(),elementType:T(),instanceOf:E,node:O(),objectOf:D,oneOf:P,oneOfType:_,shape:F,exact:$};function p(k,R){return k===R?k!==0||1/k===1/R:k!==k&&R!==R}function m(k,R){this.message=k,this.data=R&&typeof R=="object"?R:{},this.stack=""}m.prototype=Error.prototype;function g(k){if(process.env.NODE_ENV!=="production")var R={},Z=0;function oe(G,N,j,W,U,z,te){if(W=W||f,z=z||j,te!==n){if(l){var B=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 B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Pe=W+":"+j;!R[Pe]&&Z<3&&(i("You are manually calling a React.PropTypes validation function for the `"+z+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),R[Pe]=!0,Z++)}}return N[j]==null?G?N[j]===null?new m("The "+U+" `"+z+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+U+" `"+z+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:k(N,j,W,U,z)}var J=oe.bind(null,!1);return J.isRequired=oe.bind(null,!0),J}function v(k){function R(Z,oe,J,G,N,j){var W=Z[oe],U=M(W);if(U!==k){var z=L(W);return new m("Invalid "+G+" `"+N+"` of type "+("`"+z+"` supplied to `"+J+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return g(R)}function w(){return g(s)}function y(k){function R(Z,oe,J,G,N){if(typeof k!="function")return new m("Property `"+N+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var j=Z[oe];if(!Array.isArray(j)){var W=M(j);return new m("Invalid "+G+" `"+N+"` of type "+("`"+W+"` supplied to `"+J+"`, expected an array."))}for(var U=0;U<j.length;U++){var z=k(j,U,J,G,N+"["+U+"]",n);if(z instanceof Error)return z}return null}return g(R)}function S(){function k(R,Z,oe,J,G){var N=R[Z];if(!a(N)){var j=M(N);return new m("Invalid "+J+" `"+G+"` of type "+("`"+j+"` supplied to `"+oe+"`, expected a single ReactElement."))}return null}return g(k)}function T(){function k(R,Z,oe,J,G){var N=R[Z];if(!e.isValidElementType(N)){var j=M(N);return new m("Invalid "+J+" `"+G+"` of type "+("`"+j+"` supplied to `"+oe+"`, expected a single ReactElement type."))}return null}return g(k)}function E(k){function R(Z,oe,J,G,N){if(!(Z[oe]instanceof k)){var j=k.name||f,W=Y(Z[oe]);return new m("Invalid "+G+" `"+N+"` of type "+("`"+W+"` supplied to `"+J+"`, expected ")+("instance of `"+j+"`."))}return null}return g(R)}function P(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function R(Z,oe,J,G,N){for(var j=Z[oe],W=0;W<k.length;W++)if(p(j,k[W]))return null;var U=JSON.stringify(k,function(te,B){var Pe=L(B);return Pe==="symbol"?String(B):B});return new m("Invalid "+G+" `"+N+"` of value `"+String(j)+"` "+("supplied to `"+J+"`, expected one of "+U+"."))}return g(R)}function D(k){function R(Z,oe,J,G,N){if(typeof k!="function")return new m("Property `"+N+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var j=Z[oe],W=M(j);if(W!=="object")return new m("Invalid "+G+" `"+N+"` of type "+("`"+W+"` supplied to `"+J+"`, expected an object."));for(var U in j)if(r(j,U)){var z=k(j,U,J,G,N+"."+U,n);if(z instanceof Error)return z}return null}return g(R)}function _(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var R=0;R<k.length;R++){var Z=k[R];if(typeof Z!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(Z)+" at index "+R+"."),s}function oe(J,G,N,j,W){for(var U=[],z=0;z<k.length;z++){var te=k[z],B=te(J,G,N,j,W,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&U.push(B.data.expectedType)}var Pe=U.length>0?", expected one of type ["+U.join(", ")+"]":"";return new m("Invalid "+j+" `"+W+"` supplied to "+("`"+N+"`"+Pe+"."))}return g(oe)}function O(){function k(R,Z,oe,J,G){return C(R[Z])?null:new m("Invalid "+J+" `"+G+"` supplied to "+("`"+oe+"`, expected a ReactNode."))}return g(k)}function V(k,R,Z,oe,J){return new m((k||"React class")+": "+R+" type `"+Z+"."+oe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function F(k){function R(Z,oe,J,G,N){var j=Z[oe],W=M(j);if(W!=="object")return new m("Invalid "+G+" `"+N+"` of type `"+W+"` "+("supplied to `"+J+"`, expected `object`."));for(var U in k){var z=k[U];if(typeof z!="function")return V(J,G,N,U,L(z));var te=z(j,U,J,G,N+"."+U,n);if(te)return te}return null}return g(R)}function $(k){function R(Z,oe,J,G,N){var j=Z[oe],W=M(j);if(W!=="object")return new m("Invalid "+G+" `"+N+"` of type `"+W+"` "+("supplied to `"+J+"`, expected `object`."));var U=t({},Z[oe],k);for(var z in U){var te=k[z];if(r(k,z)&&typeof te!="function")return V(J,G,N,z,L(te));if(!te)return new m("Invalid "+G+" `"+N+"` key `"+z+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(Z[oe],null," ")+`
191
+ Valid keys: `+JSON.stringify(Object.keys(k),null," "));var B=te(j,z,J,G,N+"."+z,n);if(B)return B}return null}return g(R)}function C(k){switch(typeof k){case"number":case"string":case"undefined":return!0;case"boolean":return!k;case"object":if(Array.isArray(k))return k.every(C);if(k===null||a(k))return!0;var R=d(k);if(R){var Z=R.call(k),oe;if(R!==k.entries){for(;!(oe=Z.next()).done;)if(!C(oe.value))return!1}else for(;!(oe=Z.next()).done;){var J=oe.value;if(J&&!C(J[1]))return!1}}else return!1;return!0;default:return!1}}function I(k,R){return k==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function M(k){var R=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":I(R,k)?"symbol":R}function L(k){if(typeof k>"u"||k===null)return""+k;var R=M(k);if(R==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return R}function H(k){var R=L(k);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function Y(k){return!k.constructor||!k.constructor.name?f:k.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Fu}var Lu,$v;function Y_(){if($v)return Lu;$v=1;var e=Du();function t(){}function n(){}return n.resetWarningCache=t,Lu=function(){function r(s,a,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Lu}if(process.env.NODE_ENV!=="production"){var q_=_v(),K_=!0;Iu.exports=G_()(q_.isElement,K_)}else Iu.exports=Y_()();var Z_=Iu.exports;const ze=j0(Z_);function No(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function Fo(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Rv(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function jv(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var X_=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 Vi(e,t){var n=Q_(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 Q_(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=X_.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var J_=[".DS_Store","Thumbs.db"];function eD(e){return No(this,void 0,void 0,function(){return Fo(this,function(t){return ba(e)&&tD(e.dataTransfer)?[2,iD(e.dataTransfer,e.type)]:nD(e)?[2,rD(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,oD(e)]:[2,[]]})})}function tD(e){return ba(e)}function nD(e){return ba(e)&&ba(e.target)}function ba(e){return typeof e=="object"&&e!==null}function rD(e){return Vu(e.target.files).map(function(t){return Vi(t)})}function oD(e){return No(this,void 0,void 0,function(){var t;return Fo(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 Vi(r)})]}})})}function iD(e,t){return No(this,void 0,void 0,function(){var n,r;return Fo(this,function(o){switch(o.label){case 0:return e.items?(n=Vu(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(sD))]):[3,2];case 1:return r=o.sent(),[2,Bv(zv(r))];case 2:return[2,Bv(Vu(e.files).map(function(i){return Vi(i)}))]}})})}function Bv(e){return e.filter(function(t){return J_.indexOf(t.name)===-1})}function Vu(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function sD(e){if(typeof e.webkitGetAsEntry!="function")return Wv(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Hv(t):Wv(e)}function zv(e){return e.reduce(function(t,n){return jv(jv([],Rv(t),!1),Rv(Array.isArray(n)?zv(n):[n]),!1)},[])}function Wv(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Vi(t);return Promise.resolve(n)}function aD(e){return No(this,void 0,void 0,function(){return Fo(this,function(t){return[2,e.isDirectory?Hv(e):lD(e)]})})}function Hv(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function i(){var s=this;t.readEntries(function(a){return No(s,void 0,void 0,function(){var l,c,u;return Fo(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(aD)),o.push(u),i(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}i()})}function lD(e){return No(this,void 0,void 0,function(){return Fo(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var i=Vi(o,e.fullPath);n(i)},function(o){r(o)})})]})})}var cD=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0};function Uv(e){return fD(e)||dD(e)||Kv(e)||uD()}function uD(){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 dD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fD(e){if(Array.isArray(e))return $u(e)}function Gv(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 Yv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gv(Object(n),!0).forEach(function(r){qv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $i(e,t){return mD(e)||pD(e,t)||Kv(e,t)||hD()}function hD(){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 Kv(e,t){if(e){if(typeof e=="string")return $u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $u(e,t)}}function $u(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pD(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function mD(e){if(Array.isArray(e))return e}var gD="file-invalid-type",yD="file-too-large",vD="file-too-small",bD="too-many-files",wD=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:gD,message:"File type must be ".concat(n)}},Zv=function(t){return{code:yD,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Xv=function(t){return{code:vD,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},xD={code:bD,message:"Too many files"};function Qv(e,t){var n=e.type==="application/x-moz-file"||cD(e,t);return[n,n?null:wD(t)]}function Jv(e,t,n){if(Lr(e.size))if(Lr(t)&&Lr(n)){if(e.size>n)return[!1,Zv(n)];if(e.size<t)return[!1,Xv(t)]}else{if(Lr(t)&&e.size<t)return[!1,Xv(t)];if(Lr(n)&&e.size>n)return[!1,Zv(n)]}return[!0,null]}function Lr(e){return e!=null}function TD(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(l){var c=Qv(l,n),u=$i(c,1),d=u[0],f=Jv(l,r,o),h=$i(f,1),p=h[0],m=a?a(l):null;return d&&p&&!m})}function wa(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function xa(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 eb(e){e.preventDefault()}function SD(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function ED(e){return e.indexOf("Edge/")!==-1}function CD(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return SD(e)||ED(e)}function yn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return t.some(function(a){return!wa(r)&&a&&a.apply(void 0,[r].concat(i)),wa(r)})}}function PD(){return"showOpenFilePicker"in window}function kD(e){if(Lr(e)){var t=Object.entries(e).filter(function(n){var r=$i(n,2),o=r[0],i=r[1],s=!0;return tb(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(nb))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=$i(r,2),i=o[0],s=o[1];return Yv(Yv({},n),{},qv({},i,s))},{});return[{description:"Files",accept:t}]}return e}function OD(e){if(Lr(e))return Object.entries(e).reduce(function(t,n){var r=$i(n,2),o=r[0],i=r[1];return[].concat(Uv(t),[o],Uv(i))},[]).filter(function(t){return tb(t)||nb(t)}).join(",")}function ID(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function AD(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function tb(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function nb(e){return/^.*\.[\w]+$/.test(e)}var _D=["children"],DD=["open"],MD=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],ND=["refKey","onChange","onClick"];function FD(e){return $D(e)||VD(e)||rb(e)||LD()}function LD(){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 VD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $D(e){if(Array.isArray(e))return ju(e)}function Ru(e,t){return BD(e)||jD(e,t)||rb(e,t)||RD()}function RD(){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 rb(e,t){if(e){if(typeof e=="string")return ju(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 ju(e,t)}}function ju(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jD(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function BD(e){if(Array.isArray(e))return e}function ob(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ob(Object(n),!0).forEach(function(r){Bu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ob(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ta(e,t){if(e==null)return{};var n=zD(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zD(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var zu=b.forwardRef(function(e,t){var n=e.children,r=Ta(e,_D),o=sb(r),i=o.open,s=Ta(o,DD);return b.useImperativeHandle(t,function(){return{open:i}},[i]),b.createElement(b.Fragment,null,n(Je(Je({},s),{},{open:i})))});zu.displayName="Dropzone";var ib={disabled:!1,getFilesFromEvent:eD,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};zu.defaultProps=ib,zu.propTypes={children:ze.func,accept:ze.objectOf(ze.arrayOf(ze.string)),multiple:ze.bool,preventDropOnDocument:ze.bool,noClick:ze.bool,noKeyboard:ze.bool,noDrag:ze.bool,noDragEventsBubbling:ze.bool,minSize:ze.number,maxSize:ze.number,maxFiles:ze.number,disabled:ze.bool,getFilesFromEvent:ze.func,onFileDialogCancel:ze.func,onFileDialogOpen:ze.func,useFsAccessApi:ze.bool,autoFocus:ze.bool,onDragEnter:ze.func,onDragLeave:ze.func,onDragOver:ze.func,onDrop:ze.func,onDropAccepted:ze.func,onDropRejected:ze.func,onError:ze.func,validator:ze.func};var Wu={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function sb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Je(Je({},ib),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,v=t.useFsAccessApi,w=t.autoFocus,y=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,E=t.noDrag,P=t.noDragEventsBubbling,D=t.onError,_=t.validator,O=b.useMemo(function(){return OD(n)},[n]),V=b.useMemo(function(){return kD(n)},[n]),F=b.useMemo(function(){return typeof g=="function"?g:ab},[g]),$=b.useMemo(function(){return typeof m=="function"?m:ab},[m]),C=b.useRef(null),I=b.useRef(null),M=b.useReducer(WD,Wu),L=Ru(M,2),H=L[0],Y=L[1],k=H.isFocused,R=H.isFileDialogActive,Z=b.useRef(typeof window<"u"&&window.isSecureContext&&v&&PD()),oe=function(){!Z.current&&R&&setTimeout(function(){if(I.current){var ae=I.current.files;ae.length||(Y({type:"closeDialog"}),$())}},300)};b.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[I,R,$,Z]);var J=b.useRef([]),G=function(ae){C.current&&C.current.contains(ae.target)||(ae.preventDefault(),J.current=[])};b.useEffect(function(){return y&&(document.addEventListener("dragover",eb,!1),document.addEventListener("drop",G,!1)),function(){y&&(document.removeEventListener("dragover",eb),document.removeEventListener("drop",G))}},[C,y]),b.useEffect(function(){return!r&&w&&C.current&&C.current.focus(),function(){}},[C,w,r]);var N=b.useCallback(function(Q){D?D(Q):console.error(Q)},[D]),j=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Oe(Q),J.current=[].concat(FD(J.current),[Q.target]),xa(Q)&&Promise.resolve(o(Q)).then(function(ae){if(!(wa(Q)&&!P)){var _e=ae.length,Ke=_e>0&&TD({files:ae,accept:O,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:_}),kt=_e>0&&!Ke;Y({isDragAccept:Ke,isDragReject:kt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Q)}}).catch(function(ae){return N(ae)})},[o,c,N,P,O,s,i,a,l,_]),W=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Oe(Q);var ae=xa(Q);if(ae&&Q.dataTransfer)try{Q.dataTransfer.dropEffect="copy"}catch{}return ae&&d&&d(Q),!1},[d,P]),U=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Oe(Q);var ae=J.current.filter(function(Ke){return C.current&&C.current.contains(Ke)}),_e=ae.indexOf(Q.target);_e!==-1&&ae.splice(_e,1),J.current=ae,!(ae.length>0)&&(Y({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),xa(Q)&&u&&u(Q))},[C,u,P]),z=b.useCallback(function(Q,ae){var _e=[],Ke=[];Q.forEach(function(kt){var Nt=Qv(kt,O),Vt=Ru(Nt,2),Gr=Vt[0],qo=Vt[1],Ko=Jv(kt,s,i),el=Ru(Ko,2),Ud=el[0],Gd=el[1],Yd=_?_(kt):null;if(Gr&&Ud&&!Yd)_e.push(kt);else{var qd=[qo,Gd];Yd&&(qd=qd.concat(Yd)),Ke.push({file:kt,errors:qd.filter(function(jL){return jL})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(kt){Ke.push({file:kt,errors:[xD]})}),_e.splice(0)),Y({acceptedFiles:_e,fileRejections:Ke,type:"setFiles"}),f&&f(_e,Ke,ae),Ke.length>0&&p&&p(Ke,ae),_e.length>0&&h&&h(_e,ae)},[Y,a,O,s,i,l,f,h,p,_]),te=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Oe(Q),J.current=[],xa(Q)&&Promise.resolve(o(Q)).then(function(ae){wa(Q)&&!P||z(ae,Q)}).catch(function(ae){return N(ae)}),Y({type:"reset"})},[o,z,N,P]),B=b.useCallback(function(){if(Z.current){Y({type:"openDialog"}),F();var Q={multiple:a,types:V};window.showOpenFilePicker(Q).then(function(ae){return o(ae)}).then(function(ae){z(ae,null),Y({type:"closeDialog"})}).catch(function(ae){ID(ae)?($(ae),Y({type:"closeDialog"})):AD(ae)?(Z.current=!1,I.current?(I.current.value=null,I.current.click()):N(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):N(ae)});return}I.current&&(Y({type:"openDialog"}),F(),I.current.value=null,I.current.click())},[Y,F,$,v,z,N,V,a]),Pe=b.useCallback(function(Q){!C.current||!C.current.isEqualNode(Q.target)||(Q.key===" "||Q.key==="Enter"||Q.keyCode===32||Q.keyCode===13)&&(Q.preventDefault(),B())},[C,B]),ot=b.useCallback(function(){Y({type:"focus"})},[]),He=b.useCallback(function(){Y({type:"blur"})},[]),it=b.useCallback(function(){S||(CD()?setTimeout(B,0):B())},[S,B]),de=function(ae){return r?null:ae},Ee=function(ae){return T?null:de(ae)},ce=function(ae){return E?null:de(ae)},Oe=function(ae){P&&ae.stopPropagation()},ht=b.useMemo(function(){return function(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=Q.refKey,_e=ae===void 0?"ref":ae,Ke=Q.role,kt=Q.onKeyDown,Nt=Q.onFocus,Vt=Q.onBlur,Gr=Q.onClick,qo=Q.onDragEnter,Ko=Q.onDragOver,el=Q.onDragLeave,Ud=Q.onDrop,Gd=Ta(Q,MD);return Je(Je(Bu({onKeyDown:Ee(yn(kt,Pe)),onFocus:Ee(yn(Nt,ot)),onBlur:Ee(yn(Vt,He)),onClick:de(yn(Gr,it)),onDragEnter:ce(yn(qo,j)),onDragOver:ce(yn(Ko,W)),onDragLeave:ce(yn(el,U)),onDrop:ce(yn(Ud,te)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},_e,C),!r&&!T?{tabIndex:0}:{}),Gd)}},[C,Pe,ot,He,it,j,W,U,te,T,E,r]),Ie=b.useCallback(function(Q){Q.stopPropagation()},[]),pt=b.useMemo(function(){return function(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=Q.refKey,_e=ae===void 0?"ref":ae,Ke=Q.onChange,kt=Q.onClick,Nt=Ta(Q,ND),Vt=Bu({accept:O,multiple:a,type:"file",style:{display:"none"},onChange:de(yn(Ke,te)),onClick:de(yn(kt,Ie)),tabIndex:-1},_e,I);return Je(Je({},Vt),Nt)}},[I,n,a,te,r]);return Je(Je({},H),{},{isFocused:k&&!r,getRootProps:ht,getInputProps:pt,rootRef:C,inputRef:I,open:de(B)})}function WD(e,t){switch(t.type){case"focus":return Je(Je({},e),{},{isFocused:!0});case"blur":return Je(Je({},e),{},{isFocused:!1});case"openDialog":return Je(Je({},Wu),{},{isFileDialogActive:!0});case"closeDialog":return Je(Je({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Je(Je({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Je(Je({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Je({},Wu);default:return e}}function ab(){}const HD={isImage:e=>e.type.includes("image")},UD=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(HD.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:kv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:kv(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[x.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[x.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(xr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(po,{})})]}):x.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[x.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[x.jsx(PP,{size:48}),x.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(xr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(po,{className:"text-danger"})})]})},GD=e=>x.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>x.jsx(UD,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),YD=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(GD,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(b.Fragment,{children:e.idle}),qD=x.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[x.jsx(_P,{size:64}),x.jsxs("p",{children:["You can drag your files or"," ",x.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),KD=({idle:e=qD,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=b.useState([]),s=d=>{n==null||n(d),i(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=sb({onDrop:s});return x.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex text-foreground flex-col items-center justify-center border-2 rounded-lg p-6 border-card-border data-[active=true]:bg-card-background data-[active=true]:border-solid data-[active=false]:border-dashed",children:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(YD,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},ZD=["INPUT","SELECT"],Hu=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{ZD.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},XD=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return x.jsx("form",{...e,onSubmit:t})},QD=({children:e,className:t="",size:n,...r})=>x.jsxs("label",{"data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group font-normal flex items-center gap-2 data-[disabled=true]:cursor-not-allowed",children:[x.jsx("input",{...r,type:"radio",className:Xe("form-radio rounded-full h-4 w-4 app border-card-border text-primary focus:ring-primary appearance-none inline-block bg-origin-border group-aria-disabled:cursor-not-allowed disabled:opacity-70",t),...r}),e]}),Vr=b.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:d,left:f,error:h,...p},m)=>{const g=Qt(),v=b.useRef(null),w=p.id??p.name;b.useImperativeHandle(m,()=>v.current),b.useEffect(()=>{if(v.current===null)return;const S=v.current,T=vs(v.current),E=()=>S.setAttribute("data-selected","true");return S.addEventListener("change",E),()=>{T(),S.removeEventListener("change",E)}},[]);const y=()=>{var S;return(S=v.current)==null?void 0:S.focus()};return x.jsx(ya,{container:Xe("group inline-block w-full",c),error:h,feedback:o,hideLeft:u,left:f,info:n,optionalText:l,rightLabel:a,interactive:s,form:p.form,id:p.name||p.id,name:p.name,labelClassName:i,title:p.title,placeholder:p.placeholder,required:e,right:x.jsx("label",{htmlFor:w,children:x.jsxs("button",{onClick:y,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(Jm,{size:20}),x.jsx("span",{className:"sr-only",children:g.inputCaretDown})]})}),children:x.jsxs("select",{...p,id:w,name:w,value:p.value,required:e,ref:Ol(m,v),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:Xe("input appearance-none select group h-10 py-1 px-2 w-full flex-1 rounded-md bg-transparent text-foreground placeholder-input-placeholder outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",p.className),children:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(S=>x.jsx("option",{...S,children:S.label??S.value},`${w}-select-option-${S.value}`))]})})}),Uu=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t},JD=b.forwardRef(({children:e,container:t,error:n,...r},o)=>{const i=b.useId(),[s,a]=b.useState(r.checked??!1),l=s,c=b.useRef(null),u=Uu(r.onChange);b.useImperativeHandle(o,()=>c.current),b.useEffect(()=>{if(c.current!==null&&u.current){const f=h=>{h.target.checked=!h.target.checked,u.current&&u.current(h)};return c.current.addEventListener("change",f),()=>{var h;return(h=c.current)==null?void 0:h.removeEventListener("change",f)}}},[]);const d=f=>{var m;const p=f.target.dataset.checked!=="true";a(p),(m=r==null?void 0:r.onCheck)==null||m.call(r,p),c.current!==null&&(ys(c.current,p.toString()),c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:Xe("flex flex-wrap items-center",t),children:[x.jsx("input",{...r,ref:c,hidden:!0,type:"checkbox",checked:l,onChange:f=>a(f.target.checked)}),x.jsx("button",{type:"button",role:"switch",onClick:d,"aria-checked":l,"data-checked":l,"aria-labelledby":`${i}-label`,className:"duration-300 ease-in-out relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:x.jsx("span",{"aria-hidden":"true","data-checked":l,className:"duration-300 duration-300 ease-in-out inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),x.jsx("span",{className:"ml-3 text-sm",id:`${i}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})}),x.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),Sa=0,dr=1,Lo=2,lb=4;function Ri(e,t){return n=>e(t(n))}function eM(e,t){return t(e)}function cb(e,t){return n=>e(t,n)}function ub(e,t){return()=>e(t)}function Ea(e,t){return t(e),e}function Ye(...e){return e}function tM(e){e()}function db(e){return()=>e}function nM(...e){return()=>{e.map(tM)}}function Gu(e){return e!==void 0}function $r(){}function $e(e,t){return e(dr,t)}function be(e,t){e(Sa,t)}function Yu(e){e(Lo)}function Dt(e){return e(lb)}function ue(e,t){return $e(e,cb(t,Sa))}function vn(e,t){const n=e(dr,r=>{n(),t(r)});return n}function Ce(){const e=[];return(t,n)=>{switch(t){case Lo:e.splice(0,e.length);return;case dr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case Sa:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function X(e){let t=e;const n=Ce();return(r,o)=>{switch(r){case dr:o(t);break;case Sa:t=o;break;case lb:return t}return n(r,o)}}function rM(e){let t,n;const r=()=>t&&t();return function(o,i){switch(o){case dr:return i?n===i?void 0:(r(),n=i,t=$e(e,i),t):(r(),$r);case Lo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Yt(e){return Ea(Ce(),t=>ue(e,t))}function Mt(e,t){return Ea(X(t),n=>ue(e,n))}function oM(...e){return t=>e.reduceRight(eM,t)}function q(e,...t){const n=oM(...t);return(r,o)=>{switch(r){case dr:return $e(e,n(o));case Lo:Yu(e);return}}}function fb(e,t){return e===t}function qe(e=fb){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function pe(e){return t=>n=>{e(n)&&t(n)}}function se(e){return t=>Ri(t,e)}function bn(e){return t=>()=>t(e)}function wn(e,t){return n=>r=>n(t=e(t,r))}function Vo(e){return t=>n=>{e>0?e--:t(n)}}function fr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function hb(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function we(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);$e(i,l=>{const c=n;n=n|a,t[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>i([s].concat(t));n===o?a():r=a}}function pb(...e){return function(t,n){switch(t){case dr:return nM(...e.map(r=>$e(r,n)));case Lo:return;default:throw new Error(`unrecognized action ${t}`)}}}function ge(e,t=fb){return q(e,qe(t))}function bt(...e){const t=Ce(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);$e(i,l=>{n[s]=l,r=r|a,r===o&&be(t,n)})}),function(i,s){switch(i){case dr:return r===o&&s(n),$e(t,s);case Lo:return Yu(t);default:throw new Error(`unrecognized action ${i}`)}}}function Ne(e,t=[],{singleton:n}={singleton:!0}){return{id:iM(),constructor:e,dependencies:t,singleton:n}}const iM=()=>Symbol();function sM(e){const t=new Map,n=({id:r,constructor:o,dependencies:i,singleton:s})=>{if(s&&t.has(r))return t.get(r);const a=o(i.map(l=>n(l)));return s&&t.set(r,a),a};return n(e)}function aM(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const s in t)r.hasOwnProperty(s)||(n[s]=t[s]);return n}const Ca=typeof document<"u"?b.useLayoutEffect:b.useEffect;function qu(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=b.createContext({});function l(v,w){v.propsReady&&be(v.propsReady,!1);for(const y of r){const S=v[t.required[y]];be(S,w[y])}for(const y of o)if(y in w){const S=v[t.optional[y]];be(S,w[y])}v.propsReady&&be(v.propsReady,!0)}function c(v){return i.reduce((w,y)=>(w[y]=S=>{const T=v[t.methods[y]];be(T,S)},w),{})}function u(v){return s.reduce((w,y)=>(w[y]=rM(v[t.events[y]]),w),{})}const d=b.forwardRef((v,w)=>{const{children:y,...S}=v,[T]=b.useState(()=>Ea(sM(e),P=>l(P,S))),[E]=b.useState(ub(u,T));return Ca(()=>{for(const P of s)P in S&&$e(E[P],S[P]);return()=>{Object.values(E).map(Yu)}},[S,E,T]),Ca(()=>{l(T,S)}),b.useImperativeHandle(w,db(c(T))),b.createElement(a.Provider,{value:T},n?b.createElement(n,aM([...r,...o,...s],S),y):y)}),f=v=>b.useCallback(cb(be,b.useContext(a)[v]),[v]),h=v=>{const y=b.useContext(a)[v],S=b.useCallback(T=>$e(y,T),[y]);return b.useSyncExternalStore(S,()=>Dt(y),()=>Dt(y))},p=v=>{const y=b.useContext(a)[v],[S,T]=b.useState(ub(Dt,y));return Ca(()=>$e(y,E=>{E!==S&&T(db(E))}),[y,S]),S},m=b.version.startsWith("18")?h:p;return{Component:d,usePublisher:f,useEmitterValue:m,useEmitter:(v,w)=>{const S=b.useContext(a)[v];Ca(()=>$e(S,w),[w,S])}}}const lM=typeof document<"u"?b.useLayoutEffect:b.useEffect;var qt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(qt||{});const cM={0:"debug",1:"log",2:"warn",3:"error"},uM=()=>typeof globalThis>"u"?window:globalThis,hr=Ne(()=>{const e=X(3);return{log:X((n,r,o=1)=>{var i;const s=(i=uM().VIRTUOSO_LOG_LEVEL)!=null?i:Dt(e);o>=s&&console[cM[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Ku(e,t=!0){const n=b.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=b.useMemo(()=>new ResizeObserver(i=>{requestAnimationFrame(()=>{const s=i[0].target;s.offsetParent!==null&&e(s)})}),[e]);r=i=>{i&&t?(o.observe(i),n.current=i):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function xn(e,t=!0){return Ku(e,t).callbackRef}function mb(e,t,n,r,o,i,s){const a=b.useCallback(l=>{const c=dM(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",f=s?s.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=s?s.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=s?s.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:p}),i==null||i(fM("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,i,s,r]);return Ku(a,n)}function dM(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=e.item(s);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},qt.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({startIndex:l,endIndex:l,size:u}):i[i.length-1].endIndex++}return i}function fM(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,qt.WARN),t==="normal"?0:parseInt(t??"0",10)}function rn(e,t){return Math.round(e.getBoundingClientRect()[t])}function gb(e,t){return Math.abs(e-t)<1.01}function yb(e,t,n,r=$r,o){const i=b.useRef(null),s=b.useRef(null),a=b.useRef(null),l=b.useCallback(d=>{const f=d.target,h=f===window||f===document,p=h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,m=h?document.documentElement.scrollHeight:f.scrollHeight,g=h?window.innerHeight:f.offsetHeight,v=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:g})};d.suppressFlushSync?v():Zd.flushSync(v),s.current!==null&&(p===s.current||p<=0||p===m-g)&&(s.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);b.useEffect(()=>{const d=o||i.current;return r(o||i.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[i,l,n,r,o]);function c(d){const f=i.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let p,m,g;f===window?(m=Math.max(rn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,g=document.documentElement.scrollTop):(m=f.scrollHeight,p=rn(f,"height"),g=f.scrollTop);const v=m-p;if(d.top=Math.ceil(Math.max(Math.min(v,d.top),0)),gb(p,m)||d.top===g){e({scrollTop:g,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(s.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,f.scrollTo(d)}function u(d){i.current.scrollBy(d)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:c}}const Ft=Ne(()=>{const e=Ce(),t=Ce(),n=X(0),r=Ce(),o=X(0),i=Ce(),s=Ce(),a=X(0),l=X(0),c=X(0),u=X(0),d=Ce(),f=Ce(),h=X(!1);return ue(q(e,se(({scrollTop:p})=>p)),t),ue(q(e,se(({scrollHeight:p})=>p)),s),ue(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:i,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:d,scrollBy:f,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),ji={lvl:0};function vb(e,t,n,r=ji,o=ji){return{k:e,v:t,lvl:n,l:r,r:o}}function We(e){return e===ji}function $o(){return ji}function Zu(e,t){if(We(e))return ji;const{k:n,l:r,r:o}=e;if(t===n){if(We(r))return o;if(We(o))return r;{const[i,s]=bb(r);return Pa(mt(e,{k:i,v:s,l:wb(r)}))}}else return t<n?Pa(mt(e,{l:Zu(r,t)})):Pa(mt(e,{r:Zu(o,t)}))}function Bi(e,t){if(!We(e))return t===e.k?e.v:t<e.k?Bi(e.l,t):Bi(e.r,t)}function on(e,t,n="k"){if(We(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=on(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return on(e.l,t,n)}function Kt(e,t,n){return We(e)?vb(t,n,1):t===e.k?mt(e,{k:t,v:n}):t<e.k?xb(mt(e,{l:Kt(e.l,t,n)})):xb(mt(e,{r:Kt(e.r,t,n)}))}function Xu(e,t,n){if(We(e))return[];const{k:r,v:o,l:i,r:s}=e;let a=[];return r>t&&(a=a.concat(Xu(i,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Xu(s,t,n))),a}function Rr(e){return We(e)?[]:[...Rr(e.l),{k:e.k,v:e.v},...Rr(e.r)]}function bb(e){return We(e.r)?[e.k,e.v]:bb(e.r)}function wb(e){return We(e.r)?e.l:Pa(mt(e,{r:wb(e.r)}))}function mt(e,t){return vb(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function Qu(e){return We(e)||e.lvl>e.r.lvl}function xb(e){return Ju(Sb(e))}function Pa(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(Qu(t))return Sb(mt(e,{lvl:r-1}));if(!We(t)&&!We(t.r))return mt(t.r,{l:mt(t,{r:t.r.l}),r:mt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(Qu(e))return Ju(mt(e,{lvl:r-1}));if(!We(n)&&!We(n.l)){const o=n.l,i=Qu(o)?n.lvl-1:n.lvl;return mt(o,{l:mt(e,{r:o.l,lvl:r-1}),r:Ju(mt(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function ka(e,t,n){if(We(e))return[];const r=on(e,t)[0];return hM(Xu(e,r,n))}function Tb(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=t(e[s]);i.push({start:r,end:a-1,value:o}),r=a,o=l}return i.push({start:r,end:1/0,value:o}),i}function hM(e){return Tb(e,({k:t,v:n})=>({index:t,value:n}))}function Ju(e){const{r:t,lvl:n}=e;return!We(t)&&!We(t.r)&&t.lvl===n&&t.r.lvl===n?mt(t,{l:mt(e,{r:t.l}),lvl:n+1}):e}function Sb(e){const{l:t}=e;return!We(t)&&t.lvl===e.lvl?mt(t,{r:mt(e,{l:t.r})}):e}function Oa(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Eb(e,t,n){return e[Oa(e,t,n)]}function pM(e,t,n,r){const o=Oa(e,t,r),i=Oa(e,n,r,o);return e.slice(o,i+1)}const ed=Ne(()=>({recalcInProgress:X(!1)}),[],{singleton:!0});function mM(e){const{size:t,startIndex:n,endIndex:r}=e;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===t}function Cb(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function gM(e,t){let n=We(e)?0:1/0;for(const r of t){const{size:o,startIndex:i,endIndex:s}=r;if(n=Math.min(n,i),We(e)){e=Kt(e,0,o);continue}const a=ka(e,i-1,s+1);if(a.some(mM(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(s>=u||o===f)&&(e=Zu(e,u)):(c=f!==o,l=!0),d>s&&s>=u&&f!==o&&(e=Kt(e,s+1,f));c&&(e=Kt(e,i,o))}return[e,n]}function yM(){return{offsetTree:[],sizeTree:$o(),groupOffsetTree:$o(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function td({index:e},t){return t===e?0:t<e?-1:1}function vM({offset:e},t){return t===e?0:t<e?-1:1}function bM(e){return{index:e.index,value:e}}function wM(e,t,n,r=0){return r>0&&(t=Math.max(t,Eb(e,r,td).offset)),Tb(pM(e,t,n,vM),bM)}function nd(e,t,n,r){let o=e,i=0,s=0,a=0,l=0;if(t!==0){l=Oa(o,t-1,td),a=o[l].offset;const u=on(n,t-1);i=u[0],s=u[1],o.length&&o[l].size===on(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of ka(n,t,1/0)){const d=c-i,f=d*s+a+d*r;o.push({offset:f,size:u,index:c}),i=c,a=f,s=u}return{offsetTree:o,lastIndex:i,lastOffset:a,lastSize:s}}function xM(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,qt.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&We(i)&&t.length===2){const f=t[0].size,h=t[1].size;s=n.reduce((p,m)=>Kt(Kt(p,m,f),m+1,h),s)}else[s,a]=gM(s,t);if(s===i)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=nd(e.offsetTree,a,s,o);return{sizeTree:s,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Kt(f,h,zi(h,l,o)),$o()),groupIndices:n}}function zi(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:i}=Eb(t,e,td),s=e-o,a=i*s+(s-1)*n+r;return a>0?a+n:a}function TM(e){return typeof e.groupIndex<"u"}function Pb(e,t,n){if(TM(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=kb(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function kb(e,t){if(!Ia(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Ia(e){return!We(e.groupOffsetTree)}function SM(e){return Rr(e).map(({k:t,v:n},r,o)=>{const i=o[r+1],s=i?i.k-1:1/0;return{startIndex:t,endIndex:s,size:n}})}const EM={offsetHeight:"height",offsetWidth:"width"},Tn=Ne(([{log:e},{recalcInProgress:t}])=>{const n=Ce(),r=Ce(),o=Mt(r,0),i=Ce(),s=Ce(),a=X(0),l=X([]),c=X(void 0),u=X(void 0),d=X((T,E)=>rn(T,EM[E])),f=X(void 0),h=X(0),p=yM(),m=Mt(q(n,we(l,e,h),wn(xM,p),qe()),p),g=Mt(q(l,qe(),wn((T,E)=>({prev:T.current,current:E}),{prev:[],current:[]}),se(({prev:T})=>T)),[]);ue(q(l,pe(T=>T.length>0),we(m,h),se(([T,E,P])=>{const D=T.reduce((_,O,V)=>Kt(_,O,zi(O,E.offsetTree,P)||V),$o());return{...E,groupIndices:T,groupOffsetTree:D}})),m),ue(q(r,we(m),pe(([T,{lastIndex:E}])=>T<E),se(([T,{lastIndex:E,lastSize:P}])=>[{startIndex:T,endIndex:E,size:P}])),n),ue(c,u);const v=Mt(q(c,se(T=>T===void 0)),!0);ue(q(u,pe(T=>T!==void 0&&We(Dt(m).sizeTree)),se(T=>[{startIndex:0,endIndex:0,size:T}])),n);const w=Yt(q(n,we(m),wn(({sizes:T},[E,P])=>({changed:P!==T,sizes:P}),{changed:!1,sizes:p}),se(T=>T.changed)));$e(q(a,wn((T,E)=>({diff:T.prev-E,prev:E}),{diff:0,prev:0}),se(T=>T.diff)),T=>{const{groupIndices:E}=Dt(m);if(T>0)be(t,!0),be(i,T+Cb(T,E));else if(T<0){const P=Dt(g);P.length>0&&(T-=Cb(-T,P)),be(s,T)}}),$e(q(a,we(e)),([T,E])=>{T<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},qt.ERROR)});const y=Yt(i);ue(q(i,we(m),se(([T,E])=>{const P=E.groupIndices.length>0,D=[],_=E.lastSize;if(P){const O=Bi(E.sizeTree,0);let V=0,F=0;for(;V<T;){const I=E.groupIndices[F],M=E.groupIndices.length===F+1?1/0:E.groupIndices[F+1]-I-1;D.push({startIndex:I,endIndex:I,size:O}),D.push({startIndex:I+1,endIndex:I+1+M-1,size:_}),F++,V+=M+1}const $=Rr(E.sizeTree);return V!==T&&$.shift(),$.reduce((I,{k:M,v:L})=>{let H=I.ranges;return I.prevSize!==0&&(H=[...I.ranges,{startIndex:I.prevIndex,endIndex:M+T-1,size:I.prevSize}]),{ranges:H,prevIndex:M+T,prevSize:L}},{ranges:D,prevIndex:T,prevSize:0}).ranges}return Rr(E.sizeTree).reduce((O,{k:V,v:F})=>({ranges:[...O.ranges,{startIndex:O.prevIndex,endIndex:V+T-1,size:O.prevSize}],prevIndex:V+T,prevSize:F}),{ranges:[],prevIndex:0,prevSize:_}).ranges})),n);const S=Yt(q(s,we(m,h),se(([T,{offsetTree:E},P])=>{const D=-T;return zi(D,E,P)})));return ue(q(s,we(m,h),se(([T,E,P])=>{if(E.groupIndices.length>0){if(We(E.sizeTree))return E;let _=$o();const O=Dt(g);let V=0,F=0,$=0;for(;V<-T;){$=O[F];const I=O[F+1]-$-1;F++,V+=I+1}if(_=Rr(E.sizeTree).reduce((I,{k:M,v:L})=>Kt(I,Math.max(0,M+T),L),_),V!==-T){const I=Bi(E.sizeTree,$);_=Kt(_,0,I);const M=on(E.sizeTree,-T+1)[1];_=Kt(_,1,M)}return{...E,sizeTree:_,...nd(E.offsetTree,0,_,P)}}else{const _=Rr(E.sizeTree).reduce((O,{k:V,v:F})=>Kt(O,Math.max(0,V+T),F),$o());return{...E,sizeTree:_,...nd(E.offsetTree,0,_,P)}}})),m),{data:f,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:i,shiftWith:s,shiftWithOffset:S,beforeUnshiftWith:y,firstItemIndex:a,gap:h,sizes:m,listRefresh:w,statefulTotalCount:o,trackItemSizes:v,itemSize:d}},Ye(hr,ed),{singleton:!0}),CM=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Ob(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!CM)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Wi=Ne(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:f}])=>{const h=Ce(),p=Ce(),m=X(0);let g=null,v=null,w=null;function y(){g&&(g(),g=null),w&&(w(),w=null),v&&(clearTimeout(v),v=null),be(o,!1)}return ue(q(h,we(e,i,t,m,l,c,f),we(r,u,d),se(([[S,T,E,P,D,_,O,V],F,$,C])=>{const I=Ob(S),{align:M,behavior:L,offset:H}=I,Y=P-1,k=Pb(I,T,Y);let R=zi(k,T.offsetTree,F)+_;M==="end"?(R+=$+on(T.sizeTree,k)[1]-E+C,k===Y&&(R+=O)):M==="center"?R+=($+on(T.sizeTree,k)[1]-E+C)/2:R-=D,H&&(R+=H);const Z=oe=>{y(),oe?(V("retrying to scroll to",{location:S},qt.DEBUG),be(h,S)):(be(p,!0),V("list did not change, scroll successful",{},qt.DEBUG))};if(y(),L==="smooth"){let oe=!1;w=$e(n,J=>{oe=oe||J}),g=vn(a,()=>{Z(oe)})}else g=vn(q(n,PM(150)),Z);return v=setTimeout(()=>{y()},1200),be(o,!0),V("scrolling from index to",{index:k,top:R,behavior:L},qt.DEBUG),{top:R,behavior:L}})),s),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},Ye(Tn,Ft,hr),{singleton:!0});function PM(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const Hi="up",Ui="down",kM="none",OM={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},IM=0,Gi=Ne(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:i}])=>{const s=X(!1),a=X(!0),l=Ce(),c=Ce(),u=X(4),d=X(IM),f=Mt(q(pb(q(ge(t),Vo(1),bn(!0)),q(ge(t),Vo(1),bn(!1),hb(100))),qe()),!1),h=Mt(q(pb(q(i,bn(!0)),q(i,bn(!1),hb(200))),qe()),!1);ue(q(bt(ge(t),ge(d)),se(([w,y])=>w<=y),qe()),a),ue(q(a,fr(50)),c);const p=Yt(q(bt(e,ge(n),ge(r),ge(o),ge(u)),wn((w,[{scrollTop:y,scrollHeight:S},T,E,P,D])=>{const _=y+T-S>-D,O={viewportHeight:T,scrollTop:y,scrollHeight:S};if(_){let F,$;return y>w.state.scrollTop?(F="SCROLLED_DOWN",$=w.state.scrollTop-y):(F="SIZE_DECREASED",$=w.state.scrollTop-y||w.scrollTopDelta),{atBottom:!0,state:O,atBottomBecause:F,scrollTopDelta:$}}let V;return O.scrollHeight>w.state.scrollHeight?V="SIZE_INCREASED":T<w.state.viewportHeight?V="VIEWPORT_HEIGHT_DECREASING":y<w.state.scrollTop?V="SCROLLING_UPWARDS":V="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:V,state:O}},OM),qe((w,y)=>w&&w.atBottom===y.atBottom))),m=Mt(q(e,wn((w,{scrollTop:y,scrollHeight:S,viewportHeight:T})=>{if(gb(w.scrollHeight,S))return{scrollTop:y,scrollHeight:S,jump:0,changed:!1};{const E=S-(y+T)<1;return w.scrollTop!==y&&E?{scrollHeight:S,scrollTop:y,jump:w.scrollTop-y,changed:!0}:{scrollHeight:S,scrollTop:y,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),pe(w=>w.changed),se(w=>w.jump)),0);ue(q(p,se(w=>w.atBottom)),s),ue(q(s,fr(50)),l);const g=X(Ui);ue(q(e,se(({scrollTop:w})=>w),qe(),wn((w,y)=>Dt(h)?{direction:w.direction,prevScrollTop:y}:{direction:y<w.prevScrollTop?Hi:Ui,prevScrollTop:y},{direction:Ui,prevScrollTop:0}),se(w=>w.direction)),g),ue(q(e,fr(50),bn(kM)),g);const v=X(0);return ue(q(f,pe(w=>!w),bn(0)),v),ue(q(t,fr(100),we(f),pe(([w,y])=>!!y),wn(([w,y],[S])=>[y,S],[0,0]),se(([w,y])=>y-w)),v),{isScrolling:f,isAtTop:a,isAtBottom:s,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:g,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:v,lastJumpDueToItemResize:m}},Ye(Ft)),pr=Ne(([{log:e}])=>{const t=X(!1),n=Yt(q(t,pe(r=>r),qe()));return $e(t,r=>{r&&Dt(e)("props updated",{},qt.DEBUG)}),{propsReady:t,didMount:n}},Ye(hr),{singleton:!0});function rd(e,t){e==0?t():requestAnimationFrame(()=>rd(e-1,t))}function od(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Yi=Ne(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:i},{didMount:s}])=>{const a=X(!0),l=X(0),c=X(!0);return ue(q(s,we(l),pe(([u,d])=>!!d),bn(!1)),a),ue(q(s,we(l),pe(([u,d])=>!!d),bn(!1)),c),$e(q(bt(t,s),we(a,e,n,c),pe(([[,u],d,{sizeTree:f},h,p])=>u&&(!We(f)||Gu(h))&&!d&&!p),we(l)),([,u])=>{vn(i,()=>{be(c,!0)}),rd(4,()=>{vn(r,()=>{be(a,!0)}),be(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Ye(Tn,Ft,Wi,pr),{singleton:!0});function Ib(e){return e?e==="smooth"?"smooth":"auto":!1}const AM=(e,t)=>typeof e=="function"?Ib(e(t)):t&&Ib(e),_M=Ne(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=X(!1),d=Ce();let f=null;function h(m){be(o,{index:"LAST",align:"end",behavior:m})}$e(q(bt(q(ge(e),Vo(1)),a),we(ge(u),n,i,c),se(([[m,g],v,w,y,S])=>{let T=g&&y,E="auto";return T&&(E=AM(v,w||S),T=T&&!!E),{totalCount:m,shouldFollow:T,followOutputBehavior:E}}),pe(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:g})=>{f&&(f(),f=null),f=vn(t,()=>{Dt(l)("following output to ",{totalCount:m},qt.DEBUG),h(g),f=null})});function p(m){const g=vn(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Dt(l)("scrolling to bottom due to increased size",{},qt.DEBUG),h("auto"))});setTimeout(g,100)}return $e(q(bt(ge(u),e,s),pe(([m,,g])=>m&&g),wn(({value:m},[,g])=>({refreshed:m===g,value:g}),{refreshed:!1,value:0}),pe(({refreshed:m})=>m),we(u,e)),([,m])=>{Dt(i)&&p(m!==!1)}),$e(d,()=>{p(Dt(u)!==!1)}),$e(bt(ge(u),r),([m,g])=>{m&&!g.atBottom&&g.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},Ye(Tn,Gi,Wi,Yi,pr,hr,Ft));function DM(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Ab=Ne(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const i=Ce(),s=Ce(),a=Yt(q(i,se(DM)));return ue(q(a,se(l=>l.totalCount)),e),ue(q(a,se(l=>l.groupIndices)),t),ue(q(bt(r,n,o),pe(([l,c])=>Ia(c)),se(([l,c,u])=>on(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),qe(),se(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},Ye(Tn,Ft));function qi(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function _b(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Aa="top",_a="bottom",Db="none";function Mb(e,t,n){return typeof e=="number"?n===Hi&&t===Aa||n===Ui&&t===_a?e:0:n===Hi?t===Aa?e.main:e.reverse:t===_a?e.main:e.reverse}function Nb(e,t){return typeof e=="number"?e:e[t]||0}const id=Ne(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const i=Ce(),s=X(0),a=X(0),l=X(0),c=Mt(q(bt(ge(e),ge(t),ge(r),ge(i,qi),ge(l),ge(s),ge(o),ge(n),ge(a)),se(([u,d,f,[h,p],m,g,v,w,y])=>{const S=u-w,T=g+v,E=Math.max(f-S,0);let P=Db;const D=Nb(y,Aa),_=Nb(y,_a);return h-=w,h+=f+v,p+=f+v,p-=w,h>u+T-D&&(P=Hi),p<u-E+d+_&&(P=Ui),P!==Db?[Math.max(S-f-Mb(m,Aa,P)-D,0),S-E-v+d+Mb(m,_a,P)+_]:null}),pe(u=>u!=null),qe(qi)),[0,0]);return{listBoundary:i,overscan:l,topListHeight:s,increaseViewportBy:a,visibleRange:c}},Ye(Ft),{singleton:!0});function MM(e,t,n){if(Ia(t)){const r=kb(e,t);return[{index:on(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const sd={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Fb(e,t,n){if(e.length===0)return[];if(!Ia(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],s=ka(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=s.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},i.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return i}function Da(e,t,n,r,o,i){const{lastSize:s,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const d=n-l,f=a+d*s+(d-1)*r,h=c,p=f-u;return{items:Fb(e,o,i),topItems:Fb(t,o,i),topListHeight:t.reduce((m,g)=>g.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:i}}function Lb(e,t,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=e)break;s++}const a=e+s,l=od(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:i[d+l]}));return Da(c,[],a,o,n,r)}const jr=Ne(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},i,{visibleRange:s,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:p}])=>{const m=X([]),g=X(0),v=Ce();ue(i.topItemsIndexes,m);const w=Mt(q(bt(h,p,ge(s,qi),ge(t),ge(e),ge(u),c,ge(m),ge(r),ge(o),n),pe(([E,P,,D,,,,,,,_])=>{const O=_&&_.length!==D;return E&&!P&&!O}),se(([,,[E,P],D,_,O,V,F,$,C,I])=>{const M=_,{sizeTree:L,offsetTree:H}=M,Y=Dt(g);if(D===0)return{...sd,totalCount:D};if(E===0&&P===0)return Y===0?{...sd,totalCount:D}:Lb(Y,O,_,$,C,I||[]);if(We(L))return Y>0?null:Da(MM(od(O,D),M,I),[],D,C,M,$);const k=[];if(F.length>0){const G=F[0],N=F[F.length-1];let j=0;for(const W of ka(L,G,N)){const U=W.value,z=Math.max(W.start,G),te=Math.min(W.end,N);for(let B=z;B<=te;B++)k.push({index:B,size:U,offset:j,data:I&&I[B]}),j+=U}}if(!V)return Da([],k,D,C,M,$);const R=F.length>0?F[F.length-1]+1:0,Z=wM(H,E,P,R);if(Z.length===0)return null;const oe=D-1,J=Ea([],G=>{for(const N of Z){const j=N.value;let W=j.offset,U=N.start;const z=j.size;if(j.offset<E){U+=Math.floor((E-j.offset+C)/(z+C));const B=U-N.start;W+=B*z+B*C}U<R&&(W+=(R-U)*z,U=R);const te=Math.min(N.end,oe);for(let B=U;B<=te&&!(W>=P);B++)G.push({index:B,size:z,offset:W,data:I&&I[B]}),W+=z+C}});return Da(J,k,D,C,M,$)}),pe(E=>E!==null),qe()),sd);ue(q(n,pe(Gu),se(E=>E==null?void 0:E.length)),t),ue(q(w,se(E=>E.topListHeight)),d),ue(d,l),ue(q(w,se(E=>[E.top,E.bottom])),a),ue(q(w,se(E=>E.items)),v);const y=Yt(q(w,pe(({items:E})=>E.length>0),we(t,n),pe(([{items:E},P])=>E[E.length-1].originalIndex===P-1),se(([,E,P])=>[E-1,P]),qe(qi),se(([E])=>E))),S=Yt(q(w,fr(200),pe(({items:E,topItems:P})=>E.length>0&&E[0].originalIndex===P.length),se(({items:E})=>E[0].index),qe())),T=Yt(q(w,pe(({items:E})=>E.length>0),se(({items:E})=>{let P=0,D=E.length-1;for(;E[P].type==="group"&&P<D;)P++;for(;E[D].type==="group"&&D>P;)D--;return{startIndex:E[P].index,endIndex:E[D].index}}),qe(_b)));return{listState:w,topItemsIndexes:m,endReached:y,startReached:S,rangeChanged:T,itemsRendered:v,initialItemCount:g,...f}},Ye(Tn,Ab,id,Yi,Wi,Gi,pr,ed),{singleton:!0}),NM=Ne(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(ue(q(a,we(i),pe(([,l])=>l!==0),we(o,e,t,r,n),se(([[,l],c,u,d,f,h=[]])=>Lb(l,c,u,d,f,h))),s),{}),Ye(Tn,Yi,jr,pr),{singleton:!0}),Vb=Ne(([{scrollVelocity:e}])=>{const t=X(!1),n=Ce(),r=X(!1);return ue(q(e,we(r,t,n),pe(([o,i])=>!!i),se(([o,i,s,a])=>{const{exit:l,enter:c}=i;if(s){if(l(o,a))return!1}else if(c(o,a))return!0;return s}),qe()),t),$e(q(bt(t,e,n),we(r)),([[o,i,s],a])=>o&&a&&a.change&&a.change(i,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Ye(Gi),{singleton:!0}),FM=Ne(([{topItemsIndexes:e}])=>{const t=X(0);return ue(q(t,pe(n=>n>0),se(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Ye(jr)),$b=Ne(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const i=Ce(),s=Mt(q(bt(e,r,t,n,o),se(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return ue(ge(s),i),{totalListHeight:s,totalListHeightChanged:i}},Ye(Ft,jr),{singleton:!0});function Rb(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const LM=Rb(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),VM=Ne(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:f},{log:h},{recalcInProgress:p}])=>{const m=Yt(q(l,we(a),wn(([,v,w,y],[{items:S,totalCount:T,bottom:E,offsetBottom:P},D])=>{const _=E+P;let O=0;return w===T&&v.length>0&&S.length>0&&(S[0].originalIndex===0&&v[0].originalIndex===0||(O=_-y,O!==0&&(O+=D))),[O,S,T,_]},[0,[],0,0]),pe(([v])=>v!==0),we(t,s,r,i,h,p),pe(([,v,w,y,,,S])=>!S&&!y&&v!==0&&w===Hi),se(([[v],,,,,w])=>(w("Upward scrolling compensation",{amount:v},qt.DEBUG),v))));function g(v){v>0?(be(e,{top:-v,behavior:"auto"}),be(n,0)):(be(n,0),be(e,{top:-v,behavior:"auto"}))}return $e(q(m,we(n,o)),([v,w,y])=>{y&&LM()?be(n,w-v):g(-v)}),$e(q(bt(Mt(o,!1),n,p),pe(([v,w,y])=>!v&&!y&&w!==0),se(([v,w])=>w),fr(1)),g),ue(q(u,se(v=>({top:-v}))),e),$e(q(c,we(d,f),se(([v,{lastSize:w,groupIndices:y,sizeTree:S},T])=>{function E(P){return P*(w+T)}if(y.length===0)return E(v);{let P=0;const D=Bi(S,0);let _=0,O=0;for(;_<v;){_++,P+=D;let V=y.length===O+1?1/0:y[O+1]-y[O]-1;_+V>v&&(P-=D,V=v-_+1),_+=V,P+=E(V),O++}return P}})),v=>{be(n,v),requestAnimationFrame(()=>{be(e,{top:v}),requestAnimationFrame(()=>{be(n,0),be(p,!1)})})}),{deviation:n}},Ye(Ft,Gi,jr,Tn,hr,ed)),$M=Ne(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=X(0);return $e(q(e,we(r),pe(([,o])=>o!==0),se(([,o])=>({top:o}))),o=>{vn(q(n,Vo(1),pe(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{be(t,o)})})}),{initialScrollTop:r}},Ye(pr,Ft,jr),{singleton:!0}),RM=Ne(([{viewportHeight:e},{totalListHeight:t}])=>{const n=X(!1),r=Mt(q(bt(n,e,t),pe(([o])=>o),se(([,o,i])=>Math.max(0,o-i)),fr(0),qe()),0);return{alignToBottom:n,paddingTopAddition:r}},Ye(Ft,$b),{singleton:!0}),ad=Ne(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ce(),r=Ce(),o=Ce(),i=X(!1),s=X(void 0);return ue(q(bt(n,r),se(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ue(q(e,we(r),se(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Ye(Ft)),jM=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:i,...s}})=>e<n?{...s,behavior:o,align:i??"start"}:t>r?{...s,behavior:o,align:i??"end"}:null,BM=Ne(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ce();return ue(q(u,we(e,o,t,i,s,a,r),we(n),se(([[d,f,h,p,m,g,v,w],y])=>{const{done:S,behavior:T,align:E,calculateViewLocation:P=jM,...D}=d,_=Pb(d,f,p-1),O=zi(_,f.offsetTree,y)+m+g,V=O+on(f.sizeTree,_)[1],F=w+g,$=w+h-v,C=P({itemTop:O,itemBottom:V,viewportTop:F,viewportBottom:$,locationParams:{behavior:T,align:E,...D}});return C?S&&vn(q(l,pe(I=>I===!1),Vo(Dt(l)?1:2)),S):S&&S(),C}),pe(d=>d!==null)),c),{scrollIntoView:u}},Ye(Tn,Ft,Wi,jr,hr),{singleton:!0}),zM=Ne(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ce(),u=X(void 0),d=X(null),f=X(null);return ue(a,d),ue(l,f),$e(q(c,we(e,n,s,d,f,r)),([h,p,m,g,v,w,y])=>{const S=SM(p.sizeTree);g&&v!==null&&w!==null&&(m=v.scrollTop-w.offsetTop),m-=y,h({ranges:S,scrollTop:m})}),ue(q(u,pe(Gu),se(WM)),o),ue(q(i,we(u),pe(([,h])=>h!==void 0),qe(),se(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},Ye(Tn,Ft,Yi,pr,ad));function WM(e){return{offset:e.scrollTop,index:0,align:"start"}}const HM=Ne(([e,t,n,r,o,i,s,a,l,c])=>({...e,...t,...n,...r,...o,...i,...s,...a,...l,...c}),Ye(id,NM,pr,Vb,$b,$M,RM,ad,BM,hr)),jb=Ne(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:i,data:s,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,g,v,{listState:w,topItemsIndexes:y,...S},{scrollToIndex:T},E,{topItemCount:P},{groupCounts:D},_])=>(ue(S.rangeChanged,_.scrollSeekRangeChanged),ue(q(_.windowViewportRect,se(O=>O.visibleHeight)),m.viewportHeight),{totalCount:e,data:s,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:y,topItemCount:P,groupCounts:D,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:w,scrollToIndex:T,trackItemSizes:o,itemSize:i,groupIndices:l,...S,..._,...m,sizes:d,...g}),Ye(Tn,Yi,Ft,zM,_M,jr,Wi,VM,FM,Ab,HM)),ld="-webkit-sticky",Bb="sticky",zb=Rb(()=>{if(typeof document>"u")return Bb;const e=document.createElement("div");return e.style.position=ld,e.style.position===ld?ld:Bb});function cd(e,t){const n=b.useRef(null),r=b.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,d;if(t){const f=t.getBoundingClientRect(),h=l.top-f.top;u=f.height-Math.max(0,h),d=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:i}=Ku(r),s=b.useCallback(()=>{r(i.current)},[r,i]);return b.useEffect(()=>{if(t){t.addEventListener("scroll",s);const a=new ResizeObserver(()=>{requestAnimationFrame(s)});return a.observe(t),()=>{t.removeEventListener("scroll",s),a.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),o}const Ma=b.createContext(void 0),Wb=b.createContext(void 0);function ud(e){return e}const UM=Ne(([e,t])=>({...e,...t}),Ye(jb,Ne(()=>{const e=X(l=>`Item ${l}`),t=X(null),n=X(l=>`Group ${l}`),r=X({}),o=X(ud),i=X("div"),s=X($r),a=(l,c=null)=>Mt(q(r,se(u=>u[l]),qe()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:i,scrollerRef:s,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}))),GM=({height:e})=>b.createElement("div",{style:{height:e}}),YM={position:zb(),zIndex:1,overflowAnchor:"none"},qM={overflowAnchor:"none"},Hb=b.memo(function({showTopList:t=!1}){const n=Se("listState"),r=Jt("sizeRanges"),o=Se("useWindowScroll"),i=Se("customScrollParent"),s=Jt("windowScrollContainerState"),a=Jt("scrollContainerState"),l=i||o?s:a,c=Se("itemContent"),u=Se("context"),d=Se("groupContent"),f=Se("trackItemSizes"),h=Se("itemSize"),p=Se("log"),m=Jt("gap"),{callbackRef:g}=mb(r,h,f,t?$r:l,p,m,i),[v,w]=b.useState(0);hd("deviation",C=>{v!==C&&w(C)});const y=Se("EmptyPlaceholder"),S=Se("ScrollSeekPlaceholder")||GM,T=Se("ListComponent"),E=Se("ItemComponent"),P=Se("GroupComponent"),D=Se("computeItemKey"),_=Se("isSeeking"),O=Se("groupIndices").length>0,V=Se("alignToBottom"),F=Se("initialItemFinalLocationReached"),$=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:v!==0?v:V?"auto":0,...F?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&y?b.createElement(y,nt(y,u)):b.createElement(T,{...nt(T,u),ref:g,style:$,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(C=>{const I=C.originalIndex,M=D(I+n.firstItemIndex,C.data,u);return _?b.createElement(S,{...nt(S,u),key:M,index:C.index,height:C.size,type:C.type||"item",...C.type==="group"?{}:{groupIndex:C.groupIndex}}):C.type==="group"?b.createElement(P,{...nt(P,u),key:M,"data-index":I,"data-known-size":C.size,"data-item-index":C.index,style:YM},d(C.index,u)):b.createElement(E,{...nt(E,u),...Ub(E,C.data),key:M,"data-index":I,"data-known-size":C.size,"data-item-index":C.index,"data-item-group-index":C.groupIndex,style:qM},O?c(C.index,C.groupIndex,C.data,u):c(C.index,C.data,u))}))}),KM={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Ro=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),ZM={width:"100%",position:zb(),top:0,zIndex:1};function nt(e,t){if(typeof e!="string")return{context:t}}function Ub(e,t){return{item:typeof e=="string"?void 0:t}}const XM=b.memo(function(){const t=Se("HeaderComponent"),n=Jt("headerHeight"),r=Se("headerFooterTag"),o=xn(b.useMemo(()=>s=>n(rn(s,"height")),[n])),i=Se("context");return t?b.createElement(r,{ref:o},b.createElement(t,nt(t,i))):null}),QM=b.memo(function(){const t=Se("FooterComponent"),n=Jt("footerHeight"),r=Se("headerFooterTag"),o=xn(b.useMemo(()=>s=>n(rn(s,"height")),[n])),i=Se("context");return t?b.createElement(r,{ref:o},b.createElement(t,nt(t,i))):null});function dd({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),f=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=yb(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),b.createElement(c,{ref:h,style:{...KM,...i},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...nt(c,f)},s)})}function fd({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),f=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:g,scrollToCallback:v}=yb(l,u,c,$r,h);return lM(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",v),t("scrollBy",g),b.createElement(c,{style:{position:"relative",...i,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...nt(c,p)},s)})}const JM=({children:e})=>{const t=b.useContext(Ma),n=Jt("viewportHeight"),r=Jt("fixedItemHeight"),o=Se("alignToBottom"),i=xn(b.useMemo(()=>Ri(n,s=>rn(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Ro(o),ref:i,"data-viewport-type":"element"},e)},eN=({children:e})=>{const t=b.useContext(Ma),n=Jt("windowViewportRect"),r=Jt("fixedItemHeight"),o=Se("customScrollParent"),i=cd(n,o),s=Se("alignToBottom");return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:i,style:Ro(s),"data-viewport-type":"window"},e)},tN=({children:e})=>{const t=Se("TopItemListComponent")||"div",n=Se("headerHeight"),r={...ZM,marginTop:`${n}px`},o=Se("context");return b.createElement(t,{style:r,...nt(t,o)},e)},nN=b.memo(function(t){const n=Se("useWindowScroll"),r=Se("topItemsIndexes").length>0,o=Se("customScrollParent"),i=o||n?iN:oN,s=o||n?eN:JM;return b.createElement(i,{...t},r&&b.createElement(tN,null,b.createElement(Hb,{showTopList:!0})),b.createElement(s,null,b.createElement(XM,null),b.createElement(Hb,null),b.createElement(QM,null)))}),{Component:rN,usePublisher:Jt,useEmitterValue:Se,useEmitter:hd}=qu(UM,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},nN),oN=dd({usePublisher:Jt,useEmitterValue:Se,useEmitter:hd}),iN=fd({usePublisher:Jt,useEmitterValue:Se,useEmitter:hd}),sN=rN,Gb={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},aN={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Yb,ceil:qb,floor:Na,min:pd,max:Ki}=Math;function lN(e){return{...aN,items:e}}function Kb(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const i=n===null?null:n[o+e];return{index:o+e,data:i}})}function cN(e,t){return e&&e.column===t.column&&e.row===t.row}function Fa(e,t){return e&&e.width===t.width&&e.height===t.height}const uN=Ne(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,f,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:g,customScrollParent:v,windowScrollContainerState:w,windowScrollTo:y},S])=>{const T=X(0),E=X(0),P=X(Gb),D=X({height:0,width:0}),_=X({height:0,width:0}),O=Ce(),V=Ce(),F=X(0),$=X(null),C=X({row:0,column:0}),I=Ce(),M=Ce(),L=X(!1),H=X(0),Y=X(!0),k=X(!1);$e(q(p,we(H),pe(([N,j])=>!!j)),()=>{be(Y,!1),be(E,0)}),$e(q(bt(p,Y,_,D,H,k),pe(([N,j,W,U,,z])=>N&&!j&&W.height!==0&&U.height!==0&&!z)),([,,,,N])=>{be(k,!0),rd(1,()=>{be(O,N)}),vn(q(r),()=>{be(n,[0,0]),be(Y,!0)})}),ue(q(M,pe(N=>N!=null&&N.scrollTop>0),bn(0)),E),$e(q(p,we(M),pe(([,N])=>N!=null)),([,N])=>{N&&(be(D,N.viewport),be(_,N==null?void 0:N.item),be(C,N.gap),N.scrollTop>0&&(be(L,!0),vn(q(r,Vo(1)),j=>{be(L,!1)}),be(s,{top:N.scrollTop})))}),ue(q(D,se(({height:N})=>N)),o),ue(q(bt(ge(D,Fa),ge(_,Fa),ge(C,(N,j)=>N&&N.column===j.column&&N.row===j.row),ge(r)),se(([N,j,W,U])=>({viewport:N,item:j,gap:W,scrollTop:U}))),I),ue(q(bt(ge(T),t,ge(C,cN),ge(_,Fa),ge(D,Fa),ge($),ge(E),ge(L),ge(Y),ge(H)),pe(([,,,,,,,N])=>!N),se(([N,[j,W],U,z,te,B,Pe,,ot,He])=>{const{row:it,column:de}=U,{height:Ee,width:ce}=z,{width:Oe}=te;if(Pe===0&&(N===0||Oe===0))return Gb;if(ce===0){const Vt=od(He,N),Gr=Vt===0?Math.max(Pe-1,0):Vt;return lN(Kb(Vt,Gr,B))}const ht=Xb(Oe,ce,de);let Ie,pt;ot?j===0&&W===0&&Pe>0?(Ie=0,pt=Pe-1):(Ie=ht*Na((j+it)/(Ee+it)),pt=ht*qb((W+it)/(Ee+it))-1,pt=pd(N-1,Ki(pt,ht-1)),Ie=pd(pt,Ki(0,Ie))):(Ie=0,pt=-1);const Q=Kb(Ie,pt,B),{top:ae,bottom:_e}=Zb(te,U,z,Q),Ke=qb(N/ht),Nt=Ke*Ee+(Ke-1)*it-_e;return{items:Q,offsetTop:ae,offsetBottom:Nt,top:ae,bottom:_e,itemHeight:Ee,itemWidth:ce}})),P),ue(q($,pe(N=>N!==null),se(N=>N.length)),T),ue(q(bt(D,_,P,C),pe(([N,j,{items:W}])=>W.length>0&&j.height!==0&&N.height!==0),se(([N,j,{items:W},U])=>{const{top:z,bottom:te}=Zb(N,U,j,W);return[z,te]}),qe(qi)),n);const R=X(!1);ue(q(r,we(R),se(([N,j])=>j||N!==0)),R);const Z=Yt(q(ge(P),pe(({items:N})=>N.length>0),we(T,R),pe(([{items:N},j,W])=>W&&N[N.length-1].index===j-1),se(([,N])=>N-1),qe())),oe=Yt(q(ge(P),pe(({items:N})=>N.length>0&&N[0].index===0),bn(0),qe())),J=Yt(q(ge(P),we(L),pe(([{items:N},j])=>N.length>0&&!j),se(([{items:N}])=>({startIndex:N[0].index,endIndex:N[N.length-1].index})),qe(_b),fr(0)));ue(J,f.scrollSeekRangeChanged),ue(q(O,we(D,_,T,C),se(([N,j,W,U,z])=>{const te=Ob(N),{align:B,behavior:Pe,offset:ot}=te;let He=te.index;He==="LAST"&&(He=U-1),He=Ki(0,He,pd(U-1,He));let it=md(j,z,W,He);return B==="end"?it=Yb(it-j.height+W.height):B==="center"&&(it=Yb(it-j.height/2+W.height/2)),ot&&(it+=ot),{top:it,behavior:Pe}})),s);const G=Mt(q(P,se(N=>N.offsetBottom+N.bottom)),0);return ue(q(m,se(N=>({width:N.visibleWidth,height:N.visibleHeight}))),D),{data:$,totalCount:T,viewportDimensions:D,itemDimensions:_,scrollTop:r,scrollHeight:V,overscan:e,scrollBy:i,scrollTo:s,scrollToIndex:O,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:y,useWindowScroll:g,customScrollParent:v,windowScrollContainerState:w,deviation:F,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:C,restoreStateFrom:M,...f,initialTopMostItemIndex:H,gridState:P,totalListHeight:G,...d,startReached:oe,endReached:Z,rangeChanged:J,stateChanged:I,propsReady:h,stateRestoreInProgress:L,...S}},Ye(id,Ft,Gi,Vb,pr,ad,hr));function Zb(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const i=md(e,t,n,r[0].index),s=md(e,t,n,r[r.length-1].index)+o;return{top:i,bottom:s}}function md(e,t,n,r){const o=Xb(e.width,n.width,t.column),i=Na(r/o),s=i*n.height+Ki(0,i-1)*t.row;return s>0?s+t.row:s}function Xb(e,t,n){return Ki(1,Na((e+n)/(Na(t)+n)))}const dN=Ne(([e,t])=>({...e,...t}),Ye(uN,Ne(()=>{const e=X(c=>`Item ${c}`),t=X({}),n=X(null),r=X("virtuoso-grid-item"),o=X("virtuoso-grid-list"),i=X(ud),s=X("div"),a=X($r),l=(c,u=null)=>Mt(q(t,se(d=>d[c]),qe()),u);return{context:n,itemContent:e,components:t,computeItemKey:i,itemClassName:r,listClassName:o,headerFooterTag:s,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),fN=b.memo(function(){const t=et("gridState"),n=et("listClassName"),r=et("itemClassName"),o=et("itemContent"),i=et("computeItemKey"),s=et("isSeeking"),a=sn("scrollHeight"),l=et("ItemComponent"),c=et("ListComponent"),u=et("ScrollSeekPlaceholder"),d=et("context"),f=sn("itemDimensions"),h=sn("gap"),p=et("log"),m=et("stateRestoreInProgress"),g=xn(b.useMemo(()=>v=>{const w=v.parentElement.parentElement.scrollHeight;a(w);const y=v.firstChild;if(y){const{width:S,height:T}=y.getBoundingClientRect();f({width:S,height:T})}h({row:Jb("row-gap",getComputedStyle(v).rowGap,p),column:Jb("column-gap",getComputedStyle(v).columnGap,p)})},[a,f,h,p]));return m?null:b.createElement(c,{ref:g,className:n,...nt(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(v=>{const w=i(v.index,v.data,d);return s?b.createElement(u,{key:w,...nt(u,d),index:v.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(l,{...nt(l,d),className:r,"data-index":v.index,key:w},o(v.index,v.data,d))}))}),hN=b.memo(function(){const t=et("HeaderComponent"),n=sn("headerHeight"),r=et("headerFooterTag"),o=xn(b.useMemo(()=>s=>n(rn(s,"height")),[n])),i=et("context");return t?b.createElement(r,{ref:o},b.createElement(t,nt(t,i))):null}),pN=b.memo(function(){const t=et("FooterComponent"),n=sn("footerHeight"),r=et("headerFooterTag"),o=xn(b.useMemo(()=>s=>n(rn(s,"height")),[n])),i=et("context");return t?b.createElement(r,{ref:o},b.createElement(t,nt(t,i))):null}),mN=({children:e})=>{const t=b.useContext(Wb),n=sn("itemDimensions"),r=sn("viewportDimensions"),o=xn(b.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]));return b.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),b.createElement("div",{style:Ro(!1),ref:o},e)},gN=({children:e})=>{const t=b.useContext(Wb),n=sn("windowViewportRect"),r=sn("itemDimensions"),o=et("customScrollParent"),i=cd(n,o);return b.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),b.createElement("div",{ref:i,style:Ro(!1)},e)},yN=b.memo(function({...t}){const n=et("useWindowScroll"),r=et("customScrollParent"),o=r||n?bN:vN,i=r||n?gN:mN;return b.createElement(o,{...t},b.createElement(i,null,b.createElement(hN,null),b.createElement(fN,null),b.createElement(pN,null)))}),{Component:rV,usePublisher:sn,useEmitterValue:et,useEmitter:Qb}=qu(dN,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},yN),vN=dd({usePublisher:sn,useEmitterValue:et,useEmitter:Qb}),bN=fd({usePublisher:sn,useEmitterValue:et,useEmitter:Qb});function Jb(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,qt.WARN),t==="normal"?0:parseInt(t??"0",10)}const wN=Ne(([e,t])=>({...e,...t}),Ye(jb,Ne(()=>{const e=X(l=>b.createElement("td",null,"Item $",l)),t=X(null),n=X(null),r=X(null),o=X({}),i=X(ud),s=X($r),a=(l,c=null)=>Mt(q(o,se(u=>u[l]),qe()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:i,scrollerRef:s,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),xN=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e}})),TN=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e,padding:0,border:0}})),SN={overflowAnchor:"none"},EN=b.memo(function(){const t=Re("listState"),n=an("sizeRanges"),r=Re("useWindowScroll"),o=Re("customScrollParent"),i=an("windowScrollContainerState"),s=an("scrollContainerState"),a=o||r?i:s,l=Re("itemContent"),c=Re("trackItemSizes"),u=Re("itemSize"),d=Re("log"),{callbackRef:f,ref:h}=mb(n,u,c,a,d,void 0,o),[p,m]=b.useState(0);gd("deviation",M=>{p!==M&&(h.current.style.marginTop=`${M}px`,m(M))});const g=Re("EmptyPlaceholder"),v=Re("ScrollSeekPlaceholder")||xN,w=Re("FillerRow")||TN,y=Re("TableBodyComponent"),S=Re("TableRowComponent"),T=Re("computeItemKey"),E=Re("isSeeking"),P=Re("paddingTopAddition"),D=Re("firstItemIndex"),_=Re("statefulTotalCount"),O=Re("context");if(_===0&&g)return b.createElement(g,nt(g,O));const V=t.offsetTop+P+p,F=t.offsetBottom,$=V>0?b.createElement(w,{height:V,key:"padding-top",context:O}):null,C=F>0?b.createElement(w,{height:F,key:"padding-bottom",context:O}):null,I=t.items.map(M=>{const L=M.originalIndex,H=T(L+D,M.data,O);return E?b.createElement(v,{...nt(v,O),key:H,index:M.index,height:M.size,type:M.type||"item"}):b.createElement(S,{...nt(S,O),...Ub(S,M.data),key:H,"data-index":L,"data-known-size":M.size,"data-item-index":M.index,style:SN},l(M.index,M.data,O))});return b.createElement(y,{ref:f,"data-testid":"virtuoso-item-list",...nt(y,O)},[$,...I,C])}),CN=({children:e})=>{const t=b.useContext(Ma),n=an("viewportHeight"),r=an("fixedItemHeight"),o=xn(b.useMemo(()=>Ri(n,i=>rn(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Ro(!1),ref:o,"data-viewport-type":"element"},e)},PN=({children:e})=>{const t=b.useContext(Ma),n=an("windowViewportRect"),r=an("fixedItemHeight"),o=Re("customScrollParent"),i=cd(n,o);return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:i,style:Ro(!1),"data-viewport-type":"window"},e)},kN=b.memo(function(t){const n=Re("useWindowScroll"),r=Re("customScrollParent"),o=an("fixedHeaderHeight"),i=an("fixedFooterHeight"),s=Re("fixedHeaderContent"),a=Re("fixedFooterContent"),l=Re("context"),c=xn(b.useMemo(()=>Ri(o,w=>rn(w,"height")),[o])),u=xn(b.useMemo(()=>Ri(i,w=>rn(w,"height")),[i])),d=r||n?AN:IN,f=r||n?PN:CN,h=Re("TableComponent"),p=Re("TableHeadComponent"),m=Re("TableFooterComponent"),g=s?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...nt(p,l)},s()):null,v=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...nt(m,l)},a()):null;return b.createElement(d,{...t},b.createElement(f,null,b.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...nt(h,l)},[g,b.createElement(EN,{key:"TableBody"}),v])))}),{Component:ON,usePublisher:an,useEmitterValue:Re,useEmitter:gd}=qu(wN,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},kN),IN=dd({usePublisher:an,useEmitterValue:Re,useEmitter:gd}),AN=fd({usePublisher:an,useEmitterValue:Re,useEmitter:gd}),_N=ON,DN=e=>{const[t,n]=b.useState(0);return b.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},MN={Item:b.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:b.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},NN=e=>{const t=b.useRef(null),n=DN(t);return x.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[x.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[x.jsx("header",{className:"border-b border-card-border pb-2"}),x.jsxs("div",{className:"px-8 space-y-2",children:[x.jsx(Li,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(sN,{height:n,useWindowScroll:!0,data:e.source,components:MN,itemContent:(r,o)=>x.jsx(b.Fragment,{children:x.jsx(Sv,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(xr,{children:x.jsx(Oc,{})})}),x.jsx("div",{})]})};var FN=Object.defineProperty,e0=Object.getOwnPropertySymbols,LN=Object.prototype.hasOwnProperty,VN=Object.prototype.propertyIsEnumerable,t0=(e,t,n)=>t in e?FN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$N=(e,t)=>{for(var n in t||(t={}))LN.call(t,n)&&t0(e,n,t[n]);if(e0)for(var n of e0(t))VN.call(t,n)&&t0(e,n,t[n]);return e},yd=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},RN=(e,t,n,r)=>Va(yd,e,t,n,r),jo=e=>typeof e=="object",mr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!jo(e)&&!jo(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>mr(e[r],t[r]))},jN=(e,t)=>(jo(e)||Array.isArray(e))&&t?e[t]:e,BN=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,La=e=>/[0-9.]+/.test(e),n0=e=>["string","number"].includes(typeof e),r0=e=>e==null||(e==null?void 0:e.length)===0||e==="",o0={eq:mr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:r0,notEmpty:e=>!r0(e),in:(e,t)=>yd(t,n=>mr(e,n)),notIn:(e,t)=>i0(t,n=>!mr(e,n))},zN=e=>{if(e in o0)return o0[e];throw new Error("Linq - Symbol not found")},Bo=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},Va=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=zN(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},WN=(e,t,n,r)=>Va(Bo,e,t,n,r),i0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},HN=(e,t,n,r)=>Va(i0,e,t,n,r),s0=e=>{if(e===null)return null;const t=$N({},e);return Object.keys(t).forEach(n=>t[n]=jo(e[n])?s0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},a0=(e,t)=>{if(jo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(mr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(mr(t,r))return!0}return!1},UN=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},GN=e=>Bo(e,(t,n,r)=>jo(t)?n===r.findIndex(o=>mr(o,t)):n===r.indexOf(t)),YN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},l0=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},qN=(e,t)=>l0(e,n=>n[t]),c0=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},KN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},ZN=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return La(e)&&La(t)?r.map(s=>Number.parseInt(s)):r},vd=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&La(e)&&La(t)){const o=[],[i,s]=KN(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return ZN(e,t,r)},XN=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?vd(r,o,1):vd(r,i,Number.parseInt(o,10))}return n0(e)&&n0(t)?vd(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},bd=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=e(r,s,i,n)}return r},u0=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},QN=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},JN=(e,t,n,r)=>Va(QN,e,t,n,r),d0=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(BN(t))},f0=(e=>(e.Asc="asc",e.Desc="desc",e))(f0||{}),eF=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),tF=(e,t)=>e.sort(eF(t)),nF=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Bo(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},rF=class Kd{constructor(t=[]){this.array=t}static Range(...t){return XN(...t)}static New(t){return new Kd(t)}Where(t,n,r){return this.array=WN(this.array,t,n,r),this}Some(t,n,r){return RN(this.array,t,n,r)}All(t,n,r){return HN(this.array,t,n,r)}Reverse(){return this.array=u0(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=JN(this.array,t,n,r),this}Distinct(){return this.array=GN(this.array),this}First(t){return t===void 0?this.array[0]:YN(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?bd((n,r)=>n+r,0,this.array):bd((n,r)=>n+jN(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return qN(this.array,t)}GroupWith(t){return l0(this.array,t)}Except(t){return Bo(this.array,n=>!a0(t,n))}Intersect(t){return Bo(this.array,n=>a0(t,n))}OrderBy(t,n){let r;return r=t?d0(this.array,t):this.array.toSorted(),this.array=n==="desc"?u0(r):r,this}Includes(t){return yd(this.array,n=>mr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return bd(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(c0(this.array,n=>[t,n]))}Zip(t,n){return c0(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Bo(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Kd(s0(this.array))}ToObject(t){return UN(this.array,t)}Sort(t){return Array.isArray(t)?tF(this.array,t):d0(this.array,t)}Unique(t){return nF(this.array,t)}},h0=rF,wd={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(g,v)=>{try{Object.keys(g).forEach(v)}catch(w){window.console.log(w)}},n=g=>g==null,r=g=>{const v=typeof g;return v==="string"||v==="number"||v==="boolean"||n(g)},o=(g,v)=>{const w=v.getItem(g);try{return JSON.parse(w)}catch{return w??null}},i=g=>Object.keys(g).reduce((v,w)=>({...v,[w]:o(w,g)}),{}),s=g=>g instanceof Date?g:typeof g=="number"?new Date(new Date*1+g*864e5):g,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(g=>g.split("=")).reduce((g,v)=>(g[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),g),{}),c=new Set,u=()=>{const g=l();c.forEach(v=>v(g))},d=[{name:"expires",parse:g=>`expires=${s(g.expires??a)}`},{name:"maxAge",parse:g=>g.maxAge?`max-age=${s(g.expires??a)}`:""},{name:"path",parse:g=>`path=${g.path??"/"}`},{name:"sameSite",parse:g=>`samesite=${g.sameSite??"strict"}`},{name:"useSecure",parse:g=>`${g.useSecure??!0?"secure":""}`},{name:"domain",parse:g=>{const v=g.domain??"";return v===""?"":`domain=${g.multiDomain?".":""}${v}`}},{name:"partitioned",parse:g=>g.partitioned?"Partitioned":""}],f={json:l,listener:g=>(c.add(g),()=>c.delete(g)),clearListeners:()=>c.clear(),has:g=>document.cookie.split(";").some(v=>v.trim().startsWith(`${g}=`)),deleteAll:()=>{document.cookie.split(";").forEach(g=>{document.cookie=g.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:g=>{const v=f.json()[g];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:g=>{document.cookie=`${encodeURIComponent(g)}=;expires=${new Date().toUTCString()}`,u()},set:(g,v,w={})=>{const y=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=d.reduce((T,E)=>{const P=E.parse(w);return P===""?T:T.concat(P)},[`${encodeURIComponent(g)}=${y}`]).join(";");document.cookie=S,u()}},h=g=>{const v=new Set,w=y=>{g().removeItem(y);const S=i(g());v.forEach(T=>T(S))};return{delete:w,listener:y=>(v.add(y),()=>v.delete(y)),clearListeners:()=>v.clear(),json:(y=!1)=>y?i(g()):g(),has:y=>{const S=g().getItem(y);return!n(S)},deleteAll:()=>{t(g(),w),v.forEach(y=>y(g()))},get:y=>o(y,g()),set:(y,S)=>{g().setItem(y,JSON.stringify(S)),v.forEach(T=>T(g()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(wd);const xd=e=>e.headerLabel??e.thead??e.id,Td=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var zo=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(zo||{});const Sd=e=>e.type==="number"?e.valueAsNumber:e.value,oF=e=>{let t=[];return e({add:(o,i,s)=>t.push({...s,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},iF={},sF=(e,t=iF)=>{const n=ma()?null:wd.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=Uc({name:e,groups:t.groups||(n==null?void 0:n.groups)||[],sorters:t.sorters||(n==null?void 0:n.sorters)||[],filters:t.filters||(n==null?void 0:n.filters)||[],cols:t.cols||(n==null?void 0:n.cols)||[]},i=>{const s=a=>{const l=i.state(),c={...l,...a};return ma()||wd.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>s(a)}});return{...r,...o,name:e}},Ed=(e,t,n,r={})=>{var l;const o=e.id,i=e.type??zo.Text,s=(l=t[i])==null?void 0:l[0].value,a=n[s];return{id:pa(),operation:a,label:xd(e),name:o,type:i,value:"",...r}},Cd=()=>{const e=Qt(),t=b.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{operationOptions:b.useMemo(()=>({[zo.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[zo.Boolean]:[t.is,t.isNot],[zo.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},aF=e=>{const t=Qt(),{operationOptions:n,operations:r}=Cd(),o=()=>{const c=e.cols.at(0);e.set(u=>[...u,Ed(c,n,r)])},i=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(f=>f.map(h=>{if(u!==h.id)return h;const p=e.cols.find(m=>d===m.id);return Ed(p,n,r,{value:""})}))},s=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(f=>f.map(h=>h.id===u?{...h,operation:r[d]}:h))},a=c=>{const u=c.currentTarget.dataset.id||"";e.set(d=>d.filter(f=>f.id!==u))},l=c=>{const u=c.target.dataset.id||"",d=Sd(c.target);e.set(f=>f.map(h=>h.id===u?{...h,value:d}:h))};return x.jsx(b.Fragment,{children:x.jsx(Do,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(OP,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(c=>{const u=n[c.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Vr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:c.name,"data-id":c.id,onChange:i}),x.jsx(Vr,{"data-id":c.id,onChange:s,value:c.operation.value,options:u,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Li,{"data-id":c.id,onChange:l,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:c.type,value:c.value,optionalText:""}),x.jsx("div",{className:"flex items-center justify-center mt-5",children:x.jsx("button",{"data-id":c.id,type:"button",onClick:a,children:x.jsx(po,{className:"text-danger",size:16})})})]},`filter-select-${c.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(Ic,{size:14})," ",t.tableFilterNewFilter]})})]})})})},lF=({filter:e,onDelete:t,set:n})=>{const r=Qt(),{operationOptions:o,operations:i}=Cd(),s=l=>{const c=l.target.value,u=l.target.dataset.id||"";n(d=>d.map(f=>f.id===u?{...f,operation:i[c]}:f))},a=l=>{const c=l.target.dataset.id||"",u=Sd(l.target);n(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(Vr,{"data-id":e.id,onChange:s,options:o[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder,value:e.operation.value}),x.jsx(Li,{"data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),x.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:x.jsx(po,{className:"text-danger",size:14})})]})},cF=({item:e,onPointerDown:t})=>{const n=Or(0);return x.jsxs(zs.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[x.jsx("button",{type:"button",className:"cursor-grab",children:x.jsx(kP,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},uF=e=>{var a;const t=Td(e.cols),n=gP(),[r,o]=b.useState(((a=e.groups[0])==null?void 0:a.thead)||""),i=l=>{var m;const c=l.target,u=c.value,d=c.options.selectedIndex,f=((m=c.options.item(d))==null?void 0:m.label)||"";o(f);const h=new h0(e.rows).GroupBy(u),p=e.cols.find(g=>g.id===u);e.setGroups(Ux(h).map((g,v)=>{const w=h[g];return{...p,groupId:pa(),groupKey:u,index:v,rows:w,groupName:g}}))},s=()=>e.setGroups([]);return x.jsx(b.Fragment,{children:x.jsxs(Do,{arrow:!1,title:"Groups",trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(AP,{size:14}),"Groups",e.groups.length>0?` - ${r}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(Vr,{value:r,title:"Tipo de agrupamento",onChange:i,options:t,placeholder:"Agrupar por..."}),x.jsx(xr,{className:"mt-4",onClick:s,theme:"raw","data-id":r,children:x.jsx(po,{size:16,className:"text-danger"})})]}),e.groups.length>0?x.jsxs("section",{className:"my-4",children:[x.jsx("header",{children:x.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),x.jsx(tP,{children:x.jsx(zs.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:n,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>x.jsx(cF,{item:l,onPointerDown:c=>{n.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},dF=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),fF=(e,t)=>e.toSorted(dF(t)),p0=(e,t,n)=>({id:pa(),type:n,value:e.id,label:t}),hF=e=>{const t=Qt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,p0(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return x.jsx(b.Fragment,{children:x.jsx(Do,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(Qm,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Vr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(Vr,{onChange:s(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),x.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:x.jsx(po,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(Ic,{size:14})," ",t.tableSortAddButton]})})]})})})},pF=e=>{const t=Qt(),[n,r]=b.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");b.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=p0(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=xd(e.col);return x.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",s]}),n==="asc"?x.jsx(xP,{size:14}):null,n==="desc"?x.jsx(wP,{size:14}):null,n==="undefined"?x.jsx(Qm,{size:14}):null]})},mF=e=>x.jsx("header",{className:"min-w-full mb-1",children:x.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[x.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[x.jsx("span",{children:x.jsx(aF,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(hF,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(uF,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),x.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>x.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[x.jsxs("span",{children:[x.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),x.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[x.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),x.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=Sd(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function gF(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2;const o=e-r,i=e+r;for(let a=o>2?o:2;a<=Math.min(t,i);a++)n.push(a);const s=t-2;return i+1!==s&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const yF=e=>{const t=b.useId(),n=Qt(),r=e.asLink||"button",o=b.useMemo(()=>gF(e.current,e.pages),[e.current,e.pages]),i=e.current<e.pages;return x.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(b.Fragment,{children:[x.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),x.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:s=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(s.target.value))},children:e.sizes.map(s=>x.jsx("option",{value:s,children:s},`pagination-opt-${s}`))})," "]}):null})}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(s=>s===null?null:x.jsx(b.Fragment,{children:typeof s=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(r,{href:s,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${s===e.current?"text-primary border-primary":"border-transparent"}`,children:s})})},`pagination-${s}`)),i?x.jsx("li",{children:x.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},vF={opacity:1},bF={opacity:.75,backgroundColor:"var(--table-border)"},wF={opacity:0,transition:{duration:.4,type:"spring"}},xF=e=>{var d;const t=Qt(),n=e.filters.filter(f=>f.name===e.header.id),o=n.length>0?DP:IP,{operationOptions:i,operations:s}=Cd(),a=f=>{const h=f.currentTarget.dataset.id||"";return e.setFilters(p=>p.filter(m=>m.id!==h))},l=e.sorters.find(f=>e.header.id===f.value),c=l!=null&&l.type?l.type===f0.Asc?"ascending":"descending":"none",u=xd(e.header);return x.jsx(zs.Item,{...e.header.thProps,as:"th",exit:wF,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader",value:e.header,whileDrag:bF,"aria-sort":c,"aria-busy":e.loading,animate:vF,className:`hidden font-medium px-2 py-4 first:table-cell md:table-cell ${((d=e.header.thProps)==null?void 0:d.className)??""}`,children:x.jsx("span",{className:"flex items-center justify-between",children:x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx(Do,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",u]}),x.jsx(o,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:x.jsxs("span",{children:[t.tableFilterDropdownTitleUnique," ",x.jsx("span",{className:"text-primary",children:u})]}),children:n.length===0===null?null:x.jsxs("ul",{className:"font-medium",children:[n.map(f=>x.jsx("li",{className:"my-1",children:x.jsx(lF,{onDelete:a,filter:f,set:e.setFilters})},`thead-filter-${f.id}`)),x.jsx("li",{children:x.jsxs("button",{onClick:()=>e.setFilters(f=>f.concat(Ed(e.header,i,s))),type:"button",className:"text-primary flex items-center gap-1",children:[x.jsx(Ic,{size:14})," ",t.tableFilterNewFilter]})})]})}),x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),x.jsx(pF,{col:e.header,setSorters:e.setSorters,sorters:e.sorters})]})})})},TF=e=>x.jsx(zs.Group,{as:"tr",role:"row",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"bg-table-background border-none text-lg",children:x.jsx(Bs,{children:e.headers.map(t=>x.jsx(xF,{loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),SF=e=>Math.min(Math.max(e+e*(e%2===0?2:4)+10,50),90),EF=b.forwardRef((e,t)=>x.jsx("tbody",{...e,role:"rowgroup",className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:x.jsx(Bs,{children:e.children})})),CF=b.forwardRef((e,t)=>x.jsx("table",{...e,ref:t,role:"table",className:`table min-w-full divide-y divide-table-border table-auto text-left ${e.className??""}`})),PF=b.forwardRef(({context:e,...t},n)=>x.jsx("thead",{...t,role:"rowgroup",className:"bg-card-background shadow-xs group:sticky top-0",ref:n})),kF=b.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${n.className??""}`})),OF=b.forwardRef((e,t)=>e.context.loadingMore?x.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:x.jsx("tr",{role:"row",className:"bg-card-background",children:x.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:x.jsx("span",{className:"block w-full h-2 bg-foreground rounded opacity-60 animate-pulse"})})})}):null),IF={TableHead:PF,Table:CF,TableBody:EF,TableRow:kF,TableFoot:OF},AF=[0,0,0,0,0,0,0,0,0,0],_F=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(b.Fragment,{children:r.map((i,s)=>{const a=`${s},${e}`,l=pv(t,i.id),c=i.Element;return b.createElement("td",{...i.cellProps,"data-matrix":a,role:"cell",key:`accessor-${e}-${s}`,className:"px-2 h-14 border-none first:table-cell hidden md:table-cell"},o?x.jsx("div",{className:"animate-pulse h-2 bg-table-border rounded",style:{width:`${SF(e)}%`}}):c?x.jsx(c,{row:t,matrix:a,col:i,rowIndex:e,value:l}):x.jsx(b.Fragment,{children:Pn.nil(l)?"":l}))})})},DF=()=>x.jsx(b.Fragment,{}),m0=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:i,sorters:s,cols:a,border:l=!1,setSorters:c,...u})=>{const d=b.useRef(null),[f,h]=b.useState(!1),p=Uu(n),m=Uu(u.loadingMore),g=b.useMemo(()=>{if(u.loading)return AF;if(r)return u.rows;const v=new h0(u.rows);return e.length>0&&e.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:v.Where(w.name,w.operation.symbol,w.value)),s.length===0?v.Select():fF(v.Select(),s)},[u.rows,e,s,u.loading]);return b.useEffect(()=>{if(d.current===null)return()=>{};const v=d.current,w=new IntersectionObserver(y=>{var E;return y[y.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void h(!0)):h(!1)});return w.observe(v),()=>w.disconnect()},[]),x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg px-1 ${l?"border border-table-border":""}`,children:[x.jsx(_N,{data:g,useWindowScroll:!0,components:IF,totalCount:g.length,itemContent:_F,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:f?DF:null,fixedHeaderContent:()=>x.jsx(TF,{headers:a,sorters:s,filters:e,setCols:o,setSorters:c,setFilters:i,loading:!!u.loading})}),x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),t!==null?x.jsx(yF,{...t}):null]})},MF=(e,t)=>typeof t=="function"?t(e):t,NF=e=>{const t=e.operations??!0,n=b.useMemo(()=>Td(e.cols),[e.cols]),[r,o]=Uc({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},i=>{const s=a=>l=>{const c=i.state();return{...c,[a]:MF(c[a],l)}};return{cols:s("cols"),filters:s("filters"),groups:s("groups"),sorters:s("sorters")}},{postMiddleware:[i=>{var s;return(s=e.set)==null||s.call(e,i),i}]});return x.jsxs("div",{className:"relative min-w-full",children:[t?x.jsx(mF,{setCols:o.cols,rows:e.rows,cols:r.cols,filters:r.filters,groups:r.groups,options:n,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):null,r.groups.length===0?x.jsx(m0,{...e,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,groups:r.groups,index:0,optionCols:n,options:n,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):x.jsx("div",{className:"flex flex-wrap gap-4",children:r.groups.map((i,s)=>x.jsx(Ht.div,{className:"min-w-full",children:x.jsx(m0,{...e,pagination:null,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,group:i,groups:r.groups,index:s,optionCols:n,options:n,rows:i.rows,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters})},`group-${i.groupId}`))})]})},g0=(e="")=>Xe("w-full min-w-36 outline-none px-2 py-1 items-center flex justify-between text-left","data-[active=true]:bg-primary data-[open]:bg-primary focus:bg-primary aria-expanded:opacity-80","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),Pd=b.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),y0=b.forwardRef(({children:e,isParent:t,label:n,...r},o)=>{const i=lr(),s=i!==null,[a,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(null),h=b.useRef([]),p=b.useRef([]),m=b.useContext(Pd),g=cr(),v=jA(),w=Ny(),{floatingStyles:y,refs:S,context:T}=Mi({nodeId:v,open:a,transform:!0,onOpenChange:l,whileElementsMounted:na,placement:s?"right-start":"bottom-start",middleware:[ia({mainAxis:s?0:4,alignmentAxis:s?-4:0}),fu(),du()]}),E=Fi(T,{role:"menu",enabled:!0}),P=Di(T,{bubbles:!0}),D=zy(T,{enabled:!0,delay:{open:100},handleClose:f_({blockPointerEvents:!0})}),_=wu(T,{event:"mousedown",toggle:!s,ignoreMouse:s,keyboardHandlers:!0}),O=lv(T,{loop:!0,activeIndex:d,virtual:!0,nested:s,allowEscape:!0,listRef:h,scrollItemIntoView:!0,onNavigate:f}),V=u_(T,{activeIndex:d,listRef:p,onMatch:a?f:void 0}),{getReferenceProps:F,getFloatingProps:$,getItemProps:C}=Ni([D,_,E,P,O,V]);b.useEffect(()=>{if(!g)return;const M=()=>l(!1),L=H=>{H.nodeId!==v&&H.parentId===i&&l(!1)};return g.events.on("click",M),g.events.on("menuopen",L),()=>{g.events.off("click",M),g.events.off("menuopen",L)}},[g,v,i]),b.useEffect(()=>{a&&g&&g.events.emit("menuopen",{parentId:i,nodeId:v})},[g,a,v,i]);const I=t?r.className:g0(r.className);return x.jsxs(BA,{id:v,children:[x.jsxs("button",{ref:Iy([S.setReference,w.ref,o]),tabIndex:s?m.activeIndex===w.index?0:-1:void 0,"data-open":a?"":void 0,"data-nested":s?"":void 0,role:s?"menuitem":void 0,"data-focus-inside":c?"":void 0,className:I,...F(m.getItemProps({...r,onFocus(M){var L;(L=r.onFocus)==null||L.call(r,M),u(!1),m.setHasFocusInside(!0)}})),children:[n,s&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(Oc,{size:14})]})]}),x.jsx(Pd.Provider,{value:{activeIndex:d,setActiveIndex:f,getItemProps:C,setHasFocusInside:u,isOpen:a},children:x.jsx(LA,{elementsRef:h,labelsRef:p,children:a&&x.jsx(_i,{preserveTabOrder:!0,children:x.jsx(fa,{context:T,modal:!1,initialFocus:s?-1:0,returnFocus:!s,children:x.jsx("div",{ref:S.setFloating,style:y,className:"bg-floating-background z-tooltip isolate outline-none items-start border text-left shadow-xl border-floating-border flex flex-col rounded-lg",...$(),children:e})})})})})]})}),FF=b.forwardRef(({label:e,Right:t,disabled:n,...r},o)=>{const i=b.useContext(Pd),s=Ny({label:n?null:e}),a=cr(),l=s.index===i.activeIndex;return x.jsxs("button",{...r,ref:Iy([s.ref,o]),"data-active":l,type:"button",role:"menuitem",disabled:n,tabIndex:l?0:-1,className:g0(r.className),...i.getItemProps({onClick(c){var u;(u=r.onClick)==null||u.call(r,c),a==null||a.events.emit("click")},onFocus(c){var u;(u=r.onFocus)==null||u.call(r,c),i.setHasFocusInside(!0)}}),children:[e,t?x.jsx(t,{size:16}):null]})}),LF=b.forwardRef((e,t)=>lr()!==null?x.jsx(y0,{...e,isParent:!1,ref:t}):x.jsx(zA,{children:x.jsx(y0,{...e,isParent:!0,ref:t})}));var VF=String.prototype.replace,$F=/%20/g,kd={RFC1738:"RFC1738",RFC3986:"RFC3986"},Od={default:kd.RFC3986,formatters:{RFC1738:function(e){return VF.call(e,$F,"+")},RFC3986:function(e){return String(e)}},RFC1738:kd.RFC1738,RFC3986:kd.RFC3986},RF=Od,Id=Object.prototype.hasOwnProperty,Br=Array.isArray,Sn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),jF=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Br(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},v0=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},BF=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Br(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Id.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Br(t)&&!Br(n)&&(o=v0(t,r)),Br(t)&&Br(n)?(n.forEach(function(i,s){if(Id.call(t,s)){var a=t[s];a&&typeof a=="object"&&i&&typeof i=="object"?t[s]=e(a,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var a=n[s];return Id.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},zF=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},WF=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Ad=1024,HF=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;l+=Ad){for(var c=s.length>=Ad?s.slice(l,l+Ad):s,u=[],d=0;d<c.length;++d){var f=c.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||i===RF.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=Sn[f];continue}if(f<2048){u[u.length]=Sn[192|f>>6]+Sn[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=Sn[224|f>>12]+Sn[128|f>>6&63]+Sn[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=Sn[240|f>>18]+Sn[128|f>>12&63]+Sn[128|f>>6&63]+Sn[128|f&63]}a+=u.join("")}return a},UF=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return jF(n),t},GF=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},YF=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},qF=function(t,n){return[].concat(t,n)},KF=function(t,n){if(Br(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},b0={arrayToObject:v0,assign:zF,combine:qF,compact:UF,decode:WF,encode:HF,isBuffer:YF,isRegExp:GF,maybeMap:KF,merge:BF},w0=Ex,$a=b0,Zi=Od,ZF=Object.prototype.hasOwnProperty,x0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},En=Array.isArray,XF=Array.prototype.push,T0=function(e,t){XF.apply(e,En(t)?t:[t])},QF=Date.prototype.toISOString,S0=Zi.default,gt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:$a.encode,encodeValuesOnly:!1,format:S0,formatter:Zi.formatters[S0],indices:!1,serializeDate:function(t){return QF.call(t)},skipNulls:!1,strictNullHandling:!1},JF=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},_d={},eL=function e(t,n,r,o,i,s,a,l,c,u,d,f,h,p,m,g,v,w){for(var y=t,S=w,T=0,E=!1;(S=S.get(_d))!==void 0&&!E;){var P=S.get(t);if(T+=1,typeof P<"u"){if(P===T)throw new RangeError("Cyclic object value");E=!0}typeof S.get(_d)>"u"&&(T=0)}if(typeof u=="function"?y=u(n,y):y instanceof Date?y=h(y):r==="comma"&&En(y)&&(y=$a.maybeMap(y,function(k){return k instanceof Date?h(k):k})),y===null){if(s)return c&&!g?c(n,gt.encoder,v,"key",p):n;y=""}if(JF(y)||$a.isBuffer(y)){if(c){var D=g?n:c(n,gt.encoder,v,"key",p);return[m(D)+"="+m(c(y,gt.encoder,v,"value",p))]}return[m(n)+"="+m(String(y))]}var _=[];if(typeof y>"u")return _;var O;if(r==="comma"&&En(y))g&&c&&(y=$a.maybeMap(y,c)),O=[{value:y.length>0?y.join(",")||null:void 0}];else if(En(u))O=u;else{var V=Object.keys(y);O=d?V.sort(d):V}var F=l?n.replace(/\./g,"%2E"):n,$=o&&En(y)&&y.length===1?F+"[]":F;if(i&&En(y)&&y.length===0)return $+"[]";for(var C=0;C<O.length;++C){var I=O[C],M=typeof I=="object"&&typeof I.value<"u"?I.value:y[I];if(!(a&&M===null)){var L=f&&l?I.replace(/\./g,"%2E"):I,H=En(y)?typeof r=="function"?r($,L):$:$+(f?"."+L:"["+L+"]");w.set(t,T);var Y=w0();Y.set(_d,w),T0(_,e(M,H,r,o,i,s,a,l,r==="comma"&&g&&En(y)?null:c,u,d,f,h,p,m,g,v,Y))}}return _},tL=function(t){if(!t)return gt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||gt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Zi.default;if(typeof t.format<"u"){if(!ZF.call(Zi.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Zi.formatters[r],i=gt.filter;(typeof t.filter=="function"||En(t.filter))&&(i=t.filter);var s;if(t.arrayFormat in x0?s=t.arrayFormat:"indices"in t?s=t.indices?"indices":"repeat":s=gt.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:gt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:gt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:gt.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:gt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?gt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:gt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:gt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:gt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:gt.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:gt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:gt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:gt.strictNullHandling}},nL=function(e,t){var n=e,r=tL(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):En(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a=x0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=w0(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||T0(s,eL(n[d],d,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var f=s.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},Wo=b0,Dd=Object.prototype.hasOwnProperty,rL=Array.isArray,ft={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Wo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},oL=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},E0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},iL="utf8=%26%2310003%3B",sL="utf8=%E2%9C%93",aL=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===sL?c="utf-8":s[l]===iL&&(c="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var u=s[l],d=u.indexOf("]="),f=d===-1?u.indexOf("="):d+1,h,p;f===-1?(h=n.decoder(u,ft.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),ft.decoder,c,"key"),p=Wo.maybeMap(E0(u.slice(f+1),n),function(g){return n.decoder(g,ft.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=oL(p)),u.indexOf("[]=")>-1&&(p=rL(p)?[p]:p);var m=Dd.call(r,h);m&&n.duplicates==="combine"?r[h]=Wo.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},lL=function(e,t,n,r){for(var o=r?t:E0(t,n),i=e.length-1;i>=0;--i){var s,a=e[i];if(a==="[]"&&n.parseArrays)s=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?s={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[],s[u]=o):c!=="__proto__"&&(s[c]=o)}o=s}return o},cL=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!r.plainObjects&&Dd.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(i))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&Dd.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),lL(u,n,r,o)}},uL=function(t){if(!t)return ft;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?ft.charset:t.charset,r=typeof t.duplicates>"u"?ft.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:ft.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ft.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ft.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ft.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ft.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ft.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ft.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:ft.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:ft.decoder,delimiter:typeof t.delimiter=="string"||Wo.isRegExp(t.delimiter)?t.delimiter:ft.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ft.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ft.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ft.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ft.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ft.strictNullHandling}},dL=function(e,t){var n=uL(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?aL(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],l=cL(a,r[a],n,typeof e=="string");o=Wo.merge(o,l,n)}return n.allowSparse===!0?o:Wo.compact(o)},fL=nL,hL=dL,pL=Od,mL={formats:pL,parse:hL,stringify:fL},ke;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(const s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(ke||(ke={}));var C0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(C0||(C0={}));const re=ke.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),zr=e=>{switch(typeof e){case"undefined":return re.undefined;case"string":return re.string;case"number":return isNaN(e)?re.nan:re.number;case"boolean":return re.boolean;case"function":return re.function;case"bigint":return re.bigint;case"symbol":return re.symbol;case"object":return Array.isArray(e)?re.array:e===null?re.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?re.promise:typeof Map<"u"&&e instanceof Map?re.map:typeof Set<"u"&&e instanceof Set?re.set:typeof Date<"u"&&e instanceof Date?re.date:re.object;default:return re.unknown}},K=ke.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class en extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof en))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ke.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}en.create=e=>new en(e);const Xi=(e,t)=>{let n;switch(e.code){case K.invalid_type:e.received===re.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case K.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ke.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:n=`Unrecognized key(s) in object: ${ke.joinValues(e.keys,", ")}`;break;case K.invalid_union:n="Invalid input";break;case K.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ke.joinValues(e.options)}`;break;case K.invalid_enum_value:n=`Invalid enum value. Expected ${ke.joinValues(e.options)}, received '${e.received}'`;break;case K.invalid_arguments:n="Invalid function arguments";break;case K.invalid_return_type:n="Invalid function return type";break;case K.invalid_date:n="Invalid date";break;case K.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ke.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case K.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case K.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case K.custom:n="Invalid input";break;case K.invalid_intersection_types:n="Intersection results could not be merged";break;case K.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case K.not_finite:n="Number must be finite";break;default:n=t.defaultError,ke.assertNever(e)}return{message:n}};let gL=Xi;function Md(){return gL}const Nd=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}};function ne(e,t){const n=Md(),r=Nd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Xi?void 0:Xi].filter(o=>!!o)});e.common.issues.push(r)}class Lt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return me;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return Lt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return me;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}}const me=Object.freeze({status:"aborted"}),Qi=e=>({status:"dirty",value:e}),zt=e=>({status:"valid",value:e}),P0=e=>e.status==="aborted",k0=e=>e.status==="dirty",Ra=e=>e.status==="valid",ja=e=>typeof Promise<"u"&&e instanceof Promise;function Ba(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function O0(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(le||(le={}));var Ji,es;class Cn{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const I0=(e,t)=>{if(Ra(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new en(e.common.issues);return this._error=n,this._error}}};function ye(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{var l,c;const{message:u}=e;return s.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class xe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return zr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:zr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Lt,ctx:{common:t.parent.common,data:t.data,parsedType:zr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ja(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return I0(o,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(ja(o)?o:Promise.resolve(o));return I0(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=t(o),a=()=>i.addIssue({code:K.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new jn({schema:this,typeName:he.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Bn.create(this,this._def)}nullable(){return Ur.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ln.create(this,this._def)}promise(){return rs.create(this,this._def)}or(t){return Ha.create([this,t],this._def)}and(t){return Ua.create(this,t,this._def)}transform(t){return new jn({...ye(this._def),schema:this,typeName:he.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Za({...ye(this._def),innerType:this,defaultValue:n,typeName:he.ZodDefault})}brand(){return new M0({typeName:he.ZodBranded,type:this,...ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Xa({...ye(this._def),innerType:this,catchValue:n,typeName:he.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Qa.create(this,t)}readonly(){return Ja.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const yL=/^c[^\s-]{8,}$/i,vL=/^[0-9a-z]+$/,bL=/^[0-9A-HJKMNP-TV-Z]{26}$/,wL=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,xL=/^[a-z0-9_-]{21}$/i,TL=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,SL=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,EL="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Fd;const CL=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,PL=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,kL=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,A0="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",OL=new RegExp(`^${A0}$`);function _0(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function IL(e){return new RegExp(`^${_0(e)}$`)}function AL(e){let t=`${A0}T${_0(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function _L(e,t){return!!((t==="v4"||!t)&&CL.test(e)||(t==="v6"||!t)&&PL.test(e))}class Vn extends xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==re.string){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_type,expected:re.string,received:i.parsedType}),me}const r=new Lt;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ne(o,{code:K.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ne(o,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?ne(o,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&ne(o,{code:K.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")SL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"email",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Fd||(Fd=new RegExp(EL,"u")),Fd.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"emoji",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")wL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"uuid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")xL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"nanoid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")yL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"cuid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")vL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"cuid2",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")bL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"ulid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ne(o,{validation:"url",code:K.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"regex",code:K.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?AL(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?OL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?IL(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?TL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"duration",code:K.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?_L(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"ip",code:K.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?kL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"base64",code:K.invalid_string,message:i.message}),r.dirty()):ke.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:K.invalid_string,...le.errToObj(r)})}_addCheck(t){return new Vn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...le.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...le.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...le.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...le.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...le.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...le.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...le.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...le.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...le.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...le.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...le.errToObj(n)})}nonempty(t){return this.min(1,le.errToObj(t))}trim(){return new Vn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Vn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Vn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Vn.create=e=>{var t;return new Vn({checks:[],typeName:he.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};function DL(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),s=parseInt(t.toFixed(o).replace(".",""));return i%s/Math.pow(10,o)}class Wr extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==re.number){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_type,expected:re.number,received:i.parsedType}),me}let r;const o=new Lt;for(const i of this._def.checks)i.kind==="int"?ke.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ne(r,{code:K.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?DL(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ne(r,{code:K.not_finite,message:i.message}),o.dirty()):ke.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,o){return new Wr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new Wr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:le.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ke.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Wr.create=e=>new Wr({checks:[],typeName:he.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Ho extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==re.bigint){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_type,expected:re.bigint,received:i.parsedType}),me}let r;const o=new Lt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):ke.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,o){return new Ho({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new Ho({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ho.create=e=>{var t;return new Ho({checks:[],typeName:he.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};class Ld extends xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==re.boolean){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.boolean,received:r.parsedType}),me}return zt(t.data)}}Ld.create=e=>new Ld({typeName:he.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class ts extends xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==re.date){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_type,expected:re.date,received:i.parsedType}),me}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_date}),me}const r=new Lt;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ne(o,{code:K.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ne(o,{code:K.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):ke.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ts({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:le.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:le.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}ts.create=e=>new ts({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:he.ZodDate,...ye(e)});class Vd extends xe{_parse(t){if(this._getType(t)!==re.symbol){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.symbol,received:r.parsedType}),me}return zt(t.data)}}Vd.create=e=>new Vd({typeName:he.ZodSymbol,...ye(e)});class za extends xe{_parse(t){if(this._getType(t)!==re.undefined){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.undefined,received:r.parsedType}),me}return zt(t.data)}}za.create=e=>new za({typeName:he.ZodUndefined,...ye(e)});class Wa extends xe{_parse(t){if(this._getType(t)!==re.null){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.null,received:r.parsedType}),me}return zt(t.data)}}Wa.create=e=>new Wa({typeName:he.ZodNull,...ye(e)});class $d extends xe{constructor(){super(...arguments),this._any=!0}_parse(t){return zt(t.data)}}$d.create=e=>new $d({typeName:he.ZodAny,...ye(e)});class Uo extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return zt(t.data)}}Uo.create=e=>new Uo({typeName:he.ZodUnknown,...ye(e)});class gr extends xe{_parse(t){const n=this._getOrReturnCtx(t);return ne(n,{code:K.invalid_type,expected:re.never,received:n.parsedType}),me}}gr.create=e=>new gr({typeName:he.ZodNever,...ye(e)});class Rd extends xe{_parse(t){if(this._getType(t)!==re.undefined){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.void,received:r.parsedType}),me}return zt(t.data)}}Rd.create=e=>new Rd({typeName:he.ZodVoid,...ye(e)});class ln extends xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==re.array)return ne(n,{code:K.invalid_type,expected:re.array,received:n.parsedType}),me;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(ne(n,{code:s?K.too_big:K.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ne(n,{code:K.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ne(n,{code:K.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new Cn(n,s,n.path,a)))).then(s=>Lt.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new Cn(n,s,n.path,a)));return Lt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new ln({...this._def,minLength:{value:t,message:le.toString(n)}})}max(t,n){return new ln({...this._def,maxLength:{value:t,message:le.toString(n)}})}length(t,n){return new ln({...this._def,exactLength:{value:t,message:le.toString(n)}})}nonempty(t){return this.min(1,t)}}ln.create=(e,t)=>new ln({type:e,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...ye(t)});function Go(e){if(e instanceof rt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Bn.create(Go(r))}return new rt({...e._def,shape:()=>t})}else return e instanceof ln?new ln({...e._def,type:Go(e.element)}):e instanceof Bn?Bn.create(Go(e.unwrap())):e instanceof Ur?Ur.create(Go(e.unwrap())):e instanceof Rn?Rn.create(e.items.map(t=>Go(t))):e}class rt extends xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ke.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==re.object){const c=this._getOrReturnCtx(t);return ne(c,{code:K.invalid_type,expected:re.object,received:c.parsedType}),me}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof gr&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Cn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof gr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(ne(o,{code:K.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Cn(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>Lt.mergeObjectSync(r,c)):Lt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,s,a;const l=(s=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=le.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new rt({...this._def,unknownKeys:"strip"})}passthrough(){return new rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new rt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:he.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new rt({...this._def,catchall:t})}pick(t){const n={};return ke.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new rt({...this._def,shape:()=>n})}omit(t){const n={};return ke.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new rt({...this._def,shape:()=>n})}deepPartial(){return Go(this)}partial(t){const n={};return ke.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new rt({...this._def,shape:()=>n})}required(t){const n={};return ke.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Bn;)i=i._def.innerType;n[r]=i}}),new rt({...this._def,shape:()=>n})}keyof(){return D0(ke.objectKeys(this.shape))}}rt.create=(e,t)=>new rt({shape:()=>e,unknownKeys:"strip",catchall:gr.create(),typeName:he.ZodObject,...ye(t)}),rt.strictCreate=(e,t)=>new rt({shape:()=>e,unknownKeys:"strict",catchall:gr.create(),typeName:he.ZodObject,...ye(t)}),rt.lazycreate=(e,t)=>new rt({shape:e,unknownKeys:"strip",catchall:gr.create(),typeName:he.ZodObject,...ye(t)});class Ha extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new en(a.ctx.common.issues));return ne(n,{code:K.invalid_union,unionErrors:s}),me}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new en(l));return ne(n,{code:K.invalid_union,unionErrors:a}),me}}get options(){return this._def.options}}Ha.create=(e,t)=>new Ha({options:e,typeName:he.ZodUnion,...ye(t)});const $n=e=>e instanceof Ya?$n(e.schema):e instanceof jn?$n(e.innerType()):e instanceof qa?[e.value]:e instanceof Hr?e.options:e instanceof Ka?ke.objectValues(e.enum):e instanceof Za?$n(e._def.innerType):e instanceof za?[void 0]:e instanceof Wa?[null]:e instanceof Bn?[void 0,...$n(e.unwrap())]:e instanceof Ur?[null,...$n(e.unwrap())]:e instanceof M0||e instanceof Ja?$n(e.unwrap()):e instanceof Xa?$n(e._def.innerType):[];class jd extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.object)return ne(n,{code:K.invalid_type,expected:re.object,received:n.parsedType}),me;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ne(n,{code:K.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const s=$n(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of s){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,i)}}return new jd({typeName:he.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...ye(r)})}}function Bd(e,t){const n=zr(e),r=zr(t);if(e===t)return{valid:!0,data:e};if(n===re.object&&r===re.object){const o=ke.objectKeys(t),i=ke.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(const a of i){const l=Bd(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===re.array&&r===re.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const s=e[i],a=t[i],l=Bd(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===re.date&&r===re.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ua extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(P0(i)||P0(s))return me;const a=Bd(i.value,s.value);return a.valid?((k0(i)||k0(s))&&n.dirty(),{status:n.value,value:a.data}):(ne(r,{code:K.invalid_intersection_types}),me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ua.create=(e,t,n)=>new Ua({left:e,right:t,typeName:he.ZodIntersection,...ye(n)});class Rn extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.array)return ne(r,{code:K.invalid_type,expected:re.array,received:r.parsedType}),me;if(r.data.length<this._def.items.length)return ne(r,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&r.data.length>this._def.items.length&&(ne(r,{code:K.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Cn(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>Lt.mergeArray(n,s)):Lt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Rn({...this._def,rest:t})}}Rn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Rn({items:e,typeName:he.ZodTuple,rest:null,...ye(t)})};class Ga extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.object)return ne(r,{code:K.invalid_type,expected:re.object,received:r.parsedType}),me;const o=[],i=this._def.keyType,s=this._def.valueType;for(const a in r.data)o.push({key:i._parse(new Cn(r,a,r.path,a)),value:s._parse(new Cn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Lt.mergeObjectAsync(n,o):Lt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof xe?new Ga({keyType:t,valueType:n,typeName:he.ZodRecord,...ye(r)}):new Ga({keyType:Vn.create(),valueType:t,typeName:he.ZodRecord,...ye(n)})}}class zd extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.map)return ne(r,{code:K.invalid_type,expected:re.map,received:r.parsedType}),me;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Cn(r,a,r.path,[c,"key"])),value:i._parse(new Cn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}zd.create=(e,t,n)=>new zd({valueType:t,keyType:e,typeName:he.ZodMap,...ye(n)});class Yo extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.set)return ne(r,{code:K.invalid_type,expected:re.set,received:r.parsedType}),me;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ne(r,{code:K.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ne(r,{code:K.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return me;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new Cn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new Yo({...this._def,minSize:{value:t,message:le.toString(n)}})}max(t,n){return new Yo({...this._def,maxSize:{value:t,message:le.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Yo.create=(e,t)=>new Yo({valueType:e,minSize:null,maxSize:null,typeName:he.ZodSet,...ye(t)});class ns extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.function)return ne(n,{code:K.invalid_type,expected:re.function,received:n.parsedType}),me;function r(a,l){return Nd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Md(),Xi].filter(c=>!!c),issueData:{code:K.invalid_arguments,argumentsError:l}})}function o(a,l){return Nd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Md(),Xi].filter(c=>!!c),issueData:{code:K.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof rs){const a=this;return zt(async function(...l){const c=new en([]),u=await a._def.args.parseAsync(l,i).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(d,i).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{const a=this;return zt(function(...l){const c=a._def.args.safeParse(l,i);if(!c.success)throw new en([r(l,c.error)]);const u=Reflect.apply(s,this,c.data),d=a._def.returns.safeParse(u,i);if(!d.success)throw new en([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ns({...this._def,args:Rn.create(t).rest(Uo.create())})}returns(t){return new ns({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ns({args:t||Rn.create([]).rest(Uo.create()),returns:n||Uo.create(),typeName:he.ZodFunction,...ye(r)})}}class Ya extends xe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Ya.create=(e,t)=>new Ya({getter:e,typeName:he.ZodLazy,...ye(t)});class qa extends xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ne(n,{received:n.data,code:K.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:t.data}}get value(){return this._def.value}}qa.create=(e,t)=>new qa({value:e,typeName:he.ZodLiteral,...ye(t)});function D0(e,t){return new Hr({values:e,typeName:he.ZodEnum,...ye(t)})}class Hr extends xe{constructor(){super(...arguments),Ji.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ne(n,{expected:ke.joinValues(r),received:n.parsedType,code:K.invalid_type}),me}if(Ba(this,Ji)||O0(this,Ji,new Set(this._def.values)),!Ba(this,Ji).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ne(n,{received:n.data,code:K.invalid_enum_value,options:r}),me}return zt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Hr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Hr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ji=new WeakMap,Hr.create=D0;class Ka extends xe{constructor(){super(...arguments),es.set(this,void 0)}_parse(t){const n=ke.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==re.string&&r.parsedType!==re.number){const o=ke.objectValues(n);return ne(r,{expected:ke.joinValues(o),received:r.parsedType,code:K.invalid_type}),me}if(Ba(this,es)||O0(this,es,new Set(ke.getValidEnumValues(this._def.values))),!Ba(this,es).has(t.data)){const o=ke.objectValues(n);return ne(r,{received:r.data,code:K.invalid_enum_value,options:o}),me}return zt(t.data)}get enum(){return this._def.values}}es=new WeakMap,Ka.create=(e,t)=>new Ka({values:e,typeName:he.ZodNativeEnum,...ye(t)});class rs extends xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.promise&&n.common.async===!1)return ne(n,{code:K.invalid_type,expected:re.promise,received:n.parsedType}),me;const r=n.parsedType===re.promise?n.data:Promise.resolve(n.data);return zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}rs.create=(e,t)=>new rs({type:e,typeName:he.ZodPromise,...ye(t)});class jn extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===he.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{ne(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return me;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?me:l.status==="dirty"||n.value==="dirty"?Qi(l.value):l});{if(n.value==="aborted")return me;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?me:a.status==="dirty"||n.value==="dirty"?Qi(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ra(s))return s;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Ra(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):s);ke.assertNever(o)}}jn.create=(e,t,n)=>new jn({schema:e,typeName:he.ZodEffects,effect:t,...ye(n)}),jn.createWithPreprocess=(e,t,n)=>new jn({schema:t,effect:{type:"preprocess",transform:e},typeName:he.ZodEffects,...ye(n)});class Bn extends xe{_parse(t){return this._getType(t)===re.undefined?zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Bn.create=(e,t)=>new Bn({innerType:e,typeName:he.ZodOptional,...ye(t)});class Ur extends xe{_parse(t){return this._getType(t)===re.null?zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ur.create=(e,t)=>new Ur({innerType:e,typeName:he.ZodNullable,...ye(t)});class Za extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===re.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Za.create=(e,t)=>new Za({innerType:e,typeName:he.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ye(t)});class Xa extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ja(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new en(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new en(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Xa.create=(e,t)=>new Xa({innerType:e,typeName:he.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ye(t)});class Wd extends xe{_parse(t){if(this._getType(t)!==re.nan){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.nan,received:r.parsedType}),me}return{status:"valid",value:t.data}}}Wd.create=e=>new Wd({typeName:he.ZodNaN,...ye(e)});class M0 extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Qa extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?me:i.status==="dirty"?(n.dirty(),Qi(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?me:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Qa({in:t,out:n,typeName:he.ZodPipeline})}}class Ja extends xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Ra(o)&&(o.value=Object.freeze(o.value)),o);return ja(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ja.create=(e,t)=>new Ja({innerType:e,typeName:he.ZodReadonly,...ye(t)}),rt.lazycreate;var he;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(he||(he={})),Vn.create,Wr.create,Wd.create,Ho.create,Ld.create,ts.create,Vd.create,za.create,Wa.create,$d.create,Uo.create,gr.create,Rd.create,ln.create,rt.create,rt.strictCreate,Ha.create,jd.create,Ua.create,Rn.create,Ga.create,zd.create,Yo.create,ns.create,Ya.create,qa.create,Hr.create,Ka.create,rs.create,jn.create,Bn.create,Ur.create,jn.createWithPreprocess,Qa.create;const ML={sort:(e,t)=>e.localeCompare(t),allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},N0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return mL.parse(n.toString(),ML)},F0=e=>e.replace("[",".").replace("]","").split("."),os=(e,t)=>F0(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o instanceof ln?o.element:o},t),is=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value,NL=e=>{const[t,n]=b.useState(null),r=b.useRef({}),o=(u,d)=>{const f=os(u,e);return{...d,name:u,id:u,required:!f.isOptional(),error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}},i=(u,d)=>{const f=os(u,e);return{...d,name:u,id:u,required:!f.isOptional(),error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}},s=(u,d)=>{const f=os(u,e);return{...d,name:u,id:u,required:!f.isOptional(),error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}},a=(u,d)=>{const f=os(u,e);return{...d,name:u,id:u,required:!f.isOptional(),type:Pn.instance(f,Wr)?"number":(d==null?void 0:d.type)??"text",error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}};b.useEffect(()=>{const u=Object.values(r.current).map(f=>{const h=f.element.dataset.origin?document.querySelector(`[data-target=${f.element.name}]`):f.element,p=f.schema.safeParse(is(h)),m=g=>{const v=h.dataset.target||h.name;if(!v)return;console.log(g);const w=is(g.target)||(g.relatedTarget?is(g.relatedTarget):""),y=f.schema.safeParse(w);if(console.log({name:v,value:w,validation:y}),y.success)return h.setCustomValidity(""),n(S=>{const{[v]:T,...E}=S||{};return E===null||Pn.empty(E)?null:E});if(h.required){const S=y.error.issues[0].message;h.setCustomValidity(S),n(T=>({...T,[v]:S}))}};return h.addEventListener("blur",m),h.tagName==="SELECT"&&h.addEventListener("change",m),{input:f,hasInitialError:h.required?!p.success:!1,unsubscribe:()=>{h.removeEventListener("blur",m),h.tagName==="SELECT"&&h.addEventListener("change",m)}}});return u.some(f=>f.hasInitialError)&&n(f=>f===null?{}:f),()=>u.forEach(f=>f.unsubscribe())});const l=b.useCallback(u=>d=>{const f=d.currentTarget,h=Object.values(r.current).reduce((m,g)=>{const v=g.element,w=g.schema.safeParse(is(v));if(v.dataset.ignore==="ignore"||w.success)return m;const y=w.error.issues[0].message;v.setAttribute("data-initialized","true");const S=v.dataset.name||v.name||"";return{...m,[S]:y}},{}),p=Pn.empty(h)?null:h;n(p),u==null||u({form:f,errors:p||{}})},[]),c=b.useCallback(u=>d=>{d.preventDefault();const f=d.currentTarget;let h=N0(f);Array.from(f.elements).forEach(m=>{if(m.tagName==="SELECT"){const g=m;h=qf(h,g.name,g.value)}if(m.tagName==="INPUT"){const g=m;h=qf(h,g.name,is(g))}});const p=e.safeParse(h);return p.success?u({form:f,json:h,data:p.data,event:d,reset:()=>Hu(f),success:!0,errors:[]}):u({form:f,json:h,event:d,data:h,success:!1,reset:()=>Hu(f),errors:p.error.issues.map(m=>({message:m.message,path:m.path.map(g=>String(g))}))})},[]);return{input:a,datepicker:o,checkbox:s,select:i,onSubmit:c,errors:t,onInvalid:l,disabled:t!==null}},FL={name:"dark",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},rounded:{pill:"2rem",card:"0.75rem",full:"9999px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",disabled:"hsla(240, 4%, 33%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{background:"hsla(0, 0%, 14%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 19%)"},table:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"}}},LL={name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{pill:"2rem",card:"0.75rem",full:"9999px"},colors:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 34%, 96%)",disabled:"hsla(240, 10%, 75%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)"},input:{border:"hsla(218, 22%, 80%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 85%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"}}},VL={cssVariable:(e,t,n)=>`var(--${n})`,rgba:e=>`rgba(${e})`,rgb:e=>`rgb(${e})`,hsl:e=>`hsl(${e})`,hsla:e=>`hsla(${e})`,hex:e=>e,raw:e=>e,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},ss=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(s,l,a))}return o.concat(ss(s,t,n,a))},[]),L0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(s,i,a)}}return{...o,[i]:L0(s,t,n,a)}},{}),V0={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Hd=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},$L={default:e=>Hd(e,{result:V0.default}),dark:e=>Hd(e,{result:V0.dark})},RL=(e,t)=>{const n=(s,a,l)=>({key:`--${l}`,value:`${s}`}),r=ss(e.colors,n),o=ss(e.spacing,n),i=ss(e.rounded,n);return Hd(r.concat(o,i),{result:s=>`html${t?`.${t}`:""} {${s}}`,value:(s,a)=>a.replace("hsla(","").replace(")","")})};ee.Alert=FP,ee.Autocomplete=F_,ee.Button=xr,ee.ButtonGroup=O1,ee.Calendar=ey,ee.Card=ty,ee.Checkbox=Sv,ee.ColType=zo,ee.Collapse=og,ee.ComponentsProvider=__,ee.DatePicker=V_,ee.Dropdown=Do,ee.FileUpload=KD,ee.Form=XD,ee.Input=Li,ee.InputFeedback=xv,ee.InputField=ya,ee.Menu=LF,ee.MenuItem=FF,ee.Modal=gv,ee.Option=Tv,ee.Polymorph=no,ee.Radiobox=QD,ee.Select=Vr,ee.Stats=wI,ee.Switch=JD,ee.Tab=A_,ee.Table=NF,ee.Tabs=O_,ee.Tag=A1,ee.Tooltip=vv,ee.TransferList=NN,ee.convertPath=F0,ee.createColumns=oF,ee.createDesignTokens=L0,ee.createOptionCols=Td,ee.createStyles=$L,ee.createTheme=RL,ee.css=Xe,ee.defaultDarkTheme=FL,ee.defaultLightTheme=LL,ee.dispatchInput=ys,ee.formReset=Hu,ee.formToJson=N0,ee.getSchemaShape=os,ee.initializeInputDataset=vs,ee.isReactComponent=C1,ee.isReactFC=P1,ee.isSsr=ma,ee.mergeRefs=Ol,ee.parsers=VL,ee.path=pv,ee.reduceTokens=ss,ee.safeRegex=Eu,ee.useForm=NL,ee.usePrevious=bv,ee.useReactive=ny,ee.useTablePreferences=sF,ee.useTranslations=Qt,ee.uuid=pa,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
196
196
  //# sourceMappingURL=index.umd.js.map