@g4rcez/components 0.0.45 → 0.0.47

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 (51) hide show
  1. package/dist/index.js +45 -45
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +7500 -10254
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/index.umd.js +45 -45
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/preset.tailwind.js +1 -1
  8. package/dist/src/components/core/button.js +2 -5
  9. package/dist/src/components/core/polymorph.js +2 -4
  10. package/dist/src/components/core/tag.js +2 -5
  11. package/dist/src/components/display/alert.js +3 -6
  12. package/dist/src/components/display/calendar.js +20 -26
  13. package/dist/src/components/display/card.js +1 -5
  14. package/dist/src/components/display/list.js +2 -2
  15. package/dist/src/components/display/notifications.js +3 -4
  16. package/dist/src/components/display/step.js +2 -2
  17. package/dist/src/components/display/timeline.js +2 -6
  18. package/dist/src/components/floating/dropdown.js +3 -4
  19. package/dist/src/components/floating/expand.js +1 -1
  20. package/dist/src/components/floating/menu.js +28 -29
  21. package/dist/src/components/floating/modal.js +4 -6
  22. package/dist/src/components/floating/tooltip.js +2 -4
  23. package/dist/src/components/form/autocomplete.d.ts.map +1 -1
  24. package/dist/src/components/form/autocomplete.js +54 -50
  25. package/dist/src/components/form/checkbox.js +1 -5
  26. package/dist/src/components/form/date-picker.js +5 -8
  27. package/dist/src/components/form/file-upload.js +5 -10
  28. package/dist/src/components/form/form.js +2 -3
  29. package/dist/src/components/form/input-field.js +2 -2
  30. package/dist/src/components/form/input.js +3 -6
  31. package/dist/src/components/form/radiobox.js +1 -5
  32. package/dist/src/components/form/select.js +4 -10
  33. package/dist/src/components/form/switch.js +6 -10
  34. package/dist/src/components/form/task-list.js +1 -1
  35. package/dist/src/components/form/transfer-list.js +2 -2
  36. package/dist/src/components/table/filter.js +7 -8
  37. package/dist/src/components/table/group.js +3 -5
  38. package/dist/src/components/table/index.js +27 -45
  39. package/dist/src/components/table/metadata.js +5 -1
  40. package/dist/src/components/table/pagination.js +3 -4
  41. package/dist/src/components/table/sort.js +2 -2
  42. package/dist/src/components/table/table-lib.js +13 -16
  43. package/dist/src/components/table/thead.js +2 -3
  44. package/dist/src/hooks/use-form.d.ts.map +1 -1
  45. package/dist/src/hooks/use-form.js +49 -22
  46. package/dist/src/hooks/use-translate-context.js +1 -1
  47. package/dist/src/lib/dom.d.ts +4 -1
  48. package/dist/src/lib/dom.d.ts.map +1 -1
  49. package/dist/src/lib/dom.js +3 -3
  50. package/dist/src/styles/design-tokens.js +5 -2
  51. package/package.json +5 -5
package/dist/index.umd.js CHANGED
@@ -1,145 +1,145 @@
1
- (function(J,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):(J=typeof globalThis<"u"?globalThis:J||self,b(J.components={},J.React,J["react/jsx-runtime"],J.ReactDOM))})(this,function(J,b,x,lf){"use strict";var rV=Object.defineProperty;var oV=(J,b,x)=>b in J?rV(J,b,{enumerable:!0,configurable:!0,writable:!0,value:x}):J[b]=x;var se=(J,b,x)=>oV(J,typeof b!="symbol"?b+"":b,x);function cf(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const M=cf(b),uf=cf(lf);function df(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=df(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function X0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=df(e))&&(r&&(r+=" "),r+=t);return r}const ff=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,hf=X0,ts=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return hf(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 h=ff(u)||ff(d);return o[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(p=>{let[m,v]=p;return Array.isArray(v)?v.includes({...s,...a}[m]):{...s,...a}[m]===v})?[...c,d,h]:c},[]);return hf(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};function pf(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=pf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Q0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=pf(e))&&(r&&(r+=" "),r+=t);return r}var mf=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 ew(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 tw=Error,nw=EvalError,rw=RangeError,ow=ReferenceError,gf=SyntaxError,ns=TypeError,sw=URIError,iw=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},yf=typeof Symbol<"u"&&Symbol,aw=iw,lw=function(){return typeof yf!="function"||typeof Symbol!="function"||typeof yf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:aw()},ol={__proto__:null,foo:{}},cw=Object,uw=function(){return{__proto__:ol}.foo===ol.foo&&!(ol instanceof cw)},dw="Function.prototype.bind called on incompatible ",fw=Object.prototype.toString,hw=Math.max,pw="[object Function]",vf=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},mw=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},gw=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},yw=function(t){var n=this;if(typeof n!="function"||fw.apply(n)!==pw)throw new TypeError(dw+n);for(var r=mw(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,vf(r,arguments));return Object(u)===u?u:this}return n.apply(t,vf(r,arguments))},i=hw(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+gw(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},vw=yw,sl=Function.prototype.bind||vw,bw=Function.prototype.call,ww=Object.prototype.hasOwnProperty,xw=sl,Sw=xw.call(bw,ww),Te,Tw=tw,Ew=nw,Cw=rw,Pw=ow,zr=gf,Hr=ns,kw=sw,bf=Function,il=function(e){try{return bf('"use strict"; return ('+e+").constructor;")()}catch{}},gr=Object.getOwnPropertyDescriptor;if(gr)try{gr({},"")}catch{gr=null}var al=function(){throw new Hr},Iw=gr?function(){try{return arguments.callee,al}catch{try{return gr(arguments,"callee").get}catch{return al}}}():al,Ur=lw(),Ow=uw(),wt=Object.getPrototypeOf||(Ow?function(e){return e.__proto__}:null),Gr={},Aw=typeof Uint8Array>"u"||!wt?Te:wt(Uint8Array),yr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Te:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Te:ArrayBuffer,"%ArrayIteratorPrototype%":Ur&&wt?wt([][Symbol.iterator]()):Te,"%AsyncFromSyncIteratorPrototype%":Te,"%AsyncFunction%":Gr,"%AsyncGenerator%":Gr,"%AsyncGeneratorFunction%":Gr,"%AsyncIteratorPrototype%":Gr,"%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%":Tw,"%eval%":eval,"%EvalError%":Ew,"%Float32Array%":typeof Float32Array>"u"?Te:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Te:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Te:FinalizationRegistry,"%Function%":bf,"%GeneratorFunction%":Gr,"%Int8Array%":typeof Int8Array>"u"?Te:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Te:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Te:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ur&&wt?wt(wt([][Symbol.iterator]())):Te,"%JSON%":typeof JSON=="object"?JSON:Te,"%Map%":typeof Map>"u"?Te:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ur||!wt?Te:wt(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%":Cw,"%ReferenceError%":Pw,"%Reflect%":typeof Reflect>"u"?Te:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Te:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ur||!wt?Te:wt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Te:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ur&&wt?wt(""[Symbol.iterator]()):Te,"%Symbol%":Ur?Symbol:Te,"%SyntaxError%":zr,"%ThrowTypeError%":Iw,"%TypedArray%":Aw,"%TypeError%":Hr,"%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%":kw,"%WeakMap%":typeof WeakMap>"u"?Te:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Te:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Te:WeakSet};if(wt)try{null.error}catch(e){var _w=wt(wt(e));yr["%Error.prototype%"]=_w}var Mw=function e(t){var n;if(t==="%AsyncFunction%")n=il("async function () {}");else if(t==="%GeneratorFunction%")n=il("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=il("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&wt&&(n=wt(o.prototype))}return yr[t]=n,n},wf={__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"]},rs=sl,ui=Sw,Dw=rs.call(Function.call,Array.prototype.concat),Nw=rs.call(Function.apply,Array.prototype.splice),xf=rs.call(Function.call,String.prototype.replace),di=rs.call(Function.call,String.prototype.slice),Fw=rs.call(Function.call,RegExp.prototype.exec),Lw=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Vw=/\\(\\)?/g,$w=function(t){var n=di(t,0,1),r=di(t,-1);if(n==="%"&&r!=="%")throw new zr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new zr("invalid intrinsic syntax, expected opening `%`");var o=[];return xf(t,Lw,function(s,i,a,l){o[o.length]=a?xf(l,Vw,"$1"):i||s}),o},Rw=function(t,n){var r=t,o;if(ui(wf,r)&&(o=wf[r],r="%"+o[0]+"%"),ui(yr,r)){var s=yr[r];if(s===Gr&&(s=Mw(r)),typeof s>"u"&&!n)throw new Hr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new zr("intrinsic "+t+" does not exist!")},Yr=function(t,n){if(typeof t!="string"||t.length===0)throw new Hr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Hr('"allowMissing" argument must be a boolean');if(Fw(/^%?[^%]*%?$/,t)===null)throw new zr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=$w(t),o=r.length>0?r[0]:"",s=Rw("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],Nw(r,Dw([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var h=r[u],f=di(h,0,1),p=di(h,-1);if((f==='"'||f==="'"||f==="`"||p==='"'||p==="'"||p==="`")&&f!==p)throw new zr("property names with quotes must have matching quotes");if((h==="constructor"||!d)&&(l=!0),o+="."+h,i="%"+o+"%",ui(yr,i))a=yr[i];else if(a!=null){if(!(h in a)){if(!n)throw new Hr("base intrinsic for "+t+" exists, but the property is not available.");return}if(gr&&u+1>=r.length){var m=gr(a,h);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[h]}else d=ui(a,h),a=a[h];d&&!l&&(yr[i]=a)}}return a},Sf={exports:{}},ll,Tf;function cl(){if(Tf)return ll;Tf=1;var e=Yr,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return ll=t,ll}var jw=Yr,fi=jw("%Object.getOwnPropertyDescriptor%",!0);if(fi)try{fi([],"length")}catch{fi=null}var Ef=fi,Cf=cl(),Bw=gf,qr=ns,Pf=Ef,Ww=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,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!Pf&&Pf(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 Bw("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ul=cl(),kf=function(){return!!ul};kf.hasArrayLengthDefineBug=function(){if(!ul)return null;try{return ul([],"length",{value:1}).length!==1}catch{return!0}};var zw=kf,Hw=Yr,If=Ww,Uw=zw(),Of=Ef,Af=ns,Gw=Hw("%Math.floor%"),Yw=function(t,n){if(typeof t!="function")throw new Af("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Gw(n)!==n)throw new Af("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&Of){var i=Of(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(Uw?If(t,"length",n,!0,!0):If(t,"length",n)),t};(function(e){var t=sl,n=Yr,r=Yw,o=ns,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=cl(),c=n("%Math.max%");e.exports=function(h){if(typeof h!="function")throw new o("a function is required");var f=a(t,i,arguments);return r(f,1+c(0,h.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 qw=Sf.exports,_f=Yr,Mf=qw,Kw=Mf(_f("String.prototype.indexOf")),Zw=function(t,n){var r=_f(t,!!n);return typeof r=="function"&&Kw(t,".prototype.")>-1?Mf(r):r};const Xw=ew(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var dl=typeof Map=="function"&&Map.prototype,fl=Object.getOwnPropertyDescriptor&&dl?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,hi=dl&&fl&&typeof fl.get=="function"?fl.get:null,Df=dl&&Map.prototype.forEach,hl=typeof Set=="function"&&Set.prototype,pl=Object.getOwnPropertyDescriptor&&hl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,pi=hl&&pl&&typeof pl.get=="function"?pl.get:null,Nf=hl&&Set.prototype.forEach,Qw=typeof WeakMap=="function"&&WeakMap.prototype,os=Qw?WeakMap.prototype.has:null,Jw=typeof WeakSet=="function"&&WeakSet.prototype,ss=Jw?WeakSet.prototype.has:null,ex=typeof WeakRef=="function"&&WeakRef.prototype,Ff=ex?WeakRef.prototype.deref:null,tx=Boolean.prototype.valueOf,nx=Object.prototype.toString,rx=Function.prototype.toString,ox=String.prototype.match,ml=String.prototype.slice,Wn=String.prototype.replace,sx=String.prototype.toUpperCase,Lf=String.prototype.toLowerCase,Vf=RegExp.prototype.test,$f=Array.prototype.concat,un=Array.prototype.join,ix=Array.prototype.slice,Rf=Math.floor,gl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,yl=Object.getOwnPropertySymbols,vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Kr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ot=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Kr||!0)?Symbol.toStringTag:null,jf=Object.prototype.propertyIsEnumerable,Bf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Wf(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Vf.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Rf(-e):Rf(e);if(r!==e){var o=String(r),s=ml.call(t,o.length+1);return Wn.call(o,n,"$&_")+"."+Wn.call(Wn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Wn.call(t,n,"$&_")}var bl=Xw,zf=bl.custom,Hf=Yf(zf)?zf:null,ax=function e(t,n,r,o){var s=n||{};if(zn(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(zn(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=zn(s,"customInspect")?s.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(zn(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(zn(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Kf(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Wf(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Wf(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 wl(t)?"[Array]":"[Object]";var d=Cx(s,r);if(typeof o>"u")o=[];else if(qf(o,t)>=0)return"[Circular]";function h(V,k,_){if(k&&(o=ix.call(o),o.push(k)),_){var N={depth:s.depth};return zn(s,"quoteStyle")&&(N.quoteStyle=s.quoteStyle),e(V,N,r+1,o)}return e(V,s,r+1,o)}if(typeof t=="function"&&!Gf(t)){var f=gx(t),p=mi(t,h);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(p.length>0?" { "+un.call(p,", ")+" }":"")}if(Yf(t)){var m=Kr?Wn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):vl.call(t);return typeof t=="object"&&!Kr?is(m):m}if(Sx(t)){for(var v="<"+Lf.call(String(t.nodeName)),g=t.attributes||[],w=0;w<g.length;w++)v+=" "+g[w].name+"="+Uf(lx(g[w].value),"double",s);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+Lf.call(String(t.nodeName))+">",v}if(wl(t)){if(t.length===0)return"[]";var y=mi(t,h);return d&&!Ex(y)?"["+Sl(y,d)+"]":"[ "+un.call(y,", ")+" ]"}if(ux(t)){var T=mi(t,h);return!("cause"in Error.prototype)&&"cause"in t&&!jf.call(t,"cause")?"{ ["+String(t)+"] "+un.call($f.call("[cause]: "+h(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+un.call(T,", ")+" }"}if(typeof t=="object"&&i){if(Hf&&typeof t[Hf]=="function"&&bl)return bl(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(yx(t)){var S=[];return Df&&Df.call(t,function(V,k){S.push(h(k,t,!0)+" => "+h(V,t))}),Zf("Map",hi.call(t),S,d)}if(wx(t)){var E=[];return Nf&&Nf.call(t,function(V){E.push(h(V,t))}),Zf("Set",pi.call(t),E,d)}if(vx(t))return xl("WeakMap");if(xx(t))return xl("WeakSet");if(bx(t))return xl("WeakRef");if(fx(t))return is(h(Number(t)));if(px(t))return is(h(gl.call(t)));if(hx(t))return is(tx.call(t));if(dx(t))return is(h(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof mf<"u"&&t===mf)return"{ [object globalThis] }";if(!cx(t)&&!Gf(t)){var I=mi(t,h),P=Bf?Bf(t)===Object.prototype:t instanceof Object||t.constructor===Object,O=t instanceof Object?"":"null prototype",C=!P&&Ot&&Object(t)===t&&Ot in t?ml.call(Hn(t),8,-1):O?"Object":"",L=P||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",D=L+(C||O?"["+un.call($f.call([],C||[],O||[]),": ")+"] ":"");return I.length===0?D+"{}":d?D+"{"+Sl(I,d)+"}":D+"{ "+un.call(I,", ")+" }"}return String(t)};function Uf(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function lx(e){return Wn.call(String(e),/"/g,"&quot;")}function wl(e){return Hn(e)==="[object Array]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function cx(e){return Hn(e)==="[object Date]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Gf(e){return Hn(e)==="[object RegExp]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function ux(e){return Hn(e)==="[object Error]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function dx(e){return Hn(e)==="[object String]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function fx(e){return Hn(e)==="[object Number]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function hx(e){return Hn(e)==="[object Boolean]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Yf(e){if(Kr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!vl)return!1;try{return vl.call(e),!0}catch{}return!1}function px(e){if(!e||typeof e!="object"||!gl)return!1;try{return gl.call(e),!0}catch{}return!1}var mx=Object.prototype.hasOwnProperty||function(e){return e in this};function zn(e,t){return mx.call(e,t)}function Hn(e){return nx.call(e)}function gx(e){if(e.name)return e.name;var t=ox.call(rx.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function qf(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 yx(e){if(!hi||!e||typeof e!="object")return!1;try{hi.call(e);try{pi.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function vx(e){if(!os||!e||typeof e!="object")return!1;try{os.call(e,os);try{ss.call(e,ss)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function bx(e){if(!Ff||!e||typeof e!="object")return!1;try{return Ff.call(e),!0}catch{}return!1}function wx(e){if(!pi||!e||typeof e!="object")return!1;try{pi.call(e);try{hi.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function xx(e){if(!ss||!e||typeof e!="object")return!1;try{ss.call(e,ss);try{os.call(e,os)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Sx(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Kf(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Kf(ml.call(e,0,t.maxStringLength),t)+r}var o=Wn.call(Wn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Tx);return Uf(o,"single",t)}function Tx(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":"")+sx.call(t.toString(16))}function is(e){return"Object("+e+")"}function xl(e){return e+" { ? }"}function Zf(e,t,n,r){var o=r?Sl(n,r):un.call(n,", ");return e+" ("+t+") {"+o+"}"}function Ex(e){for(var t=0;t<e.length;t++)if(qf(e[t],`
2
- `)>=0)return!1;return!0}function Cx(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=un.call(Array(e.indent+1)," ");else return null;return{base:n,prev:un.call(Array(t+1),n)}}function Sl(e,t){if(e.length===0)return"";var n=`
3
- `+t.prev+t.base;return n+un.call(e,","+n)+`
4
- `+t.prev}function mi(e,t){var n=wl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=zn(e,o)?t(e[o],e):""}var s=typeof yl=="function"?yl(e):[],i;if(Kr){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)zn(e,l)&&(n&&String(Number(l))===l&&l<e.length||Kr&&i["$"+l]instanceof Symbol||(Vf.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof yl=="function")for(var c=0;c<s.length;c++)jf.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var Xf=Yr,Zr=Zw,Px=ax,kx=ns,gi=Xf("%WeakMap%",!0),yi=Xf("%Map%",!0),Ix=Zr("WeakMap.prototype.get",!0),Ox=Zr("WeakMap.prototype.set",!0),Ax=Zr("WeakMap.prototype.has",!0),_x=Zr("Map.prototype.get",!0),Mx=Zr("Map.prototype.set",!0),Dx=Zr("Map.prototype.has",!0),Tl=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},Nx=function(e,t){var n=Tl(e,t);return n&&n.value},Fx=function(e,t,n){var r=Tl(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Lx=function(e,t){return!!Tl(e,t)},Vx=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new kx("Side channel does not contain "+Px(s))},get:function(s){if(gi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return Ix(t,s)}else if(yi){if(n)return _x(n,s)}else if(r)return Nx(r,s)},has:function(s){if(gi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return Ax(t,s)}else if(yi){if(n)return Dx(n,s)}else if(r)return Lx(r,s);return!1},set:function(s,i){gi&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new gi),Ox(t,s,i)):yi?(n||(n=new yi),Mx(n,s,i)):(r||(r={key:{},next:null}),Fx(r,s,i))}};return o},Qf=e=>Array.isArray(e),El=e=>e===void 0,Cl=e=>e===null,$x=Function.bind.call(Function.call,Object.prototype.toString),Rx=e=>!!e&&$x(e)==="[object Error]"||e instanceof Error,Jf=(e,t)=>e instanceof t,jx=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Bx=e=>Object.prototype.toString.call(e)==="[object Date]"&&Jf(e,Date),dn={array:Qf,date:Bx,empty:e=>Cl(e)||El(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:Jf,isError:Rx,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Cl(e)||El(e),null:Cl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Qf(e)&&typeof e=="object",primitive:jx,string:e=>typeof e=="string",undefined:El},Pl=(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]=Pl(s?[]:{},o,n)}else e[r]=Pl(e[r],o,n)}else e[r]=n;return e},Wx=e=>Object.keys(e),zx=e=>e.replace("[",".").replace("]","").split("."),kl=(e,t,n)=>{const r=Array.isArray(t)?t:zx(t),o=structuredClone(e);return Pl(o,r,n),o};const Il="-";function Hx(e){const t=Gx(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(Il);return a[0]===""&&a.length!==1&&a.shift(),eh(a,t)||Ux(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function eh(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?eh(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Il);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const th=/^\[(.+)\]$/;function Ux(e){if(th.test(e)){const t=th.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Gx(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return qx(Object.entries(e.classGroups),n).forEach(([s,i])=>{Ol(i,r,s,t)}),r}function Ol(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:nh(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Yx(o)){Ol(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Ol(i,nh(t,s),n,r)})})}function nh(e,t){let n=e;return t.split(Il).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Yx(e){return e.isThemeGetter}function qx(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 Kx(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 rh="!";function Zx(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let c=0,u=0,d;for(let v=0;v<a.length;v++){let g=a[v];if(c===0){if(g===o&&(r||a.slice(v,v+s)===t)){l.push(a.slice(u,v)),u=v+s;continue}if(g==="/"){d=v;continue}}g==="["?c++:g==="]"&&c--}const h=l.length===0?a:a.substring(u),f=h.startsWith(rh),p=f?h.substring(1):h,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function Xx(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 Qx(e){return{cache:Kx(e.cacheSize),parseClassName:Zx(e),...Hx(e)}}const Jx=/\s+/;function e1(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(Jx).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let d=!!u,h=r(d?c.substring(0,u):c);if(!h){if(!d)return{isTailwindClass:!1,originalClassName:i};if(h=r(c),!h)return{isTailwindClass:!1,originalClassName:i};d=!1}const f=Xx(a).join(":");return{isTailwindClass:!0,modifierId:l?f+rh:f,classGroupId:h,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 t1(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=oh(t))&&(r&&(r+=" "),r+=n);return r}function oh(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=oh(e[r]))&&(n&&(n+=" "),n+=t);return n}function n1(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=Qx(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=e1(l,n);return o(l,u),u}return function(){return s(t1.apply(null,arguments))}}function Ge(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const sh=/^\[(?:([a-z-]+):)?(.+)\]$/i,r1=/^\d+\/\d+$/,o1=new Set(["px","full","screen"]),s1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,i1=/\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$/,a1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,l1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,c1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function _n(e){return vr(e)||o1.has(e)||r1.test(e)}function Un(e){return Xr(e,"length",y1)}function vr(e){return!!e&&!Number.isNaN(Number(e))}function vi(e){return Xr(e,"number",vr)}function as(e){return!!e&&Number.isInteger(Number(e))}function u1(e){return e.endsWith("%")&&vr(e.slice(0,-1))}function ve(e){return sh.test(e)}function Gn(e){return s1.test(e)}const d1=new Set(["length","size","percentage"]);function f1(e){return Xr(e,d1,ih)}function h1(e){return Xr(e,"position",ih)}const p1=new Set(["image","url"]);function m1(e){return Xr(e,p1,b1)}function g1(e){return Xr(e,"",v1)}function ls(){return!0}function Xr(e,t,n){const r=sh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function y1(e){return i1.test(e)&&!a1.test(e)}function ih(){return!1}function v1(e){return l1.test(e)}function b1(e){return c1.test(e)}function w1(){const e=Ge("colors"),t=Ge("spacing"),n=Ge("blur"),r=Ge("brightness"),o=Ge("borderColor"),s=Ge("borderRadius"),i=Ge("borderSpacing"),a=Ge("borderWidth"),l=Ge("contrast"),c=Ge("grayscale"),u=Ge("hueRotate"),d=Ge("invert"),h=Ge("gap"),f=Ge("gradientColorStops"),p=Ge("gradientColorStopPositions"),m=Ge("inset"),v=Ge("margin"),g=Ge("opacity"),w=Ge("padding"),y=Ge("saturate"),T=Ge("scale"),S=Ge("sepia"),E=Ge("skew"),I=Ge("space"),P=Ge("translate"),O=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",ve,t],D=()=>[ve,t],V=()=>["",_n,Un],k=()=>["auto",vr,ve],_=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",ve],A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[vr,vi],Z=()=>[vr,ve];return{cacheSize:500,separator:":",theme:{colors:[ls],spacing:[_n,Un],blur:["none","",Gn,ve],brightness:R(),borderColor:[e],borderRadius:["none","","full",Gn,ve],borderSpacing:D(),borderWidth:V(),contrast:R(),grayscale:U(),hueRotate:Z(),invert:U(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[u1,Un],inset:L(),margin:L(),opacity:R(),padding:D(),saturate:R(),scale:R(),sepia:U(),skew:Z(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[Gn]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[..._(),ve]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],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",as,ve]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",as,ve]}],"grid-cols":[{"grid-cols":[ls]}],"col-start-end":[{col:["auto",{span:["full",as,ve]},ve]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[ls]}],"row-start-end":[{row:["auto",{span:[as,ve]},ve]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"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:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"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",vi]}],"font-family":[{font:[ls]}],"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",vr,vi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_n,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":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_n,Un]}],"underline-offset":[{"underline-offset":["auto",_n,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:D()}],"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":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[..._(),h1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",f1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},m1]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],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":[g]}],"border-style":[{border:[...N(),"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":[g]}],"divide-style":[{divide:N()}],"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:["",...N()]}],"outline-offset":[{"outline-offset":[_n,ve]}],"outline-w":[{outline:[_n,Un]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[_n,Un]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Gn,g1]}],"shadow-color":[{shadow:[ls]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Gn,ve]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration: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:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[as,ve]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"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":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[_n,Un,vi]}],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 x1=n1(w1),Al=(...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"),T1=e=>dn.function(e),He=(...e)=>x1(Q0(e)),_l=(e,t)=>{const n=new Event("input",{bubbles:!0});return e==null||e.dispatchEvent(n),n},bi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Qr=b.forwardRef(function({as:t,...n},r){const o=t||"span";return x.jsx(o,{...n,ref:r})}),E1=ts("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring ease-normal",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-8 px-4 py-2 text-sm",min:"h-7 px-3 py-1 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-button",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",danger:"bg-button-danger-bg text-button-danger-text",disabled:"bg-disabled duration-700 opacity-70",info:"bg-button-info-bg text-button-info-text",loading:"animate-pulse bg-disabled duration-700 opacity-70",main:"bg-primary text-primary-foreground",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",secondary:"bg-button-secondary-bg text-button-secondary-text",success:"bg-button-success-bg text-button-success-text",warn:"bg-button-warn-bg text-button-warn-text","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Jr=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(Qr,{...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:He(E1({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),C1=ts("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{warn:"bg-warn",info:"bg-info",main:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),P1=ts("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),k1=b.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:s,size:i,...a},l){return x.jsxs(Qr,{...a,ref:l,"data-theme":s,as:a.as??"span",className:He(P1({size:i,theme:s}),t),children:[n?x.jsx("span",{className:C1({theme:n})}):null,r,a.children]})}),eo=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),wi=b.createContext({}),xi=b.createContext(null),Ml=typeof document<"u",Si=Ml?b.useLayoutEffect:b.useEffect,ah=b.createContext({strict:!1}),Ti=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),lh="data-"+Ti("framerAppearId"),I1={skipAnimations:!1,useManualTiming:!1};function O1(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 f=d&&r?t:n;return u&&s.add(c),f.has(c)||f.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 Ei=["read","resolveKeyframes","update","preRender","render","postRender"],A1=40;function ch(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=Ei.reduce((g,w)=>(g[w]=O1(s),g),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:h}=i,f=()=>{const g=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(g-o.timestamp,A1),1),o.timestamp=g,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},p=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:Ei.reduce((g,w)=>{const y=i[w];return g[w]=(T,S=!1,E=!1)=>(n||p(),y.schedule(T,S,E)),g},{}),cancel:g=>{for(let w=0;w<Ei.length;w++)i[Ei[w]].cancel(g)},state:o,steps:i}}const{schedule:Dl,cancel:lV}=ch(queueMicrotask,!1);function to(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const uh=b.createContext({});let dh=!1;function _1(e,t,n,r,o){const{visualElement:s}=b.useContext(wi),i=b.useContext(ah),a=b.useContext(xi),l=b.useContext(eo).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(uh);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&D1(c.current,n,o,d),b.useInsertionEffect(()=>{u&&u.update(n,a)});const h=b.useRef(!!(n[lh]&&!window.HandoffComplete));return Si(()=>{u&&(u.updateFeatures(),Dl.render(u.render),h.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&(h.current=!1,dh||(dh=!0,queueMicrotask(M1))))}),u}function M1(){window.HandoffComplete=!0}function D1(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:fh(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&to(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function fh(e){if(e)return e.options.allowProjection!==!1?e.projection:fh(e.parent)}function N1(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):to(n)&&(n.current=r))},[t])}function cs(e){return typeof e=="string"||Array.isArray(e)}function us(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Nl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Fl=["initial",...Nl];function Ci(e){return us(e.animate)||Fl.some(t=>cs(e[t]))}function hh(e){return!!(Ci(e)||e.variants)}function F1(e,t){if(Ci(e)){const{initial:n,animate:r}=e;return{initial:n===!1||cs(n)?n:void 0,animate:cs(r)?r:void 0}}return e.inherit!==!1?t:{}}function L1(e){const{initial:t,animate:n}=F1(e,b.useContext(wi));return b.useMemo(()=>({initial:t,animate:n}),[ph(t),ph(n)])}function ph(e){return Array.isArray(e)?e.join(" "):e}const mh={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"]},no={};for(const e in mh)no[e]={isEnabled:t=>mh[e].some(n=>!!t[n])};function V1(e){for(const t in e)no[t]={...no[t],...e[t]}}const ds=b.createContext({}),$1=Symbol.for("motionComponentSymbol"),Tt=e=>e;let ro=Tt,Ut=Tt;process.env.NODE_ENV!=="production"&&(ro=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ut=(e,t)=>{if(!e)throw new Error(t)});function R1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&V1(e);function s(a,l){let c;const u={...b.useContext(eo),...a,layoutId:j1(a)},{isStatic:d}=u,h=L1(a),f=r(a,d);if(!d&&Ml){B1(u,e);const p=W1(u);c=p.MeasureLayout,h.visualElement=_1(o,f,u,t,p.ProjectionNode)}return x.jsxs(wi.Provider,{value:h,children:[c&&h.visualElement?x.jsx(c,{visualElement:h.visualElement,...u}):null,n(o,a,N1(f,h.visualElement,l),f,d,h.visualElement)]})}const i=b.forwardRef(s);return i[$1]=o,i}function j1({layoutId:e}){const t=b.useContext(ds).id;return t&&e!==void 0?t+"-"+e:e}function B1(e,t){const n=b.useContext(ah).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?ro(!1,r):Ut(!1,r)}}function W1(e){const{drag:t,layout:n}=no;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 z1(e){function t(r,o={}){return R1(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 H1=["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 Ll(e){return typeof e!="string"||e.includes("-")?!1:!!(H1.indexOf(e)>-1||/[A-Z]/u.test(e))}const Pi={};function U1(e){Object.assign(Pi,e)}const fs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Yn=new Set(fs);function gh(e,{layout:t,layoutId:n}){return Yn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Pi[e]||e==="opacity")}const gt=e=>!!(e&&e.getVelocity),G1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Y1=fs.length;function q1(e,t,n){let r="";for(let o=0;o<Y1;o++){const s=fs[o];if(e[s]!==void 0){const i=G1[s]||s;r+=`${i}(${e[s]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const yh=e=>t=>typeof t=="string"&&t.startsWith(e),vh=yh("--"),K1=yh("var(--"),Vl=e=>K1(e)?Z1.test(e.split("/*")[0].trim()):!1,Z1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,X1=(e,t)=>t&&typeof e=="number"?t.transform(e):e,qn=(e,t,n)=>n>t?t:n<e?e:n,oo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},hs={...oo,transform:e=>qn(0,1,e)},ki={...oo,default:1},ps=e=>Math.round(e*1e5)/1e5,$l=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Q1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,J1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ms(e){return typeof e=="string"}function eS(e){return e==null}const gs=e=>({test:t=>ms(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kn=gs("deg"),fn=gs("%"),fe=gs("px"),tS=gs("vh"),nS=gs("vw"),bh={...fn,parse:e=>fn.parse(e)/100,transform:e=>fn.transform(e*100)},wh={...oo,transform:Math.round},xh={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:ki,scaleX:ki,scaleY:ki,scaleZ:ki,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:hs,originX:bh,originY:bh,originZ:fe,zIndex:wh,backgroundPositionX:fe,backgroundPositionY:fe,fillOpacity:hs,strokeOpacity:hs,numOctaves:wh};function Rl(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(vh(u)){o[u]=d;continue}const h=xh[u],f=X1(d,h);if(Yn.has(u)){if(a=!0,s[u]=f,!c)continue;d!==(h.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,i[u]=f):r[u]=f}if(t.transform||(a||n?r.transform=q1(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:d="50%",originZ:h=0}=i;r.transformOrigin=`${u} ${d} ${h}`}}const jl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Sh(e,t,n){for(const r in t)!gt(t[r])&&!gh(r,n)&&(e[r]=t[r])}function rS({transformTemplate:e},t){return b.useMemo(()=>{const n=jl();return Rl(n,t,e),Object.assign({},n.vars,n.style)},[t])}function oS(e,t){const n=e.style||{},r={};return Sh(r,n,e),Object.assign(r,rS(e,t)),r}function sS(e,t){const n={},r=oS(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 iS=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 Ii(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||iS.has(e)}let Th=e=>!Ii(e);function Eh(e){e&&(Th=t=>t.startsWith("on")?!Ii(t):e(t))}try{Eh(require("@emotion/is-prop-valid").default)}catch{}function aS(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Th(o)||n===!0&&Ii(o)||!t&&!Ii(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Ch(e,t,n){return typeof e=="string"?e:fe.transform(t+n*e)}function lS(e,t,n){const r=Ch(t,e.x,e.width),o=Ch(n,e.y,e.height);return`${r} ${o}`}const cS={offset:"stroke-dashoffset",array:"stroke-dasharray"},uS={offset:"strokeDashoffset",array:"strokeDasharray"};function dS(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?cS:uS;e[s.offset]=fe.transform(-r);const i=fe.transform(t),a=fe.transform(n);e[s.array]=`${i} ${a}`}function Bl(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Rl(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f,dimensions:p}=e;h.transform&&(p&&(f.transform=h.transform),delete h.transform),p&&(o!==void 0||s!==void 0||f.transform)&&(f.transformOrigin=lS(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&dS(h,i,a,l,!1)}const Ph=()=>({...jl(),attrs:{}}),Wl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function fS(e,t,n,r){const o=b.useMemo(()=>{const s=Ph();return Bl(s,t,Wl(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Sh(s,e.style,e),o.style={...s,...o.style}}return o}function hS(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Ll(n)?fS:sS)(r,s,i,n),c=aS(r,typeof n=="string",e),u=n!==b.Fragment?{...c,...l,ref:o}:{},{children:d}=r,h=b.useMemo(()=>gt(d)?d.get():d,[d]);return b.createElement(n,{...u,children:h})}}function kh(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 Ih=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 Oh(e,t,n,r){kh(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Ih.has(o)?o:Ti(o),t.attrs[o])}function zl(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(gt(o[i])||t.style&&gt(t.style[i])||gh(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 Ah(e,t,n){const r=zl(e,t,n);for(const o in e)if(gt(e[o])||gt(t[o])){const s=fs.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}function _h(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Hl(e,t,n,r){if(typeof t=="function"){const[o,s]=_h(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]=_h(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function hn(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ul=e=>Array.isArray(e),pS=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),mS=e=>Ul(e)?e[e.length-1]||0:e;function Oi(e){const t=gt(e)?e.get():e;return pS(t)?t.toValue():t}const Mh=new Set(["opacity","clipPath","filter","transform"]);function Dh(e){if(Yn.has(e))return"transform";if(Mh.has(e))return Ti(e)}function Ai(e,t){e.indexOf(t)===-1&&e.push(t)}function ys(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function gS([...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 yS({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,s,i,a){const l={latestValues:bS(o,s,i,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Nh=e=>(t,n)=>{const r=b.useContext(wi),o=b.useContext(xi),s=()=>yS(e,t,r,o,n);return n?s():hn(s)};function vS(e,t){const n=Dh(t);n&&Ai(e,n)}function Fh(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const s=Hl(e,r[o]);if(s){const{transitionEnd:i,transition:a,...l}=s;n(l,i)}}}function bS(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 v in c)i[v]=Oi(c[v]);let{initial:u,animate:d}=e;const h=Ci(e),f=hh(e);t&&f&&!h&&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"&&!us(m)&&Fh(e,m,(v,g)=>{for(const w in v){let y=v[w];if(Array.isArray(y)){const T=p?y.length-1:0;y=y[T]}y!==null&&(i[w]=y)}for(const w in g)i[w]=g[w]}),l&&(d&&u!==!1&&!us(d)&&Fh(e,d,v=>{for(const g in v)vS(a,g)}),a.length&&(i.willChange=a.join(","))),i}const{schedule:Me,cancel:pn,state:Et,steps:Gl}=ch(typeof requestAnimationFrame<"u"?requestAnimationFrame:Tt,!0),wS={useVisualState:Nh({scrapeMotionValuesFromProps:Ah,createRenderState:Ph,onMount:(e,t,{renderState:n,latestValues:r})=>{Me.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Me.render(()=>{Bl(n,r,Wl(t.tagName),e.transformTemplate),Oh(t,n)})}})},xS={useVisualState:Nh({applyWillChange:!0,scrapeMotionValuesFromProps:zl,createRenderState:jl})};function SS(e,{forwardMotionProps:t=!1},n,r){return{...Ll(e)?wS:xS,preloadedFeatures:n,useRender:hS(t),createVisualElement:r,Component:e}}function Mn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Lh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function _i(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const TS=e=>t=>Lh(t)&&e(t,_i(t));function Dn(e,t,n,r){return Mn(e,t,TS(n),r)}const ES=(e,t)=>n=>t(e(n)),Nn=(...e)=>e.reduce(ES);function Vh(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const $h=Vh("dragHorizontal"),Rh=Vh("dragVertical");function jh(e){let t=!1;if(e==="y")t=Rh();else if(e==="x")t=$h();else{const n=$h(),r=Rh();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Bh(){const e=jh(!0);return e?(e(),!1):!0}class Zn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Wh(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(s,i)=>{if(s.pointerType==="touch"||Bh())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Me.postRender(()=>l(s,i))};return Dn(e.current,n,o,{passive:!e.getProps()[r]})}class CS extends Zn{mount(){this.unmount=Nn(Wh(this.node,!0),Wh(this.node,!1))}unmount(){}}class PS extends Zn{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=Nn(Mn(this.node.current,"focus",()=>this.onFocus()),Mn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const zh=(e,t)=>t?e===t?!0:zh(e,t.parentElement):!1;function Yl(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,_i(n))}class kS extends Zn{constructor(){super(...arguments),this.removeStartListeners=Tt,this.removeEndListeners=Tt,this.removeAccessibleListeners=Tt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=Dn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:d}=this.node.getProps(),h=!d&&!zh(this.node.current,a.target)?u:c;h&&Me.update(()=>h(a,l))},{passive:!(r.onTap||r.onPointerUp)}),i=Dn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Nn(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()||Yl("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Me.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=Mn(this.node.current,"keyup",i),Yl("down",(a,l)=>{this.startPress(a,l)})},n=Mn(this.node.current,"keydown",t),r=()=>{this.isPressing&&Yl("cancel",(s,i)=>this.cancelPress(s,i))},o=Mn(this.node.current,"blur",r);this.removeAccessibleListeners=Nn(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&&Me.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Bh()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Me.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Dn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Mn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Nn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const ql=new WeakMap,Kl=new WeakMap,IS=e=>{const t=ql.get(e.target);t&&t(e)},OS=e=>{e.forEach(IS)};function AS({root:e,...t}){const n=e||document;Kl.has(n)||Kl.set(n,{});const r=Kl.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(OS,{root:e,...t})),r[o]}function _S(e,t,n){const r=AS(t);return ql.set(e,n),r.observe(e),()=>{ql.delete(e),r.unobserve(e)}}const MS={some:0,all:1};class DS extends Zn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:MS[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=c?u:d;h&&h(l)};return _S(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(NS(t,n))&&this.startObserver()}unmount(){}}function NS({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const FS={inView:{Feature:DS},tap:{Feature:kS},focus:{Feature:PS},hover:{Feature:CS}};function Hh(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 Mi(e,t,n){const r=e.getProps();return Hl(r,t,n!==void 0?n:r.custom,e)}const mn=e=>e*1e3,gn=e=>e/1e3,LS={type:"spring",stiffness:500,damping:25,restSpeed:10},VS=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),$S={type:"keyframes",duration:.8},RS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},jS=(e,{keyframes:t})=>t.length>2?$S:Yn.has(e)?e.startsWith("scale")?VS(t[1]):LS:RS;function BS({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Zl(e,t){return e[t]||e.default||e}const WS=e=>e!==null;function Di(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(WS),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}let Ni;function zS(){Ni=void 0}const Xn={now:()=>(Ni===void 0&&Xn.set(Et.isProcessing||I1.useManualTiming?Et.timestamp:performance.now()),Ni),set:e=>{Ni=e,queueMicrotask(zS)}},Uh=e=>/^0[^.\s]+$/u.test(e);function HS(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Uh(e):!0}const Gh=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),US=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function GS(e){const t=US.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const YS=4;function Yh(e,t,n=1){Ut(n<=YS,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=GS(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Gh(i)?parseFloat(i):i}return Vl(o)?Yh(o,t,n+1):o}const qS=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),qh=e=>e===oo||e===fe,Kh=(e,t)=>parseFloat(e.split(", ")[t]),Zh=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Kh(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?Kh(s[1],e):0}},KS=new Set(["x","y","z"]),ZS=fs.filter(e=>!KS.has(e));function XS(e){const t=[];return ZS.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const so={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:Zh(4,13),y:Zh(5,14)};so.translateX=so.x,so.translateY=so.y;const Xh=e=>t=>t.test(e),Qh=[oo,fe,fn,Kn,nS,tS,{test:e=>e==="auto",parse:e=>e}],Jh=e=>Qh.find(Xh(e)),br=new Set;let Xl=!1,Ql=!1;function ep(){if(Ql){const e=Array.from(br).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=XS(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)})}Ql=!1,Xl=!1,br.forEach(e=>e.complete()),br.clear()}function tp(){br.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ql=!0)})}function QS(){tp(),ep()}class Jl{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?(br.add(this),Xl||(Xl=!0,Me.read(tp),Me.resolveKeyframes(ep))):(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),br.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,br.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ec=(e,t)=>n=>!!(ms(n)&&J1.test(n)&&n.startsWith(e)||t&&!eS(n)&&Object.prototype.hasOwnProperty.call(n,t)),np=(e,t,n)=>r=>{if(!ms(r))return r;const[o,s,i,a]=r.match($l);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},JS=e=>qn(0,255,e),tc={...oo,transform:e=>Math.round(JS(e))},wr={test:ec("rgb","red"),parse:np("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+tc.transform(e)+", "+tc.transform(t)+", "+tc.transform(n)+", "+ps(hs.transform(r))+")"};function eT(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 nc={test:ec("#"),parse:eT,transform:wr.transform},io={test:ec("hsl","hue"),parse:np("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+fn.transform(ps(t))+", "+fn.transform(ps(n))+", "+ps(hs.transform(r))+")"},At={test:e=>wr.test(e)||nc.test(e)||io.test(e),parse:e=>wr.test(e)?wr.parse(e):io.test(e)?io.parse(e):nc.parse(e),transform:e=>ms(e)?e:e.hasOwnProperty("red")?wr.transform(e):io.transform(e)};function tT(e){var t,n;return isNaN(e)&&ms(e)&&(((t=e.match($l))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Q1))===null||n===void 0?void 0:n.length)||0)>0}const rp="number",op="color",nT="var",rT="var(",sp="${}",oT=/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 vs(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(oT,l=>(At.test(l)?(r.color.push(s),o.push(op),n.push(At.parse(l))):l.startsWith(rT)?(r.var.push(s),o.push(nT),n.push(l)):(r.number.push(s),o.push(rp),n.push(parseFloat(l))),++s,sp)).split(sp);return{values:n,split:a,indexes:r,types:o}}function ip(e){return vs(e).values}function ap(e){const{split:t,types:n}=vs(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===rp?s+=ps(o[i]):a===op?s+=At.transform(o[i]):s+=o[i]}return s}}const sT=e=>typeof e=="number"?0:e;function iT(e){const t=ip(e);return ap(e)(t.map(sT))}const Qn={test:tT,parse:ip,createTransformer:ap,getAnimatableNone:iT},aT=new Set(["brightness","contrast","saturate","opacity"]);function lT(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match($l)||[];if(!r)return e;const o=n.replace(r,"");let s=aT.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const cT=/\b([a-z-]*)\(.*?\)/gu,rc={...Qn,getAnimatableNone:e=>{const t=e.match(cT);return t?t.map(lT).join(" "):e}},uT={...xh,color:At,backgroundColor:At,outlineColor:At,fill:At,stroke:At,borderColor:At,borderTopColor:At,borderRightColor:At,borderBottomColor:At,borderLeftColor:At,filter:rc,WebkitFilter:rc},oc=e=>uT[e];function lp(e,t){let n=oc(e);return n!==rc&&(n=Qn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const dT=new Set(["auto","none","0"]);function fT(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!dT.has(s)&&vs(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=lp(n,o)}class cp extends Jl{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(),Vl(c))){const u=Yh(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!qS.has(r)||t.length!==2)return;const[o,s]=t,i=Jh(o),a=Jh(s);if(i!==a)if(qh(i)&&qh(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++)HS(t[o])&&r.push(o);r.length&&fT(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=so[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]=so[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 up(e){let t;return()=>(t===void 0&&(t=e()),t)}const dp=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Qn.test(e)||e==="0")&&!e.startsWith("url("));function hT(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 pT(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=dp(o,t),a=dp(s,t);return ro(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:hT(e)||n==="spring"&&r}class fp{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&&QS(),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&&!pT(t,r,o,s))if(i)this.options.duration=0;else{l==null||l(Di(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 hp(e,t){return t?e*(1e3/t):0}const mT=5;function pp(e,t,n){const r=Math.max(t-mT,0);return hp(n-e(r),t-r)}const sc=.001,gT=.01,mp=10,yT=.05,vT=1;function bT({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;ro(e<=mn(mp),"Spring duration must be 10 seconds or less");let i=1-t;i=qn(yT,vT,i),e=qn(gT,mp,gn(e)),i<1?(o=c=>{const u=c*i,d=u*e,h=u-n,f=ic(c,i),p=Math.exp(-d);return sc-h/f*p},s=c=>{const d=c*i*e,h=d*n+n,f=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=ic(Math.pow(c,2),i);return(-o(c)+sc>0?-1:1)*((h-f)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-sc+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=xT(o,s,a);if(e=mn(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 wT=12;function xT(e,t,n){let r=n;for(let o=1;o<wT;o++)r=r-e(r)/t(r);return r}function ic(e,t){return e*Math.sqrt(1-t*t)}const ST=["duration","bounce"],TT=["stiffness","damping","mass"];function gp(e,t){return t.some(n=>e[n]!==void 0)}function ET(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!gp(e,TT)&&gp(e,ST)){const n=bT(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function ac({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:h}=ET({...r,velocity:-gn(r.velocity||0)}),f=d||0,p=l/(2*Math.sqrt(a*c)),m=s-o,v=gn(Math.sqrt(a/c)),g=Math.abs(m)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let w;if(p<1){const y=ic(v,p);w=T=>{const S=Math.exp(-p*v*T);return s-S*((f+p*v*m)/y*Math.sin(y*T)+m*Math.cos(y*T))}}else if(p===1)w=y=>s-Math.exp(-v*y)*(m+(f+v*m)*y);else{const y=v*Math.sqrt(p*p-1);w=T=>{const S=Math.exp(-p*v*T),E=Math.min(y*T,300);return s-S*((f+p*v*m)*Math.sinh(E)+y*m*Math.cosh(E))/y}}return{calculatedDuration:h&&u||null,next:y=>{const T=w(y);if(h)i.done=y>=u;else{let S=f;y!==0&&(p<1?S=pp(w,y,T):S=0);const E=Math.abs(S)<=n,I=Math.abs(s-T)<=t;i.done=E&&I}return i.value=i.done?s:T,i}}}function yp({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],h={done:!1,value:d},f=P=>a!==void 0&&P<a||l!==void 0&&P>l,p=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let m=n*t;const v=d+m,g=i===void 0?v:i(v);g!==v&&(m=g-d);const w=P=>-m*Math.exp(-P/r),y=P=>g+w(P),T=P=>{const O=w(P),C=y(P);h.done=Math.abs(O)<=c,h.value=h.done?g:C};let S,E;const I=P=>{f(h.value)&&(S=P,E=ac({keyframes:[h.value,p(h.value)],velocity:pp(y,P,h.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return I(0),{calculatedDuration:null,next:P=>{let O=!1;return!E&&S===void 0&&(O=!0,T(P),I(P)),S!==void 0&&P>=S?E.next(P-S):(!O&&T(P),h)}}}const vp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,CT=1e-7,PT=12;function kT(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=vp(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>CT&&++a<PT);return i}function bs(e,t,n,r){if(e===t&&n===r)return Tt;const o=s=>kT(s,0,1,e,n);return s=>s===0||s===1?s:vp(o(s),t,r)}const IT=bs(.42,0,1,1),OT=bs(0,0,.58,1),bp=bs(.42,0,.58,1),wp=e=>Array.isArray(e)&&typeof e[0]!="number",xp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Sp=e=>t=>1-e(1-t),lc=e=>1-Math.sin(Math.acos(e)),Tp=Sp(lc),AT=xp(lc),Ep=bs(.33,1.53,.69,.99),cc=Sp(Ep),_T=xp(cc),Cp={linear:Tt,easeIn:IT,easeInOut:bp,easeOut:OT,circIn:lc,circInOut:AT,circOut:Tp,backIn:cc,backInOut:_T,backOut:Ep,anticipate:e=>(e*=2)<1?.5*cc(e):.5*(2-Math.pow(2,-10*(e-1)))},uc=e=>{if(Array.isArray(e)){Ut(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return bs(t,n,r,o)}else if(typeof e=="string")return Ut(Cp[e]!==void 0,`Invalid easing type '${e}'`),Cp[e];return e},ao=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ye=(e,t,n)=>e+(t-e)*n;function dc(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 MT({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=dc(l,a,e+1/3),s=dc(l,a,e),i=dc(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function Fi(e,t){return n=>n>0?t:e}const fc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},DT=[nc,wr,io],NT=e=>DT.find(t=>t.test(e));function Pp(e){const t=NT(e);if(ro(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===io&&(n=MT(n)),n}const kp=(e,t)=>{const n=Pp(e),r=Pp(t);if(!n||!r)return Fi(e,t);const o={...n};return s=>(o.red=fc(n.red,r.red,s),o.green=fc(n.green,r.green,s),o.blue=fc(n.blue,r.blue,s),o.alpha=Ye(n.alpha,r.alpha,s),wr.transform(o))},hc=new Set(["none","hidden"]);function FT(e,t){return hc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function LT(e,t){return n=>Ye(e,t,n)}function pc(e){return typeof e=="number"?LT:typeof e=="string"?Vl(e)?Fi:At.test(e)?kp:RT:Array.isArray(e)?Ip:typeof e=="object"?At.test(e)?kp:VT:Fi}function Ip(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>pc(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function VT(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=pc(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function $T(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 RT=(e,t)=>{const n=Qn.createTransformer(t),r=vs(e),o=vs(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?hc.has(e)&&!o.values.length||hc.has(t)&&!r.values.length?FT(e,t):Nn(Ip($T(r,o),o.values),n):(ro(!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.`),Fi(e,t))};function Op(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ye(e,t,n):pc(e)(e,t)}function jT(e,t,n){const r=[],o=n||Op,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]||Tt:t;a=Nn(l,a)}r.push(a)}return r}function Ap(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Ut(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=jT(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=ao(e[u],e[u+1],c);return i[u](d)};return n?c=>l(qn(e[0],e[s-1],c)):l}function _p(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ao(0,t,r);e.push(Ye(n,1,o))}}function Mp(e){const t=[0];return _p(t,e.length-1),t}function BT(e,t){return e.map(n=>n*t)}function WT(e,t){return e.map(()=>t||bp).splice(0,e.length-1)}function Li({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=wp(r)?r.map(uc):uc(r),s={done:!1,value:t[0]},i=BT(n&&n.length===t.length?n:Mp(t),e),a=Ap(i,t,{ease:Array.isArray(o)?o:WT(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const mc=2e4;function Dp(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<mc;)t+=n,r=e.next(t);return t>=mc?1/0:t}const zT=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Me.update(t,!0),stop:()=>pn(t),now:()=>Et.isProcessing?Et.timestamp:Xn.now()}},HT={decay:yp,inertia:yp,tween:Li,keyframes:Li,spring:ac},UT=e=>e/100;class gc extends fp{constructor({KeyframeResolver:t=Jl,...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=HT[n]||Li;let l,c;a!==Li&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Ut(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=Nn(UT,Op(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=Dp(u));const{calculatedDuration:d}=u,h=d+o,f=h*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:h,totalDuration:f}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.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:h,repeat:f,repeatType:p,repeatDelay:m,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),w=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let y=this.currentTime,T=s;if(f){const P=Math.min(this.currentTime,u)/d;let O=Math.floor(P),C=P%1;!C&&P>=1&&(C=1),C===1&&O--,O=Math.min(O,f+1),!!(O%2)&&(p==="reverse"?(C=1-C,m&&(C-=m/d)):p==="mirror"&&(T=i)),y=qn(0,1,C)*d}const S=w?{done:!1,value:l[0]}:T.next(y);a&&(S.value=a(S.value));let{done:E}=S;!w&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return I&&o!==void 0&&(S.value=Di(l,this.options,o)),v&&v(S.value),I&&this.finish(),S}get duration(){const{resolved:t}=this;return t?gn(t.calculatedDuration):0}get time(){return gn(this.currentTime)}set time(t){t=mn(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=gn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=zT,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 Np=e=>Array.isArray(e)&&typeof e[0]=="number";function Fp(e){return!!(!e||typeof e=="string"&&e in yc||Np(e)||Array.isArray(e)&&e.every(Fp))}const ws=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,yc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ws([0,.65,.55,1]),circOut:ws([.55,0,1,.45]),backIn:ws([.31,.01,.66,-.59]),backOut:ws([.33,1.53,.69,.99])};function GT(e){return Lp(e)||yc.easeOut}function Lp(e){if(e)return Np(e)?ws(e):Array.isArray(e)?e.map(GT):yc[e]}function YT(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=Lp(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 qT=up(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Vi=10,KT=2e4;function ZT(e){return e.type==="spring"||!Fp(e.ease)}function XT(e,t){const n=new gc({...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<KT;)r=n.sample(s),o.push(r.value),s+=Vi;return{times:void 0,keyframes:o,duration:s-Vi,ease:"linear"}}class Vp extends fp{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new cp(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(ZT(this.options)){const{onComplete:d,onUpdate:h,motionValue:f,...p}=this.options,m=XT(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=YT(l.owner.current,c,t,{...this.options,duration:o,times:s,ease:i});return u.startTime=Xn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;l.set(Di(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 gn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return gn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=mn(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 Tt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return Tt}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,...h}=this.options,f=new gc({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),p=mn(this.time);c.setWithVelocity(f.sample(p-Vi).value,f.sample(p).value,Vi)}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 qT()&&r&&Mh.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}function QT(e,t){let n;const r=()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i};return Me.update(r,!0),()=>pn(r)}const JT=up(()=>window.ScrollTimeline!==void 0);class vc{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(JT()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),QT(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 bc=(e,t,n,r={},o,s,i)=>a=>{const l=Zl(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-mn(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),i&&i()},onStop:i,name:e,motionValue:t,element:s?void 0:o};BS(l)||(d={...d,...jS(e,d)}),d.duration&&(d.duration=mn(d.duration)),d.repeatDelay&&(d.repeatDelay=mn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(h=!0)),h&&!s&&t.get()!==void 0){const f=Di(d.keyframes,l);if(f!==void 0)return Me.update(()=>{d.onUpdate(f),d.onComplete()}),new vc([])}return!s&&Vp.supports(d)?new Vp(d):new gc(d)};class wc{constructor(){this.subscriptions=[]}add(t){return Ai(this.subscriptions,t),()=>ys(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 $p=new Set;function xc(e,t,n){e||$p.has(t)||(console.warn(t),$p.add(t))}const Rp=30,eE=e=>!isNaN(parseFloat(e)),xs={current:void 0};class jp{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=Xn.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=Xn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=eE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&xc(!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 wc);const r=this.events[t].add(n);return t==="change"?()=>{r(),Me.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 xs.current&&xs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Xn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Rp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Rp);return hp(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function lo(e,t){return new jp(e,t)}function tE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,lo(n))}function nE(e,t){const n=Mi(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=mS(s[i]);tE(e,i,a)}}function Bp(e){return e.getProps()[lh]}class rE extends jp{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=Dh(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&&(ys(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function oE(e){return!!(gt(e)&&e.add)}function Sc(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 rE("auto"),e.addValue("willChange",r)),oE(r))return r.add(t)}function sE({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Tc(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 h=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),f=l[d];if(f===void 0||u&&sE(u,d))continue;const p={delay:n,elapsed:0,...Zl(i||{},d)};let m=!1;if(window.HandoffAppearAnimations){const g=Bp(e);if(g){const w=window.HandoffAppearAnimations(g,d,h,Me);w!==null&&(p.elapsed=w,m=!0)}}h.start(bc(d,h,f,e.shouldReduceMotion&&Yn.has(d)?{type:!1}:p,e,m,Sc(e,d)));const v=h.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{Me.update(()=>{a&&nE(e,a)})}),c}function Ec(e,t,n={}){var r;const o=Mi(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(Tc(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=s;return iE(e,t,u+c,d,h,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(aE).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(Ec(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function aE(e,t){return e.sortNodePosition(t)}function lE(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Ec(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Ec(e,t,n);else{const o=typeof t=="function"?Mi(e,t,n.custom):t;r=Promise.all(Tc(e,o,n))}return r.then(()=>{Me.postRender(()=>{e.notify("AnimationComplete",t)})})}const cE=[...Nl].reverse(),uE=Nl.length;function dE(e){return t=>Promise.all(t.map(({animation:n,options:r})=>lE(e,n,r)))}function fE(e){let t=dE(e),n=Wp(),r=!0;const o=l=>(c,u)=>{var d;const h=Mi(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(h){const{transition:f,transitionEnd:p,...m}=h;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],h=new Set;let f={},p=1/0;for(let v=0;v<uE;v++){const g=cE[v],w=n[g],y=c[g]!==void 0?c[g]:u[g],T=cs(y),S=g===l?w.isActive:null;S===!1&&(p=v);let E=y===u[g]&&y!==c[g]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...f},!w.isActive&&S===null||!y&&!w.prevProp||us(y)||typeof y=="boolean")continue;let P=hE(w.prevProp,y)||g===l&&w.isActive&&!E&&T||v>p&&T,O=!1;const C=Array.isArray(y)?y:[y];let L=C.reduce(o(g),{});S===!1&&(L={});const{prevResolvedValues:D={}}=w,V={...D,...L},k=_=>{P=!0,h.has(_)&&(O=!0,h.delete(_)),w.needsAnimating[_]=!0;const N=e.getValue(_);N&&(N.liveStyle=!1)};for(const _ in V){const N=L[_],$=D[_];if(f.hasOwnProperty(_))continue;let H=!1;Ul(N)&&Ul($)?H=!Hh(N,$):H=N!==$,H?N!=null?k(_):h.add(_):N!==void 0&&h.has(_)?k(_):w.protectedKeys[_]=!0}w.prevProp=y,w.prevResolvedValues=L,w.isActive&&(f={...f,...L}),r&&e.blockInitialAnimation&&(P=!1),P&&(!E||O)&&d.push(...C.map(_=>({animation:_,options:{type:g}})))}if(h.size){const v={};h.forEach(g=>{const w=e.getBaseTarget(g),y=e.getValue(g);y&&(y.liveStyle=!0),v[g]=w??null}),d.push({animation:v})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(h=>{var f;return(f=h.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Wp(),r=!0}}}function hE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Hh(t,e):!1}function xr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Wp(){return{animate:xr(!0),whileInView:xr(),whileHover:xr(),whileTap:xr(),whileDrag:xr(),whileFocus:xr(),exit:xr()}}class pE extends Zn{constructor(t){super(t),t.animationState||(t.animationState=fE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();us(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 mE=0;class gE extends Zn{constructor(){super(...arguments),this.id=mE++}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 yE={animation:{Feature:pE},exit:{Feature:gE}},zp=(e,t)=>Math.abs(e-t);function vE(e,t){const n=zp(e.x,t.x),r=zp(e.y,t.y);return Math.sqrt(n**2+r**2)}class Hp{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=Pc(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,f=vE(d.offset,{x:0,y:0})>=3;if(!h&&!f)return;const{point:p}=d,{timestamp:m}=Et;this.history.push({...p,timestamp:m});const{onStart:v,onMove:g}=this.handlers;h||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Cc(h,this.transformPagePoint),Me.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:f,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Pc(d.type==="pointercancel"?this.lastMoveEventInfo:Cc(h,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,v),p&&p(d,v)},!Lh(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=_i(t),a=Cc(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=Et;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Pc(a,this.history)),this.removeListeners=Nn(Dn(this.contextWindow,"pointermove",this.handlePointerMove),Dn(this.contextWindow,"pointerup",this.handlePointerUp),Dn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),pn(this.updatePoint)}}function Cc(e,t){return t?{point:t(e.point)}:e}function Up(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Pc({point:e},t){return{point:e,delta:Up(e,Gp(t)),offset:Up(e,bE(t)),velocity:wE(t,.1)}}function bE(e){return e[0]}function Gp(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=Gp(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>mn(t)));)n--;if(!r)return{x:0,y:0};const s=gn(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 Yp=1e-4,xE=1-Yp,SE=1+Yp,qp=.01,TE=0-qp,EE=0+qp;function Gt(e){return e.max-e.min}function CE(e,t,n){return Math.abs(e-t)<=n}function Kp(e,t,n,r=.5){e.origin=r,e.originPoint=Ye(t.min,t.max,e.origin),e.scale=Gt(n)/Gt(t),e.translate=Ye(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xE&&e.scale<=SE||isNaN(e.scale))&&(e.scale=1),(e.translate>=TE&&e.translate<=EE||isNaN(e.translate))&&(e.translate=0)}function Ss(e,t,n,r){Kp(e.x,t.x,n.x,r?r.originX:void 0),Kp(e.y,t.y,n.y,r?r.originY:void 0)}function Zp(e,t,n){e.min=n.min+t.min,e.max=e.min+Gt(t)}function PE(e,t,n){Zp(e.x,t.x,n.x),Zp(e.y,t.y,n.y)}function Xp(e,t,n){e.min=t.min-n.min,e.max=e.min+Gt(t)}function Ts(e,t,n){Xp(e.x,t.x,n.x),Xp(e.y,t.y,n.y)}function kE(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ye(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ye(n,e,r.max):Math.min(e,n)),e}function Qp(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 IE(e,{top:t,left:n,bottom:r,right:o}){return{x:Qp(e.x,n,o),y:Qp(e.y,t,r)}}function Jp(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 OE(e,t){return{x:Jp(e.x,t.x),y:Jp(e.y,t.y)}}function AE(e,t){let n=.5;const r=Gt(e),o=Gt(t);return o>r?n=ao(t.min,t.max-r,e.min):r>o&&(n=ao(e.min,e.max-o,t.min)),qn(0,1,n)}function _E(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 kc=.35;function ME(e=kc){return e===!1?e=0:e===!0&&(e=kc),{x:em(e,"left","right"),y:em(e,"top","bottom")}}function em(e,t,n){return{min:tm(e,t),max:tm(e,n)}}function tm(e,t){return typeof e=="number"?e:e[t]||0}const nm=()=>({translate:0,scale:1,origin:0,originPoint:0}),co=()=>({x:nm(),y:nm()}),rm=()=>({min:0,max:0}),lt=()=>({x:rm(),y:rm()});function Qt(e){return[e("x"),e("y")]}function om({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function DE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function NE(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 Ic(e){return e===void 0||e===1}function Oc({scale:e,scaleX:t,scaleY:n}){return!Ic(e)||!Ic(t)||!Ic(n)}function Sr(e){return Oc(e)||sm(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function sm(e){return im(e.x)||im(e.y)}function im(e){return e&&e!=="0%"}function $i(e,t,n){const r=e-n,o=t*r;return n+o}function am(e,t,n,r,o){return o!==void 0&&(e=$i(e,o,r)),$i(e,n,r)+t}function Ac(e,t=0,n=1,r,o){e.min=am(e.min,t,n,r,o),e.max=am(e.max,t,n,r,o)}function lm(e,{x:t,y:n}){Ac(e.x,t.translate,t.scale,t.originPoint),Ac(e.y,n.translate,n.scale,n.originPoint)}const cm=.999999999999,um=1.0000000000001;function FE(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&&uo(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,lm(e,i)),r&&Sr(s.latestValues)&&uo(e,s.latestValues))}t.x<um&&t.x>cm&&(t.x=1),t.y<um&&t.y>cm&&(t.y=1)}function Jn(e,t){e.min=e.min+t,e.max=e.max+t}function dm(e,t,n,r,o=.5){const s=Ye(e.min,e.max,o);Ac(e,t,n,s,r)}function uo(e,t){dm(e.x,t.x,t.scaleX,t.scale,t.originX),dm(e.y,t.y,t.scaleY,t.scale,t.originY)}function fm(e,t){return om(NE(e.getBoundingClientRect(),t))}function LE(e,t,n){const r=fm(e,n),{scroll:o}=t;return o&&(Jn(r.x,o.offset.x),Jn(r.y,o.offset.y)),r}const hm=({current:e})=>e?e.ownerDocument.defaultView:null,VE=new WeakMap;class $E{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=lt(),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(_i(u,"page").point)},s=(u,d)=>{var h;const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=jh(f),!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),Qt(g=>{let w=this.getAxisMotionValue(g).get()||0;if(fn.test(w)){const{projection:y}=this.visualElement;if(y&&y.layout){const T=y.layout.layoutBox[g];T&&(w=Gt(T)*(parseFloat(w)/100))}}this.originPoint[g]=w}),m&&Me.postRender(()=>m(u,d)),(h=this.removeWillChange)===null||h===void 0||h.call(this),this.removeWillChange=Sc(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:h,dragDirectionLock:f,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:v}=d;if(f&&this.currentDirection===null){this.currentDirection=RE(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>Qt(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 Hp(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:hm(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&&Me.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||!Ri(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=kE(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&&to(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=IE(o.layoutBox,n):this.constraints=!1,this.elastic=ME(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Qt(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=_E(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!to(t))return!1;const r=t.current;Ut(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=LE(r,o.root,this.visualElement.getTransformPagePoint());let i=OE(o.layout.layoutBox,s);if(n){const a=n(DE(i));this.hasMutatedConstraints=!!a,a&&(i=om(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Qt(u=>{if(!Ri(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const h=o?200:1e6,f=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:f,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(bc(t,r,0,n,this.visualElement,!1,Sc(this.visualElement,t)))}stopAnimation(){Qt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qt(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){Qt(n=>{const{drag:r}=this.getProps();if(!Ri(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]-Ye(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!to(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Qt(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=AE({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(),Qt(i=>{if(!Ri(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Ye(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;VE.set(this.visualElement,this);const t=this.visualElement.current,n=Dn(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();to(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()),Me.read(r);const i=Mn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Qt(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=kc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function Ri(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function RE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class jE extends Zn{constructor(t){super(t),this.removeGroupControls=Tt,this.removeListeners=Tt,this.controls=new $E(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Tt}unmount(){this.removeGroupControls(),this.removeListeners()}}const pm=e=>(t,n)=>{e&&Me.postRender(()=>e(t,n))};class BE extends Zn{constructor(){super(...arguments),this.removePointerDownListener=Tt}onPointerDown(t){this.session=new Hp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:hm(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:pm(t),onStart:pm(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&Me.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=Dn(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 WE(){const e=b.useContext(xi);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 ji={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function mm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Es={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const n=mm(e,t.target.x),r=mm(e,t.target.y);return`${n}% ${r}%`}},zE={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Qn.parse(e);if(o.length>5)return r;const s=Qn.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=Ye(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 HE extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;U1(UE),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()})),ji.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()||Me.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Dl.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 gm(e){const[t,n]=WE(),r=b.useContext(ds);return x.jsx(HE,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(uh),isPresent:t,safeToRemove:n})}const UE={borderRadius:{...Es,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Es,borderTopRightRadius:Es,borderBottomLeftRadius:Es,borderBottomRightRadius:Es,boxShadow:zE},ym=["TopLeft","TopRight","BottomLeft","BottomRight"],GE=ym.length,vm=e=>typeof e=="string"?parseFloat(e):e,bm=e=>typeof e=="number"||fe.test(e);function YE(e,t,n,r,o,s){o?(e.opacity=Ye(0,n.opacity!==void 0?n.opacity:1,qE(r)),e.opacityExit=Ye(t.opacity!==void 0?t.opacity:1,0,KE(r))):s&&(e.opacity=Ye(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<GE;i++){const a=`border${ym[i]}Radius`;let l=wm(t,a),c=wm(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||bm(l)===bm(c)?(e[a]=Math.max(Ye(vm(l),vm(c),r),0),(fn.test(c)||fn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ye(t.rotate||0,n.rotate||0,r))}function wm(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const qE=xm(0,.5,Tp),KE=xm(.5,.95,Tt);function xm(e,t,n){return r=>r<e?0:r>t?1:n(ao(e,t,r))}function Sm(e,t){e.min=t.min,e.max=t.max}function Jt(e,t){Sm(e.x,t.x),Sm(e.y,t.y)}function Tm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Em(e,t,n,r,o){return e-=t,e=$i(e,1/n,r),o!==void 0&&(e=$i(e,1/o,r)),e}function ZE(e,t=0,n=1,r=.5,o,s=e,i=e){if(fn.test(t)&&(t=parseFloat(t),t=Ye(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Ye(s.min,s.max,r);e===s&&(a-=t),e.min=Em(e.min,t,n,a,o),e.max=Em(e.max,t,n,a,o)}function Cm(e,t,[n,r,o],s,i){ZE(e,t[n],t[r],t[o],t.scale,s,i)}const XE=["x","scaleX","originX"],QE=["y","scaleY","originY"];function Pm(e,t,n,r){Cm(e.x,t,XE,n?n.x:void 0,r?r.x:void 0),Cm(e.y,t,QE,n?n.y:void 0,r?r.y:void 0)}function km(e){return e.translate===0&&e.scale===1}function Im(e){return km(e.x)&&km(e.y)}function JE(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 Om(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 Am(e){return Gt(e.x)/Gt(e.y)}function _m(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class eC{constructor(){this.members=[]}add(t){Ai(this.members,t),t.scheduleRender()}remove(t){if(ys(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 tC(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:h,skewX:f,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),f&&(r+=`skewX(${f}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 nC=(e,t)=>e.depth-t.depth;class rC{constructor(){this.children=[],this.isDirty=!1}add(t){Ai(this.children,t),this.isDirty=!0}remove(t){ys(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(nC),this.isDirty=!1,this.children.forEach(t)}}function oC(e,t){const n=Xn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(pn(r),e(s-t))};return Me.read(r,!0),()=>pn(r)}function Mm(e){return e instanceof SVGElement&&e.tagName!=="svg"}function _c(e,t,n){const r=gt(e)?e:lo(e);return r.start(bc("",r,t,n)),r.animation}const Tr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Mc=["","X","Y","Z"],sC={visibility:"hidden"},Dm=1e3;let iC=0;function Dc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Nm(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Bp(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?Nm(e.parent):!1:!1}function Fm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=iC++,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&&(Tr.totalNodes=Tr.resolvedTargetDeltas=Tr.recalculatedProjection=0),this.nodes.forEach(cC),this.nodes.forEach(pC),this.nodes.forEach(mC),this.nodes.forEach(uC),window.MotionDebug&&window.MotionDebug.record(Tr)},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 rC)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new wc),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=Mm(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 h=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=oC(h,250),ji.hasAnimatedSinceResize&&(ji.hasAnimatedSinceResize=!1,this.nodes.forEach(Vm))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||wC,{onLayoutAnimationStart:v,onLayoutAnimationComplete:g}=u.getProps(),w=!this.targetLayout||!Om(this.targetLayout,p)||f,y=!h&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||h&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,y);const T={...Zl(m,"layout"),onPlay:v,onComplete:g};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else h||Vm(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,pn(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(gC),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&&Nm(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(Lm);return}this.isUpdating||this.nodes.forEach(fC),this.isUpdating=!1,this.nodes.forEach(hC),this.nodes.forEach(aC),this.nodes.forEach(lC),this.clearAllSnapshots();const a=Xn.now();Et.delta=qn(0,1e3/60,a-Et.timestamp),Et.timestamp=a,Et.isProcessing=!0,Gl.update.process(Et),Gl.preRender.process(Et),Gl.render.process(Et),Et.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Dl.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(dC),this.sharedNodes.forEach(yC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Me.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Me.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=lt(),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&&!Im(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Sr(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)),xC(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return lt();const a=i.measureViewportBox(),{scroll:l}=this.root;return l&&(Jn(a.x,l.offset.x),Jn(a.y,l.offset.y)),a}removeElementScroll(i){const a=lt();Jt(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){Jt(a,i);const{scroll:h}=this.root;h&&(Jn(a.x,-h.offset.x),Jn(a.y,-h.offset.y))}Jn(a.x,u.offset.x),Jn(a.y,u.offset.y)}}return a}applyTransform(i,a=!1){const l=lt();Jt(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&&uo(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Sr(u.latestValues)&&uo(l,u.latestValues)}return Sr(this.latestValues)&&uo(l,this.latestValues),l}removeTransform(i){const a=lt();Jt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Sr(c.latestValues))continue;Oc(c.latestValues)&&c.updateSnapshot();const u=lt(),d=c.measurePageBox();Jt(u,d),Pm(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Sr(this.latestValues)&&Pm(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!==Et.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:h}=this.options;if(!(!this.layout||!(d||h))){if(this.resolvedRelativeTargetAt=Et.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),Ts(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),Jt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=lt(),this.targetWithTransforms=lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),PE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Jt(this.target,this.layout.layoutBox),lm(this.target,this.targetDelta)):Jt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),Ts(this.relativeTargetOrigin,this.target,f.target),Jt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&Tr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Oc(this.parent.latestValues)||sm(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===Et.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;Jt(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;FE(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=lt());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Tm(this.prevProjectionDelta.x,this.projectionDelta.x),Tm(this.prevProjectionDelta.y,this.projectionDelta.y)),Ss(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!_m(this.projectionDelta.x,this.prevProjectionDelta.x)||!_m(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&Tr.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=co(),this.projectionDelta=co(),this.projectionDeltaWithTransform=co()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=co();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=lt(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=f!==p,v=this.getStack(),g=!v||v.members.length<=1,w=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(bC));this.animationProgress=0;let y;this.mixTargetDelta=T=>{const S=T/1e3;$m(d.x,i.x,S),$m(d.y,i.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ts(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),vC(this.relativeTarget,this.relativeTargetOrigin,h,S),y&&JE(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=lt()),Jt(y,this.relativeTarget)),m&&(this.animationValues=u,YE(u,c,this.latestValues,S,w,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(pn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Me.update(()=>{ji.hasAnimatedSinceResize=!0,this.currentAnimation=_c(0,Dm,{...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(Dm),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&&zm(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||lt();const d=Gt(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const h=Gt(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+h}Jt(a,l),uo(a,u),Ss(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new eC),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Dc("z",i,c,this.animationValues);for(let u=0;u<Mc.length;u++)Dc(`rotate${Mc[u]}`,i,c,this.animationValues),Dc(`skew${Mc[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 sC;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Oi(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=Oi(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Sr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const h=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=tC(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:f,y:p}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=d===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in Pi){if(h[m]===void 0)continue;const{correct:v,applyTo:g}=Pi[m],w=c.transform==="none"?h[m]:v(h[m],d);if(g){const y=g.length;for(let T=0;T<y;T++)c[g[T]]=w}else c[m]=w}return this.options.layoutId&&(c.pointerEvents=d===this?Oi(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(Lm),this.root.sharedNodes.clear()}}}function aC(e){e.updateLayout()}function lC(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"?Qt(d=>{const h=i?n.measuredBox[d]:n.layoutBox[d],f=Gt(h);h.min=r[d].min,h.max=h.min+f}):zm(s,n.layoutBox,r)&&Qt(d=>{const h=i?n.measuredBox[d]:n.layoutBox[d],f=Gt(r[d]);h.max=h.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const a=co();Ss(a,r,n.layoutBox);const l=co();i?Ss(l,e.applyTransform(o,!0),n.measuredBox):Ss(l,r,n.layoutBox);const c=!Im(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const p=lt();Ts(p,n.layoutBox,h.layoutBox);const m=lt();Ts(m,r,f.layoutBox),Om(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 cC(e){window.MotionDebug&&Tr.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 uC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function dC(e){e.clearSnapshot()}function Lm(e){e.clearMeasurements()}function fC(e){e.isLayoutDirty=!1}function hC(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Vm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function pC(e){e.resolveTargetDelta()}function mC(e){e.calcProjection()}function gC(e){e.resetSkewAndRotation()}function yC(e){e.removeLeadSnapshot()}function $m(e,t,n){e.translate=Ye(t.translate,0,n),e.scale=Ye(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Rm(e,t,n,r){e.min=Ye(t.min,n.min,r),e.max=Ye(t.max,n.max,r)}function vC(e,t,n,r){Rm(e.x,t.x,n.x,r),Rm(e.y,t.y,n.y,r)}function bC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const wC={duration:.45,ease:[.4,0,.1,1]},jm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Bm=jm("applewebkit/")&&!jm("chrome/")?Math.round:Tt;function Wm(e){e.min=Bm(e.min),e.max=Bm(e.max)}function xC(e){Wm(e.x),Wm(e.y)}function zm(e,t,n){return e==="position"||e==="preserve-aspect"&&!CE(Am(t),Am(n),.2)}const SC=Fm({attachResizeListener:(e,t)=>Mn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Nc={current:void 0},Hm=Fm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Nc.current){const e=new SC({});e.mount(window),e.setOptions({layoutScroll:!0}),Nc.current=e}return Nc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),TC={pan:{Feature:BE},drag:{Feature:jE,ProjectionNode:Hm,MeasureLayout:gm}},Fc={current:null},Um={current:!1};function EC(){if(Um.current=!0,!!Ml)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fc.current=e.matches;e.addListener(t),t()}else Fc.current=!1}function CC(e,t,n){for(const r in t){const o=t[r],s=n[r];if(gt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&xc(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(gt(s))e.addValue(r,lo(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,lo(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Cs=new WeakMap,PC=[...Qh,At,Qn],kC=e=>PC.find(Xh(e)),Gm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],IC=Fl.length;class OC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.applyWillChange=!1,this.resolveKeyframes=(h,f,p,m)=>new this.KeyframeResolver(h,f,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=Jl,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,Me.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=Ci(n),this.isVariantNode=hh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const f=d[h];l[h]!==void 0&&gt(f)&&f.set(l[h],!1)}}mount(t){this.current=t,Cs.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)),Um.current||EC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Fc.current,process.env.NODE_ENV!=="production"&&xc(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(){Cs.delete(this.current),this.projection&&this.projection.unmount(),pn(this.notifyUpdate),pn(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&&Me.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 no){const n=no[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):lt()}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<Gm.length;r++){const o=Gm[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=CC(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<IC;r++){const o=Fl[r],s=this.props[o];(cs(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=lo(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"&&(Gh(o)||Uh(o))?o=parseFloat(o):!kC(o)&&Qn.test(n)&&(o=lp(t,n)),this.setBaseTarget(t,gt(o)?o.get():o)),gt(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=Hl(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&&!gt(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 wc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Ym extends OC{constructor(){super(...arguments),this.KeyframeResolver=cp}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 AC(e){return window.getComputedStyle(e)}class qm extends Ym{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=kh}readValueFromInstance(t,n){if(Yn.has(n)){const r=oc(n);return r&&r.default||0}else{const r=AC(t),o=(vh(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return fm(t,n)}build(t,n,r){Rl(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return zl(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;gt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Km extends Ym{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Yn.has(n)){const r=oc(n);return r&&r.default||0}return n=Ih.has(n)?n:Ti(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Ah(t,n,r)}build(t,n,r){Bl(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Oh(t,n,r,o)}mount(t){this.isSVGTag=Wl(t.tagName),super.mount(t)}}const _C=(e,t)=>Ll(e)?new Km(t):new qm(t,{allowProjection:e!==b.Fragment}),MC={...yE,...FS,...TC,...{layout:{ProjectionNode:Hm,MeasureLayout:gm}}},Ct=z1((e,t)=>SS(e,t,MC,_C));function Zm(){const e=b.useRef(!1);return Si(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Xm(){const e=Zm(),[t,n]=b.useState(0),r=b.useCallback(()=>{e.current&&n(t+1)},[t]);return[b.useCallback(()=>Me.postRender(r),[r]),t]}class DC extends M.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function NC({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(eo);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(`
1
+ (function(J,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):(J=typeof globalThis<"u"?globalThis:J||self,b(J.components={},J.React,J["react/jsx-runtime"],J.ReactDOM))})(this,function(J,b,x,Zu){"use strict";var EN=Object.defineProperty;var CN=(J,b,x)=>b in J?EN(J,b,{enumerable:!0,configurable:!0,writable:!0,value:x}):J[b]=x;var ne=(J,b,x)=>CN(J,typeof b!="symbol"?b+"":b,x);function Ju(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const M=Ju(b),ef=Ju(Zu);function tf(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=tf(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Lb(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=tf(e))&&(r&&(r+=" "),r+=t);return r}const nf=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,rf=Lb,Po=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return rf(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],f=i==null?void 0:i[c];if(u===null)return null;const h=nf(u)||nf(f);return o[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,h]=u;return h===void 0||(c[f]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:h,...d}=u;return Object.entries(d).every(p=>{let[m,v]=p;return Array.isArray(v)?v.includes({...i,...a}[m]):{...i,...a}[m]===v})?[...c,f,h]:c},[]);return rf(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};function of(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=of(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Nb(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=of(e))&&(r&&(r+=" "),r+=t);return r}var sf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _b(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Vb(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 $b=Error,Bb=EvalError,jb=RangeError,Rb=ReferenceError,af=SyntaxError,Io=TypeError,Hb=URIError,Wb=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},lf=typeof Symbol<"u"&&Symbol,zb=Wb,Gb=function(){return typeof lf!="function"||typeof Symbol!="function"||typeof lf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:zb()},aa={__proto__:null,foo:{}},Ub=Object,Yb=function(){return{__proto__:aa}.foo===aa.foo&&!(aa instanceof Ub)},qb="Function.prototype.bind called on incompatible ",Kb=Object.prototype.toString,Xb=Math.max,Qb="[object Function]",cf=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},Zb=function(t,n){for(var r=[],o=n,i=0;o<t.length;o+=1,i+=1)r[i]=t[o];return r},Jb=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},e0=function(t){var n=this;if(typeof n!="function"||Kb.apply(n)!==Qb)throw new TypeError(qb+n);for(var r=Zb(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,cf(r,arguments));return Object(u)===u?u:this}return n.apply(t,cf(r,arguments))},s=Xb(0,n.length-r.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(o=Function("binder","return function ("+Jb(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},t0=e0,la=Function.prototype.bind||t0,n0=Function.prototype.call,r0=Object.prototype.hasOwnProperty,o0=la,i0=o0.call(n0,r0),pe,s0=$b,a0=Bb,l0=jb,c0=Rb,vr=af,br=Io,u0=Hb,uf=Function,ca=function(e){try{return uf('"use strict"; return ('+e+").constructor;")()}catch{}},Kn=Object.getOwnPropertyDescriptor;if(Kn)try{Kn({},"")}catch{Kn=null}var ua=function(){throw new br},f0=Kn?function(){try{return arguments.callee,ua}catch{try{return Kn(arguments,"callee").get}catch{return ua}}}():ua,wr=Gb(),d0=Yb(),ut=Object.getPrototypeOf||(d0?function(e){return e.__proto__}:null),xr={},h0=typeof Uint8Array>"u"||!ut?pe:ut(Uint8Array),Xn={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?pe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?pe:ArrayBuffer,"%ArrayIteratorPrototype%":wr&&ut?ut([][Symbol.iterator]()):pe,"%AsyncFromSyncIteratorPrototype%":pe,"%AsyncFunction%":xr,"%AsyncGenerator%":xr,"%AsyncGeneratorFunction%":xr,"%AsyncIteratorPrototype%":xr,"%Atomics%":typeof Atomics>"u"?pe:Atomics,"%BigInt%":typeof BigInt>"u"?pe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?pe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?pe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?pe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":s0,"%eval%":eval,"%EvalError%":a0,"%Float32Array%":typeof Float32Array>"u"?pe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?pe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?pe:FinalizationRegistry,"%Function%":uf,"%GeneratorFunction%":xr,"%Int8Array%":typeof Int8Array>"u"?pe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?pe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?pe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":wr&&ut?ut(ut([][Symbol.iterator]())):pe,"%JSON%":typeof JSON=="object"?JSON:pe,"%Map%":typeof Map>"u"?pe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!wr||!ut?pe:ut(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?pe:Promise,"%Proxy%":typeof Proxy>"u"?pe:Proxy,"%RangeError%":l0,"%ReferenceError%":c0,"%Reflect%":typeof Reflect>"u"?pe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?pe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!wr||!ut?pe:ut(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?pe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":wr&&ut?ut(""[Symbol.iterator]()):pe,"%Symbol%":wr?Symbol:pe,"%SyntaxError%":vr,"%ThrowTypeError%":f0,"%TypedArray%":h0,"%TypeError%":br,"%Uint8Array%":typeof Uint8Array>"u"?pe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?pe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?pe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?pe:Uint32Array,"%URIError%":u0,"%WeakMap%":typeof WeakMap>"u"?pe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?pe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?pe:WeakSet};if(ut)try{null.error}catch(e){var p0=ut(ut(e));Xn["%Error.prototype%"]=p0}var m0=function e(t){var n;if(t==="%AsyncFunction%")n=ca("async function () {}");else if(t==="%GeneratorFunction%")n=ca("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=ca("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&ut&&(n=ut(o.prototype))}return Xn[t]=n,n},ff={__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"]},Ao=la,Ai=i0,g0=Ao.call(Function.call,Array.prototype.concat),y0=Ao.call(Function.apply,Array.prototype.splice),df=Ao.call(Function.call,String.prototype.replace),Oi=Ao.call(Function.call,String.prototype.slice),v0=Ao.call(Function.call,RegExp.prototype.exec),b0=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,w0=/\\(\\)?/g,x0=function(t){var n=Oi(t,0,1),r=Oi(t,-1);if(n==="%"&&r!=="%")throw new vr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new vr("invalid intrinsic syntax, expected opening `%`");var o=[];return df(t,b0,function(i,s,a,l){o[o.length]=a?df(l,w0,"$1"):s||i}),o},S0=function(t,n){var r=t,o;if(Ai(ff,r)&&(o=ff[r],r="%"+o[0]+"%"),Ai(Xn,r)){var i=Xn[r];if(i===xr&&(i=m0(r)),typeof i>"u"&&!n)throw new br("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new vr("intrinsic "+t+" does not exist!")},Sr=function(t,n){if(typeof t!="string"||t.length===0)throw new br("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new br('"allowMissing" argument must be a boolean');if(v0(/^%?[^%]*%?$/,t)===null)throw new vr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=x0(t),o=r.length>0?r[0]:"",i=S0("%"+o+"%",n),s=i.name,a=i.value,l=!1,c=i.alias;c&&(o=c[0],y0(r,g0([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var h=r[u],d=Oi(h,0,1),p=Oi(h,-1);if((d==='"'||d==="'"||d==="`"||p==='"'||p==="'"||p==="`")&&d!==p)throw new vr("property names with quotes must have matching quotes");if((h==="constructor"||!f)&&(l=!0),o+="."+h,s="%"+o+"%",Ai(Xn,s))a=Xn[s];else if(a!=null){if(!(h in a)){if(!n)throw new br("base intrinsic for "+t+" exists, but the property is not available.");return}if(Kn&&u+1>=r.length){var m=Kn(a,h);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[h]}else f=Ai(a,h),a=a[h];f&&!l&&(Xn[s]=a)}}return a},hf={exports:{}},fa,pf;function da(){if(pf)return fa;pf=1;var e=Sr,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return fa=t,fa}var T0=Sr,ki=T0("%Object.getOwnPropertyDescriptor%",!0);if(ki)try{ki([],"length")}catch{ki=null}var mf=ki,gf=da(),E0=af,Tr=Io,yf=mf,C0=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Tr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Tr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Tr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Tr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Tr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Tr("`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=!!yf&&yf(t,n);if(gf)gf(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 E0("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ha=da(),vf=function(){return!!ha};vf.hasArrayLengthDefineBug=function(){if(!ha)return null;try{return ha([],"length",{value:1}).length!==1}catch{return!0}};var P0=vf,I0=Sr,bf=C0,A0=P0(),wf=mf,xf=Io,O0=I0("%Math.floor%"),k0=function(t,n){if(typeof t!="function")throw new xf("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||O0(n)!==n)throw new xf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in t&&wf){var s=wf(t,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!r)&&(A0?bf(t,"length",n,!0,!0):bf(t,"length",n)),t};(function(e){var t=la,n=Sr,r=k0,o=Io,i=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(s,i),l=da(),c=n("%Math.max%");e.exports=function(h){if(typeof h!="function")throw new o("a function is required");var d=a(t,s,arguments);return r(d,1+c(0,h.length-(arguments.length-1)),!0)};var u=function(){return a(t,i,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(hf);var D0=hf.exports,Sf=Sr,Tf=D0,M0=Tf(Sf("String.prototype.indexOf")),F0=function(t,n){var r=Sf(t,!!n);return typeof r=="function"&&M0(t,".prototype.")>-1?Tf(r):r};const L0=Vb(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var pa=typeof Map=="function"&&Map.prototype,ma=Object.getOwnPropertyDescriptor&&pa?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Di=pa&&ma&&typeof ma.get=="function"?ma.get:null,Ef=pa&&Map.prototype.forEach,ga=typeof Set=="function"&&Set.prototype,ya=Object.getOwnPropertyDescriptor&&ga?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Mi=ga&&ya&&typeof ya.get=="function"?ya.get:null,Cf=ga&&Set.prototype.forEach,N0=typeof WeakMap=="function"&&WeakMap.prototype,Oo=N0?WeakMap.prototype.has:null,_0=typeof WeakSet=="function"&&WeakSet.prototype,ko=_0?WeakSet.prototype.has:null,V0=typeof WeakRef=="function"&&WeakRef.prototype,Pf=V0?WeakRef.prototype.deref:null,$0=Boolean.prototype.valueOf,B0=Object.prototype.toString,j0=Function.prototype.toString,R0=String.prototype.match,va=String.prototype.slice,Sn=String.prototype.replace,H0=String.prototype.toUpperCase,If=String.prototype.toLowerCase,Af=RegExp.prototype.test,Of=Array.prototype.concat,Kt=Array.prototype.join,W0=Array.prototype.slice,kf=Math.floor,ba=typeof BigInt=="function"?BigInt.prototype.valueOf:null,wa=Object.getOwnPropertySymbols,xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Er=typeof Symbol=="function"&&typeof Symbol.iterator=="object",bt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Er||!0)?Symbol.toStringTag:null,Df=Object.prototype.propertyIsEnumerable,Mf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Ff(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Af.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-kf(-e):kf(e);if(r!==e){var o=String(r),i=va.call(t,o.length+1);return Sn.call(o,n,"$&_")+"."+Sn.call(Sn.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Sn.call(t,n,"$&_")}var Sa=L0,Lf=Sa.custom,Nf=$f(Lf)?Lf:null,z0=function e(t,n,r,o){var i=n||{};if(Tn(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Tn(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=Tn(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(Tn(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(Tn(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 jf(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Ff(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Ff(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 Ta(t)?"[Array]":"[Object]";var f=lw(i,r);if(typeof o>"u")o=[];else if(Bf(o,t)>=0)return"[Circular]";function h(V,I,D){if(I&&(o=W0.call(o),o.push(I)),D){var L={depth:i.depth};return Tn(i,"quoteStyle")&&(L.quoteStyle=i.quoteStyle),e(V,L,r+1,o)}return e(V,i,r+1,o)}if(typeof t=="function"&&!Vf(t)){var d=J0(t),p=Fi(t,h);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(p.length>0?" { "+Kt.call(p,", ")+" }":"")}if($f(t)){var m=Er?Sn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):xa.call(t);return typeof t=="object"&&!Er?Do(m):m}if(iw(t)){for(var v="<"+If.call(String(t.nodeName)),g=t.attributes||[],w=0;w<g.length;w++)v+=" "+g[w].name+"="+_f(G0(g[w].value),"double",i);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+If.call(String(t.nodeName))+">",v}if(Ta(t)){if(t.length===0)return"[]";var y=Fi(t,h);return f&&!aw(y)?"["+Ca(y,f)+"]":"[ "+Kt.call(y,", ")+" ]"}if(Y0(t)){var T=Fi(t,h);return!("cause"in Error.prototype)&&"cause"in t&&!Df.call(t,"cause")?"{ ["+String(t)+"] "+Kt.call(Of.call("[cause]: "+h(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Kt.call(T,", ")+" }"}if(typeof t=="object"&&s){if(Nf&&typeof t[Nf]=="function"&&Sa)return Sa(t,{depth:u-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(ew(t)){var S=[];return Ef&&Ef.call(t,function(V,I){S.push(h(I,t,!0)+" => "+h(V,t))}),Rf("Map",Di.call(t),S,f)}if(rw(t)){var E=[];return Cf&&Cf.call(t,function(V){E.push(h(V,t))}),Rf("Set",Mi.call(t),E,f)}if(tw(t))return Ea("WeakMap");if(ow(t))return Ea("WeakSet");if(nw(t))return Ea("WeakRef");if(K0(t))return Do(h(Number(t)));if(Q0(t))return Do(h(ba.call(t)));if(X0(t))return Do($0.call(t));if(q0(t))return Do(h(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof sf<"u"&&t===sf)return"{ [object globalThis] }";if(!U0(t)&&!Vf(t)){var A=Fi(t,h),P=Mf?Mf(t)===Object.prototype:t instanceof Object||t.constructor===Object,O=t instanceof Object?"":"null prototype",C=!P&&bt&&Object(t)===t&&bt in t?va.call(En(t),8,-1):O?"Object":"",_=P||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",F=_+(C||O?"["+Kt.call(Of.call([],C||[],O||[]),": ")+"] ":"");return A.length===0?F+"{}":f?F+"{"+Ca(A,f)+"}":F+"{ "+Kt.call(A,", ")+" }"}return String(t)};function _f(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function G0(e){return Sn.call(String(e),/"/g,"&quot;")}function Ta(e){return En(e)==="[object Array]"&&(!bt||!(typeof e=="object"&&bt in e))}function U0(e){return En(e)==="[object Date]"&&(!bt||!(typeof e=="object"&&bt in e))}function Vf(e){return En(e)==="[object RegExp]"&&(!bt||!(typeof e=="object"&&bt in e))}function Y0(e){return En(e)==="[object Error]"&&(!bt||!(typeof e=="object"&&bt in e))}function q0(e){return En(e)==="[object String]"&&(!bt||!(typeof e=="object"&&bt in e))}function K0(e){return En(e)==="[object Number]"&&(!bt||!(typeof e=="object"&&bt in e))}function X0(e){return En(e)==="[object Boolean]"&&(!bt||!(typeof e=="object"&&bt in e))}function $f(e){if(Er)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!xa)return!1;try{return xa.call(e),!0}catch{}return!1}function Q0(e){if(!e||typeof e!="object"||!ba)return!1;try{return ba.call(e),!0}catch{}return!1}var Z0=Object.prototype.hasOwnProperty||function(e){return e in this};function Tn(e,t){return Z0.call(e,t)}function En(e){return B0.call(e)}function J0(e){if(e.name)return e.name;var t=R0.call(j0.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Bf(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 ew(e){if(!Di||!e||typeof e!="object")return!1;try{Di.call(e);try{Mi.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function tw(e){if(!Oo||!e||typeof e!="object")return!1;try{Oo.call(e,Oo);try{ko.call(e,ko)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function nw(e){if(!Pf||!e||typeof e!="object")return!1;try{return Pf.call(e),!0}catch{}return!1}function rw(e){if(!Mi||!e||typeof e!="object")return!1;try{Mi.call(e);try{Di.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function ow(e){if(!ko||!e||typeof e!="object")return!1;try{ko.call(e,ko);try{Oo.call(e,Oo)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function iw(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function jf(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return jf(va.call(e,0,t.maxStringLength),t)+r}var o=Sn.call(Sn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,sw);return _f(o,"single",t)}function sw(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":"")+H0.call(t.toString(16))}function Do(e){return"Object("+e+")"}function Ea(e){return e+" { ? }"}function Rf(e,t,n,r){var o=r?Ca(n,r):Kt.call(n,", ");return e+" ("+t+") {"+o+"}"}function aw(e){for(var t=0;t<e.length;t++)if(Bf(e[t],`
2
+ `)>=0)return!1;return!0}function lw(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Kt.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Kt.call(Array(t+1),n)}}function Ca(e,t){if(e.length===0)return"";var n=`
3
+ `+t.prev+t.base;return n+Kt.call(e,","+n)+`
4
+ `+t.prev}function Fi(e,t){var n=Ta(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Tn(e,o)?t(e[o],e):""}var i=typeof wa=="function"?wa(e):[],s;if(Er){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in e)Tn(e,l)&&(n&&String(Number(l))===l&&l<e.length||Er&&s["$"+l]instanceof Symbol||(Af.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof wa=="function")for(var c=0;c<i.length;c++)Df.call(e,i[c])&&r.push("["+t(i[c])+"]: "+t(e[i[c]],e));return r}var Hf=Sr,Cr=F0,cw=z0,uw=Io,Li=Hf("%WeakMap%",!0),Ni=Hf("%Map%",!0),fw=Cr("WeakMap.prototype.get",!0),dw=Cr("WeakMap.prototype.set",!0),hw=Cr("WeakMap.prototype.has",!0),pw=Cr("Map.prototype.get",!0),mw=Cr("Map.prototype.set",!0),gw=Cr("Map.prototype.has",!0),Pa=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},yw=function(e,t){var n=Pa(e,t);return n&&n.value},vw=function(e,t,n){var r=Pa(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},bw=function(e,t){return!!Pa(e,t)},ww=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new uw("Side channel does not contain "+cw(i))},get:function(i){if(Li&&i&&(typeof i=="object"||typeof i=="function")){if(t)return fw(t,i)}else if(Ni){if(n)return pw(n,i)}else if(r)return yw(r,i)},has:function(i){if(Li&&i&&(typeof i=="object"||typeof i=="function")){if(t)return hw(t,i)}else if(Ni){if(n)return gw(n,i)}else if(r)return bw(r,i);return!1},set:function(i,s){Li&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new Li),dw(t,i,s)):Ni?(n||(n=new Ni),mw(n,i,s)):(r||(r={key:{},next:null}),vw(r,i,s))}};return o},Wf=e=>Array.isArray(e),Ia=e=>e===void 0,Aa=e=>e===null,xw=Function.bind.call(Function.call,Object.prototype.toString),Sw=e=>!!e&&xw(e)==="[object Error]"||e instanceof Error,zf=(e,t)=>e instanceof t,Tw=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Ew=e=>Object.prototype.toString.call(e)==="[object Date]"&&zf(e,Date),mn={array:Wf,date:Ew,empty:e=>Aa(e)||Ia(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:Sw,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Aa(e)||Ia(e),null:Aa,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Wf(e)&&typeof e=="object",primitive:Tw,string:e=>typeof e=="string",undefined:Ia},Oa=(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]=Oa(i?[]:{},o,n)}else e[r]=Oa(e[r],o,n)}else e[r]=n;return e},Cw=e=>Object.keys(e),Pw=e=>e.replace("[",".").replace("]","").split("."),ka=(e,t,n)=>{const r=Array.isArray(t)?t:Pw(t),o=structuredClone(e);return Oa(o,r,n),o};const Da="-";function Iw(e){const t=Ow(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(s){const a=s.split(Da);return a[0]===""&&a.length!==1&&a.shift(),Gf(a,t)||Aw(s)}function i(s,a){const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function Gf(e,t){var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Gf(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Da);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const Uf=/^\[(.+)\]$/;function Aw(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 Ow(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Dw(Object.entries(e.classGroups),n).forEach(([i,s])=>{Ma(s,r,i,t)}),r}function Ma(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Yf(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(kw(o)){Ma(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{Ma(s,Yf(t,i),n,r)})})}function Yf(e,t){let n=e;return t.split(Da).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function kw(e){return e.isThemeGetter}function Dw(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 Mw(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 Fw(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,f;for(let v=0;v<a.length;v++){let g=a[v];if(c===0){if(g===o&&(r||a.slice(v,v+i)===t)){l.push(a.slice(u,v)),u=v+i;continue}if(g==="/"){f=v;continue}}g==="["?c++:g==="]"&&c--}const h=l.length===0?a:a.substring(u),d=h.startsWith(qf),p=d?h.substring(1):h,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:s})}:s}function Lw(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 Nw(e){return{cache:Mw(e.cacheSize),parseClassName:Fw(e),...Iw(e)}}const _w=/\s+/;function Vw(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(_w).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(s);let f=!!u,h=r(f?c.substring(0,u):c);if(!h){if(!f)return{isTailwindClass:!1,originalClassName:s};if(h=r(c),!h)return{isTailwindClass:!1,originalClassName:s};f=!1}const d=Lw(a).join(":");return{isTailwindClass:!0,modifierId:l?d+qf:d,classGroupId:h,originalClassName:s,hasPostfixModifier:f}}).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(f=>i.add(a+f)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function $w(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Kf(t))&&(r&&(r+=" "),r+=n);return r}function Kf(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Kf(e[r]))&&(n&&(n+=" "),n+=t);return n}function Bw(e,...t){let n,r,o,i=s;function s(l){const c=t.reduce((u,f)=>f(u),e());return n=Nw(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=Vw(l,n);return o(l,u),u}return function(){return i($w.apply(null,arguments))}}function Ve(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Xf=/^\[(?:([a-z-]+):)?(.+)\]$/i,jw=/^\d+\/\d+$/,Rw=new Set(["px","full","screen"]),Hw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ww=/\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$/,zw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Gw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Uw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function gn(e){return Qn(e)||Rw.has(e)||jw.test(e)}function Cn(e){return Pr(e,"length",ex)}function Qn(e){return!!e&&!Number.isNaN(Number(e))}function _i(e){return Pr(e,"number",Qn)}function Mo(e){return!!e&&Number.isInteger(Number(e))}function Yw(e){return e.endsWith("%")&&Qn(e.slice(0,-1))}function fe(e){return Xf.test(e)}function Pn(e){return Hw.test(e)}const qw=new Set(["length","size","percentage"]);function Kw(e){return Pr(e,qw,Qf)}function Xw(e){return Pr(e,"position",Qf)}const Qw=new Set(["image","url"]);function Zw(e){return Pr(e,Qw,nx)}function Jw(e){return Pr(e,"",tx)}function Fo(){return!0}function Pr(e,t,n){const r=Xf.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function ex(e){return Ww.test(e)&&!zw.test(e)}function Qf(){return!1}function tx(e){return Gw.test(e)}function nx(e){return Uw.test(e)}function rx(){const e=Ve("colors"),t=Ve("spacing"),n=Ve("blur"),r=Ve("brightness"),o=Ve("borderColor"),i=Ve("borderRadius"),s=Ve("borderSpacing"),a=Ve("borderWidth"),l=Ve("contrast"),c=Ve("grayscale"),u=Ve("hueRotate"),f=Ve("invert"),h=Ve("gap"),d=Ve("gradientColorStops"),p=Ve("gradientColorStopPositions"),m=Ve("inset"),v=Ve("margin"),g=Ve("opacity"),w=Ve("padding"),y=Ve("saturate"),T=Ve("scale"),S=Ve("sepia"),E=Ve("skew"),A=Ve("space"),P=Ve("translate"),O=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",fe,t],F=()=>[fe,t],V=()=>["",gn,Cn],I=()=>["auto",Qn,fe],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],G=()=>["","0",fe],k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[Qn,_i],K=()=>[Qn,fe];return{cacheSize:500,separator:":",theme:{colors:[Fo],spacing:[gn,Cn],blur:["none","",Pn,fe],brightness:j(),borderColor:[e],borderRadius:["none","","full",Pn,fe],borderSpacing:F(),borderWidth:V(),contrast:j(),grayscale:G(),hueRotate:K(),invert:G(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[Yw,Cn],inset:_(),margin:_(),opacity:j(),padding:F(),saturate:j(),scale:j(),sepia:G(),skew:K(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",fe]}],container:["container"],columns:[{columns:[Pn]}],"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:[...D(),fe]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],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",Mo,fe]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",fe]}],grow:[{grow:G()}],shrink:[{shrink:G()}],order:[{order:["first","last","none",Mo,fe]}],"grid-cols":[{"grid-cols":[Fo]}],"col-start-end":[{col:["auto",{span:["full",Mo,fe]},fe]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[Fo]}],"row-start-end":[{row:["auto",{span:[Mo,fe]},fe]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",fe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",fe]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[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:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",fe,t]}],"min-w":[{"min-w":[fe,t,"min","max","fit"]}],"max-w":[{"max-w":[fe,t,"none","full","min","max","fit","prose",{screen:[Pn]},Pn]}],h:[{h:[fe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[fe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Pn,Cn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",_i]}],"font-family":[{font:[Fo]}],"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",fe]}],"line-clamp":[{"line-clamp":["none",Qn,_i]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",gn,fe]}],"list-image":[{"list-image":["none",fe]}],"list-style-type":[{list:["none","disc","decimal",fe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",gn,Cn]}],"underline-offset":[{"underline-offset":["auto",gn,fe]}],"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",fe]}],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",fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),Xw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Kw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Zw]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[d]}],"gradient-via":[{via:[d]}],"gradient-to":[{to:[d]}],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":[g]}],"border-style":[{border:[...L(),"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":[g]}],"divide-style":[{divide:L()}],"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:["",...L()]}],"outline-offset":[{"outline-offset":[gn,fe]}],"outline-w":[{outline:[gn,Cn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[gn,Cn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Pn,Jw]}],"shadow-color":[{shadow:[Fo]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Pn,fe]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[y]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"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",fe]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",fe]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",fe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[Mo,fe]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"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",fe]}],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",fe]}],"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",fe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[gn,Cn,_i]}],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 ox=Bw(rx),Fa=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},ix=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),sx=e=>mn.function(e),Ne=(...e)=>ox(Nb(e)),Zf=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},Vi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Ir=b.forwardRef(function({as:t,...n},r){const o=t||"span";return x.jsx(o,{...n,ref:r})}),ax=Po("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring ease-normal",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-8 px-4 py-2 text-sm",min:"h-7 px-3 py-1 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-button",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",danger:"bg-button-danger-bg text-button-danger-text",disabled:"bg-disabled duration-700 opacity-70",info:"bg-button-info-bg text-button-info-text",loading:"animate-pulse bg-disabled duration-700 opacity-70",main:"bg-primary text-primary-foreground",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",secondary:"bg-button-secondary-bg text-button-secondary-text",success:"bg-button-success-bg text-button-success-text",warn:"bg-button-warn-bg text-button-warn-text","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Ar=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(Ir,{...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:Ne(ax({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),lx=Po("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{warn:"bg-warn",info:"bg-info",main:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),cx=Po("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),ux=b.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},l){return x.jsxs(Ir,{...a,ref:l,"data-theme":i,as:a.as??"span",className:Ne(cx({size:s,theme:i}),t),children:[n?x.jsx("span",{className:lx({theme:n})}):null,r,a.children]})}),Or=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),$i=b.createContext({}),Bi=b.createContext(null),La=typeof document<"u",ji=La?b.useLayoutEffect:b.useEffect,Jf=b.createContext({strict:!1}),Ri=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ed="data-"+Ri("framerAppearId"),fx={skipAnimations:!1,useManualTiming:!1};function dx(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,f=!1)=>{const d=f&&r?t:n;return u&&i.add(c),d.has(c)||d.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 Hi=["read","resolveKeyframes","update","preRender","render","postRender"],hx=40;function td(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Hi.reduce((g,w)=>(g[w]=dx(i),g),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:f,postRender:h}=s,d=()=>{const g=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(g-o.timestamp,hx),1),o.timestamp=g,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),f.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(d))},p=()=>{n=!0,r=!0,o.isProcessing||e(d)};return{schedule:Hi.reduce((g,w)=>{const y=s[w];return g[w]=(T,S=!1,E=!1)=>(n||p(),y.schedule(T,S,E)),g},{}),cancel:g=>{for(let w=0;w<Hi.length;w++)s[Hi[w]].cancel(g)},state:o,steps:s}}const{schedule:Na,cancel:ON}=td(queueMicrotask,!1);function kr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const nd=b.createContext({});let rd=!1;function px(e,t,n,r,o){const{visualElement:i}=b.useContext($i),s=b.useContext(Jf),a=b.useContext(Bi),l=b.useContext(Or).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,f=b.useContext(nd);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&gx(c.current,n,o,f),b.useInsertionEffect(()=>{u&&u.update(n,a)});const h=b.useRef(!!(n[ed]&&!window.HandoffComplete));return ji(()=>{u&&(u.updateFeatures(),Na.render(u.render),h.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&(h.current=!1,rd||(rd=!0,queueMicrotask(mx))))}),u}function mx(){window.HandoffComplete=!0}function gx(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:od(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&kr(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function od(e){if(e)return e.options.allowProjection!==!1?e.projection:od(e.parent)}function yx(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):kr(n)&&(n.current=r))},[t])}function Lo(e){return typeof e=="string"||Array.isArray(e)}function No(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const _a=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Va=["initial",..._a];function Wi(e){return No(e.animate)||Va.some(t=>Lo(e[t]))}function id(e){return!!(Wi(e)||e.variants)}function vx(e,t){if(Wi(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Lo(n)?n:void 0,animate:Lo(r)?r:void 0}}return e.inherit!==!1?t:{}}function bx(e){const{initial:t,animate:n}=vx(e,b.useContext($i));return b.useMemo(()=>({initial:t,animate:n}),[sd(t),sd(n)])}function sd(e){return Array.isArray(e)?e.join(" "):e}const ad={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"]},Dr={};for(const e in ad)Dr[e]={isEnabled:t=>ad[e].some(n=>!!t[n])};function wx(e){for(const t in e)Dr[t]={...Dr[t],...e[t]}}const _o=b.createContext({}),xx=Symbol.for("motionComponentSymbol"),ht=e=>e;let Mr=ht,Ft=ht;process.env.NODE_ENV!=="production"&&(Mr=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ft=(e,t)=>{if(!e)throw new Error(t)});function Sx({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&wx(e);function i(a,l){let c;const u={...b.useContext(Or),...a,layoutId:Tx(a)},{isStatic:f}=u,h=bx(a),d=r(a,f);if(!f&&La){Ex(u,e);const p=Cx(u);c=p.MeasureLayout,h.visualElement=px(o,d,u,t,p.ProjectionNode)}return x.jsxs($i.Provider,{value:h,children:[c&&h.visualElement?x.jsx(c,{visualElement:h.visualElement,...u}):null,n(o,a,yx(d,h.visualElement,l),d,f,h.visualElement)]})}const s=b.forwardRef(i);return s[xx]=o,s}function Tx({layoutId:e}){const t=b.useContext(_o).id;return t&&e!==void 0?t+"-"+e:e}function Ex(e,t){const n=b.useContext(Jf).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?Mr(!1,r):Ft(!1,r)}}function Cx(e){const{drag:t,layout:n}=Dr;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 Px(e){function t(r,o={}){return Sx(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 Ix=["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 $a(e){return typeof e!="string"||e.includes("-")?!1:!!(Ix.indexOf(e)>-1||/[A-Z]/u.test(e))}const zi={};function Ax(e){Object.assign(zi,e)}const Vo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],In=new Set(Vo);function ld(e,{layout:t,layoutId:n}){return In.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!zi[e]||e==="opacity")}const st=e=>!!(e&&e.getVelocity),Ox={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kx=Vo.length;function Dx(e,t,n){let r="";for(let o=0;o<kx;o++){const i=Vo[o];if(e[i]!==void 0){const s=Ox[i]||i;r+=`${s}(${e[i]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const cd=e=>t=>typeof t=="string"&&t.startsWith(e),ud=cd("--"),Mx=cd("var(--"),Ba=e=>Mx(e)?Fx.test(e.split("/*")[0].trim()):!1,Fx=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Lx=(e,t)=>t&&typeof e=="number"?t.transform(e):e,An=(e,t,n)=>n>t?t:n<e?e:n,Fr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$o={...Fr,transform:e=>An(0,1,e)},Gi={...Fr,default:1},Bo=e=>Math.round(e*1e5)/1e5,ja=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Nx=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,_x=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function jo(e){return typeof e=="string"}function Vx(e){return e==null}const Ro=e=>({test:t=>jo(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),On=Ro("deg"),Xt=Ro("%"),le=Ro("px"),$x=Ro("vh"),Bx=Ro("vw"),fd={...Xt,parse:e=>Xt.parse(e)/100,transform:e=>Xt.transform(e*100)},dd={...Fr,transform:Math.round},hd={borderWidth:le,borderTopWidth:le,borderRightWidth:le,borderBottomWidth:le,borderLeftWidth:le,borderRadius:le,radius:le,borderTopLeftRadius:le,borderTopRightRadius:le,borderBottomRightRadius:le,borderBottomLeftRadius:le,width:le,maxWidth:le,height:le,maxHeight:le,size:le,top:le,right:le,bottom:le,left:le,padding:le,paddingTop:le,paddingRight:le,paddingBottom:le,paddingLeft:le,margin:le,marginTop:le,marginRight:le,marginBottom:le,marginLeft:le,rotate:On,rotateX:On,rotateY:On,rotateZ:On,scale:Gi,scaleX:Gi,scaleY:Gi,scaleZ:Gi,skew:On,skewX:On,skewY:On,distance:le,translateX:le,translateY:le,translateZ:le,x:le,y:le,z:le,perspective:le,transformPerspective:le,opacity:$o,originX:fd,originY:fd,originZ:le,zIndex:dd,backgroundPositionX:le,backgroundPositionY:le,fillOpacity:$o,strokeOpacity:$o,numOctaves:dd};function Ra(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 f=t[u];if(ud(u)){o[u]=f;continue}const h=hd[u],d=Lx(f,h);if(In.has(u)){if(a=!0,i[u]=d,!c)continue;f!==(h.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,s[u]=d):r[u]=d}if(t.transform||(a||n?r.transform=Dx(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:h=0}=s;r.transformOrigin=`${u} ${f} ${h}`}}const Ha=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function pd(e,t,n){for(const r in t)!st(t[r])&&!ld(r,n)&&(e[r]=t[r])}function jx({transformTemplate:e},t){return b.useMemo(()=>{const n=Ha();return Ra(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Rx(e,t){const n=e.style||{},r={};return pd(r,n,e),Object.assign(r,jx(e,t)),r}function Hx(e,t){const n={},r=Rx(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 Wx=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 Ui(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Wx.has(e)}let md=e=>!Ui(e);function gd(e){e&&(md=t=>t.startsWith("on")?!Ui(t):e(t))}try{gd(require("@emotion/is-prop-valid").default)}catch{}function zx(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(md(o)||n===!0&&Ui(o)||!t&&!Ui(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function yd(e,t,n){return typeof e=="string"?e:le.transform(t+n*e)}function Gx(e,t,n){const r=yd(t,e.x,e.width),o=yd(n,e.y,e.height);return`${r} ${o}`}const Ux={offset:"stroke-dashoffset",array:"stroke-dasharray"},Yx={offset:"strokeDashoffset",array:"strokeDasharray"};function qx(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Ux:Yx;e[i.offset]=le.transform(-r);const s=le.transform(t),a=le.transform(n);e[i.array]=`${s} ${a}`}function Wa(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,f){if(Ra(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:d,dimensions:p}=e;h.transform&&(p&&(d.transform=h.transform),delete h.transform),p&&(o!==void 0||i!==void 0||d.transform)&&(d.transformOrigin=Gx(p,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&qx(h,s,a,l,!1)}const vd=()=>({...Ha(),attrs:{}}),za=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Kx(e,t,n,r){const o=b.useMemo(()=>{const i=vd();return Wa(i,t,za(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};pd(i,e.style,e),o.style={...i,...o.style}}return o}function Xx(e=!1){return(n,r,o,{latestValues:i},s)=>{const l=($a(n)?Kx:Hx)(r,i,s,n),c=zx(r,typeof n=="string",e),u=n!==b.Fragment?{...c,...l,ref:o}:{},{children:f}=r,h=b.useMemo(()=>st(f)?f.get():f,[f]);return b.createElement(n,{...u,children:h})}}function bd(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 wd=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 xd(e,t,n,r){bd(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(wd.has(o)?o:Ri(o),t.attrs[o])}function Ga(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(st(o[s])||t.style&&st(t.style[s])||ld(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 Sd(e,t,n){const r=Ga(e,t,n);for(const o in e)if(st(e[o])||st(t[o])){const i=Vo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}function Td(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ua(e,t,n,r){if(typeof t=="function"){const[o,i]=Td(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]=Td(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function Qt(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ya=e=>Array.isArray(e),Qx=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Zx=e=>Ya(e)?e[e.length-1]||0:e;function Yi(e){const t=st(e)?e.get():e;return Qx(t)?t.toValue():t}const Ed=new Set(["opacity","clipPath","filter","transform"]);function Cd(e){if(In.has(e))return"transform";if(Ed.has(e))return Ri(e)}function qi(e,t){e.indexOf(t)===-1&&e.push(t)}function Ho(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function Jx([...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 e1({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,i,s,a){const l={latestValues:n1(o,i,s,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Pd=e=>(t,n)=>{const r=b.useContext($i),o=b.useContext(Bi),i=()=>e1(e,t,r,o,n);return n?i():Qt(i)};function t1(e,t){const n=Cd(t);n&&qi(e,n)}function Id(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const i=Ua(e,r[o]);if(i){const{transitionEnd:s,transition:a,...l}=i;n(l,s)}}}function n1(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 v in c)s[v]=Yi(c[v]);let{initial:u,animate:f}=e;const h=Wi(e),d=id(e);t&&d&&!h&&e.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?f:u;return m&&typeof m!="boolean"&&!No(m)&&Id(e,m,(v,g)=>{for(const w in v){let y=v[w];if(Array.isArray(y)){const T=p?y.length-1:0;y=y[T]}y!==null&&(s[w]=y)}for(const w in g)s[w]=g[w]}),l&&(f&&u!==!1&&!No(f)&&Id(e,f,v=>{for(const g in v)t1(a,g)}),a.length&&(s.willChange=a.join(","))),s}const{schedule:Se,cancel:Zt,state:pt,steps:qa}=td(typeof requestAnimationFrame<"u"?requestAnimationFrame:ht,!0),r1={useVisualState:Pd({scrapeMotionValuesFromProps:Sd,createRenderState:vd,onMount:(e,t,{renderState:n,latestValues:r})=>{Se.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Se.render(()=>{Wa(n,r,za(t.tagName),e.transformTemplate),xd(t,n)})}})},o1={useVisualState:Pd({applyWillChange:!0,scrapeMotionValuesFromProps:Ga,createRenderState:Ha})};function i1(e,{forwardMotionProps:t=!1},n,r){return{...$a(e)?r1:o1,preloadedFeatures:n,useRender:Xx(t),createVisualElement:r,Component:e}}function yn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Ad=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 s1=e=>t=>Ad(t)&&e(t,Ki(t));function vn(e,t,n,r){return yn(e,t,s1(n),r)}const a1=(e,t)=>n=>t(e(n)),bn=(...e)=>e.reduce(a1);function Od(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const kd=Od("dragHorizontal"),Dd=Od("dragVertical");function Md(e){let t=!1;if(e==="y")t=Dd();else if(e==="x")t=kd();else{const n=kd(),r=Dd();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Fd(){const e=Md(!0);return e?(e(),!1):!0}class kn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Ld(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||Fd())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Se.postRender(()=>l(i,s))};return vn(e.current,n,o,{passive:!e.getProps()[r]})}class l1 extends kn{mount(){this.unmount=bn(Ld(this.node,!0),Ld(this.node,!1))}unmount(){}}class c1 extends kn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=bn(yn(this.node.current,"focus",()=>this.onFocus()),yn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Nd=(e,t)=>t?e===t?!0:Nd(e,t.parentElement):!1;function Ka(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ki(n))}class u1 extends kn{constructor(){super(...arguments),this.removeStartListeners=ht,this.removeEndListeners=ht,this.removeAccessibleListeners=ht,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=vn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),h=!f&&!Nd(this.node.current,a.target)?u:c;h&&Se.update(()=>h(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=vn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=bn(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()||Ka("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Se.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=yn(this.node.current,"keyup",s),Ka("down",(a,l)=>{this.startPress(a,l)})},n=yn(this.node.current,"keydown",t),r=()=>{this.isPressing&&Ka("cancel",(i,s)=>this.cancelPress(i,s))},o=yn(this.node.current,"blur",r);this.removeAccessibleListeners=bn(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&&Se.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Fd()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Se.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=vn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=yn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=bn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Xa=new WeakMap,Qa=new WeakMap,f1=e=>{const t=Xa.get(e.target);t&&t(e)},d1=e=>{e.forEach(f1)};function h1({root:e,...t}){const n=e||document;Qa.has(n)||Qa.set(n,{});const r=Qa.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(d1,{root:e,...t})),r[o]}function p1(e,t,n){const r=h1(t);return Xa.set(e,n),r.observe(e),()=>{Xa.delete(e),r.unobserve(e)}}const m1={some:0,all:1};class g1 extends kn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:m1[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:f}=this.node.getProps(),h=c?u:f;h&&h(l)};return p1(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(y1(t,n))&&this.startObserver()}unmount(){}}function y1({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const v1={inView:{Feature:g1},tap:{Feature:u1},focus:{Feature:c1},hover:{Feature:l1}};function _d(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 Xi(e,t,n){const r=e.getProps();return Ua(r,t,n!==void 0?n:r.custom,e)}const Jt=e=>e*1e3,en=e=>e/1e3,b1={type:"spring",stiffness:500,damping:25,restSpeed:10},w1=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),x1={type:"keyframes",duration:.8},S1={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},T1=(e,{keyframes:t})=>t.length>2?x1:In.has(e)?e.startsWith("scale")?w1(t[1]):b1:S1;function E1({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 Za(e,t){return e[t]||e.default||e}const C1=e=>e!==null;function Qi(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(C1),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let Zi;function P1(){Zi=void 0}const Dn={now:()=>(Zi===void 0&&Dn.set(pt.isProcessing||fx.useManualTiming?pt.timestamp:performance.now()),Zi),set:e=>{Zi=e,queueMicrotask(P1)}},Vd=e=>/^0[^.\s]+$/u.test(e);function I1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Vd(e):!0}const $d=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),A1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function O1(e){const t=A1.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const k1=4;function Bd(e,t,n=1){Ft(n<=k1,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=O1(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return $d(s)?parseFloat(s):s}return Ba(o)?Bd(o,t,n+1):o}const D1=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),jd=e=>e===Fr||e===le,Rd=(e,t)=>parseFloat(e.split(", ")[t]),Hd=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Rd(o[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Rd(i[1],e):0}},M1=new Set(["x","y","z"]),F1=Vo.filter(e=>!M1.has(e));function L1(e){const t=[];return F1.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Lr={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:Hd(4,13),y:Hd(5,14)};Lr.translateX=Lr.x,Lr.translateY=Lr.y;const Wd=e=>t=>t.test(e),zd=[Fr,le,Xt,On,Bx,$x,{test:e=>e==="auto",parse:e=>e}],Gd=e=>zd.find(Wd(e)),Zn=new Set;let Ja=!1,el=!1;function Ud(){if(el){const e=Array.from(Zn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=L1(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)})}el=!1,Ja=!1,Zn.forEach(e=>e.complete()),Zn.clear()}function Yd(){Zn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(el=!0)})}function N1(){Yd(),Ud()}class tl{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?(Zn.add(this),Ja||(Ja=!0,Se.read(Yd),Se.resolveKeyframes(Ud))):(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),Zn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Zn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const nl=(e,t)=>n=>!!(jo(n)&&_x.test(n)&&n.startsWith(e)||t&&!Vx(n)&&Object.prototype.hasOwnProperty.call(n,t)),qd=(e,t,n)=>r=>{if(!jo(r))return r;const[o,i,s,a]=r.match(ja);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},_1=e=>An(0,255,e),rl={...Fr,transform:e=>Math.round(_1(e))},Jn={test:nl("rgb","red"),parse:qd("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+rl.transform(e)+", "+rl.transform(t)+", "+rl.transform(n)+", "+Bo($o.transform(r))+")"};function V1(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 ol={test:nl("#"),parse:V1,transform:Jn.transform},Nr={test:nl("hsl","hue"),parse:qd("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Xt.transform(Bo(t))+", "+Xt.transform(Bo(n))+", "+Bo($o.transform(r))+")"},wt={test:e=>Jn.test(e)||ol.test(e)||Nr.test(e),parse:e=>Jn.test(e)?Jn.parse(e):Nr.test(e)?Nr.parse(e):ol.parse(e),transform:e=>jo(e)?e:e.hasOwnProperty("red")?Jn.transform(e):Nr.transform(e)};function $1(e){var t,n;return isNaN(e)&&jo(e)&&(((t=e.match(ja))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Nx))===null||n===void 0?void 0:n.length)||0)>0}const Kd="number",Xd="color",B1="var",j1="var(",Qd="${}",R1=/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 Wo(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(R1,l=>(wt.test(l)?(r.color.push(i),o.push(Xd),n.push(wt.parse(l))):l.startsWith(j1)?(r.var.push(i),o.push(B1),n.push(l)):(r.number.push(i),o.push(Kd),n.push(parseFloat(l))),++i,Qd)).split(Qd);return{values:n,split:a,indexes:r,types:o}}function Zd(e){return Wo(e).values}function Jd(e){const{split:t,types:n}=Wo(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===Kd?i+=Bo(o[s]):a===Xd?i+=wt.transform(o[s]):i+=o[s]}return i}}const H1=e=>typeof e=="number"?0:e;function W1(e){const t=Zd(e);return Jd(e)(t.map(H1))}const Mn={test:$1,parse:Zd,createTransformer:Jd,getAnimatableNone:W1},z1=new Set(["brightness","contrast","saturate","opacity"]);function G1(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ja)||[];if(!r)return e;const o=n.replace(r,"");let i=z1.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const U1=/\b([a-z-]*)\(.*?\)/gu,il={...Mn,getAnimatableNone:e=>{const t=e.match(U1);return t?t.map(G1).join(" "):e}},Y1={...hd,color:wt,backgroundColor:wt,outlineColor:wt,fill:wt,stroke:wt,borderColor:wt,borderTopColor:wt,borderRightColor:wt,borderBottomColor:wt,borderLeftColor:wt,filter:il,WebkitFilter:il},sl=e=>Y1[e];function eh(e,t){let n=sl(e);return n!==il&&(n=Mn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const q1=new Set(["auto","none","0"]);function K1(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!q1.has(i)&&Wo(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=eh(n,o)}class th extends tl{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(),Ba(c))){const u=Bd(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!D1.has(r)||t.length!==2)return;const[o,i]=t,s=Gd(o),a=Gd(i);if(s!==a)if(jd(s)&&jd(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++)I1(t[o])&&r.push(o);r.length&&K1(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Lr[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]=Lr[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 nh(e){let t;return()=>(t===void 0&&(t=e()),t)}const rh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Mn.test(e)||e==="0")&&!e.startsWith("url("));function X1(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 Q1(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=rh(o,t),a=rh(i,t);return Mr(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:X1(e)||n==="spring"&&r}class oh{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&&N1(),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&&!Q1(t,r,o,i))if(s)this.options.duration=0;else{l==null||l(Qi(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 ih(e,t){return t?e*(1e3/t):0}const Z1=5;function sh(e,t,n){const r=Math.max(t-Z1,0);return ih(n-e(r),t-r)}const al=.001,J1=.01,ah=10,eS=.05,tS=1;function nS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;Mr(e<=Jt(ah),"Spring duration must be 10 seconds or less");let s=1-t;s=An(eS,tS,s),e=An(J1,ah,en(e)),s<1?(o=c=>{const u=c*s,f=u*e,h=u-n,d=ll(c,s),p=Math.exp(-f);return al-h/d*p},i=c=>{const f=c*s*e,h=f*n+n,d=Math.pow(s,2)*Math.pow(c,2)*e,p=Math.exp(-f),m=ll(Math.pow(c,2),s);return(-o(c)+al>0?-1:1)*((h-d)*p)/m}):(o=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-al+u*f},i=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const a=5/e,l=oS(o,i,a);if(e=Jt(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 rS=12;function oS(e,t,n){let r=n;for(let o=1;o<rS;o++)r=r-e(r)/t(r);return r}function ll(e,t){return e*Math.sqrt(1-t*t)}const iS=["duration","bounce"],sS=["stiffness","damping","mass"];function lh(e,t){return t.some(n=>e[n]!==void 0)}function aS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!lh(e,sS)&&lh(e,iS)){const n=nS(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function cl({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:f,isResolvedFromDuration:h}=aS({...r,velocity:-en(r.velocity||0)}),d=f||0,p=l/(2*Math.sqrt(a*c)),m=i-o,v=en(Math.sqrt(a/c)),g=Math.abs(m)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let w;if(p<1){const y=ll(v,p);w=T=>{const S=Math.exp(-p*v*T);return i-S*((d+p*v*m)/y*Math.sin(y*T)+m*Math.cos(y*T))}}else if(p===1)w=y=>i-Math.exp(-v*y)*(m+(d+v*m)*y);else{const y=v*Math.sqrt(p*p-1);w=T=>{const S=Math.exp(-p*v*T),E=Math.min(y*T,300);return i-S*((d+p*v*m)*Math.sinh(E)+y*m*Math.cosh(E))/y}}return{calculatedDuration:h&&u||null,next:y=>{const T=w(y);if(h)s.done=y>=u;else{let S=d;y!==0&&(p<1?S=sh(w,y,T):S=0);const E=Math.abs(S)<=n,A=Math.abs(i-T)<=t;s.done=E&&A}return s.value=s.done?i:T,s}}}function ch({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 f=e[0],h={done:!1,value:f},d=P=>a!==void 0&&P<a||l!==void 0&&P>l,p=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let m=n*t;const v=f+m,g=s===void 0?v:s(v);g!==v&&(m=g-f);const w=P=>-m*Math.exp(-P/r),y=P=>g+w(P),T=P=>{const O=w(P),C=y(P);h.done=Math.abs(O)<=c,h.value=h.done?g:C};let S,E;const A=P=>{d(h.value)&&(S=P,E=cl({keyframes:[h.value,p(h.value)],velocity:sh(y,P,h.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return A(0),{calculatedDuration:null,next:P=>{let O=!1;return!E&&S===void 0&&(O=!0,T(P),A(P)),S!==void 0&&P>=S?E.next(P-S):(!O&&T(P),h)}}}const uh=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,lS=1e-7,cS=12;function uS(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=uh(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>lS&&++a<cS);return s}function zo(e,t,n,r){if(e===t&&n===r)return ht;const o=i=>uS(i,0,1,e,n);return i=>i===0||i===1?i:uh(o(i),t,r)}const fS=zo(.42,0,1,1),dS=zo(0,0,.58,1),fh=zo(.42,0,.58,1),dh=e=>Array.isArray(e)&&typeof e[0]!="number",hh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ph=e=>t=>1-e(1-t),ul=e=>1-Math.sin(Math.acos(e)),mh=ph(ul),hS=hh(ul),gh=zo(.33,1.53,.69,.99),fl=ph(gh),pS=hh(fl),yh={linear:ht,easeIn:fS,easeInOut:fh,easeOut:dS,circIn:ul,circInOut:hS,circOut:mh,backIn:fl,backInOut:pS,backOut:gh,anticipate:e=>(e*=2)<1?.5*fl(e):.5*(2-Math.pow(2,-10*(e-1)))},dl=e=>{if(Array.isArray(e)){Ft(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return zo(t,n,r,o)}else if(typeof e=="string")return Ft(yh[e]!==void 0,`Invalid easing type '${e}'`),yh[e];return e},_r=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},$e=(e,t,n)=>e+(t-e)*n;function hl(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 mS({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=hl(l,a,e+1/3),i=hl(l,a,e),s=hl(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function Ji(e,t){return n=>n>0?t:e}const pl=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},gS=[ol,Jn,Nr],yS=e=>gS.find(t=>t.test(e));function vh(e){const t=yS(e);if(Mr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Nr&&(n=mS(n)),n}const bh=(e,t)=>{const n=vh(e),r=vh(t);if(!n||!r)return Ji(e,t);const o={...n};return i=>(o.red=pl(n.red,r.red,i),o.green=pl(n.green,r.green,i),o.blue=pl(n.blue,r.blue,i),o.alpha=$e(n.alpha,r.alpha,i),Jn.transform(o))},ml=new Set(["none","hidden"]);function vS(e,t){return ml.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function bS(e,t){return n=>$e(e,t,n)}function gl(e){return typeof e=="number"?bS:typeof e=="string"?Ba(e)?Ji:wt.test(e)?bh:SS:Array.isArray(e)?wh:typeof e=="object"?wt.test(e)?bh:wS:Ji}function wh(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>gl(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function wS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=gl(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function xS(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 SS=(e,t)=>{const n=Mn.createTransformer(t),r=Wo(e),o=Wo(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?ml.has(e)&&!o.values.length||ml.has(t)&&!r.values.length?vS(e,t):bn(wh(xS(r,o),o.values),n):(Mr(!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.`),Ji(e,t))};function xh(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?$e(e,t,n):gl(e)(e,t)}function TS(e,t,n){const r=[],o=n||xh,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]||ht:t;a=bn(l,a)}r.push(a)}return r}function Sh(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Ft(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=TS(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 f=_r(e[u],e[u+1],c);return s[u](f)};return n?c=>l(An(e[0],e[i-1],c)):l}function Th(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=_r(0,t,r);e.push($e(n,1,o))}}function Eh(e){const t=[0];return Th(t,e.length-1),t}function ES(e,t){return e.map(n=>n*t)}function CS(e,t){return e.map(()=>t||fh).splice(0,e.length-1)}function es({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=dh(r)?r.map(dl):dl(r),i={done:!1,value:t[0]},s=ES(n&&n.length===t.length?n:Eh(t),e),a=Sh(s,t,{ease:Array.isArray(o)?o:CS(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const yl=2e4;function Ch(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<yl;)t+=n,r=e.next(t);return t>=yl?1/0:t}const PS=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Se.update(t,!0),stop:()=>Zt(t),now:()=>pt.isProcessing?pt.timestamp:Dn.now()}},IS={decay:ch,inertia:ch,tween:es,keyframes:es,spring:cl},AS=e=>e/100;class vl extends oh{constructor({KeyframeResolver:t=tl,...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=IS[n]||es;let l,c;a!==es&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Ft(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=bn(AS,xh(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=Ch(u));const{calculatedDuration:f}=u,h=f+o,d=h*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:h,totalDuration:d}}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:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),w=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let y=this.currentTime,T=i;if(d){const P=Math.min(this.currentTime,u)/f;let O=Math.floor(P),C=P%1;!C&&P>=1&&(C=1),C===1&&O--,O=Math.min(O,d+1),!!(O%2)&&(p==="reverse"?(C=1-C,m&&(C-=m/f)):p==="mirror"&&(T=s)),y=An(0,1,C)*f}const S=w?{done:!1,value:l[0]}:T.next(y);a&&(S.value=a(S.value));let{done:E}=S;!w&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return A&&o!==void 0&&(S.value=Qi(l,this.options,o)),v&&v(S.value),A&&this.finish(),S}get duration(){const{resolved:t}=this;return t?en(t.calculatedDuration):0}get time(){return en(this.currentTime)}set time(t){t=Jt(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=en(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=PS,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 Ph=e=>Array.isArray(e)&&typeof e[0]=="number";function Ih(e){return!!(!e||typeof e=="string"&&e in bl||Ph(e)||Array.isArray(e)&&e.every(Ih))}const Go=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,bl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Go([0,.65,.55,1]),circOut:Go([.55,0,1,.45]),backIn:Go([.31,.01,.66,-.59]),backOut:Go([.33,1.53,.69,.99])};function OS(e){return Ah(e)||bl.easeOut}function Ah(e){if(e)return Ph(e)?Go(e):Array.isArray(e)?e.map(OS):bl[e]}function kS(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=Ah(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 DS=nh(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ts=10,MS=2e4;function FS(e){return e.type==="spring"||!Ih(e.ease)}function LS(e,t){const n=new vl({...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<MS;)r=n.sample(i),o.push(r.value),i+=ts;return{times:void 0,keyframes:o,duration:i-ts,ease:"linear"}}class Oh extends oh{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new th(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(FS(this.options)){const{onComplete:f,onUpdate:h,motionValue:d,...p}=this.options,m=LS(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=kS(l.owner.current,c,t,{...this.options,duration:o,times:i,ease:s});return u.startTime=Dn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(Qi(t,this.options,n)),f&&f(),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 en(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return en(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Jt(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 ht;const{animation:r}=n;r.timeline=t,r.onfinish=null}return ht}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;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:f,...h}=this.options,d=new vl({...h,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),p=Jt(this.time);c.setWithVelocity(d.sample(p-ts).value,d.sample(p).value,ts)}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 DS()&&r&&Ed.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function NS(e,t){let n;const r=()=>{const{currentTime:o}=t,s=(o===null?0:o.value)/100;n!==s&&e(s),n=s};return Se.update(r,!0),()=>Zt(r)}const _S=nh(()=>window.ScrollTimeline!==void 0);class wl{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(_S()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),NS(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 xl=(e,t,n,r={},o,i,s)=>a=>{const l=Za(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Jt(c);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:d=>{t.set(d),l.onUpdate&&l.onUpdate(d)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:i?void 0:o};E1(l)||(f={...f,...T1(e,f)}),f.duration&&(f.duration=Jt(f.duration)),f.repeatDelay&&(f.repeatDelay=Jt(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let h=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(h=!0)),h&&!i&&t.get()!==void 0){const d=Qi(f.keyframes,l);if(d!==void 0)return Se.update(()=>{f.onUpdate(d),f.onComplete()}),new wl([])}return!i&&Oh.supports(f)?new Oh(f):new vl(f)};class Sl{constructor(){this.subscriptions=[]}add(t){return qi(this.subscriptions,t),()=>Ho(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 kh=new Set;function Tl(e,t,n){e||kh.has(t)||(console.warn(t),kh.add(t))}const Dh=30,VS=e=>!isNaN(parseFloat(e)),Uo={current:void 0};class Mh{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Dn.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=Dn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=VS(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Tl(!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 Sl);const r=this.events[t].add(n);return t==="change"?()=>{r(),Se.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 Uo.current&&Uo.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Dn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Dh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Dh);return ih(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 Vr(e,t){return new Mh(e,t)}function $S(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Vr(n))}function BS(e,t){const n=Xi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=Zx(i[s]);$S(e,s,a)}}function Fh(e){return e.getProps()[ed]}class jS extends Mh{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=Cd(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&&(Ho(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function RS(e){return!!(st(e)&&e.add)}function El(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 jS("auto"),e.addValue("willChange",r)),RS(r))return r.add(t)}function HS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Cl(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 f in l){const h=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),d=l[f];if(d===void 0||u&&HS(u,f))continue;const p={delay:n,elapsed:0,...Za(s||{},f)};let m=!1;if(window.HandoffAppearAnimations){const g=Fh(e);if(g){const w=window.HandoffAppearAnimations(g,f,h,Se);w!==null&&(p.elapsed=w,m=!0)}}h.start(xl(f,h,d,e.shouldReduceMotion&&In.has(f)?{type:!1}:p,e,m,El(e,f)));const v=h.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{Se.update(()=>{a&&BS(e,a)})}),c}function Pl(e,t,n={}){var r;const o=Xi(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(Cl(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=i;return WS(e,t,u+c,f,h,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 WS(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(zS).forEach((c,u)=>{c.notify("AnimationStart",t),s.push(Pl(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function zS(e,t){return e.sortNodePosition(t)}function GS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Pl(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Pl(e,t,n);else{const o=typeof t=="function"?Xi(e,t,n.custom):t;r=Promise.all(Cl(e,o,n))}return r.then(()=>{Se.postRender(()=>{e.notify("AnimationComplete",t)})})}const US=[..._a].reverse(),YS=_a.length;function qS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>GS(e,n,r)))}function KS(e){let t=qS(e),n=Lh(),r=!0;const o=l=>(c,u)=>{var f;const h=Xi(e,u,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:d,transitionEnd:p,...m}=h;c={...c,...m,...p}}return c};function i(l){t=l(e)}function s(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},f=[],h=new Set;let d={},p=1/0;for(let v=0;v<YS;v++){const g=US[v],w=n[g],y=c[g]!==void 0?c[g]:u[g],T=Lo(y),S=g===l?w.isActive:null;S===!1&&(p=v);let E=y===u[g]&&y!==c[g]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...d},!w.isActive&&S===null||!y&&!w.prevProp||No(y)||typeof y=="boolean")continue;let P=XS(w.prevProp,y)||g===l&&w.isActive&&!E&&T||v>p&&T,O=!1;const C=Array.isArray(y)?y:[y];let _=C.reduce(o(g),{});S===!1&&(_={});const{prevResolvedValues:F={}}=w,V={...F,..._},I=D=>{P=!0,h.has(D)&&(O=!0,h.delete(D)),w.needsAnimating[D]=!0;const L=e.getValue(D);L&&(L.liveStyle=!1)};for(const D in V){const L=_[D],$=F[D];if(d.hasOwnProperty(D))continue;let z=!1;Ya(L)&&Ya($)?z=!_d(L,$):z=L!==$,z?L!=null?I(D):h.add(D):L!==void 0&&h.has(D)?I(D):w.protectedKeys[D]=!0}w.prevProp=y,w.prevResolvedValues=_,w.isActive&&(d={...d,..._}),r&&e.blockInitialAnimation&&(P=!1),P&&(!E||O)&&f.push(...C.map(D=>({animation:D,options:{type:g}})))}if(h.size){const v={};h.forEach(g=>{const w=e.getBaseTarget(g),y=e.getValue(g);y&&(y.liveStyle=!0),v[g]=w??null}),f.push({animation:v})}let m=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):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(h=>{var d;return(d=h.animationState)===null||d===void 0?void 0:d.setActive(l,c)}),n[l].isActive=c;const f=s(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Lh(),r=!0}}}function XS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!_d(t,e):!1}function er(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Lh(){return{animate:er(!0),whileInView:er(),whileHover:er(),whileTap:er(),whileDrag:er(),whileFocus:er(),exit:er()}}class QS extends kn{constructor(t){super(t),t.animationState||(t.animationState=KS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();No(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 ZS=0;class JS extends kn{constructor(){super(...arguments),this.id=ZS++}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 eT={animation:{Feature:QS},exit:{Feature:JS}},Nh=(e,t)=>Math.abs(e-t);function tT(e,t){const n=Nh(e.x,t.x),r=Nh(e.y,t.y);return Math.sqrt(n**2+r**2)}class _h{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 f=Al(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=tT(f.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:p}=f,{timestamp:m}=pt;this.history.push({...p,timestamp:m});const{onStart:v,onMove:g}=this.handlers;h||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Il(h,this.transformPagePoint),Se.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Al(f.type==="pointercancel"?this.lastMoveEventInfo:Il(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(f,v),p&&p(f,v)},!Ad(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=Ki(t),a=Il(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=pt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Al(a,this.history)),this.removeListeners=bn(vn(this.contextWindow,"pointermove",this.handlePointerMove),vn(this.contextWindow,"pointerup",this.handlePointerUp),vn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zt(this.updatePoint)}}function Il(e,t){return t?{point:t(e.point)}:e}function Vh(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Al({point:e},t){return{point:e,delta:Vh(e,$h(t)),offset:Vh(e,nT(t)),velocity:rT(t,.1)}}function nT(e){return e[0]}function $h(e){return e[e.length-1]}function rT(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=$h(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Jt(t)));)n--;if(!r)return{x:0,y:0};const i=en(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 Bh=1e-4,oT=1-Bh,iT=1+Bh,jh=.01,sT=0-jh,aT=0+jh;function Lt(e){return e.max-e.min}function lT(e,t,n){return Math.abs(e-t)<=n}function Rh(e,t,n,r=.5){e.origin=r,e.originPoint=$e(t.min,t.max,e.origin),e.scale=Lt(n)/Lt(t),e.translate=$e(n.min,n.max,e.origin)-e.originPoint,(e.scale>=oT&&e.scale<=iT||isNaN(e.scale))&&(e.scale=1),(e.translate>=sT&&e.translate<=aT||isNaN(e.translate))&&(e.translate=0)}function Yo(e,t,n,r){Rh(e.x,t.x,n.x,r?r.originX:void 0),Rh(e.y,t.y,n.y,r?r.originY:void 0)}function Hh(e,t,n){e.min=n.min+t.min,e.max=e.min+Lt(t)}function cT(e,t,n){Hh(e.x,t.x,n.x),Hh(e.y,t.y,n.y)}function Wh(e,t,n){e.min=t.min-n.min,e.max=e.min+Lt(t)}function qo(e,t,n){Wh(e.x,t.x,n.x),Wh(e.y,t.y,n.y)}function uT(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?$e(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?$e(n,e,r.max):Math.min(e,n)),e}function zh(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 fT(e,{top:t,left:n,bottom:r,right:o}){return{x:zh(e.x,n,o),y:zh(e.y,t,r)}}function Gh(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 dT(e,t){return{x:Gh(e.x,t.x),y:Gh(e.y,t.y)}}function hT(e,t){let n=.5;const r=Lt(e),o=Lt(t);return o>r?n=_r(t.min,t.max-r,e.min):r>o&&(n=_r(e.min,e.max-o,t.min)),An(0,1,n)}function pT(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 Ol=.35;function mT(e=Ol){return e===!1?e=0:e===!0&&(e=Ol),{x:Uh(e,"left","right"),y:Uh(e,"top","bottom")}}function Uh(e,t,n){return{min:Yh(e,t),max:Yh(e,n)}}function Yh(e,t){return typeof e=="number"?e:e[t]||0}const qh=()=>({translate:0,scale:1,origin:0,originPoint:0}),$r=()=>({x:qh(),y:qh()}),Kh=()=>({min:0,max:0}),Ze=()=>({x:Kh(),y:Kh()});function jt(e){return[e("x"),e("y")]}function Xh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function gT({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function yT(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 kl(e){return e===void 0||e===1}function Dl({scale:e,scaleX:t,scaleY:n}){return!kl(e)||!kl(t)||!kl(n)}function tr(e){return Dl(e)||Qh(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Qh(e){return Zh(e.x)||Zh(e.y)}function Zh(e){return e&&e!=="0%"}function ns(e,t,n){const r=e-n,o=t*r;return n+o}function Jh(e,t,n,r,o){return o!==void 0&&(e=ns(e,o,r)),ns(e,n,r)+t}function Ml(e,t=0,n=1,r,o){e.min=Jh(e.min,t,n,r,o),e.max=Jh(e.max,t,n,r,o)}function ep(e,{x:t,y:n}){Ml(e.x,t.translate,t.scale,t.originPoint),Ml(e.y,n.translate,n.scale,n.originPoint)}const tp=.999999999999,np=1.0000000000001;function vT(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&&Br(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,ep(e,s)),r&&tr(i.latestValues)&&Br(e,i.latestValues))}t.x<np&&t.x>tp&&(t.x=1),t.y<np&&t.y>tp&&(t.y=1)}function Fn(e,t){e.min=e.min+t,e.max=e.max+t}function rp(e,t,n,r,o=.5){const i=$e(e.min,e.max,o);Ml(e,t,n,i,r)}function Br(e,t){rp(e.x,t.x,t.scaleX,t.scale,t.originX),rp(e.y,t.y,t.scaleY,t.scale,t.originY)}function op(e,t){return Xh(yT(e.getBoundingClientRect(),t))}function bT(e,t,n){const r=op(e,n),{scroll:o}=t;return o&&(Fn(r.x,o.offset.x),Fn(r.y,o.offset.y)),r}const ip=({current:e})=>e?e.ownerDocument.defaultView:null,wT=new WeakMap;class xT{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=Ze(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ki(u,"page").point)},i=(u,f)=>{var h;const{drag:d,dragPropagation:p,onDragStart:m}=this.getProps();if(d&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Md(d),!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),jt(g=>{let w=this.getAxisMotionValue(g).get()||0;if(Xt.test(w)){const{projection:y}=this.visualElement;if(y&&y.layout){const T=y.layout.layoutBox[g];T&&(w=Lt(T)*(parseFloat(w)/100))}}this.originPoint[g]=w}),m&&Se.postRender(()=>m(u,f)),(h=this.removeWillChange)===null||h===void 0||h.call(this),this.removeWillChange=El(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},s=(u,f)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:v}=f;if(d&&this.currentDirection===null){this.currentDirection=ST(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),m&&m(u,f)},a=(u,f)=>this.stop(u,f),l=()=>jt(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new _h(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:ip(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&&Se.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=uT(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&&kr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=fT(o.layoutBox,n):this.constraints=!1,this.elastic=mT(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&jt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=pT(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!kr(t))return!1;const r=t.current;Ft(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=bT(r,o.root,this.visualElement.getTransformPagePoint());let s=dT(o.layout.layoutBox,i);if(n){const a=n(gT(s));this.hasMutatedConstraints=!!a,a&&(s=Xh(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=jt(u=>{if(!rs(u,n,this.currentDirection))return;let f=l&&l[u]||{};s&&(f={min:0,max:0});const h=o?200:1e6,d=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(xl(t,r,0,n,this.visualElement,!1,El(this.visualElement,t)))}stopAnimation(){jt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){jt(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){jt(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]-$e(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!kr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};jt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=hT({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(),jt(s=>{if(!rs(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set($e(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;wT.set(this.visualElement,this);const t=this.visualElement.current,n=vn(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();kr(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()),Se.read(r);const s=yn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(jt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.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=Ol,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 ST(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class TT extends kn{constructor(t){super(t),this.removeGroupControls=ht,this.removeListeners=ht,this.controls=new xT(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ht}unmount(){this.removeGroupControls(),this.removeListeners()}}const sp=e=>(t,n)=>{e&&Se.postRender(()=>e(t,n))};class ET extends kn{constructor(){super(...arguments),this.removePointerDownListener=ht}onPointerDown(t){this.session=new _h(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ip(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:sp(t),onStart:sp(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&Se.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=vn(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 CT(){const e=b.useContext(Bi);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 os={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ap(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ko={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(le.test(e))e=parseFloat(e);else return e;const n=ap(e,t.target.x),r=ap(e,t.target.y);return`${n}% ${r}%`}},PT={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Mn.parse(e);if(o.length>5)return r;const i=Mn.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=$e(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 IT extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;Ax(AT),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()})),os.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()||Se.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Na.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 lp(e){const[t,n]=CT(),r=b.useContext(_o);return x.jsx(IT,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(nd),isPresent:t,safeToRemove:n})}const AT={borderRadius:{...Ko,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ko,borderTopRightRadius:Ko,borderBottomLeftRadius:Ko,borderBottomRightRadius:Ko,boxShadow:PT},cp=["TopLeft","TopRight","BottomLeft","BottomRight"],OT=cp.length,up=e=>typeof e=="string"?parseFloat(e):e,fp=e=>typeof e=="number"||le.test(e);function kT(e,t,n,r,o,i){o?(e.opacity=$e(0,n.opacity!==void 0?n.opacity:1,DT(r)),e.opacityExit=$e(t.opacity!==void 0?t.opacity:1,0,MT(r))):i&&(e.opacity=$e(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<OT;s++){const a=`border${cp[s]}Radius`;let l=dp(t,a),c=dp(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||fp(l)===fp(c)?(e[a]=Math.max($e(up(l),up(c),r),0),(Xt.test(c)||Xt.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=$e(t.rotate||0,n.rotate||0,r))}function dp(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const DT=hp(0,.5,mh),MT=hp(.5,.95,ht);function hp(e,t,n){return r=>r<e?0:r>t?1:n(_r(e,t,r))}function pp(e,t){e.min=t.min,e.max=t.max}function Rt(e,t){pp(e.x,t.x),pp(e.y,t.y)}function mp(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function gp(e,t,n,r,o){return e-=t,e=ns(e,1/n,r),o!==void 0&&(e=ns(e,1/o,r)),e}function FT(e,t=0,n=1,r=.5,o,i=e,s=e){if(Xt.test(t)&&(t=parseFloat(t),t=$e(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=$e(i.min,i.max,r);e===i&&(a-=t),e.min=gp(e.min,t,n,a,o),e.max=gp(e.max,t,n,a,o)}function yp(e,t,[n,r,o],i,s){FT(e,t[n],t[r],t[o],t.scale,i,s)}const LT=["x","scaleX","originX"],NT=["y","scaleY","originY"];function vp(e,t,n,r){yp(e.x,t,LT,n?n.x:void 0,r?r.x:void 0),yp(e.y,t,NT,n?n.y:void 0,r?r.y:void 0)}function bp(e){return e.translate===0&&e.scale===1}function wp(e){return bp(e.x)&&bp(e.y)}function _T(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 xp(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 Sp(e){return Lt(e.x)/Lt(e.y)}function Tp(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class VT{constructor(){this.members=[]}add(t){qi(this.members,t),t.scheduleRender()}remove(t){if(Ho(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 $T(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:f,rotateY:h,skewX:d,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),d&&(r+=`skewX(${d}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 BT=(e,t)=>e.depth-t.depth;class jT{constructor(){this.children=[],this.isDirty=!1}add(t){qi(this.children,t),this.isDirty=!0}remove(t){Ho(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(BT),this.isDirty=!1,this.children.forEach(t)}}function RT(e,t){const n=Dn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Zt(r),e(i-t))};return Se.read(r,!0),()=>Zt(r)}function Ep(e){return e instanceof SVGElement&&e.tagName!=="svg"}function Fl(e,t,n){const r=st(e)?e:Vr(e);return r.start(xl("",r,t,n)),r.animation}const nr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ll=["","X","Y","Z"],HT={visibility:"hidden"},Cp=1e3;let WT=0;function Nl(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Pp(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Fh(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?Pp(e.parent):!1:!1}function Ip({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t==null?void 0:t()){this.id=WT++,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&&(nr.totalNodes=nr.resolvedTargetDeltas=nr.recalculatedProjection=0),this.nodes.forEach(UT),this.nodes.forEach(QT),this.nodes.forEach(ZT),this.nodes.forEach(YT),window.MotionDebug&&window.MotionDebug.record(nr)},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 jT)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Sl),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=Ep(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 f;const h=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=RT(h,250),os.hasAnimatedSinceResize&&(os.hasAnimatedSinceResize=!1,this.nodes.forEach(Op))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||rE,{onLayoutAnimationStart:v,onLayoutAnimationComplete:g}=u.getProps(),w=!this.targetLayout||!xp(this.targetLayout,p)||d,y=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||h&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const T={...Za(m,"layout"),onPlay:v,onComplete:g};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else h||Op(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,Zt(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(JT),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&&Pp(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 f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.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(Ap);return}this.isUpdating||this.nodes.forEach(KT),this.isUpdating=!1,this.nodes.forEach(XT),this.nodes.forEach(zT),this.nodes.forEach(GT),this.clearAllSnapshots();const a=Dn.now();pt.delta=An(0,1e3/60,a-pt.timestamp),pt.timestamp=a,pt.isProcessing=!0,qa.update.process(pt),qa.preRender.process(pt),qa.render.process(pt),pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Na.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qT),this.sharedNodes.forEach(eE)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Se.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Se.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=Ze(),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&&!wp(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||tr(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)),oE(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return Ze();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(Fn(a.x,l.offset.x),Fn(a.y,l.offset.y)),a}removeElementScroll(s){const a=Ze();Rt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){Rt(a,s);const{scroll:h}=this.root;h&&(Fn(a.x,-h.offset.x),Fn(a.y,-h.offset.y))}Fn(a.x,u.offset.x),Fn(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const l=Ze();Rt(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&&Br(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),tr(u.latestValues)&&Br(l,u.latestValues)}return tr(this.latestValues)&&Br(l,this.latestValues),l}removeTransform(s){const a=Ze();Rt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!tr(c.latestValues))continue;Dl(c.latestValues)&&c.updateSnapshot();const u=Ze(),f=c.measurePageBox();Rt(u,f),vp(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return tr(this.latestValues)&&vp(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!==pt.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:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=pt.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ze(),this.relativeTargetOrigin=Ze(),qo(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),Rt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ze(),this.targetWithTransforms=Ze()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),cT(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Rt(this.target,this.layout.layoutBox),ep(this.target,this.targetDelta)):Rt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ze(),this.relativeTargetOrigin=Ze(),qo(this.relativeTargetOrigin,this.target,d.target),Rt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&nr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Dl(this.parent.latestValues)||Qh(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===pt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=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||f))return;Rt(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;vT(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=Ze());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(mp(this.prevProjectionDelta.x,this.projectionDelta.x),mp(this.prevProjectionDelta.y,this.projectionDelta.y)),Yo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!Tp(this.projectionDelta.x,this.prevProjectionDelta.x)||!Tp(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&nr.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=$r(),this.projectionDelta=$r(),this.projectionDeltaWithTransform=$r()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=$r();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Ze(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,v=this.getStack(),g=!v||v.members.length<=1,w=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(nE));this.animationProgress=0;let y;this.mixTargetDelta=T=>{const S=T/1e3;kp(f.x,s.x,S),kp(f.y,s.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(qo(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),tE(this.relativeTarget,this.relativeTargetOrigin,h,S),y&&_T(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Ze()),Rt(y,this.relativeTarget)),m&&(this.animationValues=u,kT(u,c,this.latestValues,S,w,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},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&&(Zt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Se.update(()=>{os.hasAnimatedSinceResize=!0,this.currentAnimation=Fl(0,Cp,{...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(Cp),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&&Np(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ze();const f=Lt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const h=Lt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+h}Rt(a,l),Br(a,u),Yo(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new VT),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&&Nl("z",s,c,this.animationValues);for(let u=0;u<Ll.length;u++)Nl(`rotate${Ll[u]}`,s,c,this.animationValues),Nl(`skew${Ll[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 HT;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Yi(s==null?void 0:s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Yi(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!tr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=$T(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:d,y:p}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in zi){if(h[m]===void 0)continue;const{correct:v,applyTo:g}=zi[m],w=c.transform==="none"?h[m]:v(h[m],f);if(g){const y=g.length;for(let T=0;T<y;T++)c[g[T]]=w}else c[m]=w}return this.options.layoutId&&(c.pointerEvents=f===this?Yi(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(Ap),this.root.sharedNodes.clear()}}}function zT(e){e.updateLayout()}function GT(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"?jt(f=>{const h=s?n.measuredBox[f]:n.layoutBox[f],d=Lt(h);h.min=r[f].min,h.max=h.min+d}):Np(i,n.layoutBox,r)&&jt(f=>{const h=s?n.measuredBox[f]:n.layoutBox[f],d=Lt(r[f]);h.max=h.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+d)});const a=$r();Yo(a,r,n.layoutBox);const l=$r();s?Yo(l,e.applyTransform(o,!0),n.measuredBox):Yo(l,r,n.layoutBox);const c=!wp(a);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:d}=f;if(h&&d){const p=Ze();qo(p,n.layoutBox,h.layoutBox);const m=Ze();qo(m,r,d.layoutBox),xp(p,m)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=f)}}}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 UT(e){window.MotionDebug&&nr.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 YT(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function qT(e){e.clearSnapshot()}function Ap(e){e.clearMeasurements()}function KT(e){e.isLayoutDirty=!1}function XT(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Op(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function QT(e){e.resolveTargetDelta()}function ZT(e){e.calcProjection()}function JT(e){e.resetSkewAndRotation()}function eE(e){e.removeLeadSnapshot()}function kp(e,t,n){e.translate=$e(t.translate,0,n),e.scale=$e(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Dp(e,t,n,r){e.min=$e(t.min,n.min,r),e.max=$e(t.max,n.max,r)}function tE(e,t,n,r){Dp(e.x,t.x,n.x,r),Dp(e.y,t.y,n.y,r)}function nE(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const rE={duration:.45,ease:[.4,0,.1,1]},Mp=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Fp=Mp("applewebkit/")&&!Mp("chrome/")?Math.round:ht;function Lp(e){e.min=Fp(e.min),e.max=Fp(e.max)}function oE(e){Lp(e.x),Lp(e.y)}function Np(e,t,n){return e==="position"||e==="preserve-aspect"&&!lT(Sp(t),Sp(n),.2)}const iE=Ip({attachResizeListener:(e,t)=>yn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),_l={current:void 0},_p=Ip({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!_l.current){const e=new iE({});e.mount(window),e.setOptions({layoutScroll:!0}),_l.current=e}return _l.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),sE={pan:{Feature:ET},drag:{Feature:TT,ProjectionNode:_p,MeasureLayout:lp}},Vl={current:null},Vp={current:!1};function aE(){if(Vp.current=!0,!!La)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Vl.current=e.matches;e.addListener(t),t()}else Vl.current=!1}function lE(e,t,n){for(const r in t){const o=t[r],i=n[r];if(st(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Tl(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(st(i))e.addValue(r,Vr(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,Vr(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Xo=new WeakMap,cE=[...zd,wt,Mn],uE=e=>cE.find(Wd(e)),$p=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],fE=Va.length;class dE{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.applyWillChange=!1,this.resolveKeyframes=(h,d,p,m)=>new this.KeyframeResolver(h,d,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=tl,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,Se.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=Wi(n),this.isVariantNode=id(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const d=f[h];l[h]!==void 0&&st(d)&&d.set(l[h],!1)}}mount(t){this.current=t,Xo.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)),Vp.current||aE(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Vl.current,process.env.NODE_ENV!=="production"&&Tl(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(){Xo.delete(this.current),this.projection&&this.projection.unmount(),Zt(this.notifyUpdate),Zt(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=In.has(t),o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Se.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 Dr){const n=Dr[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):Ze()}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<$p.length;r++){const o=$p[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=lE(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<fE;r++){const o=Va[r],i=this.props[o];(Lo(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=Vr(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"&&($d(o)||Vd(o))?o=parseFloat(o):!uE(o)&&Mn.test(n)&&(o=eh(t,n)),this.setBaseTarget(t,st(o)?o.get():o)),st(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=Ua(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&&!st(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 Sl),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Bp extends dE{constructor(){super(...arguments),this.KeyframeResolver=th}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 hE(e){return window.getComputedStyle(e)}class jp extends Bp{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=bd}readValueFromInstance(t,n){if(In.has(n)){const r=sl(n);return r&&r.default||0}else{const r=hE(t),o=(ud(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return op(t,n)}build(t,n,r){Ra(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Ga(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;st(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Rp extends Bp{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ze}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(In.has(n)){const r=sl(n);return r&&r.default||0}return n=wd.has(n)?n:Ri(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Sd(t,n,r)}build(t,n,r){Wa(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){xd(t,n,r,o)}mount(t){this.isSVGTag=za(t.tagName),super.mount(t)}}const pE=(e,t)=>$a(e)?new Rp(t):new jp(t,{allowProjection:e!==b.Fragment}),mE={...eT,...v1,...sE,...{layout:{ProjectionNode:_p,MeasureLayout:lp}}},mt=Px((e,t)=>i1(e,t,mE,pE));function Hp(){const e=b.useRef(!1);return ji(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Wp(){const e=Hp(),[t,n]=b.useState(0),r=b.useCallback(()=>{e.current&&n(t+1)},[t]);return[b.useCallback(()=>Se.postRender(r),[r]),t]}class gE extends M.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function yE({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(Or);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
5
  [data-motion-pop-id="${n}"] {
6
6
  position: absolute !important;
7
- width: ${i}px !important;
7
+ width: ${s}px !important;
8
8
  height: ${a}px !important;
9
9
  top: ${l}px !important;
10
10
  left: ${c}px !important;
11
11
  }
12
- `),()=>{document.head.removeChild(u)}},[t]),x.jsx(DC,{isPresent:t,childRef:r,sizeRef:o,children:M.cloneElement(e,{ref:r})})}const Lc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const a=hn(FC),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]),M.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),i==="popLayout"&&(e=x.jsx(NC,{isPresent:n,children:e})),x.jsx(xi.Provider,{value:c,children:e})};function FC(){return new Map}function Qm(e){return b.useEffect(()=>()=>e(),[])}const Er=e=>e.key||"";function LC(e,t){e.forEach(n=>{const r=Er(n);t.set(r,n)})}function VC(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const Ps=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:s=!0,mode:i="sync"})=>{Ut(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(ds).forceRender||Xm()[0],l=Zm(),c=VC(e);let u=c;const d=b.useRef(new Map).current,h=b.useRef(u),f=b.useRef(new Map).current,p=b.useRef(!0);if(Si(()=>{p.current=!1,LC(c,f),h.current=u}),Qm(()=>{p.current=!0,f.clear(),d.clear()}),p.current)return x.jsx(x.Fragment,{children:u.map(w=>x.jsx(Lc,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:s,mode:i,children:w},Er(w)))});u=[...u];const m=h.current.map(Er),v=c.map(Er),g=m.length;for(let w=0;w<g;w++){const y=m[w];v.indexOf(y)===-1&&!d.has(y)&&d.set(y,void 0)}return i==="wait"&&d.size&&(u=[]),d.forEach((w,y)=>{if(v.indexOf(y)!==-1)return;const T=f.get(y);if(!T)return;const S=m.indexOf(y);let E=w;if(!E){const I=()=>{d.delete(y);const P=Array.from(f.keys()).filter(O=>!v.includes(O));if(P.forEach(O=>f.delete(O)),h.current=c.filter(O=>{const C=Er(O);return C===y||P.includes(C)}),!d.size){if(l.current===!1)return;a(),r&&r()}};E=x.jsx(Lc,{isPresent:!1,onExitComplete:I,custom:t,presenceAffectsLayout:s,mode:i,children:T},Er(T)),d.set(y,E)}u.splice(S,0,E)}),u=u.map(w=>{const y=w.key;return d.has(y)?w:x.jsx(Lc,{isPresent:!0,presenceAffectsLayout:s,mode:i,children:w},Er(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 $C({children:e,isValidProp:t,...n}){t&&Eh(t),n={...b.useContext(eo),...n},n.isStatic=hn(()=>n.isStatic);const r=b.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(eo.Provider,{value:r,children:e})}const RC=b.createContext(null),jC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Jm(){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 eg=e=>e===!0,BC=e=>eg(e===!0)||e==="id",WC=({children:e,id:t,inherit:n=!0})=>{const r=b.useContext(ds),o=b.useContext(RC),[s,i]=Xm(),a=b.useRef(null),l=r.id||o;a.current===null&&(BC(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:eg(n)&&r.group||Jm()});const c=b.useMemo(()=>({...a.current,forceRender:s}),[i]);return x.jsx(ds.Provider,{value:c,children:e})},tg=b.createContext(null);function zC(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=Ye(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?gS(e,o,o+s):e}function HC({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=hn(()=>Ct(t)),l=[],c=b.useRef(!1);Ut(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,h)=>{const f=l.findIndex(p=>d===p.value);f!==-1?l[f].layout=h[n]:l.push({value:d,layout:h[n]}),l.sort(YC)},updateOrder:(d,h,f)=>{if(c.current)return;const p=zC(l,d,h,f);l!==p&&(c.current=!0,r(p.map(GC).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{c.current=!1}),x.jsx(a,{...s,ref:i,ignoreStrict:!0,children:x.jsx(tg.Provider,{value:u,children:e})})}const UC=b.forwardRef(HC);function GC(e){return e.value}function YC(e,t){return e.layout.min-t.layout.min}function fo(e){const t=hn(()=>lo(e)),{isStatic:n}=b.useContext(eo);if(n){const[,r]=b.useState(e);b.useEffect(()=>t.on("change",r),[])}return t}const qC=e=>e&&typeof e=="object"&&e.mix,KC=e=>qC(e)?e.mix:void 0;function ZC(...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=Ap(o,s,{mixer:KC(s[0]),...i});return t?a(r):a}function ng(e,t){const n=fo(t()),r=()=>n.set(t());return r(),Si(()=>{const o=()=>Me.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),pn(r)}}),n}function XC(e){xs.current=[],e();const t=ng(xs.current,e);return xs.current=void 0,t}function QC(e,t,n,r){if(typeof e=="function")return XC(e);const o=typeof t=="function"?t:ZC(t,n,r);return Array.isArray(e)?rg(e,o):rg([e],([s])=>o(s))}function rg(e,t){const n=hn(()=>[]);return ng(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function og(e,t=0){return gt(e)?e:fo(t)}function JC({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=hn(()=>Ct(r)),c=b.useContext(tg),u={x:og(t.x),y:og(t.y)},d=QC([u.x,u.y],([m,v])=>m||v?1:"unset");Ut(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:h,registerItem:f,updateOrder:p}=c;return x.jsx(l,{drag:h,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:s,onDrag:(m,v)=>{const{velocity:g}=v;g[h]&&p(n,u[h].get(),g[h]),o&&o(m,v)},onLayoutMeasure:m=>f(n,m),ref:a,ignoreStrict:!0,children:e})}const eP=b.forwardRef(JC),Bi={Group:UC,Item:eP};function sg(e,t,n){var r;if(typeof e=="string"){let o=document;t&&(Ut(!!t.current,"Scope provided, but no element detected."),o=t.current),n?((r=n[e])!==null&&r!==void 0||(n[e]=o.querySelectorAll(e)),e=n[e]):e=o.querySelectorAll(e)}else e instanceof Element&&(e=[e]);return Array.from(e||[])}function tP(e){return typeof e=="object"&&!Array.isArray(e)}function nP(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Mm(e)?new Km(t):new qm(t);n.mount(e),Cs.set(e,n)}function rP(e,t=100){const n=ac({keyframes:[0,t],...e}),r=Math.min(Dp(n),mc);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:gn(r)}}function ig(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}const oP=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function sP(e,t){return wp(e)?e[oP(0,e.length,t)]:e}function iP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(ys(e,o),r--)}}function aP(e,t,n,r,o,s){iP(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Ye(o,s,r[i]),easing:sP(n,i)})}function lP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const cP="easeInOut";function uP(e,{defaultTransition:t={},...n}={},r){const o=t.duration||.3,s=new Map,i=new Map,a={},l=new Map;let c=0,u=0,d=0;for(let h=0;h<e.length;h++){const f=e[h];if(typeof f=="string"){l.set(f,u);continue}else if(!Array.isArray(f)){l.set(f.name,ig(u,f.at,c,l));continue}let[p,m,v={}]=f;v.at!==void 0&&(u=ig(u,v.at,c,l));let g=0;const w=(y,T,S,E=0,I=0)=>{const P=dP(y),{delay:O=0,times:C=Mp(P),type:L="keyframes",...D}=T;let{ease:V=t.ease||"easeOut",duration:k}=T;const _=typeof O=="function"?O(E,I):O,N=P.length;if(N<=2&&L==="spring"){let A=100;if(N===2&&pP(P)){const re=P[1]-P[0];A=Math.abs(re)}const R={...D};k!==void 0&&(R.duration=mn(k));const Z=rP(R,A);V=Z.ease,k=Z.duration}k??(k=o);const $=u+_,H=$+k;C.length===1&&C[0]===0&&(C[1]=1);const U=C.length-P.length;U>0&&_p(C,U),P.length===1&&P.unshift(null),aP(S,P,V,C,$,H),g=Math.max(_+k,g),d=Math.max(H,d)};if(gt(p)){const y=ag(p,i);w(m,v,lg("default",y))}else{const y=sg(p,r,a),T=y.length;for(let S=0;S<T;S++){m=m,v=v;const E=y[S],I=ag(E,i);for(const P in m)w(m[P],fP(v,P),lg(P,I),S,T)}}c=u,u+=g}return i.forEach((h,f)=>{for(const p in h){const m=h[p];m.sort(lP);const v=[],g=[],w=[];for(let T=0;T<m.length;T++){const{at:S,value:E,easing:I}=m[T];v.push(E),g.push(ao(0,d,S)),w.push(I||"easeOut")}g[0]!==0&&(g.unshift(0),v.unshift(v[0]),w.unshift(cP)),g[g.length-1]!==1&&(g.push(1),v.push(null)),s.has(f)||s.set(f,{keyframes:{},transition:{}});const y=s.get(f);y.keyframes[p]=v,y.transition[p]={...t,duration:d,ease:w,times:g,...n}}}),s}function ag(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function lg(e,t){return t[e]||(t[e]=[]),t[e]}function dP(e){return Array.isArray(e)?e:[e]}function fP(e,t){return e[t]?{...e,...e[t]}:{...e}}const hP=e=>typeof e=="number",pP=e=>e.every(hP);function cg(e,t,n,r){const o=sg(e,r),s=o.length;Ut(!!s,"No valid element provided.");const i=[];for(let a=0;a<s;a++){const l=o[a];Cs.has(l)||nP(l);const c=Cs.get(l),u={...n};typeof u.delay=="function"&&(u.delay=u.delay(a,s)),i.push(...Tc(c,{...t,transition:u},{}))}return new vc(i)}const mP=e=>Array.isArray(e)&&Array.isArray(e[0]);function gP(e,t,n){const r=[];return uP(e,t,n).forEach(({keyframes:s,transition:i},a)=>{let l;gt(a)?l=_c(a,s.default,i.default):l=cg(a,s,i),r.push(l)}),new vc(r)}const yP=e=>{function t(n,r,o){let s;return mP(n)?s=gP(n,r,e):tP(r)?s=cg(n,r,o,e):s=_c(n,r,o),e&&e.animations.push(s),s}return t};function vP(){const e=hn(()=>({current:null,animations:[]})),t=hn(()=>yP(e));return Qm(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class bP{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 wP=()=>new bP;function xP(){return hn(wP)}function SP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function TP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:SP(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=uc(r)(l/c)*c}return t+l}}/**
12
+ `),()=>{document.head.removeChild(u)}},[t]),x.jsx(gE,{isPresent:t,childRef:r,sizeRef:o,children:M.cloneElement(e,{ref:r})})}const $l=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=Qt(vE),l=b.useId(),c=b.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),i?[Math.random()]:[n]);return b.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[n]),M.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=x.jsx(yE,{isPresent:n,children:e})),x.jsx(Bi.Provider,{value:c,children:e})};function vE(){return new Map}function zp(e){return b.useEffect(()=>()=>e(),[])}const rr=e=>e.key||"";function bE(e,t){e.forEach(n=>{const r=rr(n);t.set(r,n)})}function wE(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const Qo=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{Ft(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(_o).forceRender||Wp()[0],l=Hp(),c=wE(e);let u=c;const f=b.useRef(new Map).current,h=b.useRef(u),d=b.useRef(new Map).current,p=b.useRef(!0);if(ji(()=>{p.current=!1,bE(c,d),h.current=u}),zp(()=>{p.current=!0,d.clear(),f.clear()}),p.current)return x.jsx(x.Fragment,{children:u.map(w=>x.jsx($l,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s,children:w},rr(w)))});u=[...u];const m=h.current.map(rr),v=c.map(rr),g=m.length;for(let w=0;w<g;w++){const y=m[w];v.indexOf(y)===-1&&!f.has(y)&&f.set(y,void 0)}return s==="wait"&&f.size&&(u=[]),f.forEach((w,y)=>{if(v.indexOf(y)!==-1)return;const T=d.get(y);if(!T)return;const S=m.indexOf(y);let E=w;if(!E){const A=()=>{f.delete(y);const P=Array.from(d.keys()).filter(O=>!v.includes(O));if(P.forEach(O=>d.delete(O)),h.current=c.filter(O=>{const C=rr(O);return C===y||P.includes(C)}),!f.size){if(l.current===!1)return;a(),r&&r()}};E=x.jsx($l,{isPresent:!1,onExitComplete:A,custom:t,presenceAffectsLayout:i,mode:s,children:T},rr(T)),f.set(y,E)}u.splice(S,0,E)}),u=u.map(w=>{const y=w.key;return f.has(y)?w:x.jsx($l,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:w},rr(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:f.size?u:u.map(w=>b.cloneElement(w))})};function xE({children:e,isValidProp:t,...n}){t&&gd(t),n={...b.useContext(Or),...n},n.isStatic=Qt(()=>n.isStatic);const r=b.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(Or.Provider,{value:r,children:e})}const SE=b.createContext(null),TE=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Gp(){const e=new Set,t=new WeakMap,n=()=>e.forEach(TE);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 Up=e=>e===!0,EE=e=>Up(e===!0)||e==="id",CE=({children:e,id:t,inherit:n=!0})=>{const r=b.useContext(_o),o=b.useContext(SE),[i,s]=Wp(),a=b.useRef(null),l=r.id||o;a.current===null&&(EE(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:Up(n)&&r.group||Gp()});const c=b.useMemo(()=>({...a.current,forceRender:i}),[s]);return x.jsx(_o.Provider,{value:c,children:e})},Yp=b.createContext(null);function PE(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=$e(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?Jx(e,o,o+i):e}function IE({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=Qt(()=>mt(t)),l=[],c=b.useRef(!1);Ft(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(f,h)=>{const d=l.findIndex(p=>f===p.value);d!==-1?l[d].layout=h[n]:l.push({value:f,layout:h[n]}),l.sort(kE)},updateOrder:(f,h,d)=>{if(c.current)return;const p=PE(l,f,h,d);l!==p&&(c.current=!0,r(p.map(OE).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{c.current=!1}),x.jsx(a,{...i,ref:s,ignoreStrict:!0,children:x.jsx(Yp.Provider,{value:u,children:e})})}const AE=b.forwardRef(IE);function OE(e){return e.value}function kE(e,t){return e.layout.min-t.layout.min}function jr(e){const t=Qt(()=>Vr(e)),{isStatic:n}=b.useContext(Or);if(n){const[,r]=b.useState(e);b.useEffect(()=>t.on("change",r),[])}return t}const DE=e=>e&&typeof e=="object"&&e.mix,ME=e=>DE(e)?e.mix:void 0;function FE(...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=Sh(o,i,{mixer:ME(i[0]),...s});return t?a(r):a}function qp(e,t){const n=jr(t()),r=()=>n.set(t());return r(),ji(()=>{const o=()=>Se.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),Zt(r)}}),n}function LE(e){Uo.current=[],e();const t=qp(Uo.current,e);return Uo.current=void 0,t}function NE(e,t,n,r){if(typeof e=="function")return LE(e);const o=typeof t=="function"?t:FE(t,n,r);return Array.isArray(e)?Kp(e,o):Kp([e],([i])=>o(i))}function Kp(e,t){const n=Qt(()=>[]);return qp(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Xp(e,t=0){return st(e)?e:jr(t)}function _E({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...s},a){const l=Qt(()=>mt(r)),c=b.useContext(Yp),u={x:Xp(t.x),y:Xp(t.y)},f=NE([u.x,u.y],([m,v])=>m||v?1:"unset");Ft(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:h,registerItem:d,updateOrder:p}=c;return x.jsx(l,{drag:h,...s,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:f},layout:i,onDrag:(m,v)=>{const{velocity:g}=v;g[h]&&p(n,u[h].get(),g[h]),o&&o(m,v)},onLayoutMeasure:m=>d(n,m),ref:a,ignoreStrict:!0,children:e})}const VE=b.forwardRef(_E),is={Group:AE,Item:VE};function Qp(e,t,n){var r;if(typeof e=="string"){let o=document;t&&(Ft(!!t.current,"Scope provided, but no element detected."),o=t.current),n?((r=n[e])!==null&&r!==void 0||(n[e]=o.querySelectorAll(e)),e=n[e]):e=o.querySelectorAll(e)}else e instanceof Element&&(e=[e]);return Array.from(e||[])}function $E(e){return typeof e=="object"&&!Array.isArray(e)}function BE(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Ep(e)?new Rp(t):new jp(t);n.mount(e),Xo.set(e,n)}function jE(e,t=100){const n=cl({keyframes:[0,t],...e}),r=Math.min(Ch(n),yl);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:en(r)}}function Zp(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}const RE=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function HE(e,t){return dh(e)?e[RE(0,e.length,t)]:e}function WE(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ho(e,o),r--)}}function zE(e,t,n,r,o,i){WE(e,o,i);for(let s=0;s<t.length;s++)e.push({value:t[s],at:$e(o,i,r[s]),easing:HE(n,s)})}function GE(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const UE="easeInOut";function YE(e,{defaultTransition:t={},...n}={},r){const o=t.duration||.3,i=new Map,s=new Map,a={},l=new Map;let c=0,u=0,f=0;for(let h=0;h<e.length;h++){const d=e[h];if(typeof d=="string"){l.set(d,u);continue}else if(!Array.isArray(d)){l.set(d.name,Zp(u,d.at,c,l));continue}let[p,m,v={}]=d;v.at!==void 0&&(u=Zp(u,v.at,c,l));let g=0;const w=(y,T,S,E=0,A=0)=>{const P=qE(y),{delay:O=0,times:C=Eh(P),type:_="keyframes",...F}=T;let{ease:V=t.ease||"easeOut",duration:I}=T;const D=typeof O=="function"?O(E,A):O,L=P.length;if(L<=2&&_==="spring"){let k=100;if(L===2&&QE(P)){const te=P[1]-P[0];k=Math.abs(te)}const j={...F};I!==void 0&&(j.duration=Jt(I));const K=jE(j,k);V=K.ease,I=K.duration}I??(I=o);const $=u+D,z=$+I;C.length===1&&C[0]===0&&(C[1]=1);const G=C.length-P.length;G>0&&Th(C,G),P.length===1&&P.unshift(null),zE(S,P,V,C,$,z),g=Math.max(D+I,g),f=Math.max(z,f)};if(st(p)){const y=Jp(p,s);w(m,v,em("default",y))}else{const y=Qp(p,r,a),T=y.length;for(let S=0;S<T;S++){m=m,v=v;const E=y[S],A=Jp(E,s);for(const P in m)w(m[P],KE(v,P),em(P,A),S,T)}}c=u,u+=g}return s.forEach((h,d)=>{for(const p in h){const m=h[p];m.sort(GE);const v=[],g=[],w=[];for(let T=0;T<m.length;T++){const{at:S,value:E,easing:A}=m[T];v.push(E),g.push(_r(0,f,S)),w.push(A||"easeOut")}g[0]!==0&&(g.unshift(0),v.unshift(v[0]),w.unshift(UE)),g[g.length-1]!==1&&(g.push(1),v.push(null)),i.has(d)||i.set(d,{keyframes:{},transition:{}});const y=i.get(d);y.keyframes[p]=v,y.transition[p]={...t,duration:f,ease:w,times:g,...n}}}),i}function Jp(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function em(e,t){return t[e]||(t[e]=[]),t[e]}function qE(e){return Array.isArray(e)?e:[e]}function KE(e,t){return e[t]?{...e,...e[t]}:{...e}}const XE=e=>typeof e=="number",QE=e=>e.every(XE);function tm(e,t,n,r){const o=Qp(e,r),i=o.length;Ft(!!i,"No valid element provided.");const s=[];for(let a=0;a<i;a++){const l=o[a];Xo.has(l)||BE(l);const c=Xo.get(l),u={...n};typeof u.delay=="function"&&(u.delay=u.delay(a,i)),s.push(...Cl(c,{...t,transition:u},{}))}return new wl(s)}const ZE=e=>Array.isArray(e)&&Array.isArray(e[0]);function JE(e,t,n){const r=[];return YE(e,t,n).forEach(({keyframes:i,transition:s},a)=>{let l;st(a)?l=Fl(a,i.default,s.default):l=tm(a,i,s),r.push(l)}),new wl(r)}const eC=e=>{function t(n,r,o){let i;return ZE(n)?i=JE(n,r,e):$E(r)?i=tm(n,r,o,e):i=Fl(n,r,o),e&&e.animations.push(i),i}return t};function tC(){const e=Qt(()=>({current:null,animations:[]})),t=Qt(()=>eC(e));return zp(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class nC{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 rC=()=>new nC;function oC(){return Qt(rC)}function iC(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function sC(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const s=typeof n=="number"?n:iC(n,i),a=Math.abs(s-o);let l=e*a;if(r){const c=i*e;l=dl(r)(l/c)*c}return t+l}}/**
13
13
  * @license lucide-react v0.414.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
16
16
  * See the LICENSE file in the root directory of this source tree.
17
- */const EP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ug=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
17
+ */const aC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),nm=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
18
18
  * @license lucide-react v0.414.0 - ISC
19
19
  *
20
20
  * This source code is licensed under the ISC license.
21
21
  * See the LICENSE file in the root directory of this source tree.
22
- */var CP={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 lC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
23
23
  * @license lucide-react v0.414.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
- */const PP=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,...CP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ug("lucide",o),...a},[...i.map(([c,u])=>b.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
27
+ */const cC=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,...lC,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:nm("lucide",o),...a},[...s.map(([c,u])=>b.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
28
28
  * @license lucide-react v0.414.0 - ISC
29
29
  *
30
30
  * This source code is licensed under the ISC license.
31
31
  * See the LICENSE file in the root directory of this source tree.
32
- */const nt=(e,t)=>{const n=b.forwardRef(({className:r,...o},s)=>b.createElement(PP,{ref:s,iconNode:t,className:ug(`lucide-${EP(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
32
+ */const Ue=(e,t)=>{const n=b.forwardRef(({className:r,...o},i)=>b.createElement(cC,{ref:i,iconNode:t,className:nm(`lucide-${aC(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
33
33
  * @license lucide-react v0.414.0 - ISC
34
34
  *
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
- */const kP=nt("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 uC=Ue("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"}]]);/**
38
38
  * @license lucide-react v0.414.0 - ISC
39
39
  *
40
40
  * This source code is licensed under the ISC license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
- */const IP=nt("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 fC=Ue("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"}]]);/**
43
43
  * @license lucide-react v0.414.0 - ISC
44
44
  *
45
45
  * This source code is licensed under the ISC license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
- */const dg=nt("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 rm=Ue("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"}]]);/**
48
48
  * @license lucide-react v0.414.0 - ISC
49
49
  *
50
50
  * This source code is licensed under the ISC license.
51
51
  * See the LICENSE file in the root directory of this source tree.
52
- */const OP=nt("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 dC=Ue("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
53
53
  * @license lucide-react v0.414.0 - ISC
54
54
  *
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
- */const AP=nt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
57
+ */const hC=Ue("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
58
58
  * @license lucide-react v0.414.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const fg=nt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
62
+ */const om=Ue("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
63
63
  * @license lucide-react v0.414.0 - ISC
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */const _P=nt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
67
+ */const pC=Ue("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
68
68
  * @license lucide-react v0.414.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
- */const Vc=nt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
72
+ */const Bl=Ue("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
73
73
  * @license lucide-react v0.414.0 - ISC
74
74
  *
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
- */const hg=nt("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 im=Ue("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"}]]);/**
78
78
  * @license lucide-react v0.414.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
81
81
  * See the LICENSE file in the root directory of this source tree.
82
- */const MP=nt("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 mC=Ue("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"}]]);/**
83
83
  * @license lucide-react v0.414.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
- */const DP=nt("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 gC=Ue("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"}]]);/**
88
88
  * @license lucide-react v0.414.0 - ISC
89
89
  *
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
- */const NP=nt("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 yC=Ue("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"}]]);/**
93
93
  * @license lucide-react v0.414.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
- */const pg=nt("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 sm=Ue("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
98
98
  * @license lucide-react v0.414.0 - ISC
99
99
  *
100
100
  * This source code is licensed under the ISC license.
101
101
  * See the LICENSE file in the root directory of this source tree.
102
- */const FP=nt("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
102
+ */const vC=Ue("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
103
103
  * @license lucide-react v0.414.0 - ISC
104
104
  *
105
105
  * This source code is licensed under the ISC license.
106
106
  * See the LICENSE file in the root directory of this source tree.
107
- */const $c=nt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
107
+ */const jl=Ue("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
108
108
  * @license lucide-react v0.414.0 - ISC
109
109
  *
110
110
  * This source code is licensed under the ISC license.
111
111
  * See the LICENSE file in the root directory of this source tree.
112
- */const LP=nt("SearchCheck",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
112
+ */const bC=Ue("SearchCheck",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
113
113
  * @license lucide-react v0.414.0 - ISC
114
114
  *
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
- */const VP=nt("SearchX",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
117
+ */const wC=Ue("SearchX",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
118
118
  * @license lucide-react v0.414.0 - ISC
119
119
  *
120
120
  * This source code is licensed under the ISC license.
121
121
  * See the LICENSE file in the root directory of this source tree.
122
- */const ho=nt("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"}]]);/**
122
+ */const Rr=Ue("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"}]]);/**
123
123
  * @license lucide-react v0.414.0 - ISC
124
124
  *
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
- */const $P=nt("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
127
+ */const xC=Ue("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
128
128
  * @license lucide-react v0.414.0 - ISC
129
129
  *
130
130
  * This source code is licensed under the ISC license.
131
131
  * See the LICENSE file in the root directory of this source tree.
132
- */const RP=nt("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"}]]);/**
132
+ */const SC=Ue("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"}]]);/**
133
133
  * @license lucide-react v0.414.0 - ISC
134
134
  *
135
135
  * This source code is licensed under the ISC license.
136
136
  * See the LICENSE file in the root directory of this source tree.
137
- */const jP=nt("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"}]]);/**
137
+ */const TC=Ue("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"}]]);/**
138
138
  * @license lucide-react v0.414.0 - ISC
139
139
  *
140
140
  * This source code is licensed under the ISC license.
141
141
  * See the LICENSE file in the root directory of this source tree.
142
- */const mg=nt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),gg={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},BP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},yg=e=>x.jsx(Ct.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,animate:e.open.toString(),"aria-hidden":!e.open,className:e.className,exit:gg.false,transition:BP,variants:gg,children:e.children}),WP=ts("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),zP=b.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:s=!0,...i},a){return x.jsx("div",{"data-open":!!s,"aria-hidden":!s,className:"pointer-events-none w-full isolate data-[open=true]:pointer-events-auto data-[open=true]:mb-4",children:x.jsx(yg,{"data-open":!!s,open:!!s,children:x.jsxs(Qr,{...i,className:He(WP({theme:n}),t),ref:a,"data-theme":n,role:"alert",as:i.as??"div",children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(hg,{size:20}):null,!r&&n==="info"?x.jsx(pg,{size:20}):null,!r&&n==="danger"?x.jsx($P,{size:20}):null,r,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,o!==void 0?x.jsx("button",{type:"button",onClick:()=>o(!1),className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:x.jsx(mg,{size:20})}):null]})})})});function De(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function qe(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function po(e,t){const n=De(e);return isNaN(t)?qe(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Wi(e,t){const n=De(e);if(isNaN(t))return qe(e,NaN);if(!t)return n;const r=n.getDate(),o=qe(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const s=o.getDate();return r>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const vg=6048e5,HP=864e5,UP=6e4,GP=36e5,YP=1e3;let qP={};function Cr(){return qP}function yn(e,t){var a,l,c,u;const n=Cr(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=De(e),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function mo(e){return yn(e,{weekStartsOn:1})}function bg(e){const t=De(e),n=t.getFullYear(),r=qe(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=mo(r),s=qe(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=mo(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function go(e){const t=De(e);return t.setHours(0,0,0,0),t}function zi(e){const t=De(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function KP(e,t){const n=go(e),r=go(t),o=+n-zi(n),s=+r-zi(r);return Math.round((o-s)/HP)}function ZP(e){const t=bg(e),n=qe(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),mo(n)}function wg(e,t){const n=t*7;return po(e,n)}function xg(e,t){return Wi(e,t*12)}function XP(e){return qe(e,Date.now())}function QP(e,t){const n=go(e),r=go(t);return+n==+r}function JP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Sg(e){if(!JP(e)&&typeof e!="number")return!1;const t=De(e);return!isNaN(Number(t))}function Tg(e,t){const n=De(e.start),r=De(e.end);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let a=1;const l=[];for(;+i<=s;)l.push(De(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function Eg(e){const t=De(e);return t.setDate(1),t.setHours(0,0,0,0),t}function ek(e){const t=De(e),n=qe(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function tk(e,t){var a,l;const n=Cr(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=De(e),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const nk={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"}},rk=(e,t,n)=>{let r;const o=nk[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Rc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const ok={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},sk={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ik={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ak={date:Rc({formats:ok,defaultWidth:"full"}),time:Rc({formats:sk,defaultWidth:"full"}),dateTime:Rc({formats:ik,defaultWidth:"full"})},lk={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ck=(e,t,n,r)=>lk[e];function ks(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 uk={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},dk={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},fk={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"]},hk={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"]},pk={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"}},mk={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"}},gk={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:ks({values:uk,defaultWidth:"wide"}),quarter:ks({values:dk,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ks({values:fk,defaultWidth:"wide"}),day:ks({values:hk,defaultWidth:"wide"}),dayPeriod:ks({values:pk,defaultWidth:"wide",formattingValues:mk,defaultFormattingWidth:"wide"})};function Is(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)?vk(a,d=>d.test(i)):yk(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 yk(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function vk(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function bk(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 wk=/^(\d+)(th|st|nd|rd)?/i,xk=/\d+/i,Sk={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},Tk={any:[/^b/i,/^(a|c)/i]},Ek={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ck={any:[/1/i,/2/i,/3/i,/4/i]},Pk={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},kk={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]},Ik={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ok={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Ak={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},_k={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}},Mk={ordinalNumber:bk({matchPattern:wk,parsePattern:xk,valueCallback:e=>parseInt(e,10)}),era:Is({matchPatterns:Sk,defaultMatchWidth:"wide",parsePatterns:Tk,defaultParseWidth:"any"}),quarter:Is({matchPatterns:Ek,defaultMatchWidth:"wide",parsePatterns:Ck,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Is({matchPatterns:Pk,defaultMatchWidth:"wide",parsePatterns:kk,defaultParseWidth:"any"}),day:Is({matchPatterns:Ik,defaultMatchWidth:"wide",parsePatterns:Ok,defaultParseWidth:"any"}),dayPeriod:Is({matchPatterns:Ak,defaultMatchWidth:"any",parsePatterns:_k,defaultParseWidth:"any"})},Cg={code:"en-US",formatDistance:rk,formatLong:ak,formatRelative:ck,localize:gk,match:Mk,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Dk(e){const t=De(e);return KP(t,ek(t))+1}function Pg(e){const t=De(e),n=+mo(t)-+ZP(t);return Math.round(n/vg)+1}function jc(e,t){var u,d,h,f;const n=De(e),r=n.getFullYear(),o=Cr(),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??((f=(h=o.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,i=qe(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=yn(i,t),l=qe(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=yn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function Nk(e,t){var a,l,c,u;const n=Cr(),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=jc(e,t),s=qe(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),yn(s,t)}function kg(e,t){const n=De(e),r=+yn(n,t)-+Nk(n,t);return Math.round(r/vg)+1}function $e(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const er={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return $e(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):$e(n+1,2)},d(e,t){return $e(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 $e(e.getHours()%12||12,t.length)},H(e,t){return $e(e.getHours(),t.length)},m(e,t){return $e(e.getMinutes(),t.length)},s(e,t){return $e(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return $e(o,t.length)}},yo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ig={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 er.y(e,t)},Y:function(e,t,n,r){const o=jc(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return $e(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):$e(s,t.length)},R:function(e,t){const n=bg(e);return $e(n,t.length)},u:function(e,t){const n=e.getFullYear();return $e(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 $e(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 $e(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 er.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 $e(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=kg(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):$e(o,t.length)},I:function(e,t,n){const r=Pg(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):$e(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):er.d(e,t)},D:function(e,t,n){const r=Dk(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):$e(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 $e(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 $e(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 $e(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 er.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):er.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):er.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):er.s(e,t)},S:function(e,t){return er.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ag(r);case"XXXX":case"XX":return Pr(r);case"XXXXX":case"XXX":default:return Pr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ag(r);case"xxxx":case"xx":return Pr(r);case"xxxxx":case"xxx":default:return Pr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Og(r,":");case"OOOO":default:return"GMT"+Pr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Og(r,":");case"zzzz":default:return"GMT"+Pr(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return $e(r,t.length)},T:function(e,t,n){const r=e.getTime();return $e(r,t.length)}};function Og(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+$e(s,2)}function Ag(e,t){return e%60===0?(e>0?"-":"+")+$e(Math.abs(e)/60,2):Pr(e,t)}function Pr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=$e(Math.trunc(r/60),2),s=$e(r%60,2);return n+o+t+s}const _g=(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"})}},Mg=(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"})}},Bc={p:Mg,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return _g(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}}",_g(r,t)).replace("{{time}}",Mg(o,t))}},Fk=/^D+$/,Lk=/^Y+$/,Vk=["D","DD","YY","YYYY"];function Dg(e){return Fk.test(e)}function Ng(e){return Lk.test(e)}function Wc(e,t,n){const r=$k(e,t,n);if(console.warn(r),Vk.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 Rk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,jk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Bk=/^'([^]*?)'?$/,Wk=/''/g,zk=/[a-zA-Z]/;function Hk(e,t,n){var u,d,h,f;const r=Cr(),o=r.locale??Cg,s=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=r.weekStartsOn??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.weekStartsOn)??0,a=De(e);if(!Sg(a))throw new RangeError("Invalid time value");let l=t.match(jk).map(p=>{const m=p[0];if(m==="p"||m==="P"){const v=Bc[m];return v(p,o.formatLong)}return p}).join("").match(Rk).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:Uk(p)};if(Ig[m])return{isToken:!0,value:p};if(m.match(zk))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;(Ng(m)||Dg(m))&&Wc(m,t,String(e));const v=Ig[m[0]];return v(a,m,o.localize,c)}).join("")}function Uk(e){const t=e.match(Bk);return t?t[1].replace(Wk,"'"):e}function Gk(){return Object.assign({},Cr())}function Yk(e){let n=De(e).getDay();return n===0&&(n=7),n}function qk(e,t){const n=De(e),r=De(t);return n.getTime()>r.getTime()}function Kk(e,t){const n=De(e),r=De(t);return+n<+r}function Zk(e,t){const n=t instanceof Date?qe(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const Xk=10;class Fg{constructor(){se(this,"subPriority",0)}validate(t,n){return!0}}class Qk extends Fg{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 Jk extends Fg{constructor(){super(...arguments);se(this,"priority",Xk);se(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:qe(n,Zk(n,Date))}}class Ne{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new Qk(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class eI extends Ne{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 ct={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}/},vn={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 ut(e,t){return e&&{value:t(e.value),rest:e.rest}}function Je(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function bn(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*GP+s*UP+i*YP),rest:t.slice(n[0].length)}}function Lg(e){return Je(ct.anyDigitsSigned,e)}function rt(e,t){switch(e){case 1:return Je(ct.singleDigit,t);case 2:return Je(ct.twoDigits,t);case 3:return Je(ct.threeDigits,t);case 4:return Je(ct.fourDigits,t);default:return Je(new RegExp("^\\d{1,"+e+"}"),t)}}function Hi(e,t){switch(e){case 1:return Je(ct.singleDigitSigned,t);case 2:return Je(ct.twoDigitsSigned,t);case 3:return Je(ct.threeDigitsSigned,t);case 4:return Je(ct.fourDigitsSigned,t);default:return Je(new RegExp("^-?\\d{1,"+e+"}"),t)}}function zc(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 Vg(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 $g(e){return e%400===0||e%4===0&&e%100!==0}class tI extends Ne{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 ut(rt(4,n),s);case"yo":return ut(o.ordinalNumber(n,{unit:"year"}),s);default:return ut(rt(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=Vg(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 nI extends Ne{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 ut(rt(4,n),s);case"Yo":return ut(o.ordinalNumber(n,{unit:"year"}),s);default:return ut(rt(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=jc(n,s);if(o.isTwoDigitYear){const l=Vg(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),yn(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),yn(n,s)}}class rI extends Ne{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 Hi(r==="R"?4:r.length,n)}set(n,r,o){const s=qe(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),mo(s)}}class oI extends Ne{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 Hi(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class sI extends Ne{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 rt(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 iI extends Ne{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 rt(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class aI extends Ne{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 ut(Je(ct.month,n),s);case"MM":return ut(rt(2,n),s);case"Mo":return ut(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 lI extends Ne{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 ut(Je(ct.month,n),s);case"LL":return ut(rt(2,n),s);case"Lo":return ut(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 cI(e,t,n){const r=De(e),o=kg(r,n)-t;return r.setDate(r.getDate()-o*7),r}class uI extends Ne{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 Je(ct.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return rt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return yn(cI(n,o,s),s)}}function dI(e,t){const n=De(e),r=Pg(n)-t;return n.setDate(n.getDate()-r*7),n}class fI extends Ne{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 Je(ct.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return rt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return mo(dI(n,o))}}const hI=[31,28,31,30,31,30,31,31,30,31,30,31],pI=[31,29,31,30,31,30,31,31,30,31,30,31];class mI extends Ne{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 Je(ct.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return rt(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=$g(o),i=n.getMonth();return s?r>=1&&r<=pI[i]:r>=1&&r<=hI[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class gI extends Ne{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 Je(ct.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return rt(r.length,n)}}validate(n,r){const o=n.getFullYear();return $g(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 Hc(e,t,n){var d,h,f,p;const r=Cr(),o=(n==null?void 0:n.weekStartsOn)??((h=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??0,s=De(e),i=s.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(i+c)%7:(l+c)%7-(i+c)%7;return po(s,u)}class yI extends Ne{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=Hc(n,o,s),n.setHours(0,0,0,0),n}}class vI extends Ne{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 ut(rt(r.length,n),i);case"eo":return ut(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=Hc(n,o,s),n.setHours(0,0,0,0),n}}class bI extends Ne{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 ut(rt(r.length,n),i);case"co":return ut(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=Hc(n,o,s),n.setHours(0,0,0,0),n}}function wI(e,t){const n=De(e),r=Yk(n),o=t-r;return po(n,o)}class xI extends Ne{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 rt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return ut(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 ut(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return ut(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return ut(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=wI(n,o),n.setHours(0,0,0,0),n}}class SI extends Ne{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(zc(o),0,0,0),n}}class TI extends Ne{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(zc(o),0,0,0),n}}class EI extends Ne{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(zc(o),0,0,0),n}}class CI extends Ne{constructor(){super(...arguments);se(this,"priority",70);se(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Je(ct.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return rt(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 PI extends Ne{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 Je(ct.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return rt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class kI extends Ne{constructor(){super(...arguments);se(this,"priority",70);se(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Je(ct.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return rt(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 II extends Ne{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 Je(ct.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return rt(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 OI extends Ne{constructor(){super(...arguments);se(this,"priority",60);se(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Je(ct.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return rt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class AI extends Ne{constructor(){super(...arguments);se(this,"priority",50);se(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Je(ct.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return rt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class _I extends Ne{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 ut(rt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class MI extends Ne{constructor(){super(...arguments);se(this,"priority",10);se(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return bn(vn.basicOptionalMinutes,n);case"XX":return bn(vn.basic,n);case"XXXX":return bn(vn.basicOptionalSeconds,n);case"XXXXX":return bn(vn.extendedOptionalSeconds,n);case"XXX":default:return bn(vn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-zi(n)-o)}}class DI extends Ne{constructor(){super(...arguments);se(this,"priority",10);se(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return bn(vn.basicOptionalMinutes,n);case"xx":return bn(vn.basic,n);case"xxxx":return bn(vn.basicOptionalSeconds,n);case"xxxxx":return bn(vn.extendedOptionalSeconds,n);case"xxx":default:return bn(vn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-zi(n)-o)}}class NI extends Ne{constructor(){super(...arguments);se(this,"priority",40);se(this,"incompatibleTokens","*")}parse(n){return Lg(n)}set(n,r,o){return[qe(n,o*1e3),{timestampIsSet:!0}]}}class FI extends Ne{constructor(){super(...arguments);se(this,"priority",20);se(this,"incompatibleTokens","*")}parse(n){return Lg(n)}set(n,r,o){return[qe(n,o),{timestampIsSet:!0}]}}const LI={G:new eI,y:new tI,Y:new nI,R:new rI,u:new oI,Q:new sI,q:new iI,M:new aI,L:new lI,w:new uI,I:new fI,d:new mI,D:new gI,E:new yI,e:new vI,c:new bI,i:new xI,a:new SI,b:new TI,B:new EI,h:new CI,H:new PI,K:new kI,k:new II,m:new OI,s:new AI,S:new _I,X:new MI,x:new DI,t:new NI,T:new FI},VI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$I=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,RI=/^'([^]*?)'?$/,jI=/''/g,BI=/\S/,WI=/[a-zA-Z]/;function zI(e,t,n,r){var m,v,g,w;const o=Gk(),s=o.locale??Cg,i=o.firstWeekContainsDate??((v=(m=o.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??1,a=o.weekStartsOn??((w=(g=o.locale)==null?void 0:g.options)==null?void 0:w.weekStartsOn)??0;if(t==="")return e===""?De(n):qe(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new Jk],u=t.match($I).map(y=>{const T=y[0];if(T in Bc){const S=Bc[T];return S(y,s.formatLong)}return y}).join("").match(VI),d=[];for(let y of u){Ng(y)&&Wc(y,t,e),Dg(y)&&Wc(y,t,e);const T=y[0],S=LI[T];if(S){const{incompatibleTokens:E}=S;if(Array.isArray(E)){const P=d.find(O=>E.includes(O.token)||O.token===T);if(P)throw new RangeError(`The format string mustn't contain \`${P.fullToken}\` and \`${y}\` at the same time`)}else if(S.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:T,fullToken:y});const I=S.run(e,y,s.match,l);if(!I)return qe(n,NaN);c.push(I.setter),e=I.rest}else{if(T.match(WI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(y==="''"?y="'":T==="'"&&(y=HI(y)),e.indexOf(y)===0)e=e.slice(y.length);else return qe(n,NaN)}}if(e.length>0&&BI.test(e))return qe(n,NaN);const h=c.map(y=>y.priority).sort((y,T)=>T-y).filter((y,T,S)=>S.indexOf(y)===T).map(y=>c.filter(T=>T.priority===y).sort((T,S)=>S.subPriority-T.subPriority)).map(y=>y[0]);let f=De(n);if(isNaN(f.getTime()))return qe(n,NaN);const p={};for(const y of h){if(!y.validate(f,l))return qe(n,NaN);const T=y.set(f,p,l);Array.isArray(T)?(f=T[0],Object.assign(p,T[1])):f=T}return qe(n,f)}function HI(e){return e.match(RI)[1].replace(jI,"'")}function UI(e,t){const n=De(e),r=De(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function GI(e){return QP(e,XP(e))}function YI(e,t){return po(e,-t)}function Rg(e,t){return Wi(e,-t)}function qI(e,t){return wg(e,-t)}function KI(e,t){return xg(e,-t)}var dt=function(){return dt=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},dt.apply(this,arguments)};function Uc(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 Gc(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 Os=function(e){return e.replace(new RegExp(" ","g")," ")},jg=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},ZI=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Bg=function(e,t,n){var r=e.length-2,o=ZI(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},Wg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Ui=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},XI=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Yc=function(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t},QI=function(e){return e==="money"||e==="currency"},JI=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return dt(dt({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Gi=function(e,t){var n=jg(Wg(e),t.fraction.length),r="".concat(t.currency).concat(Bg(n,t.group,t.decimal));return Os(r)},eO=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=Uc(e,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(t,function(){return u.current});var d=b.useMemo(function(){var p=JI(r,s,a);return p.currency=Os("".concat(p.currency.trim()," ")),p.literal=Os(p.literal.trim()),p},[r,s]),h=function(p){var m=Gi(p.target.value,d),v=Ui(m);p.target.value=m,p.target.setAttribute("data-number",v.toString()),l==null||l(p),v!==0&&(u.current.selectionEnd=m.length)};b.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=Gi(p,d),v=Ui(m);u.current.value=m,u.current.setAttribute("data-number",v.toString());var g=new InputEvent("change",{});l==null||l(dt(dt({},g),{target:u.current,currentTarget:u.current})),v!==0&&(u.current.selectionEnd=m.length)}}},[d]);var f=c.defaultValue?Gi(c.defaultValue,d):void 0;return b.createElement("input",dt({},c,{value:typeof c.value=="string"?Gi(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:h,inputMode:"decimal"}))}),tO=1,nO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},rO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return dt(dt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Yi=function(e,t){var n=jg(Wg(e),t.fraction.length),r="".concat(Bg(n,t.group,t.decimal)," ").concat(t.percentSign);return Os(r)},oO=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=Uc(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=Gc(b.useState(function(){var g,w;return(w=(g=i.value)===null||g===void 0?void 0:g.toString())!==null&&w!==void 0?w:""}),2),c=l[0],u=l[1];b.useImperativeHandle(t,function(){return a.current}),b.useEffect(function(){var g,w=Number.parseFloat("".concat((g=i.value)!==null&&g!==void 0?g:"0")).toFixed(d.fraction.length);u(Yi(w,d))},[i.value]);var d=b.useMemo(function(){var g=rO(r);return g.percentSign=Os("".concat(g.percentSign)),g},[r]),h=c.length-d.percentSign.length-tO,f=function(g){var w,y=a.current;y&&(y.setSelectionRange(h,h),g&&((w=i.onFocus)===null||w===void 0||w.call(i,g)))},p=function(g){var w=g.currentTarget;if(w.selectionStart!==null){var y=w.selectionStart,T=w.selectionEnd,S=y!==T,E=h<y;!S&&E&&f()}s==null||s(g)},m=function(g){var w=Yi(g.target.value,d),y=Ui(w);u(w),g.target.value=w,g.target.setAttribute("data-number",y.toString()),o==null||o(g)};b.useEffect(function(){if(a.current!==null){var g=a.current.value;if(g!==""){var w=Yi(g,d),y=Ui(w);u(w),a.current.value=w,a.current.setAttribute("data-number",y.toString());var T=new InputEvent("change",{});o==null||o(dt(dt({},T),{target:a.current,currentTarget:a.current}))}}},[]),b.useEffect(function(){return f()},[c]);var v=i.defaultValue?Yi(i.defaultValue,d):void 0;return b.createElement("input",dt({},i,{defaultValue:v,inputMode:"decimal",onChange:m,onFocus:f,onKeyUp:p,ref:a,type:"text"}))}),As={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},sO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=qi[s];i===void 0?r.push(s.replace(As.dots,"\\.").replace(As.openParenthesis,"\\(").replace(As.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(As.leadingBars,"\\")},_s=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return qc(o,n);var s=sO(o);return n?"^".concat(s,"$"):s},iO=function(e){return e.replace(As.escape,"\\$&")},qc=function(e,t){var n=e.map(function(r){return typeof r=="string"?iO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},qi={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},aO=/\d/,zg="(dd) 9dddd-dddd",Hg="(dd) dddd-dddd",Ug="ddd.ddd.ddd-dd",Gg="dd.ddd.ddd/dddd-dd",Ki=function(e){return e.replace(/\D/g,"")},lO=["2",/[0-3]/,":",/[0-5]/,/\d/],cO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],jt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Ug,isoDate:"dddd-dd-dd",cnpj:Gg,telephone:Hg,cellphone:zg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Ki(e).length<=11?Ug:Gg},int:function(e){return e===void 0&&(e=""),aO.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=Ki(e);return t.length<11?Hg:zg},time:function(e){var t=Ki(e),n=t[0];return n==="2"?lO:cO}},Bt=function(e,t,n){var r;return n===void 0&&(n={}),dt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:_s(e,"",!0),infinity:n.infinity},n)},_t={cellTelephone:Bt(jt.cellTelephone,"tel"),cellphone:Bt(jt.cellphone,"tel"),cep:Bt(jt.cep,"decimal"),cnpj:Bt(jt.cnpj,"decimal"),color:Bt(jt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Bt(jt.cpf,"decimal"),cpfCnpj:Bt(jt.cpfCnpj,"decimal",{transform:Ki}),creditCard:Bt(jt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Bt(jt.date,"decimal"),int:Bt(jt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Bt(jt.isoDate,"decimal"),telephone:Bt(jt.telephone,"tel"),time:Bt(jt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Bt(jt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Yg(e,t,n,r){var o,s;r===void 0&&(r=qi);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],h=i[c];if(d===void 0){a+=u,h===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(h)&&(a+=(s=(o=f.parse)===null||o===void 0?void 0:o.call(f,h))!==null&&s!==void 0?s:h),c+=1,l+=1}return a}var qg=function(e){return e},uO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(_s(e,n,t));return r.test(n)};function dO(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t.current}var fO=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,h=e.as,f=Uc(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=Yc(a),v=Yc(d),g=Yc(u),w=b.useRef(uO(u,s,f.value||f.defaultValue)),y=h??"input",T=Gc(b.useState(""),2),S=T[0],E=T[1],I=dO(S),P=b.useCallback(function(_,N){var $,H,U=($=_??N)!==null&&$!==void 0?$:"";if(u===void 0)return U;var A=(H=U==null?void 0:U.toString())!==null&&H!==void 0?H:"";return Yg(A,typeof u=="function"?u(A):u,i??qg,c??qi)},[i,u,c]),O=Gc(b.useState(function(){return P(f.value,f.defaultValue)}),2),C=O[0],L=O[1],D=P(f.defaultValue,f.defaultValue),V=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var _=u(C);return Array.isArray(_)?qc(_,s):_s(u,C,s)}return typeof u=="string"?_s(u,C,s):qc(u,s)},[l,C,s,u]);b.useEffect(function(){if(f.value!==void 0){var _=P(f.value,f.defaultValue);L(_),p.current!==null&&(p.current.value=_)}},[f.value,u,i,f.defaultValue]);var k=function(_){var N,$,H,U,A,R=_.currentTarget,Z=_.target.value;if(g.current===void 0)return L(Z),(N=v.current)===null||N===void 0||N.call(v,Z),($=m.current)===null||$===void 0||$.call(m,_),d==null?void 0:d(Z);var re=new RegExp(_s(g.current,Z,s)),ee=(H=R.selectionEnd)!==null&&H!==void 0?H:0,Y=function(W,te,B){if(W.type!=="number")return W.setSelectionRange(te,B)};if(r&&w.current&&Z.length>=C.length)return R.value=C,Y(R,ee-1,ee-1);var F=!1;Z.length<I.length&&(w.current=!1,F=!0),re.test(Z)&&(w.current=!0);var j=ee,z=Z[j-1],G=Yg(Z,typeof g.current=="function"?g.current(Z):g.current,i??qg,c??qi);for(R.value=G,L(G);j<G.length&&G.charAt(j-1)!==z;)j+=1;F?Y(R,ee,ee):Y(R,j,j),_.target.value=G,E(G),(U=v.current)===null||U===void 0||U.call(v,G),(A=m.current)===null||A===void 0||A.call(m,_)};return b.createElement(y,dt({},f,{ref:p,pattern:V,onChange:k,defaultValue:Kg(f.defaultValue)?D:void 0,value:Kg(f.value)?P(f.value,f.value):f.value}))}),Kg=function(e){return typeof e=="string"},Zg=b.forwardRef(function(e,t){return QI(e.mask)?b.createElement(eO,dt({},e,{mask:void 0,ref:t})):nO(e.mask)?b.createElement(oO,dt({},e,{mask:void 0,ref:t})):b.createElement(fO,dt({},e,{ref:t}))}),Wt=function(e){return function(t){return b.createElement(Zg,dt({},e,t))}};Wt(_t.cellTelephone),Wt(_t.cellphone),Wt(_t.cep),Wt(_t.cnpj),Wt(_t.color),Wt(_t.cpf),Wt(_t.cpfCnpj),Wt(_t.creditCard),Wt(_t.date),Wt(_t.int),Wt(_t.isoDate),Wt(_t.telephone),Wt(_t.time),Wt(_t.uuid);var Xg=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&XI(_t,t.mask)?_t[t.mask]:{mask:t.mask}},[t.mask]),o=dt(dt({},t),r);return b.createElement(Zg,dt({},o,{ref:n}))}),Kc={},Zc={exports:{}},Xc={};/**
142
+ */const am=Ue("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),lm={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},EC={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},cm=e=>x.jsx(mt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,animate:e.open.toString(),"aria-hidden":!e.open,className:e.className,exit:lm.false,transition:EC,variants:lm,children:e.children}),CC=Po("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),PC=b.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...s},a){return x.jsx("div",{"data-open":!!i,"aria-hidden":!i,className:"pointer-events-none w-full isolate data-[open=true]:pointer-events-auto data-[open=true]:mb-4",children:x.jsx(cm,{"data-open":!!i,open:!!i,children:x.jsxs(Ir,{...s,className:Ne(CC({theme:n}),t),ref:a,"data-theme":n,role:"alert",as:s.as??"div",children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(im,{size:20}):null,!r&&n==="info"?x.jsx(sm,{size:20}):null,!r&&n==="danger"?x.jsx(xC,{size:20}):null,r,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:()=>o(!1),className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:x.jsx(am,{size:20})}):null]})})})});function Te(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 Be(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Hr(e,t){const n=Te(e);return isNaN(t)?Be(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function ss(e,t){const n=Te(e);if(isNaN(t))return Be(e,NaN);if(!t)return n;const r=n.getDate(),o=Be(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 um=6048e5,IC=864e5,AC=6e4,OC=36e5,kC=1e3;let DC={};function or(){return DC}function tn(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=Te(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 Wr(e){return tn(e,{weekStartsOn:1})}function fm(e){const t=Te(e),n=t.getFullYear(),r=Be(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=Wr(r),i=Be(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=Wr(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function zr(e){const t=Te(e);return t.setHours(0,0,0,0),t}function as(e){const t=Te(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 MC(e,t){const n=zr(e),r=zr(t),o=+n-as(n),i=+r-as(r);return Math.round((o-i)/IC)}function FC(e){const t=fm(e),n=Be(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Wr(n)}function dm(e,t){const n=t*7;return Hr(e,n)}function hm(e,t){return ss(e,t*12)}function LC(e){return Be(e,Date.now())}function NC(e,t){const n=zr(e),r=zr(t);return+n==+r}function _C(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function pm(e){if(!_C(e)&&typeof e!="number")return!1;const t=Te(e);return!isNaN(Number(t))}function mm(e,t){const n=Te(e.start),r=Te(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(Te(s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function gm(e){const t=Te(e);return t.setDate(1),t.setHours(0,0,0,0),t}function VC(e){const t=Te(e),n=Be(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function $C(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=Te(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 BC={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"}},jC=(e,t,n)=>{let r;const o=BC[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 Rl(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const RC={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},HC={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},WC={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},zC={date:Rl({formats:RC,defaultWidth:"full"}),time:Rl({formats:HC,defaultWidth:"full"}),dateTime:Rl({formats:WC,defaultWidth:"full"})},GC={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},UC=(e,t,n,r)=>GC[e];function Zo(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 YC={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qC={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},KC={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"]},XC={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"]},QC={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"}},ZC={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"}},JC={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:Zo({values:YC,defaultWidth:"wide"}),quarter:Zo({values:qC,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Zo({values:KC,defaultWidth:"wide"}),day:Zo({values:XC,defaultWidth:"wide"}),dayPeriod:Zo({values:QC,defaultWidth:"wide",formattingValues:ZC,defaultFormattingWidth:"wide"})};function Jo(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)?tP(a,f=>f.test(s)):eP(a,f=>f.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 eP(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function tP(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function nP(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 rP=/^(\d+)(th|st|nd|rd)?/i,oP=/\d+/i,iP={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},sP={any:[/^b/i,/^(a|c)/i]},aP={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},lP={any:[/1/i,/2/i,/3/i,/4/i]},cP={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},uP={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]},fP={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},dP={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]},hP={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},pP={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}},mP={ordinalNumber:nP({matchPattern:rP,parsePattern:oP,valueCallback:e=>parseInt(e,10)}),era:Jo({matchPatterns:iP,defaultMatchWidth:"wide",parsePatterns:sP,defaultParseWidth:"any"}),quarter:Jo({matchPatterns:aP,defaultMatchWidth:"wide",parsePatterns:lP,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Jo({matchPatterns:cP,defaultMatchWidth:"wide",parsePatterns:uP,defaultParseWidth:"any"}),day:Jo({matchPatterns:fP,defaultMatchWidth:"wide",parsePatterns:dP,defaultParseWidth:"any"}),dayPeriod:Jo({matchPatterns:hP,defaultMatchWidth:"any",parsePatterns:pP,defaultParseWidth:"any"})},ym={code:"en-US",formatDistance:jC,formatLong:zC,formatRelative:UC,localize:JC,match:mP,options:{weekStartsOn:0,firstWeekContainsDate:1}};function gP(e){const t=Te(e);return MC(t,VC(t))+1}function vm(e){const t=Te(e),n=+Wr(t)-+FC(t);return Math.round(n/um)+1}function Hl(e,t){var u,f,h,d;const n=Te(e),r=n.getFullYear(),o=or(),i=(t==null?void 0:t.firstWeekContainsDate)??((f=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((d=(h=o.locale)==null?void 0:h.options)==null?void 0:d.firstWeekContainsDate)??1,s=Be(e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=tn(s,t),l=Be(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=tn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function yP(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=Hl(e,t),i=Be(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),tn(i,t)}function bm(e,t){const n=Te(e),r=+tn(n,t)-+yP(n,t);return Math.round(r/um)+1}function Oe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ln={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Oe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Oe(n+1,2)},d(e,t){return Oe(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 Oe(e.getHours()%12||12,t.length)},H(e,t){return Oe(e.getHours(),t.length)},m(e,t){return Oe(e.getMinutes(),t.length)},s(e,t){return Oe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Oe(o,t.length)}},Gr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wm={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 Ln.y(e,t)},Y:function(e,t,n,r){const o=Hl(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return Oe(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Oe(i,t.length)},R:function(e,t){const n=fm(e);return Oe(n,t.length)},u:function(e,t){const n=e.getFullYear();return Oe(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 Oe(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 Oe(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 Ln.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 Oe(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=bm(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Oe(o,t.length)},I:function(e,t,n){const r=vm(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Oe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ln.d(e,t)},D:function(e,t,n){const r=gP(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Oe(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 Oe(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 Oe(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 Oe(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=Gr.noon:r===0?o=Gr.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=Gr.evening:r>=12?o=Gr.afternoon:r>=4?o=Gr.morning:o=Gr.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 Ln.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ln.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Oe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Oe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ln.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ln.s(e,t)},S:function(e,t){return Ln.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Sm(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 Sm(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"+xm(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"+xm(r,":");case"zzzz":default:return"GMT"+ir(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Oe(r,t.length)},T:function(e,t,n){const r=e.getTime();return Oe(r,t.length)}};function xm(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+Oe(i,2)}function Sm(e,t){return e%60===0?(e>0?"-":"+")+Oe(Math.abs(e)/60,2):ir(e,t)}function ir(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Oe(Math.trunc(r/60),2),i=Oe(r%60,2);return n+o+t+i}const Tm=(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"})}},Em=(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"})}},Wl={p:Em,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Tm(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}}",Tm(r,t)).replace("{{time}}",Em(o,t))}},vP=/^D+$/,bP=/^Y+$/,wP=["D","DD","YY","YYYY"];function Cm(e){return vP.test(e)}function Pm(e){return bP.test(e)}function zl(e,t,n){const r=xP(e,t,n);if(console.warn(r),wP.includes(e))throw new RangeError(r)}function xP(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 SP=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,TP=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,EP=/^'([^]*?)'?$/,CP=/''/g,PP=/[a-zA-Z]/;function IP(e,t,n){var u,f,h,d;const r=or(),o=r.locale??ym,i=r.firstWeekContainsDate??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,s=r.weekStartsOn??((d=(h=r.locale)==null?void 0:h.options)==null?void 0:d.weekStartsOn)??0,a=Te(e);if(!pm(a))throw new RangeError("Invalid time value");let l=t.match(TP).map(p=>{const m=p[0];if(m==="p"||m==="P"){const v=Wl[m];return v(p,o.formatLong)}return p}).join("").match(SP).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:AP(p)};if(wm[m])return{isToken:!0,value:p};if(m.match(PP))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;(Pm(m)||Cm(m))&&zl(m,t,String(e));const v=wm[m[0]];return v(a,m,o.localize,c)}).join("")}function AP(e){const t=e.match(EP);return t?t[1].replace(CP,"'"):e}function OP(){return Object.assign({},or())}function kP(e){let n=Te(e).getDay();return n===0&&(n=7),n}function DP(e,t){const n=Te(e),r=Te(t);return n.getTime()>r.getTime()}function MP(e,t){const n=Te(e),r=Te(t);return+n<+r}function FP(e,t){const n=t instanceof Date?Be(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 LP=10;class Im{constructor(){ne(this,"subPriority",0)}validate(t,n){return!0}}class NP extends Im{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 _P extends Im{constructor(){super(...arguments);ne(this,"priority",LP);ne(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Be(n,FP(n,Date))}}class Ee{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new NP(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class VP extends Ee{constructor(){super(...arguments);ne(this,"priority",140);ne(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 Je={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}/},nn={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 et(e,t){return e&&{value:t(e.value),rest:e.rest}}function We(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function rn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(o*OC+i*AC+s*kC),rest:t.slice(n[0].length)}}function Am(e){return We(Je.anyDigitsSigned,e)}function Ye(e,t){switch(e){case 1:return We(Je.singleDigit,t);case 2:return We(Je.twoDigits,t);case 3:return We(Je.threeDigits,t);case 4:return We(Je.fourDigits,t);default:return We(new RegExp("^\\d{1,"+e+"}"),t)}}function ls(e,t){switch(e){case 1:return We(Je.singleDigitSigned,t);case 2:return We(Je.twoDigitsSigned,t);case 3:return We(Je.threeDigitsSigned,t);case 4:return We(Je.fourDigitsSigned,t);default:return We(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Gl(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 Om(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 km(e){return e%400===0||e%4===0&&e%100!==0}class $P extends Ee{constructor(){super(...arguments);ne(this,"priority",130);ne(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 et(Ye(4,n),i);case"yo":return et(o.ordinalNumber(n,{unit:"year"}),i);default:return et(Ye(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=Om(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 BP extends Ee{constructor(){super(...arguments);ne(this,"priority",130);ne(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 et(Ye(4,n),i);case"Yo":return et(o.ordinalNumber(n,{unit:"year"}),i);default:return et(Ye(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const s=Hl(n,i);if(o.isTwoDigitYear){const l=Om(o.year,s);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),tn(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),tn(n,i)}}class jP extends Ee{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return ls(r==="R"?4:r.length,n)}set(n,r,o){const i=Be(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),Wr(i)}}class RP extends Ee{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return ls(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class HP extends Ee{constructor(){super(...arguments);ne(this,"priority",120);ne(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 Ye(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 WP extends Ee{constructor(){super(...arguments);ne(this,"priority",120);ne(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 Ye(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 zP extends Ee{constructor(){super(...arguments);ne(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ne(this,"priority",110)}parse(n,r,o){const i=s=>s-1;switch(r){case"M":return et(We(Je.month,n),i);case"MM":return et(Ye(2,n),i);case"Mo":return et(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 GP extends Ee{constructor(){super(...arguments);ne(this,"priority",110);ne(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 et(We(Je.month,n),i);case"LL":return et(Ye(2,n),i);case"Lo":return et(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 UP(e,t,n){const r=Te(e),o=bm(r,n)-t;return r.setDate(r.getDate()-o*7),r}class YP extends Ee{constructor(){super(...arguments);ne(this,"priority",100);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return We(Je.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return Ye(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return tn(UP(n,o,i),i)}}function qP(e,t){const n=Te(e),r=vm(n)-t;return n.setDate(n.getDate()-r*7),n}class KP extends Ee{constructor(){super(...arguments);ne(this,"priority",100);ne(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 We(Je.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return Ye(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Wr(qP(n,o))}}const XP=[31,28,31,30,31,30,31,31,30,31,30,31],QP=[31,29,31,30,31,30,31,31,30,31,30,31];class ZP extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"subPriority",1);ne(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return We(Je.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return Ye(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=km(o),s=n.getMonth();return i?r>=1&&r<=QP[s]:r>=1&&r<=XP[s]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class JP extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"subpriority",1);ne(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 We(Je.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return Ye(r.length,n)}}validate(n,r){const o=n.getFullYear();return km(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 Ul(e,t,n){var f,h,d,p;const r=or(),o=(n==null?void 0:n.weekStartsOn)??((h=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((p=(d=r.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,i=Te(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 Hr(i,u)}class eI extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(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=Ul(n,o,i),n.setHours(0,0,0,0),n}}class tI extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(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 et(Ye(r.length,n),s);case"eo":return et(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=Ul(n,o,i),n.setHours(0,0,0,0),n}}class nI extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(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 et(Ye(r.length,n),s);case"co":return et(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=Ul(n,o,i),n.setHours(0,0,0,0),n}}function rI(e,t){const n=Te(e),r=kP(n),o=t-r;return Hr(n,o)}class oI extends Ee{constructor(){super(...arguments);ne(this,"priority",90);ne(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 Ye(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return et(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 et(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return et(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return et(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=rI(n,o),n.setHours(0,0,0,0),n}}class iI extends Ee{constructor(){super(...arguments);ne(this,"priority",80);ne(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(Gl(o),0,0,0),n}}class sI extends Ee{constructor(){super(...arguments);ne(this,"priority",80);ne(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(Gl(o),0,0,0),n}}class aI extends Ee{constructor(){super(...arguments);ne(this,"priority",80);ne(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(Gl(o),0,0,0),n}}class lI extends Ee{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return We(Je.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return Ye(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 cI extends Ee{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return We(Je.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return Ye(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class uI extends Ee{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return We(Je.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return Ye(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 fI extends Ee{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return We(Je.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return Ye(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 dI extends Ee{constructor(){super(...arguments);ne(this,"priority",60);ne(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return We(Je.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return Ye(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class hI extends Ee{constructor(){super(...arguments);ne(this,"priority",50);ne(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return We(Je.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return Ye(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class pI extends Ee{constructor(){super(...arguments);ne(this,"priority",30);ne(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return et(Ye(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class mI extends Ee{constructor(){super(...arguments);ne(this,"priority",10);ne(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return rn(nn.basicOptionalMinutes,n);case"XX":return rn(nn.basic,n);case"XXXX":return rn(nn.basicOptionalSeconds,n);case"XXXXX":return rn(nn.extendedOptionalSeconds,n);case"XXX":default:return rn(nn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Be(n,n.getTime()-as(n)-o)}}class gI extends Ee{constructor(){super(...arguments);ne(this,"priority",10);ne(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return rn(nn.basicOptionalMinutes,n);case"xx":return rn(nn.basic,n);case"xxxx":return rn(nn.basicOptionalSeconds,n);case"xxxxx":return rn(nn.extendedOptionalSeconds,n);case"xxx":default:return rn(nn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Be(n,n.getTime()-as(n)-o)}}class yI extends Ee{constructor(){super(...arguments);ne(this,"priority",40);ne(this,"incompatibleTokens","*")}parse(n){return Am(n)}set(n,r,o){return[Be(n,o*1e3),{timestampIsSet:!0}]}}class vI extends Ee{constructor(){super(...arguments);ne(this,"priority",20);ne(this,"incompatibleTokens","*")}parse(n){return Am(n)}set(n,r,o){return[Be(n,o),{timestampIsSet:!0}]}}const bI={G:new VP,y:new $P,Y:new BP,R:new jP,u:new RP,Q:new HP,q:new WP,M:new zP,L:new GP,w:new YP,I:new KP,d:new ZP,D:new JP,E:new eI,e:new tI,c:new nI,i:new oI,a:new iI,b:new sI,B:new aI,h:new lI,H:new cI,K:new uI,k:new fI,m:new dI,s:new hI,S:new pI,X:new mI,x:new gI,t:new yI,T:new vI},wI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,SI=/^'([^]*?)'?$/,TI=/''/g,EI=/\S/,CI=/[a-zA-Z]/;function PI(e,t,n,r){var m,v,g,w;const o=OP(),i=o.locale??ym,s=o.firstWeekContainsDate??((v=(m=o.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??1,a=o.weekStartsOn??((w=(g=o.locale)==null?void 0:g.options)==null?void 0:w.weekStartsOn)??0;if(t==="")return e===""?Te(n):Be(n,NaN);const l={firstWeekContainsDate:s,weekStartsOn:a,locale:i},c=[new _P],u=t.match(xI).map(y=>{const T=y[0];if(T in Wl){const S=Wl[T];return S(y,i.formatLong)}return y}).join("").match(wI),f=[];for(let y of u){Pm(y)&&zl(y,t,e),Cm(y)&&zl(y,t,e);const T=y[0],S=bI[T];if(S){const{incompatibleTokens:E}=S;if(Array.isArray(E)){const P=f.find(O=>E.includes(O.token)||O.token===T);if(P)throw new RangeError(`The format string mustn't contain \`${P.fullToken}\` and \`${y}\` at the same time`)}else if(S.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${y}\` and any other token at the same time`);f.push({token:T,fullToken:y});const A=S.run(e,y,i.match,l);if(!A)return Be(n,NaN);c.push(A.setter),e=A.rest}else{if(T.match(CI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(y==="''"?y="'":T==="'"&&(y=II(y)),e.indexOf(y)===0)e=e.slice(y.length);else return Be(n,NaN)}}if(e.length>0&&EI.test(e))return Be(n,NaN);const h=c.map(y=>y.priority).sort((y,T)=>T-y).filter((y,T,S)=>S.indexOf(y)===T).map(y=>c.filter(T=>T.priority===y).sort((T,S)=>S.subPriority-T.subPriority)).map(y=>y[0]);let d=Te(n);if(isNaN(d.getTime()))return Be(n,NaN);const p={};for(const y of h){if(!y.validate(d,l))return Be(n,NaN);const T=y.set(d,p,l);Array.isArray(T)?(d=T[0],Object.assign(p,T[1])):d=T}return Be(n,d)}function II(e){return e.match(SI)[1].replace(TI,"'")}function AI(e,t){const n=Te(e),r=Te(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function OI(e){return NC(e,LC(e))}function kI(e,t){return Hr(e,-t)}function Dm(e,t){return ss(e,-t)}function DI(e,t){return dm(e,-t)}function MI(e,t){return hm(e,-t)}var tt=function(){return tt=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},tt.apply(this,arguments)};function Yl(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 ql(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 ei=function(e){return e.replace(new RegExp(" ","g")," ")},Mm=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)},FI=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Fm=function(e,t,n){var r=e.length-2,o=FI(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Lm=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},cs=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},LI=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Kl=function(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t},NI=function(e){return e==="money"||e==="currency"},_I=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return tt(tt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},us=function(e,t){var n=Mm(Lm(e),t.fraction.length),r="".concat(t.currency).concat(Fm(n,t.group,t.decimal));return ei(r)},VI=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=Yl(e,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(t,function(){return u.current});var f=b.useMemo(function(){var p=_I(r,i,a);return p.currency=ei("".concat(p.currency.trim()," ")),p.literal=ei(p.literal.trim()),p},[r,i]),h=function(p){var m=us(p.target.value,f),v=cs(m);p.target.value=m,p.target.setAttribute("data-number",v.toString()),l==null||l(p),v!==0&&(u.current.selectionEnd=m.length)};b.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=us(p,f),v=cs(m);u.current.value=m,u.current.setAttribute("data-number",v.toString());var g=new InputEvent("change",{});l==null||l(tt(tt({},g),{target:u.current,currentTarget:u.current})),v!==0&&(u.current.selectionEnd=m.length)}}},[f]);var d=c.defaultValue?us(c.defaultValue,f):void 0;return b.createElement("input",tt({},c,{value:typeof c.value=="string"?us(c.value,f):c.value,defaultValue:d,type:"text",ref:u,onChange:h,inputMode:"decimal"}))}),$I=1,BI=function(e){return e==="percentage"||e==="percent"||e==="percentual"},jI=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return tt(tt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},fs=function(e,t){var n=Mm(Lm(e),t.fraction.length),r="".concat(Fm(n,t.group,t.decimal)," ").concat(t.percentSign);return ei(r)},RI=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=Yl(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=ql(b.useState(function(){var g,w;return(w=(g=s.value)===null||g===void 0?void 0:g.toString())!==null&&w!==void 0?w:""}),2),c=l[0],u=l[1];b.useImperativeHandle(t,function(){return a.current}),b.useEffect(function(){var g,w=Number.parseFloat("".concat((g=s.value)!==null&&g!==void 0?g:"0")).toFixed(f.fraction.length);u(fs(w,f))},[s.value]);var f=b.useMemo(function(){var g=jI(r);return g.percentSign=ei("".concat(g.percentSign)),g},[r]),h=c.length-f.percentSign.length-$I,d=function(g){var w,y=a.current;y&&(y.setSelectionRange(h,h),g&&((w=s.onFocus)===null||w===void 0||w.call(s,g)))},p=function(g){var w=g.currentTarget;if(w.selectionStart!==null){var y=w.selectionStart,T=w.selectionEnd,S=y!==T,E=h<y;!S&&E&&d()}i==null||i(g)},m=function(g){var w=fs(g.target.value,f),y=cs(w);u(w),g.target.value=w,g.target.setAttribute("data-number",y.toString()),o==null||o(g)};b.useEffect(function(){if(a.current!==null){var g=a.current.value;if(g!==""){var w=fs(g,f),y=cs(w);u(w),a.current.value=w,a.current.setAttribute("data-number",y.toString());var T=new InputEvent("change",{});o==null||o(tt(tt({},T),{target:a.current,currentTarget:a.current}))}}},[]),b.useEffect(function(){return d()},[c]);var v=s.defaultValue?fs(s.defaultValue,f):void 0;return b.createElement("input",tt({},s,{defaultValue:v,inputMode:"decimal",onChange:m,onFocus:d,onKeyUp:p,ref:a,type:"text"}))}),ti={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},HI=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=ds[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,"\\")},ni=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Xl(o,n);var i=HI(o);return n?"^".concat(i,"$"):i},WI=function(e){return e.replace(ti.escape,"\\$&")},Xl=function(e,t){var n=e.map(function(r){return typeof r=="string"?WI(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},ds={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]/}},zI=/\d/,Nm="(dd) 9dddd-dddd",_m="(dd) dddd-dddd",Vm="ddd.ddd.ddd-dd",$m="dd.ddd.ddd/dddd-dd",hs=function(e){return e.replace(/\D/g,"")},GI=["2",/[0-3]/,":",/[0-5]/,/\d/],UI=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Ot={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Vm,isoDate:"dddd-dd-dd",cnpj:$m,telephone:_m,cellphone:Nm,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return hs(e).length<=11?Vm:$m},int:function(e){return e===void 0&&(e=""),zI.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=hs(e);return t.length<11?_m:Nm},time:function(e){var t=hs(e),n=t[0];return n==="2"?GI:UI}},kt=function(e,t,n){var r;return n===void 0&&(n={}),tt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:ni(e,"",!0),infinity:n.infinity},n)},xt={cellTelephone:kt(Ot.cellTelephone,"tel"),cellphone:kt(Ot.cellphone,"tel"),cep:kt(Ot.cep,"decimal"),cnpj:kt(Ot.cnpj,"decimal"),color:kt(Ot.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:kt(Ot.cpf,"decimal"),cpfCnpj:kt(Ot.cpfCnpj,"decimal",{transform:hs}),creditCard:kt(Ot.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:kt(Ot.date,"decimal"),int:kt(Ot.int,"decimal",{pattern:"[0-9]+"}),isoDate:kt(Ot.isoDate,"decimal"),telephone:kt(Ot.telephone,"tel"),time:kt(Ot.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:kt(Ot.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Bm(e,t,n,r){var o,i;r===void 0&&(r=ds);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],f=u instanceof RegExp?u:r[u],h=s[c];if(f===void 0){a+=u,h===u&&(c+=1),l+=1;continue}var d=f instanceof RegExp?{regex:f}:f;d.regex.test(h)&&(a+=(i=(o=d.parse)===null||o===void 0?void 0:o.call(d,h))!==null&&i!==void 0?i:h),c+=1,l+=1}return a}var jm=function(e){return e},YI=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(ni(e,n,t));return r.test(n)};function qI(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t.current}var KI=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,f=e.onChangeText,h=e.as,d=Yl(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=Kl(a),v=Kl(f),g=Kl(u),w=b.useRef(YI(u,i,d.value||d.defaultValue)),y=h??"input",T=ql(b.useState(""),2),S=T[0],E=T[1],A=qI(S),P=b.useCallback(function(D,L){var $,z,G=($=D??L)!==null&&$!==void 0?$:"";if(u===void 0)return G;var k=(z=G==null?void 0:G.toString())!==null&&z!==void 0?z:"";return Bm(k,typeof u=="function"?u(k):u,s??jm,c??ds)},[s,u,c]),O=ql(b.useState(function(){return P(d.value,d.defaultValue)}),2),C=O[0],_=O[1],F=P(d.defaultValue,d.defaultValue),V=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var D=u(C);return Array.isArray(D)?Xl(D,i):ni(u,C,i)}return typeof u=="string"?ni(u,C,i):Xl(u,i)},[l,C,i,u]);b.useEffect(function(){if(d.value!==void 0){var D=P(d.value,d.defaultValue);_(D),p.current!==null&&(p.current.value=D)}},[d.value,u,s,d.defaultValue]);var I=function(D){var L,$,z,G,k,j=D.currentTarget,K=D.target.value;if(g.current===void 0)return _(K),(L=v.current)===null||L===void 0||L.call(v,K),($=m.current)===null||$===void 0||$.call(m,D),f==null?void 0:f(K);var te=new RegExp(ni(g.current,K,i)),Q=(z=j.selectionEnd)!==null&&z!==void 0?z:0,U=function(Y,ee,H){if(Y.type!=="number")return Y.setSelectionRange(ee,H)};if(r&&w.current&&K.length>=C.length)return j.value=C,U(j,Q-1,Q-1);var N=!1;K.length<A.length&&(w.current=!1,N=!0),te.test(K)&&(w.current=!0);var R=Q,W=K[R-1],B=Bm(K,typeof g.current=="function"?g.current(K):g.current,s??jm,c??ds);for(j.value=B,_(B);R<B.length&&B.charAt(R-1)!==W;)R+=1;N?U(j,Q,Q):U(j,R,R),D.target.value=B,E(B),(G=v.current)===null||G===void 0||G.call(v,B),(k=m.current)===null||k===void 0||k.call(m,D)};return b.createElement(y,tt({},d,{ref:p,pattern:V,onChange:I,defaultValue:Rm(d.defaultValue)?F:void 0,value:Rm(d.value)?P(d.value,d.value):d.value}))}),Rm=function(e){return typeof e=="string"},Hm=b.forwardRef(function(e,t){return NI(e.mask)?b.createElement(VI,tt({},e,{mask:void 0,ref:t})):BI(e.mask)?b.createElement(RI,tt({},e,{mask:void 0,ref:t})):b.createElement(KI,tt({},e,{ref:t}))}),Dt=function(e){return function(t){return b.createElement(Hm,tt({},e,t))}};Dt(xt.cellTelephone),Dt(xt.cellphone),Dt(xt.cep),Dt(xt.cnpj),Dt(xt.color),Dt(xt.cpf),Dt(xt.cpfCnpj),Dt(xt.creditCard),Dt(xt.date),Dt(xt.int),Dt(xt.isoDate),Dt(xt.telephone),Dt(xt.time),Dt(xt.uuid);var Wm=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&LI(xt,t.mask)?xt[t.mask]:{mask:t.mask}},[t.mask]),o=tt(tt({},t),r);return b.createElement(Hm,tt({},o,{ref:n}))}),Ql={},Zl={exports:{}},Jl={};/**
143
143
  * @license React
144
144
  * use-sync-external-store-shim.production.min.js
145
145
  *
@@ -147,7 +147,7 @@
147
147
  *
148
148
  * This source code is licensed under the MIT license found in the
149
149
  * LICENSE file in the root directory of this source tree.
150
- */var Qg;function hO(){if(Qg)return Xc;Qg=1;var e=b;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(d,h){var f=h(),p=r({inst:{value:f,getSnapshot:h}}),m=p[0].inst,v=p[1];return s(function(){m.value=f,m.getSnapshot=h,l(m)&&v({inst:m})},[d,f,h]),o(function(){return l(m)&&v({inst:m}),d(function(){l(m)&&v({inst:m})})},[d]),i(f),f}function l(d){var h=d.getSnapshot;d=d.value;try{var f=h();return!n(d,f)}catch{return!0}}function c(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Xc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Xc}var Jg={};/**
150
+ */var zm;function XI(){if(zm)return Jl;zm=1;var e=b;function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(f,h){var d=h(),p=r({inst:{value:d,getSnapshot:h}}),m=p[0].inst,v=p[1];return i(function(){m.value=d,m.getSnapshot=h,l(m)&&v({inst:m})},[f,d,h]),o(function(){return l(m)&&v({inst:m}),f(function(){l(m)&&v({inst:m})})},[f]),s(d),d}function l(f){var h=f.getSnapshot;f=f.value;try{var d=h();return!n(f,d)}catch{return!0}}function c(f,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Jl.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Jl}var Gm={};/**
151
151
  * @license React
152
152
  * use-sync-external-store-shim.development.js
153
153
  *
@@ -155,7 +155,7 @@
155
155
  *
156
156
  * This source code is licensed under the MIT license found in the
157
157
  * LICENSE file in the root directory of this source tree.
158
- */var ey;function pO(){return ey||(ey=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 T=arguments.length,S=new Array(T>1?T-1:0),E=1;E<T;E++)S[E-1]=arguments[E];r("error",y,S)}}function r(y,T,S){{var E=t.ReactDebugCurrentFrame,I=E.getStackAddendum();I!==""&&(T+="%s",S=S.concat([I]));var P=S.map(function(O){return String(O)});P.unshift("Warning: "+T),Function.prototype.apply.call(console[y],console,P)}}function o(y,T){return y===T&&(y!==0||1/y===1/T)||y!==y&&T!==T}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 h(y,T,S){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=T();if(!d){var I=T();s(E,I)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var P=i({inst:{value:E,getSnapshot:T}}),O=P[0].inst,C=P[1];return l(function(){O.value=E,O.getSnapshot=T,f(O)&&C({inst:O})},[y,E,T]),a(function(){f(O)&&C({inst:O});var L=function(){f(O)&&C({inst:O})};return y(L)},[y]),c(E),E}function f(y){var T=y.getSnapshot,S=y.value;try{var E=T();return!s(S,E)}catch{return!0}}function p(y,T,S){return T()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",v=!m,g=v?p:h,w=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g;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 ty;function ny(){return ty||(ty=1,process.env.NODE_ENV==="production"?Zc.exports=hO():Zc.exports=pO()),Zc.exports}/**
158
+ */var Um;function QI(){return Um||(Um=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 T=arguments.length,S=new Array(T>1?T-1:0),E=1;E<T;E++)S[E-1]=arguments[E];r("error",y,S)}}function r(y,T,S){{var E=t.ReactDebugCurrentFrame,A=E.getStackAddendum();A!==""&&(T+="%s",S=S.concat([A]));var P=S.map(function(O){return String(O)});P.unshift("Warning: "+T),Function.prototype.apply.call(console[y],console,P)}}function o(y,T){return y===T&&(y!==0||1/y===1/T)||y!==y&&T!==T}var i=typeof Object.is=="function"?Object.is:o,s=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,f=!1;function h(y,T,S){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=T();if(!f){var A=T();i(E,A)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var P=s({inst:{value:E,getSnapshot:T}}),O=P[0].inst,C=P[1];return l(function(){O.value=E,O.getSnapshot=T,d(O)&&C({inst:O})},[y,E,T]),a(function(){d(O)&&C({inst:O});var _=function(){d(O)&&C({inst:O})};return y(_)},[y]),c(E),E}function d(y){var T=y.getSnapshot,S=y.value;try{var E=T();return!i(S,E)}catch{return!0}}function p(y,T,S){return T()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",v=!m,g=v?p:h,w=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g;Gm.useSyncExternalStore=w,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Gm}var Ym;function qm(){return Ym||(Ym=1,process.env.NODE_ENV==="production"?Zl.exports=XI():Zl.exports=QI()),Zl.exports}/**
159
159
  * @license React
160
160
  * use-sync-external-store-shim/with-selector.production.min.js
161
161
  *
@@ -163,7 +163,7 @@
163
163
  *
164
164
  * This source code is licensed under the MIT license found in the
165
165
  * LICENSE file in the root directory of this source tree.
166
- */var ry;function mO(){if(ry)return Kc;ry=1;var e=b,t=ny();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 Kc.useSyncExternalStoreWithSelector=function(c,u,d,h,f){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 g(E){if(!w){if(w=!0,y=E,E=h(E),f!==void 0&&m.hasValue){var I=m.value;if(f(I,E))return T=I}return T=E}if(I=T,r(y,E))return I;var P=h(E);return f!==void 0&&f(I,P)?I:(y=E,T=P)}var w=!1,y,T,S=d===void 0?null:d;return[function(){return g(u())},S===null?void 0:function(){return g(S())}]},[u,d,h,f]);var v=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=v},[v]),l(v),v},Kc}var oy={};/**
166
+ */var Km;function ZI(){if(Km)return Ql;Km=1;var e=b,t=qm();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 Ql.useSyncExternalStoreWithSelector=function(c,u,f,h,d){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 g(E){if(!w){if(w=!0,y=E,E=h(E),d!==void 0&&m.hasValue){var A=m.value;if(d(A,E))return T=A}return T=E}if(A=T,r(y,E))return A;var P=h(E);return d!==void 0&&d(A,P)?A:(y=E,T=P)}var w=!1,y,T,S=f===void 0?null:f;return[function(){return g(u())},S===null?void 0:function(){return g(S())}]},[u,f,h,d]);var v=o(c,p[0],p[1]);return s(function(){m.hasValue=!0,m.value=v},[v]),l(v),v},Ql}var Xm={};/**
167
167
  * @license React
168
168
  * use-sync-external-store-shim/with-selector.development.js
169
169
  *
@@ -171,31 +171,31 @@
171
171
  *
172
172
  * This source code is licensed under the MIT license found in the
173
173
  * LICENSE file in the root directory of this source tree.
174
- */var sy;function gO(){return sy||(sy=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=ny();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,h,f,p){var m=s(null),v;m.current===null?(v={hasValue:!1,value:null},m.current=v):v=m.current;var g=a(function(){var S=!1,E,I,P=function(D){if(!S){S=!0,E=D;var V=f(D);if(p!==void 0&&v.hasValue){var k=v.value;if(p(k,V))return I=k,k}return I=V,V}var _=E,N=I;if(r(_,D))return N;var $=f(D);return p!==void 0&&p(N,$)?N:(E=D,I=$,$)},O=h===void 0?null:h,C=function(){return P(d())},L=O===null?void 0:function(){return P(O())};return[C,L]},[d,h,f,p]),w=g[0],y=g[1],T=o(u,w,y);return i(function(){v.hasValue=!0,v.value=T},[T]),l(T),T}oy.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),oy}process.env.NODE_ENV==="production"?mO():gO();const vo=e=>{const t=b.useRef(e??{});return b.useEffect(()=>void(t.current=e),[e]),t},yO=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},vO=e=>Object.entries(e),iy=e=>e instanceof Promise,ay=(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),bO=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,d)=>n(h=>ay(u,h,s,d));return iy(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))},wO=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>ay(c,u,s,o.current));return iy(a)?a.then(c=>l(c)):l(a)},Qc=(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=yO(r),h=vo(d),f=b.useRef(null);b.useEffect(()=>{if(f.current===null)return;const m=f.current;l.current.forEach(v=>{v(r,d,m)})},[r,l,d]);const[p]=b.useState(()=>{const m=()=>i.current,v=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>h.current});return vO(v).reduce((g,[w,y])=>({...g,[w]:n!=null&&n.debug?bO(w,y,o,m,f,c.current):wO(w,y,o,m,f,c.current)}),{})});return[r,p,i.current]},xO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function SO(e,t){return b.useRef(xO(e,t)).current}const Jc={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>)`},Ms=(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(Ms(i,t,n,a))},[]),ly=(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]:ly(i,t,n,a)}},{}),cy={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},eu=(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)},TO={default:e=>eu(e,{result:cy.default}),dark:e=>eu(e,{result:cy.dark})},EO=(e,t)=>{const n=(i,a,l)=>({key:`--${l}`,value:`${i}`}),r=Ms(e.colors,n),o=Ms(e.spacing,n),s=Ms(e.rounded,n);return eu(r.concat(o,s),{result:i=>`html${t?`.${t}`:""} {${i}}`,value:(i,a)=>a.replace("hsla(","").replace(")","")})},uy={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},dy={base:"1rem",lg:"1.5rem",sm:"0.75rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},CO={name:"dark",rounded:uy,spacing:dy,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",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%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{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%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"}}}},PO={name:"light",rounded:uy,spacing:dy,shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",disabled:"hsla(240, 10%, 78%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{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(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",border:"hsla(200, 1%, 80%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},button:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},kO=CO,IO=PO,tu={inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",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."]}),calendarFromDate:"From",calendarToDate:"To"},fy=b.createContext({translations:tu,colorTokenParser:Jc.hsla}),OO=e=>{const t=b.useMemo(()=>({translations:{...tu,...e.map},colorTokenParser:e.parser||Jc.hsla}),[e.map]);return x.jsx(fy.Provider,{value:t,children:e.children})},zt=()=>{const e=b.useContext(fy);return e?e.translations:tu},Zi=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),hy=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),py={basic:/[,[\]]+?/,extend:/[,[\].]+?/},nu=(e,t)=>{const n=hy(t,py.basic,e)||hy(t,py.extend,e);return n===void 0||n===e?void 0:n},Xi=()=>typeof window>"u",ru=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),my=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,s=e.slice(o,o+t);s.length>0&&n.push(s)}return n},AO={type:"spring",bounce:.3,duration:.6},gy=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),yy={middle:{x:"0%",opacity:1},enter:gy(1),exit:gy(-1)},vy={exit:{visibility:"hidden"}},_O=e=>{const t=yn(Eg(e));return Tg({start:t,end:po(t,41)})},by=(e,t)=>e.toLocaleDateString(t,{month:"long"}),MO=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=Eg(new Date(e).setMonth(r)),s=by(o,t);return x.jsx("option",{value:s,"data-index":r,children:s},s)}),ou={ArrowLeft:(e,t)=>t==="days"?YI(e,1):Rg(e,1),ArrowRight:(e,t)=>t==="days"?po(e,1):Wi(e,1),ArrowUp:(e,t)=>t==="days"?qI(e,1):KI(e,1),ArrowDown:(e,t)=>t==="days"?wg(e,1):xg(e,1)},wy=(e,t,n,r=0)=>{const o=n.toISOString(),s=()=>{var i;if(e!=null&&e.dataset.focustrap){const a=(i=t.current)==null?void 0:i.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>a==null?void 0:a.focus({preventScroll:!1}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!1})}};r===0&&s(),setTimeout(s,r)},kr=e=>e.getFullYear().toString().padStart(4,"0"),DO=(e,t,n)=>e===void 0||n===void 0?!1:qk(t,e)&&Kk(t,n),xy=({RenderOnDay:e,changeOnlyOnClick:t=!1,disabledDate:n,locale:r,markToday:o=!0,onChangeMonth:s,onChangeYear:i,rangeMode:a=!1,onChange:l,styles:c,...u})=>{const d=zt(),h=b.useRef(null),{date:f,range:p}=u,m=f||new Date,v=b.useRef(null),[g,w]=Qc({date:m,isAnimating:!1,year:kr(m),months:MO(m,r),direction:void 0,range:{from:p==null?void 0:p.from,to:p==null?void 0:p.to},selectMode:a?"from":void 0,week:Tg({start:yn(m),end:tk(m)})},P=>({onChangeYear:O=>({year:O}),setToday:()=>({date:go(new Date)}),onExitComplete:()=>(wy(v.current||null,h,P.state().date,200),v.current=null,{isAnimating:!1}),date:O=>{const C=O(P.state().date);return{date:C,year:kr(C)}},nextMonth:O=>{v.current=O.currentTarget;const C=P.state();if(C.isAnimating)return C;const L=Wi(C.date,1);return{date:L,isAnimating:!0,direction:1,year:kr(L)}},previousMonth:O=>{v.current=O.currentTarget;const C=P.state();if(C.isAnimating)return C;const L=Rg(C.date,1);return{date:L,isAnimating:!0,direction:-1,year:kr(L)}},onSelectDate:O=>{const C=P.state(),L=O.currentTarget.dataset.range==="true",D=O.currentTarget.dataset.date||"",V=new Date(D);return{date:V,year:kr(V),selectMode:C.selectMode===void 0?void 0:C.selectMode==="from"?"to":"from",range:L?{from:C.selectMode==="from"?V:C.range.from,to:C.selectMode==="to"?V:C.range.to}:C.range}},onChangeMonth:O=>{const C=O.target.value,D=Array.from(O.target.options).find(k=>k.value===C),V=P.state();if(D){const k=D.dataset.index||"",_=new Date(P.state().date);return _.setMonth(+k),{...V,date:_,year:kr(_)}}return V},onKeyDown:O=>{const C=O.key,L=P.state();if(C in ou){(C==="ArrowUp"||C==="ArrowDown")&&O.preventDefault();const D=P.state().date,V=dn.keyof(ou,C)?ou[C](D,O.shiftKey?"month":"days"):null;if(V!==null)return wy(O.target,h,V),{...L,date:V,year:kr(V)}}return P.state()}}),{props:{onChangeMonth:s,onChangeYear:i},postMiddleware:[(P,O,C)=>{var D,V;return(C.method==="onChangeMonth"||C.method==="previousMonth"||C.method==="nextMonth")&&((V=(D=C.props).onChangeMonth)==null||V.call(D,P.date)),P},(P,O,C)=>{var D,V;return C.method==="onChangeYear"&&((V=(D=C.props).onChangeYear)==null||V.call(D,P.date)),P},(P,O,C)=>{const L=C.method==="onSelectDate"||C.method==="setToday"||C.method==="onKeyDown";return a&&L&&t?(l==null||l(P.range),P):(L&&t&&(l==null||l(P.date)),P)}]}),y=my(_O(g.date),7),T=g.date.toISOString(),S=by(g.date,r);b.useEffect(()=>{t||l==null||l(g.date)},[T]);const E=SO(P=>{w.date(O=>{const C=new Date(O);return C.setFullYear(+P),C})},1200),I=P=>{const O=P.currentTarget.value;w.onChangeYear(O),i==null||i(new Date(O)),E(O)};return x.jsx($C,{transition:AO,children:x.jsxs("div",{ref:h,className:He("relative overflow-hidden",c==null?void 0:c.calendar),children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(Ps,{initial:!1,mode:"popLayout",custom:g.direction,onExitComplete:w.onExitComplete,children:x.jsxs(Ct.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(Ct.button,{layout:!0,"data-focustrap":"prev",variants:vy,onClick:w.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(_P,{className:"h-4 w-4"})}),x.jsx(Ct.span,{layout:!0,variants:yy,custom:g.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:`${S.length}ch`},value:S,onChange:w.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:g.months}),x.jsx(Xg,{mask:"int",value:g.year,maxLength:4,placeholder:"YYYY",onChange:I,style:{width:`${g.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(Ct.button,{layout:!0,"data-focustrap":"next",variants:vy,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:w.nextMonth,children:x.jsx(Vc,{className:"h-4 w-4"})}),x.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),x.jsxs(Ct.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:g.week.map(P=>x.jsx("th",{className:He("py-2 text-sm font-medium capitalize",c==null?void 0:c.weekDay),children:P.toLocaleDateString(r,{weekday:"short"})},P.toString()))})}),x.jsx(Ct.tbody,{layout:!0,variants:yy,custom:g.direction,onKeyDown:w.onKeyDown,className:He(c==null?void 0:c.week),children:y.map((P,O)=>x.jsx("tr",{className:c==null?void 0:c.week,children:P.map(C=>{var $,H,U,A;const L=C.toISOString(),D=a?L===(($=p==null?void 0:p.to)==null?void 0:$.toISOString())||L===((H=p==null?void 0:p.from)==null?void 0:H.toISOString()):L===(f==null?void 0:f.toISOString()),V=GI(C)&&o,k=(n==null?void 0:n(C))||!1,_=!UI(C,g.date)||k,N=a?DO(p==null?void 0:p.from,C,p==null?void 0:p.to):!1;return x.jsxs("td",{align:"center",className:He("relative",c==null?void 0:c.dayFrame),children:[x.jsxs("button",{type:"button","data-date":L,disabled:k,"data-range":a,onClick:w.onSelectDate,"data-view":g.date.getMonth().toString(),className:He(`flex size-10 items-center justify-center rounded-full font-semibold proportional-nums disabled:cursor-not-allowed ${V?"text-primary":""} ${_?"text-disabled":""} ${D?"bg-primary text-primary-foreground":""}`,c==null?void 0:c.day,N?"size-10 border border-dashed border-card-border":""),children:[C.getDate(),D&&((U=g.range.from)==null?void 0:U.toISOString())===L?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs",children:d.calendarFromDate})}):null,D&&((A=g.range.to)==null?void 0:A.toISOString())===L?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs",children:d.calendarToDate})}):null]}),e?x.jsx(e,{date:C}):null]},L)})},`week-${P.length}-${O}`))})]})]},S)})}),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:w.setToday,children:"Today"})})]})})},Sy=({children:e,title:t,as:n="div",container:r="",header:o=null,className:s="",...i})=>x.jsxs(Qr,{...i,as:n,className:He("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:He("min-w-full px-8",s),children:e})]}),NO=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:He("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]}),Ty=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]},FO=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e},[e]),t},Ey=b.createContext(""),LO=e=>{const[t,n]=Ty(e.active),r=fo(0),o=fo(0),s=b.useRef(null),i=e.useHash?"a":"button";b.useLayoutEffect(()=>{const u=s.current;if(u===null)return;const d=m=>{if(!m)return;const v=m.getBoundingClientRect();o.set(v.width),r.set(m.offsetLeft)},h=()=>{const m=u.querySelector("li[data-active=true]");return void d(m)};window.addEventListener("resize",h);let f=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(f=u.querySelector(`li[data-id="${p}"]`),n(p)),f===null){f=u.querySelector("li[data-id]");const m=f.getAttribute("data-id")||"";n(m)}return d(f),()=>window.removeEventListener("resize",h)},[]);const a=FO(e.onChange);b.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=b.Children.toArray(e.children),c=u=>{const d=u.currentTarget,h=d.getBoundingClientRect();o.set(h.width),r.set(d.offsetLeft),n(d.dataset.id||"")};return x.jsx(Ey.Provider,{value:t,children:x.jsx(Sy,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:x.jsx("header",{ref:s,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:x.jsx("nav",{className:"min-w-0",children:x.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:l.map(u=>{const d=u.props;return x.jsx("li",{"data-id":d.id,"data-active":t===d.id,className:"w-full border-b-2 border-card-border data-[active=true]:border-primary data-[active=true]:font-bold data-[active=true]:text-primary",children:x.jsx(i,{"data-id":d.id,onClick:c,"aria-current":"page",href:e.useHash?`#${d.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:d.title})},`tab-header-${d.id}`)})})})}),children:e.children})})},VO=()=>b.useContext(Ey),$O=e=>{const t=VO();return x.jsx(b.Fragment,{children:e.id===t?e.children:null})};function tr(e){return Cy(e)?(e.nodeName||"").toLowerCase():"#document"}function Lt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fn(e){var t;return(t=(Cy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Cy(e){return e instanceof Node||e instanceof Lt(e).Node}function Be(e){return e instanceof Element||e instanceof Lt(e).Element}function ft(e){return e instanceof HTMLElement||e instanceof Lt(e).HTMLElement}function su(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Lt(e).ShadowRoot}function Ds(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Yt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function RO(e){return["table","td","th"].includes(tr(e))}function Qi(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function iu(e){const t=au(),n=Be(e)?Yt(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 jO(e){let t=Ln(e);for(;ft(t)&&!nr(t);){if(iu(t))return t;if(Qi(t))return null;t=Ln(t)}return null}function au(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nr(e){return["html","body","#document"].includes(tr(e))}function Yt(e){return Lt(e).getComputedStyle(e)}function Ji(e){return Be(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ln(e){if(tr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||su(e)&&e.host||Fn(e);return su(t)?t.host:t}function Py(e){const t=Ln(e);return nr(t)?e.ownerDocument?e.ownerDocument.body:e.body:ft(t)&&Ds(t)?t:Py(t)}function rr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Py(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Lt(o);if(s){const a=lu(i);return t.concat(i,i.visualViewport||[],Ds(o)?o:[],a&&n?rr(a):[])}return t.concat(o,rr(o,[],n))}function lu(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 ot(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&su(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function cu(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function ky(){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 Iy(e){return e.mozInputSource===0&&e.isTrusted?!0:fu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function uu(e){return BO()?!1:!fu()&&e.width===0&&e.height===0||fu()&&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 du(){return/apple/i.test(navigator.vendor)}function fu(){const e=/android/i;return e.test(cu())||e.test(ky())}function Oy(){return cu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function BO(){return ky().includes("jsdom/")}function bo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function WO(e){return"nativeEvent"in e}function zO(e){return e.matches("html,body")}function xt(e){return(e==null?void 0:e.ownerDocument)||document}function hu(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 wn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const HO="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function pu(e){return ft(e)&&e.matches(HO)}function Pt(e){e.preventDefault(),e.stopPropagation()}function Ay(e){return e?e.getAttribute("role")==="combobox"&&pu(e):!1}const xn=Math.min,qt=Math.max,ea=Math.round,wo=Math.floor,or=e=>({x:e,y:e}),UO={left:"right",right:"left",bottom:"top",top:"bottom"},GO={start:"end",end:"start"};function mu(e,t,n){return qt(e,xn(t,n))}function xo(e,t){return typeof e=="function"?e(t):e}function sr(e){return e.split("-")[0]}function So(e){return e.split("-")[1]}function _y(e){return e==="x"?"y":"x"}function gu(e){return e==="y"?"height":"width"}function Ir(e){return["top","bottom"].includes(sr(e))?"y":"x"}function yu(e){return _y(Ir(e))}function YO(e,t,n){n===void 0&&(n=!1);const r=So(e),o=yu(e),s=gu(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=ta(i)),[i,ta(i)]}function qO(e){const t=ta(e);return[vu(e),t,vu(t)]}function vu(e){return e.replace(/start|end/g,t=>GO[t])}function KO(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 ZO(e,t,n,r){const o=So(e);let s=KO(sr(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(vu)))),s}function ta(e){return e.replace(/left|right|bottom|top/g,t=>UO[t])}function XO(e){return{top:0,right:0,bottom:0,left:0,...e}}function My(e){return typeof e!="number"?XO(e):{top:e,right:e,bottom:e,left:e}}function na(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}}/*!
174
+ */var Qm;function JI(){return Qm||(Qm=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=qm();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}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,f,h,d,p){var m=i(null),v;m.current===null?(v={hasValue:!1,value:null},m.current=v):v=m.current;var g=a(function(){var S=!1,E,A,P=function(F){if(!S){S=!0,E=F;var V=d(F);if(p!==void 0&&v.hasValue){var I=v.value;if(p(I,V))return A=I,I}return A=V,V}var D=E,L=A;if(r(D,F))return L;var $=d(F);return p!==void 0&&p(L,$)?L:(E=F,A=$,$)},O=h===void 0?null:h,C=function(){return P(f())},_=O===null?void 0:function(){return P(O())};return[C,_]},[f,h,d,p]),w=g[0],y=g[1],T=o(u,w,y);return s(function(){v.hasValue=!0,v.value=T},[T]),l(T),T}Xm.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Xm}process.env.NODE_ENV==="production"?ZI():JI();const Ur=e=>{const t=b.useRef(e??{});return b.useEffect(()=>void(t.current=e),[e]),t},eA=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},tA=e=>Object.entries(e),Zm=e=>e instanceof Promise,Jm=(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),nA=(e,t,n,r,o,i)=>(...s)=>{const a=performance.now(),l=t(...s),c=(u,f)=>n(h=>Jm(u,h,i,f));return Zm(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))},rA=(e,t,n,r,o,i)=>(...s)=>{o.current={method:e,time:0,props:r()};const a=t(...s),l=c=>n(u=>Jm(c,u,i,o.current));return Zm(a)?a.then(c=>l(c)):l(a)},ec=(e,t,n)=>{const[r,o]=b.useState(()=>e),i=Ur(r),s=Ur((n==null?void 0:n.props)??{}),a=Ur(t),l=Ur((n==null?void 0:n.postMiddleware)??[]),c=Ur((n==null?void 0:n.interceptor)??[]),u=b.useRef(e),f=eA(r),h=Ur(f),d=b.useRef(null);b.useEffect(()=>{if(d.current===null)return;const m=d.current;l.current.forEach(v=>{v(r,f,m)})},[r,l,f]);const[p]=b.useState(()=>{const m=()=>s.current,v=a.current({props:m,state:()=>i.current,initialState:u.current,previousState:()=>h.current});return tA(v).reduce((g,[w,y])=>({...g,[w]:n!=null&&n.debug?nA(w,y,o,m,d,c.current):rA(w,y,o,m,d,c.current)}),{})});return[r,p,s.current]},oA=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function iA(e,t){return b.useRef(oA(e,t)).current}const tc={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>)`},ri=(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(ri(s,t,n,a))},[]),eg=(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]:eg(s,t,n,a)}},{}),tg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},nc=(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)},sA={default:e=>nc(e,{result:tg.default}),dark:e=>nc(e,{result:tg.dark})},aA=(e,t)=>{const n=(s,a,l)=>({key:`--${l}`,value:`${s}`}),r=ri(e.colors,n),o=ri(e.spacing,n),i=ri(e.rounded,n);return nc(r.concat(o,i),{result:s=>`html${t?`.${t}`:""} {${s}}`,value:(s,a)=>a.replace("hsla(","").replace(")","")})},ng={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},rg={base:"1rem",lg:"1.5rem",sm:"0.75rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},lA={name:"dark",rounded:ng,spacing:rg,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",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%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{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%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"}}}},cA={name:"light",rounded:ng,spacing:rg,shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",disabled:"hsla(240, 10%, 78%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{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(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",border:"hsla(200, 1%, 80%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},button:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},uA=lA,fA=cA,rc={inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",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."]}),calendarFromDate:"From",calendarToDate:"To"},og=b.createContext({translations:rc,colorTokenParser:tc.hsla}),dA=e=>{const t=b.useMemo(()=>({translations:{...rc,...e.map},colorTokenParser:e.parser||tc.hsla}),[e.map]);return x.jsx(og.Provider,{value:t,children:e.children})},Mt=()=>{const e=b.useContext(og);return e?e.translations:rc},ps=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),ig=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),sg={basic:/[,[\]]+?/,extend:/[,[\].]+?/},oc=(e,t)=>{const n=ig(t,sg.basic,e)||ig(t,sg.extend,e);return n===void 0||n===e?void 0:n},ms=()=>typeof window>"u",ic=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),ag=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,i=e.slice(o,o+t);i.length>0&&n.push(i)}return n},hA={type:"spring",bounce:.3,duration:.6},lg=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),cg={middle:{x:"0%",opacity:1},enter:lg(1),exit:lg(-1)},ug={exit:{visibility:"hidden"}},pA=e=>{const t=tn(gm(e));return mm({start:t,end:Hr(t,41)})},fg=(e,t)=>e.toLocaleDateString(t,{month:"long"}),mA=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=gm(new Date(e).setMonth(r)),i=fg(o,t);return x.jsx("option",{value:i,"data-index":r,children:i},i)}),sc={ArrowLeft:(e,t)=>t==="days"?kI(e,1):Dm(e,1),ArrowRight:(e,t)=>t==="days"?Hr(e,1):ss(e,1),ArrowUp:(e,t)=>t==="days"?DI(e,1):MI(e,1),ArrowDown:(e,t)=>t==="days"?dm(e,1):hm(e,1)},dg=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var s;if(e!=null&&e.dataset.focustrap){const a=(s=t.current)==null?void 0:s.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>a==null?void 0:a.focus({preventScroll:!1}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},sr=e=>e.getFullYear().toString().padStart(4,"0"),gA=(e,t,n)=>e===void 0||n===void 0?!1:DP(t,e)&&MP(t,n),hg=({RenderOnDay:e,changeOnlyOnClick:t=!1,disabledDate:n,locale:r,markToday:o=!0,onChangeMonth:i,onChangeYear:s,rangeMode:a=!1,onChange:l,styles:c,...u})=>{const f=Mt(),h=b.useRef(null),{date:d,range:p}=u,m=d||new Date,v=b.useRef(null),[g,w]=ec({date:m,isAnimating:!1,year:sr(m),months:mA(m,r),direction:void 0,range:{from:p==null?void 0:p.from,to:p==null?void 0:p.to},selectMode:a?"from":void 0,week:mm({start:tn(m),end:$C(m)})},P=>({onChangeYear:O=>({year:O}),setToday:()=>({date:zr(new Date)}),onExitComplete:()=>(dg(v.current||null,h,P.state().date,200),v.current=null,{isAnimating:!1}),date:O=>{const C=O(P.state().date);return{date:C,year:sr(C)}},nextMonth:O=>{v.current=O.currentTarget;const C=P.state();if(C.isAnimating)return C;const _=ss(C.date,1);return{date:_,isAnimating:!0,direction:1,year:sr(_)}},previousMonth:O=>{v.current=O.currentTarget;const C=P.state();if(C.isAnimating)return C;const _=Dm(C.date,1);return{date:_,isAnimating:!0,direction:-1,year:sr(_)}},onSelectDate:O=>{const C=P.state(),_=O.currentTarget.dataset.range==="true",F=O.currentTarget.dataset.date||"",V=new Date(F);return{date:V,year:sr(V),selectMode:C.selectMode===void 0?void 0:C.selectMode==="from"?"to":"from",range:_?{from:C.selectMode==="from"?V:C.range.from,to:C.selectMode==="to"?V:C.range.to}:C.range}},onChangeMonth:O=>{const C=O.target.value,F=Array.from(O.target.options).find(I=>I.value===C),V=P.state();if(F){const I=F.dataset.index||"",D=new Date(P.state().date);return D.setMonth(+I),{...V,date:D,year:sr(D)}}return V},onKeyDown:O=>{const C=O.key,_=P.state();if(C in sc){(C==="ArrowUp"||C==="ArrowDown")&&O.preventDefault();const F=P.state().date,V=mn.keyof(sc,C)?sc[C](F,O.shiftKey?"month":"days"):null;if(V!==null)return dg(O.target,h,V),{..._,date:V,year:sr(V)}}return P.state()}}),{props:{onChangeMonth:i,onChangeYear:s},postMiddleware:[(P,O,C)=>{var F,V;return(C.method==="onChangeMonth"||C.method==="previousMonth"||C.method==="nextMonth")&&((V=(F=C.props).onChangeMonth)==null||V.call(F,P.date)),P},(P,O,C)=>{var F,V;return C.method==="onChangeYear"&&((V=(F=C.props).onChangeYear)==null||V.call(F,P.date)),P},(P,O,C)=>{const _=C.method==="onSelectDate"||C.method==="setToday"||C.method==="onKeyDown";return a&&_&&t?(l==null||l(P.range),P):(_&&t&&(l==null||l(P.date)),P)}]}),y=ag(pA(g.date),7),T=g.date.toISOString(),S=fg(g.date,r);b.useEffect(()=>{t||l==null||l(g.date)},[T]);const E=iA(P=>{w.date(O=>{const C=new Date(O);return C.setFullYear(+P),C})},1200),A=P=>{const O=P.currentTarget.value;w.onChangeYear(O),s==null||s(new Date(O)),E(O)};return x.jsx(xE,{transition:hA,children:x.jsxs("div",{ref:h,className:Ne("relative overflow-hidden",c==null?void 0:c.calendar),children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(Qo,{initial:!1,mode:"popLayout",custom:g.direction,onExitComplete:w.onExitComplete,children:x.jsxs(mt.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(mt.button,{layout:!0,"data-focustrap":"prev",variants:ug,onClick:w.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(pC,{className:"h-4 w-4"})}),x.jsx(mt.span,{layout:!0,variants:cg,custom:g.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:`${S.length}ch`},value:S,onChange:w.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:g.months}),x.jsx(Wm,{mask:"int",value:g.year,maxLength:4,placeholder:"YYYY",onChange:A,style:{width:`${g.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(mt.button,{layout:!0,"data-focustrap":"next",variants:ug,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:w.nextMonth,children:x.jsx(Bl,{className:"h-4 w-4"})}),x.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),x.jsxs(mt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:g.week.map(P=>x.jsx("th",{className:Ne("py-2 text-sm font-medium capitalize",c==null?void 0:c.weekDay),children:P.toLocaleDateString(r,{weekday:"short"})},P.toString()))})}),x.jsx(mt.tbody,{layout:!0,variants:cg,custom:g.direction,onKeyDown:w.onKeyDown,className:Ne(c==null?void 0:c.week),children:y.map((P,O)=>x.jsx("tr",{className:c==null?void 0:c.week,children:P.map(C=>{var $,z,G,k;const _=C.toISOString(),F=a?_===(($=p==null?void 0:p.to)==null?void 0:$.toISOString())||_===((z=p==null?void 0:p.from)==null?void 0:z.toISOString()):_===(d==null?void 0:d.toISOString()),V=OI(C)&&o,I=(n==null?void 0:n(C))||!1,D=!AI(C,g.date)||I,L=a?gA(p==null?void 0:p.from,C,p==null?void 0:p.to):!1;return x.jsxs("td",{align:"center",className:Ne("relative",c==null?void 0:c.dayFrame),children:[x.jsxs("button",{type:"button","data-date":_,disabled:I,"data-range":a,onClick:w.onSelectDate,"data-view":g.date.getMonth().toString(),className:Ne(`flex size-10 items-center justify-center rounded-full font-semibold proportional-nums disabled:cursor-not-allowed ${V?"text-primary":""} ${D?"text-disabled":""} ${F?"bg-primary text-primary-foreground":""}`,c==null?void 0:c.day,L?"size-10 border border-dashed border-card-border":""),children:[C.getDate(),F&&((G=g.range.from)==null?void 0:G.toISOString())===_?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs",children:f.calendarFromDate})}):null,F&&((k=g.range.to)==null?void 0:k.toISOString())===_?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs",children:f.calendarToDate})}):null]}),e?x.jsx(e,{date:C}):null]},_)})},`week-${P.length}-${O}`))})]})]},S)})}),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:w.setToday,children:"Today"})})]})})},pg=({children:e,title:t,as:n="div",container:r="",header:o=null,className:i="",...s})=>x.jsxs(Ir,{...s,as:n,className:Ne("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:Ne("min-w-full px-8",i),children:e})]}),yA=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:Ne("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]}),mg=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]},vA=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e},[e]),t},gg=b.createContext(""),bA=e=>{const[t,n]=mg(e.active),r=jr(0),o=jr(0),i=b.useRef(null),s=e.useHash?"a":"button";b.useLayoutEffect(()=>{const u=i.current;if(u===null)return;const f=m=>{if(!m)return;const v=m.getBoundingClientRect();o.set(v.width),r.set(m.offsetLeft)},h=()=>{const m=u.querySelector("li[data-active=true]");return void f(m)};window.addEventListener("resize",h);let d=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(d=u.querySelector(`li[data-id="${p}"]`),n(p)),d===null){d=u.querySelector("li[data-id]");const m=d.getAttribute("data-id")||"";n(m)}return f(d),()=>window.removeEventListener("resize",h)},[]);const a=vA(e.onChange);b.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=b.Children.toArray(e.children),c=u=>{const f=u.currentTarget,h=f.getBoundingClientRect();o.set(h.width),r.set(f.offsetLeft),n(f.dataset.id||"")};return x.jsx(gg.Provider,{value:t,children:x.jsx(pg,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:x.jsx("header",{ref:i,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:x.jsx("nav",{className:"min-w-0",children:x.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:l.map(u=>{const f=u.props;return x.jsx("li",{"data-id":f.id,"data-active":t===f.id,className:"w-full border-b-2 border-card-border data-[active=true]:border-primary data-[active=true]:font-bold data-[active=true]:text-primary",children:x.jsx(s,{"data-id":f.id,onClick:c,"aria-current":"page",href:e.useHash?`#${f.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:f.title})},`tab-header-${f.id}`)})})})}),children:e.children})})},wA=()=>b.useContext(gg),xA=e=>{const t=wA();return x.jsx(b.Fragment,{children:e.id===t?e.children:null})};function Nn(e){return yg(e)?(e.nodeName||"").toLowerCase():"#document"}function Pt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wn(e){var t;return(t=(yg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yg(e){return e instanceof Node||e instanceof Pt(e).Node}function Me(e){return e instanceof Element||e instanceof Pt(e).Element}function nt(e){return e instanceof HTMLElement||e instanceof Pt(e).HTMLElement}function ac(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pt(e).ShadowRoot}function oi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Nt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function SA(e){return["table","td","th"].includes(Nn(e))}function gs(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function lc(e){const t=cc(),n=Me(e)?Nt(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 TA(e){let t=xn(e);for(;nt(t)&&!_n(t);){if(lc(t))return t;if(gs(t))return null;t=xn(t)}return null}function cc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _n(e){return["html","body","#document"].includes(Nn(e))}function Nt(e){return Pt(e).getComputedStyle(e)}function ys(e){return Me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xn(e){if(Nn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ac(e)&&e.host||wn(e);return ac(t)?t.host:t}function vg(e){const t=xn(e);return _n(t)?e.ownerDocument?e.ownerDocument.body:e.body:nt(t)&&oi(t)?t:vg(t)}function Vn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=vg(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Pt(o);if(i){const a=uc(s);return t.concat(s,s.visualViewport||[],oi(o)?o:[],a&&n?Vn(a):[])}return t.concat(o,Vn(o,[],n))}function uc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Wt(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 qe(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ac(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function fc(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function bg(){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 wg(e){return e.mozInputSource===0&&e.isTrusted?!0:pc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function dc(e){return EA()?!1:!pc()&&e.width===0&&e.height===0||pc()&&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 hc(){return/apple/i.test(navigator.vendor)}function pc(){const e=/android/i;return e.test(fc())||e.test(bg())}function xg(){return fc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function EA(){return bg().includes("jsdom/")}function Yr(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function CA(e){return"nativeEvent"in e}function PA(e){return e.matches("html,body")}function ft(e){return(e==null?void 0:e.ownerDocument)||document}function mc(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 on(e){return"composedPath"in e?e.composedPath()[0]:e.target}const IA="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function gc(e){return nt(e)&&e.matches(IA)}function gt(e){e.preventDefault(),e.stopPropagation()}function Sg(e){return e?e.getAttribute("role")==="combobox"&&gc(e):!1}const sn=Math.min,_t=Math.max,vs=Math.round,qr=Math.floor,$n=e=>({x:e,y:e}),AA={left:"right",right:"left",bottom:"top",top:"bottom"},OA={start:"end",end:"start"};function yc(e,t,n){return _t(e,sn(t,n))}function Kr(e,t){return typeof e=="function"?e(t):e}function Bn(e){return e.split("-")[0]}function Xr(e){return e.split("-")[1]}function Tg(e){return e==="x"?"y":"x"}function vc(e){return e==="y"?"height":"width"}function ar(e){return["top","bottom"].includes(Bn(e))?"y":"x"}function bc(e){return Tg(ar(e))}function kA(e,t,n){n===void 0&&(n=!1);const r=Xr(e),o=bc(e),i=vc(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=bs(s)),[s,bs(s)]}function DA(e){const t=bs(e);return[wc(e),t,wc(t)]}function wc(e){return e.replace(/start|end/g,t=>OA[t])}function MA(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 FA(e,t,n,r){const o=Xr(e);let i=MA(Bn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(wc)))),i}function bs(e){return e.replace(/left|right|bottom|top/g,t=>AA[t])}function LA(e){return{top:0,right:0,bottom:0,left:0,...e}}function Eg(e){return typeof e!="number"?LA(e):{top:e,right:e,bottom:e,left:e}}function ws(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
175
175
  * tabbable 6.2.0
176
176
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
177
- */var QO=["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])"],ra=QO.join(","),Dy=typeof Element>"u",To=Dy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,oa=!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},sa=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},JO=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},eA=function(t,n,r){if(sa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ra));return n&&To.call(t,ra)&&o.unshift(t),o=o.filter(r),o},tA=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!sa(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,ra);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),h=!sa(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&h){var f=e(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:i,candidates:f})}else s.unshift.apply(s,i.children)}}return o},Ny=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Fy=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||JO(t))&&!Ny(t)?0:t.tabIndex},nA=function(t,n){var r=Fy(t);return r<0&&n&&!Ny(t)?0:r},rA=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Ly=function(t){return t.tagName==="INPUT"},oA=function(t){return Ly(t)&&t.type==="hidden"},sA=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},iA=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},aA=function(t){if(!t.name)return!0;var n=t.form||oa(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=iA(o,t.form);return!s||s===t},lA=function(t){return Ly(t)&&t.type==="radio"},cA=function(t){return lA(t)&&!aA(t)},uA=function(t){var n,r=t&&oa(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=oa(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},Vy=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},dA=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=oa(t);if(l&&!l.shadowRoot&&o(l)===!0)return Vy(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(uA(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Vy(t);return!1},fA=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},hA=function(t,n){return!(n.disabled||sa(n)||oA(n)||dA(n,t)||sA(n)||fA(n))},bu=function(t,n){return!(cA(n)||Fy(n)<0||!hA(t,n))},pA=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},mA=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=nA(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(rA).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Ns=function(t,n){n=n||{};var r;return n.getShadowRoot?r=tA([t],n.includeContainer,{filter:bu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:pA}):r=eA(t,n.includeContainer,bu.bind(null,n)),mA(r)},gA=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return To.call(t,ra)===!1?!1:bu(n,t)};function $y(e,t,n){let{reference:r,floating:o}=e;const s=Ir(t),i=yu(t),a=gu(i),l=sr(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(So(t)){case"start":f[i]-=h*(n&&c?-1:1);break;case"end":f[i]+=h*(n&&c?-1:1);break}return f}const yA=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}=$y(c,r,l),h=r,f={},p=0;for(let m=0;m<a.length;m++){const{name:v,fn:g}=a[m],{x:w,y,data:T,reset:S}=await g({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:c,platform:i,elements:{reference:e,floating:t}});u=w??u,d=y??d,f={...f,[v]:{...f[v],...T}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(c=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:d}=$y(c,h,l)),m=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:f}};async function wu(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:h=!1,padding:f=0}=xo(t,e),p=My(f),v=a[h?d==="floating"?"reference":"floating":d],g=na(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),T=await(s.isElement==null?void 0:s.isElement(y))?await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1}:{x:1,y:1},S=na(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:y,strategy:l}):w);return{top:(g.top-S.top+p.top)/T.y,bottom:(S.bottom-g.bottom+p.bottom)/T.y,left:(g.left-S.left+p.left)/T.x,right:(S.right-g.right+p.right)/T.x}}const vA=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}=xo(e,t)||{};if(c==null)return{};const d=My(u),h={x:n,y:r},f=yu(o),p=gu(f),m=await i.getDimensions(c),v=f==="y",g=v?"top":"left",w=v?"bottom":"right",y=v?"clientHeight":"clientWidth",T=s.reference[p]+s.reference[f]-h[f]-s.floating[p],S=h[f]-s.reference[f],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let I=E?E[y]:0;(!I||!await(i.isElement==null?void 0:i.isElement(E)))&&(I=a.floating[y]||s.floating[p]);const P=T/2-S/2,O=I/2-m[p]/2-1,C=xn(d[g],O),L=xn(d[w],O),D=C,V=I-m[p]-L,k=I/2-m[p]/2+P,_=mu(D,k,V),N=!l.arrow&&So(o)!=null&&k!==_&&s.reference[p]/2-(k<D?C:L)-m[p]/2<0,$=N?k<D?k-D:k-V:0;return{[f]:h[f]+$,data:{[f]:_,centerOffset:k-_-$,...N&&{alignmentOffset:$}},reset:N}}}),bA=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:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...v}=xo(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=sr(o),w=Ir(a),y=sr(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=h||(y||!m?[ta(a)]:qO(a)),E=p!=="none";!h&&E&&S.push(...ZO(a,m,p,T));const I=[a,...S],P=await wu(t,v),O=[];let C=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&O.push(P[g]),d){const k=YO(o,i,T);O.push(P[k[0]],P[k[1]])}if(C=[...C,{placement:o,overflows:O}],!O.every(k=>k<=0)){var L,D;const k=(((L=s.flip)==null?void 0:L.index)||0)+1,_=I[k];if(_)return{data:{index:k,overflows:C},reset:{placement:_}};let N=(D=C.filter($=>$.overflows[0]<=0).sort(($,H)=>$.overflows[1]-H.overflows[1])[0])==null?void 0:D.placement;if(!N)switch(f){case"bestFit":{var V;const $=(V=C.filter(H=>{if(E){const U=Ir(H.placement);return U===w||U==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(U=>U>0).reduce((U,A)=>U+A,0)]).sort((H,U)=>H[1]-U[1])[0])==null?void 0:V[0];$&&(N=$);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};async function wA(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=sr(n),a=So(n),l=Ir(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=xo(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(f=a==="end"?p*-1:p),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const xA=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 wA(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}}}}},SA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:v=>{let{x:g,y:w}=v;return{x:g,y:w}}},...l}=xo(e,t),c={x:n,y:r},u=await wu(t,l),d=Ir(sr(o)),h=_y(d);let f=c[h],p=c[d];if(s){const v=h==="y"?"top":"left",g=h==="y"?"bottom":"right",w=f+u[v],y=f-u[g];f=mu(w,f,y)}if(i){const v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",w=p+u[v],y=p-u[g];p=mu(w,p,y)}const m=a.fn({...t,[h]:f,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},TA=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}=xo(e,t),l=await wu(t,a),c=sr(n),u=So(n),d=Ir(n)==="y",{width:h,height:f}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const v=f-l.top-l.bottom,g=h-l.left-l.right,w=xn(f-l[p],v),y=xn(h-l[m],g),T=!t.middlewareData.shift;let S=w,E=y;if(d?E=u||T?xn(y,g):g:S=u||T?xn(w,v):v,T&&!u){const P=qt(l.left,0),O=qt(l.right,0),C=qt(l.top,0),L=qt(l.bottom,0);d?E=h-2*(P!==0||O!==0?P+O:qt(l.left,l.right)):S=f-2*(C!==0||L!==0?C+L:qt(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:S});const I=await o.getDimensions(s.floating);return h!==I.width||f!==I.height?{reset:{rects:!0}}:{}}}};function Ry(e){const t=Yt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ft(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=ea(n)!==s||ea(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function xu(e){return Be(e)?e:e.contextElement}function Eo(e){const t=xu(e);if(!ft(t))return or(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Ry(t);let i=(s?ea(n.width):n.width)/r,a=(s?ea(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const EA=or(0);function jy(e){const t=Lt(e);return!au()||!t.visualViewport?EA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function CA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Lt(e)?!1:t}function Or(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=xu(e);let i=or(1);t&&(r?Be(r)&&(i=Eo(r)):i=Eo(e));const a=CA(s,n,r)?jy(s):or(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const h=Lt(s),f=r&&Be(r)?Lt(r):r;let p=h,m=lu(p);for(;m&&r&&f!==p;){const v=Eo(m),g=m.getBoundingClientRect(),w=Yt(m),y=g.left+(m.clientLeft+parseFloat(w.paddingLeft))*v.x,T=g.top+(m.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=y,c+=T,p=Lt(m),m=lu(p)}}return na({width:u,height:d,x:l,y:c})}function PA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Fn(r),a=t?Qi(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=or(1);const u=or(0),d=ft(r);if((d||!d&&!s)&&((tr(r)!=="body"||Ds(i))&&(l=Ji(r)),ft(r))){const h=Or(r);c=Eo(r),u.x=h.x+r.clientLeft,u.y=h.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 kA(e){return Array.from(e.getClientRects())}function By(e){return Or(Fn(e)).left+Ji(e).scrollLeft}function IA(e){const t=Fn(e),n=Ji(e),r=e.ownerDocument.body,o=qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+By(e);const a=-n.scrollTop;return Yt(r).direction==="rtl"&&(i+=qt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function OA(e,t){const n=Lt(e),r=Fn(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=au();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function AA(e,t){const n=Or(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ft(e)?Eo(e):or(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function Wy(e,t,n){let r;if(t==="viewport")r=OA(e,n);else if(t==="document")r=IA(Fn(e));else if(Be(t))r=AA(t,n);else{const o=jy(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return na(r)}function zy(e,t){const n=Ln(e);return n===t||!Be(n)||nr(n)?!1:Yt(n).position==="fixed"||zy(n,t)}function _A(e,t){const n=t.get(e);if(n)return n;let r=rr(e,[],!1).filter(a=>Be(a)&&tr(a)!=="body"),o=null;const s=Yt(e).position==="fixed";let i=s?Ln(e):e;for(;Be(i)&&!nr(i);){const a=Yt(i),l=iu(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ds(i)&&!l&&zy(e,i))?r=r.filter(u=>u!==i):o=a,i=Ln(i)}return t.set(e,r),r}function MA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Qi(t)?[]:_A(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=Wy(t,u,o);return c.top=qt(d.top,c.top),c.right=xn(d.right,c.right),c.bottom=xn(d.bottom,c.bottom),c.left=qt(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 DA(e){const{width:t,height:n}=Ry(e);return{width:t,height:n}}function NA(e,t,n){const r=ft(t),o=Fn(t),s=n==="fixed",i=Or(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=or(0);if(r||!r&&!s)if((tr(t)!=="body"||Ds(o))&&(a=Ji(t)),r){const d=Or(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=By(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 Su(e){return Yt(e).position==="static"}function Hy(e,t){return!ft(e)||Yt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Uy(e,t){const n=Lt(e);if(Qi(e))return n;if(!ft(e)){let o=Ln(e);for(;o&&!nr(o);){if(Be(o)&&!Su(o))return o;o=Ln(o)}return n}let r=Hy(e,t);for(;r&&RO(r)&&Su(r);)r=Hy(r,t);return r&&nr(r)&&Su(r)&&!iu(r)?n:r||jO(e)||n}const FA=async function(e){const t=this.getOffsetParent||Uy,n=this.getDimensions,r=await n(e.floating);return{reference:NA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function LA(e){return Yt(e).direction==="rtl"}const VA={convertOffsetParentRelativeRectToViewportRelativeRect:PA,getDocumentElement:Fn,getClippingRect:MA,getOffsetParent:Uy,getElementRects:FA,getClientRects:kA,getDimensions:DA,getScale:Eo,isElement:Be,isRTL:LA};function $A(e,t){let n=null,r;const o=Fn(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:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const f=wo(u),p=wo(o.clientWidth-(c+d)),m=wo(o.clientHeight-(u+h)),v=wo(c),w={rootMargin:-f+"px "+-p+"px "+-m+"px "+-v+"px",threshold:qt(0,xn(1,l))||1};let y=!0;function T(S){const E=S[0].intersectionRatio;if(E!==l){if(!y)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(T,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,w)}n.observe(e)}return i(!0),s}function ia(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=xu(e),u=o||s?[...c?rr(c):[],...rr(t)]:[];u.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const d=c&&a?$A(c,n):null;let h=-1,f=null;i&&(f=new ResizeObserver(g=>{let[w]=g;w&&w.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let p,m=l?Or(e):null;l&&v();function v(){const g=Or(e);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,p=requestAnimationFrame(v)}return n(),()=>{var g;u.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),d==null||d(),(g=f)==null||g.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const RA=xA,jA=SA,BA=bA,WA=TA,Gy=vA,zA=(e,t,n)=>{const r=new Map,o={platform:VA,...n},s={...o.platform,_c:r};return yA(e,t,{...o,platform:s})};var aa=typeof document<"u"?b.useLayoutEffect:b.useEffect;function la(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(!la(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)&&!la(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Yy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qy(e,t){const n=Yy(e);return Math.round(t*n)/n}function Ky(e){const t=M.useRef(e);return aa(()=>{t.current=e}),t}function HA(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=M.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=M.useState(r);la(h,r)||f(r);const[p,m]=M.useState(null),[v,g]=M.useState(null),w=M.useCallback($=>{$!==E.current&&(E.current=$,m($))},[]),y=M.useCallback($=>{$!==I.current&&(I.current=$,g($))},[]),T=s||p,S=i||v,E=M.useRef(null),I=M.useRef(null),P=M.useRef(u),O=l!=null,C=Ky(l),L=Ky(o),D=M.useCallback(()=>{if(!E.current||!I.current)return;const $={placement:t,strategy:n,middleware:h};L.current&&($.platform=L.current),zA(E.current,I.current,$).then(H=>{const U={...H,isPositioned:!0};V.current&&!la(P.current,U)&&(P.current=U,uf.flushSync(()=>{d(U)}))})},[h,t,n,L]);aa(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d($=>({...$,isPositioned:!1})))},[c]);const V=M.useRef(!1);aa(()=>(V.current=!0,()=>{V.current=!1}),[]),aa(()=>{if(T&&(E.current=T),S&&(I.current=S),T&&S){if(C.current)return C.current(T,S,D);D()}},[T,S,D,C,O]);const k=M.useMemo(()=>({reference:E,floating:I,setReference:w,setFloating:y}),[w,y]),_=M.useMemo(()=>({reference:T,floating:S}),[T,S]),N=M.useMemo(()=>{const $={position:n,left:0,top:0};if(!_.floating)return $;const H=qy(_.floating,u.x),U=qy(_.floating,u.y);return a?{...$,transform:"translate("+H+"px, "+U+"px)",...Yy(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:U}},[n,a,_.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:D,refs:k,elements:_,floatingStyles:N}),[u,D,k,_,N])}const UA=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?Gy({element:r.current,padding:o}).fn(n):{}:r?Gy({element:r,padding:o}).fn(n):{}}}},ca=(e,t)=>({...RA(e),options:[e,t]}),Tu=(e,t)=>({...jA(e),options:[e,t]}),Eu=(e,t)=>({...BA(e),options:[e,t]}),GA=(e,t)=>({...WA(e),options:[e,t]}),Zy=(e,t)=>({...UA(e),options:[e,t]});function Cu(e){return M.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const Xy={...M},YA=Xy.useInsertionEffect||(e=>e());function yt(e){const t=M.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return YA(()=>{t.current=e}),M.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Pu="ArrowUp",Fs="ArrowDown",Co="ArrowLeft",Po="ArrowRight";function ua(e,t,n){return Math.floor(e/t)!==n}function Ls(e,t){return t<0||t>=e.current.length}function ku(e,t){return Mt(e,{disabledIndices:t})}function Qy(e,t){return Mt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Mt(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&&da(i,a,o));return a}function qA(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===Pu){if(u&&Pt(n),c===-1)d=l;else if(d=Mt(e,{startingIndex:d,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||d<0)){const h=c%s,f=l%s,p=l-(f-h);f===h?d=l:d=f>h?p:p-s}Ls(e,d)&&(d=c)}if(n.key===Fs&&(u&&Pt(n),c===-1?d=a:(d=Mt(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(d=Mt(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),Ls(e,d)&&(d=c)),r==="both"){const h=wo(c/s);n.key===Po&&(u&&Pt(n),c%s!==s-1?(d=Mt(e,{startingIndex:c,disabledIndices:i}),o&&ua(d,s,h)&&(d=Mt(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(d=Mt(e,{startingIndex:c-c%s-1,disabledIndices:i})),ua(d,s,h)&&(d=c)),n.key===Co&&(u&&Pt(n),c%s!==0?(d=Mt(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&ua(d,s,h)&&(d=Mt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(d=Mt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),ua(d,s,h)&&(d=c));const f=wo(l/s)===h;Ls(e,d)&&(o&&f?d=n.key===Co?l:Mt(e,{startingIndex:c-c%s-1,disabledIndices:i}):d=c)}return d}function KA(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 h=0;h<l;h++)u.push(o+d+h*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=i}),c=!0):o++}}),[...r]}function ZA(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 XA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function da(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 Jy=0;function ir(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Jy);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():Jy=requestAnimationFrame(s)}var ke=typeof document<"u"?b.useLayoutEffect:b.useEffect;function QA(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 JA(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 ev=M.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function e_(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,s]=M.useState(()=>new Map),i=M.useCallback(l=>{s(c=>new Map(c).set(l,null))},[]),a=M.useCallback(l=>{s(c=>{const u=new Map(c);return u.delete(l),u})},[]);return ke(()=>{const l=new Map(o);Array.from(l.keys()).sort(QA).forEach((u,d)=>{l.set(u,d)}),JA(o,l)||s(l)},[o]),M.createElement(ev.Provider,{value:M.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function tv(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=M.useContext(ev),[a,l]=M.useState(null),c=M.useRef(null),u=M.useCallback(d=>{if(c.current=d,a!==null&&(s.current[a]=d,i)){var h;const f=t!==void 0;i.current[a]=f?t:(h=d==null?void 0:d.textContent)!=null?h:null}},[a,s,i,t]);return ke(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),ke(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),M.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 nv=!1,t_=0;const rv=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+t_++;function n_(){const[e,t]=M.useState(()=>nv?rv():void 0);return ke(()=>{e==null&&t(rv())},[]),M.useEffect(()=>{nv=!0},[]),e}const Io=Xy.useId||n_;let Vs;process.env.NODE_ENV!=="production"&&(Vs=new Set);function fa(){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=Vs)!=null&&e.has(o))){var s;(s=Vs)==null||s.add(o),console.warn(o)}}function r_(){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=Vs)!=null&&e.has(o))){var s;(s=Vs)==null||s.add(o),console.error(o)}}const ov=M.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:s}},width:i=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:h,style:{transform:f,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||fa("The `ref` prop is required for `FloatingArrow`."));const v=Io(),[g,w]=M.useState(!1);if(ke(()=>{if(!o)return;Yt(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const y=c*2,T=y/2,S=i/2*(l/-8+1),E=a/2*l/4,[I,P]=r.split("-"),O=!!h,C=I==="top"||I==="bottom",L=u&&P==="end"?"bottom":"top";let D=u&&P==="end"?"right":"left";u&&g&&(D=P==="end"?"left":"right");const V=(s==null?void 0:s.x)!=null?u||s.x:"",k=(s==null?void 0:s.y)!=null?u||s.y:"",_=h||"M0,0"+(" H"+i)+(" L"+(i-S)+","+(a-E))+(" Q"+i/2+","+a+" "+S+","+(a-E))+" Z",N={top:O?"rotate(180deg)":"",left:O?"rotate(90deg)":"rotate(-90deg)",bottom:O?"":"rotate(180deg)",right:O?"rotate(-90deg)":"rotate(90deg)"}[I];return M.createElement("svg",ko({},m,{"aria-hidden":!0,ref:n,width:O?i:i+y,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[D]:V,[L]:k,[I]:C||O?"100%":"calc(100% - "+y/2+"px)",transform:""+N+(f??""),...p}}),y>0&&M.createElement("path",{clipPath:"url(#"+v+")",fill:"none",stroke:d,strokeWidth:y+(h?0:1),d:_}),M.createElement("path",{stroke:y&&!h?m.fill:"none",d:_}),M.createElement("clipPath",{id:v},M.createElement("rect",{x:-T,y:T*(O?-1:1),width:i+y,height:i})))});function sv(){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 iv=M.createContext(null),av=M.createContext(null),ar=()=>{var e;return((e=M.useContext(iv))==null?void 0:e.id)||null},lr=()=>M.useContext(av);function o_(e){const t=Io(),n=lr(),o=ar();return ke(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function s_(e){const{children:t,id:n}=e,r=ar();return M.createElement(iv.Provider,{value:M.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function i_(e){const{children:t}=e,n=M.useRef([]),r=M.useCallback(i=>{n.current=[...n.current,i]},[]),o=M.useCallback(i=>{n.current=n.current.filter(a=>a!==i)},[]),s=M.useState(()=>sv())[0];return M.createElement(av.Provider,{value:M.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function cr(e){return"data-floating-ui-"+e}function kt(e){const t=b.useRef(e);return ke(()=>{t.current=e}),t}const lv=cr("safe-polygon");function Iu(e,t,n){return n&&!bo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function cv(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:h=!0}=t,f=lr(),p=ar(),m=kt(c),v=kt(l),g=kt(n),w=M.useRef(),y=M.useRef(-1),T=M.useRef(),S=M.useRef(-1),E=M.useRef(!0),I=M.useRef(!1),P=M.useRef(()=>{}),O=M.useCallback(()=>{var _;const N=(_=o.current.openEvent)==null?void 0:_.type;return(N==null?void 0:N.includes("mouse"))&&N!=="mousedown"},[o]);M.useEffect(()=>{if(!a)return;function _(N){let{open:$}=N;$||(clearTimeout(y.current),clearTimeout(S.current),E.current=!0)}return s.on("openchange",_),()=>{s.off("openchange",_)}},[a,s]),M.useEffect(()=>{if(!a||!m.current||!n)return;function _($){O()&&r(!1,$,"hover")}const N=xt(i.floating).documentElement;return N.addEventListener("mouseleave",_),()=>{N.removeEventListener("mouseleave",_)}},[i.floating,n,r,a,m,O]);const C=M.useCallback(function(_,N,$){N===void 0&&(N=!0),$===void 0&&($="hover");const H=Iu(v.current,"close",w.current);H&&!T.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>r(!1,_,$),H)):N&&(clearTimeout(y.current),r(!1,_,$))},[v,r]),L=yt(()=>{P.current(),T.current=void 0}),D=yt(()=>{if(I.current){const _=xt(i.floating).body;_.style.pointerEvents="",_.removeAttribute(lv),I.current=!1}});M.useEffect(()=>{if(!a)return;function _(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function N(A){if(clearTimeout(y.current),E.current=!1,u&&!bo(w.current)||d>0&&!Iu(v.current,"open"))return;const R=Iu(v.current,"open",w.current);R?y.current=window.setTimeout(()=>{g.current||r(!0,A,"hover")},R):r(!0,A,"hover")}function $(A){if(_())return;P.current();const R=xt(i.floating);if(clearTimeout(S.current),m.current&&o.current.floatingContext){n||clearTimeout(y.current),T.current=m.current({...o.current.floatingContext,tree:f,x:A.clientX,y:A.clientY,onClose(){D(),L(),C(A,!0,"safe-polygon")}});const re=T.current;R.addEventListener("mousemove",re),P.current=()=>{R.removeEventListener("mousemove",re)};return}(w.current==="touch"?!ot(i.floating,A.relatedTarget):!0)&&C(A)}function H(A){_()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:f,x:A.clientX,y:A.clientY,onClose(){D(),L(),C(A)}})(A))}if(Be(i.domReference)){var U;const A=i.domReference;return n&&A.addEventListener("mouseleave",H),(U=i.floating)==null||U.addEventListener("mouseleave",H),h&&A.addEventListener("mousemove",N,{once:!0}),A.addEventListener("mouseenter",N),A.addEventListener("mouseleave",$),()=>{var R;n&&A.removeEventListener("mouseleave",H),(R=i.floating)==null||R.removeEventListener("mouseleave",H),h&&A.removeEventListener("mousemove",N),A.removeEventListener("mouseenter",N),A.removeEventListener("mouseleave",$)}}},[i,a,e,u,d,h,C,L,D,r,n,g,f,v,m,o]),ke(()=>{var _;if(a&&n&&(_=m.current)!=null&&_.__options.blockPointerEvents&&O()){const $=xt(i.floating).body;$.setAttribute(lv,""),$.style.pointerEvents="none",I.current=!0;const H=i.floating;if(Be(i.domReference)&&H){var N;const U=i.domReference,A=f==null||(N=f.nodesRef.current.find(R=>R.id===p))==null||(N=N.context)==null?void 0:N.elements.floating;return A&&(A.style.pointerEvents=""),U.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{U.style.pointerEvents="",H.style.pointerEvents=""}}}},[a,n,p,i,f,m,O]),ke(()=>{n||(w.current=void 0,L(),D())},[n,L,D]),M.useEffect(()=>()=>{L(),clearTimeout(y.current),clearTimeout(S.current),D()},[a,i.domReference,L,D]);const V=M.useMemo(()=>{function _(N){w.current=N.pointerType}return{onPointerDown:_,onPointerEnter:_,onMouseMove(N){const{nativeEvent:$}=N;function H(){!E.current&&!g.current&&r(!0,$,"hover")}u&&!bo(w.current)||n||d===0||(clearTimeout(S.current),w.current==="touch"?H():S.current=window.setTimeout(H,d))}}},[u,r,n,g,d]),k=M.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(_){C(_.nativeEvent,!1)}}),[C]);return M.useMemo(()=>a?{reference:V,floating:k}:{},[a,V,k])}function a_(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 Ar(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 l_(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),Ar(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let Oo=new WeakMap,ha=new WeakSet,pa={},Ou=0;const c_=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,uv=e=>e&&(e.host||uv(e.parentNode)),u_=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=uv(n);return e.contains(r)?r:null}).filter(n=>n!=null);function d_(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=u_(t,e),a=new Set,l=new Set(i),c=[];pa[o]||(pa[o]=new WeakMap);const u=pa[o];i.forEach(d),h(t),a.clear();function d(f){!f||a.has(f)||(a.add(f),f.parentNode&&d(f.parentNode))}function h(f){!f||l.has(f)||[].forEach.call(f.children,p=>{if(tr(p)!=="script")if(a.has(p))h(p);else{const m=s?p.getAttribute(s):null,v=m!==null&&m!=="false",g=(Oo.get(p)||0)+1,w=(u.get(p)||0)+1;Oo.set(p,g),u.set(p,w),c.push(p),g===1&&v&&ha.add(p),w===1&&p.setAttribute(o,""),!v&&s&&p.setAttribute(s,"true")}})}return Ou++,()=>{c.forEach(f=>{const p=(Oo.get(f)||0)-1,m=(u.get(f)||0)-1;Oo.set(f,p),u.set(f,m),p||(!ha.has(f)&&s&&f.removeAttribute(s),ha.delete(f)),m||f.removeAttribute(o)}),Ou--,Ou||(Oo=new WeakMap,Oo=new WeakMap,ha=new WeakSet,pa={})}}function dv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=xt(e[0]).body;return d_(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 fv(e,t){const n=Ns(e,Ao());t==="prev"&&n.reverse();const r=n.indexOf(nn(xt(e)));return n.slice(r+1)[0]}function hv(){return fv(document.body,"next")}function pv(){return fv(document.body,"prev")}function $s(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ot(n,r)}function f_(e){Ns(e,Ao()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function h_(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 p_(e,t,n){const r=e.indexOf(t);function o(i){const a=cr("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||ot(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const Au={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 m_;function mv(e){e.key==="Tab"&&(e.target,clearTimeout(m_))}const ma=M.forwardRef(function(t,n){const[r,o]=M.useState();ke(()=>(du()&&o("button"),document.addEventListener("keydown",mv),()=>{document.removeEventListener("keydown",mv)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[cr("focus-guard")]:"",style:Au};return M.createElement("span",ko({},t,s))}),gv=M.createContext(null),yv=cr("portal");function g_(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Io(),o=vv(),[s,i]=M.useState(null),a=M.useRef(null);return ke(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),ke(()=>{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(yv,""),l.appendChild(c),a.current=c,i(c)},[t,r]),ke(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Be(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(yv,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function _o(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=g_({id:n,root:r}),[i,a]=M.useState(null),l=M.useRef(null),c=M.useRef(null),u=M.useRef(null),d=M.useRef(null),h=!!i&&!i.modal&&i.open&&o&&!!(r||s);return M.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function f(p){s&&$s(p)&&(p.type==="focusin"?h_:f_)(s)}return s.addEventListener("focusin",f,!0),s.addEventListener("focusout",f,!0),()=>{s.removeEventListener("focusin",f,!0),s.removeEventListener("focusout",f,!0)}},[s,o,i==null?void 0:i.modal]),M.createElement(gv.Provider,{value:M.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s])},h&&s&&M.createElement(ma,{"data-type":"outside",ref:l,onFocus:f=>{if($s(f,s)){var p;(p=u.current)==null||p.focus()}else{const m=pv()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),h&&s&&M.createElement("span",{"aria-owns":s.id,style:Au}),s&&uf.createPortal(t,s),h&&s&&M.createElement(ma,{"data-type":"outside",ref:c,onFocus:f=>{if($s(f,s)){var p;(p=d.current)==null||p.focus()}else{const m=hv()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,f.nativeEvent))}}}))}const vv=()=>M.useContext(gv),bv=20;let _r=[];function _u(e){_r=_r.filter(n=>n.isConnected);let t=e;if(!(!t||tr(t)==="body")){if(!gA(t,Ao())){const n=Ns(t,Ao())[0];n&&(t=n)}_r.push(t),_r.length>bv&&(_r=_r.slice(-bv))}}function wv(){return _r.slice().reverse().find(e=>e.isConnected)}const y_=M.forwardRef(function(t,n){return M.createElement("button",ko({},t,{type:"button",ref:n,tabIndex:-1,style:Au}))});function Rs(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:h,refs:f,nodeId:p,onOpenChange:m,events:v,dataRef:g,floatingId:w,elements:{domReference:y,floating:T}}=t,S=typeof i=="number"&&i<0,E=Ay(y)&&S,I=c_()?s:!0,P=kt(o),O=kt(i),C=kt(a),L=lr(),D=vv(),V=M.useRef(null),k=M.useRef(null),_=M.useRef(!1),N=M.useRef(!1),$=M.useRef(-1),H=D!=null,U=T==null?void 0:T.firstElementChild,A=(U==null?void 0:U.id)===w?U:T,R=yt(function(Y){return Y===void 0&&(Y=A),Y?Ns(Y,Ao()):[]}),Z=yt(Y=>{const F=R(Y);return P.current.map(j=>y&&j==="reference"?y:A&&j==="floating"?A:F).filter(Boolean).flat()});M.useEffect(()=>{if(r||!c)return;function Y(j){if(j.key==="Tab"){ot(A,nn(xt(A)))&&R().length===0&&!E&&Pt(j);const z=Z(),G=wn(j);P.current[0]==="reference"&&G===y&&(Pt(j),j.shiftKey?ir(z[z.length-1]):ir(z[1])),P.current[1]==="floating"&&G===A&&j.shiftKey&&(Pt(j),ir(z[0]))}}const F=xt(A);return F.addEventListener("keydown",Y),()=>{F.removeEventListener("keydown",Y)}},[r,y,A,c,P,E,R,Z]),M.useEffect(()=>{if(r||!T)return;function Y(F){const j=wn(F),G=R().indexOf(j);G!==-1&&($.current=G)}return T.addEventListener("focusin",Y),()=>{T.removeEventListener("focusin",Y)}},[r,T,R]),M.useEffect(()=>{if(r||!d)return;function Y(){N.current=!0,setTimeout(()=>{N.current=!1})}function F(j){const z=j.relatedTarget;queueMicrotask(()=>{const G=!(ot(y,z)||ot(T,z)||ot(z,T)||ot(D==null?void 0:D.portalNode,z)||z!=null&&z.hasAttribute(cr("focus-guard"))||L&&(Ar(L.nodesRef.current,p).find(W=>{var te,B;return ot((te=W.context)==null?void 0:te.elements.floating,z)||ot((B=W.context)==null?void 0:B.elements.domReference,z)})||a_(L.nodesRef.current,p).find(W=>{var te,B;return((te=W.context)==null?void 0:te.elements.floating)===z||((B=W.context)==null?void 0:B.elements.domReference)===z})));if(l&&G&&nn(xt(A))===xt(A).body){ft(A)&&(A==null||A.focus());const W=$.current,te=R(),B=te[W]||te[te.length-1]||A;ft(B)&&B.focus()}(E||!c)&&z&&G&&!N.current&&z!==wv()&&(_.current=!0,m(!1,j))})}if(T&&ft(y))return y.addEventListener("focusout",F),y.addEventListener("pointerdown",Y),T.addEventListener("focusout",F),()=>{y.removeEventListener("focusout",F),y.removeEventListener("pointerdown",Y),T.removeEventListener("focusout",F)}},[r,y,T,A,c,p,L,D,m,d,l,R,E]),M.useEffect(()=>{var Y;if(r)return;const F=Array.from((D==null||(Y=D.portalNode)==null?void 0:Y.querySelectorAll("["+cr("portal")+"]"))||[]);if(T){const j=[T,...F,V.current,k.current,P.current.includes("reference")||E?y:null].filter(G=>G!=null),z=c||E?dv(j,I,!I):dv(j);return()=>{z()}}},[r,y,T,c,P,D,E,I]),ke(()=>{if(r||!ft(A))return;const Y=xt(A),F=nn(Y);queueMicrotask(()=>{const j=Z(A),z=O.current,G=(typeof z=="number"?j[z]:z.current)||A,W=ot(A,F);!S&&!W&&h&&ir(G,{preventScroll:G===A})})},[r,h,A,S,Z,O]),ke(()=>{if(r||!A)return;let Y=!1;const F=xt(A),j=nn(F);let G=g.current.openEvent;const W=f.domReference.current;_u(j);function te(B){let{open:Se,reason:Xe,event:Ue,nested:at}=B;Se&&(G=Ue),Xe==="escape-key"&&f.domReference.current&&_u(f.domReference.current),Xe==="hover"&&Ue.type==="mouseleave"&&(_.current=!0),Xe==="outside-press"&&(at?(_.current=!1,Y=!0):_.current=!(Iy(Ue)||uu(Ue)))}return v.on("openchange",te),()=>{v.off("openchange",te);const B=nn(F),Se=ot(T,B)||L&&Ar(L.nodesRef.current,p).some(de=>{var Ce;return ot((Ce=de.context)==null?void 0:Ce.elements.floating,B)});(Se||G&&["click","mousedown"].includes(G.type))&&f.domReference.current&&_u(f.domReference.current);const Ue=W||j,at=Ns(xt(Ue).body,Ao());queueMicrotask(()=>{let de=wv();!de&&ft(Ue)&&T&&(de=p_(at,Ue,T)),C.current&&!_.current&&ft(de)&&(!(de!==B&&B!==F.body)||Se)&&de.focus({preventScroll:Y})})}},[r,T,A,C,g,f,v,L,p]),ke(()=>{if(!r&&D)return D.setFocusManagerState({modal:c,closeOnFocusOut:d,open:h,onOpenChange:m,refs:f}),()=>{D.setFocusManagerState(null)}},[r,D,c,h,m,f,d]),ke(()=>{if(r||!A||typeof MutationObserver!="function"||S)return;const Y=()=>{const j=A.getAttribute("tabindex"),z=R(),G=nn(xt(T)),W=z.indexOf(G);W!==-1&&($.current=W),P.current.includes("floating")||G!==f.domReference.current&&z.length===0?j!=="0"&&A.setAttribute("tabindex","0"):j!=="-1"&&A.setAttribute("tabindex","-1")};Y();const F=new MutationObserver(Y);return F.observe(A,{childList:!0,subtree:!0,attributes:!0}),()=>{F.disconnect()}},[r,T,A,f,P,R,S]);function re(Y){return r||!u||!c?null:M.createElement(y_,{ref:Y==="start"?V:k,onClick:F=>m(!1,F.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&I&&(c?!E:!0)&&(H||c);return M.createElement(M.Fragment,null,ee&&M.createElement(ma,{"data-type":"inside",ref:D==null?void 0:D.beforeInsideRef,onFocus:Y=>{if(c){const j=Z();ir(o[0]==="reference"?j[0]:j[j.length-1])}else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(_.current=!1,$s(Y,D.portalNode)){const j=hv()||y;j==null||j.focus()}else{var F;(F=D.beforeOutsideRef.current)==null||F.focus()}}}),!E&&re("start"),n,re("end"),ee&&M.createElement(ma,{"data-type":"inside",ref:D==null?void 0:D.afterInsideRef,onFocus:Y=>{if(c)ir(Z()[0]);else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(d&&(_.current=!0),$s(Y,D.portalNode)){const j=pv()||y;j==null||j.focus()}else{var F;(F=D.afterOutsideRef.current)==null||F.focus()}}}))}const Mu=new Set,v_=M.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=Io();return ke(()=>{if(!r)return;Mu.add(s);const i=/iP(hone|ad|od)|iOS/.test(cu()),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,h=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var f,p;const m=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,v=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(h-Math.floor(v))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{Mu.delete(s),Mu.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,h)))}},[s,r]),M.createElement("div",ko({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function xv(e){return ft(e.target)&&e.target.tagName==="BUTTON"}function Sv(e){return pu(e)}function ga(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=M.useRef(),h=M.useRef(!1),f=M.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(bo(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}bo(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||xv(p))&&(p.key===" "&&!Sv(s)&&(p.preventDefault(),h.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||xv(p)||Sv(s)||p.key===" "&&h.current&&(h.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return M.useMemo(()=>i?{reference:f}:{},[i,f])}function b_(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var s;const i=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((s=t.dataRef.current.openEvent)==null?void 0:s.type)||"")&&t.pointerType!=="touch";let u=i.width,d=i.height,h=i.x,f=i.y;return n==null&&t.x&&a&&(n=i.x-t.x),r==null&&t.y&&l&&(r=i.y-t.y),h-=n||0,f-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?i.width:0,d=t.axis==="x"?i.height:0,h=a&&t.x!=null?t.x:h,f=l&&t.y!=null?t.y:f):o&&!c&&(d=t.axis==="x"?i.height:d,u=t.axis==="y"?i.width:u),o=!0,{width:u,height:d,x:h,y:f,top:f,right:h+u,bottom:f+d,left:h}}}}function Tv(e){return e!=null&&e.clientX!=null}function w_(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:s},refs:i}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=M.useRef(!1),h=M.useRef(null),[f,p]=M.useState(),[m,v]=M.useState([]),g=yt((E,I)=>{d.current||r.current.openEvent&&!Tv(r.current.openEvent)||i.setPositionReference(b_(s,{x:E,y:I,axis:l,dataRef:r,pointerType:f}))}),w=yt(E=>{c!=null||u!=null||(n?h.current||v([]):g(E.clientX,E.clientY))}),y=bo(f)?o:n,T=M.useCallback(()=>{if(!y||!a||c!=null||u!=null)return;const E=Lt(o);function I(P){const O=wn(P);ot(o,O)?(E.removeEventListener("mousemove",I),h.current=null):g(P.clientX,P.clientY)}if(!r.current.openEvent||Tv(r.current.openEvent)){E.addEventListener("mousemove",I);const P=()=>{E.removeEventListener("mousemove",I),h.current=null};return h.current=P,P}i.setPositionReference(s)},[y,a,c,u,o,r,i,s,g]);M.useEffect(()=>T(),[T,m]),M.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),M.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),ke(()=>{a&&(c!=null||u!=null)&&(d.current=!1,g(c,u))},[a,c,u,g]);const S=M.useMemo(()=>{function E(I){let{pointerType:P}=I;p(P)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:w,onMouseEnter:w}},[w]);return M.useMemo(()=>a?{reference:S}:{},[a,S])}const x_={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},S_={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ev=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 Mo(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:h=!1,bubbles:f,capture:p}=t,m=lr(),v=yt(typeof l=="function"?l:()=>!1),g=typeof l=="function"?v:l,w=M.useRef(!1),y=M.useRef(!1),{escapeKey:T,outsidePress:S}=Ev(f),{escapeKey:E,outsidePress:I}=Ev(p),P=yt(k=>{var _;if(!n||!i||!a||k.key!=="Escape")return;const N=(_=s.current.floatingContext)==null?void 0:_.nodeId,$=m?Ar(m.nodesRef.current,N):[];if(!T&&(k.stopPropagation(),$.length>0)){let H=!0;if($.forEach(U=>{var A;if((A=U.context)!=null&&A.open&&!U.context.dataRef.current.__escapeKeyBubbles){H=!1;return}}),!H)return}r(!1,WO(k)?k.nativeEvent:k,"escape-key")}),O=yt(k=>{var _;const N=()=>{var $;P(k),($=wn(k))==null||$.removeEventListener("keydown",N)};(_=wn(k))==null||_.addEventListener("keydown",N)}),C=yt(k=>{var _;const N=w.current;w.current=!1;const $=y.current;if(y.current=!1,c==="click"&&$||N||typeof g=="function"&&!g(k))return;const H=wn(k),U="["+cr("inert")+"]",A=xt(o.floating).querySelectorAll(U);let R=Be(H)?H:null;for(;R&&!nr(R);){const Y=Ln(R);if(nr(Y)||!Be(Y))break;R=Y}if(A.length&&Be(H)&&!zO(H)&&!ot(H,o.floating)&&Array.from(A).every(Y=>!ot(R,Y)))return;if(ft(H)&&V){const Y=H.clientWidth>0&&H.scrollWidth>H.clientWidth,F=H.clientHeight>0&&H.scrollHeight>H.clientHeight;let j=F&&k.offsetX>H.clientWidth;if(F&&Yt(H).direction==="rtl"&&(j=k.offsetX<=H.offsetWidth-H.clientWidth),j||Y&&k.offsetY>H.clientHeight)return}const Z=(_=s.current.floatingContext)==null?void 0:_.nodeId,re=m&&Ar(m.nodesRef.current,Z).some(Y=>{var F;return hu(k,(F=Y.context)==null?void 0:F.elements.floating)});if(hu(k,o.floating)||hu(k,o.domReference)||re)return;const ee=m?Ar(m.nodesRef.current,Z):[];if(ee.length>0){let Y=!0;if(ee.forEach(F=>{var j;if((j=F.context)!=null&&j.open&&!F.context.dataRef.current.__outsidePressBubbles){Y=!1;return}}),!Y)return}r(!1,k,"outside-press")}),L=yt(k=>{var _;const N=()=>{var $;C(k),($=wn(k))==null||$.removeEventListener(c,N)};(_=wn(k))==null||_.addEventListener(c,N)});M.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=T,s.current.__outsidePressBubbles=S;function k($){r(!1,$,"ancestor-scroll")}const _=xt(o.floating);a&&_.addEventListener("keydown",E?O:P,E),g&&_.addEventListener(c,I?L:C,I);let N=[];return h&&(Be(o.domReference)&&(N=rr(o.domReference)),Be(o.floating)&&(N=N.concat(rr(o.floating))),!Be(o.reference)&&o.reference&&o.reference.contextElement&&(N=N.concat(rr(o.reference.contextElement)))),N=N.filter($=>{var H;return $!==((H=_.defaultView)==null?void 0:H.visualViewport)}),N.forEach($=>{$.addEventListener("scroll",k,{passive:!0})}),()=>{a&&_.removeEventListener("keydown",E?O:P,E),g&&_.removeEventListener(c,I?L:C,I),N.forEach($=>{$.removeEventListener("scroll",k)})}},[s,o,a,g,c,n,r,h,i,T,S,P,E,O,C,I,L]),M.useEffect(()=>{w.current=!1},[g,c]);const D=M.useMemo(()=>({onKeyDown:P,[x_[d]]:k=>{u&&r(!1,k.nativeEvent,"reference-press")}}),[P,r,u,d]),V=M.useMemo(()=>({onKeyDown:P,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[S_[c]]:()=>{w.current=!0}}),[P,c]);return M.useMemo(()=>i?{reference:D,floating:V}:{},[i,D,V])}function T_(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Io(),s=M.useRef({}),[i]=M.useState(()=>sv()),a=ar()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!Be(f)&&r_("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=M.useState(r.reference),u=yt((f,p,m)=>{s.current.openEvent=f?p:void 0,i.emit("openchange",{open:f,event:p,reason:m,nested:a}),n==null||n(f,p,m)}),d=M.useMemo(()=>({setPositionReference:c}),[]),h=M.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return M.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:h,events:i,floatingId:o,refs:d}),[t,u,h,i,o,d])}function Do(e){e===void 0&&(e={});const{nodeId:t}=e,n=T_({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=M.useState(null),[a,l]=M.useState(null),u=(o==null?void 0:o.reference)||s,d=M.useRef(null),h=lr();ke(()=>{u&&(d.current=u)},[u]);const f=HA({...e,elements:{...o,...a&&{reference:a}}}),p=M.useCallback(y=>{const T=Be(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(T),f.refs.setReference(T)},[f.refs]),m=M.useCallback(y=>{(Be(y)||y===null)&&(d.current=y,i(y)),(Be(f.refs.reference.current)||f.refs.reference.current===null||y!==null&&!Be(y))&&f.refs.setReference(y)},[f.refs]),v=M.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:d}),[f.refs,m,p]),g=M.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),w=M.useMemo(()=>({...f,...r,refs:v,elements:g,nodeId:t}),[f,v,g,t,r]);return ke(()=>{r.dataRef.current.floatingContext=w;const y=h==null?void 0:h.nodesRef.current.find(T=>T.id===t);y&&(y.context=w)}),M.useMemo(()=>({...f,context:w,refs:v,elements:g}),[f,v,g,w])}function E_(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=M.useRef(!1),u=M.useRef(),d=M.useRef(!0);M.useEffect(()=>{if(!a)return;const f=Lt(i.domReference);function p(){!n&&ft(i.domReference)&&i.domReference===nn(xt(i.domReference))&&(c.current=!0)}function m(){d.current=!0}return f.addEventListener("blur",p),f.addEventListener("keydown",m,!0),()=>{f.removeEventListener("blur",p),f.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),M.useEffect(()=>{if(!a)return;function f(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,a]),M.useEffect(()=>()=>{clearTimeout(u.current)},[]);const h=M.useMemo(()=>({onPointerDown(f){uu(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const p=wn(f.nativeEvent);if(l&&Be(p))try{if(du()&&Oy())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!pu(p))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const p=f.relatedTarget,m=f.nativeEvent,v=Be(p)&&p.hasAttribute(cr("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var g;const w=nn(i.domReference?i.domReference.ownerDocument:document);!p&&w===i.domReference||ot((g=s.current.floatingContext)==null?void 0:g.refs.floating.current,w)||ot(i.domReference,w)||v||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return M.useMemo(()=>a?{reference:h}:{},[a,h])}const Cv="active",Pv="selected";function Du(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[Cv]:i,[Pv]: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&&[Cv,Pv].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 h,f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return(h=r.get(c))==null?void 0:h.map(v=>v(...p)).find(v=>v!==void 0)}}}else i[c]=u}),i),{})}}function No(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=M.useCallback(a=>Du(a,e,"reference"),t),s=M.useCallback(a=>Du(a,e,"floating"),n),i=M.useCallback(a=>Du(a,e,"item"),r);return M.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let kv=!1;function ya(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Iv(e,t){return ya(t,e===Pu||e===Fs,e===Co||e===Po)}function Nu(e,t,n){return ya(t,e===Fs,n?e===Co:e===Po)||e==="Enter"||e===" "||e===""}function C_(e,t,n){return ya(t,n?e===Co:e===Po,e===Fs)}function Ov(e,t,n){return ya(t,n?e===Po:e===Co,e===Pu)}function Av(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:h=!1,rtl:f=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:g=!0,disabledIndices:w=void 0,orientation:y="vertical",cols:T=1,scrollItemIntoView:S=!0,virtualItemRef:E,itemSizes:I,dense:P=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||fa("`useListNavigation` looping must be enabled to allow escaping."),p||fa("`useListNavigation` must be virtual to allow escaping.")),y==="vertical"&&T>1&&fa("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const O=ar(),C=lr(),L=yt(a),D=M.useRef(m),V=M.useRef(c??-1),k=M.useRef(null),_=M.useRef(!0),N=M.useRef(L),$=M.useRef(!!o.floating),H=M.useRef(n),U=M.useRef(!1),A=M.useRef(!1),R=kt(w),Z=kt(n),re=kt(S),ee=kt(o.floating),Y=kt(c),[F,j]=M.useState(),[z,G]=M.useState(),W=yt(function(de,Ce,ce){ce===void 0&&(ce=!1);function Oe(Ae){p?(j(Ae.id),C==null||C.events.emit("virtualfocus",Ae),E&&(E.current=Ae)):ir(Ae,{preventScroll:!0,sync:Oy()&&du()?kv||U.current:!1})}const pt=de.current[Ce.current];pt&&Oe(pt),requestAnimationFrame(()=>{const Ae=de.current[Ce.current]||pt;if(!Ae)return;pt||Oe(Ae);const mt=re.current;mt&&B&&(ce||!_.current)&&(Ae.scrollIntoView==null||Ae.scrollIntoView(typeof mt=="boolean"?{block:"nearest",inline:"nearest"}:mt))})});ke(()=>{document.createElement("div").focus({get preventScroll(){return kv=!0,!1}})},[]),ke(()=>{l&&(n&&o.floating?D.current&&c!=null&&(A.current=!0,V.current=c,L(c)):$.current&&(V.current=-1,N.current(null)))},[l,n,o.floating,c,L]),ke(()=>{if(l&&n&&o.floating)if(i==null){if(U.current=!1,Y.current!=null)return;if($.current&&(V.current=-1,W(s,V)),(!H.current||!$.current)&&D.current&&(k.current!=null||D.current===!0&&k.current==null)){let de=0;const Ce=()=>{s.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(Ce),de++):(V.current=k.current==null||Nu(k.current,y,f)||h?ku(s,R.current):Qy(s,R.current),k.current=null,L(V.current))};Ce()}}else Ls(s,i)||(V.current=i,W(s,V,A.current),A.current=!1)},[l,n,o.floating,i,Y,h,s,y,f,L,W,R]),ke(()=>{var de;if(!l||o.floating||!C||p||!$.current)return;const Ce=C.nodesRef.current,ce=(de=Ce.find(Ae=>Ae.id===O))==null||(de=de.context)==null?void 0:de.elements.floating,Oe=nn(xt(o.floating)),pt=Ce.some(Ae=>Ae.context&&ot(Ae.context.elements.floating,Oe));ce&&!pt&&_.current&&ce.focus({preventScroll:!0})},[l,o.floating,C,O,p]),ke(()=>{if(!l||!C||!p||O)return;function de(Ce){G(Ce.id),E&&(E.current=Ce)}return C.events.on("virtualfocus",de),()=>{C.events.off("virtualfocus",de)}},[l,C,p,O,E]),ke(()=>{N.current=L,$.current=!!o.floating}),ke(()=>{n||(k.current=null)},[n]),ke(()=>{H.current=n},[n]);const te=i!=null,B=M.useMemo(()=>{function de(ce){if(!n)return;const Oe=s.current.indexOf(ce);Oe!==-1&&L(Oe)}return{onFocus(ce){let{currentTarget:Oe}=ce;de(Oe)},onClick:ce=>{let{currentTarget:Oe}=ce;return Oe.focus({preventScroll:!0})},...v&&{onMouseMove(ce){let{currentTarget:Oe}=ce;de(Oe)},onPointerLeave(ce){let{pointerType:Oe}=ce;!_.current||Oe==="touch"||(V.current=-1,W(s,V),L(null),p||ir(ee.current,{preventScroll:!0}))}}}},[n,ee,W,v,s,L,p]),Se=yt(de=>{if(_.current=!1,U.current=!0,!Z.current&&de.currentTarget===ee.current)return;if(h&&Ov(de.key,y,f)){Pt(de),r(!1,de.nativeEvent,"list-navigation"),ft(o.domReference)&&!p&&o.domReference.focus();return}const Ce=V.current,ce=ku(s,w),Oe=Qy(s,w);if(de.key==="Home"&&(Pt(de),V.current=ce,L(V.current)),de.key==="End"&&(Pt(de),V.current=Oe,L(V.current)),T>1){const pt=I||Array.from({length:s.current.length},()=>({width:1,height:1})),Ae=KA(pt,T,P),mt=Ae.findIndex(ae=>ae!=null&&!da(s.current,ae,w)),Q=Ae.reduce((ae,_e,Qe)=>_e!=null&&!da(s.current,_e,w)?Qe:ae,-1);if(V.current=Ae[qA({current:Ae.map(ae=>ae!=null?s.current[ae]:null)},{event:de,orientation:y,loop:d,cols:T,disabledIndices:XA([...w||s.current.map((ae,_e)=>da(s.current,_e)?_e:void 0),void 0],Ae),minIndex:mt,maxIndex:Q,prevIndex:ZA(V.current>Oe?ce:V.current,pt,Ae,T,de.key===Fs?"bl":de.key===Po?"tr":"tl"),stopEvent:!0})],L(V.current),y==="both")return}if(Iv(de.key,y)){if(Pt(de),n&&!p&&nn(de.currentTarget.ownerDocument)===de.currentTarget){V.current=Nu(de.key,y,f)?ce:Oe,L(V.current);return}Nu(de.key,y,f)?d?V.current=Ce>=Oe?u&&Ce!==s.current.length?-1:ce:Mt(s,{startingIndex:Ce,disabledIndices:w}):V.current=Math.min(Oe,Mt(s,{startingIndex:Ce,disabledIndices:w})):d?V.current=Ce<=ce?u&&Ce!==-1?s.current.length:Oe:Mt(s,{startingIndex:Ce,decrement:!0,disabledIndices:w}):V.current=Math.max(ce,Mt(s,{startingIndex:Ce,decrement:!0,disabledIndices:w})),Ls(s,V.current)?L(null):L(V.current)}}),Xe=M.useMemo(()=>p&&n&&te&&{"aria-activedescendant":z||F},[p,n,te,z,F]),Ue=M.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...!Ay(o.domReference)&&Xe,onKeyDown:Se,onPointerMove(){_.current=!0}}),[Xe,Se,o.domReference,y]),at=M.useMemo(()=>{function de(ce){m==="auto"&&Iy(ce.nativeEvent)&&(D.current=!0)}function Ce(ce){D.current=m,m==="auto"&&uu(ce.nativeEvent)&&(D.current=!0)}return{...Xe,onKeyDown(ce){_.current=!1;const Oe=ce.key.indexOf("Arrow")===0,pt=C_(ce.key,y,f),Ae=Ov(ce.key,y,f),mt=Iv(ce.key,y),Q=(h?pt:mt)||ce.key==="Enter"||ce.key.trim()==="";if(p&&n){const It=C==null?void 0:C.nodesRef.current.find(Rt=>Rt.parentId==null),Ft=C&&It?l_(C.nodesRef.current,It.id):null;if(Oe&&Ft&&E){const Rt=new KeyboardEvent("keydown",{key:ce.key,bubbles:!0});if(pt||Ae){var ae,_e;const Wr=((ae=Ft.context)==null?void 0:ae.elements.domReference)===ce.currentTarget,Jo=Ae&&!Wr?(_e=Ft.context)==null?void 0:_e.elements.domReference:pt?s.current.find(es=>(es==null?void 0:es.id)===F):null;Jo&&(Pt(ce),Jo.dispatchEvent(Rt),G(void 0))}if(mt&&Ft.context&&Ft.context.open&&Ft.parentId&&ce.currentTarget!==Ft.context.elements.domReference){var Qe;Pt(ce),(Qe=Ft.context.elements.domReference)==null||Qe.dispatchEvent(Rt);return}}return Se(ce)}if(!(!n&&!g&&Oe)){if(Q&&(k.current=h&&mt?null:ce.key),h){pt&&(Pt(ce),n?(V.current=ku(s,R.current),L(V.current)):r(!0,ce.nativeEvent,"list-navigation"));return}mt&&(c!=null&&(V.current=c),Pt(ce),!n&&g?r(!0,ce.nativeEvent,"list-navigation"):Se(ce),n&&L(V.current))}},onFocus(){n&&!p&&L(null)},onPointerDown:Ce,onMouseDown:de,onClick:de}},[F,Xe,Se,R,m,s,h,L,r,n,g,y,f,c,C,p,E]);return M.useMemo(()=>l?{reference:at,floating:Ue,item:B}:{},[l,at,Ue,B])}const P_=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Fo(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=P_.get(i))!=null?n:i,l=Io(),u=ar()!=null,d=M.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,i]),h=M.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),f=M.useCallback(p=>{let{active:m,selected:v}=p;const g={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...g,"aria-selected":m&&v};case"combobox":return{...g,...m&&{"aria-selected":!0}}}return{}},[o,i]);return M.useMemo(()=>s?{reference:d,floating:h,item:f}:{},[s,d,h,f])}const _v=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Lo(e,t){return typeof e=="function"?e(t):e}function k_(e,t){const[n,r]=M.useState(e);return e&&!n&&r(!0),M.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function I_(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=(typeof o=="number"?o:o.close)||0,[a,l]=M.useState("unmounted"),c=k_(n,i);return!c&&a==="close"&&l("unmounted"),ke(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function O_(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:s,duration:i=250}=t,a=e.placement,l=a.split("-")[0],c=M.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",d=(u?i:i.open)||0,h=(u?i:i.close)||0,[f,p]=M.useState(()=>({...Lo(s,c),...Lo(n,c)})),{isMounted:m,status:v}=I_(e,{duration:i}),g=kt(n),w=kt(r),y=kt(o),T=kt(s);return ke(()=>{const S=Lo(g.current,c),E=Lo(y.current,c),I=Lo(T.current,c),P=Lo(w.current,c)||Object.keys(S).reduce((O,C)=>(O[C]="",O),{});if(v==="initial"&&p(O=>({transitionProperty:O.transitionProperty,...I,...S})),v==="open"&&p({transitionProperty:Object.keys(P).map(_v).join(","),transitionDuration:d+"ms",...I,...P}),v==="close"){const O=E||S;p({transitionProperty:Object.keys(O).map(_v).join(","),transitionDuration:h+"ms",...I,...O})}},[h,y,g,w,T,d,v,c]),{isMounted:m,styles:f}}function A_(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:h=[],selectedIndex:f=null}=t,p=M.useRef(),m=M.useRef(""),v=M.useRef((n=f??i)!=null?n:-1),g=M.useRef(null),w=yt(a),y=yt(l),T=kt(u),S=kt(h);ke(()=>{r&&(clearTimeout(p.current),g.current=null,m.current="")},[r]),ke(()=>{if(r&&m.current===""){var C;v.current=(C=f??i)!=null?C:-1}},[r,f,i]);const E=yt(C=>{C?o.current.typing||(o.current.typing=C,y(C)):o.current.typing&&(o.current.typing=C,y(C))}),I=yt(C=>{function L(N,$,H){const U=T.current?T.current($,H):$.find(A=>(A==null?void 0:A.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return U?N.indexOf(U):-1}const D=s.current;if(m.current.length>0&&m.current[0]!==" "&&(L(D,D,m.current)===-1?E(!1):C.key===" "&&Pt(C)),D==null||S.current.includes(C.key)||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;r&&C.key!==" "&&(Pt(C),E(!0)),D.every(N=>{var $,H;return N?(($=N[0])==null?void 0:$.toLocaleLowerCase())!==((H=N[1])==null?void 0:H.toLocaleLowerCase()):!0})&&m.current===C.key&&(m.current="",v.current=g.current),m.current+=C.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",v.current=g.current,E(!1)},d);const k=v.current,_=L(D,[...D.slice((k||0)+1),...D.slice(0,(k||0)+1)],m.current);_!==-1?(w(_),g.current=_):C.key!==" "&&(m.current="",E(!1))}),P=M.useMemo(()=>({onKeyDown:I}),[I]),O=M.useMemo(()=>({onKeyDown:I,onKeyUp(C){C.key===" "&&E(!1)}}),[I,E]);return M.useMemo(()=>c?{reference:P,floating:O}:{},[c,P,O])}function Mv(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 __(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function M_(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,h){const f=performance.now(),p=f-l;if(i===null||a===null||p===0)return i=d,a=h,l=f,null;const m=d-i,v=h-a,w=Math.sqrt(m*m+v*v)/p;return i=d,a=h,l=f,w}const u=d=>{let{x:h,y:f,placement:p,elements:m,onClose:v,nodeId:g,tree:w}=d;return function(T){function S(){clearTimeout(o),v()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||h==null||f==null)return;const{clientX:E,clientY:I}=T,P=[E,I],O=wn(T),C=T.type==="mouseleave",L=ot(m.floating,O),D=ot(m.domReference,O),V=m.domReference.getBoundingClientRect(),k=m.floating.getBoundingClientRect(),_=p.split("-")[0],N=h>k.right-k.width/2,$=f>k.bottom-k.height/2,H=__(P,V),U=k.width>V.width,A=k.height>V.height,R=(U?V:k).left,Z=(U?V:k).right,re=(A?V:k).top,ee=(A?V:k).bottom;if(L&&(s=!0,!C))return;if(D&&(s=!1),D&&!C){s=!0;return}if(C&&Be(T.relatedTarget)&&ot(m.floating,T.relatedTarget)||w&&Ar(w.nodesRef.current,g).some(j=>{let{context:z}=j;return z==null?void 0:z.open}))return;if(_==="top"&&f>=V.bottom-1||_==="bottom"&&f<=V.top+1||_==="left"&&h>=V.right-1||_==="right"&&h<=V.left+1)return S();let Y=[];switch(_){case"top":Y=[[R,V.top+1],[R,k.bottom-1],[Z,k.bottom-1],[Z,V.top+1]];break;case"bottom":Y=[[R,k.top+1],[R,V.bottom-1],[Z,V.bottom-1],[Z,k.top+1]];break;case"left":Y=[[k.right-1,ee],[k.right-1,re],[V.left+1,re],[V.left+1,ee]];break;case"right":Y=[[V.right-1,ee],[V.right-1,re],[k.left+1,re],[k.left+1,ee]];break}function F(j){let[z,G]=j;switch(_){case"top":{const W=[U?z+t/2:N?z+t*4:z-t*4,G+t+1],te=[U?z-t/2:N?z+t*4:z-t*4,G+t+1],B=[[k.left,N||U?k.bottom-t:k.top],[k.right,N?U?k.bottom-t:k.top:k.bottom-t]];return[W,te,...B]}case"bottom":{const W=[U?z+t/2:N?z+t*4:z-t*4,G-t],te=[U?z-t/2:N?z+t*4:z-t*4,G-t],B=[[k.left,N||U?k.top+t:k.bottom],[k.right,N?U?k.top+t:k.bottom:k.top+t]];return[W,te,...B]}case"left":{const W=[z+t+1,A?G+t/2:$?G+t*4:G-t*4],te=[z+t+1,A?G-t/2:$?G+t*4:G-t*4];return[...[[$||A?k.right-t:k.left,k.top],[$?A?k.right-t:k.left:k.right-t,k.bottom]],W,te]}case"right":{const W=[z-t,A?G+t/2:$?G+t*4:G-t*4],te=[z-t,A?G-t/2:$?G+t*4:G-t*4],B=[[$||A?k.left+t:k.right,k.top],[$?A?k.left+t:k.right:k.left+t,k.bottom]];return[W,te,...B]}}}if(!Mv([E,I],Y)){if(s&&!H)return S();if(!C&&r){const j=c(T.clientX,T.clientY);if(j!==null&&j<.1)return S()}Mv([E,I],F([h,f]))?!s&&r&&(o=window.setTimeout(S,40)):S()}}};return u.__options={blockPointerEvents:n},u}const Vo=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),s=b.useMemo(()=>[ca(10),Eu({fallbackAxisSideDirection:"end"}),Tu(),Zy({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=Do({open:n,middleware:s,transform:!0,whileElementsMounted:ia,onOpenChange:(p,m)=>{var g;const v=m==null?void 0:m.relatedTarget;v&&v.dataset.floating==="true"&&!p||(r(p),(g=e.onChange)==null||g.call(e,p))}}),c=ga(l),u=Mo(l),d=Fo(l),{getReferenceProps:h,getFloatingProps:f}=No([c,u,d]);return x.jsxs(b.Fragment,{children:[x.jsx("button",{ref:i.setReference,...h(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(_o,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(Rs,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:x.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-6 shadow-2xl",ref:i.setFloating,style:a,"aria-labelledby":t,...f(),children:[x.jsx(ov,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),x.jsx("header",{className:"mb-2",children:x.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},D_=e=>{const t=b.useRef(null),n=b.useId(),r=`${n}:wrapper`,o=`${n}:title`,[s,i]=b.useState(!1),{context:a,refs:l}=Do({transform:!0,open:s!==null,nodeId:n,onOpenChange:i,strategy:"absolute"}),c=ga(a),u=Fo(a),d=Mo(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:h,getReferenceProps:f}=No([c,u,d]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(Jr,{...f(e),as:Ct.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>i(!0),children:x.jsx(Ct.span,{layoutId:o,children:e.trigger})}),x.jsx(Ps,{children:s?x.jsx(_o,{root:t,children:x.jsx(Rs,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:x.jsx(Ct.div,{...h(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})};function N_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function F_(...e){return t=>e.forEach(n=>N_(n,t))}var Fu=M.forwardRef((e,t)=>{const{children:n,...r}=e,o=M.Children.toArray(n),s=o.find(V_);if(s){const i=s.props.children,a=o.map(l=>l===s?M.Children.count(i)>1?M.Children.only(null):M.isValidElement(i)?i.props.children:null:l);return x.jsx(Lu,{...r,ref:t,children:M.isValidElement(i)?M.cloneElement(i,void 0,a):null})}return x.jsx(Lu,{...r,ref:t,children:n})});Fu.displayName="Slot";var Lu=M.forwardRef((e,t)=>{const{children:n,...r}=e;if(M.isValidElement(n)){const o=R_(n);return M.cloneElement(n,{...$_(r,n.props),ref:t?F_(t,o):o})}return M.Children.count(n)>1?M.Children.only(null):null});Lu.displayName="SlotClone";var L_=({children:e})=>x.jsx(x.Fragment,{children:e});function V_(e){return M.isValidElement(e)&&e.type===L_}function $_(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 R_(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 Dv=300,j_=500,Nv=(e="")=>He("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover: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),Vu=b.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Fv=b.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:s,...i},a)=>{const l=ar(),c=l!==null,[u,d]=b.useState(!1),[h,f]=b.useState(!1),[p,m]=b.useState(null),v=b.useRef([]),g=b.useRef([]),w=b.useContext(Vu),y=lr(),T=o_(),S=tv(),{floatingStyles:E,refs:I,context:P}=Do({nodeId:T,open:u,transform:!0,onOpenChange:d,whileElementsMounted:ia,placement:c?"right":"bottom-start",strategy:"absolute",middleware:[ca({mainAxis:c?0:4,alignmentAxis:c?-4:0}),Eu(),Tu()]}),O=Fo(P,{role:"menu",enabled:!0}),C=Mo(P,{bubbles:!0}),L=cv(P,{enabled:n,delay:{open:Dv},handleClose:M_({blockPointerEvents:!0})}),D=ga(P,{event:"mousedown",toggle:!c,ignoreMouse:c,keyboardHandlers:!0}),V=Av(P,{loop:!0,activeIndex:p,virtual:!0,nested:c,allowEscape:!0,listRef:v,scrollItemIntoView:!0,onNavigate:m}),k=A_(P,{activeIndex:p,listRef:g,resetMs:j_,onMatch:u?m:void 0}),{getReferenceProps:_,getFloatingProps:N,getItemProps:$}=No([L,D,O,C,V,k]);b.useEffect(()=>{if(!y)return;const U=()=>d(!1),A=R=>{R.nodeId!==T&&R.parentId===l&&d(!1)};return y.events.on("click",U),y.events.on("menuopen",A),()=>{y.events.off("click",U),y.events.off("menuopen",A)}},[y,T,l]),b.useEffect(()=>{u&&y&&y.events.emit("menuopen",{parentId:l,nodeId:T})},[y,u,T,l]);const H=r?i.className:He(Nv(i.className));return x.jsxs(s_,{id:T,children:[x.jsx(b.Fragment,{children:i.asChild?x.jsx(Fu,{children:s,ref:Cu([I.setReference,S.ref,a]),tabIndex:c?w.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:H,..._(w.getItemProps({...i,onFocus(U){var A;(A=i.onFocus)==null||A.call(i,U),f(!1),w.setHasFocusInside(!0)}}))}):x.jsxs("button",{type:"button",ref:Cu([I.setReference,S.ref,a]),tabIndex:c?w.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:H,..._(w.getItemProps({...i,onFocus(U){var A;(A=i.onFocus)==null||A.call(i,U),f(!1),w.setHasFocusInside(!0)}})),children:[s,c&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(Vc,{size:14})]})]})}),x.jsx(Vu.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:$,setHasFocusInside:f,isOpen:u},children:x.jsx(e_,{elementsRef:v,labelsRef:g,children:u&&x.jsx(_o,{preserveTabOrder:!0,children:x.jsx(Rs,{context:P,modal:!1,initialFocus:c?-1:0,returnFocus:!c,children:x.jsx(t,{...N(),ref:I.setFloating,style:{...i.style,...E},className:He("isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",o),children:e})})})})})]})}),B_=b.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},s)=>{const i=b.useContext(Vu),a=tv({label:r?null:typeof e=="string"?e:t}),l=lr(),c=a.index===i.activeIndex;return x.jsxs("button",{...o,ref:Cu([a.ref,s]),"data-active":c,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:Nv(o.className),...i.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),i.setHasFocusInside(!0)}}),children:[e,n?x.jsx(n,{size:16}):null]})}),W_=b.forwardRef((e,t)=>ar()!==null?x.jsx(Fv,{...e,isParent:!1,ref:t}):x.jsx(i_,{children:x.jsx(Fv,{...e,isParent:!0,ref:t})})),z_=(e,t)=>Xi()?t:window.matchMedia(e).matches,H_=(e,t=!0)=>{const[n,r]=b.useState(t);return b.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(z_(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},rn="600ms",U_={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:rn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:rn},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:rn}},G_={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:rn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:rn}},$u={drawer:e=>e==="left"?U_:G_,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:rn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:rn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:rn,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:rn},enter:{opacity:1,scale:[1.05,1],animationDuration:rn},exit:{opacity:0,scale:.97,animationDuration:rn}}},Y_=ts("isolate z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 h-[85vh] max-h-[85vh] max-h-[85svh] pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),q_={top:0,left:0,right:0,bottom:-1},K_=e=>e*.62,Z_=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=K_(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return x.jsx(Ct.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:q_,whileDrag:{cursor:"grabbing"},className:He("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?x.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Ru={drawer:"right",sheet:"none",dialog:"none"},X_=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...s})=>{const i=b.useId(),a=b.useId(),l=H_("(min-width: 64rem)"),c=e!=="dialog",u=l?e==="drawer"?s.position:Ru[e]:r?Ru[e]:Ru.sheet,d=l||r?$u[e]:$u.sheet,h=typeof d=="function"?d(u):d,f=l||r?e:"sheet",{refs:p,context:m}=Do({open:s.open,onOpenChange:s.onChange}),v=ga(m),g=Fo(m),w=Mo(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:y,getFloatingProps:T}=No([v,g,w]),S=s.trigger,E=fo(void 0),I=()=>s.onChange(!1);return x.jsxs(b.Fragment,{children:[s.trigger?x.jsx(b.Fragment,{children:s.asChild?x.jsx(Fu,{ref:p.setReference,...y({layoutId:s.layoutId}),children:S}):x.jsx(Ct.button,{ref:p.setReference,...y(),layoutId:s.layoutId,type:"button",children:S})}):null,x.jsx(_o,{children:x.jsx(Ps,{presenceAffectsLayout:!0,children:s.open?x.jsx(v_,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${f==="drawer"?"":"grid items-end justify-center lg:items-center"}`,children:x.jsx(Rs,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:x.jsxs(Ct.div,{animate:"enter","aria-describedby":a,"aria-labelledby":i,className:Y_({position:u,type:f}),exit:"exit",layoutId:s.layoutId,initial:"initial",ref:p.setFloating,style:f==="drawer"?{width:E}:{height:E},variants:h,...T(),children:[s.title?x.jsx("header",{className:"relative w-full",children:s.title?x.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:s.title}):null}):null,x.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:s.children}),s.footer?x.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:s.footer}):null,o?x.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:x.jsx("button",{type:"button",onClick:I,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(mg,{})})}):null,c&&t?x.jsx(Z_,{onChange:s.onChange,parent:p.floating,position:u,sheet:f==="sheet",value:E}):null]})})}):null})})]})},Q_=e=>x.jsx(Ct.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),Lv=({children:e,followCursor:t=!1,placement:n,enabled:r,as:o,title:s,...i})=>{const[a,l]=b.useState(!1),c=b.useRef(null),u=o||"span",{refs:d,floatingStyles:h,context:f}=Do({open:a,placement:n,transform:!0,onOpenChange:l,whileElementsMounted:ia,middleware:[ca(5),Eu({fallbackAxisSideDirection:"start"}),Tu(),Zy({element:c,padding:5})]}),p=cv(f,{move:!0,enabled:r,delay:{open:Dv}}),m=E_(f,{enabled:r}),v=Mo(f,{enabled:r}),g=Fo(f,{role:"tooltip",enabled:r}),w=w_(f,{enabled:!!r&&!!t}),{getReferenceProps:y,getFloatingProps:T}=No([p,m,v,g,w]);return x.jsxs(b.Fragment,{children:[x.jsx(u,{ref:d.setReference,...y(i),children:s}),x.jsx(_o,{children:a&&x.jsxs(Qr,{...T(),ref:d.setFloating,style:h,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(ov,{ref:c,context:f,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class va{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++)va.getDescendantProperty(a[l],s,r);else s&&va.getDescendantProperty(a,s,r)}else r.push(t);return r}}class $o{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const s=$o.isMatch(o,t,this.options.caseSensitive);s&&n.push({item:o,score:s})}else for(let s=0;s<this.keys.length;s++){const i=va.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=$o.isMatch(i[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=$o.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return $o.indexesOfFirstLetter(t,n).forEach((i,a)=>{let l=i+1;o[a]=[i];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(i=>i!==!1),o.length?o.sort((i,a)=>i.length===1?i[0]-a[0]:(i=i[i.length-1]-i[0],a=a[a.length-1]-a[0],i-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,s)=>o!==r?!1:s).filter(o=>o!==!1)}}const Vv=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>x.jsxs("div",{className:He("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:[s,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(Lv,{title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(pg,{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(hg,{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(MP,{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]}),ba=({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:h="",name:f,title:p,placeholder:m,hideLeft:v,required:g})=>{const w=d??f,y=zt(),T=e??y.inputOptionalLabel;return x.jsxs("fieldset",{form:u,"data-error":!!c,"data-interactive":!!s,className:He("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[x.jsxs("label",{form:u,htmlFor:w,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-error:text-danger",children:[!v&&!n?x.jsx(Vv,{info:a,hideLeft:v,reportStatus:!0,title:p,placeholder:m,children:T||n?x.jsxs(b.Fragment,{children:[g?null:x.jsx("span",{className:"text-opacity-70",children:T}),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-hover:border-primary group-error:border-danger ${h}`,children:[t?x.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,i?x.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:i}):null]})]}),x.jsx("p",{className:"mt-input-gap hidden flex-shrink-0 flex-grow-0 whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:inline-block group-error:inline-block group-error:text-danger",children:c}),x.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})},$v=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>{const i=r.Render??b.Fragment,a=r.label??r.value;return x.jsx("li",{...o,ref:s,role:"option","aria-selected":t,className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsxs("button",{type:"button","data-value":r.value,onClick:n,"aria-selected":t,"aria-checked":t,"aria-current":t,className:`flex w-full cursor-pointer justify-between p-2 text-left ${t?"bg-primary text-primary-foreground":""} ${e?"bg-primary/70 text-primary-foreground":""}`,children:[x.jsx(i,{...o,label:r.label,value:r.value,children:a}),t?x.jsx("span",{children:x.jsx(AP,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})}),J_={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},eM={caseSensitive:!1,sort:!1},tM=[],nM=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:h=!1,...f},p)=>{const m=f.value??f.defaultValue??"",v=zt(),g=b.useRef(null),[w,y]=b.useState(!1),[T,S]=b.useState(""),[E,I]=b.useState(m),[P,O]=b.useState(m),[C,L]=b.useState(null),D=b.useRef(tM),V=t&&T!==""?[{value:T,label:T,"data-dynamic":"true"},...e]:e,k=new $o(V,["value","label"],eM).search(T),_=t?void 0:`^(${e.map(W=>`${ru(W.value)}${W.label?"|"+ru(W.label):""}`).join("|")})$`;b.useEffect(()=>{if(f.value){const W=e.find(te=>te.value===f.value);I((W==null?void 0:W.label)??f.value)}},[f.value]);const{x:N,y:$,strategy:H,refs:U,context:A}=Do({open:w,transform:!0,strategy:"absolute",onOpenChange:y,whileElementsMounted:ia,middleware:[ca(4),GA({elementContext:"reference",padding:10,apply(W){const B=W.elements.reference.parentElement,Se=B==null?void 0:B.getBoundingClientRect().width;Object.assign(W.elements.floating.style,{width:`${Se}px`,maxWidth:`${Se}px`,minWidth:"max-content",maxHeight:`${Math.min(480,W.availableHeight)}px`})}})]}),R=O_(A,J_),{getReferenceProps:Z,getFloatingProps:re,getItemProps:ee}=No([Fo(A,{role:"listbox"}),Mo(A),Av(A,{activeIndex:C,allowEscape:!0,cols:0,focusItemOnOpen:"auto",listRef:D,loop:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:C,virtual:!0,onNavigate:W=>L(te=>W??te)})]);b.useEffect(()=>{const W=U.reference.current;if(W)return bi(W)},[]);const Y=(W,te)=>{var Se,Xe;I(W.value),(Se=U.reference.current)==null||Se.setAttribute("data-value",W.value),O(W.label??"");const B=_l(g.current,W.value);B&&((Xe=f.onChange)==null||Xe.call(f,B)),y(!1),S(""),L(te)},F=W=>{var B;const te=W.target.value;return S(te),!w&&te===""?y(!0):(W.target.name=f.name||"",te?y(!0):(B=f.onChange)==null?void 0:B.call(f,W))},j=()=>{y(!0),S("")},z=()=>{var W;S(""),I(""),(W=U.reference.current)==null||W.setAttribute("data-value",""),O(""),_l(U.reference.current),y(!1)},G=f.id||f.name;return x.jsxs(ba,{...f,container:a,error:d,feedback:n,form:f.form,hideLeft:l,id:f.name||f.id,interactive:o,labelClassName:r,left:u,name:f.name,optionalText:i,placeholder:f.placeholder,required:h,rightLabel:s,title:f.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(fg,{size:20}),x.jsx("span",{className:"sr-only",children:v.inputCaretDown})]}),E?x.jsx("button",{type:"button",onClick:z,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({...f,onChange:F,onFocus:j,pattern:_,ref:U.setReference,name:`${G}-shadow`,id:`${G}-shadow`,onClick:W=>W.currentTarget.focus(),onKeyDown(W){if(W.key==="Escape")return W.currentTarget.blur(),y(!1);if(W.key==="Enter"){if(C!==null&&k[C])return W.preventDefault(),Y(k[C],C);if(k.length===1)return W.preventDefault(),Y(k[0],0)}}}),"data-value":E,"data-error":!!d,"data-name":G,"data-target":G,required:h,value:w?T:P||E,"aria-autocomplete":"list",autoComplete:"off",className:He("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",f.className)}),x.jsx("input",{id:G,name:G,type:"hidden","data-origin":G,ref:p,required:h,defaultValue:f.value||E||void 0}),x.jsx(_o,{preserveTabOrder:!0,children:w?x.jsx(Rs,{guards:!0,returnFocus:!1,context:A,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsx("ul",{...re({ref:U.setFloating,style:{position:H,left:(N??0)+16,top:$??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 border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:k.map((W,te)=>b.createElement($v,{...ee({onClick:()=>Y(W,te),ref:B=>void(D.current[te]=B),selected:C===te,active:E===W.value}),key:`${W.value}-option`,option:W,selected:C===te,active:E===W.value}))})}):null})]})}),Rv=b.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:s,container:i,...a},l)=>x.jsxs("label",{"data-task":t,"data-disabled":a.disabled,"aria-disabled":a.disabled,className:He("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",i),children:[x.jsx("input",{...a,ref:l,type:"checkbox","data-task":t,className:He("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",o)}),e,x.jsx("span",{"data-name":"checkbox-label",className:He("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),js=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:h,...f},p)=>{const m=f.id??f.name,v=b.useRef(null);return b.useEffect(()=>{if(v.current===null)return;const g=v.current,w=bi(v.current),y=T=>{const S=T;if(S.key==="Enter"&&g.enterKeyHint==="next"){const E=g.getAttribute("data-next");if(E){const I=document.getElementById(E);if(I)return I.focus(),void S.preventDefault()}}};return g.addEventListener("keydown",y),()=>{w(),g.removeEventListener("keydown",y)}},[]),x.jsx(ba,{info:n,container:l,error:h,feedback:t,hideLeft:c,left:d,optionalText:a,right:u,rightLabel:i,interactive:s,form:f.form,id:f.name||f.id,name:f.name,labelClassName:r,title:f.title,placeholder:f.placeholder,required:f.required,children:x.jsx(Xg,{...f,type:e,"data-next":o,ref:Al(p,v),id:m,name:m,className:He("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",f.className)})})}),jv=new Date(1970,11,31),ju={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Bv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},rM={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")},Bu=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},oM=b.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=b.useId(),l=zt(),c=b.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[u,d]=b.useState(e||void 0),[h,f]=b.useState(!1),p=Bu(c,jv).flatMap(E=>dn.keyof(ju,E.type)?ju[E.type](E.value):[]),m=Bu(c,jv).reduce((E,I)=>E+(dn.keyof(Bv,I.type)?Bv[I.type](I.value):""),""),[v,g]=b.useState(u?Bu(c,u).reduce((E,I)=>E+(dn.keyof(ju,I.type)?rM[I.type](u,I.value):""),""):""),w=E=>{const I=E.target.value;if(g(I),p.length===I.length&&p.every((O,C)=>{const L=I.charAt(C);return typeof O=="string"?L===O:O.test(L)})){const O=go(zI(I,m,new Date));return d(O),r==null?void 0:r(O)}return d(void 0),r==null?void 0:r(void 0)},y=E=>(d(E),r==null||r(E),g(E?Hk(E,m):"")),T=Sg(u),S=T?u.toISOString():void 0;return x.jsx(js,{...s,mask:p,value:v,"data-value":S,"data-target":s.name,className:"uppercase",formNoValidate:!h,placeholder:m,onChange:w,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,defaultValue:S,form:s.form,hidden:!0,id:s.name,name:s.name,ref:i,type:"date"}),x.jsx(Vo,{open:h,onChange:f,trigger:x.jsxs("span",{"aria-labelledby":a,children:[x.jsx("span",{id:a,className:"sr-only",children:l.datePickerCalendarButtonLabel}),x.jsx(OP,{})]}),buttonProps:{"aria-describedby":a},children:x.jsx(xy,{...s,locale:t,changeOnlyOnClick:!0,markToday:o,onChange:y,disabledDate:n,date:T?u:void 0})})]})})}),sM=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],iM=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],aM=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],lM=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Wv=(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 zv(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?lM:aM:t.binary?iM:sM,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=Wv(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=Wv(Number(e),t.locale,i),c=n[a];return s+l+r+c}var Wu={exports:{}},wa={exports:{}},Le={};/** @license React v16.13.1
177
+ */var NA=["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])"],xs=NA.join(","),Cg=typeof Element>"u",Qr=Cg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ss=!Cg&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Ts=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&e(t.parentNode);return s},_A=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},VA=function(t,n,r){if(Ts(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(xs));return n&&Qr.call(t,xs)&&o.unshift(t),o=o.filter(r),o},$A=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Ts(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=Qr.call(s,xs);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var f=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),h=!Ts(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(f&&h){var d=e(f===!0?s.children:f.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:s,candidates:d})}else i.unshift.apply(i,s.children)}}return o},Pg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ig=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||_A(t))&&!Pg(t)?0:t.tabIndex},BA=function(t,n){var r=Ig(t);return r<0&&n&&!Pg(t)?0:r},jA=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Ag=function(t){return t.tagName==="INPUT"},RA=function(t){return Ag(t)&&t.type==="hidden"},HA=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},WA=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},zA=function(t){if(!t.name)return!0;var n=t.form||Ss(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=WA(o,t.form);return!i||i===t},GA=function(t){return Ag(t)&&t.type==="radio"},UA=function(t){return GA(t)&&!zA(t)},YA=function(t){var n,r=t&&Ss(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var 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,f;r=Ss(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},Og=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},qA=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Qr.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(Qr.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=Ss(t);if(l&&!l.shadowRoot&&o(l)===!0)return Og(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(YA(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Og(t);return!1},KA=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 Qr.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},XA=function(t,n){return!(n.disabled||Ts(n)||RA(n)||qA(n,t)||HA(n)||KA(n))},xc=function(t,n){return!(UA(n)||Ig(n)<0||!XA(t,n))},QA=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},ZA=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=BA(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(jA).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},ii=function(t,n){n=n||{};var r;return n.getShadowRoot?r=$A([t],n.includeContainer,{filter:xc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:QA}):r=VA(t,n.includeContainer,xc.bind(null,n)),ZA(r)},JA=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Qr.call(t,xs)===!1?!1:xc(n,t)};function kg(e,t,n){let{reference:r,floating:o}=e;const i=ar(t),s=bc(t),a=vc(s),l=Bn(t),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let d;switch(l){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(Xr(t)){case"start":d[s]-=h*(n&&c?-1:1);break;case"end":d[s]+=h*(n&&c?-1:1);break}return d}const eO=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:f}=kg(c,r,l),h=r,d={},p=0;for(let m=0;m<a.length;m++){const{name:v,fn:g}=a[m],{x:w,y,data:T,reset:S}=await g({x:u,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:d,rects:c,platform:s,elements:{reference:e,floating:t}});u=w??u,f=y??f,d={...d,[v]:{...d[v],...T}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(c=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:f}=kg(c,h,l)),m=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:d}};async function Sc(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:f="floating",altBoundary:h=!1,padding:d=0}=Kr(t,e),p=Eg(d),v=a[h?f==="floating"?"reference":"floating":f],g=ws(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=f==="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)),T=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},S=ws(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:y,strategy:l}):w);return{top:(g.top-S.top+p.top)/T.y,bottom:(S.bottom-g.bottom+p.bottom)/T.y,left:(g.left-S.left+p.left)/T.x,right:(S.right-g.right+p.right)/T.x}}const tO=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}=Kr(e,t)||{};if(c==null)return{};const f=Eg(u),h={x:n,y:r},d=bc(o),p=vc(d),m=await s.getDimensions(c),v=d==="y",g=v?"top":"left",w=v?"bottom":"right",y=v?"clientHeight":"clientWidth",T=i.reference[p]+i.reference[d]-h[d]-i.floating[p],S=h[d]-i.reference[d],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let A=E?E[y]:0;(!A||!await(s.isElement==null?void 0:s.isElement(E)))&&(A=a.floating[y]||i.floating[p]);const P=T/2-S/2,O=A/2-m[p]/2-1,C=sn(f[g],O),_=sn(f[w],O),F=C,V=A-m[p]-_,I=A/2-m[p]/2+P,D=yc(F,I,V),L=!l.arrow&&Xr(o)!=null&&I!==D&&i.reference[p]/2-(I<F?C:_)-m[p]/2<0,$=L?I<F?I-F:I-V:0;return{[d]:h[d]+$,data:{[d]:D,centerOffset:I-D-$,...L&&{alignmentOffset:$}},reset:L}}}),nO=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:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...v}=Kr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=Bn(o),w=ar(a),y=Bn(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=h||(y||!m?[bs(a)]:DA(a)),E=p!=="none";!h&&E&&S.push(...FA(a,m,p,T));const A=[a,...S],P=await Sc(t,v),O=[];let C=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&O.push(P[g]),f){const I=kA(o,s,T);O.push(P[I[0]],P[I[1]])}if(C=[...C,{placement:o,overflows:O}],!O.every(I=>I<=0)){var _,F;const I=(((_=i.flip)==null?void 0:_.index)||0)+1,D=A[I];if(D)return{data:{index:I,overflows:C},reset:{placement:D}};let L=(F=C.filter($=>$.overflows[0]<=0).sort(($,z)=>$.overflows[1]-z.overflows[1])[0])==null?void 0:F.placement;if(!L)switch(d){case"bestFit":{var V;const $=(V=C.filter(z=>{if(E){const G=ar(z.placement);return G===w||G==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(G=>G>0).reduce((G,k)=>G+k,0)]).sort((z,G)=>z[1]-G[1])[0])==null?void 0:V[0];$&&(L=$);break}case"initialPlacement":L=a;break}if(o!==L)return{reset:{placement:L}}}return{}}}};async function rO(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Bn(n),a=Xr(n),l=ar(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,f=Kr(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(d=a==="end"?p*-1:p),l?{x:d*u,y:h*c}:{x:h*c,y:d*u}}const oO=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 rO(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}}}}},iO=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:v=>{let{x:g,y:w}=v;return{x:g,y:w}}},...l}=Kr(e,t),c={x:n,y:r},u=await Sc(t,l),f=ar(Bn(o)),h=Tg(f);let d=c[h],p=c[f];if(i){const v=h==="y"?"top":"left",g=h==="y"?"bottom":"right",w=d+u[v],y=d-u[g];d=yc(w,d,y)}if(s){const v=f==="y"?"top":"left",g=f==="y"?"bottom":"right",w=p+u[v],y=p-u[g];p=yc(w,p,y)}const m=a.fn({...t,[h]:d,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},sO=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}=Kr(e,t),l=await Sc(t,a),c=Bn(n),u=Xr(n),f=ar(n)==="y",{width:h,height:d}=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 v=d-l.top-l.bottom,g=h-l.left-l.right,w=sn(d-l[p],v),y=sn(h-l[m],g),T=!t.middlewareData.shift;let S=w,E=y;if(f?E=u||T?sn(y,g):g:S=u||T?sn(w,v):v,T&&!u){const P=_t(l.left,0),O=_t(l.right,0),C=_t(l.top,0),_=_t(l.bottom,0);f?E=h-2*(P!==0||O!==0?P+O:_t(l.left,l.right)):S=d-2*(C!==0||_!==0?C+_:_t(l.top,l.bottom))}await s({...t,availableWidth:E,availableHeight:S});const A=await o.getDimensions(i.floating);return h!==A.width||d!==A.height?{reset:{rects:!0}}:{}}}};function Dg(e){const t=Nt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=nt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=vs(n)!==i||vs(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Tc(e){return Me(e)?e:e.contextElement}function Zr(e){const t=Tc(e);if(!nt(t))return $n(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Dg(t);let s=(i?vs(n.width):n.width)/r,a=(i?vs(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const aO=$n(0);function Mg(e){const t=Pt(e);return!cc()||!t.visualViewport?aO:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lO(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pt(e)?!1:t}function lr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Tc(e);let s=$n(1);t&&(r?Me(r)&&(s=Zr(r)):s=Zr(e));const a=lO(i,n,r)?Mg(i):$n(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const h=Pt(i),d=r&&Me(r)?Pt(r):r;let p=h,m=uc(p);for(;m&&r&&d!==p;){const v=Zr(m),g=m.getBoundingClientRect(),w=Nt(m),y=g.left+(m.clientLeft+parseFloat(w.paddingLeft))*v.x,T=g.top+(m.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,f*=v.y,l+=y,c+=T,p=Pt(m),m=uc(p)}}return ws({width:u,height:f,x:l,y:c})}function cO(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=wn(r),a=t?gs(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=$n(1);const u=$n(0),f=nt(r);if((f||!f&&!i)&&((Nn(r)!=="body"||oi(s))&&(l=ys(r)),nt(r))){const h=lr(r);c=Zr(r),u.x=h.x+r.clientLeft,u.y=h.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 uO(e){return Array.from(e.getClientRects())}function Fg(e){return lr(wn(e)).left+ys(e).scrollLeft}function fO(e){const t=wn(e),n=ys(e),r=e.ownerDocument.body,o=_t(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=_t(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Fg(e);const a=-n.scrollTop;return Nt(r).direction==="rtl"&&(s+=_t(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function dO(e,t){const n=Pt(e),r=wn(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=cc();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function hO(e,t){const n=lr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=nt(e)?Zr(e):$n(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 Lg(e,t,n){let r;if(t==="viewport")r=dO(e,n);else if(t==="document")r=fO(wn(e));else if(Me(t))r=hO(t,n);else{const o=Mg(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return ws(r)}function Ng(e,t){const n=xn(e);return n===t||!Me(n)||_n(n)?!1:Nt(n).position==="fixed"||Ng(n,t)}function pO(e,t){const n=t.get(e);if(n)return n;let r=Vn(e,[],!1).filter(a=>Me(a)&&Nn(a)!=="body"),o=null;const i=Nt(e).position==="fixed";let s=i?xn(e):e;for(;Me(s)&&!_n(s);){const a=Nt(s),l=lc(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||oi(s)&&!l&&Ng(e,s))?r=r.filter(u=>u!==s):o=a,s=xn(s)}return t.set(e,r),r}function mO(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?gs(t)?[]:pO(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const f=Lg(t,u,o);return c.top=_t(f.top,c.top),c.right=sn(f.right,c.right),c.bottom=sn(f.bottom,c.bottom),c.left=_t(f.left,c.left),c},Lg(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function gO(e){const{width:t,height:n}=Dg(e);return{width:t,height:n}}function yO(e,t,n){const r=nt(t),o=wn(t),i=n==="fixed",s=lr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=$n(0);if(r||!r&&!i)if((Nn(t)!=="body"||oi(o))&&(a=ys(t)),r){const f=lr(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=Fg(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 Ec(e){return Nt(e).position==="static"}function _g(e,t){return!nt(e)||Nt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Vg(e,t){const n=Pt(e);if(gs(e))return n;if(!nt(e)){let o=xn(e);for(;o&&!_n(o);){if(Me(o)&&!Ec(o))return o;o=xn(o)}return n}let r=_g(e,t);for(;r&&SA(r)&&Ec(r);)r=_g(r,t);return r&&_n(r)&&Ec(r)&&!lc(r)?n:r||TA(e)||n}const vO=async function(e){const t=this.getOffsetParent||Vg,n=this.getDimensions,r=await n(e.floating);return{reference:yO(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bO(e){return Nt(e).direction==="rtl"}const wO={convertOffsetParentRelativeRectToViewportRelativeRect:cO,getDocumentElement:wn,getClippingRect:mO,getOffsetParent:Vg,getElementRects:vO,getClientRects:uO,getDimensions:gO,getScale:Zr,isElement:Me,isRTL:bO};function xO(e,t){let n=null,r;const o=wn(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:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const d=qr(u),p=qr(o.clientWidth-(c+f)),m=qr(o.clientHeight-(u+h)),v=qr(c),w={rootMargin:-d+"px "+-p+"px "+-m+"px "+-v+"px",threshold:_t(0,sn(1,l))||1};let y=!0;function T(S){const E=S[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(T,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,w)}n.observe(e)}return s(!0),i}function Es(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=Tc(e),u=o||i?[...c?Vn(c):[],...Vn(t)]:[];u.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const f=c&&a?xO(c,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(g=>{let[w]=g;w&&w.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=d)==null||y.observe(t)})),n()}),c&&!l&&d.observe(c),d.observe(t));let p,m=l?lr(e):null;l&&v();function v(){const g=lr(e);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,p=requestAnimationFrame(v)}return n(),()=>{var g;u.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),f==null||f(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(p)}}const SO=oO,TO=iO,EO=nO,CO=sO,$g=tO,PO=(e,t,n)=>{const r=new Map,o={platform:wO,...n},i={...o.platform,_c:r};return eO(e,t,{...o,platform:i})};var Cs=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Ps(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(!Ps(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)&&!Ps(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Bg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jg(e,t){const n=Bg(e);return Math.round(t*n)/n}function Rg(e){const t=M.useRef(e);return Cs(()=>{t.current=e}),t}function IO(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,f]=M.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,d]=M.useState(r);Ps(h,r)||d(r);const[p,m]=M.useState(null),[v,g]=M.useState(null),w=M.useCallback($=>{$!==E.current&&(E.current=$,m($))},[]),y=M.useCallback($=>{$!==A.current&&(A.current=$,g($))},[]),T=i||p,S=s||v,E=M.useRef(null),A=M.useRef(null),P=M.useRef(u),O=l!=null,C=Rg(l),_=Rg(o),F=M.useCallback(()=>{if(!E.current||!A.current)return;const $={placement:t,strategy:n,middleware:h};_.current&&($.platform=_.current),PO(E.current,A.current,$).then(z=>{const G={...z,isPositioned:!0};V.current&&!Ps(P.current,G)&&(P.current=G,ef.flushSync(()=>{f(G)}))})},[h,t,n,_]);Cs(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f($=>({...$,isPositioned:!1})))},[c]);const V=M.useRef(!1);Cs(()=>(V.current=!0,()=>{V.current=!1}),[]),Cs(()=>{if(T&&(E.current=T),S&&(A.current=S),T&&S){if(C.current)return C.current(T,S,F);F()}},[T,S,F,C,O]);const I=M.useMemo(()=>({reference:E,floating:A,setReference:w,setFloating:y}),[w,y]),D=M.useMemo(()=>({reference:T,floating:S}),[T,S]),L=M.useMemo(()=>{const $={position:n,left:0,top:0};if(!D.floating)return $;const z=jg(D.floating,u.x),G=jg(D.floating,u.y);return a?{...$,transform:"translate("+z+"px, "+G+"px)",...Bg(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:G}},[n,a,D.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:F,refs:I,elements:D,floatingStyles:L}),[u,F,I,D,L])}const AO=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?$g({element:r.current,padding:o}).fn(n):{}:r?$g({element:r,padding:o}).fn(n):{}}}},Is=(e,t)=>({...SO(e),options:[e,t]}),Cc=(e,t)=>({...TO(e),options:[e,t]}),Pc=(e,t)=>({...EO(e),options:[e,t]}),OO=(e,t)=>({...CO(e),options:[e,t]}),Hg=(e,t)=>({...AO(e),options:[e,t]});function Ic(e){return M.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const Wg={...M},kO=Wg.useInsertionEffect||(e=>e());function at(e){const t=M.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return kO(()=>{t.current=e}),M.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Ac="ArrowUp",si="ArrowDown",Jr="ArrowLeft",eo="ArrowRight";function As(e,t,n){return Math.floor(e/t)!==n}function ai(e,t){return t<0||t>=e.current.length}function Oc(e,t){return St(e,{disabledIndices:t})}function zg(e,t){return St(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function St(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&&Os(s,a,o));return a}function DO(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,f=c;if(n.key===Ac){if(u&&gt(n),c===-1)f=l;else if(f=St(e,{startingIndex:f,amount:i,decrement:!0,disabledIndices:s}),o&&(c-i<a||f<0)){const h=c%i,d=l%i,p=l-(d-h);d===h?f=l:f=d>h?p:p-i}ai(e,f)&&(f=c)}if(n.key===si&&(u&&gt(n),c===-1?f=a:(f=St(e,{startingIndex:c,amount:i,disabledIndices:s}),o&&c+i>l&&(f=St(e,{startingIndex:c%i-i,amount:i,disabledIndices:s}))),ai(e,f)&&(f=c)),r==="both"){const h=qr(c/i);n.key===eo&&(u&&gt(n),c%i!==i-1?(f=St(e,{startingIndex:c,disabledIndices:s}),o&&As(f,i,h)&&(f=St(e,{startingIndex:c-c%i-1,disabledIndices:s}))):o&&(f=St(e,{startingIndex:c-c%i-1,disabledIndices:s})),As(f,i,h)&&(f=c)),n.key===Jr&&(u&&gt(n),c%i!==0?(f=St(e,{startingIndex:c,decrement:!0,disabledIndices:s}),o&&As(f,i,h)&&(f=St(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s}))):o&&(f=St(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s})),As(f,i,h)&&(f=c));const d=qr(l/i)===h;ai(e,f)&&(o&&d?f=n.key===Jr?l:St(e,{startingIndex:c-c%i-1,disabledIndices:s}):f=c)}return f}function MO(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 f=0;f<a;f++)for(let h=0;h<l;h++)u.push(o+f+h*t);o%t+a<=t&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=s}),c=!0):o++}}),[...r]}function FO(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 LO(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Os(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 Gg=0;function jn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Gg);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Gg=requestAnimationFrame(i)}var ve=typeof document<"u"?b.useLayoutEffect:b.useEffect;function NO(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 _O(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 Ug=M.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function VO(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=M.useState(()=>new Map),s=M.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),a=M.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return ve(()=>{const l=new Map(o);Array.from(l.keys()).sort(NO).forEach((u,f)=>{l.set(u,f)}),_O(o,l)||i(l)},[o]),M.createElement(Ug.Provider,{value:M.useMemo(()=>({register:s,unregister:a,map:o,elementsRef:n,labelsRef:r}),[s,a,o,n,r])},t)}function Yg(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=M.useContext(Ug),[a,l]=M.useState(null),c=M.useRef(null),u=M.useCallback(f=>{if(c.current=f,a!==null&&(i.current[a]=f,s)){var h;const d=t!==void 0;s.current[a]=d?t:(h=f==null?void 0:f.textContent)!=null?h:null}},[a,i,s,t]);return ve(()=>{const f=c.current;if(f)return n(f),()=>{r(f)}},[n,r]),ve(()=>{const f=c.current?o.get(c.current):null;f!=null&&l(f)},[o]),M.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function to(){return to=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},to.apply(this,arguments)}let qg=!1,$O=0;const Kg=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+$O++;function BO(){const[e,t]=M.useState(()=>qg?Kg():void 0);return ve(()=>{e==null&&t(Kg())},[]),M.useEffect(()=>{qg=!0},[]),e}const no=Wg.useId||BO;let li;process.env.NODE_ENV!=="production"&&(li=new Set);function ks(){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=li)!=null&&e.has(o))){var i;(i=li)==null||i.add(o),console.warn(o)}}function jO(){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=li)!=null&&e.has(o))){var i;(i=li)==null||i.add(o),console.error(o)}}const Xg=M.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:f,d:h,style:{transform:d,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||ks("The `ref` prop is required for `FloatingArrow`."));const v=no(),[g,w]=M.useState(!1);if(ve(()=>{if(!o)return;Nt(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const y=c*2,T=y/2,S=s/2*(l/-8+1),E=a/2*l/4,[A,P]=r.split("-"),O=!!h,C=A==="top"||A==="bottom",_=u&&P==="end"?"bottom":"top";let F=u&&P==="end"?"right":"left";u&&g&&(F=P==="end"?"left":"right");const V=(i==null?void 0:i.x)!=null?u||i.x:"",I=(i==null?void 0:i.y)!=null?u||i.y:"",D=h||"M0,0"+(" H"+s)+(" L"+(s-S)+","+(a-E))+(" Q"+s/2+","+a+" "+S+","+(a-E))+" Z",L={top:O?"rotate(180deg)":"",left:O?"rotate(90deg)":"rotate(-90deg)",bottom:O?"":"rotate(180deg)",right:O?"rotate(-90deg)":"rotate(90deg)"}[A];return M.createElement("svg",to({},m,{"aria-hidden":!0,ref:n,width:O?s:s+y,height:s,viewBox:"0 0 "+s+" "+(a>s?a:s),style:{position:"absolute",pointerEvents:"none",[F]:V,[_]:I,[A]:C||O?"100%":"calc(100% - "+y/2+"px)",transform:""+L+(d??""),...p}}),y>0&&M.createElement("path",{clipPath:"url(#"+v+")",fill:"none",stroke:f,strokeWidth:y+(h?0:1),d:D}),M.createElement("path",{stroke:y&&!h?m.fill:"none",d:D}),M.createElement("clipPath",{id:v},M.createElement("rect",{x:-T,y:T*(O?-1:1),width:s+y,height:s})))});function Qg(){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 Zg=M.createContext(null),Jg=M.createContext(null),Rn=()=>{var e;return((e=M.useContext(Zg))==null?void 0:e.id)||null},Hn=()=>M.useContext(Jg);function RO(e){const t=no(),n=Hn(),o=Rn();return ve(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function HO(e){const{children:t,id:n}=e,r=Rn();return M.createElement(Zg.Provider,{value:M.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function WO(e){const{children:t}=e,n=M.useRef([]),r=M.useCallback(s=>{n.current=[...n.current,s]},[]),o=M.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),i=M.useState(()=>Qg())[0];return M.createElement(Jg.Provider,{value:M.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function Wn(e){return"data-floating-ui-"+e}function yt(e){const t=b.useRef(e);return ve(()=>{t.current=e}),t}const ey=Wn("safe-polygon");function kc(e,t,n){return n&&!Yr(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function ty(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:f=0,move:h=!0}=t,d=Hn(),p=Rn(),m=yt(c),v=yt(l),g=yt(n),w=M.useRef(),y=M.useRef(-1),T=M.useRef(),S=M.useRef(-1),E=M.useRef(!0),A=M.useRef(!1),P=M.useRef(()=>{}),O=M.useCallback(()=>{var D;const L=(D=o.current.openEvent)==null?void 0:D.type;return(L==null?void 0:L.includes("mouse"))&&L!=="mousedown"},[o]);M.useEffect(()=>{if(!a)return;function D(L){let{open:$}=L;$||(clearTimeout(y.current),clearTimeout(S.current),E.current=!0)}return i.on("openchange",D),()=>{i.off("openchange",D)}},[a,i]),M.useEffect(()=>{if(!a||!m.current||!n)return;function D($){O()&&r(!1,$,"hover")}const L=ft(s.floating).documentElement;return L.addEventListener("mouseleave",D),()=>{L.removeEventListener("mouseleave",D)}},[s.floating,n,r,a,m,O]);const C=M.useCallback(function(D,L,$){L===void 0&&(L=!0),$===void 0&&($="hover");const z=kc(v.current,"close",w.current);z&&!T.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>r(!1,D,$),z)):L&&(clearTimeout(y.current),r(!1,D,$))},[v,r]),_=at(()=>{P.current(),T.current=void 0}),F=at(()=>{if(A.current){const D=ft(s.floating).body;D.style.pointerEvents="",D.removeAttribute(ey),A.current=!1}});M.useEffect(()=>{if(!a)return;function D(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function L(k){if(clearTimeout(y.current),E.current=!1,u&&!Yr(w.current)||f>0&&!kc(v.current,"open"))return;const j=kc(v.current,"open",w.current);j?y.current=window.setTimeout(()=>{g.current||r(!0,k,"hover")},j):r(!0,k,"hover")}function $(k){if(D())return;P.current();const j=ft(s.floating);if(clearTimeout(S.current),m.current&&o.current.floatingContext){n||clearTimeout(y.current),T.current=m.current({...o.current.floatingContext,tree:d,x:k.clientX,y:k.clientY,onClose(){F(),_(),C(k,!0,"safe-polygon")}});const te=T.current;j.addEventListener("mousemove",te),P.current=()=>{j.removeEventListener("mousemove",te)};return}(w.current==="touch"?!qe(s.floating,k.relatedTarget):!0)&&C(k)}function z(k){D()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:d,x:k.clientX,y:k.clientY,onClose(){F(),_(),C(k)}})(k))}if(Me(s.domReference)){var G;const k=s.domReference;return n&&k.addEventListener("mouseleave",z),(G=s.floating)==null||G.addEventListener("mouseleave",z),h&&k.addEventListener("mousemove",L,{once:!0}),k.addEventListener("mouseenter",L),k.addEventListener("mouseleave",$),()=>{var j;n&&k.removeEventListener("mouseleave",z),(j=s.floating)==null||j.removeEventListener("mouseleave",z),h&&k.removeEventListener("mousemove",L),k.removeEventListener("mouseenter",L),k.removeEventListener("mouseleave",$)}}},[s,a,e,u,f,h,C,_,F,r,n,g,d,v,m,o]),ve(()=>{var D;if(a&&n&&(D=m.current)!=null&&D.__options.blockPointerEvents&&O()){const $=ft(s.floating).body;$.setAttribute(ey,""),$.style.pointerEvents="none",A.current=!0;const z=s.floating;if(Me(s.domReference)&&z){var L;const G=s.domReference,k=d==null||(L=d.nodesRef.current.find(j=>j.id===p))==null||(L=L.context)==null?void 0:L.elements.floating;return k&&(k.style.pointerEvents=""),G.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{G.style.pointerEvents="",z.style.pointerEvents=""}}}},[a,n,p,s,d,m,O]),ve(()=>{n||(w.current=void 0,_(),F())},[n,_,F]),M.useEffect(()=>()=>{_(),clearTimeout(y.current),clearTimeout(S.current),F()},[a,s.domReference,_,F]);const V=M.useMemo(()=>{function D(L){w.current=L.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(L){const{nativeEvent:$}=L;function z(){!E.current&&!g.current&&r(!0,$,"hover")}u&&!Yr(w.current)||n||f===0||(clearTimeout(S.current),w.current==="touch"?z():S.current=window.setTimeout(z,f))}}},[u,r,n,g,f]),I=M.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(D){C(D.nativeEvent,!1)}}),[C]);return M.useMemo(()=>a?{reference:V,floating:I}:{},[a,V,I])}function zO(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 cr(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 GO(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),cr(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}let ro=new WeakMap,Ds=new WeakSet,Ms={},Dc=0;const UO=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,ny=e=>e&&(e.host||ny(e.parentNode)),YO=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ny(n);return e.contains(r)?r:null}).filter(n=>n!=null);function qO(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=YO(t,e),a=new Set,l=new Set(s),c=[];Ms[o]||(Ms[o]=new WeakMap);const u=Ms[o];s.forEach(f),h(t),a.clear();function f(d){!d||a.has(d)||(a.add(d),d.parentNode&&f(d.parentNode))}function h(d){!d||l.has(d)||[].forEach.call(d.children,p=>{if(Nn(p)!=="script")if(a.has(p))h(p);else{const m=i?p.getAttribute(i):null,v=m!==null&&m!=="false",g=(ro.get(p)||0)+1,w=(u.get(p)||0)+1;ro.set(p,g),u.set(p,w),c.push(p),g===1&&v&&Ds.add(p),w===1&&p.setAttribute(o,""),!v&&i&&p.setAttribute(i,"true")}})}return Dc++,()=>{c.forEach(d=>{const p=(ro.get(d)||0)-1,m=(u.get(d)||0)-1;ro.set(d,p),u.set(d,m),p||(!Ds.has(d)&&i&&d.removeAttribute(i),Ds.delete(d)),m||d.removeAttribute(o)}),Dc--,Dc||(ro=new WeakMap,ro=new WeakMap,Ds=new WeakSet,Ms={})}}function ry(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=ft(e[0]).body;return qO(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const oo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function oy(e,t){const n=ii(e,oo());t==="prev"&&n.reverse();const r=n.indexOf(Wt(ft(e)));return n.slice(r+1)[0]}function iy(){return oy(document.body,"next")}function sy(){return oy(document.body,"prev")}function ci(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!qe(n,r)}function KO(e){ii(e,oo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function XO(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 QO(e,t,n){const r=e.indexOf(t);function o(s){const a=Wn("focus-guard");let l=r+(s?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||qe(n,c));)s?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const Mc={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 ZO;function ay(e){e.key==="Tab"&&(e.target,clearTimeout(ZO))}const Fs=M.forwardRef(function(t,n){const[r,o]=M.useState();ve(()=>(hc()&&o("button"),document.addEventListener("keydown",ay),()=>{document.removeEventListener("keydown",ay)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Wn("focus-guard")]:"",style:Mc};return M.createElement("span",to({},t,i))}),ly=M.createContext(null),cy=Wn("portal");function JO(e){e===void 0&&(e={});const{id:t,root:n}=e,r=no(),o=uy(),[i,s]=M.useState(null),a=M.useRef(null);return ve(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),ve(()=>{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(cy,""),l.appendChild(c),a.current=c,s(c)},[t,r]),ve(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Me(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(cy,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function io(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=JO({id:n,root:r}),[s,a]=M.useState(null),l=M.useRef(null),c=M.useRef(null),u=M.useRef(null),f=M.useRef(null),h=!!s&&!s.modal&&s.open&&o&&!!(r||i);return M.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function d(p){i&&ci(p)&&(p.type==="focusin"?XO:KO)(i)}return i.addEventListener("focusin",d,!0),i.addEventListener("focusout",d,!0),()=>{i.removeEventListener("focusin",d,!0),i.removeEventListener("focusout",d,!0)}},[i,o,s==null?void 0:s.modal]),M.createElement(ly.Provider,{value:M.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:a}),[o,i])},h&&i&&M.createElement(Fs,{"data-type":"outside",ref:l,onFocus:d=>{if(ci(d,i)){var p;(p=u.current)==null||p.focus()}else{const m=sy()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),h&&i&&M.createElement("span",{"aria-owns":i.id,style:Mc}),i&&ef.createPortal(t,i),h&&i&&M.createElement(Fs,{"data-type":"outside",ref:c,onFocus:d=>{if(ci(d,i)){var p;(p=f.current)==null||p.focus()}else{const m=iy()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,d.nativeEvent))}}}))}const uy=()=>M.useContext(ly),fy=20;let ur=[];function Fc(e){ur=ur.filter(n=>n.isConnected);let t=e;if(!(!t||Nn(t)==="body")){if(!JA(t,oo())){const n=ii(t,oo())[0];n&&(t=n)}ur.push(t),ur.length>fy&&(ur=ur.slice(-fy))}}function dy(){return ur.slice().reverse().find(e=>e.isConnected)}const ek=M.forwardRef(function(t,n){return M.createElement("button",to({},t,{type:"button",ref:n,tabIndex:-1,style:Mc}))});function ui(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:f=!0}=e,{open:h,refs:d,nodeId:p,onOpenChange:m,events:v,dataRef:g,floatingId:w,elements:{domReference:y,floating:T}}=t,S=typeof s=="number"&&s<0,E=Sg(y)&&S,A=UO()?i:!0,P=yt(o),O=yt(s),C=yt(a),_=Hn(),F=uy(),V=M.useRef(null),I=M.useRef(null),D=M.useRef(!1),L=M.useRef(!1),$=M.useRef(-1),z=F!=null,G=T==null?void 0:T.firstElementChild,k=(G==null?void 0:G.id)===w?G:T,j=at(function(U){return U===void 0&&(U=k),U?ii(U,oo()):[]}),K=at(U=>{const N=j(U);return P.current.map(R=>y&&R==="reference"?y:k&&R==="floating"?k:N).filter(Boolean).flat()});M.useEffect(()=>{if(r||!c)return;function U(R){if(R.key==="Tab"){qe(k,Wt(ft(k)))&&j().length===0&&!E&&gt(R);const W=K(),B=on(R);P.current[0]==="reference"&&B===y&&(gt(R),R.shiftKey?jn(W[W.length-1]):jn(W[1])),P.current[1]==="floating"&&B===k&&R.shiftKey&&(gt(R),jn(W[0]))}}const N=ft(k);return N.addEventListener("keydown",U),()=>{N.removeEventListener("keydown",U)}},[r,y,k,c,P,E,j,K]),M.useEffect(()=>{if(r||!T)return;function U(N){const R=on(N),B=j().indexOf(R);B!==-1&&($.current=B)}return T.addEventListener("focusin",U),()=>{T.removeEventListener("focusin",U)}},[r,T,j]),M.useEffect(()=>{if(r||!f)return;function U(){L.current=!0,setTimeout(()=>{L.current=!1})}function N(R){const W=R.relatedTarget;queueMicrotask(()=>{const B=!(qe(y,W)||qe(T,W)||qe(W,T)||qe(F==null?void 0:F.portalNode,W)||W!=null&&W.hasAttribute(Wn("focus-guard"))||_&&(cr(_.nodesRef.current,p).find(Y=>{var ee,H;return qe((ee=Y.context)==null?void 0:ee.elements.floating,W)||qe((H=Y.context)==null?void 0:H.elements.domReference,W)})||zO(_.nodesRef.current,p).find(Y=>{var ee,H;return((ee=Y.context)==null?void 0:ee.elements.floating)===W||((H=Y.context)==null?void 0:H.elements.domReference)===W})));if(l&&B&&Wt(ft(k))===ft(k).body){nt(k)&&(k==null||k.focus());const Y=$.current,ee=j(),H=ee[Y]||ee[ee.length-1]||k;nt(H)&&H.focus()}(E||!c)&&W&&B&&!L.current&&W!==dy()&&(D.current=!0,m(!1,R))})}if(T&&nt(y))return y.addEventListener("focusout",N),y.addEventListener("pointerdown",U),T.addEventListener("focusout",N),()=>{y.removeEventListener("focusout",N),y.removeEventListener("pointerdown",U),T.removeEventListener("focusout",N)}},[r,y,T,k,c,p,_,F,m,f,l,j,E]),M.useEffect(()=>{var U;if(r)return;const N=Array.from((F==null||(U=F.portalNode)==null?void 0:U.querySelectorAll("["+Wn("portal")+"]"))||[]);if(T){const R=[T,...N,V.current,I.current,P.current.includes("reference")||E?y:null].filter(B=>B!=null),W=c||E?ry(R,A,!A):ry(R);return()=>{W()}}},[r,y,T,c,P,F,E,A]),ve(()=>{if(r||!nt(k))return;const U=ft(k),N=Wt(U);queueMicrotask(()=>{const R=K(k),W=O.current,B=(typeof W=="number"?R[W]:W.current)||k,Y=qe(k,N);!S&&!Y&&h&&jn(B,{preventScroll:B===k})})},[r,h,k,S,K,O]),ve(()=>{if(r||!k)return;let U=!1;const N=ft(k),R=Wt(N);let B=g.current.openEvent;const Y=d.domReference.current;Fc(R);function ee(H){let{open:Pe,reason:Xe,event:_e,nested:Qe}=H;Pe&&(B=_e),Xe==="escape-key"&&d.domReference.current&&Fc(d.domReference.current),Xe==="hover"&&_e.type==="mouseleave"&&(D.current=!0),Xe==="outside-press"&&(Qe?(D.current=!1,U=!0):D.current=!(wg(_e)||dc(_e)))}return v.on("openchange",ee),()=>{v.off("openchange",ee);const H=Wt(N),Pe=qe(T,H)||_&&cr(_.nodesRef.current,p).some(ae=>{var ge;return qe((ge=ae.context)==null?void 0:ge.elements.floating,H)});(Pe||B&&["click","mousedown"].includes(B.type))&&d.domReference.current&&Fc(d.domReference.current);const _e=Y||R,Qe=ii(ft(_e).body,oo());queueMicrotask(()=>{let ae=dy();!ae&&nt(_e)&&T&&(ae=QO(Qe,_e,T)),C.current&&!D.current&&nt(ae)&&(!(ae!==H&&H!==N.body)||Pe)&&ae.focus({preventScroll:U})})}},[r,T,k,C,g,d,v,_,p]),ve(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:f,open:h,onOpenChange:m,refs:d}),()=>{F.setFocusManagerState(null)}},[r,F,c,h,m,d,f]),ve(()=>{if(r||!k||typeof MutationObserver!="function"||S)return;const U=()=>{const R=k.getAttribute("tabindex"),W=j(),B=Wt(ft(T)),Y=W.indexOf(B);Y!==-1&&($.current=Y),P.current.includes("floating")||B!==d.domReference.current&&W.length===0?R!=="0"&&k.setAttribute("tabindex","0"):R!=="-1"&&k.setAttribute("tabindex","-1")};U();const N=new MutationObserver(U);return N.observe(k,{childList:!0,subtree:!0,attributes:!0}),()=>{N.disconnect()}},[r,T,k,d,P,j,S]);function te(U){return r||!u||!c?null:M.createElement(ek,{ref:U==="start"?V:I,onClick:N=>m(!1,N.nativeEvent)},typeof u=="string"?u:"Dismiss")}const Q=!r&&A&&(c?!E:!0)&&(z||c);return M.createElement(M.Fragment,null,Q&&M.createElement(Fs,{"data-type":"inside",ref:F==null?void 0:F.beforeInsideRef,onFocus:U=>{if(c){const R=K();jn(o[0]==="reference"?R[0]:R[R.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(D.current=!1,ci(U,F.portalNode)){const R=iy()||y;R==null||R.focus()}else{var N;(N=F.beforeOutsideRef.current)==null||N.focus()}}}),!E&&te("start"),n,te("end"),Q&&M.createElement(Fs,{"data-type":"inside",ref:F==null?void 0:F.afterInsideRef,onFocus:U=>{if(c)jn(K()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(f&&(D.current=!0),ci(U,F.portalNode)){const R=sy()||y;R==null||R.focus()}else{var N;(N=F.afterOutsideRef.current)==null||N.focus()}}}))}const Lc=new Set,tk=M.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=no();return ve(()=>{if(!r)return;Lc.add(i);const s=/iP(hone|ad|od)|iOS/.test(fc()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,f=a.left?parseFloat(a.left):window.scrollX,h=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),s){var d,p;const m=((d=window.visualViewport)==null?void 0:d.offsetLeft)||0,v=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(h-Math.floor(v))+"px",left:-(f-Math.floor(m))+"px",right:"0"})}return()=>{Lc.delete(i),Lc.size===0&&(Object.assign(a,{overflow:"",[c]:""}),s&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(f,h)))}},[i,r]),M.createElement("div",to({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function hy(e){return nt(e.target)&&e.target.tagName==="BUTTON"}function py(e){return gc(e)}function Ls(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,f=M.useRef(),h=M.useRef(!1),d=M.useMemo(()=>({onPointerDown(p){f.current=p.pointerType},onMouseDown(p){const m=f.current;p.button===0&&a!=="click"&&(Yr(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=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}Yr(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){f.current=void 0,!(p.defaultPrevented||!u||hy(p))&&(p.key===" "&&!py(i)&&(p.preventDefault(),h.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||hy(p)||py(i)||p.key===" "&&h.current&&(h.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,l]);return M.useMemo(()=>s?{reference:d}:{},[s,d])}function nk(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const s=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=s.width,f=s.height,h=s.x,d=s.y;return n==null&&t.x&&a&&(n=s.x-t.x),r==null&&t.y&&l&&(r=s.y-t.y),h-=n||0,d-=r||0,u=0,f=0,!o||c?(u=t.axis==="y"?s.width:0,f=t.axis==="x"?s.height:0,h=a&&t.x!=null?t.x:h,d=l&&t.y!=null?t.y:d):o&&!c&&(f=t.axis==="x"?s.height:f,u=t.axis==="y"?s.width:u),o=!0,{width:u,height:f,x:h,y:d,top:d,right:h+u,bottom:d+f,left:h}}}}function my(e){return e!=null&&e.clientX!=null}function rk(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:s}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,f=M.useRef(!1),h=M.useRef(null),[d,p]=M.useState(),[m,v]=M.useState([]),g=at((E,A)=>{f.current||r.current.openEvent&&!my(r.current.openEvent)||s.setPositionReference(nk(i,{x:E,y:A,axis:l,dataRef:r,pointerType:d}))}),w=at(E=>{c!=null||u!=null||(n?h.current||v([]):g(E.clientX,E.clientY))}),y=Yr(d)?o:n,T=M.useCallback(()=>{if(!y||!a||c!=null||u!=null)return;const E=Pt(o);function A(P){const O=on(P);qe(o,O)?(E.removeEventListener("mousemove",A),h.current=null):g(P.clientX,P.clientY)}if(!r.current.openEvent||my(r.current.openEvent)){E.addEventListener("mousemove",A);const P=()=>{E.removeEventListener("mousemove",A),h.current=null};return h.current=P,P}s.setPositionReference(i)},[y,a,c,u,o,r,s,i,g]);M.useEffect(()=>T(),[T,m]),M.useEffect(()=>{a&&!o&&(f.current=!1)},[a,o]),M.useEffect(()=>{!a&&n&&(f.current=!0)},[a,n]),ve(()=>{a&&(c!=null||u!=null)&&(f.current=!1,g(c,u))},[a,c,u,g]);const S=M.useMemo(()=>{function E(A){let{pointerType:P}=A;p(P)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:w,onMouseEnter:w}},[w]);return M.useMemo(()=>a?{reference:S}:{},[a,S])}const ok={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},ik={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},gy=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 so(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:f="pointerdown",ancestorScroll:h=!1,bubbles:d,capture:p}=t,m=Hn(),v=at(typeof l=="function"?l:()=>!1),g=typeof l=="function"?v:l,w=M.useRef(!1),y=M.useRef(!1),{escapeKey:T,outsidePress:S}=gy(d),{escapeKey:E,outsidePress:A}=gy(p),P=at(I=>{var D;if(!n||!s||!a||I.key!=="Escape")return;const L=(D=i.current.floatingContext)==null?void 0:D.nodeId,$=m?cr(m.nodesRef.current,L):[];if(!T&&(I.stopPropagation(),$.length>0)){let z=!0;if($.forEach(G=>{var k;if((k=G.context)!=null&&k.open&&!G.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}r(!1,CA(I)?I.nativeEvent:I,"escape-key")}),O=at(I=>{var D;const L=()=>{var $;P(I),($=on(I))==null||$.removeEventListener("keydown",L)};(D=on(I))==null||D.addEventListener("keydown",L)}),C=at(I=>{var D;const L=w.current;w.current=!1;const $=y.current;if(y.current=!1,c==="click"&&$||L||typeof g=="function"&&!g(I))return;const z=on(I),G="["+Wn("inert")+"]",k=ft(o.floating).querySelectorAll(G);let j=Me(z)?z:null;for(;j&&!_n(j);){const U=xn(j);if(_n(U)||!Me(U))break;j=U}if(k.length&&Me(z)&&!PA(z)&&!qe(z,o.floating)&&Array.from(k).every(U=>!qe(j,U)))return;if(nt(z)&&V){const U=z.clientWidth>0&&z.scrollWidth>z.clientWidth,N=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let R=N&&I.offsetX>z.clientWidth;if(N&&Nt(z).direction==="rtl"&&(R=I.offsetX<=z.offsetWidth-z.clientWidth),R||U&&I.offsetY>z.clientHeight)return}const K=(D=i.current.floatingContext)==null?void 0:D.nodeId,te=m&&cr(m.nodesRef.current,K).some(U=>{var N;return mc(I,(N=U.context)==null?void 0:N.elements.floating)});if(mc(I,o.floating)||mc(I,o.domReference)||te)return;const Q=m?cr(m.nodesRef.current,K):[];if(Q.length>0){let U=!0;if(Q.forEach(N=>{var R;if((R=N.context)!=null&&R.open&&!N.context.dataRef.current.__outsidePressBubbles){U=!1;return}}),!U)return}r(!1,I,"outside-press")}),_=at(I=>{var D;const L=()=>{var $;C(I),($=on(I))==null||$.removeEventListener(c,L)};(D=on(I))==null||D.addEventListener(c,L)});M.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=T,i.current.__outsidePressBubbles=S;function I($){r(!1,$,"ancestor-scroll")}const D=ft(o.floating);a&&D.addEventListener("keydown",E?O:P,E),g&&D.addEventListener(c,A?_:C,A);let L=[];return h&&(Me(o.domReference)&&(L=Vn(o.domReference)),Me(o.floating)&&(L=L.concat(Vn(o.floating))),!Me(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(Vn(o.reference.contextElement)))),L=L.filter($=>{var z;return $!==((z=D.defaultView)==null?void 0:z.visualViewport)}),L.forEach($=>{$.addEventListener("scroll",I,{passive:!0})}),()=>{a&&D.removeEventListener("keydown",E?O:P,E),g&&D.removeEventListener(c,A?_:C,A),L.forEach($=>{$.removeEventListener("scroll",I)})}},[i,o,a,g,c,n,r,h,s,T,S,P,E,O,C,A,_]),M.useEffect(()=>{w.current=!1},[g,c]);const F=M.useMemo(()=>({onKeyDown:P,[ok[f]]:I=>{u&&r(!1,I.nativeEvent,"reference-press")}}),[P,r,u,f]),V=M.useMemo(()=>({onKeyDown:P,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[ik[c]]:()=>{w.current=!0}}),[P,c]);return M.useMemo(()=>s?{reference:F,floating:V}:{},[s,F,V])}function sk(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=no(),i=M.useRef({}),[s]=M.useState(()=>Qg()),a=Rn()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!Me(d)&&jO("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=M.useState(r.reference),u=at((d,p,m)=>{i.current.openEvent=d?p:void 0,s.emit("openchange",{open:d,event:p,reason:m,nested:a}),n==null||n(d,p,m)}),f=M.useMemo(()=>({setPositionReference:c}),[]),h=M.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return M.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:h,events:s,floatingId:o,refs:f}),[t,u,h,s,o,f])}function ao(e){e===void 0&&(e={});const{nodeId:t}=e,n=sk({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=M.useState(null),[a,l]=M.useState(null),u=(o==null?void 0:o.reference)||i,f=M.useRef(null),h=Hn();ve(()=>{u&&(f.current=u)},[u]);const d=IO({...e,elements:{...o,...a&&{reference:a}}}),p=M.useCallback(y=>{const T=Me(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(T),d.refs.setReference(T)},[d.refs]),m=M.useCallback(y=>{(Me(y)||y===null)&&(f.current=y,s(y)),(Me(d.refs.reference.current)||d.refs.reference.current===null||y!==null&&!Me(y))&&d.refs.setReference(y)},[d.refs]),v=M.useMemo(()=>({...d.refs,setReference:m,setPositionReference:p,domReference:f}),[d.refs,m,p]),g=M.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),w=M.useMemo(()=>({...d,...r,refs:v,elements:g,nodeId:t}),[d,v,g,t,r]);return ve(()=>{r.dataRef.current.floatingContext=w;const y=h==null?void 0:h.nodesRef.current.find(T=>T.id===t);y&&(y.context=w)}),M.useMemo(()=>({...d,context:w,refs:v,elements:g}),[d,v,g,w])}function ak(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=M.useRef(!1),u=M.useRef(),f=M.useRef(!0);M.useEffect(()=>{if(!a)return;const d=Pt(s.domReference);function p(){!n&&nt(s.domReference)&&s.domReference===Wt(ft(s.domReference))&&(c.current=!0)}function m(){f.current=!0}return d.addEventListener("blur",p),d.addEventListener("keydown",m,!0),()=>{d.removeEventListener("blur",p),d.removeEventListener("keydown",m,!0)}},[s.domReference,n,a]),M.useEffect(()=>{if(!a)return;function d(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",d),()=>{o.off("openchange",d)}},[o,a]),M.useEffect(()=>()=>{clearTimeout(u.current)},[]);const h=M.useMemo(()=>({onPointerDown(d){dc(d.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(d){if(c.current)return;const p=on(d.nativeEvent);if(l&&Me(p))try{if(hc()&&xg())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!f.current&&!gc(p))return}r(!0,d.nativeEvent,"focus")},onBlur(d){c.current=!1;const p=d.relatedTarget,m=d.nativeEvent,v=Me(p)&&p.hasAttribute(Wn("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var g;const w=Wt(s.domReference?s.domReference.ownerDocument:document);!p&&w===s.domReference||qe((g=i.current.floatingContext)==null?void 0:g.refs.floating.current,w)||qe(s.domReference,w)||v||r(!1,m,"focus")})}}),[i,s.domReference,r,l]);return M.useMemo(()=>a?{reference:h}:{},[a,h])}const yy="active",vy="selected";function Nc(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[yy]:s,[vy]: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&&[yy,vy].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),s[c]=function(){for(var h,d=arguments.length,p=new Array(d),m=0;m<d;m++)p[m]=arguments[m];return(h=r.get(c))==null?void 0:h.map(v=>v(...p)).find(v=>v!==void 0)}}}else s[c]=u}),s),{})}}function lo(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=M.useCallback(a=>Nc(a,e,"reference"),t),i=M.useCallback(a=>Nc(a,e,"floating"),n),s=M.useCallback(a=>Nc(a,e,"item"),r);return M.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}let by=!1;function Ns(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function wy(e,t){return Ns(t,e===Ac||e===si,e===Jr||e===eo)}function _c(e,t,n){return Ns(t,e===si,n?e===Jr:e===eo)||e==="Enter"||e===" "||e===""}function lk(e,t,n){return Ns(t,n?e===Jr:e===eo,e===si)}function xy(e,t,n){return Ns(t,n?e===eo:e===Jr,e===Ac)}function Sy(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:f=!1,nested:h=!1,rtl:d=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:g=!0,disabledIndices:w=void 0,orientation:y="vertical",cols:T=1,scrollItemIntoView:S=!0,virtualItemRef:E,itemSizes:A,dense:P=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(f||ks("`useListNavigation` looping must be enabled to allow escaping."),p||ks("`useListNavigation` must be virtual to allow escaping.")),y==="vertical"&&T>1&&ks("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const O=Rn(),C=Hn(),_=at(a),F=M.useRef(m),V=M.useRef(c??-1),I=M.useRef(null),D=M.useRef(!0),L=M.useRef(_),$=M.useRef(!!o.floating),z=M.useRef(n),G=M.useRef(!1),k=M.useRef(!1),j=yt(w),K=yt(n),te=yt(S),Q=yt(o.floating),U=yt(c),[N,R]=M.useState(),[W,B]=M.useState(),Y=at(function(ae,ge,ie){ie===void 0&&(ie=!1);function be(we){p?(R(we.id),C==null||C.events.emit("virtualfocus",we),E&&(E.current=we)):jn(we,{preventScroll:!0,sync:xg()&&hc()?by||G.current:!1})}const ot=ae.current[ge.current];ot&&be(ot),requestAnimationFrame(()=>{const we=ae.current[ge.current]||ot;if(!we)return;ot||be(we);const it=te.current;it&&H&&(ie||!D.current)&&(we.scrollIntoView==null||we.scrollIntoView(typeof it=="boolean"?{block:"nearest",inline:"nearest"}:it))})});ve(()=>{document.createElement("div").focus({get preventScroll(){return by=!0,!1}})},[]),ve(()=>{l&&(n&&o.floating?F.current&&c!=null&&(k.current=!0,V.current=c,_(c)):$.current&&(V.current=-1,L.current(null)))},[l,n,o.floating,c,_]),ve(()=>{if(l&&n&&o.floating)if(s==null){if(G.current=!1,U.current!=null)return;if($.current&&(V.current=-1,Y(i,V)),(!z.current||!$.current)&&F.current&&(I.current!=null||F.current===!0&&I.current==null)){let ae=0;const ge=()=>{i.current[0]==null?(ae<2&&(ae?requestAnimationFrame:queueMicrotask)(ge),ae++):(V.current=I.current==null||_c(I.current,y,d)||h?Oc(i,j.current):zg(i,j.current),I.current=null,_(V.current))};ge()}}else ai(i,s)||(V.current=s,Y(i,V,k.current),k.current=!1)},[l,n,o.floating,s,U,h,i,y,d,_,Y,j]),ve(()=>{var ae;if(!l||o.floating||!C||p||!$.current)return;const ge=C.nodesRef.current,ie=(ae=ge.find(we=>we.id===O))==null||(ae=ae.context)==null?void 0:ae.elements.floating,be=Wt(ft(o.floating)),ot=ge.some(we=>we.context&&qe(we.context.elements.floating,be));ie&&!ot&&D.current&&ie.focus({preventScroll:!0})},[l,o.floating,C,O,p]),ve(()=>{if(!l||!C||!p||O)return;function ae(ge){B(ge.id),E&&(E.current=ge)}return C.events.on("virtualfocus",ae),()=>{C.events.off("virtualfocus",ae)}},[l,C,p,O,E]),ve(()=>{L.current=_,$.current=!!o.floating}),ve(()=>{n||(I.current=null)},[n]),ve(()=>{z.current=n},[n]);const ee=s!=null,H=M.useMemo(()=>{function ae(ie){if(!n)return;const be=i.current.indexOf(ie);be!==-1&&_(be)}return{onFocus(ie){let{currentTarget:be}=ie;ae(be)},onClick:ie=>{let{currentTarget:be}=ie;return be.focus({preventScroll:!0})},...v&&{onMouseMove(ie){let{currentTarget:be}=ie;ae(be)},onPointerLeave(ie){let{pointerType:be}=ie;!D.current||be==="touch"||(V.current=-1,Y(i,V),_(null),p||jn(Q.current,{preventScroll:!0}))}}}},[n,Q,Y,v,i,_,p]),Pe=at(ae=>{if(D.current=!1,G.current=!0,!K.current&&ae.currentTarget===Q.current)return;if(h&&xy(ae.key,y,d)){gt(ae),r(!1,ae.nativeEvent,"list-navigation"),nt(o.domReference)&&!p&&o.domReference.focus();return}const ge=V.current,ie=Oc(i,w),be=zg(i,w);if(ae.key==="Home"&&(gt(ae),V.current=ie,_(V.current)),ae.key==="End"&&(gt(ae),V.current=be,_(V.current)),T>1){const ot=A||Array.from({length:i.current.length},()=>({width:1,height:1})),we=MO(ot,T,P),it=we.findIndex(oe=>oe!=null&&!Os(i.current,oe,w)),Z=we.reduce((oe,xe,He)=>xe!=null&&!Os(i.current,xe,w)?He:oe,-1);if(V.current=we[DO({current:we.map(oe=>oe!=null?i.current[oe]:null)},{event:ae,orientation:y,loop:f,cols:T,disabledIndices:LO([...w||i.current.map((oe,xe)=>Os(i.current,xe)?xe:void 0),void 0],we),minIndex:it,maxIndex:Z,prevIndex:FO(V.current>be?ie:V.current,ot,we,T,ae.key===si?"bl":ae.key===eo?"tr":"tl"),stopEvent:!0})],_(V.current),y==="both")return}if(wy(ae.key,y)){if(gt(ae),n&&!p&&Wt(ae.currentTarget.ownerDocument)===ae.currentTarget){V.current=_c(ae.key,y,d)?ie:be,_(V.current);return}_c(ae.key,y,d)?f?V.current=ge>=be?u&&ge!==i.current.length?-1:ie:St(i,{startingIndex:ge,disabledIndices:w}):V.current=Math.min(be,St(i,{startingIndex:ge,disabledIndices:w})):f?V.current=ge<=ie?u&&ge!==-1?i.current.length:be:St(i,{startingIndex:ge,decrement:!0,disabledIndices:w}):V.current=Math.max(ie,St(i,{startingIndex:ge,decrement:!0,disabledIndices:w})),ai(i,V.current)?_(null):_(V.current)}}),Xe=M.useMemo(()=>p&&n&&ee&&{"aria-activedescendant":W||N},[p,n,ee,W,N]),_e=M.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...!Sg(o.domReference)&&Xe,onKeyDown:Pe,onPointerMove(){D.current=!0}}),[Xe,Pe,o.domReference,y]),Qe=M.useMemo(()=>{function ae(ie){m==="auto"&&wg(ie.nativeEvent)&&(F.current=!0)}function ge(ie){F.current=m,m==="auto"&&dc(ie.nativeEvent)&&(F.current=!0)}return{...Xe,onKeyDown(ie){D.current=!1;const be=ie.key.indexOf("Arrow")===0,ot=lk(ie.key,y,d),we=xy(ie.key,y,d),it=wy(ie.key,y),Z=(h?ot:it)||ie.key==="Enter"||ie.key.trim()==="";if(p&&n){const vt=C==null?void 0:C.nodesRef.current.find(At=>At.parentId==null),Ct=C&&vt?GO(C.nodesRef.current,vt.id):null;if(be&&Ct&&E){const At=new KeyboardEvent("keydown",{key:ie.key,bubbles:!0});if(ot||we){var oe,xe;const yr=((oe=Ct.context)==null?void 0:oe.elements.domReference)===ie.currentTarget,Eo=we&&!yr?(xe=Ct.context)==null?void 0:xe.elements.domReference:ot?i.current.find(Co=>(Co==null?void 0:Co.id)===N):null;Eo&&(gt(ie),Eo.dispatchEvent(At),B(void 0))}if(it&&Ct.context&&Ct.context.open&&Ct.parentId&&ie.currentTarget!==Ct.context.elements.domReference){var He;gt(ie),(He=Ct.context.elements.domReference)==null||He.dispatchEvent(At);return}}return Pe(ie)}if(!(!n&&!g&&be)){if(Z&&(I.current=h&&it?null:ie.key),h){ot&&(gt(ie),n?(V.current=Oc(i,j.current),_(V.current)):r(!0,ie.nativeEvent,"list-navigation"));return}it&&(c!=null&&(V.current=c),gt(ie),!n&&g?r(!0,ie.nativeEvent,"list-navigation"):Pe(ie),n&&_(V.current))}},onFocus(){n&&!p&&_(null)},onPointerDown:ge,onMouseDown:ae,onClick:ae}},[N,Xe,Pe,j,m,i,h,_,r,n,g,y,d,c,C,p,E]);return M.useMemo(()=>l?{reference:Qe,floating:_e,item:H}:{},[l,Qe,_e,H])}const ck=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function co(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(n=ck.get(s))!=null?n:s,l=no(),u=Rn()!=null,f=M.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]),h=M.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,s]),d=M.useCallback(p=>{let{active:m,selected:v}=p;const g={role:"option",...m&&{id:o+"-option"}};switch(s){case"select":return{...g,"aria-selected":m&&v};case"combobox":return{...g,...m&&{"aria-selected":!0}}}return{}},[o,s]);return M.useMemo(()=>i?{reference:f,floating:h,item:d}:{},[i,f,h,d])}const Ty=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function uo(e,t){return typeof e=="function"?e(t):e}function uk(e,t){const[n,r]=M.useState(e);return e&&!n&&r(!0),M.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function fk(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]=M.useState("unmounted"),c=uk(n,s);return!c&&a==="close"&&l("unmounted"),ve(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function dk(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=M.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",f=(u?s:s.open)||0,h=(u?s:s.close)||0,[d,p]=M.useState(()=>({...uo(i,c),...uo(n,c)})),{isMounted:m,status:v}=fk(e,{duration:s}),g=yt(n),w=yt(r),y=yt(o),T=yt(i);return ve(()=>{const S=uo(g.current,c),E=uo(y.current,c),A=uo(T.current,c),P=uo(w.current,c)||Object.keys(S).reduce((O,C)=>(O[C]="",O),{});if(v==="initial"&&p(O=>({transitionProperty:O.transitionProperty,...A,...S})),v==="open"&&p({transitionProperty:Object.keys(P).map(Ty).join(","),transitionDuration:f+"ms",...A,...P}),v==="close"){const O=E||S;p({transitionProperty:Object.keys(O).map(Ty).join(","),transitionDuration:h+"ms",...A,...O})}},[h,y,g,w,T,f,v,c]),{isMounted:m,styles:d}}function hk(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:f=750,ignoreKeys:h=[],selectedIndex:d=null}=t,p=M.useRef(),m=M.useRef(""),v=M.useRef((n=d??s)!=null?n:-1),g=M.useRef(null),w=at(a),y=at(l),T=yt(u),S=yt(h);ve(()=>{r&&(clearTimeout(p.current),g.current=null,m.current="")},[r]),ve(()=>{if(r&&m.current===""){var C;v.current=(C=d??s)!=null?C:-1}},[r,d,s]);const E=at(C=>{C?o.current.typing||(o.current.typing=C,y(C)):o.current.typing&&(o.current.typing=C,y(C))}),A=at(C=>{function _(L,$,z){const G=T.current?T.current($,z):$.find(k=>(k==null?void 0:k.toLocaleLowerCase().indexOf(z.toLocaleLowerCase()))===0);return G?L.indexOf(G):-1}const F=i.current;if(m.current.length>0&&m.current[0]!==" "&&(_(F,F,m.current)===-1?E(!1):C.key===" "&&gt(C)),F==null||S.current.includes(C.key)||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;r&&C.key!==" "&&(gt(C),E(!0)),F.every(L=>{var $,z;return L?(($=L[0])==null?void 0:$.toLocaleLowerCase())!==((z=L[1])==null?void 0:z.toLocaleLowerCase()):!0})&&m.current===C.key&&(m.current="",v.current=g.current),m.current+=C.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",v.current=g.current,E(!1)},f);const I=v.current,D=_(F,[...F.slice((I||0)+1),...F.slice(0,(I||0)+1)],m.current);D!==-1?(w(D),g.current=D):C.key!==" "&&(m.current="",E(!1))}),P=M.useMemo(()=>({onKeyDown:A}),[A]),O=M.useMemo(()=>({onKeyDown:A,onKeyUp(C){C.key===" "&&E(!1)}}),[A,E]);return M.useMemo(()=>c?{reference:P,floating:O}:{},[c,P,O])}function Ey(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,f]=t[a]||[0,0];c>=r!=f>=r&&n<=(u-l)*(r-c)/(f-c)+l&&(o=!o)}return o}function pk(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function mk(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(f,h){const d=performance.now(),p=d-l;if(s===null||a===null||p===0)return s=f,a=h,l=d,null;const m=f-s,v=h-a,w=Math.sqrt(m*m+v*v)/p;return s=f,a=h,l=d,w}const u=f=>{let{x:h,y:d,placement:p,elements:m,onClose:v,nodeId:g,tree:w}=f;return function(T){function S(){clearTimeout(o),v()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||h==null||d==null)return;const{clientX:E,clientY:A}=T,P=[E,A],O=on(T),C=T.type==="mouseleave",_=qe(m.floating,O),F=qe(m.domReference,O),V=m.domReference.getBoundingClientRect(),I=m.floating.getBoundingClientRect(),D=p.split("-")[0],L=h>I.right-I.width/2,$=d>I.bottom-I.height/2,z=pk(P,V),G=I.width>V.width,k=I.height>V.height,j=(G?V:I).left,K=(G?V:I).right,te=(k?V:I).top,Q=(k?V:I).bottom;if(_&&(i=!0,!C))return;if(F&&(i=!1),F&&!C){i=!0;return}if(C&&Me(T.relatedTarget)&&qe(m.floating,T.relatedTarget)||w&&cr(w.nodesRef.current,g).some(R=>{let{context:W}=R;return W==null?void 0:W.open}))return;if(D==="top"&&d>=V.bottom-1||D==="bottom"&&d<=V.top+1||D==="left"&&h>=V.right-1||D==="right"&&h<=V.left+1)return S();let U=[];switch(D){case"top":U=[[j,V.top+1],[j,I.bottom-1],[K,I.bottom-1],[K,V.top+1]];break;case"bottom":U=[[j,I.top+1],[j,V.bottom-1],[K,V.bottom-1],[K,I.top+1]];break;case"left":U=[[I.right-1,Q],[I.right-1,te],[V.left+1,te],[V.left+1,Q]];break;case"right":U=[[V.right-1,Q],[V.right-1,te],[I.left+1,te],[I.left+1,Q]];break}function N(R){let[W,B]=R;switch(D){case"top":{const Y=[G?W+t/2:L?W+t*4:W-t*4,B+t+1],ee=[G?W-t/2:L?W+t*4:W-t*4,B+t+1],H=[[I.left,L||G?I.bottom-t:I.top],[I.right,L?G?I.bottom-t:I.top:I.bottom-t]];return[Y,ee,...H]}case"bottom":{const Y=[G?W+t/2:L?W+t*4:W-t*4,B-t],ee=[G?W-t/2:L?W+t*4:W-t*4,B-t],H=[[I.left,L||G?I.top+t:I.bottom],[I.right,L?G?I.top+t:I.bottom:I.top+t]];return[Y,ee,...H]}case"left":{const Y=[W+t+1,k?B+t/2:$?B+t*4:B-t*4],ee=[W+t+1,k?B-t/2:$?B+t*4:B-t*4];return[...[[$||k?I.right-t:I.left,I.top],[$?k?I.right-t:I.left:I.right-t,I.bottom]],Y,ee]}case"right":{const Y=[W-t,k?B+t/2:$?B+t*4:B-t*4],ee=[W-t,k?B-t/2:$?B+t*4:B-t*4],H=[[$||k?I.left+t:I.right,I.top],[$?k?I.left+t:I.right:I.left+t,I.bottom]];return[Y,ee,...H]}}}if(!Ey([E,A],U)){if(i&&!z)return S();if(!C&&r){const R=c(T.clientX,T.clientY);if(R!==null&&R<.1)return S()}Ey([E,A],N([h,d]))?!i&&r&&(o=window.setTimeout(S,40)):S()}}};return u.__options={blockPointerEvents:n},u}const fo=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),i=b.useMemo(()=>[Is(10),Pc({fallbackAxisSideDirection:"end"}),Cc(),Hg({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:l}=ao({open:n,middleware:i,transform:!0,whileElementsMounted:Es,onOpenChange:(p,m)=>{var g;const v=m==null?void 0:m.relatedTarget;v&&v.dataset.floating==="true"&&!p||(r(p),(g=e.onChange)==null||g.call(e,p))}}),c=Ls(l),u=so(l),f=co(l),{getReferenceProps:h,getFloatingProps:d}=lo([c,u,f]);return x.jsxs(b.Fragment,{children:[x.jsx("button",{ref:s.setReference,...h(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(io,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(ui,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:x.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-6 shadow-2xl",ref:s.setFloating,style:a,"aria-labelledby":t,...d(),children:[x.jsx(Xg,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),x.jsx("header",{className:"mb-2",children:x.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},gk=e=>{const t=b.useRef(null),n=b.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,s]=b.useState(!1),{context:a,refs:l}=ao({transform:!0,open:i!==null,nodeId:n,onOpenChange:s,strategy:"absolute"}),c=Ls(a),u=co(a),f=so(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:h,getReferenceProps:d}=lo([c,u,f]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(Ar,{...d(e),as:mt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>s(!0),children:x.jsx(mt.span,{layoutId:o,children:e.trigger})}),x.jsx(Qo,{children:i?x.jsx(io,{root:t,children:x.jsx(ui,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:x.jsx(mt.div,{...h(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})};function yk(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function vk(...e){return t=>e.forEach(n=>yk(n,t))}var Vc=M.forwardRef((e,t)=>{const{children:n,...r}=e,o=M.Children.toArray(n),i=o.find(wk);if(i){const s=i.props.children,a=o.map(l=>l===i?M.Children.count(s)>1?M.Children.only(null):M.isValidElement(s)?s.props.children:null:l);return x.jsx($c,{...r,ref:t,children:M.isValidElement(s)?M.cloneElement(s,void 0,a):null})}return x.jsx($c,{...r,ref:t,children:n})});Vc.displayName="Slot";var $c=M.forwardRef((e,t)=>{const{children:n,...r}=e;if(M.isValidElement(n)){const o=Sk(n);return M.cloneElement(n,{...xk(r,n.props),ref:t?vk(t,o):o})}return M.Children.count(n)>1?M.Children.only(null):null});$c.displayName="SlotClone";var bk=({children:e})=>x.jsx(x.Fragment,{children:e});function wk(e){return M.isValidElement(e)&&e.type===bk}function xk(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 Sk(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 Cy=300,Tk=500,Py=(e="")=>Ne("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover: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),Bc=b.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Iy=b.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:i,...s},a)=>{const l=Rn(),c=l!==null,[u,f]=b.useState(!1),[h,d]=b.useState(!1),[p,m]=b.useState(null),v=b.useRef([]),g=b.useRef([]),w=b.useContext(Bc),y=Hn(),T=RO(),S=Yg(),{floatingStyles:E,refs:A,context:P}=ao({nodeId:T,open:u,transform:!0,onOpenChange:f,whileElementsMounted:Es,placement:c?"right":"bottom-start",strategy:"absolute",middleware:[Is({mainAxis:c?0:4,alignmentAxis:c?-4:0}),Pc(),Cc()]}),O=co(P,{role:"menu",enabled:!0}),C=so(P,{bubbles:!0}),_=ty(P,{enabled:n,delay:{open:Cy},handleClose:mk({blockPointerEvents:!0})}),F=Ls(P,{event:"mousedown",toggle:!c,ignoreMouse:c,keyboardHandlers:!0}),V=Sy(P,{loop:!0,activeIndex:p,virtual:!0,nested:c,allowEscape:!0,listRef:v,scrollItemIntoView:!0,onNavigate:m}),I=hk(P,{activeIndex:p,listRef:g,resetMs:Tk,onMatch:u?m:void 0}),{getReferenceProps:D,getFloatingProps:L,getItemProps:$}=lo([_,F,O,C,V,I]);b.useEffect(()=>{if(!y)return;const G=()=>f(!1),k=j=>{j.nodeId!==T&&j.parentId===l&&f(!1)};return y.events.on("click",G),y.events.on("menuopen",k),()=>{y.events.off("click",G),y.events.off("menuopen",k)}},[y,T,l]),b.useEffect(()=>{u&&y&&y.events.emit("menuopen",{parentId:l,nodeId:T})},[y,u,T,l]);const z=r?s.className:Ne(Py(s.className));return x.jsxs(HO,{id:T,children:[x.jsx(b.Fragment,{children:s.asChild?x.jsx(Vc,{children:i,ref:Ic([A.setReference,S.ref,a]),tabIndex:c?w.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:z,...D(w.getItemProps({...s,onFocus(G){var k;(k=s.onFocus)==null||k.call(s,G),d(!1),w.setHasFocusInside(!0)}}))}):x.jsxs("button",{type:"button",ref:Ic([A.setReference,S.ref,a]),tabIndex:c?w.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:z,...D(w.getItemProps({...s,onFocus(G){var k;(k=s.onFocus)==null||k.call(s,G),d(!1),w.setHasFocusInside(!0)}})),children:[i,c&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(Bl,{size:14})]})]})}),x.jsx(Bc.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:$,setHasFocusInside:d,isOpen:u},children:x.jsx(VO,{elementsRef:v,labelsRef:g,children:u&&x.jsx(io,{preserveTabOrder:!0,children:x.jsx(ui,{context:P,modal:!1,initialFocus:c?-1:0,returnFocus:!c,children:x.jsx(t,{...L(),ref:A.setFloating,style:{...s.style,...E},className:Ne("isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",o),children:e})})})})})]})}),Ek=b.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},i)=>{const s=b.useContext(Bc),a=Yg({label:r?null:typeof e=="string"?e:t}),l=Hn(),c=a.index===s.activeIndex;return x.jsxs("button",{...o,ref:Ic([a.ref,i]),"data-active":c,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:Py(o.className),...s.getItemProps({onClick(u){var f;(f=o.onClick)==null||f.call(o,u),l==null||l.events.emit("click")},onFocus(u){var f;(f=o.onFocus)==null||f.call(o,u),s.setHasFocusInside(!0)}}),children:[e,n?x.jsx(n,{size:16}):null]})}),Ck=b.forwardRef((e,t)=>Rn()!==null?x.jsx(Iy,{...e,isParent:!1,ref:t}):x.jsx(WO,{children:x.jsx(Iy,{...e,isParent:!0,ref:t})})),Pk=(e,t)=>ms()?t:window.matchMedia(e).matches,Ik=(e,t=!0)=>{const[n,r]=b.useState(t);return b.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(Pk(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},zt="600ms",Ak={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:zt},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:zt},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:zt}},Ok={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:zt},exit:{translateX:["0%","30%"],opacity:0,animationDuration:zt}},jc={drawer:e=>e==="left"?Ak:Ok,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:zt,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:zt,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:zt,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:zt},enter:{opacity:1,scale:[1.05,1],animationDuration:zt},exit:{opacity:0,scale:.97,animationDuration:zt}}},kk=Po("isolate z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 h-[85vh] max-h-[85vh] max-h-[85svh] pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),Dk={top:0,left:0,right:0,bottom:-1},Mk=e=>e*.62,Fk=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,f=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+f))}const i=e.parent.current.getBoundingClientRect(),s=e.value.get()||i.height,a=Math.abs(s-r.delta.y),l=Mk(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return x.jsx(mt.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:Dk,whileDrag:{cursor:"grabbing"},className:Ne("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})},Rc={drawer:"right",sheet:"none",dialog:"none"},Lk=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...i})=>{const s=b.useId(),a=b.useId(),l=Ik("(min-width: 64rem)"),c=e!=="dialog",u=l?e==="drawer"?i.position:Rc[e]:r?Rc[e]:Rc.sheet,f=l||r?jc[e]:jc.sheet,h=typeof f=="function"?f(u):f,d=l||r?e:"sheet",{refs:p,context:m}=ao({open:i.open,onOpenChange:i.onChange}),v=Ls(m),g=co(m),w=so(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:y,getFloatingProps:T}=lo([v,g,w]),S=i.trigger,E=jr(void 0),A=()=>i.onChange(!1);return x.jsxs(b.Fragment,{children:[i.trigger?x.jsx(b.Fragment,{children:i.asChild?x.jsx(Vc,{ref:p.setReference,...y({layoutId:i.layoutId}),children:S}):x.jsx(mt.button,{ref:p.setReference,...y(),layoutId:i.layoutId,type:"button",children:S})}):null,x.jsx(io,{children:x.jsx(Qo,{presenceAffectsLayout:!0,children:i.open?x.jsx(tk,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${d==="drawer"?"":"grid items-end justify-center lg:items-center"}`,children:x.jsx(ui,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:x.jsxs(mt.div,{animate:"enter","aria-describedby":a,"aria-labelledby":s,className:kk({position:u,type:d}),exit:"exit",layoutId:i.layoutId,initial:"initial",ref:p.setFloating,style:d==="drawer"?{width:E}:{height:E},variants:h,...T(),children:[i.title?x.jsx("header",{className:"relative w-full",children:i.title?x.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:i.title}):null}):null,x.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:i.children}),i.footer?x.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:i.footer}):null,o?x.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:x.jsx("button",{type:"button",onClick:A,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(am,{})})}):null,c&&t?x.jsx(Fk,{onChange:i.onChange,parent:p.floating,position:u,sheet:d==="sheet",value:E}):null]})})}):null})})]})},Nk=e=>x.jsx(mt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),Ay=({children:e,followCursor:t=!1,placement:n,enabled:r,as:o,title:i,...s})=>{const[a,l]=b.useState(!1),c=b.useRef(null),u=o||"span",{refs:f,floatingStyles:h,context:d}=ao({open:a,placement:n,transform:!0,onOpenChange:l,whileElementsMounted:Es,middleware:[Is(5),Pc({fallbackAxisSideDirection:"start"}),Cc(),Hg({element:c,padding:5})]}),p=ty(d,{move:!0,enabled:r,delay:{open:Cy}}),m=ak(d,{enabled:r}),v=so(d,{enabled:r}),g=co(d,{role:"tooltip",enabled:r}),w=rk(d,{enabled:!!r&&!!t}),{getReferenceProps:y,getFloatingProps:T}=lo([p,m,v,g,w]);return x.jsxs(b.Fragment,{children:[x.jsx(u,{ref:f.setReference,...y(s),children:i}),x.jsx(io,{children:a&&x.jsxs(Ir,{...T(),ref:f.setFloating,style:h,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(Xg,{ref:c,context:d,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class _s{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++)_s.getDescendantProperty(a[l],i,r);else i&&_s.getDescendantProperty(a,i,r)}else r.push(t);return r}}class ho{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=ho.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=_s.getDescendantProperty(o,this.keys[i]);let a=!1;for(let l=0;l<s.length;l++){const c=ho.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=ho.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 ho.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 Oy=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>x.jsxs("div",{className:Ne("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(Ay,{title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(sm,{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(im,{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(mC,{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]}),Vs=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:f,labelClassName:h="",name:d,title:p,placeholder:m,hideLeft:v,required:g})=>{const w=f??d,y=Mt(),T=e??y.inputOptionalLabel;return x.jsxs("fieldset",{form:u,"data-error":!!c,"data-interactive":!!i,className:Ne("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[x.jsxs("label",{form:u,htmlFor:w,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-error:text-danger",children:[!v&&!n?x.jsx(Oy,{info:a,hideLeft:v,reportStatus:!0,title:p,placeholder:m,children:T||n?x.jsxs(b.Fragment,{children:[g?null:x.jsx("span",{className:"text-opacity-70",children:T}),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-hover:border-primary group-error:border-danger ${h}`,children:[t?x.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,s?x.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:s}):null]})]}),x.jsx("p",{className:"mt-input-gap hidden flex-shrink-0 flex-grow-0 whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:inline-block group-error:inline-block group-error:text-danger",children:c}),x.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})},_k=e=>x.jsx(b.Fragment,{children:e.children}),ky=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},i)=>{const s=r.Render??_k,a=r.label??r.value;return x.jsx("li",{...o,ref:i,role:"option","aria-selected":t,className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsxs("button",{type:"button","data-value":r.value,onClick:n,"aria-selected":t,"aria-checked":t,"aria-current":t,className:`flex w-full cursor-pointer justify-between p-2 text-left ${t?"bg-primary text-primary-foreground":""} ${e?"bg-primary/70 text-primary-foreground":""}`,children:[x.jsx(s,{...o,label:r.label,value:r.value,children:a}),t?x.jsx("span",{children:x.jsx(hC,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})}),Vk={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},$k={caseSensitive:!1,sort:!1},Bk=[],jk=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:f,required:h=!1,...d},p)=>{const m=d.value??d.defaultValue??"",v=Mt(),[g,w]=b.useState(!1),[y,T]=b.useState(""),[S,E]=b.useState(m),[A,P]=b.useState(m),[O,C]=b.useState(null),_=b.useRef(Bk),F=t&&y!==""?[{value:y,label:y,"data-dynamic":"true"},...e]:e,V=new ho(F,["value","label"],$k).search(y),I=t?void 0:`^(${e.map(B=>`${ic(B.value)}${B.label?"|"+ic(B.label):""}`).join("|")})$`;b.useEffect(()=>{if(d.value){const B=e.find(Y=>Y.value===d.value);E((B==null?void 0:B.label)??d.value)}},[d.value]);const{x:D,y:L,strategy:$,refs:z,context:G}=ao({open:g,transform:!0,strategy:"absolute",onOpenChange:w,whileElementsMounted:Es,middleware:[Is(4),OO({elementContext:"reference",padding:10,apply(B){const ee=B.elements.reference.parentElement,H=ee==null?void 0:ee.getBoundingClientRect().width;Object.assign(B.elements.floating.style,{width:`${H}px`,maxWidth:`${H}px`,minWidth:"max-content",maxHeight:`${Math.min(480,B.availableHeight)}px`})}})]}),k=dk(G,Vk),{getReferenceProps:j,getFloatingProps:K,getItemProps:te}=lo([co(G,{role:"listbox"}),so(G),Sy(G,{activeIndex:O,allowEscape:!0,cols:0,focusItemOnOpen:"auto",listRef:_,loop:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:O,virtual:!0,onNavigate:B=>C(Y=>B??Y)})]);b.useEffect(()=>{const B=z.reference.current;if(B)return Vi(B)},[]);const Q=(B,Y)=>{E(B.value);const ee=z.reference.current;if(!ee)return;ee==null||ee.setAttribute("data-value",B.value),ee.value=B.value;const H=new Event("change",{bubbles:!1,cancelable:!0});ee.dispatchEvent(H),d.onChange&&d.onChange(H),P(B.label??""),w(!1),T(""),C(Y)},U=B=>{var ee;const Y=B.target.value;return T(Y),!g&&Y===""?w(!0):(B.target.name=d.name||"",Y?w(!0):(ee=d.onChange)==null?void 0:ee.call(d,B))},N=()=>{w(!0),T("")},R=()=>{var B;T(""),E(""),(B=z.reference.current)==null||B.setAttribute("data-value",""),P(""),Zf(z.reference.current),w(!1)},W=d.id||d.name;return x.jsxs(Vs,{...d,container:a,error:f,feedback:n,form:d.form,hideLeft:l,id:d.name||d.id,interactive:o,labelClassName:r,left:u,name:d.name,optionalText:s,placeholder:d.placeholder,required:h,rightLabel:i,title:d.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(om,{size:20}),x.jsx("span",{className:"sr-only",children:v.inputCaretDown})]}),S?x.jsx("button",{type:"button",onClick:R,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",{...j({...d,onChange:U,onFocus:N,pattern:I,ref:z.setReference,name:`${W}-shadow`,id:`${W}-shadow`,onClick:B=>B.currentTarget.focus(),onKeyDown(B){if(B.key==="Escape")return B.currentTarget.blur(),w(!1);if(B.key==="Enter"){if(O!==null&&V[O])return B.preventDefault(),Q(V[O],O);if(V.length===1)return B.preventDefault(),Q(V[0],0)}}}),"data-value":S,"data-error":!!f,"data-name":W,"data-target":W,required:h,value:g?y:A||S,"aria-autocomplete":"list",autoComplete:"off",className:Ne("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",d.className)}),x.jsx("input",{id:W,name:W,type:"hidden","data-origin":W,ref:p,required:h,defaultValue:d.value||S||void 0}),x.jsx(io,{preserveTabOrder:!0,children:g?x.jsx(ui,{guards:!0,returnFocus:!1,context:G,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsx("ul",{...K({ref:z.setFloating,style:{position:$,left:(D??0)+16,top:L??0,...k.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 border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:V.map((B,Y)=>b.createElement(ky,{...te({onClick:()=>Q(B,Y),ref:ee=>void(_.current[Y]=ee),selected:O===Y,active:S===B.value}),key:`${B.value}-option`,option:B,selected:O===Y,active:S===B.value}))})}):null})]})}),Dy=b.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:i,container:s,...a},l)=>x.jsxs("label",{"data-task":t,"data-disabled":a.disabled,"aria-disabled":a.disabled,className:Ne("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[x.jsx("input",{...a,ref:l,type:"checkbox","data-task":t,className:Ne("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",o)}),e,x.jsx("span",{"data-name":"checkbox-label",className:Ne("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),fi=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:f,error:h,...d},p)=>{const m=d.id??d.name,v=b.useRef(null);return b.useEffect(()=>{if(v.current===null)return;const g=v.current,w=Vi(v.current),y=T=>{const S=T;if(S.key==="Enter"&&g.enterKeyHint==="next"){const E=g.getAttribute("data-next");if(E){const A=document.getElementById(E);if(A)return A.focus(),void S.preventDefault()}}};return g.addEventListener("keydown",y),()=>{w(),g.removeEventListener("keydown",y)}},[]),x.jsx(Vs,{info:n,container:l,error:h,feedback:t,hideLeft:c,left:f,optionalText:a,right:u,rightLabel:s,interactive:i,form:d.form,id:d.name||d.id,name:d.name,labelClassName:r,title:d.title,placeholder:d.placeholder,required:d.required,children:x.jsx(Wm,{...d,type:e,"data-next":o,ref:Fa(p,v),id:m,name:m,className:Ne("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",d.className)})})}),My=new Date(1970,11,31),Hc={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Fy={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},Rk={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")},Wc=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},Hk=b.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},s)=>{const a=b.useId(),l=Mt(),c=b.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[u,f]=b.useState(e||void 0),[h,d]=b.useState(!1),p=Wc(c,My).flatMap(E=>mn.keyof(Hc,E.type)?Hc[E.type](E.value):[]),m=Wc(c,My).reduce((E,A)=>E+(mn.keyof(Fy,A.type)?Fy[A.type](A.value):""),""),[v,g]=b.useState(u?Wc(c,u).reduce((E,A)=>E+(mn.keyof(Hc,A.type)?Rk[A.type](u,A.value):""),""):""),w=E=>{const A=E.target.value;if(g(A),p.length===A.length&&p.every((O,C)=>{const _=A.charAt(C);return typeof O=="string"?_===O:O.test(_)})){const O=zr(PI(A,m,new Date));return f(O),r==null?void 0:r(O)}return f(void 0),r==null?void 0:r(void 0)},y=E=>(f(E),r==null||r(E),g(E?IP(E,m):"")),T=pm(u),S=T?u.toISOString():void 0;return x.jsx(fi,{...i,mask:p,value:v,"data-value":S,"data-target":i.name,className:"uppercase",formNoValidate:!h,placeholder:m,onChange:w,required:i.required??!0,error:h?void 0:i.error,name:void 0,id:void 0,right:x.jsxs(b.Fragment,{children:[x.jsx("input",{"data-origin":i.name,defaultValue:S,form:i.form,hidden:!0,id:i.name,name:i.name,ref:s,type:"date"}),x.jsx(fo,{open:h,onChange:d,trigger:x.jsxs("span",{"aria-labelledby":a,children:[x.jsx("span",{id:a,className:"sr-only",children:l.datePickerCalendarButtonLabel}),x.jsx(dC,{})]}),buttonProps:{"aria-describedby":a},children:x.jsx(hg,{...i,locale:t,changeOnlyOnClick:!0,markToday:o,onChange:y,disabledDate:n,date:T?u:void 0})})]})})}),Wk=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],zk=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Gk=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Uk=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Ly=(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 Ny(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?Uk:Gk:t.binary?zk:Wk,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=Ly(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=Ly(Number(e),t.locale,s),c=n[a];return i+l+r+c}var zc={exports:{}},$s={exports:{}},Ie={};/** @license React v16.13.1
178
178
  * react-is.production.min.js
179
179
  *
180
180
  * Copyright (c) Facebook, Inc. and its affiliates.
181
181
  *
182
182
  * This source code is licensed under the MIT license found in the
183
183
  * LICENSE file in the root directory of this source tree.
184
- */var Hv;function cM(){if(Hv)return Le;Hv=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,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function y(S){if(typeof S=="object"&&S!==null){var E=S.$$typeof;switch(E){case t:switch(S=S.type,S){case l:case c:case r:case s:case o:case d:return S;default:switch(S=S&&S.$$typeof,S){case a:case u:case p:case f:case i:return S;default:return E}}case n:return E}}}function T(S){return y(S)===c}return Le.AsyncMode=l,Le.ConcurrentMode=c,Le.ContextConsumer=a,Le.ContextProvider=i,Le.Element=t,Le.ForwardRef=u,Le.Fragment=r,Le.Lazy=p,Le.Memo=f,Le.Portal=n,Le.Profiler=s,Le.StrictMode=o,Le.Suspense=d,Le.isAsyncMode=function(S){return T(S)||y(S)===l},Le.isConcurrentMode=T,Le.isContextConsumer=function(S){return y(S)===a},Le.isContextProvider=function(S){return y(S)===i},Le.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},Le.isForwardRef=function(S){return y(S)===u},Le.isFragment=function(S){return y(S)===r},Le.isLazy=function(S){return y(S)===p},Le.isMemo=function(S){return y(S)===f},Le.isPortal=function(S){return y(S)===n},Le.isProfiler=function(S){return y(S)===s},Le.isStrictMode=function(S){return y(S)===o},Le.isSuspense=function(S){return y(S)===d},Le.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===s||S===o||S===d||S===h||typeof S=="object"&&S!==null&&(S.$$typeof===p||S.$$typeof===f||S.$$typeof===i||S.$$typeof===a||S.$$typeof===u||S.$$typeof===v||S.$$typeof===g||S.$$typeof===w||S.$$typeof===m)},Le.typeOf=y,Le}var Ve={};/** @license React v16.13.1
184
+ */var _y;function Yk(){if(_y)return Ie;_y=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,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function y(S){if(typeof S=="object"&&S!==null){var E=S.$$typeof;switch(E){case t:switch(S=S.type,S){case l:case c:case r:case i:case o:case f:return S;default:switch(S=S&&S.$$typeof,S){case a:case u:case p:case d:case s:return S;default:return E}}case n:return E}}}function T(S){return y(S)===c}return Ie.AsyncMode=l,Ie.ConcurrentMode=c,Ie.ContextConsumer=a,Ie.ContextProvider=s,Ie.Element=t,Ie.ForwardRef=u,Ie.Fragment=r,Ie.Lazy=p,Ie.Memo=d,Ie.Portal=n,Ie.Profiler=i,Ie.StrictMode=o,Ie.Suspense=f,Ie.isAsyncMode=function(S){return T(S)||y(S)===l},Ie.isConcurrentMode=T,Ie.isContextConsumer=function(S){return y(S)===a},Ie.isContextProvider=function(S){return y(S)===s},Ie.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},Ie.isForwardRef=function(S){return y(S)===u},Ie.isFragment=function(S){return y(S)===r},Ie.isLazy=function(S){return y(S)===p},Ie.isMemo=function(S){return y(S)===d},Ie.isPortal=function(S){return y(S)===n},Ie.isProfiler=function(S){return y(S)===i},Ie.isStrictMode=function(S){return y(S)===o},Ie.isSuspense=function(S){return y(S)===f},Ie.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===i||S===o||S===f||S===h||typeof S=="object"&&S!==null&&(S.$$typeof===p||S.$$typeof===d||S.$$typeof===s||S.$$typeof===a||S.$$typeof===u||S.$$typeof===v||S.$$typeof===g||S.$$typeof===w||S.$$typeof===m)},Ie.typeOf=y,Ie}var Ae={};/** @license React v16.13.1
185
185
  * react-is.development.js
186
186
  *
187
187
  * Copyright (c) Facebook, Inc. and its affiliates.
188
188
  *
189
189
  * This source code is licensed under the MIT license found in the
190
190
  * LICENSE file in the root directory of this source tree.
191
- */var Uv;function uM(){return Uv||(Uv=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,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=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===s||B===o||B===d||B===h||typeof B=="object"&&B!==null&&(B.$$typeof===p||B.$$typeof===f||B.$$typeof===i||B.$$typeof===a||B.$$typeof===u||B.$$typeof===v||B.$$typeof===g||B.$$typeof===w||B.$$typeof===m)}function T(B){if(typeof B=="object"&&B!==null){var Se=B.$$typeof;switch(Se){case t:var Xe=B.type;switch(Xe){case l:case c:case r:case s:case o:case d:return Xe;default:var Ue=Xe&&Xe.$$typeof;switch(Ue){case a:case u:case p:case f:case i:return Ue;default:return Se}}case n:return Se}}}var S=l,E=c,I=a,P=i,O=t,C=u,L=r,D=p,V=f,k=n,_=s,N=o,$=d,H=!1;function U(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.")),A(B)||T(B)===l}function A(B){return T(B)===c}function R(B){return T(B)===a}function Z(B){return T(B)===i}function re(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function ee(B){return T(B)===u}function Y(B){return T(B)===r}function F(B){return T(B)===p}function j(B){return T(B)===f}function z(B){return T(B)===n}function G(B){return T(B)===s}function W(B){return T(B)===o}function te(B){return T(B)===d}Ve.AsyncMode=S,Ve.ConcurrentMode=E,Ve.ContextConsumer=I,Ve.ContextProvider=P,Ve.Element=O,Ve.ForwardRef=C,Ve.Fragment=L,Ve.Lazy=D,Ve.Memo=V,Ve.Portal=k,Ve.Profiler=_,Ve.StrictMode=N,Ve.Suspense=$,Ve.isAsyncMode=U,Ve.isConcurrentMode=A,Ve.isContextConsumer=R,Ve.isContextProvider=Z,Ve.isElement=re,Ve.isForwardRef=ee,Ve.isFragment=Y,Ve.isLazy=F,Ve.isMemo=j,Ve.isPortal=z,Ve.isProfiler=G,Ve.isStrictMode=W,Ve.isSuspense=te,Ve.isValidElementType=y,Ve.typeOf=T}()),Ve}var Gv;function Yv(){return Gv||(Gv=1,process.env.NODE_ENV==="production"?wa.exports=cM():wa.exports=uM()),wa.exports}/*
191
+ */var Vy;function qk(){return Vy||(Vy=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,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function y(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===i||H===o||H===f||H===h||typeof H=="object"&&H!==null&&(H.$$typeof===p||H.$$typeof===d||H.$$typeof===s||H.$$typeof===a||H.$$typeof===u||H.$$typeof===v||H.$$typeof===g||H.$$typeof===w||H.$$typeof===m)}function T(H){if(typeof H=="object"&&H!==null){var Pe=H.$$typeof;switch(Pe){case t:var Xe=H.type;switch(Xe){case l:case c:case r:case i:case o:case f:return Xe;default:var _e=Xe&&Xe.$$typeof;switch(_e){case a:case u:case p:case d:case s:return _e;default:return Pe}}case n:return Pe}}}var S=l,E=c,A=a,P=s,O=t,C=u,_=r,F=p,V=d,I=n,D=i,L=o,$=f,z=!1;function G(H){return z||(z=!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(H)||T(H)===l}function k(H){return T(H)===c}function j(H){return T(H)===a}function K(H){return T(H)===s}function te(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function Q(H){return T(H)===u}function U(H){return T(H)===r}function N(H){return T(H)===p}function R(H){return T(H)===d}function W(H){return T(H)===n}function B(H){return T(H)===i}function Y(H){return T(H)===o}function ee(H){return T(H)===f}Ae.AsyncMode=S,Ae.ConcurrentMode=E,Ae.ContextConsumer=A,Ae.ContextProvider=P,Ae.Element=O,Ae.ForwardRef=C,Ae.Fragment=_,Ae.Lazy=F,Ae.Memo=V,Ae.Portal=I,Ae.Profiler=D,Ae.StrictMode=L,Ae.Suspense=$,Ae.isAsyncMode=G,Ae.isConcurrentMode=k,Ae.isContextConsumer=j,Ae.isContextProvider=K,Ae.isElement=te,Ae.isForwardRef=Q,Ae.isFragment=U,Ae.isLazy=N,Ae.isMemo=R,Ae.isPortal=W,Ae.isProfiler=B,Ae.isStrictMode=Y,Ae.isSuspense=ee,Ae.isValidElementType=y,Ae.typeOf=T}()),Ae}var $y;function By(){return $y||($y=1,process.env.NODE_ENV==="production"?$s.exports=Yk():$s.exports=qk()),$s.exports}/*
192
192
  object-assign
193
193
  (c) Sindre Sorhus
194
194
  @license MIT
195
- */var zu,qv;function dM(){if(qv)return zu;qv=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 zu=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 h=0;h<c.length;h++)n.call(a,c[h])&&(l[c[h]]=a[c[h]])}}return l},zu}var Hu,Kv;function Uu(){if(Kv)return Hu;Kv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Hu=e,Hu}var Gu,Zv;function Xv(){return Zv||(Zv=1,Gu=Function.call.bind(Object.prototype.hasOwnProperty)),Gu}var Yu,Qv;function fM(){if(Qv)return Yu;Qv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Uu(),n={},r=Xv();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 h=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 h.name="Invariant Violation",h}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 f=c?c():"";e("Failed "+a+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Yu=o,Yu}var qu,Jv;function hM(){if(Jv)return qu;Jv=1;var e=Yv(),t=dM(),n=Uu(),r=Xv(),o=fM(),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 qu=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(A){var R=A&&(c&&A[c]||A[u]);if(typeof R=="function")return R}var h="<<anonymous>>",f={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:w(),arrayOf:y,element:T(),elementType:S(),instanceOf:E,node:C(),objectOf:P,oneOf:I,oneOfType:O,shape:D,exact:V};function p(A,R){return A===R?A!==0||1/A===1/R:A!==A&&R!==R}function m(A,R){this.message=A,this.data=R&&typeof R=="object"?R:{},this.stack=""}m.prototype=Error.prototype;function v(A){if(process.env.NODE_ENV!=="production")var R={},Z=0;function re(Y,F,j,z,G,W,te){if(z=z||h,W=W||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 Se=z+":"+j;!R[Se]&&Z<3&&(s("You are manually calling a React.PropTypes validation function for the `"+W+"` prop on `"+z+"`. 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[Se]=!0,Z++)}}return F[j]==null?Y?F[j]===null?new m("The "+G+" `"+W+"` is marked as required "+("in `"+z+"`, but its value is `null`.")):new m("The "+G+" `"+W+"` is marked as required in "+("`"+z+"`, but its value is `undefined`.")):null:A(F,j,z,G,W)}var ee=re.bind(null,!1);return ee.isRequired=re.bind(null,!0),ee}function g(A){function R(Z,re,ee,Y,F,j){var z=Z[re],G=N(z);if(G!==A){var W=$(z);return new m("Invalid "+Y+" `"+F+"` of type "+("`"+W+"` supplied to `"+ee+"`, expected ")+("`"+A+"`."),{expectedType:A})}return null}return v(R)}function w(){return v(i)}function y(A){function R(Z,re,ee,Y,F){if(typeof A!="function")return new m("Property `"+F+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var j=Z[re];if(!Array.isArray(j)){var z=N(j);return new m("Invalid "+Y+" `"+F+"` of type "+("`"+z+"` supplied to `"+ee+"`, expected an array."))}for(var G=0;G<j.length;G++){var W=A(j,G,ee,Y,F+"["+G+"]",n);if(W instanceof Error)return W}return null}return v(R)}function T(){function A(R,Z,re,ee,Y){var F=R[Z];if(!a(F)){var j=N(F);return new m("Invalid "+ee+" `"+Y+"` of type "+("`"+j+"` supplied to `"+re+"`, expected a single ReactElement."))}return null}return v(A)}function S(){function A(R,Z,re,ee,Y){var F=R[Z];if(!e.isValidElementType(F)){var j=N(F);return new m("Invalid "+ee+" `"+Y+"` of type "+("`"+j+"` supplied to `"+re+"`, expected a single ReactElement type."))}return null}return v(A)}function E(A){function R(Z,re,ee,Y,F){if(!(Z[re]instanceof A)){var j=A.name||h,z=U(Z[re]);return new m("Invalid "+Y+" `"+F+"` of type "+("`"+z+"` supplied to `"+ee+"`, expected ")+("instance of `"+j+"`."))}return null}return v(R)}function I(A){if(!Array.isArray(A))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 R(Z,re,ee,Y,F){for(var j=Z[re],z=0;z<A.length;z++)if(p(j,A[z]))return null;var G=JSON.stringify(A,function(te,B){var Se=$(B);return Se==="symbol"?String(B):B});return new m("Invalid "+Y+" `"+F+"` of value `"+String(j)+"` "+("supplied to `"+ee+"`, expected one of "+G+"."))}return v(R)}function P(A){function R(Z,re,ee,Y,F){if(typeof A!="function")return new m("Property `"+F+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var j=Z[re],z=N(j);if(z!=="object")return new m("Invalid "+Y+" `"+F+"` of type "+("`"+z+"` supplied to `"+ee+"`, expected an object."));for(var G in j)if(r(j,G)){var W=A(j,G,ee,Y,F+"."+G,n);if(W instanceof Error)return W}return null}return v(R)}function O(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var R=0;R<A.length;R++){var Z=A[R];if(typeof Z!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(Z)+" at index "+R+"."),i}function re(ee,Y,F,j,z){for(var G=[],W=0;W<A.length;W++){var te=A[W],B=te(ee,Y,F,j,z,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&G.push(B.data.expectedType)}var Se=G.length>0?", expected one of type ["+G.join(", ")+"]":"";return new m("Invalid "+j+" `"+z+"` supplied to "+("`"+F+"`"+Se+"."))}return v(re)}function C(){function A(R,Z,re,ee,Y){return k(R[Z])?null:new m("Invalid "+ee+" `"+Y+"` supplied to "+("`"+re+"`, expected a ReactNode."))}return v(A)}function L(A,R,Z,re,ee){return new m((A||"React class")+": "+R+" type `"+Z+"."+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function D(A){function R(Z,re,ee,Y,F){var j=Z[re],z=N(j);if(z!=="object")return new m("Invalid "+Y+" `"+F+"` of type `"+z+"` "+("supplied to `"+ee+"`, expected `object`."));for(var G in A){var W=A[G];if(typeof W!="function")return L(ee,Y,F,G,$(W));var te=W(j,G,ee,Y,F+"."+G,n);if(te)return te}return null}return v(R)}function V(A){function R(Z,re,ee,Y,F){var j=Z[re],z=N(j);if(z!=="object")return new m("Invalid "+Y+" `"+F+"` of type `"+z+"` "+("supplied to `"+ee+"`, expected `object`."));var G=t({},Z[re],A);for(var W in G){var te=A[W];if(r(A,W)&&typeof te!="function")return L(ee,Y,F,W,$(te));if(!te)return new m("Invalid "+Y+" `"+F+"` key `"+W+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(Z[re],null," ")+`
196
- Valid keys: `+JSON.stringify(Object.keys(A),null," "));var B=te(j,W,ee,Y,F+"."+W,n);if(B)return B}return null}return v(R)}function k(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(k);if(A===null||a(A))return!0;var R=d(A);if(R){var Z=R.call(A),re;if(R!==A.entries){for(;!(re=Z.next()).done;)if(!k(re.value))return!1}else for(;!(re=Z.next()).done;){var ee=re.value;if(ee&&!k(ee[1]))return!1}}else return!1;return!0;default:return!1}}function _(A,R){return A==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function N(A){var R=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":_(R,A)?"symbol":R}function $(A){if(typeof A>"u"||A===null)return""+A;var R=N(A);if(R==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return R}function H(A){var R=$(A);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function U(A){return!A.constructor||!A.constructor.name?h:A.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},qu}var Ku,eb;function pM(){if(eb)return Ku;eb=1;var e=Uu();function t(){}function n(){}return n.resetWarningCache=t,Ku=function(){function r(i,a,l,c,u,d){if(d!==e){var h=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 h.name="Invariant Violation",h}}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},Ku}if(process.env.NODE_ENV!=="production"){var mM=Yv(),gM=!0;Wu.exports=hM()(mM.isElement,gM)}else Wu.exports=pM()();var yM=Wu.exports;const We=J0(yM);function Ro(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 jo(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 tb(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 nb(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 vM=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 Bs(e,t){var n=bM(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 bM(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=vM.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var wM=[".DS_Store","Thumbs.db"];function xM(e){return Ro(this,void 0,void 0,function(){return jo(this,function(t){return xa(e)&&SM(e.dataTransfer)?[2,PM(e.dataTransfer,e.type)]:TM(e)?[2,EM(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,CM(e)]:[2,[]]})})}function SM(e){return xa(e)}function TM(e){return xa(e)&&xa(e.target)}function xa(e){return typeof e=="object"&&e!==null}function EM(e){return Zu(e.target.files).map(function(t){return Bs(t)})}function CM(e){return Ro(this,void 0,void 0,function(){var t;return jo(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 Bs(r)})]}})})}function PM(e,t){return Ro(this,void 0,void 0,function(){var n,r;return jo(this,function(o){switch(o.label){case 0:return e.items?(n=Zu(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(kM))]):[3,2];case 1:return r=o.sent(),[2,rb(ob(r))];case 2:return[2,rb(Zu(e.files).map(function(s){return Bs(s)}))]}})})}function rb(e){return e.filter(function(t){return wM.indexOf(t.name)===-1})}function Zu(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function kM(e){if(typeof e.webkitGetAsEntry!="function")return sb(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?ib(t):sb(e)}function ob(e){return e.reduce(function(t,n){return nb(nb([],tb(t),!1),tb(Array.isArray(n)?ob(n):[n]),!1)},[])}function sb(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Bs(t);return Promise.resolve(n)}function IM(e){return Ro(this,void 0,void 0,function(){return jo(this,function(t){return[2,e.isDirectory?ib(e):OM(e)]})})}function ib(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return Ro(i,void 0,void 0,function(){var l,c,u;return jo(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(IM)),o.push(u),s(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function OM(e){return Ro(this,void 0,void 0,function(){return jo(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=Bs(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var AM=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 ab(e){return DM(e)||MM(e)||db(e)||_M()}function _M(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
197
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function DM(e){if(Array.isArray(e))return Xu(e)}function lb(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 cb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lb(Object(n),!0).forEach(function(r){ub(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ub(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ws(e,t){return LM(e)||FM(e,t)||db(e,t)||NM()}function NM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
198
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function db(e,t){if(e){if(typeof e=="string")return Xu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xu(e,t)}}function Xu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function FM(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 LM(e){if(Array.isArray(e))return e}var VM="file-invalid-type",$M="file-too-large",RM="file-too-small",jM="too-many-files",BM=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:VM,message:"File type must be ".concat(n)}},fb=function(t){return{code:$M,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},hb=function(t){return{code:RM,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},WM={code:jM,message:"Too many files"};function pb(e,t){var n=e.type==="application/x-moz-file"||AM(e,t);return[n,n?null:BM(t)]}function mb(e,t,n){if(Mr(e.size))if(Mr(t)&&Mr(n)){if(e.size>n)return[!1,fb(n)];if(e.size<t)return[!1,hb(t)]}else{if(Mr(t)&&e.size<t)return[!1,hb(t)];if(Mr(n)&&e.size>n)return[!1,fb(n)]}return[!0,null]}function Mr(e){return e!=null}function zM(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=pb(l,n),u=Ws(c,1),d=u[0],h=mb(l,r,o),f=Ws(h,1),p=f[0],m=a?a(l):null;return d&&p&&!m})}function Sa(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ta(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 gb(e){e.preventDefault()}function HM(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function UM(e){return e.indexOf("Edge/")!==-1}function GM(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return HM(e)||UM(e)}function Sn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t.some(function(a){return!Sa(r)&&a&&a.apply(void 0,[r].concat(s)),Sa(r)})}}function YM(){return"showOpenFilePicker"in window}function qM(e){if(Mr(e)){var t=Object.entries(e).filter(function(n){var r=Ws(n,2),o=r[0],s=r[1],i=!0;return yb(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(vb))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=Ws(r,2),s=o[0],i=o[1];return cb(cb({},n),{},ub({},s,i))},{});return[{description:"Files",accept:t}]}return e}function KM(e){if(Mr(e))return Object.entries(e).reduce(function(t,n){var r=Ws(n,2),o=r[0],s=r[1];return[].concat(ab(t),[o],ab(s))},[]).filter(function(t){return yb(t)||vb(t)}).join(",")}function ZM(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function XM(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function yb(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function vb(e){return/^.*\.[\w]+$/.test(e)}var QM=["children"],JM=["open"],eD=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],tD=["refKey","onChange","onClick"];function nD(e){return sD(e)||oD(e)||bb(e)||rD()}function rD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
199
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sD(e){if(Array.isArray(e))return Ju(e)}function Qu(e,t){return lD(e)||aD(e,t)||bb(e,t)||iD()}function iD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
200
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bb(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 aD(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 lD(e){if(Array.isArray(e))return e}function wb(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 et(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wb(Object(n),!0).forEach(function(r){ed(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ed(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ea(e,t){if(e==null)return{};var n=cD(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 cD(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 td=b.forwardRef(function(e,t){var n=e.children,r=Ea(e,QM),o=Sb(r),s=o.open,i=Ea(o,JM);return b.useImperativeHandle(t,function(){return{open:s}},[s]),b.createElement(b.Fragment,null,n(et(et({},i),{},{open:s})))});td.displayName="Dropzone";var xb={disabled:!1,getFilesFromEvent:xM,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};td.defaultProps=xb,td.propTypes={children:We.func,accept:We.objectOf(We.arrayOf(We.string)),multiple:We.bool,preventDropOnDocument:We.bool,noClick:We.bool,noKeyboard:We.bool,noDrag:We.bool,noDragEventsBubbling:We.bool,minSize:We.number,maxSize:We.number,maxFiles:We.number,disabled:We.bool,getFilesFromEvent:We.func,onFileDialogCancel:We.func,onFileDialogOpen:We.func,useFsAccessApi:We.bool,autoFocus:We.bool,onDragEnter:We.func,onDragLeave:We.func,onDragOver:We.func,onDrop:We.func,onDropAccepted:We.func,onDropRejected:We.func,onError:We.func,validator:We.func};var nd={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=et(et({},xb),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,h=t.onDrop,f=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,v=t.onFileDialogOpen,g=t.useFsAccessApi,w=t.autoFocus,y=t.preventDropOnDocument,T=t.noClick,S=t.noKeyboard,E=t.noDrag,I=t.noDragEventsBubbling,P=t.onError,O=t.validator,C=b.useMemo(function(){return KM(n)},[n]),L=b.useMemo(function(){return qM(n)},[n]),D=b.useMemo(function(){return typeof v=="function"?v:Tb},[v]),V=b.useMemo(function(){return typeof m=="function"?m:Tb},[m]),k=b.useRef(null),_=b.useRef(null),N=b.useReducer(uD,nd),$=Qu(N,2),H=$[0],U=$[1],A=H.isFocused,R=H.isFileDialogActive,Z=b.useRef(typeof window<"u"&&window.isSecureContext&&g&&YM()),re=function(){!Z.current&&R&&setTimeout(function(){if(_.current){var ae=_.current.files;ae.length||(U({type:"closeDialog"}),V())}},300)};b.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[_,R,V,Z]);var ee=b.useRef([]),Y=function(ae){k.current&&k.current.contains(ae.target)||(ae.preventDefault(),ee.current=[])};b.useEffect(function(){return y&&(document.addEventListener("dragover",gb,!1),document.addEventListener("drop",Y,!1)),function(){y&&(document.removeEventListener("dragover",gb),document.removeEventListener("drop",Y))}},[k,y]),b.useEffect(function(){return!r&&w&&k.current&&k.current.focus(),function(){}},[k,w,r]);var F=b.useCallback(function(Q){P?P(Q):console.error(Q)},[P]),j=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Oe(Q),ee.current=[].concat(nD(ee.current),[Q.target]),Ta(Q)&&Promise.resolve(o(Q)).then(function(ae){if(!(Sa(Q)&&!I)){var _e=ae.length,Qe=_e>0&&zM({files:ae,accept:C,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:O}),It=_e>0&&!Qe;U({isDragAccept:Qe,isDragReject:It,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Q)}}).catch(function(ae){return F(ae)})},[o,c,F,I,C,i,s,a,l,O]),z=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Oe(Q);var ae=Ta(Q);if(ae&&Q.dataTransfer)try{Q.dataTransfer.dropEffect="copy"}catch{}return ae&&d&&d(Q),!1},[d,I]),G=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Oe(Q);var ae=ee.current.filter(function(Qe){return k.current&&k.current.contains(Qe)}),_e=ae.indexOf(Q.target);_e!==-1&&ae.splice(_e,1),ee.current=ae,!(ae.length>0)&&(U({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ta(Q)&&u&&u(Q))},[k,u,I]),W=b.useCallback(function(Q,ae){var _e=[],Qe=[];Q.forEach(function(It){var Ft=pb(It,C),Rt=Qu(Ft,2),Wr=Rt[0],Jo=Rt[1],es=mb(It,i,s),rl=Qu(es,2),nf=rl[0],rf=rl[1],of=O?O(It):null;if(Wr&&nf&&!of)_e.push(It);else{var sf=[Jo,rf];of&&(sf=sf.concat(of)),Qe.push({file:It,errors:sf.filter(function(nV){return nV})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(It){Qe.push({file:It,errors:[WM]})}),_e.splice(0)),U({acceptedFiles:_e,fileRejections:Qe,type:"setFiles"}),h&&h(_e,Qe,ae),Qe.length>0&&p&&p(Qe,ae),_e.length>0&&f&&f(_e,ae)},[U,a,C,i,s,l,h,f,p,O]),te=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Oe(Q),ee.current=[],Ta(Q)&&Promise.resolve(o(Q)).then(function(ae){Sa(Q)&&!I||W(ae,Q)}).catch(function(ae){return F(ae)}),U({type:"reset"})},[o,W,F,I]),B=b.useCallback(function(){if(Z.current){U({type:"openDialog"}),D();var Q={multiple:a,types:L};window.showOpenFilePicker(Q).then(function(ae){return o(ae)}).then(function(ae){W(ae,null),U({type:"closeDialog"})}).catch(function(ae){ZM(ae)?(V(ae),U({type:"closeDialog"})):XM(ae)?(Z.current=!1,_.current?(_.current.value=null,_.current.click()):F(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):F(ae)});return}_.current&&(U({type:"openDialog"}),D(),_.current.value=null,_.current.click())},[U,D,V,g,W,F,L,a]),Se=b.useCallback(function(Q){!k.current||!k.current.isEqualNode(Q.target)||(Q.key===" "||Q.key==="Enter"||Q.keyCode===32||Q.keyCode===13)&&(Q.preventDefault(),B())},[k,B]),Xe=b.useCallback(function(){U({type:"focus"})},[]),Ue=b.useCallback(function(){U({type:"blur"})},[]),at=b.useCallback(function(){T||(GM()?setTimeout(B,0):B())},[T,B]),de=function(ae){return r?null:ae},Ce=function(ae){return S?null:de(ae)},ce=function(ae){return E?null:de(ae)},Oe=function(ae){I&&ae.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,Qe=Q.role,It=Q.onKeyDown,Ft=Q.onFocus,Rt=Q.onBlur,Wr=Q.onClick,Jo=Q.onDragEnter,es=Q.onDragOver,rl=Q.onDragLeave,nf=Q.onDrop,rf=Ea(Q,eD);return et(et(ed({onKeyDown:Ce(Sn(It,Se)),onFocus:Ce(Sn(Ft,Xe)),onBlur:Ce(Sn(Rt,Ue)),onClick:de(Sn(Wr,at)),onDragEnter:ce(Sn(Jo,j)),onDragOver:ce(Sn(es,z)),onDragLeave:ce(Sn(rl,G)),onDrop:ce(Sn(nf,te)),role:typeof Qe=="string"&&Qe!==""?Qe:"presentation"},_e,k),!r&&!S?{tabIndex:0}:{}),rf)}},[k,Se,Xe,Ue,at,j,z,G,te,S,E,r]),Ae=b.useCallback(function(Q){Q.stopPropagation()},[]),mt=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,Qe=Q.onChange,It=Q.onClick,Ft=Ea(Q,tD),Rt=ed({accept:C,multiple:a,type:"file",style:{display:"none"},onChange:de(Sn(Qe,te)),onClick:de(Sn(It,Ae)),tabIndex:-1},_e,_);return et(et({},Rt),Ft)}},[_,n,a,te,r]);return et(et({},H),{},{isFocused:A&&!r,getRootProps:pt,getInputProps:mt,rootRef:k,inputRef:_,open:de(B)})}function uD(e,t){switch(t.type){case"focus":return et(et({},e),{},{isFocused:!0});case"blur":return et(et({},e),{},{isFocused:!1});case"openDialog":return et(et({},nd),{},{isFileDialogActive:!0});case"closeDialog":return et(et({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return et(et({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return et(et({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return et({},nd);default:return e}}function Tb(){}const dD={isImage:e=>e.type.includes("image")},fD=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(dD.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:zv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:zv(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(Jr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(ho,{})})]}):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(DP,{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(Jr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(ho,{className:"text-danger"})})]})},hD=e=>x.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>x.jsx(fD,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),pD=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(hD,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(b.Fragment,{children:e.idle}),mD=x.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[x.jsx(jP,{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"})]})]}),gD=({idle:e=mD,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=b.useState([]),i=d=>{n==null||n(d),s(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=Sb({onDrop:i});return x.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex text-foreground flex-col items-center justify-center border-2 rounded-lg p-6 border-card-border data-[active=true]:bg-card-background data-[active=true]:border-solid data-[active=false]:border-dashed",children:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(pD,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},yD=["INPUT","SELECT"],rd=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{yD.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},vD=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})},bD=({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:He("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]}),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:h,error:f,...p},m)=>{const v=zt(),g=b.useRef(null),w=p.id??p.name;b.useImperativeHandle(m,()=>g.current),b.useEffect(()=>{if(g.current===null)return;const T=g.current,S=bi(g.current),E=()=>T.setAttribute("data-selected","true");return T.addEventListener("change",E),()=>{S(),T.removeEventListener("change",E)}},[]);const y=()=>{var T;return(T=g.current)==null?void 0:T.focus()};return x.jsx(ba,{container:c,error:f,feedback:o,hideLeft:u,left:h,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",{onClick:y,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(fg,{size:20}),x.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})}),children:x.jsxs("select",{...p,id:w,name:w,value:p.value,required:e,ref:Al(m,g),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:He("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",p.className),children:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(T=>x.jsx("option",{...T,children:T.label??T.value},`${w}-select-option-${T.value}`))]})})}),od=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t},wD=b.forwardRef(({children:e,container:t,error:n,...r},o)=>{const s=b.useId(),[i,a]=b.useState(r.checked??!1),l=i,c=b.useRef(null),u=od(r.onChange);b.useImperativeHandle(o,()=>c.current),b.useEffect(()=>{if(c.current!==null&&u.current){const h=f=>{f.target.checked=!f.target.checked,u.current&&u.current(f)};return c.current.addEventListener("change",h),()=>{var f;return(f=c.current)==null?void 0:f.removeEventListener("change",h)}}},[]);const d=()=>{var f,p;const h=!((f=c.current)!=null&&f.checked);a(h),(p=r==null?void 0:r.onCheck)==null||p.call(r,h),c.current!==null&&(c.current.checked=h,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:He("flex flex-wrap items-center",t),children:[x.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||s,onChange:h=>a(h.target.checked),ref:c,type:"checkbox"}),x.jsx("button",{type:"button",role:"switch",onClick:d,"aria-checked":l,"data-checked":l,"aria-labelledby":`${s}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:x.jsx("span",{"aria-hidden":"true","data-checked":l,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),x.jsx("label",{htmlFor:r.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})}),x.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),xD=e=>{const[t,n]=vP();return b.useEffect(()=>{const r=t.current;if(!r)return;const o=s=>{const i=s.target,a=Array.from(r.querySelectorAll("input")),l=a.every(u=>u.checked&&u.getAttribute("data-task")==="true"),c=a.indexOf(i);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,10,-10,0]},{duration:.5,delay:TP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,ref:t})},Ca=0,ur=1,Bo=2,Eb=4;function zs(e,t){return n=>e(t(n))}function SD(e,t){return t(e)}function Cb(e,t){return n=>e(t,n)}function Pb(e,t){return()=>e(t)}function Pa(e,t){return t(e),e}function Ke(...e){return e}function TD(e){e()}function kb(e){return()=>e}function ED(...e){return()=>{e.map(TD)}}function sd(e){return e!==void 0}function Nr(){}function Re(e,t){return e(ur,t)}function be(e,t){e(Ca,t)}function id(e){e(Bo)}function Dt(e){return e(Eb)}function ue(e,t){return Re(e,Cb(t,Ca))}function Tn(e,t){const n=e(ur,r=>{n(),t(r)});return n}function Pe(){const e=[];return(t,n)=>{switch(t){case Bo:e.splice(0,e.length);return;case ur:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case Ca:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function X(e){let t=e;const n=Pe();return(r,o)=>{switch(r){case ur:o(t);break;case Ca:t=o;break;case Eb:return t}return n(r,o)}}function CD(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case ur:return s?n===s?void 0:(r(),n=s,t=Re(e,s),t):(r(),Nr);case Bo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Kt(e){return Pa(Pe(),t=>ue(e,t))}function Nt(e,t){return Pa(X(t),n=>ue(e,n))}function PD(...e){return t=>e.reduceRight(SD,t)}function q(e,...t){const n=PD(...t);return(r,o)=>{switch(r){case ur:return Re(e,n(o));case Bo:id(e);return}}}function Ib(e,t){return e===t}function Ze(e=Ib){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=>zs(t,e)}function En(e){return t=>()=>t(e)}function Cn(e,t){return n=>r=>n(t=e(t,r))}function Wo(e){return t=>n=>{e>0?e--:t(n)}}function dr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Ob(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);Re(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 Ab(...e){return function(t,n){switch(t){case ur:return ED(...e.map(r=>Re(r,n)));case Bo:return;default:throw new Error(`unrecognized action ${t}`)}}}function ge(e,t=Ib){return q(e,Ze(t))}function St(...e){const t=Pe(),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);Re(s,l=>{n[i]=l,r=r|a,r===o&&be(t,n)})}),function(s,i){switch(s){case ur:return r===o&&i(n),Re(t,i);case Bo:return id(t);default:throw new Error(`unrecognized action ${s}`)}}}function Fe(e,t=[],{singleton:n}={singleton:!0}){return{id:kD(),constructor:e,dependencies:t,singleton:n}}const kD=()=>Symbol();function ID(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 OD(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 ka=typeof document<"u"?b.useLayoutEffect:b.useEffect;function ad(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(g,w){g.propsReady&&be(g.propsReady,!1);for(const y of r){const T=g[t.required[y]];be(T,w[y])}for(const y of o)if(y in w){const T=g[t.optional[y]];be(T,w[y])}g.propsReady&&be(g.propsReady,!0)}function c(g){return s.reduce((w,y)=>(w[y]=T=>{const S=g[t.methods[y]];be(S,T)},w),{})}function u(g){return i.reduce((w,y)=>(w[y]=CD(g[t.events[y]]),w),{})}const d=b.forwardRef((g,w)=>{const{children:y,...T}=g,[S]=b.useState(()=>Pa(ID(e),I=>l(I,T))),[E]=b.useState(Pb(u,S));return ka(()=>{for(const I of i)I in T&&Re(E[I],T[I]);return()=>{Object.values(E).map(id)}},[T,E,S]),ka(()=>{l(S,T)}),b.useImperativeHandle(w,kb(c(S))),b.createElement(a.Provider,{value:S},n?b.createElement(n,OD([...r,...o,...i],T),y):y)}),h=g=>b.useCallback(Cb(be,b.useContext(a)[g]),[g]),f=g=>{const y=b.useContext(a)[g],T=b.useCallback(S=>Re(y,S),[y]);return b.useSyncExternalStore(T,()=>Dt(y),()=>Dt(y))},p=g=>{const y=b.useContext(a)[g],[T,S]=b.useState(Pb(Dt,y));return ka(()=>Re(y,E=>{E!==T&&S(kb(E))}),[y,T]),T},m=b.version.startsWith("18")?f:p;return{Component:d,usePublisher:h,useEmitterValue:m,useEmitter:(g,w)=>{const T=b.useContext(a)[g];ka(()=>Re(T,w),[w,T])}}}const AD=typeof document<"u"?b.useLayoutEffect:b.useEffect;var Zt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Zt||{});const _D={0:"debug",1:"log",2:"warn",3:"error"},MD=()=>typeof globalThis>"u"?window:globalThis,fr=Fe(()=>{const e=X(3);return{log:X((n,r,o=1)=>{var s;const i=(s=MD().VIRTUOSO_LOG_LEVEL)!=null?s:Dt(e);o>=i&&console[_D[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function ld(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 Pn(e,t=!0){return ld(e,t).callbackRef}function _b(e,t,n,r,o,s,i){const a=b.useCallback(l=>{const c=DD(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",h=i?i.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,f=i?i.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(h,0),scrollHeight:f,viewportHeight:p}),s==null||s(ND("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return ld(a,n)}function DD(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},Zt.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 ND(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Zt.WARN),t==="normal"?0:parseInt(t??"0",10)}function on(e,t){return Math.round(e.getBoundingClientRect()[t])}function Mb(e,t){return Math.abs(e-t)<1.01}function Db(e,t,n,r=Nr,o){const s=b.useRef(null),i=b.useRef(null),a=b.useRef(null),l=b.useCallback(d=>{const h=d.target,f=h===window||h===document,p=f?window.pageYOffset||document.documentElement.scrollTop:h.scrollTop,m=f?document.documentElement.scrollHeight:h.scrollHeight,v=f?window.innerHeight:h.offsetHeight,g=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:v})};d.suppressFlushSync?g():lf.flushSync(g),i.current!==null&&(p===i.current||p<=0||p===m-v)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);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 h=s.current;if(!h||"offsetHeight"in h&&h.offsetHeight===0)return;const f=d.behavior==="smooth";let p,m,v;h===window?(m=Math.max(on(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,v=document.documentElement.scrollTop):(m=h.scrollHeight,p=on(h,"height"),v=h.scrollTop);const g=m-p;if(d.top=Math.ceil(Math.max(Math.min(g,d.top),0)),Mb(p,m)||d.top===v){e({scrollTop:v,scrollHeight:m,viewportHeight:p}),f&&t(!0);return}f?(i.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,h.scrollTo(d)}function u(d){s.current.scrollBy(d)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const Vt=Fe(()=>{const e=Pe(),t=Pe(),n=X(0),r=Pe(),o=X(0),s=Pe(),i=Pe(),a=X(0),l=X(0),c=X(0),u=X(0),d=Pe(),h=Pe(),f=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:h,statefulScrollTop:o,deviation:n,scrollingInProgress:f}},[],{singleton:!0}),Hs={lvl:0};function Nb(e,t,n,r=Hs,o=Hs){return{k:e,v:t,lvl:n,l:r,r:o}}function ze(e){return e===Hs}function zo(){return Hs}function cd(e,t){if(ze(e))return Hs;const{k:n,l:r,r:o}=e;if(t===n){if(ze(r))return o;if(ze(o))return r;{const[s,i]=Fb(r);return Ia(vt(e,{k:s,v:i,l:Lb(r)}))}}else return t<n?Ia(vt(e,{l:cd(r,t)})):Ia(vt(e,{r:cd(o,t)}))}function Us(e,t){if(!ze(e))return t===e.k?e.v:t<e.k?Us(e.l,t):Us(e.r,t)}function sn(e,t,n="k"){if(ze(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=sn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return sn(e.l,t,n)}function Xt(e,t,n){return ze(e)?Nb(t,n,1):t===e.k?vt(e,{k:t,v:n}):t<e.k?Vb(vt(e,{l:Xt(e.l,t,n)})):Vb(vt(e,{r:Xt(e.r,t,n)}))}function ud(e,t,n){if(ze(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(ud(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(ud(i,t,n))),a}function Fr(e){return ze(e)?[]:[...Fr(e.l),{k:e.k,v:e.v},...Fr(e.r)]}function Fb(e){return ze(e.r)?[e.k,e.v]:Fb(e.r)}function Lb(e){return ze(e.r)?e.l:Ia(vt(e,{r:Lb(e.r)}))}function vt(e,t){return Nb(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 dd(e){return ze(e)||e.lvl>e.r.lvl}function Vb(e){return fd(Rb(e))}function Ia(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(dd(t))return Rb(vt(e,{lvl:r-1}));if(!ze(t)&&!ze(t.r))return vt(t.r,{l:vt(t,{r:t.r.l}),r:vt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(dd(e))return fd(vt(e,{lvl:r-1}));if(!ze(n)&&!ze(n.l)){const o=n.l,s=dd(o)?n.lvl-1:n.lvl;return vt(o,{l:vt(e,{r:o.l,lvl:r-1}),r:fd(vt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Oa(e,t,n){if(ze(e))return[];const r=sn(e,t)[0];return FD(ud(e,r,n))}function $b(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 FD(e){return $b(e,({k:t,v:n})=>({index:t,value:n}))}function fd(e){const{r:t,lvl:n}=e;return!ze(t)&&!ze(t.r)&&t.lvl===n&&t.r.lvl===n?vt(t,{l:vt(e,{r:t.l}),lvl:n+1}):e}function Rb(e){const{l:t}=e;return!ze(t)&&t.lvl===e.lvl?vt(t,{r:vt(e,{l:t.r})}):e}function Aa(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 jb(e,t,n){return e[Aa(e,t,n)]}function LD(e,t,n,r){const o=Aa(e,t,r),s=Aa(e,n,r,o);return e.slice(o,s+1)}const hd=Fe(()=>({recalcInProgress:X(!1)}),[],{singleton:!0});function VD(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 Bb(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 $D(e,t){let n=ze(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),ze(e)){e=Xt(e,0,o);continue}const a=Oa(e,s-1,i+1);if(a.some(VD(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:h}of a)l?(i>=u||o===h)&&(e=cd(e,u)):(c=h!==o,l=!0),d>i&&i>=u&&h!==o&&(e=Xt(e,i+1,h));c&&(e=Xt(e,s,o))}return[e,n]}function RD(){return{offsetTree:[],sizeTree:zo(),groupOffsetTree:zo(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function pd({index:e},t){return t===e?0:t<e?-1:1}function jD({offset:e},t){return t===e?0:t<e?-1:1}function BD(e){return{index:e.index,value:e}}function WD(e,t,n,r=0){return r>0&&(t=Math.max(t,jb(e,r,pd).offset)),$b(LD(e,t,n,jD),BD)}function md(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=Aa(o,t-1,pd),a=o[l].offset;const u=sn(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===sn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Oa(n,t,1/0)){const d=c-s,h=d*i+a+d*r;o.push({offset:h,size:u,index:c}),s=c,a=h,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function zD(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Zt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&ze(s)&&t.length===2){const h=t[0].size,f=t[1].size;i=n.reduce((p,m)=>Xt(Xt(p,m,h),m+1,f),i)}else[i,a]=$D(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=md(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((h,f)=>Xt(h,f,Gs(f,l,o)),zo()),groupIndices:n}}function Gs(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=jb(t,e,pd),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function HD(e){return typeof e.groupIndex<"u"}function Wb(e,t,n){if(HD(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=zb(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function zb(e,t){if(!_a(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function _a(e){return!ze(e.groupOffsetTree)}function UD(e){return Fr(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 GD={offsetHeight:"height",offsetWidth:"width"},kn=Fe(([{log:e},{recalcInProgress:t}])=>{const n=Pe(),r=Pe(),o=Nt(r,0),s=Pe(),i=Pe(),a=X(0),l=X([]),c=X(void 0),u=X(void 0),d=X((S,E)=>on(S,GD[E])),h=X(void 0),f=X(0),p=RD(),m=Nt(q(n,we(l,e,f),Cn(zD,p),Ze()),p),v=Nt(q(l,Ze(),Cn((S,E)=>({prev:S.current,current:E}),{prev:[],current:[]}),ie(({prev:S})=>S)),[]);ue(q(l,pe(S=>S.length>0),we(m,f),ie(([S,E,I])=>{const P=S.reduce((O,C,L)=>Xt(O,C,Gs(C,E.offsetTree,I)||L),zo());return{...E,groupIndices:S,groupOffsetTree:P}})),m),ue(q(r,we(m),pe(([S,{lastIndex:E}])=>S<E),ie(([S,{lastIndex:E,lastSize:I}])=>[{startIndex:S,endIndex:E,size:I}])),n),ue(c,u);const g=Nt(q(c,ie(S=>S===void 0)),!0);ue(q(u,pe(S=>S!==void 0&&ze(Dt(m).sizeTree)),ie(S=>[{startIndex:0,endIndex:0,size:S}])),n);const w=Kt(q(n,we(m),Cn(({sizes:S},[E,I])=>({changed:I!==S,sizes:I}),{changed:!1,sizes:p}),ie(S=>S.changed)));Re(q(a,Cn((S,E)=>({diff:S.prev-E,prev:E}),{diff:0,prev:0}),ie(S=>S.diff)),S=>{const{groupIndices:E}=Dt(m);if(S>0)be(t,!0),be(s,S+Bb(S,E));else if(S<0){const I=Dt(v);I.length>0&&(S-=Bb(-S,I)),be(i,S)}}),Re(q(a,we(e)),([S,E])=>{S<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},Zt.ERROR)});const y=Kt(s);ue(q(s,we(m),ie(([S,E])=>{const I=E.groupIndices.length>0,P=[],O=E.lastSize;if(I){const C=Us(E.sizeTree,0);let L=0,D=0;for(;L<S;){const _=E.groupIndices[D],N=E.groupIndices.length===D+1?1/0:E.groupIndices[D+1]-_-1;P.push({startIndex:_,endIndex:_,size:C}),P.push({startIndex:_+1,endIndex:_+1+N-1,size:O}),D++,L+=N+1}const V=Fr(E.sizeTree);return L!==S&&V.shift(),V.reduce((_,{k:N,v:$})=>{let H=_.ranges;return _.prevSize!==0&&(H=[..._.ranges,{startIndex:_.prevIndex,endIndex:N+S-1,size:_.prevSize}]),{ranges:H,prevIndex:N+S,prevSize:$}},{ranges:P,prevIndex:S,prevSize:0}).ranges}return Fr(E.sizeTree).reduce((C,{k:L,v:D})=>({ranges:[...C.ranges,{startIndex:C.prevIndex,endIndex:L+S-1,size:C.prevSize}],prevIndex:L+S,prevSize:D}),{ranges:[],prevIndex:0,prevSize:O}).ranges})),n);const T=Kt(q(i,we(m,f),ie(([S,{offsetTree:E},I])=>{const P=-S;return Gs(P,E,I)})));return ue(q(i,we(m,f),ie(([S,E,I])=>{if(E.groupIndices.length>0){if(ze(E.sizeTree))return E;let O=zo();const C=Dt(v);let L=0,D=0,V=0;for(;L<-S;){V=C[D];const _=C[D+1]-V-1;D++,L+=_+1}if(O=Fr(E.sizeTree).reduce((_,{k:N,v:$})=>Xt(_,Math.max(0,N+S),$),O),L!==-S){const _=Us(E.sizeTree,V);O=Xt(O,0,_);const N=sn(E.sizeTree,-S+1)[1];O=Xt(O,1,N)}return{...E,sizeTree:O,...md(E.offsetTree,0,O,I)}}else{const O=Fr(E.sizeTree).reduce((C,{k:L,v:D})=>Xt(C,Math.max(0,L+S),D),zo());return{...E,sizeTree:O,...md(E.offsetTree,0,O,I)}}})),m),{data:h,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:T,beforeUnshiftWith:y,firstItemIndex:a,gap:f,sizes:m,listRefresh:w,statefulTotalCount:o,trackItemSizes:g,itemSize:d}},Ke(fr,hd),{singleton:!0}),YD=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Hb(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!YD)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ys=Fe(([{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:h}])=>{const f=Pe(),p=Pe(),m=X(0);let v=null,g=null,w=null;function y(){v&&(v(),v=null),w&&(w(),w=null),g&&(clearTimeout(g),g=null),be(o,!1)}return ue(q(f,we(e,s,t,m,l,c,h),we(r,u,d),ie(([[T,S,E,I,P,O,C,L],D,V,k])=>{const _=Hb(T),{align:N,behavior:$,offset:H}=_,U=I-1,A=Wb(_,S,U);let R=Gs(A,S.offsetTree,D)+O;N==="end"?(R+=V+sn(S.sizeTree,A)[1]-E+k,A===U&&(R+=C)):N==="center"?R+=(V+sn(S.sizeTree,A)[1]-E+k)/2:R-=P,H&&(R+=H);const Z=re=>{y(),re?(L("retrying to scroll to",{location:T},Zt.DEBUG),be(f,T)):(be(p,!0),L("list did not change, scroll successful",{},Zt.DEBUG))};if(y(),$==="smooth"){let re=!1;w=Re(n,ee=>{re=re||ee}),v=Tn(a,()=>{Z(re)})}else v=Tn(q(n,qD(150)),Z);return g=setTimeout(()=>{y()},1200),be(o,!0),L("scrolling from index to",{index:A,top:R,behavior:$},Zt.DEBUG),{top:R,behavior:$}})),i),{scrollToIndex:f,scrollTargetReached:p,topListHeight:m}},Ke(kn,Vt,fr),{singleton:!0});function qD(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const qs="up",Ks="down",KD="none",ZD={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},XD=0,Zs=Fe(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=X(!1),a=X(!0),l=Pe(),c=Pe(),u=X(4),d=X(XD),h=Nt(q(Ab(q(ge(t),Wo(1),En(!0)),q(ge(t),Wo(1),En(!1),Ob(100))),Ze()),!1),f=Nt(q(Ab(q(s,En(!0)),q(s,En(!1),Ob(200))),Ze()),!1);ue(q(St(ge(t),ge(d)),ie(([w,y])=>w<=y),Ze()),a),ue(q(a,dr(50)),c);const p=Kt(q(St(e,ge(n),ge(r),ge(o),ge(u)),Cn((w,[{scrollTop:y,scrollHeight:T},S,E,I,P])=>{const O=y+S-T>-P,C={viewportHeight:S,scrollTop:y,scrollHeight:T};if(O){let D,V;return y>w.state.scrollTop?(D="SCROLLED_DOWN",V=w.state.scrollTop-y):(D="SIZE_DECREASED",V=w.state.scrollTop-y||w.scrollTopDelta),{atBottom:!0,state:C,atBottomBecause:D,scrollTopDelta:V}}let L;return C.scrollHeight>w.state.scrollHeight?L="SIZE_INCREASED":S<w.state.viewportHeight?L="VIEWPORT_HEIGHT_DECREASING":y<w.state.scrollTop?L="SCROLLING_UPWARDS":L="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:L,state:C}},ZD),Ze((w,y)=>w&&w.atBottom===y.atBottom))),m=Nt(q(e,Cn((w,{scrollTop:y,scrollHeight:T,viewportHeight:S})=>{if(Mb(w.scrollHeight,T))return{scrollTop:y,scrollHeight:T,jump:0,changed:!1};{const E=T-(y+S)<1;return w.scrollTop!==y&&E?{scrollHeight:T,scrollTop:y,jump:w.scrollTop-y,changed:!0}:{scrollHeight:T,scrollTop:y,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,dr(50)),l);const v=X(Ks);ue(q(e,ie(({scrollTop:w})=>w),Ze(),Cn((w,y)=>Dt(f)?{direction:w.direction,prevScrollTop:y}:{direction:y<w.prevScrollTop?qs:Ks,prevScrollTop:y},{direction:Ks,prevScrollTop:0}),ie(w=>w.direction)),v),ue(q(e,dr(50),En(KD)),v);const g=X(0);return ue(q(h,pe(w=>!w),En(0)),g),ue(q(t,dr(100),we(h),pe(([w,y])=>!!y),Cn(([w,y],[T])=>[y,T],[0,0]),ie(([w,y])=>y-w)),g),{isScrolling:h,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:v,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:g,lastJumpDueToItemResize:m}},Ke(Vt)),hr=Fe(([{log:e}])=>{const t=X(!1),n=Kt(q(t,pe(r=>r),Ze()));return Re(t,r=>{r&&Dt(e)("props updated",{},Zt.DEBUG)}),{propsReady:t,didMount:n}},Ke(fr),{singleton:!0});function gd(e,t){e==0?t():requestAnimationFrame(()=>gd(e-1,t))}function yd(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Xs=Fe(([{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),En(!1)),a),ue(q(i,we(l),pe(([u,d])=>!!d),En(!1)),c),Re(q(St(t,i),we(a,e,n,c),pe(([[,u],d,{sizeTree:h},f,p])=>u&&(!ze(h)||sd(f))&&!d&&!p),we(l)),([,u])=>{Tn(s,()=>{be(c,!0)}),gd(4,()=>{Tn(r,()=>{be(a,!0)}),be(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Ke(kn,Vt,Ys,hr),{singleton:!0});function Ub(e){return e?e==="smooth"?"smooth":"auto":!1}const QD=(e,t)=>typeof e=="function"?Ub(e(t)):t&&Ub(e),JD=Fe(([{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=Pe();let h=null;function f(m){be(o,{index:"LAST",align:"end",behavior:m})}Re(q(St(q(ge(e),Wo(1)),a),we(ge(u),n,s,c),ie(([[m,v],g,w,y,T])=>{let S=v&&y,E="auto";return S&&(E=QD(g,w||T),S=S&&!!E),{totalCount:m,shouldFollow:S,followOutputBehavior:E}}),pe(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:v})=>{h&&(h(),h=null),h=Tn(t,()=>{Dt(l)("following output to ",{totalCount:m},Zt.DEBUG),f(v),h=null})});function p(m){const v=Tn(r,g=>{m&&!g.atBottom&&g.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(Dt(l)("scrolling to bottom due to increased size",{},Zt.DEBUG),f("auto"))});setTimeout(v,100)}return Re(q(St(ge(u),e,i),pe(([m,,v])=>m&&v),Cn(({value:m},[,v])=>({refreshed:m===v,value:v}),{refreshed:!1,value:0}),pe(({refreshed:m})=>m),we(u,e)),([,m])=>{Dt(s)&&p(m!==!1)}),Re(d,()=>{p(Dt(u)!==!1)}),Re(St(ge(u),r),([m,v])=>{m&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{followOutput:u,autoscrollToBottom:d}},Ke(kn,Zs,Ys,Xs,hr,fr,Vt));function eN(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Gb=Fe(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Pe(),i=Pe(),a=Kt(q(s,ie(eN)));return ue(q(a,ie(l=>l.totalCount)),e),ue(q(a,ie(l=>l.groupIndices)),t),ue(q(St(r,n,o),pe(([l,c])=>_a(c)),ie(([l,c,u])=>sn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Ze(),ie(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Ke(kn,Vt));function Qs(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Yb(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Ma="top",Da="bottom",qb="none";function Kb(e,t,n){return typeof e=="number"?n===qs&&t===Ma||n===Ks&&t===Da?e:0:n===qs?t===Ma?e.main:e.reverse:t===Da?e.main:e.reverse}function Zb(e,t){return typeof e=="number"?e:e[t]||0}const vd=Fe(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Pe(),i=X(0),a=X(0),l=X(0),c=Nt(q(St(ge(e),ge(t),ge(r),ge(s,Qs),ge(l),ge(i),ge(o),ge(n),ge(a)),ie(([u,d,h,[f,p],m,v,g,w,y])=>{const T=u-w,S=v+g,E=Math.max(h-T,0);let I=qb;const P=Zb(y,Ma),O=Zb(y,Da);return f-=w,f+=h+g,p+=h+g,p-=w,f>u+S-P&&(I=qs),p<u-E+d+O&&(I=Ks),I!==qb?[Math.max(T-h-Kb(m,Ma,I)-P,0),T-E-g+d+Kb(m,Da,I)+O]:null}),pe(u=>u!=null),Ze(Qs)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Ke(Vt),{singleton:!0});function tN(e,t,n){if(_a(t)){const r=zb(e,t);return[{index:sn(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 bd={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Xb(e,t,n){if(e.length===0)return[];if(!_a(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=Oa(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 Na(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,h=a+d*i+(d-1)*r,f=c,p=h-u;return{items:Xb(e,o,s),topItems:Xb(t,o,s),topListHeight:t.reduce((m,v)=>v.size+m,0),offsetTop:c,offsetBottom:p,top:f,bottom:u,totalCount:n,firstItemIndex:s}}function Qb(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=yd(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:s[d+l]}));return Na(c,[],a,o,n,r)}const Lr=Fe(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},h,{didMount:f},{recalcInProgress:p}])=>{const m=X([]),v=X(0),g=Pe();ue(s.topItemsIndexes,m);const w=Nt(q(St(f,p,ge(i,Qs),ge(t),ge(e),ge(u),c,ge(m),ge(r),ge(o),n),pe(([E,I,,P,,,,,,,O])=>{const C=O&&O.length!==P;return E&&!I&&!C}),ie(([,,[E,I],P,O,C,L,D,V,k,_])=>{const N=O,{sizeTree:$,offsetTree:H}=N,U=Dt(v);if(P===0)return{...bd,totalCount:P};if(E===0&&I===0)return U===0?{...bd,totalCount:P}:Qb(U,C,O,V,k,_||[]);if(ze($))return U>0?null:Na(tN(yd(C,P),N,_),[],P,k,N,V);const A=[];if(D.length>0){const Y=D[0],F=D[D.length-1];let j=0;for(const z of Oa($,Y,F)){const G=z.value,W=Math.max(z.start,Y),te=Math.min(z.end,F);for(let B=W;B<=te;B++)A.push({index:B,size:G,offset:j,data:_&&_[B]}),j+=G}}if(!L)return Na([],A,P,k,N,V);const R=D.length>0?D[D.length-1]+1:0,Z=WD(H,E,I,R);if(Z.length===0)return null;const re=P-1,ee=Pa([],Y=>{for(const F of Z){const j=F.value;let z=j.offset,G=F.start;const W=j.size;if(j.offset<E){G+=Math.floor((E-j.offset+k)/(W+k));const B=G-F.start;z+=B*W+B*k}G<R&&(z+=(R-G)*W,G=R);const te=Math.min(F.end,re);for(let B=G;B<=te&&!(z>=I);B++)Y.push({index:B,size:W,offset:z,data:_&&_[B]}),z+=W+k}});return Na(ee,A,P,k,N,V)}),pe(E=>E!==null),Ze()),bd);ue(q(n,pe(sd),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)),g);const y=Kt(q(w,pe(({items:E})=>E.length>0),we(t,n),pe(([{items:E},I])=>E[E.length-1].originalIndex===I-1),ie(([,E,I])=>[E-1,I]),Ze(Qs),ie(([E])=>E))),T=Kt(q(w,dr(200),pe(({items:E,topItems:I})=>E.length>0&&E[0].originalIndex===I.length),ie(({items:E})=>E[0].index),Ze())),S=Kt(q(w,pe(({items:E})=>E.length>0),ie(({items:E})=>{let I=0,P=E.length-1;for(;E[I].type==="group"&&I<P;)I++;for(;E[P].type==="group"&&P>I;)P--;return{startIndex:E[I].index,endIndex:E[P].index}}),Ze(Yb)));return{listState:w,topItemsIndexes:m,endReached:y,startReached:T,rangeChanged:S,itemsRendered:g,initialItemCount:v,...h}},Ke(kn,Gb,vd,Xs,Ys,Zs,hr,hd),{singleton:!0}),nN=Fe(([{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,h,f=[]])=>Qb(l,c,u,d,h,f))),i),{}),Ke(kn,Xs,Lr,hr),{singleton:!0}),Jb=Fe(([{scrollVelocity:e}])=>{const t=X(!1),n=Pe(),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}),Ze()),t),Re(q(St(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}},Ke(Zs),{singleton:!0}),rN=Fe(([{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}},Ke(Lr)),e0=Fe(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Pe(),i=Nt(q(St(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}},Ke(Vt,Lr),{singleton:!0});function t0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const oN=t0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),sN=Fe(([{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:h},{log:f},{recalcInProgress:p}])=>{const m=Kt(q(l,we(a),Cn(([,g,w,y],[{items:T,totalCount:S,bottom:E,offsetBottom:I},P])=>{const O=E+I;let C=0;return w===S&&g.length>0&&T.length>0&&(T[0].originalIndex===0&&g[0].originalIndex===0||(C=O-y,C!==0&&(C+=P))),[C,T,S,O]},[0,[],0,0]),pe(([g])=>g!==0),we(t,i,r,s,f,p),pe(([,g,w,y,,,T])=>!T&&!y&&g!==0&&w===qs),ie(([[g],,,,,w])=>(w("Upward scrolling compensation",{amount:g},Zt.DEBUG),g))));function v(g){g>0?(be(e,{top:-g,behavior:"auto"}),be(n,0)):(be(n,0),be(e,{top:-g,behavior:"auto"}))}return Re(q(m,we(n,o)),([g,w,y])=>{y&&oN()?be(n,w-g):v(-g)}),Re(q(St(Nt(o,!1),n,p),pe(([g,w,y])=>!g&&!y&&w!==0),ie(([g,w])=>w),dr(1)),v),ue(q(u,ie(g=>({top:-g}))),e),Re(q(c,we(d,h),ie(([g,{lastSize:w,groupIndices:y,sizeTree:T},S])=>{function E(I){return I*(w+S)}if(y.length===0)return E(g);{let I=0;const P=Us(T,0);let O=0,C=0;for(;O<g;){O++,I+=P;let L=y.length===C+1?1/0:y[C+1]-y[C]-1;O+L>g&&(I-=P,L=g-O+1),O+=L,I+=E(L),C++}return I}})),g=>{be(n,g),requestAnimationFrame(()=>{be(e,{top:g}),requestAnimationFrame(()=>{be(n,0),be(p,!1)})})}),{deviation:n}},Ke(Vt,Zs,Lr,kn,fr,hd)),iN=Fe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=X(0);return Re(q(e,we(r),pe(([,o])=>o!==0),ie(([,o])=>({top:o}))),o=>{Tn(q(n,Wo(1),pe(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{be(t,o)})})}),{initialScrollTop:r}},Ke(hr,Vt,Lr),{singleton:!0}),aN=Fe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=X(!1),r=Nt(q(St(n,e,t),pe(([o])=>o),ie(([,o,s])=>Math.max(0,o-s)),dr(0),Ze()),0);return{alignToBottom:n,paddingTopAddition:r}},Ke(Vt,e0),{singleton:!0}),wd=Fe(([{scrollTo:e,scrollContainerState:t}])=>{const n=Pe(),r=Pe(),o=Pe(),s=X(!1),i=X(void 0);return ue(q(St(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}},Ke(Vt)),lN=({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,cN=Fe(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Pe();return ue(q(u,we(e,o,t,s,i,a,r),we(n),ie(([[d,h,f,p,m,v,g,w],y])=>{const{done:T,behavior:S,align:E,calculateViewLocation:I=lN,...P}=d,O=Wb(d,h,p-1),C=Gs(O,h.offsetTree,y)+m+v,L=C+sn(h.sizeTree,O)[1],D=w+v,V=w+f-g,k=I({itemTop:C,itemBottom:L,viewportTop:D,viewportBottom:V,locationParams:{behavior:S,align:E,...P}});return k?T&&Tn(q(l,pe(_=>_===!1),Wo(Dt(l)?1:2)),T):T&&T(),k}),pe(d=>d!==null)),c),{scrollIntoView:u}},Ke(kn,Vt,Ys,Lr,fr),{singleton:!0}),uN=Fe(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Pe(),u=X(void 0),d=X(null),h=X(null);return ue(a,d),ue(l,h),Re(q(c,we(e,n,i,d,h,r)),([f,p,m,v,g,w,y])=>{const T=UD(p.sizeTree);v&&g!==null&&w!==null&&(m=g.scrollTop-w.offsetTop),m-=y,f({ranges:T,scrollTop:m})}),ue(q(u,pe(sd),ie(dN)),o),ue(q(s,we(u),pe(([,f])=>f!==void 0),Ze(),ie(([,f])=>f.ranges)),t),{getState:c,restoreStateFrom:u}},Ke(kn,Vt,Xs,hr,wd));function dN(e){return{offset:e.scrollTop,index:0,align:"start"}}const fN=Fe(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Ke(vd,nN,hr,Jb,e0,iN,aN,wd,cN,fr)),n0=Fe(([{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:h,scrolledToInitialItem:f,initialItemFinalLocationReached:p},m,v,g,{listState:w,topItemsIndexes:y,...T},{scrollToIndex:S},E,{topItemCount:I},{groupCounts:P},O])=>(ue(T.rangeChanged,O.scrollSeekRangeChanged),ue(q(O.windowViewportRect,ie(C=>C.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:h,scrolledToInitialItem:f,initialItemFinalLocationReached:p,topItemsIndexes:y,topItemCount:I,groupCounts:P,fixedItemHeight:n,defaultItemHeight:r,gap:u,...g,statefulTotalCount:c,listState:w,scrollToIndex:S,trackItemSizes:o,itemSize:s,groupIndices:l,...T,...O,...m,sizes:d,...v}),Ke(kn,Xs,Vt,uN,JD,Lr,Ys,sN,rN,Gb,fN)),xd="-webkit-sticky",r0="sticky",o0=t0(()=>{if(typeof document>"u")return r0;const e=document.createElement("div");return e.style.position=xd,e.style.position===xd?xd:r0});function Sd(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 h=t.getBoundingClientRect(),f=l.top-h.top;u=h.height-Math.max(0,f),d=f+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}=ld(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 Fa=b.createContext(void 0),s0=b.createContext(void 0);function Td(e){return e}const hN=Fe(([e,t])=>({...e,...t}),Ke(n0,Fe(()=>{const e=X(l=>`Item ${l}`),t=X(null),n=X(l=>`Group ${l}`),r=X({}),o=X(Td),s=X("div"),i=X(Nr),a=(l,c=null)=>Nt(q(r,ie(u=>u[l]),Ze()),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")}}))),pN=({height:e})=>b.createElement("div",{style:{height:e}}),mN={position:o0(),zIndex:1,overflowAnchor:"none"},gN={overflowAnchor:"none"},i0=b.memo(function({showTopList:t=!1}){const n=Ee("listState"),r=en("sizeRanges"),o=Ee("useWindowScroll"),s=Ee("customScrollParent"),i=en("windowScrollContainerState"),a=en("scrollContainerState"),l=s||o?i:a,c=Ee("itemContent"),u=Ee("context"),d=Ee("groupContent"),h=Ee("trackItemSizes"),f=Ee("itemSize"),p=Ee("log"),m=en("gap"),{callbackRef:v}=_b(r,f,h,t?Nr:l,p,m,s),[g,w]=b.useState(0);Pd("deviation",k=>{g!==k&&w(k)});const y=Ee("EmptyPlaceholder"),T=Ee("ScrollSeekPlaceholder")||pN,S=Ee("ListComponent"),E=Ee("ItemComponent"),I=Ee("GroupComponent"),P=Ee("computeItemKey"),O=Ee("isSeeking"),C=Ee("groupIndices").length>0,L=Ee("alignToBottom"),D=Ee("initialItemFinalLocationReached"),V=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:g!==0?g:L?"auto":0,...D?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&y?b.createElement(y,st(y,u)):b.createElement(S,{...st(S,u),ref:v,style:V,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(k=>{const _=k.originalIndex,N=P(_+n.firstItemIndex,k.data,u);return O?b.createElement(T,{...st(T,u),key:N,index:k.index,height:k.size,type:k.type||"item",...k.type==="group"?{}:{groupIndex:k.groupIndex}}):k.type==="group"?b.createElement(I,{...st(I,u),key:N,"data-index":_,"data-known-size":k.size,"data-item-index":k.index,style:mN},d(k.index,u)):b.createElement(E,{...st(E,u),...a0(E,k.data),key:N,"data-index":_,"data-known-size":k.size,"data-item-index":k.index,"data-item-group-index":k.groupIndex,style:gN},C?c(k.index,k.groupIndex,k.data,u):c(k.index,k.data,u))}))}),yN={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Ho=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),vN={width:"100%",position:o0(),top:0,zIndex:1};function st(e,t){if(typeof e!="string")return{context:t}}function a0(e,t){return{item:typeof e=="string"?void 0:t}}const bN=b.memo(function(){const t=Ee("HeaderComponent"),n=en("headerHeight"),r=Ee("headerFooterTag"),o=Pn(b.useMemo(()=>i=>n(on(i,"height")),[n])),s=Ee("context");return t?b.createElement(r,{ref:o},b.createElement(t,st(t,s))):null}),wN=b.memo(function(){const t=Ee("FooterComponent"),n=en("footerHeight"),r=Ee("headerFooterTag"),o=Pn(b.useMemo(()=>i=>n(on(i,"height")),[n])),s=Ee("context");return t?b.createElement(r,{ref:o},b.createElement(t,st(t,s))):null});function Ed({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"),h=n("context"),{scrollerRef:f,scrollByCallback:p,scrollToCallback:m}=Db(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),b.createElement(c,{ref:f,style:{...yN,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...st(c,h)},i)})}function Cd({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"),h=n("deviation"),f=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:v,scrollToCallback:g}=Db(l,u,c,Nr,f);return AD(()=>(m.current=f||window,()=>{m.current=null}),[m,f]),t("windowScrollTo",g),t("scrollBy",v),b.createElement(c,{style:{position:"relative",...s,...d!==0?{height:d+h}:{}},"data-virtuoso-scroller":!0,...a,...st(c,p)},i)})}const xN=({children:e})=>{const t=b.useContext(Fa),n=en("viewportHeight"),r=en("fixedItemHeight"),o=Ee("alignToBottom"),s=Pn(b.useMemo(()=>zs(n,i=>on(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Ho(o),ref:s,"data-viewport-type":"element"},e)},SN=({children:e})=>{const t=b.useContext(Fa),n=en("windowViewportRect"),r=en("fixedItemHeight"),o=Ee("customScrollParent"),s=Sd(n,o),i=Ee("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:Ho(i),"data-viewport-type":"window"},e)},TN=({children:e})=>{const t=Ee("TopItemListComponent")||"div",n=Ee("headerHeight"),r={...vN,marginTop:`${n}px`},o=Ee("context");return b.createElement(t,{style:r,...st(t,o)},e)},EN=b.memo(function(t){const n=Ee("useWindowScroll"),r=Ee("topItemsIndexes").length>0,o=Ee("customScrollParent"),s=o||n?kN:PN,i=o||n?SN:xN;return b.createElement(s,{...t},r&&b.createElement(TN,null,b.createElement(i0,{showTopList:!0})),b.createElement(i,null,b.createElement(bN,null),b.createElement(i0,null),b.createElement(wN,null)))}),{Component:CN,usePublisher:en,useEmitterValue:Ee,useEmitter:Pd}=ad(hN,{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"}},EN),PN=Ed({usePublisher:en,useEmitterValue:Ee,useEmitter:Pd}),kN=Cd({usePublisher:en,useEmitterValue:Ee,useEmitter:Pd}),IN=CN,l0={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},ON={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:c0,ceil:u0,floor:La,min:kd,max:Js}=Math;function AN(e){return{...ON,items:e}}function d0(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 _N(e,t){return e&&e.column===t.column&&e.row===t.row}function Va(e,t){return e&&e.width===t.width&&e.height===t.height}const MN=Fe(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,h,{propsReady:f,didMount:p},{windowViewportRect:m,useWindowScroll:v,customScrollParent:g,windowScrollContainerState:w,windowScrollTo:y},T])=>{const S=X(0),E=X(0),I=X(l0),P=X({height:0,width:0}),O=X({height:0,width:0}),C=Pe(),L=Pe(),D=X(0),V=X(null),k=X({row:0,column:0}),_=Pe(),N=Pe(),$=X(!1),H=X(0),U=X(!0),A=X(!1);Re(q(p,we(H),pe(([F,j])=>!!j)),()=>{be(U,!1),be(E,0)}),Re(q(St(p,U,O,P,H,A),pe(([F,j,z,G,,W])=>F&&!j&&z.height!==0&&G.height!==0&&!W)),([,,,,F])=>{be(A,!0),gd(1,()=>{be(C,F)}),Tn(q(r),()=>{be(n,[0,0]),be(U,!0)})}),ue(q(N,pe(F=>F!=null&&F.scrollTop>0),En(0)),E),Re(q(p,we(N),pe(([,F])=>F!=null)),([,F])=>{F&&(be(P,F.viewport),be(O,F==null?void 0:F.item),be(k,F.gap),F.scrollTop>0&&(be($,!0),Tn(q(r,Wo(1)),j=>{be($,!1)}),be(i,{top:F.scrollTop})))}),ue(q(P,ie(({height:F})=>F)),o),ue(q(St(ge(P,Va),ge(O,Va),ge(k,(F,j)=>F&&F.column===j.column&&F.row===j.row),ge(r)),ie(([F,j,z,G])=>({viewport:F,item:j,gap:z,scrollTop:G}))),_),ue(q(St(ge(S),t,ge(k,_N),ge(O,Va),ge(P,Va),ge(V),ge(E),ge($),ge(U),ge(H)),pe(([,,,,,,,F])=>!F),ie(([F,[j,z],G,W,te,B,Se,,Xe,Ue])=>{const{row:at,column:de}=G,{height:Ce,width:ce}=W,{width:Oe}=te;if(Se===0&&(F===0||Oe===0))return l0;if(ce===0){const Rt=yd(Ue,F),Wr=Rt===0?Math.max(Se-1,0):Rt;return AN(d0(Rt,Wr,B))}const pt=h0(Oe,ce,de);let Ae,mt;Xe?j===0&&z===0&&Se>0?(Ae=0,mt=Se-1):(Ae=pt*La((j+at)/(Ce+at)),mt=pt*u0((z+at)/(Ce+at))-1,mt=kd(F-1,Js(mt,pt-1)),Ae=kd(mt,Js(0,Ae))):(Ae=0,mt=-1);const Q=d0(Ae,mt,B),{top:ae,bottom:_e}=f0(te,G,W,Q),Qe=u0(F/pt),Ft=Qe*Ce+(Qe-1)*at-_e;return{items:Q,offsetTop:ae,offsetBottom:Ft,top:ae,bottom:_e,itemHeight:Ce,itemWidth:ce}})),I),ue(q(V,pe(F=>F!==null),ie(F=>F.length)),S),ue(q(St(P,O,I,k),pe(([F,j,{items:z}])=>z.length>0&&j.height!==0&&F.height!==0),ie(([F,j,{items:z},G])=>{const{top:W,bottom:te}=f0(F,G,j,z);return[W,te]}),Ze(Qs)),n);const R=X(!1);ue(q(r,we(R),ie(([F,j])=>j||F!==0)),R);const Z=Kt(q(ge(I),pe(({items:F})=>F.length>0),we(S,R),pe(([{items:F},j,z])=>z&&F[F.length-1].index===j-1),ie(([,F])=>F-1),Ze())),re=Kt(q(ge(I),pe(({items:F})=>F.length>0&&F[0].index===0),En(0),Ze())),ee=Kt(q(ge(I),we($),pe(([{items:F},j])=>F.length>0&&!j),ie(([{items:F}])=>({startIndex:F[0].index,endIndex:F[F.length-1].index})),Ze(Yb),dr(0)));ue(ee,h.scrollSeekRangeChanged),ue(q(C,we(P,O,S,k),ie(([F,j,z,G,W])=>{const te=Hb(F),{align:B,behavior:Se,offset:Xe}=te;let Ue=te.index;Ue==="LAST"&&(Ue=G-1),Ue=Js(0,Ue,kd(G-1,Ue));let at=Id(j,W,z,Ue);return B==="end"?at=c0(at-j.height+z.height):B==="center"&&(at=c0(at-j.height/2+z.height/2)),Xe&&(at+=Xe),{top:at,behavior:Se}})),i);const Y=Nt(q(I,ie(F=>F.offsetBottom+F.bottom)),0);return ue(q(m,ie(F=>({width:F.visibleWidth,height:F.visibleHeight}))),P),{data:V,totalCount:S,viewportDimensions:P,itemDimensions:O,scrollTop:r,scrollHeight:L,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:C,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:y,useWindowScroll:v,customScrollParent:g,windowScrollContainerState:w,deviation:D,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:k,restoreStateFrom:N,...h,initialTopMostItemIndex:H,gridState:I,totalListHeight:Y,...d,startReached:re,endReached:Z,rangeChanged:ee,stateChanged:_,propsReady:f,stateRestoreInProgress:$,...T}},Ke(vd,Vt,Zs,Jb,hr,wd,fr));function f0(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Id(e,t,n,r[0].index),i=Id(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Id(e,t,n,r){const o=h0(e.width,n.width,t.column),s=La(r/o),i=s*n.height+Js(0,s-1)*t.row;return i>0?i+t.row:i}function h0(e,t,n){return Js(1,La((e+n)/(La(t)+n)))}const DN=Fe(([e,t])=>({...e,...t}),Ke(MN,Fe(()=>{const e=X(c=>`Item ${c}`),t=X({}),n=X(null),r=X("virtuoso-grid-item"),o=X("virtuoso-grid-list"),s=X(Td),i=X("div"),a=X(Nr),l=(c,u=null)=>Nt(q(t,ie(d=>d[c]),Ze()),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")}}))),NN=b.memo(function(){const t=tt("gridState"),n=tt("listClassName"),r=tt("itemClassName"),o=tt("itemContent"),s=tt("computeItemKey"),i=tt("isSeeking"),a=an("scrollHeight"),l=tt("ItemComponent"),c=tt("ListComponent"),u=tt("ScrollSeekPlaceholder"),d=tt("context"),h=an("itemDimensions"),f=an("gap"),p=tt("log"),m=tt("stateRestoreInProgress"),v=Pn(b.useMemo(()=>g=>{const w=g.parentElement.parentElement.scrollHeight;a(w);const y=g.firstChild;if(y){const{width:T,height:S}=y.getBoundingClientRect();h({width:T,height:S})}f({row:m0("row-gap",getComputedStyle(g).rowGap,p),column:m0("column-gap",getComputedStyle(g).columnGap,p)})},[a,h,f,p]));return m?null:b.createElement(c,{ref:v,className:n,...st(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(g=>{const w=s(g.index,g.data,d);return i?b.createElement(u,{key:w,...st(u,d),index:g.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(l,{...st(l,d),className:r,"data-index":g.index,key:w},o(g.index,g.data,d))}))}),FN=b.memo(function(){const t=tt("HeaderComponent"),n=an("headerHeight"),r=tt("headerFooterTag"),o=Pn(b.useMemo(()=>i=>n(on(i,"height")),[n])),s=tt("context");return t?b.createElement(r,{ref:o},b.createElement(t,st(t,s))):null}),LN=b.memo(function(){const t=tt("FooterComponent"),n=an("footerHeight"),r=tt("headerFooterTag"),o=Pn(b.useMemo(()=>i=>n(on(i,"height")),[n])),s=tt("context");return t?b.createElement(r,{ref:o},b.createElement(t,st(t,s))):null}),VN=({children:e})=>{const t=b.useContext(s0),n=an("itemDimensions"),r=an("viewportDimensions"),o=Pn(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:Ho(!1),ref:o},e)},$N=({children:e})=>{const t=b.useContext(s0),n=an("windowViewportRect"),r=an("itemDimensions"),o=tt("customScrollParent"),s=Sd(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:Ho(!1)},e)},RN=b.memo(function({...t}){const n=tt("useWindowScroll"),r=tt("customScrollParent"),o=r||n?BN:jN,s=r||n?$N:VN;return b.createElement(o,{...t},b.createElement(s,null,b.createElement(FN,null),b.createElement(NN,null),b.createElement(LN,null)))}),{Component:bV,usePublisher:an,useEmitterValue:tt,useEmitter:p0}=ad(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"}},RN),jN=Ed({usePublisher:an,useEmitterValue:tt,useEmitter:p0}),BN=Cd({usePublisher:an,useEmitterValue:tt,useEmitter:p0});function m0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Zt.WARN),t==="normal"?0:parseInt(t??"0",10)}const WN=Fe(([e,t])=>({...e,...t}),Ke(n0,Fe(()=>{const e=X(l=>b.createElement("td",null,"Item $",l)),t=X(null),n=X(null),r=X(null),o=X({}),s=X(Td),i=X(Nr),a=(l,c=null)=>Nt(q(o,ie(u=>u[l]),Ze()),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")}}))),zN=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e}})),HN=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e,padding:0,border:0}})),UN={overflowAnchor:"none"},GN=b.memo(function(){const t=je("listState"),n=ln("sizeRanges"),r=je("useWindowScroll"),o=je("customScrollParent"),s=ln("windowScrollContainerState"),i=ln("scrollContainerState"),a=o||r?s:i,l=je("itemContent"),c=je("trackItemSizes"),u=je("itemSize"),d=je("log"),{callbackRef:h,ref:f}=_b(n,u,c,a,d,void 0,o),[p,m]=b.useState(0);Od("deviation",N=>{p!==N&&(f.current.style.marginTop=`${N}px`,m(N))});const v=je("EmptyPlaceholder"),g=je("ScrollSeekPlaceholder")||zN,w=je("FillerRow")||HN,y=je("TableBodyComponent"),T=je("TableRowComponent"),S=je("computeItemKey"),E=je("isSeeking"),I=je("paddingTopAddition"),P=je("firstItemIndex"),O=je("statefulTotalCount"),C=je("context");if(O===0&&v)return b.createElement(v,st(v,C));const L=t.offsetTop+I+p,D=t.offsetBottom,V=L>0?b.createElement(w,{height:L,key:"padding-top",context:C}):null,k=D>0?b.createElement(w,{height:D,key:"padding-bottom",context:C}):null,_=t.items.map(N=>{const $=N.originalIndex,H=S($+P,N.data,C);return E?b.createElement(g,{...st(g,C),key:H,index:N.index,height:N.size,type:N.type||"item"}):b.createElement(T,{...st(T,C),...a0(T,N.data),key:H,"data-index":$,"data-known-size":N.size,"data-item-index":N.index,style:UN},l(N.index,N.data,C))});return b.createElement(y,{ref:h,"data-testid":"virtuoso-item-list",...st(y,C)},[V,..._,k])}),YN=({children:e})=>{const t=b.useContext(Fa),n=ln("viewportHeight"),r=ln("fixedItemHeight"),o=Pn(b.useMemo(()=>zs(n,s=>on(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Ho(!1),ref:o,"data-viewport-type":"element"},e)},qN=({children:e})=>{const t=b.useContext(Fa),n=ln("windowViewportRect"),r=ln("fixedItemHeight"),o=je("customScrollParent"),s=Sd(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:Ho(!1),"data-viewport-type":"window"},e)},KN=b.memo(function(t){const n=je("useWindowScroll"),r=je("customScrollParent"),o=ln("fixedHeaderHeight"),s=ln("fixedFooterHeight"),i=je("fixedHeaderContent"),a=je("fixedFooterContent"),l=je("context"),c=Pn(b.useMemo(()=>zs(o,w=>on(w,"height")),[o])),u=Pn(b.useMemo(()=>zs(s,w=>on(w,"height")),[s])),d=r||n?QN:XN,h=r||n?qN:YN,f=je("TableComponent"),p=je("TableHeadComponent"),m=je("TableFooterComponent"),v=i?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...st(p,l)},i()):null,g=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...st(m,l)},a()):null;return b.createElement(d,{...t},b.createElement(h,null,b.createElement(f,{style:{borderSpacing:0,overflowAnchor:"none"},...st(f,l)},[v,b.createElement(GN,{key:"TableBody"}),g])))}),{Component:ZN,usePublisher:ln,useEmitterValue:je,useEmitter:Od}=ad(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),XN=Ed({usePublisher:ln,useEmitterValue:je,useEmitter:Od}),QN=Cd({usePublisher:ln,useEmitterValue:je,useEmitter:Od}),JN=ZN,eF=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},tF={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"})})},nF=e=>{const t=b.useRef(null),n=eF(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(js,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(IN,{height:n,useWindowScroll:!0,data:e.source,components:tF,itemContent:(r,o)=>x.jsx(b.Fragment,{children:x.jsx(Rv,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(Jr,{children:x.jsx(Vc,{})})}),x.jsx("div",{})]})};var rF=Object.defineProperty,g0=Object.getOwnPropertySymbols,oF=Object.prototype.hasOwnProperty,sF=Object.prototype.propertyIsEnumerable,y0=(e,t,n)=>t in e?rF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iF=(e,t)=>{for(var n in t||(t={}))oF.call(t,n)&&y0(e,n,t[n]);if(g0)for(var n of g0(t))sF.call(t,n)&&y0(e,n,t[n]);return e},Ad=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},aF=(e,t,n,r)=>Ra(Ad,e,t,n,r),Uo=e=>typeof e=="object",pr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Uo(e)&&!Uo(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=>pr(e[r],t[r]))},lF=(e,t)=>(Uo(e)||Array.isArray(e))&&t?e[t]:e,cF=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,$a=e=>/[0-9.]+/.test(e),v0=e=>["string","number"].includes(typeof e),b0=e=>e==null||(e==null?void 0:e.length)===0||e==="",w0={eq:pr,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:b0,notEmpty:e=>!b0(e),in:(e,t)=>Ad(t,n=>pr(e,n)),notIn:(e,t)=>x0(t,n=>!pr(e,n))},uF=e=>{if(e in w0)return w0[e];throw new Error("Linq - Symbol not found")},Go=(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},Ra=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=uF(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},dF=(e,t,n,r)=>Ra(Go,e,t,n,r),x0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},fF=(e,t,n,r)=>Ra(x0,e,t,n,r),S0=e=>{if(e===null)return null;const t=iF({},e);return Object.keys(t).forEach(n=>t[n]=Uo(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},T0=(e,t)=>{if(Uo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(pr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(pr(t,r))return!0}return!1},hF=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},pF=e=>Go(e,(t,n,r)=>Uo(t)?n===r.findIndex(o=>pr(o,t)):n===r.indexOf(t)),mF=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},E0=(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())},gF=(e,t)=>E0(e,n=>n[t]),C0=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const s=t(e[r],r,e);n.push(s)}return n},yF=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},vF=(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 $a(e)&&$a(t)?r.map(i=>Number.parseInt(i)):r},_d=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&$a(e)&&$a(t)){const o=[],[s,i]=yF(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return vF(e,t,r)},bF=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?_d(r,o,1):_d(r,s,Number.parseInt(o,10))}return v0(e)&&v0(t)?_d(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Md=(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},P0=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},wF=(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)},xF=(e,t,n,r)=>Ra(wF,e,t,n,r),k0=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(cF(t))},I0=(e=>(e.Asc="asc",e.Desc="desc",e))(I0||{}),SF=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),TF=(e,t)=>e.sort(SF(t)),EF=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Go(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},CF=class af{constructor(t=[]){this.array=t}static Range(...t){return bF(...t)}static New(t){return new af(t)}Where(t,n,r){return this.array=dF(this.array,t,n,r),this}Some(t,n,r){return aF(this.array,t,n,r)}All(t,n,r){return fF(this.array,t,n,r)}Reverse(){return this.array=P0(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=xF(this.array,t,n,r),this}Distinct(){return this.array=pF(this.array),this}First(t){return t===void 0?this.array[0]:mF(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?Md((n,r)=>n+r,0,this.array):Md((n,r)=>n+lF(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return gF(this.array,t)}GroupWith(t){return E0(this.array,t)}Except(t){return Go(this.array,n=>!T0(t,n))}Intersect(t){return Go(this.array,n=>T0(t,n))}OrderBy(t,n){let r;return r=t?k0(this.array,t):this.array.toSorted(),this.array=n==="desc"?P0(r):r,this}Includes(t){return Ad(this.array,n=>pr(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 Md(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:Go(this.array,t).length}Get(t){return this.array[t]}Clone(){return new af(S0(this.array))}ToObject(t){return hF(this.array,t)}Sort(t){return Array.isArray(t)?TF(this.array,t):k0(this.array,t)}Unique(t){return EF(this.array,t)}},O0=CF,Dd={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(v,g)=>{try{Object.keys(v).forEach(g)}catch(w){window.console.log(w)}},n=v=>v==null,r=v=>{const g=typeof v;return g==="string"||g==="number"||g==="boolean"||n(v)},o=(v,g)=>{const w=g.getItem(v);try{return JSON.parse(w)}catch{return w??null}},s=v=>Object.keys(v).reduce((g,w)=>({...g,[w]:o(w,v)}),{}),i=v=>v instanceof Date?v:typeof v=="number"?new Date(new Date*1+v*864e5):v,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(v=>v.split("=")).reduce((v,g)=>(v[decodeURIComponent(g[0].trim())]=decodeURIComponent(g[1].trim()),v),{}),c=new Set,u=()=>{const v=l();c.forEach(g=>g(v))},d=[{name:"expires",parse:v=>`expires=${i(v.expires??a)}`},{name:"maxAge",parse:v=>v.maxAge?`max-age=${i(v.expires??a)}`:""},{name:"path",parse:v=>`path=${v.path??"/"}`},{name:"sameSite",parse:v=>`samesite=${v.sameSite??"strict"}`},{name:"useSecure",parse:v=>`${v.useSecure??!0?"secure":""}`},{name:"domain",parse:v=>{const g=v.domain??"";return g===""?"":`domain=${v.multiDomain?".":""}${g}`}},{name:"partitioned",parse:v=>v.partitioned?"Partitioned":""}],h={json:l,listener:v=>(c.add(v),()=>c.delete(v)),clearListeners:()=>c.clear(),has:v=>document.cookie.split(";").some(g=>g.trim().startsWith(`${v}=`)),deleteAll:()=>{document.cookie.split(";").forEach(v=>{document.cookie=v.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:v=>{const g=h.json()[v];if(n(g))return null;try{return JSON.parse(decodeURIComponent(g))}catch{return g}},delete:v=>{document.cookie=`${encodeURIComponent(v)}=;expires=${new Date().toUTCString()}`,u()},set:(v,g,w={})=>{const y=r(g)?g:encodeURIComponent(JSON.stringify(g)),T=d.reduce((S,E)=>{const I=E.parse(w);return I===""?S:S.concat(I)},[`${encodeURIComponent(v)}=${y}`]).join(";");document.cookie=T,u()}},f=v=>{const g=new Set,w=y=>{v().removeItem(y);const T=s(v());g.forEach(S=>S(T))};return{delete:w,listener:y=>(g.add(y),()=>g.delete(y)),clearListeners:()=>g.clear(),json:(y=!1)=>y?s(v()):v(),has:y=>{const T=v().getItem(y);return!n(T)},deleteAll:()=>{t(v(),w),g.forEach(y=>y(v()))},get:y=>o(y,v()),set:(y,T)=>{v().setItem(y,JSON.stringify(T)),g.forEach(S=>S(v()))}}},p=f(()=>window.sessionStorage),m=f(()=>window.localStorage);e.Cookie=h,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=f})(Dd);const Nd=e=>e.headerLabel??e.thead??e.id,Fd=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Yo=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Yo||{});const Ld=e=>e.type==="number"?e.valueAsNumber:e.value,PF=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},kF={},IF=(e,t=kF)=>{const n=Xi()?null:Dd.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=Qc({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 Xi()||Dd.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>i(a)}});return{...r,...o,name:e}},Vd=(e,t,n,r={})=>{var l;const o=e.id,s=e.type??Yo.Text,i=(l=t[s])==null?void 0:l[0].value,a=n[i];return{id:Zi(),operation:a,label:Nd(e),name:o,type:s,value:"",...r}},$d=()=>{const e=zt(),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(()=>({[Yo.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Yo.Boolean]:[t.is,t.isNot],[Yo.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},OF=e=>{const t=zt(),{operationOptions:n,operations:r}=$d(),o=()=>{const c=e.cols.at(0);e.set(u=>[...u,Vd(c,n,r)])},s=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(h=>h.map(f=>{if(u!==f.id)return f;const p=e.cols.find(m=>d===m.id);return Vd(p,n,r,{value:""})}))},i=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(h=>h.map(f=>f.id===u?{...f,operation:r[d]}:f))},a=c=>{const u=c.currentTarget.dataset.id||"";e.set(d=>d.filter(h=>h.id!==u))},l=c=>{const u=c.target.dataset.id||"",d=Ld(c.target);e.set(h=>h.map(f=>f.id===u?{...f,value:d}:f))};return x.jsx(b.Fragment,{children:x.jsx(Vo,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(FP,{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(js,{"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(ho,{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($c,{size:14})," ",t.tableFilterNewFilter]})})]})})})},AF=({filter:e,onDelete:t,set:n})=>{const r=zt(),{operationOptions:o,operations:s}=$d(),i=l=>{const c=l.target.value,u=l.target.dataset.id||"";n(d=>d.map(h=>h.id===u?{...h,operation:s[c]}:h))},a=l=>{const c=l.target.dataset.id||"",u=Ld(l.target);n(d=>d.map(h=>h.id===c?{...h,value:u}:h))};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(js,{"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(ho,{className:"text-danger",size:14})})]})},_F=({item:e,onPointerDown:t})=>{const n=fo(0);return x.jsxs(Bi.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(NP,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},MF=e=>{var l;const t=zt(),n=Fd(e.cols),r=xP(),[o,s]=b.useState(((l=e.groups[0])==null?void 0:l.thead)||""),i=c=>{var v;const u=c.target,d=u.value,h=u.options.selectedIndex,f=((v=u.options.item(h))==null?void 0:v.label)||"";s(f);const p=new O0(e.rows).GroupBy(d),m=e.cols.find(g=>g.id===d);e.setGroups(Wx(p).map((g,w)=>{const y=p[g];return{...m,groupId:Zi(),groupKey:d,index:w,rows:y,groupName:g}}))},a=()=>e.setGroups([]);return x.jsx(b.Fragment,{children:x.jsxs(Vo,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(RP,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(Dr,{value:o,title:"Tipo de agrupamento",onChange:i,options:n,placeholder:"Agrupar por..."}),x.jsx(Jr,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:x.jsx(ho,{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(WC,{children:x.jsx(Bi.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>x.jsx(_F,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},DF=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),NF=(e,t)=>e.toSorted(DF(t)),A0=(e,t,n)=>({id:Zi(),type:n,value:e.id,label:t}),FF=e=>{const t=zt(),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,A0(l,n.asc.label,n.asc.value)])},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(h=>h.id===l?{...h,value:u}:h))},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(h=>h.id===l?{...h,type:u}:h))},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(Vo,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(dg,{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(ho,{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($c,{size:14})," ",t.tableSortAddButton]})})]})})})},LF=e=>{const t=zt(),[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=A0(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=Nd(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(IP,{size:14}):null,n==="desc"?x.jsx(kP,{size:14}):null,n==="undefined"?x.jsx(dg,{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(OF,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(FF,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(MF,{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=Ld(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function $F(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 RF=e=>{const t=b.useId(),n=zt(),r=e.asLink||"button",o=b.useMemo(()=>$F(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]})})]})},jF={opacity:1},BF={opacity:.75,backgroundColor:"var(--table-border)"},WF={opacity:0,transition:{duration:.4,type:"spring"}},zF=e=>{var d;const t=zt(),n=e.filters.filter(h=>h.name===e.header.id),o=n.length>0?LP:VP,{operationOptions:s,operations:i}=$d(),a=h=>{const f=h.currentTarget.dataset.id||"";return e.setFilters(p=>p.filter(m=>m.id!==f))},l=e.sorters.find(h=>e.header.id===h.value),c=l!=null&&l.type?l.type===I0.Asc?"ascending":"descending":"none",u=Nd(e.header);return x.jsx(Bi.Item,{...e.header.thProps,as:"th",layout:!0,exit:WF,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader",value:e.header,whileDrag:BF,"aria-sort":c,"aria-busy":e.loading,animate:jF,className:`hidden px-2 py-4 font-medium 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(Vo,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",u]}),e.inlineFilter?x.jsx(o,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14}):null]}),title:x.jsxs("span",{className:"font-medium text-lg",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(h=>x.jsx("li",{className:"my-1",children:x.jsx(AF,{onDelete:a,filter:h,set:e.setFilters})},`thead-filter-${h.id}`)),x.jsx("li",{children:x.jsxs("button",{onClick:()=>e.setFilters(h=>h.concat(Vd(e.header,s,i))),type:"button",className:"flex items-center gap-1 text-primary",children:[x.jsx($c,{size:14})," ",t.tableFilterNewFilter]})})]})}),x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter?x.jsx(LF,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})})})},HF=e=>x.jsx(Bi.Group,{as:"tr",role:"row",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"border-none bg-table-background text-lg",children:x.jsx(Ps,{children:e.headers.map(t=>x.jsx(zF,{inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),_0=b.createContext({}),UF=()=>b.useContext(_0),GF=b.forwardRef((e,t)=>x.jsx("tbody",{...e,role:"rowgroup",className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:x.jsx(Ps,{children:e.children})})),YF=b.forwardRef((e,t)=>x.jsx("table",{...e,ref:t,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${e.className??""}`})),qF=b.forwardRef(({context:e,...t},n)=>{var s;const r=UF(),o={...t==null?void 0:t.style,sticky:dn.number(r.sticky)?`${r.sticky}px`:(s=t==null?void 0:t.style)==null?void 0:s.sticky};return x.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),KF=b.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),ZF=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:"h-14 bg-card-background px-2",children:x.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),XF={TableHead:qF,Table:YF,TableBody:GF,TableRow:KF,TableFoot:ZF},QF=[0,0,0,0,0,0,0,0,0,0],JF=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(b.Fragment,{children:r.map((s,i)=>{var d;const a=`${i},${e}`,l=nu(t,s.id),c=s.Element,u=((d=s.cellProps)==null?void 0:d.className)||"";return b.createElement("td",{...s.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${i}`,className:`hidden h-14 border-none px-2 first:table-cell md:table-cell ${u}`},o?x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}):c?x.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):x.jsx(b.Fragment,{children:dn.nil(l)?"":l}))})})},eL=()=>x.jsx(b.Fragment,{}),M0=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:s,sorters:i,cols:a,border:l=!1,setSorters:c,...u})=>{const d=b.useRef(null),[h,f]=b.useState(!1),p=od(n),m=od(u.loadingMore),v=b.useMemo(()=>{if(u.loading)return QF;if(r)return u.rows;const g=new O0(u.rows);return e.length>0&&e.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:g.Where(w.name,w.operation.symbol,w.value)),i.length===0?g.Select():NF(g.Select(),i)},[u.rows,e,i,u.loading]);return b.useEffect(()=>{if(d.current===null)return()=>{};const g=d.current,w=new IntersectionObserver(y=>{var E;return y[y.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void f(!0)):f(!1)});return w.observe(g),()=>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(JN,{data:v,useWindowScroll:!0,components:XF,totalCount:v.length,itemContent:JF,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:h?eL:null,fixedHeaderContent:()=>x.jsx(HF,{filters:e,headers:a,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter,loading:!!u.loading,setCols:o,setFilters:s,setSorters:c,sorters:i})}),x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),t!==null?x.jsx(RF,{...t}):null]})},tL=(e,t)=>typeof t=="function"?t(e):t,ja=(e,t,n)=>e===t||n==null?void 0:n(t),nL=e=>{const t=b.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=b.useMemo(()=>Fd(e.cols),[e.cols]),[o,s]=Qc({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:tL(u[l],c)}};return{cols:a("cols"),filters:a("filters"),groups:a("groups"),sorters:a("sorters")}},{postMiddleware:[(i,a)=>{var l;return console.log("->",i,a),(l=e.set)==null||l.call(e,i),ja((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),ja((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),ja((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),ja((a==null?void 0:a.cols)??[],i.cols??[],e.setCols),i}]});return x.jsx(_0.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full",children:[n?x.jsx(VF,{cols:o.cols,filters:o.filters,groups:o.groups,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,options:r,pagination:e.pagination??null,rows:e.rows,setCols:s.cols,setFilters:s.filters,setGroups:s.groups,setSorters:s.sorters,sorters:o.sorters}):null,o.groups.length===0?x.jsx(M0,{...e,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,onScrollEnd:e.onScrollEnd,cols:o.cols,filters:o.filters,groups:o.groups,index:0,optionCols:r,options:r,setCols:s.cols,setFilters:s.filters,setGroups:s.groups,setSorters:s.sorters,sorters:o.sorters,pagination:e.pagination??null}):x.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((i,a)=>x.jsx(Ct.div,{className:"min-w-full",children:x.jsx(M0,{...e,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,pagination:null,onScrollEnd:e.onScrollEnd,cols:o.cols,filters:o.filters,group:i,groups:o.groups,index:a,optionCols:r,options:r,rows:i.rows,setCols:s.cols,setFilters:s.filters,setGroups:s.groups,setSorters:s.sorters,sorters:o.sorters})},`group-${i.groupId}`))})]})})};var rL=String.prototype.replace,oL=/%20/g,Rd={RFC1738:"RFC1738",RFC3986:"RFC3986"},jd={default:Rd.RFC3986,formatters:{RFC1738:function(e){return rL.call(e,oL,"+")},RFC3986:function(e){return String(e)}},RFC1738:Rd.RFC1738,RFC3986:Rd.RFC3986},sL=jd,Bd=Object.prototype.hasOwnProperty,Vr=Array.isArray,In=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),iL=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Vr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},D0=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},aL=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Vr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Bd.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 Vr(t)&&!Vr(n)&&(o=D0(t,r)),Vr(t)&&Vr(n)?(n.forEach(function(s,i){if(Bd.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 Bd.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},lL=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},cL=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}},Wd=1024,uL=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(f){return"%26%23"+parseInt(f.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=Wd){for(var c=i.length>=Wd?i.slice(l,l+Wd):i,u=[],d=0;d<c.length;++d){var h=c.charCodeAt(d);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||s===sL.RFC1738&&(h===40||h===41)){u[u.length]=c.charAt(d);continue}if(h<128){u[u.length]=In[h];continue}if(h<2048){u[u.length]=In[192|h>>6]+In[128|h&63];continue}if(h<55296||h>=57344){u[u.length]=In[224|h>>12]+In[128|h>>6&63]+In[128|h&63];continue}d+=1,h=65536+((h&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=In[240|h>>18]+In[128|h>>12&63]+In[128|h>>6&63]+In[128|h&63]}a+=u.join("")}return a},dL=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 iL(n),t},fL=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},hL=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},pL=function(t,n){return[].concat(t,n)},mL=function(t,n){if(Vr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},N0={arrayToObject:D0,assign:lL,combine:pL,compact:dL,decode:cL,encode:uL,isBuffer:hL,isRegExp:fL,maybeMap:mL,merge:aL},F0=Vx,Ba=N0,ei=jd,gL=Object.prototype.hasOwnProperty,L0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},On=Array.isArray,yL=Array.prototype.push,V0=function(e,t){yL.apply(e,On(t)?t:[t])},vL=Date.prototype.toISOString,$0=ei.default,bt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Ba.encode,encodeValuesOnly:!1,format:$0,formatter:ei.formatters[$0],indices:!1,serializeDate:function(t){return vL.call(t)},skipNulls:!1,strictNullHandling:!1},bL=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},zd={},wL=function e(t,n,r,o,s,i,a,l,c,u,d,h,f,p,m,v,g,w){for(var y=t,T=w,S=0,E=!1;(T=T.get(zd))!==void 0&&!E;){var I=T.get(t);if(S+=1,typeof I<"u"){if(I===S)throw new RangeError("Cyclic object value");E=!0}typeof T.get(zd)>"u"&&(S=0)}if(typeof u=="function"?y=u(n,y):y instanceof Date?y=f(y):r==="comma"&&On(y)&&(y=Ba.maybeMap(y,function(A){return A instanceof Date?f(A):A})),y===null){if(i)return c&&!v?c(n,bt.encoder,g,"key",p):n;y=""}if(bL(y)||Ba.isBuffer(y)){if(c){var P=v?n:c(n,bt.encoder,g,"key",p);return[m(P)+"="+m(c(y,bt.encoder,g,"value",p))]}return[m(n)+"="+m(String(y))]}var O=[];if(typeof y>"u")return O;var C;if(r==="comma"&&On(y))v&&c&&(y=Ba.maybeMap(y,c)),C=[{value:y.length>0?y.join(",")||null:void 0}];else if(On(u))C=u;else{var L=Object.keys(y);C=d?L.sort(d):L}var D=l?n.replace(/\./g,"%2E"):n,V=o&&On(y)&&y.length===1?D+"[]":D;if(s&&On(y)&&y.length===0)return V+"[]";for(var k=0;k<C.length;++k){var _=C[k],N=typeof _=="object"&&typeof _.value<"u"?_.value:y[_];if(!(a&&N===null)){var $=h&&l?_.replace(/\./g,"%2E"):_,H=On(y)?typeof r=="function"?r(V,$):V:V+(h?"."+$:"["+$+"]");w.set(t,S);var U=F0();U.set(zd,w),V0(O,e(N,H,r,o,s,i,a,l,r==="comma"&&v&&On(y)?null:c,u,d,h,f,p,m,v,g,U))}}return O},xL=function(t){if(!t)return bt;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||bt.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=ei.default;if(typeof t.format<"u"){if(!gL.call(ei.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=ei.formatters[r],s=bt.filter;(typeof t.filter=="function"||On(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in L0?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=bt.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:bt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:bt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:bt.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:bt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?bt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:bt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:bt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:bt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:bt.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:bt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:bt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:bt.strictNullHandling}},SL=function(e,t){var n=e,r=xL(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):On(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=L0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=F0(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||V0(i,wL(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 h=i.join(r.delimiter),f=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),h.length>0?f+h:""},qo=N0,Hd=Object.prototype.hasOwnProperty,TL=Array.isArray,ht={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:qo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},EL=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},R0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},CL="utf8=%26%2310003%3B",PL="utf8=%E2%9C%93",kL=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]===PL?c="utf-8":i[l]===CL&&(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("]="),h=d===-1?u.indexOf("="):d+1,f,p;h===-1?(f=n.decoder(u,ht.decoder,c,"key"),p=n.strictNullHandling?null:""):(f=n.decoder(u.slice(0,h),ht.decoder,c,"key"),p=qo.maybeMap(R0(u.slice(h+1),n),function(v){return n.decoder(v,ht.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=EL(p)),u.indexOf("[]=")>-1&&(p=TL(p)?[p]:p);var m=Hd.call(r,f);m&&n.duplicates==="combine"?r[f]=qo.combine(r[f],p):(!m||n.duplicates==="last")&&(r[f]=p)}return r},IL=function(e,t,n,r){for(var o=r?t:R0(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},OL=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&&Hd.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&&Hd.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),IL(u,n,r,o)}},AL=function(t){if(!t)return ht;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"?ht.charset:t.charset,r=typeof t.duplicates>"u"?ht.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:ht.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ht.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ht.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ht.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ht.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ht.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ht.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:ht.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:ht.decoder,delimiter:typeof t.delimiter=="string"||qo.isRegExp(t.delimiter)?t.delimiter:ht.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ht.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ht.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ht.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ht.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ht.strictNullHandling}},_L=function(e,t){var n=AL(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?kL(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=OL(a,r[a],n,typeof e=="string");o=qo.merge(o,l,n)}return n.allowSparse===!0?o:qo.compact(o)},ML=SL,DL=_L,NL=jd,FL={formats:NL,parse:DL,stringify:ML},Ie;(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})(Ie||(Ie={}));var j0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(j0||(j0={}));const oe=Ie.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$r=e=>{switch(typeof e){case"undefined":return oe.undefined;case"string":return oe.string;case"number":return isNaN(e)?oe.nan:oe.number;case"boolean":return oe.boolean;case"function":return oe.function;case"bigint":return oe.bigint;case"symbol":return oe.symbol;case"object":return Array.isArray(e)?oe.array:e===null?oe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?oe.promise:typeof Map<"u"&&e instanceof Map?oe.map:typeof Set<"u"&&e instanceof Set?oe.set:typeof Date<"u"&&e instanceof Date?oe.date:oe.object;default:return oe.unknown}},K=Ie.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 tn 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 tn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ie.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()}}tn.create=e=>new tn(e);const ti=(e,t)=>{let n;switch(e.code){case K.invalid_type:e.received===oe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case K.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ie.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ie.joinValues(e.keys,", ")}`;break;case K.invalid_union:n="Invalid input";break;case K.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ie.joinValues(e.options)}`;break;case K.invalid_enum_value:n=`Invalid enum value. Expected ${Ie.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}"`:Ie.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,Ie.assertNever(e)}return{message:n}};let LL=ti;function Ud(){return LL}const Gd=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 ne(e,t){const n=Ud(),r=Gd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ti?void 0:ti].filter(o=>!!o)});e.common.issues.push(r)}class $t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return 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 $t.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return 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"}),ni=e=>({status:"dirty",value:e}),Ht=e=>({status:"valid",value:e}),B0=e=>e.status==="aborted",W0=e=>e.status==="dirty",Wa=e=>e.status==="valid",za=e=>typeof Promise<"u"&&e instanceof Promise;function Ha(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 z0(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 ri,oi;class An{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 H0=(e,t)=>{if(Wa(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 tn(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 $r(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:$r(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $t,ctx:{common:t.parent.common,data:t.data,parsedType:$r(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(za(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:$r(t)},s=this._parseSync({data:t,path:o.path,parent:o});return H0(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:$r(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(za(o)?o:Promise.resolve(o));return H0(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 Br.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return cn.create(this,this._def)}promise(){return ai.create(this,this._def)}or(t){return Ya.create([this,t],this._def)}and(t){return qa.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 Ja({...ye(this._def),innerType:this,defaultValue:n,typeName:he.ZodDefault})}brand(){return new q0({typeName:he.ZodBranded,type:this,...ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new el({...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 tl.create(this,t)}readonly(){return nl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const VL=/^c[^\s-]{8,}$/i,$L=/^[0-9a-z]+$/,RL=/^[0-9A-HJKMNP-TV-Z]{26}$/,jL=/^[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,BL=/^[a-z0-9_-]{21}$/i,WL=/^[-+]?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)?)??$/,zL=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,HL="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Yd;const UL=/^(?:(?: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])$/,GL=/^(([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})))$/,YL=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,U0="((\\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])))",qL=new RegExp(`^${U0}$`);function G0(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 KL(e){return new RegExp(`^${G0(e)}$`)}function ZL(e){let t=`${U0}T${G0(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 XL(e,t){return!!((t==="v4"||!t)&&UL.test(e)||(t==="v6"||!t)&&GL.test(e))}class Vn extends xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==oe.string){const s=this._getOrReturnCtx(t);return ne(s,{code:K.invalid_type,expected:oe.string,received:s.parsedType}),me}const r=new $t;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),ne(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),ne(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?ne(o,{code:K.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&ne(o,{code:K.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")zL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"email",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Yd||(Yd=new RegExp(HL,"u")),Yd.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"emoji",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")jL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"uuid",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")BL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"nanoid",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")VL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"cuid",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")$L.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"cuid2",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")RL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(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),ne(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),ne(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),ne(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),ne(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),ne(o,{code:K.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?ZL(s).test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?qL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?KL(s).test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?WL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"duration",code:K.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?XL(t.data,s.version)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"ip",code:K.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?YL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"base64",code:K.invalid_string,message:s.message}),r.dirty()):Ie.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 QL(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 Rr 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)!==oe.number){const s=this._getOrReturnCtx(t);return ne(s,{code:K.invalid_type,expected:oe.number,received:s.parsedType}),me}let r;const o=new $t;for(const s of this._def.checks)s.kind==="int"?Ie.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ne(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),ne(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),ne(r,{code:K.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?QL(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),ne(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),ne(r,{code:K.not_finite,message:s.message}),o.dirty()):Ie.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 Rr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new Rr({...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"&&Ie.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)}}Rr.create=e=>new Rr({checks:[],typeName:he.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Ko 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)!==oe.bigint){const s=this._getOrReturnCtx(t);return ne(s,{code:K.invalid_type,expected:oe.bigint,received:s.parsedType}),me}let r;const o=new $t;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ne(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),ne(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),ne(r,{code:K.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Ie.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 Ko({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new Ko({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message: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}}Ko.create=e=>{var t;return new Ko({checks:[],typeName:he.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};class qd extends xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==oe.boolean){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:oe.boolean,received:r.parsedType}),me}return Ht(t.data)}}qd.create=e=>new qd({typeName:he.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class si extends xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==oe.date){const s=this._getOrReturnCtx(t);return ne(s,{code:K.invalid_type,expected:oe.date,received:s.parsedType}),me}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return ne(s,{code:K.invalid_date}),me}const r=new $t;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),ne(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),ne(o,{code:K.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Ie.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new si({...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}}si.create=e=>new si({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:he.ZodDate,...ye(e)});class Kd extends xe{_parse(t){if(this._getType(t)!==oe.symbol){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:oe.symbol,received:r.parsedType}),me}return Ht(t.data)}}Kd.create=e=>new Kd({typeName:he.ZodSymbol,...ye(e)});class Ua extends xe{_parse(t){if(this._getType(t)!==oe.undefined){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:oe.undefined,received:r.parsedType}),me}return Ht(t.data)}}Ua.create=e=>new Ua({typeName:he.ZodUndefined,...ye(e)});class Ga extends xe{_parse(t){if(this._getType(t)!==oe.null){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:oe.null,received:r.parsedType}),me}return Ht(t.data)}}Ga.create=e=>new Ga({typeName:he.ZodNull,...ye(e)});class Zd extends xe{constructor(){super(...arguments),this._any=!0}_parse(t){return Ht(t.data)}}Zd.create=e=>new Zd({typeName:he.ZodAny,...ye(e)});class Zo extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ht(t.data)}}Zo.create=e=>new Zo({typeName:he.ZodUnknown,...ye(e)});class mr extends xe{_parse(t){const n=this._getOrReturnCtx(t);return ne(n,{code:K.invalid_type,expected:oe.never,received:n.parsedType}),me}}mr.create=e=>new mr({typeName:he.ZodNever,...ye(e)});class Xd extends xe{_parse(t){if(this._getType(t)!==oe.undefined){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:oe.void,received:r.parsedType}),me}return Ht(t.data)}}Xd.create=e=>new Xd({typeName:he.ZodVoid,...ye(e)});class cn extends xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==oe.array)return ne(n,{code:K.invalid_type,expected:oe.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)&&(ne(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&&(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((i,a)=>o.type._parseAsync(new An(n,i,n.path,a)))).then(i=>$t.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new An(n,i,n.path,a)));return $t.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new cn({...this._def,minLength:{value:t,message:le.toString(n)}})}max(t,n){return new cn({...this._def,maxLength:{value:t,message:le.toString(n)}})}length(t,n){return new cn({...this._def,exactLength:{value:t,message:le.toString(n)}})}nonempty(t){return this.min(1,t)}}cn.create=(e,t)=>new cn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...ye(t)});function Xo(e){if(e instanceof it){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Bn.create(Xo(r))}return new it({...e._def,shape:()=>t})}else return e instanceof cn?new cn({...e._def,type:Xo(e.element)}):e instanceof Bn?Bn.create(Xo(e.unwrap())):e instanceof Br?Br.create(Xo(e.unwrap())):e instanceof Rn?Rn.create(e.items.map(t=>Xo(t))):e}class it 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=Ie.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==oe.object){const c=this._getOrReturnCtx(t);return ne(c,{code:K.invalid_type,expected:oe.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 mr&&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 An(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof mr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of 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 An(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,h=await u.value;c.push({key:d,value:h,alwaysSet:u.alwaysSet})}return c}).then(c=>$t.mergeObjectSync(r,c)):$t.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new it({...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 it({...this._def,unknownKeys:"strip"})}passthrough(){return new it({...this._def,unknownKeys:"passthrough"})}extend(t){return new it({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new it({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 it({...this._def,catchall:t})}pick(t){const n={};return Ie.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new it({...this._def,shape:()=>n})}omit(t){const n={};return Ie.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new it({...this._def,shape:()=>n})}deepPartial(){return Xo(this)}partial(t){const n={};return Ie.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new it({...this._def,shape:()=>n})}required(t){const n={};return Ie.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 it({...this._def,shape:()=>n})}keyof(){return Y0(Ie.objectKeys(this.shape))}}it.create=(e,t)=>new it({shape:()=>e,unknownKeys:"strip",catchall:mr.create(),typeName:he.ZodObject,...ye(t)}),it.strictCreate=(e,t)=>new it({shape:()=>e,unknownKeys:"strict",catchall:mr.create(),typeName:he.ZodObject,...ye(t)}),it.lazycreate=(e,t)=>new it({shape:e,unknownKeys:"strip",catchall:mr.create(),typeName:he.ZodObject,...ye(t)});class Ya 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 tn(a.ctx.common.issues));return ne(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 tn(l));return ne(n,{code:K.invalid_union,unionErrors:a}),me}}get options(){return this._def.options}}Ya.create=(e,t)=>new Ya({options:e,typeName:he.ZodUnion,...ye(t)});const $n=e=>e instanceof Za?$n(e.schema):e instanceof jn?$n(e.innerType()):e instanceof Xa?[e.value]:e instanceof jr?e.options:e instanceof Qa?Ie.objectValues(e.enum):e instanceof Ja?$n(e._def.innerType):e instanceof Ua?[void 0]:e instanceof Ga?[null]:e instanceof Bn?[void 0,...$n(e.unwrap())]:e instanceof Br?[null,...$n(e.unwrap())]:e instanceof q0||e instanceof nl?$n(e.unwrap()):e instanceof el?$n(e._def.innerType):[];class Qd extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==oe.object)return ne(n,{code:K.invalid_type,expected:oe.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}):(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 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 Qd({typeName:he.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...ye(r)})}}function Jd(e,t){const n=$r(e),r=$r(t);if(e===t)return{valid:!0,data:e};if(n===oe.object&&r===oe.object){const o=Ie.objectKeys(t),s=Ie.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=Jd(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===oe.array&&r===oe.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=Jd(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===oe.date&&r===oe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class qa extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(B0(s)||B0(i))return me;const a=Jd(s.value,i.value);return a.valid?((W0(s)||W0(i))&&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(([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}))}}qa.create=(e,t,n)=>new qa({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!==oe.array)return ne(r,{code:K.invalid_type,expected:oe.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 s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new An(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>$t.mergeArray(n,i)):$t.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new 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 Ka 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!==oe.object)return ne(r,{code:K.invalid_type,expected:oe.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 An(r,a,r.path,a)),value:i._parse(new An(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?$t.mergeObjectAsync(n,o):$t.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof xe?new Ka({keyType:t,valueType:n,typeName:he.ZodRecord,...ye(r)}):new Ka({keyType:Vn.create(),valueType:t,typeName:he.ZodRecord,...ye(n)})}}class ef 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!==oe.map)return ne(r,{code:K.invalid_type,expected:oe.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 An(r,a,r.path,[c,"key"])),value:s._parse(new An(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}}}}ef.create=(e,t,n)=>new ef({valueType:t,keyType:e,typeName:he.ZodMap,...ye(n)});class Qo extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==oe.set)return ne(r,{code:K.invalid_type,expected:oe.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 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 An(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new Qo({...this._def,minSize:{value:t,message:le.toString(n)}})}max(t,n){return new Qo({...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)}}Qo.create=(e,t)=>new Qo({valueType:e,minSize:null,maxSize:null,typeName:he.ZodSet,...ye(t)});class ii extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==oe.function)return ne(n,{code:K.invalid_type,expected:oe.function,received:n.parsedType}),me;function r(a,l){return Gd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ud(),ti].filter(c=>!!c),issueData:{code:K.invalid_arguments,argumentsError:l}})}function o(a,l){return Gd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ud(),ti].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 ai){const a=this;return Ht(async function(...l){const c=new tn([]),u=await a._def.args.parseAsync(l,s).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const a=this;return Ht(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new tn([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new tn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ii({...this._def,args:Rn.create(t).rest(Zo.create())})}returns(t){return new ii({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ii({args:t||Rn.create([]).rest(Zo.create()),returns:n||Zo.create(),typeName:he.ZodFunction,...ye(r)})}}class Za 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})}}Za.create=(e,t)=>new Za({getter:e,typeName:he.ZodLazy,...ye(t)});class Xa 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}}Xa.create=(e,t)=>new Xa({value:e,typeName:he.ZodLiteral,...ye(t)});function Y0(e,t){return new jr({values:e,typeName:he.ZodEnum,...ye(t)})}class jr extends xe{constructor(){super(...arguments),ri.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ne(n,{expected:Ie.joinValues(r),received:n.parsedType,code:K.invalid_type}),me}if(Ha(this,ri)||z0(this,ri,new Set(this._def.values)),!Ha(this,ri).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 Ht(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 jr.create(t,{...this._def,...n})}exclude(t,n=this._def){return jr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ri=new WeakMap,jr.create=Y0;class Qa extends xe{constructor(){super(...arguments),oi.set(this,void 0)}_parse(t){const n=Ie.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==oe.string&&r.parsedType!==oe.number){const o=Ie.objectValues(n);return ne(r,{expected:Ie.joinValues(o),received:r.parsedType,code:K.invalid_type}),me}if(Ha(this,oi)||z0(this,oi,new Set(Ie.getValidEnumValues(this._def.values))),!Ha(this,oi).has(t.data)){const o=Ie.objectValues(n);return ne(r,{received:r.data,code:K.invalid_enum_value,options:o}),me}return Ht(t.data)}get enum(){return this._def.values}}oi=new WeakMap,Qa.create=(e,t)=>new Qa({values:e,typeName:he.ZodNativeEnum,...ye(t)});class ai extends xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==oe.promise&&n.common.async===!1)return ne(n,{code:K.invalid_type,expected:oe.promise,received:n.parsedType}),me;const r=n.parsedType===oe.promise?n.data:Promise.resolve(n.data);return Ht(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ai.create=(e,t)=>new ai({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=>{ne(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"?ni(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"?ni(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(!Wa(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=>Wa(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);Ie.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)===oe.undefined?Ht(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 Br extends xe{_parse(t){return this._getType(t)===oe.null?Ht(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Br.create=(e,t)=>new Br({innerType:e,typeName:he.ZodNullable,...ye(t)});class Ja extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===oe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ja.create=(e,t)=>new Ja({innerType:e,typeName:he.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ye(t)});class el 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 za(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new tn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new tn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}el.create=(e,t)=>new el({innerType:e,typeName:he.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ye(t)});class tf extends xe{_parse(t){if(this._getType(t)!==oe.nan){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:oe.nan,received:r.parsedType}),me}return{status:"valid",value:t.data}}}tf.create=e=>new tf({typeName:he.ZodNaN,...ye(e)});class q0 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 tl 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(),ni(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 tl({in:t,out:n,typeName:he.ZodPipeline})}}class nl extends xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Wa(o)&&(o.value=Object.freeze(o.value)),o);return za(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}nl.create=(e,t)=>new nl({innerType:e,typeName:he.ZodReadonly,...ye(t)}),it.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,Rr.create,tf.create,Ko.create,qd.create,si.create,Kd.create,Ua.create,Ga.create,Zd.create,Zo.create,mr.create,Xd.create,cn.create,it.create,it.strictCreate,Ya.create,Qd.create,qa.create,Rn.create,Ka.create,ef.create,Qo.create,ii.create,Za.create,Xa.create,jr.create,Qa.create,ai.create,jn.create,Bn.create,Br.create,jn.createWithPreprocess,tl.create;const JL={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},K0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return FL.parse(n.toString(),JL)},Z0=e=>e.replace("[",".").replace("]","").split("."),li=(e,t)=>Z0(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o instanceof cn?o.element:o},t),ci=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),eV=(e,t)=>{const[n,r]=b.useState(null),o=b.useRef({}),[s,i]=b.useState({}),a=(p,m)=>{const v=li(p,e);return{...m,name:p,id:p,form:t,required:!v.isOptional(),error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:v})}}},l=(p,m)=>{const v=li(p,e);return{...m,name:p,id:p,form:t,required:!v.isOptional(),error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:v})}}},c=(p,m)=>{const v=li(p,e);return{...m,name:p,id:p,form:t,required:!v.isOptional(),error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:v})}}},u=(p,m)=>{const v=li(p,e);return{...m,name:p,id:p,required:!v.isOptional(),form:t,type:dn.instance(v,Rr)?"number":(m==null?void 0:m.type)??"text",error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:v})}}};b.useEffect(()=>{const p=Object.values(o.current).map(v=>{const g=v.element.dataset.origin?document.querySelector(`[data-target="${v.element.name}"]`):v.element,w=v.schema.safeParse(ci(g)),y=S=>{var O;const E=g.dataset.target||g.name;if(!E)return;const I=ci(S.target)||(S.relatedTarget?ci(S.relatedTarget):""),P=v.schema.safeParse(I);if(P.success)return g.setCustomValidity(""),i(C=>kl(C,E,P.data)),r(C=>{const{[E]:L,...D}=C||{};return D===null||dn.empty(D)?null:D});if(g.required){const C=((O=P.error.issues[0])==null?void 0:O.message)||"";g.setCustomValidity(C),r(L=>({...L,[E]:C}))}},T=g.getAttribute("data-trigger")||"blur";return g.addEventListener(T,y),g.tagName==="SELECT"&&g.addEventListener("change",y),{input:v,hasInitialError:g.required?!w.success:!1,unsubscribe:()=>{g.removeEventListener(T,y),g.tagName==="SELECT"&&g.addEventListener("change",y)}}});return p.some(v=>v.hasInitialError)&&r(v=>v===null?{}:v),()=>p.forEach(v=>v.unsubscribe())});const d=b.useCallback(p=>m=>{const v=m.currentTarget,g=Object.values(o.current).reduce((y,T)=>{var O;const S=T.element,E=T.schema.safeParse(ci(S));if(S.dataset.ignore==="ignore"||E.success)return y;const I=(O=E.error.issues[0])==null?void 0:O.message;S.setAttribute("data-initialized","true");const P=S.dataset.name||S.name||"";return{...y,[P]:I}},{}),w=dn.empty(g)?null:g;r(w),p==null||p({form:v,errors:w||{}})},[]),h=b.useCallback(p=>m=>{m.preventDefault();const v=m.currentTarget;let g=K0(v);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(v.elements)).forEach(T=>{if(T.tagName==="SELECT"){const S=T;g=kl(g,S.name,S.value)}if(T.tagName==="INPUT"){const S=T;g=kl(g,S.name,ci(S))}});const y=e.safeParse(s);return y.success?p({form:v,json:g,data:y.data,event:m,reset:()=>rd(v),success:!0,errors:[]}):p({form:v,json:g,event:m,data:g,success:!1,reset:()=>rd(v),errors:y.error.issues.map(T=>({message:T.message,path:T.path.map(S=>String(S))}))})},[t]);return{state:s,input:u,datepicker:a,checkbox:c,select:l,onSubmit:h,errors:n,onInvalid:d,disabled:n!==null,name:t,get:p=>nu(s,p)||""}},tV=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current};J.Alert=zP,J.Autocomplete=nM,J.Button=Jr,J.Calendar=xy,J.Card=Sy,J.Checkbox=Rv,J.ColType=Yo,J.Collapse=yg,J.ComponentsProvider=OO,J.DatePicker=oM,J.Dropdown=Vo,J.Expand=D_,J.FileUpload=gD,J.Form=vD,J.Input=js,J.InputFeedback=Vv,J.InputField=ba,J.Menu=W_,J.MenuItem=B_,J.Modal=X_,J.Option=$v,J.Polymorph=Qr,J.Radiobox=bD,J.Select=Dr,J.Stats=NO,J.Switch=wD,J.Tab=$O,J.Table=nL,J.Tabs=LO,J.Tag=k1,J.TaskList=xD,J.Toolbar=Q_,J.Tooltip=Lv,J.TransferList=nF,J.convertPath=Z0,J.createColumns=PF,J.createDesignTokens=ly,J.createOptionCols=Fd,J.createStyles=TO,J.createTheme=EO,J.css=He,J.defaultDarkTheme=kO,J.defaultLightTheme=IO,J.dispatchInput=_l,J.formReset=rd,J.formToJson=K0,J.getSchemaShape=li,J.initializeInputDataset=bi,J.isReactComponent=S1,J.isReactFC=T1,J.isSsr=Xi,J.mergeRefs=Al,J.parsers=Jc,J.path=nu,J.reduceTokens=Ms,J.safeRegex=ru,J.splitInto=my,J.useForm=eV,J.usePrevious=tV,J.useReactive=Ty,J.useTablePreferences=IF,J.useTranslations=zt,J.uuid=Zi,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})});
195
+ */var Gc,jy;function Kk(){if(jy)return Gc;jy=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 Gc=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 f in a)t.call(a,f)&&(l[f]=a[f]);if(e){c=e(a);for(var h=0;h<c.length;h++)n.call(a,c[h])&&(l[c[h]]=a[c[h]])}}return l},Gc}var Uc,Ry;function Yc(){if(Ry)return Uc;Ry=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Uc=e,Uc}var qc,Hy;function Wy(){return Hy||(Hy=1,qc=Function.call.bind(Object.prototype.hasOwnProperty)),qc}var Kc,zy;function Xk(){if(zy)return Kc;zy=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Yc(),n={},r=Wy();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 f;try{if(typeof i[u]!="function"){var h=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 h.name="Invariant Violation",h}f=i[u](s,u,l,a,null,t)}catch(p){f=p}if(f&&!(f 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 f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=c?c():"";e("Failed "+a+" type: "+f.message+(d??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Kc=o,Kc}var Xc,Gy;function Qk(){if(Gy)return Xc;Gy=1;var e=By(),t=Kk(),n=Yc(),r=Wy(),o=Xk(),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 Xc=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(k){var j=k&&(c&&k[c]||k[u]);if(typeof j=="function")return j}var h="<<anonymous>>",d={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:w(),arrayOf:y,element:T(),elementType:S(),instanceOf:E,node:C(),objectOf:P,oneOf:A,oneOfType:O,shape:F,exact:V};function p(k,j){return k===j?k!==0||1/k===1/j:k!==k&&j!==j}function m(k,j){this.message=k,this.data=j&&typeof j=="object"?j:{},this.stack=""}m.prototype=Error.prototype;function v(k){if(process.env.NODE_ENV!=="production")var j={},K=0;function te(U,N,R,W,B,Y,ee){if(W=W||h,Y=Y||R,ee!==n){if(l){var H=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 H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Pe=W+":"+R;!j[Pe]&&K<3&&(i("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[Pe]=!0,K++)}}return N[R]==null?U?N[R]===null?new m("The "+B+" `"+Y+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+B+" `"+Y+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:k(N,R,W,B,Y)}var Q=te.bind(null,!1);return Q.isRequired=te.bind(null,!0),Q}function g(k){function j(K,te,Q,U,N,R){var W=K[te],B=L(W);if(B!==k){var Y=$(W);return new m("Invalid "+U+" `"+N+"` of type "+("`"+Y+"` supplied to `"+Q+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return v(j)}function w(){return v(s)}function y(k){function j(K,te,Q,U,N){if(typeof k!="function")return new m("Property `"+N+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var R=K[te];if(!Array.isArray(R)){var W=L(R);return new m("Invalid "+U+" `"+N+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an array."))}for(var B=0;B<R.length;B++){var Y=k(R,B,Q,U,N+"["+B+"]",n);if(Y instanceof Error)return Y}return null}return v(j)}function T(){function k(j,K,te,Q,U){var N=j[K];if(!a(N)){var R=L(N);return new m("Invalid "+Q+" `"+U+"` of type "+("`"+R+"` supplied to `"+te+"`, expected a single ReactElement."))}return null}return v(k)}function S(){function k(j,K,te,Q,U){var N=j[K];if(!e.isValidElementType(N)){var R=L(N);return new m("Invalid "+Q+" `"+U+"` of type "+("`"+R+"` supplied to `"+te+"`, expected a single ReactElement type."))}return null}return v(k)}function E(k){function j(K,te,Q,U,N){if(!(K[te]instanceof k)){var R=k.name||h,W=G(K[te]);return new m("Invalid "+U+" `"+N+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected ")+("instance of `"+R+"`."))}return null}return v(j)}function A(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 j(K,te,Q,U,N){for(var R=K[te],W=0;W<k.length;W++)if(p(R,k[W]))return null;var B=JSON.stringify(k,function(ee,H){var Pe=$(H);return Pe==="symbol"?String(H):H});return new m("Invalid "+U+" `"+N+"` of value `"+String(R)+"` "+("supplied to `"+Q+"`, expected one of "+B+"."))}return v(j)}function P(k){function j(K,te,Q,U,N){if(typeof k!="function")return new m("Property `"+N+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var R=K[te],W=L(R);if(W!=="object")return new m("Invalid "+U+" `"+N+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an object."));for(var B in R)if(r(R,B)){var Y=k(R,B,Q,U,N+"."+B,n);if(Y instanceof Error)return Y}return null}return v(j)}function O(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 j=0;j<k.length;j++){var K=k[j];if(typeof K!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(K)+" at index "+j+"."),s}function te(Q,U,N,R,W){for(var B=[],Y=0;Y<k.length;Y++){var ee=k[Y],H=ee(Q,U,N,R,W,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&B.push(H.data.expectedType)}var Pe=B.length>0?", expected one of type ["+B.join(", ")+"]":"";return new m("Invalid "+R+" `"+W+"` supplied to "+("`"+N+"`"+Pe+"."))}return v(te)}function C(){function k(j,K,te,Q,U){return I(j[K])?null:new m("Invalid "+Q+" `"+U+"` supplied to "+("`"+te+"`, expected a ReactNode."))}return v(k)}function _(k,j,K,te,Q){return new m((k||"React class")+": "+j+" type `"+K+"."+te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function F(k){function j(K,te,Q,U,N){var R=K[te],W=L(R);if(W!=="object")return new m("Invalid "+U+" `"+N+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));for(var B in k){var Y=k[B];if(typeof Y!="function")return _(Q,U,N,B,$(Y));var ee=Y(R,B,Q,U,N+"."+B,n);if(ee)return ee}return null}return v(j)}function V(k){function j(K,te,Q,U,N){var R=K[te],W=L(R);if(W!=="object")return new m("Invalid "+U+" `"+N+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));var B=t({},K[te],k);for(var Y in B){var ee=k[Y];if(r(k,Y)&&typeof ee!="function")return _(Q,U,N,Y,$(ee));if(!ee)return new m("Invalid "+U+" `"+N+"` key `"+Y+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(K[te],null," ")+`
196
+ Valid keys: `+JSON.stringify(Object.keys(k),null," "));var H=ee(R,Y,Q,U,N+"."+Y,n);if(H)return H}return null}return v(j)}function I(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(I);if(k===null||a(k))return!0;var j=f(k);if(j){var K=j.call(k),te;if(j!==k.entries){for(;!(te=K.next()).done;)if(!I(te.value))return!1}else for(;!(te=K.next()).done;){var Q=te.value;if(Q&&!I(Q[1]))return!1}}else return!1;return!0;default:return!1}}function D(k,j){return k==="symbol"?!0:j?j["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&j instanceof Symbol:!1}function L(k){var j=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":D(j,k)?"symbol":j}function $(k){if(typeof k>"u"||k===null)return""+k;var j=L(k);if(j==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return j}function z(k){var j=$(k);switch(j){case"array":case"object":return"an "+j;case"boolean":case"date":case"regexp":return"a "+j;default:return j}}function G(k){return!k.constructor||!k.constructor.name?h:k.constructor.name}return d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},Xc}var Qc,Uy;function Zk(){if(Uy)return Qc;Uy=1;var e=Yc();function t(){}function n(){}return n.resetWarningCache=t,Qc=function(){function r(s,a,l,c,u,f){if(f!==e){var h=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 h.name="Invariant Violation",h}}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},Qc}if(process.env.NODE_ENV!=="production"){var Jk=By(),eD=!0;zc.exports=Qk()(Jk.isElement,eD)}else zc.exports=Zk()();var tD=zc.exports;const Fe=_b(tD);function po(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(f){s(f)}}function l(u){try{c(r.throw(u))}catch(f){s(f)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function mo(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 Yy(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 qy(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 nD=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 di(e,t){var n=rD(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 rD(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=nD.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var oD=[".DS_Store","Thumbs.db"];function iD(e){return po(this,void 0,void 0,function(){return mo(this,function(t){return Bs(e)&&sD(e.dataTransfer)?[2,uD(e.dataTransfer,e.type)]:aD(e)?[2,lD(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,cD(e)]:[2,[]]})})}function sD(e){return Bs(e)}function aD(e){return Bs(e)&&Bs(e.target)}function Bs(e){return typeof e=="object"&&e!==null}function lD(e){return Zc(e.target.files).map(function(t){return di(t)})}function cD(e){return po(this,void 0,void 0,function(){var t;return mo(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 di(r)})]}})})}function uD(e,t){return po(this,void 0,void 0,function(){var n,r;return mo(this,function(o){switch(o.label){case 0:return e.items?(n=Zc(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(fD))]):[3,2];case 1:return r=o.sent(),[2,Ky(Xy(r))];case 2:return[2,Ky(Zc(e.files).map(function(i){return di(i)}))]}})})}function Ky(e){return e.filter(function(t){return oD.indexOf(t.name)===-1})}function Zc(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function fD(e){if(typeof e.webkitGetAsEntry!="function")return Qy(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Zy(t):Qy(e)}function Xy(e){return e.reduce(function(t,n){return qy(qy([],Yy(t),!1),Yy(Array.isArray(n)?Xy(n):[n]),!1)},[])}function Qy(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=di(t);return Promise.resolve(n)}function dD(e){return po(this,void 0,void 0,function(){return mo(this,function(t){return[2,e.isDirectory?Zy(e):hD(e)]})})}function Zy(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function i(){var s=this;t.readEntries(function(a){return po(s,void 0,void 0,function(){var l,c,u;return mo(this,function(f){switch(f.label){case 0:if(a.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=f.sent(),n(l),[3,4];case 3:return c=f.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(dD)),o.push(u),i(),f.label=6;case 6:return[2]}})})},function(a){r(a)})}i()})}function hD(e){return po(this,void 0,void 0,function(){return mo(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var i=di(o,e.fullPath);n(i)},function(o){r(o)})})]})})}var pD=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 Jy(e){return yD(e)||gD(e)||rv(e)||mD()}function mD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
197
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yD(e){if(Array.isArray(e))return Jc(e)}function ev(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 tv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ev(Object(n),!0).forEach(function(r){nv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ev(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hi(e,t){return wD(e)||bD(e,t)||rv(e,t)||vD()}function vD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
198
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rv(e,t){if(e){if(typeof e=="string")return Jc(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 Jc(e,t)}}function Jc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bD(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,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 wD(e){if(Array.isArray(e))return e}var xD="file-invalid-type",SD="file-too-large",TD="file-too-small",ED="too-many-files",CD=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:xD,message:"File type must be ".concat(n)}},ov=function(t){return{code:SD,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},iv=function(t){return{code:TD,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},PD={code:ED,message:"Too many files"};function sv(e,t){var n=e.type==="application/x-moz-file"||pD(e,t);return[n,n?null:CD(t)]}function av(e,t,n){if(fr(e.size))if(fr(t)&&fr(n)){if(e.size>n)return[!1,ov(n)];if(e.size<t)return[!1,iv(t)]}else{if(fr(t)&&e.size<t)return[!1,iv(t)];if(fr(n)&&e.size>n)return[!1,ov(n)]}return[!0,null]}function fr(e){return e!=null}function ID(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=sv(l,n),u=hi(c,1),f=u[0],h=av(l,r,o),d=hi(h,1),p=d[0],m=a?a(l):null;return f&&p&&!m})}function js(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Rs(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 lv(e){e.preventDefault()}function AD(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function OD(e){return e.indexOf("Edge/")!==-1}function kD(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return AD(e)||OD(e)}function an(){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!js(r)&&a&&a.apply(void 0,[r].concat(i)),js(r)})}}function DD(){return"showOpenFilePicker"in window}function MD(e){if(fr(e)){var t=Object.entries(e).filter(function(n){var r=hi(n,2),o=r[0],i=r[1],s=!0;return cv(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(uv))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=hi(r,2),i=o[0],s=o[1];return tv(tv({},n),{},nv({},i,s))},{});return[{description:"Files",accept:t}]}return e}function FD(e){if(fr(e))return Object.entries(e).reduce(function(t,n){var r=hi(n,2),o=r[0],i=r[1];return[].concat(Jy(t),[o],Jy(i))},[]).filter(function(t){return cv(t)||uv(t)}).join(",")}function LD(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function ND(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function cv(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function uv(e){return/^.*\.[\w]+$/.test(e)}var _D=["children"],VD=["open"],$D=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],BD=["refKey","onChange","onClick"];function jD(e){return WD(e)||HD(e)||fv(e)||RD()}function RD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
199
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function WD(e){if(Array.isArray(e))return tu(e)}function eu(e,t){return UD(e)||GD(e,t)||fv(e,t)||zD()}function zD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
200
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fv(e,t){if(e){if(typeof e=="string")return tu(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 tu(e,t)}}function tu(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 GD(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 UD(e){if(Array.isArray(e))return e}function dv(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 ze(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dv(Object(n),!0).forEach(function(r){nu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hs(e,t){if(e==null)return{};var n=YD(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 YD(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 ru=b.forwardRef(function(e,t){var n=e.children,r=Hs(e,_D),o=pv(r),i=o.open,s=Hs(o,VD);return b.useImperativeHandle(t,function(){return{open:i}},[i]),b.createElement(b.Fragment,null,n(ze(ze({},s),{},{open:i})))});ru.displayName="Dropzone";var hv={disabled:!1,getFilesFromEvent:iD,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};ru.defaultProps=hv,ru.propTypes={children:Fe.func,accept:Fe.objectOf(Fe.arrayOf(Fe.string)),multiple:Fe.bool,preventDropOnDocument:Fe.bool,noClick:Fe.bool,noKeyboard:Fe.bool,noDrag:Fe.bool,noDragEventsBubbling:Fe.bool,minSize:Fe.number,maxSize:Fe.number,maxFiles:Fe.number,disabled:Fe.bool,getFilesFromEvent:Fe.func,onFileDialogCancel:Fe.func,onFileDialogOpen:Fe.func,useFsAccessApi:Fe.bool,autoFocus:Fe.bool,onDragEnter:Fe.func,onDragLeave:Fe.func,onDragOver:Fe.func,onDrop:Fe.func,onDropAccepted:Fe.func,onDropRejected:Fe.func,onError:Fe.func,validator:Fe.func};var ou={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function pv(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ze(ze({},hv),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,f=t.onDragOver,h=t.onDrop,d=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,v=t.onFileDialogOpen,g=t.useFsAccessApi,w=t.autoFocus,y=t.preventDropOnDocument,T=t.noClick,S=t.noKeyboard,E=t.noDrag,A=t.noDragEventsBubbling,P=t.onError,O=t.validator,C=b.useMemo(function(){return FD(n)},[n]),_=b.useMemo(function(){return MD(n)},[n]),F=b.useMemo(function(){return typeof v=="function"?v:mv},[v]),V=b.useMemo(function(){return typeof m=="function"?m:mv},[m]),I=b.useRef(null),D=b.useRef(null),L=b.useReducer(qD,ou),$=eu(L,2),z=$[0],G=$[1],k=z.isFocused,j=z.isFileDialogActive,K=b.useRef(typeof window<"u"&&window.isSecureContext&&g&&DD()),te=function(){!K.current&&j&&setTimeout(function(){if(D.current){var oe=D.current.files;oe.length||(G({type:"closeDialog"}),V())}},300)};b.useEffect(function(){return window.addEventListener("focus",te,!1),function(){window.removeEventListener("focus",te,!1)}},[D,j,V,K]);var Q=b.useRef([]),U=function(oe){I.current&&I.current.contains(oe.target)||(oe.preventDefault(),Q.current=[])};b.useEffect(function(){return y&&(document.addEventListener("dragover",lv,!1),document.addEventListener("drop",U,!1)),function(){y&&(document.removeEventListener("dragover",lv),document.removeEventListener("drop",U))}},[I,y]),b.useEffect(function(){return!r&&w&&I.current&&I.current.focus(),function(){}},[I,w,r]);var N=b.useCallback(function(Z){P?P(Z):console.error(Z)},[P]),R=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),be(Z),Q.current=[].concat(jD(Q.current),[Z.target]),Rs(Z)&&Promise.resolve(o(Z)).then(function(oe){if(!(js(Z)&&!A)){var xe=oe.length,He=xe>0&&ID({files:oe,accept:C,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:O}),vt=xe>0&&!He;G({isDragAccept:He,isDragReject:vt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Z)}}).catch(function(oe){return N(oe)})},[o,c,N,A,C,s,i,a,l,O]),W=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),be(Z);var oe=Rs(Z);if(oe&&Z.dataTransfer)try{Z.dataTransfer.dropEffect="copy"}catch{}return oe&&f&&f(Z),!1},[f,A]),B=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),be(Z);var oe=Q.current.filter(function(He){return I.current&&I.current.contains(He)}),xe=oe.indexOf(Z.target);xe!==-1&&oe.splice(xe,1),Q.current=oe,!(oe.length>0)&&(G({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Rs(Z)&&u&&u(Z))},[I,u,A]),Y=b.useCallback(function(Z,oe){var xe=[],He=[];Z.forEach(function(vt){var Ct=sv(vt,C),At=eu(Ct,2),yr=At[0],Eo=At[1],Co=av(vt,s,i),sa=eu(Co,2),Yu=sa[0],qu=sa[1],Ku=O?O(vt):null;if(yr&&Yu&&!Ku)xe.push(vt);else{var Xu=[Eo,qu];Ku&&(Xu=Xu.concat(Ku)),He.push({file:vt,errors:Xu.filter(function(TN){return TN})})}}),(!a&&xe.length>1||a&&l>=1&&xe.length>l)&&(xe.forEach(function(vt){He.push({file:vt,errors:[PD]})}),xe.splice(0)),G({acceptedFiles:xe,fileRejections:He,type:"setFiles"}),h&&h(xe,He,oe),He.length>0&&p&&p(He,oe),xe.length>0&&d&&d(xe,oe)},[G,a,C,s,i,l,h,d,p,O]),ee=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),be(Z),Q.current=[],Rs(Z)&&Promise.resolve(o(Z)).then(function(oe){js(Z)&&!A||Y(oe,Z)}).catch(function(oe){return N(oe)}),G({type:"reset"})},[o,Y,N,A]),H=b.useCallback(function(){if(K.current){G({type:"openDialog"}),F();var Z={multiple:a,types:_};window.showOpenFilePicker(Z).then(function(oe){return o(oe)}).then(function(oe){Y(oe,null),G({type:"closeDialog"})}).catch(function(oe){LD(oe)?(V(oe),G({type:"closeDialog"})):ND(oe)?(K.current=!1,D.current?(D.current.value=null,D.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(oe)});return}D.current&&(G({type:"openDialog"}),F(),D.current.value=null,D.current.click())},[G,F,V,g,Y,N,_,a]),Pe=b.useCallback(function(Z){!I.current||!I.current.isEqualNode(Z.target)||(Z.key===" "||Z.key==="Enter"||Z.keyCode===32||Z.keyCode===13)&&(Z.preventDefault(),H())},[I,H]),Xe=b.useCallback(function(){G({type:"focus"})},[]),_e=b.useCallback(function(){G({type:"blur"})},[]),Qe=b.useCallback(function(){T||(kD()?setTimeout(H,0):H())},[T,H]),ae=function(oe){return r?null:oe},ge=function(oe){return S?null:ae(oe)},ie=function(oe){return E?null:ae(oe)},be=function(oe){A&&oe.stopPropagation()},ot=b.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=Z.refKey,xe=oe===void 0?"ref":oe,He=Z.role,vt=Z.onKeyDown,Ct=Z.onFocus,At=Z.onBlur,yr=Z.onClick,Eo=Z.onDragEnter,Co=Z.onDragOver,sa=Z.onDragLeave,Yu=Z.onDrop,qu=Hs(Z,$D);return ze(ze(nu({onKeyDown:ge(an(vt,Pe)),onFocus:ge(an(Ct,Xe)),onBlur:ge(an(At,_e)),onClick:ae(an(yr,Qe)),onDragEnter:ie(an(Eo,R)),onDragOver:ie(an(Co,W)),onDragLeave:ie(an(sa,B)),onDrop:ie(an(Yu,ee)),role:typeof He=="string"&&He!==""?He:"presentation"},xe,I),!r&&!S?{tabIndex:0}:{}),qu)}},[I,Pe,Xe,_e,Qe,R,W,B,ee,S,E,r]),we=b.useCallback(function(Z){Z.stopPropagation()},[]),it=b.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=Z.refKey,xe=oe===void 0?"ref":oe,He=Z.onChange,vt=Z.onClick,Ct=Hs(Z,BD),At=nu({accept:C,multiple:a,type:"file",style:{display:"none"},onChange:ae(an(He,ee)),onClick:ae(an(vt,we)),tabIndex:-1},xe,D);return ze(ze({},At),Ct)}},[D,n,a,ee,r]);return ze(ze({},z),{},{isFocused:k&&!r,getRootProps:ot,getInputProps:it,rootRef:I,inputRef:D,open:ae(H)})}function qD(e,t){switch(t.type){case"focus":return ze(ze({},e),{},{isFocused:!0});case"blur":return ze(ze({},e),{},{isFocused:!1});case"openDialog":return ze(ze({},ou),{},{isFileDialogActive:!0});case"closeDialog":return ze(ze({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ze(ze({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ze(ze({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ze({},ou);default:return e}}function mv(){}const KD={isImage:e=>e.type.includes("image")},XD=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(KD.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Ny(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Ny(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(Ar,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Rr,{})})]}):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(gC,{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(Ar,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Rr,{className:"text-danger"})})]})},QD=e=>x.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>x.jsx(XD,{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(QD,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(b.Fragment,{children:e.idle}),JD=x.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[x.jsx(TC,{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"})]})]}),eM=({idle:e=JD,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=b.useState([]),s=f=>{n==null||n(f),i(f)},{getRootProps:a,getInputProps:l,isDragActive:c}=pv({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(ZD,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},tM=["INPUT","SELECT"],iu=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{tM.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},nM=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})},rM=({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:Ne("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]}),dr=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:f,left:h,error:d,...p},m)=>{const v=Mt(),g=b.useRef(null),w=p.id??p.name;b.useImperativeHandle(m,()=>g.current),b.useEffect(()=>{if(g.current===null)return;const T=g.current,S=Vi(g.current),E=()=>T.setAttribute("data-selected","true");return T.addEventListener("change",E),()=>{S(),T.removeEventListener("change",E)}},[]);const y=()=>{var T;return(T=g.current)==null?void 0:T.focus()};return x.jsx(Vs,{container:c,error:d,feedback:o,hideLeft:u,left:h,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(om,{size:20}),x.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})}),children:x.jsxs("select",{...p,id:w,name:w,value:p.value,required:e,ref:Fa(m,g),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:Ne("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",p.className),children:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(T=>x.jsx("option",{...T,children:T.label??T.value},`${w}-select-option-${T.value}`))]})})}),su=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t},oM=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=su(r.onChange);b.useImperativeHandle(o,()=>c.current),b.useEffect(()=>{if(c.current!==null&&u.current){const h=d=>{d.target.checked=!d.target.checked,u.current&&u.current(d)};return c.current.addEventListener("change",h),()=>{var d;return(d=c.current)==null?void 0:d.removeEventListener("change",h)}}},[]);const f=()=>{var d,p;const h=!((d=c.current)!=null&&d.checked);a(h),(p=r==null?void 0:r.onCheck)==null||p.call(r,h),c.current!==null&&(c.current.checked=h,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:Ne("flex flex-wrap items-center",t),children:[x.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||i,onChange:h=>a(h.target.checked),ref:c,type:"checkbox"}),x.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":l,"data-checked":l,"aria-labelledby":`${i}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:x.jsx("span",{"aria-hidden":"true","data-checked":l,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),x.jsx("label",{htmlFor:r.id||i,className:"ml-3 inline-block text-sm",id:`${i}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})}),x.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),iM=e=>{const[t,n]=tC();return b.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const s=i.target,a=Array.from(r.querySelectorAll("input")),l=a.every(u=>u.checked&&u.getAttribute("data-task")==="true"),c=a.indexOf(s);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,10,-10,0]},{duration:.5,delay:sC(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,ref:t})},Ws=0,zn=1,go=2,gv=4;function pi(e,t){return n=>e(t(n))}function sM(e,t){return t(e)}function yv(e,t){return n=>e(t,n)}function vv(e,t){return()=>e(t)}function zs(e,t){return t(e),e}function je(...e){return e}function aM(e){e()}function bv(e){return()=>e}function lM(...e){return()=>{e.map(aM)}}function au(e){return e!==void 0}function hr(){}function ke(e,t){return e(zn,t)}function de(e,t){e(Ws,t)}function lu(e){e(go)}function Tt(e){return e(gv)}function se(e,t){return ke(e,yv(t,Ws))}function ln(e,t){const n=e(zn,r=>{n(),t(r)});return n}function ye(){const e=[];return(t,n)=>{switch(t){case go:e.splice(0,e.length);return;case zn:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case Ws:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function X(e){let t=e;const n=ye();return(r,o)=>{switch(r){case zn:o(t);break;case Ws:t=o;break;case gv:return t}return n(r,o)}}function cM(e){let t,n;const r=()=>t&&t();return function(o,i){switch(o){case zn:return i?n===i?void 0:(r(),n=i,t=ke(e,i),t):(r(),hr);case go:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Vt(e){return zs(ye(),t=>se(e,t))}function Et(e,t){return zs(X(t),n=>se(e,n))}function uM(...e){return t=>e.reduceRight(sM,t)}function q(e,...t){const n=uM(...t);return(r,o)=>{switch(r){case zn:return ke(e,n(o));case go:lu(e);return}}}function wv(e,t){return e===t}function Re(e=wv){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ce(e){return t=>n=>{e(n)&&t(n)}}function re(e){return t=>pi(t,e)}function cn(e){return t=>()=>t(e)}function un(e,t){return n=>r=>n(t=e(t,r))}function yo(e){return t=>n=>{e>0?e--:t(n)}}function Gn(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function xv(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function he(...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);ke(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 Sv(...e){return function(t,n){switch(t){case zn:return lM(...e.map(r=>ke(r,n)));case go:return;default:throw new Error(`unrecognized action ${t}`)}}}function ue(e,t=wv){return q(e,Re(t))}function dt(...e){const t=ye(),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);ke(i,l=>{n[s]=l,r=r|a,r===o&&de(t,n)})}),function(i,s){switch(i){case zn:return r===o&&s(n),ke(t,s);case go:return lu(t);default:throw new Error(`unrecognized action ${i}`)}}}function Ce(e,t=[],{singleton:n}={singleton:!0}){return{id:fM(),constructor:e,dependencies:t,singleton:n}}const fM=()=>Symbol();function dM(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 hM(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 Gs=typeof document<"u"?b.useLayoutEffect:b.useEffect;function cu(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(g,w){g.propsReady&&de(g.propsReady,!1);for(const y of r){const T=g[t.required[y]];de(T,w[y])}for(const y of o)if(y in w){const T=g[t.optional[y]];de(T,w[y])}g.propsReady&&de(g.propsReady,!0)}function c(g){return i.reduce((w,y)=>(w[y]=T=>{const S=g[t.methods[y]];de(S,T)},w),{})}function u(g){return s.reduce((w,y)=>(w[y]=cM(g[t.events[y]]),w),{})}const f=b.forwardRef((g,w)=>{const{children:y,...T}=g,[S]=b.useState(()=>zs(dM(e),A=>l(A,T))),[E]=b.useState(vv(u,S));return Gs(()=>{for(const A of s)A in T&&ke(E[A],T[A]);return()=>{Object.values(E).map(lu)}},[T,E,S]),Gs(()=>{l(S,T)}),b.useImperativeHandle(w,bv(c(S))),b.createElement(a.Provider,{value:S},n?b.createElement(n,hM([...r,...o,...s],T),y):y)}),h=g=>b.useCallback(yv(de,b.useContext(a)[g]),[g]),d=g=>{const y=b.useContext(a)[g],T=b.useCallback(S=>ke(y,S),[y]);return b.useSyncExternalStore(T,()=>Tt(y),()=>Tt(y))},p=g=>{const y=b.useContext(a)[g],[T,S]=b.useState(vv(Tt,y));return Gs(()=>ke(y,E=>{E!==T&&S(bv(E))}),[y,T]),T},m=b.version.startsWith("18")?d:p;return{Component:f,usePublisher:h,useEmitterValue:m,useEmitter:(g,w)=>{const T=b.useContext(a)[g];Gs(()=>ke(T,w),[w,T])}}}const pM=typeof document<"u"?b.useLayoutEffect:b.useEffect;var $t=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))($t||{});const mM={0:"debug",1:"log",2:"warn",3:"error"},gM=()=>typeof globalThis>"u"?window:globalThis,Un=Ce(()=>{const e=X(3);return{log:X((n,r,o=1)=>{var i;const s=(i=gM().VIRTUOSO_LOG_LEVEL)!=null?i:Tt(e);o>=s&&console[mM[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function uu(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 fn(e,t=!0){return uu(e,t).callbackRef}function Tv(e,t,n,r,o,i,s){const a=b.useCallback(l=>{const c=yM(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const f=u.lastElementChild.dataset.viewportType==="window",h=s?s.scrollTop:f?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,d=s?s.scrollHeight:f?document.documentElement.scrollHeight:u.scrollHeight,p=s?s.offsetHeight:f?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(h,0),scrollHeight:d,viewportHeight:p}),i==null||i(vM("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,i,s,r]);return uu(a,n)}function yM(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},$t.ERROR),u===c)continue;const f=i[i.length-1];i.length===0||f.size!==u||f.endIndex!==l-1?i.push({startIndex:l,endIndex:l,size:u}):i[i.length-1].endIndex++}return i}function vM(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,$t.WARN),t==="normal"?0:parseInt(t??"0",10)}function Gt(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ev(e,t){return Math.abs(e-t)<1.01}function Cv(e,t,n,r=hr,o){const i=b.useRef(null),s=b.useRef(null),a=b.useRef(null),l=b.useCallback(f=>{const h=f.target,d=h===window||h===document,p=d?window.pageYOffset||document.documentElement.scrollTop:h.scrollTop,m=d?document.documentElement.scrollHeight:h.scrollHeight,v=d?window.innerHeight:h.offsetHeight,g=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:v})};f.suppressFlushSync?g():Zu.flushSync(g),s.current!==null&&(p===s.current||p<=0||p===m-v)&&(s.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);b.useEffect(()=>{const f=o||i.current;return r(o||i.current),l({target:f,suppressFlushSync:!0}),f.addEventListener("scroll",l,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",l)}},[i,l,n,r,o]);function c(f){const h=i.current;if(!h||"offsetHeight"in h&&h.offsetHeight===0)return;const d=f.behavior==="smooth";let p,m,v;h===window?(m=Math.max(Gt(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,v=document.documentElement.scrollTop):(m=h.scrollHeight,p=Gt(h,"height"),v=h.scrollTop);const g=m-p;if(f.top=Math.ceil(Math.max(Math.min(g,f.top),0)),Ev(p,m)||f.top===v){e({scrollTop:v,scrollHeight:m,viewportHeight:p}),d&&t(!0);return}d?(s.current=f.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,h.scrollTo(f)}function u(f){i.current.scrollBy(f)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:c}}const It=Ce(()=>{const e=ye(),t=ye(),n=X(0),r=ye(),o=X(0),i=ye(),s=ye(),a=X(0),l=X(0),c=X(0),u=X(0),f=ye(),h=ye(),d=X(!1);return se(q(e,re(({scrollTop:p})=>p)),t),se(q(e,re(({scrollHeight:p})=>p)),s),se(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:i,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:f,scrollBy:h,statefulScrollTop:o,deviation:n,scrollingInProgress:d}},[],{singleton:!0}),mi={lvl:0};function Pv(e,t,n,r=mi,o=mi){return{k:e,v:t,lvl:n,l:r,r:o}}function Le(e){return e===mi}function vo(){return mi}function fu(e,t){if(Le(e))return mi;const{k:n,l:r,r:o}=e;if(t===n){if(Le(r))return o;if(Le(o))return r;{const[i,s]=Iv(r);return Us(lt(e,{k:i,v:s,l:Av(r)}))}}else return t<n?Us(lt(e,{l:fu(r,t)})):Us(lt(e,{r:fu(o,t)}))}function gi(e,t){if(!Le(e))return t===e.k?e.v:t<e.k?gi(e.l,t):gi(e.r,t)}function Ut(e,t,n="k"){if(Le(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Ut(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Ut(e.l,t,n)}function Bt(e,t,n){return Le(e)?Pv(t,n,1):t===e.k?lt(e,{k:t,v:n}):t<e.k?Ov(lt(e,{l:Bt(e.l,t,n)})):Ov(lt(e,{r:Bt(e.r,t,n)}))}function du(e,t,n){if(Le(e))return[];const{k:r,v:o,l:i,r:s}=e;let a=[];return r>t&&(a=a.concat(du(i,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(du(s,t,n))),a}function pr(e){return Le(e)?[]:[...pr(e.l),{k:e.k,v:e.v},...pr(e.r)]}function Iv(e){return Le(e.r)?[e.k,e.v]:Iv(e.r)}function Av(e){return Le(e.r)?e.l:Us(lt(e,{r:Av(e.r)}))}function lt(e,t){return Pv(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 hu(e){return Le(e)||e.lvl>e.r.lvl}function Ov(e){return pu(Dv(e))}function Us(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(hu(t))return Dv(lt(e,{lvl:r-1}));if(!Le(t)&&!Le(t.r))return lt(t.r,{l:lt(t,{r:t.r.l}),r:lt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(hu(e))return pu(lt(e,{lvl:r-1}));if(!Le(n)&&!Le(n.l)){const o=n.l,i=hu(o)?n.lvl-1:n.lvl;return lt(o,{l:lt(e,{r:o.l,lvl:r-1}),r:pu(lt(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Ys(e,t,n){if(Le(e))return[];const r=Ut(e,t)[0];return bM(du(e,r,n))}function kv(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 bM(e){return kv(e,({k:t,v:n})=>({index:t,value:n}))}function pu(e){const{r:t,lvl:n}=e;return!Le(t)&&!Le(t.r)&&t.lvl===n&&t.r.lvl===n?lt(t,{l:lt(e,{r:t.l}),lvl:n+1}):e}function Dv(e){const{l:t}=e;return!Le(t)&&t.lvl===e.lvl?lt(t,{r:lt(e,{l:t.r})}):e}function qs(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 Mv(e,t,n){return e[qs(e,t,n)]}function wM(e,t,n,r){const o=qs(e,t,r),i=qs(e,n,r,o);return e.slice(o,i+1)}const mu=Ce(()=>({recalcInProgress:X(!1)}),[],{singleton:!0});function xM(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 Fv(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 SM(e,t){let n=Le(e)?0:1/0;for(const r of t){const{size:o,startIndex:i,endIndex:s}=r;if(n=Math.min(n,i),Le(e)){e=Bt(e,0,o);continue}const a=Ys(e,i-1,s+1);if(a.some(xM(r)))continue;let l=!1,c=!1;for(const{start:u,end:f,value:h}of a)l?(s>=u||o===h)&&(e=fu(e,u)):(c=h!==o,l=!0),f>s&&s>=u&&h!==o&&(e=Bt(e,s+1,h));c&&(e=Bt(e,i,o))}return[e,n]}function TM(){return{offsetTree:[],sizeTree:vo(),groupOffsetTree:vo(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function gu({index:e},t){return t===e?0:t<e?-1:1}function EM({offset:e},t){return t===e?0:t<e?-1:1}function CM(e){return{index:e.index,value:e}}function PM(e,t,n,r=0){return r>0&&(t=Math.max(t,Mv(e,r,gu).offset)),kv(wM(e,t,n,EM),CM)}function yu(e,t,n,r){let o=e,i=0,s=0,a=0,l=0;if(t!==0){l=qs(o,t-1,gu),a=o[l].offset;const u=Ut(n,t-1);i=u[0],s=u[1],o.length&&o[l].size===Ut(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Ys(n,t,1/0)){const f=c-i,h=f*s+a+f*r;o.push({offset:h,size:u,index:c}),i=c,a=h,s=u}return{offsetTree:o,lastIndex:i,lastOffset:a,lastSize:s}}function IM(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,$t.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&Le(i)&&t.length===2){const h=t[0].size,d=t[1].size;s=n.reduce((p,m)=>Bt(Bt(p,m,h),m+1,d),s)}else[s,a]=SM(s,t);if(s===i)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:f}=yu(e.offsetTree,a,s,o);return{sizeTree:s,offsetTree:l,lastIndex:c,lastOffset:f,lastSize:u,groupOffsetTree:n.reduce((h,d)=>Bt(h,d,yi(d,l,o)),vo()),groupIndices:n}}function yi(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:i}=Mv(t,e,gu),s=e-o,a=i*s+(s-1)*n+r;return a>0?a+n:a}function AM(e){return typeof e.groupIndex<"u"}function Lv(e,t,n){if(AM(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Nv(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Nv(e,t){if(!Ks(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Ks(e){return!Le(e.groupOffsetTree)}function OM(e){return pr(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 kM={offsetHeight:"height",offsetWidth:"width"},dn=Ce(([{log:e},{recalcInProgress:t}])=>{const n=ye(),r=ye(),o=Et(r,0),i=ye(),s=ye(),a=X(0),l=X([]),c=X(void 0),u=X(void 0),f=X((S,E)=>Gt(S,kM[E])),h=X(void 0),d=X(0),p=TM(),m=Et(q(n,he(l,e,d),un(IM,p),Re()),p),v=Et(q(l,Re(),un((S,E)=>({prev:S.current,current:E}),{prev:[],current:[]}),re(({prev:S})=>S)),[]);se(q(l,ce(S=>S.length>0),he(m,d),re(([S,E,A])=>{const P=S.reduce((O,C,_)=>Bt(O,C,yi(C,E.offsetTree,A)||_),vo());return{...E,groupIndices:S,groupOffsetTree:P}})),m),se(q(r,he(m),ce(([S,{lastIndex:E}])=>S<E),re(([S,{lastIndex:E,lastSize:A}])=>[{startIndex:S,endIndex:E,size:A}])),n),se(c,u);const g=Et(q(c,re(S=>S===void 0)),!0);se(q(u,ce(S=>S!==void 0&&Le(Tt(m).sizeTree)),re(S=>[{startIndex:0,endIndex:0,size:S}])),n);const w=Vt(q(n,he(m),un(({sizes:S},[E,A])=>({changed:A!==S,sizes:A}),{changed:!1,sizes:p}),re(S=>S.changed)));ke(q(a,un((S,E)=>({diff:S.prev-E,prev:E}),{diff:0,prev:0}),re(S=>S.diff)),S=>{const{groupIndices:E}=Tt(m);if(S>0)de(t,!0),de(i,S+Fv(S,E));else if(S<0){const A=Tt(v);A.length>0&&(S-=Fv(-S,A)),de(s,S)}}),ke(q(a,he(e)),([S,E])=>{S<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},$t.ERROR)});const y=Vt(i);se(q(i,he(m),re(([S,E])=>{const A=E.groupIndices.length>0,P=[],O=E.lastSize;if(A){const C=gi(E.sizeTree,0);let _=0,F=0;for(;_<S;){const D=E.groupIndices[F],L=E.groupIndices.length===F+1?1/0:E.groupIndices[F+1]-D-1;P.push({startIndex:D,endIndex:D,size:C}),P.push({startIndex:D+1,endIndex:D+1+L-1,size:O}),F++,_+=L+1}const V=pr(E.sizeTree);return _!==S&&V.shift(),V.reduce((D,{k:L,v:$})=>{let z=D.ranges;return D.prevSize!==0&&(z=[...D.ranges,{startIndex:D.prevIndex,endIndex:L+S-1,size:D.prevSize}]),{ranges:z,prevIndex:L+S,prevSize:$}},{ranges:P,prevIndex:S,prevSize:0}).ranges}return pr(E.sizeTree).reduce((C,{k:_,v:F})=>({ranges:[...C.ranges,{startIndex:C.prevIndex,endIndex:_+S-1,size:C.prevSize}],prevIndex:_+S,prevSize:F}),{ranges:[],prevIndex:0,prevSize:O}).ranges})),n);const T=Vt(q(s,he(m,d),re(([S,{offsetTree:E},A])=>{const P=-S;return yi(P,E,A)})));return se(q(s,he(m,d),re(([S,E,A])=>{if(E.groupIndices.length>0){if(Le(E.sizeTree))return E;let O=vo();const C=Tt(v);let _=0,F=0,V=0;for(;_<-S;){V=C[F];const D=C[F+1]-V-1;F++,_+=D+1}if(O=pr(E.sizeTree).reduce((D,{k:L,v:$})=>Bt(D,Math.max(0,L+S),$),O),_!==-S){const D=gi(E.sizeTree,V);O=Bt(O,0,D);const L=Ut(E.sizeTree,-S+1)[1];O=Bt(O,1,L)}return{...E,sizeTree:O,...yu(E.offsetTree,0,O,A)}}else{const O=pr(E.sizeTree).reduce((C,{k:_,v:F})=>Bt(C,Math.max(0,_+S),F),vo());return{...E,sizeTree:O,...yu(E.offsetTree,0,O,A)}}})),m),{data:h,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:i,shiftWith:s,shiftWithOffset:T,beforeUnshiftWith:y,firstItemIndex:a,gap:d,sizes:m,listRefresh:w,statefulTotalCount:o,trackItemSizes:g,itemSize:f}},je(Un,mu),{singleton:!0}),DM=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function _v(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!DM)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const vi=Ce(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:f},{log:h}])=>{const d=ye(),p=ye(),m=X(0);let v=null,g=null,w=null;function y(){v&&(v(),v=null),w&&(w(),w=null),g&&(clearTimeout(g),g=null),de(o,!1)}return se(q(d,he(e,i,t,m,l,c,h),he(r,u,f),re(([[T,S,E,A,P,O,C,_],F,V,I])=>{const D=_v(T),{align:L,behavior:$,offset:z}=D,G=A-1,k=Lv(D,S,G);let j=yi(k,S.offsetTree,F)+O;L==="end"?(j+=V+Ut(S.sizeTree,k)[1]-E+I,k===G&&(j+=C)):L==="center"?j+=(V+Ut(S.sizeTree,k)[1]-E+I)/2:j-=P,z&&(j+=z);const K=te=>{y(),te?(_("retrying to scroll to",{location:T},$t.DEBUG),de(d,T)):(de(p,!0),_("list did not change, scroll successful",{},$t.DEBUG))};if(y(),$==="smooth"){let te=!1;w=ke(n,Q=>{te=te||Q}),v=ln(a,()=>{K(te)})}else v=ln(q(n,MM(150)),K);return g=setTimeout(()=>{y()},1200),de(o,!0),_("scrolling from index to",{index:k,top:j,behavior:$},$t.DEBUG),{top:j,behavior:$}})),s),{scrollToIndex:d,scrollTargetReached:p,topListHeight:m}},je(dn,It,Un),{singleton:!0});function MM(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const bi="up",wi="down",FM="none",LM={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},NM=0,xi=Ce(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:i}])=>{const s=X(!1),a=X(!0),l=ye(),c=ye(),u=X(4),f=X(NM),h=Et(q(Sv(q(ue(t),yo(1),cn(!0)),q(ue(t),yo(1),cn(!1),xv(100))),Re()),!1),d=Et(q(Sv(q(i,cn(!0)),q(i,cn(!1),xv(200))),Re()),!1);se(q(dt(ue(t),ue(f)),re(([w,y])=>w<=y),Re()),a),se(q(a,Gn(50)),c);const p=Vt(q(dt(e,ue(n),ue(r),ue(o),ue(u)),un((w,[{scrollTop:y,scrollHeight:T},S,E,A,P])=>{const O=y+S-T>-P,C={viewportHeight:S,scrollTop:y,scrollHeight:T};if(O){let F,V;return y>w.state.scrollTop?(F="SCROLLED_DOWN",V=w.state.scrollTop-y):(F="SIZE_DECREASED",V=w.state.scrollTop-y||w.scrollTopDelta),{atBottom:!0,state:C,atBottomBecause:F,scrollTopDelta:V}}let _;return C.scrollHeight>w.state.scrollHeight?_="SIZE_INCREASED":S<w.state.viewportHeight?_="VIEWPORT_HEIGHT_DECREASING":y<w.state.scrollTop?_="SCROLLING_UPWARDS":_="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:_,state:C}},LM),Re((w,y)=>w&&w.atBottom===y.atBottom))),m=Et(q(e,un((w,{scrollTop:y,scrollHeight:T,viewportHeight:S})=>{if(Ev(w.scrollHeight,T))return{scrollTop:y,scrollHeight:T,jump:0,changed:!1};{const E=T-(y+S)<1;return w.scrollTop!==y&&E?{scrollHeight:T,scrollTop:y,jump:w.scrollTop-y,changed:!0}:{scrollHeight:T,scrollTop:y,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),ce(w=>w.changed),re(w=>w.jump)),0);se(q(p,re(w=>w.atBottom)),s),se(q(s,Gn(50)),l);const v=X(wi);se(q(e,re(({scrollTop:w})=>w),Re(),un((w,y)=>Tt(d)?{direction:w.direction,prevScrollTop:y}:{direction:y<w.prevScrollTop?bi:wi,prevScrollTop:y},{direction:wi,prevScrollTop:0}),re(w=>w.direction)),v),se(q(e,Gn(50),cn(FM)),v);const g=X(0);return se(q(h,ce(w=>!w),cn(0)),g),se(q(t,Gn(100),he(h),ce(([w,y])=>!!y),un(([w,y],[T])=>[y,T],[0,0]),re(([w,y])=>y-w)),g),{isScrolling:h,isAtTop:a,isAtBottom:s,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:v,atBottomThreshold:u,atTopThreshold:f,scrollVelocity:g,lastJumpDueToItemResize:m}},je(It)),Yn=Ce(([{log:e}])=>{const t=X(!1),n=Vt(q(t,ce(r=>r),Re()));return ke(t,r=>{r&&Tt(e)("props updated",{},$t.DEBUG)}),{propsReady:t,didMount:n}},je(Un),{singleton:!0});function vu(e,t){e==0?t():requestAnimationFrame(()=>vu(e-1,t))}function bu(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Si=Ce(([{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 se(q(s,he(l),ce(([u,f])=>!!f),cn(!1)),a),se(q(s,he(l),ce(([u,f])=>!!f),cn(!1)),c),ke(q(dt(t,s),he(a,e,n,c),ce(([[,u],f,{sizeTree:h},d,p])=>u&&(!Le(h)||au(d))&&!f&&!p),he(l)),([,u])=>{ln(i,()=>{de(c,!0)}),vu(4,()=>{ln(r,()=>{de(a,!0)}),de(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},je(dn,It,vi,Yn),{singleton:!0});function Vv(e){return e?e==="smooth"?"smooth":"auto":!1}const _M=(e,t)=>typeof e=="function"?Vv(e(t)):t&&Vv(e),VM=Ce(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=X(!1),f=ye();let h=null;function d(m){de(o,{index:"LAST",align:"end",behavior:m})}ke(q(dt(q(ue(e),yo(1)),a),he(ue(u),n,i,c),re(([[m,v],g,w,y,T])=>{let S=v&&y,E="auto";return S&&(E=_M(g,w||T),S=S&&!!E),{totalCount:m,shouldFollow:S,followOutputBehavior:E}}),ce(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:v})=>{h&&(h(),h=null),h=ln(t,()=>{Tt(l)("following output to ",{totalCount:m},$t.DEBUG),d(v),h=null})});function p(m){const v=ln(r,g=>{m&&!g.atBottom&&g.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(Tt(l)("scrolling to bottom due to increased size",{},$t.DEBUG),d("auto"))});setTimeout(v,100)}return ke(q(dt(ue(u),e,s),ce(([m,,v])=>m&&v),un(({value:m},[,v])=>({refreshed:m===v,value:v}),{refreshed:!1,value:0}),ce(({refreshed:m})=>m),he(u,e)),([,m])=>{Tt(i)&&p(m!==!1)}),ke(f,()=>{p(Tt(u)!==!1)}),ke(dt(ue(u),r),([m,v])=>{m&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&d("auto")}),{followOutput:u,autoscrollToBottom:f}},je(dn,xi,vi,Si,Yn,Un,It));function $M(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const $v=Ce(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const i=ye(),s=ye(),a=Vt(q(i,re($M)));return se(q(a,re(l=>l.totalCount)),e),se(q(a,re(l=>l.groupIndices)),t),se(q(dt(r,n,o),ce(([l,c])=>Ks(c)),re(([l,c,u])=>Ut(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Re(),re(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},je(dn,It));function Ti(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Bv(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Xs="top",Qs="bottom",jv="none";function Rv(e,t,n){return typeof e=="number"?n===bi&&t===Xs||n===wi&&t===Qs?e:0:n===bi?t===Xs?e.main:e.reverse:t===Qs?e.main:e.reverse}function Hv(e,t){return typeof e=="number"?e:e[t]||0}const wu=Ce(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const i=ye(),s=X(0),a=X(0),l=X(0),c=Et(q(dt(ue(e),ue(t),ue(r),ue(i,Ti),ue(l),ue(s),ue(o),ue(n),ue(a)),re(([u,f,h,[d,p],m,v,g,w,y])=>{const T=u-w,S=v+g,E=Math.max(h-T,0);let A=jv;const P=Hv(y,Xs),O=Hv(y,Qs);return d-=w,d+=h+g,p+=h+g,p-=w,d>u+S-P&&(A=bi),p<u-E+f+O&&(A=wi),A!==jv?[Math.max(T-h-Rv(m,Xs,A)-P,0),T-E-g+f+Rv(m,Qs,A)+O]:null}),ce(u=>u!=null),Re(Ti)),[0,0]);return{listBoundary:i,overscan:l,topListHeight:s,increaseViewportBy:a,visibleRange:c}},je(It),{singleton:!0});function BM(e,t,n){if(Ks(t)){const r=Nv(e,t);return[{index:Ut(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 xu={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Wv(e,t,n){if(e.length===0)return[];if(!Ks(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=Ys(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 Zs(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 f=n-l,h=a+f*s+(f-1)*r,d=c,p=h-u;return{items:Wv(e,o,i),topItems:Wv(t,o,i),topListHeight:t.reduce((m,v)=>v.size+m,0),offsetTop:c,offsetBottom:p,top:d,bottom:u,totalCount:n,firstItemIndex:i}}function zv(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=bu(t,a),c=Array.from({length:a}).map((u,f)=>({index:f+l,size:0,offset:0,data:i[f+l]}));return Zs(c,[],a,o,n,r)}const mr=Ce(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},i,{visibleRange:s,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:f},h,{didMount:d},{recalcInProgress:p}])=>{const m=X([]),v=X(0),g=ye();se(i.topItemsIndexes,m);const w=Et(q(dt(d,p,ue(s,Ti),ue(t),ue(e),ue(u),c,ue(m),ue(r),ue(o),n),ce(([E,A,,P,,,,,,,O])=>{const C=O&&O.length!==P;return E&&!A&&!C}),re(([,,[E,A],P,O,C,_,F,V,I,D])=>{const L=O,{sizeTree:$,offsetTree:z}=L,G=Tt(v);if(P===0)return{...xu,totalCount:P};if(E===0&&A===0)return G===0?{...xu,totalCount:P}:zv(G,C,O,V,I,D||[]);if(Le($))return G>0?null:Zs(BM(bu(C,P),L,D),[],P,I,L,V);const k=[];if(F.length>0){const U=F[0],N=F[F.length-1];let R=0;for(const W of Ys($,U,N)){const B=W.value,Y=Math.max(W.start,U),ee=Math.min(W.end,N);for(let H=Y;H<=ee;H++)k.push({index:H,size:B,offset:R,data:D&&D[H]}),R+=B}}if(!_)return Zs([],k,P,I,L,V);const j=F.length>0?F[F.length-1]+1:0,K=PM(z,E,A,j);if(K.length===0)return null;const te=P-1,Q=zs([],U=>{for(const N of K){const R=N.value;let W=R.offset,B=N.start;const Y=R.size;if(R.offset<E){B+=Math.floor((E-R.offset+I)/(Y+I));const H=B-N.start;W+=H*Y+H*I}B<j&&(W+=(j-B)*Y,B=j);const ee=Math.min(N.end,te);for(let H=B;H<=ee&&!(W>=A);H++)U.push({index:H,size:Y,offset:W,data:D&&D[H]}),W+=Y+I}});return Zs(Q,k,P,I,L,V)}),ce(E=>E!==null),Re()),xu);se(q(n,ce(au),re(E=>E==null?void 0:E.length)),t),se(q(w,re(E=>E.topListHeight)),f),se(f,l),se(q(w,re(E=>[E.top,E.bottom])),a),se(q(w,re(E=>E.items)),g);const y=Vt(q(w,ce(({items:E})=>E.length>0),he(t,n),ce(([{items:E},A])=>E[E.length-1].originalIndex===A-1),re(([,E,A])=>[E-1,A]),Re(Ti),re(([E])=>E))),T=Vt(q(w,Gn(200),ce(({items:E,topItems:A})=>E.length>0&&E[0].originalIndex===A.length),re(({items:E})=>E[0].index),Re())),S=Vt(q(w,ce(({items:E})=>E.length>0),re(({items:E})=>{let A=0,P=E.length-1;for(;E[A].type==="group"&&A<P;)A++;for(;E[P].type==="group"&&P>A;)P--;return{startIndex:E[A].index,endIndex:E[P].index}}),Re(Bv)));return{listState:w,topItemsIndexes:m,endReached:y,startReached:T,rangeChanged:S,itemsRendered:g,initialItemCount:v,...h}},je(dn,$v,wu,Si,vi,xi,Yn,mu),{singleton:!0}),jM=Ce(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(se(q(a,he(i),ce(([,l])=>l!==0),he(o,e,t,r,n),re(([[,l],c,u,f,h,d=[]])=>zv(l,c,u,f,h,d))),s),{}),je(dn,Si,mr,Yn),{singleton:!0}),Gv=Ce(([{scrollVelocity:e}])=>{const t=X(!1),n=ye(),r=X(!1);return se(q(e,he(r,t,n),ce(([o,i])=>!!i),re(([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}),Re()),t),ke(q(dt(t,e,n),he(r)),([[o,i,s],a])=>o&&a&&a.change&&a.change(i,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},je(xi),{singleton:!0}),RM=Ce(([{topItemsIndexes:e}])=>{const t=X(0);return se(q(t,ce(n=>n>0),re(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},je(mr)),Uv=Ce(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const i=ye(),s=Et(q(dt(e,r,t,n,o),re(([a,l,c,u,f])=>a+l+c+u+f.offsetBottom+f.bottom)),0);return se(ue(s),i),{totalListHeight:s,totalListHeightChanged:i}},je(It,mr),{singleton:!0});function Yv(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const HM=Yv(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),WM=Ce(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:f,gap:h},{log:d},{recalcInProgress:p}])=>{const m=Vt(q(l,he(a),un(([,g,w,y],[{items:T,totalCount:S,bottom:E,offsetBottom:A},P])=>{const O=E+A;let C=0;return w===S&&g.length>0&&T.length>0&&(T[0].originalIndex===0&&g[0].originalIndex===0||(C=O-y,C!==0&&(C+=P))),[C,T,S,O]},[0,[],0,0]),ce(([g])=>g!==0),he(t,s,r,i,d,p),ce(([,g,w,y,,,T])=>!T&&!y&&g!==0&&w===bi),re(([[g],,,,,w])=>(w("Upward scrolling compensation",{amount:g},$t.DEBUG),g))));function v(g){g>0?(de(e,{top:-g,behavior:"auto"}),de(n,0)):(de(n,0),de(e,{top:-g,behavior:"auto"}))}return ke(q(m,he(n,o)),([g,w,y])=>{y&&HM()?de(n,w-g):v(-g)}),ke(q(dt(Et(o,!1),n,p),ce(([g,w,y])=>!g&&!y&&w!==0),re(([g,w])=>w),Gn(1)),v),se(q(u,re(g=>({top:-g}))),e),ke(q(c,he(f,h),re(([g,{lastSize:w,groupIndices:y,sizeTree:T},S])=>{function E(A){return A*(w+S)}if(y.length===0)return E(g);{let A=0;const P=gi(T,0);let O=0,C=0;for(;O<g;){O++,A+=P;let _=y.length===C+1?1/0:y[C+1]-y[C]-1;O+_>g&&(A-=P,_=g-O+1),O+=_,A+=E(_),C++}return A}})),g=>{de(n,g),requestAnimationFrame(()=>{de(e,{top:g}),requestAnimationFrame(()=>{de(n,0),de(p,!1)})})}),{deviation:n}},je(It,xi,mr,dn,Un,mu)),zM=Ce(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=X(0);return ke(q(e,he(r),ce(([,o])=>o!==0),re(([,o])=>({top:o}))),o=>{ln(q(n,yo(1),ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{de(t,o)})})}),{initialScrollTop:r}},je(Yn,It,mr),{singleton:!0}),GM=Ce(([{viewportHeight:e},{totalListHeight:t}])=>{const n=X(!1),r=Et(q(dt(n,e,t),ce(([o])=>o),re(([,o,i])=>Math.max(0,o-i)),Gn(0),Re()),0);return{alignToBottom:n,paddingTopAddition:r}},je(It,Uv),{singleton:!0}),Su=Ce(([{scrollTo:e,scrollContainerState:t}])=>{const n=ye(),r=ye(),o=ye(),i=X(!1),s=X(void 0);return se(q(dt(n,r),re(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),se(q(e,he(r),re(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},je(It)),UM=({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,YM=Ce(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=ye();return se(q(u,he(e,o,t,i,s,a,r),he(n),re(([[f,h,d,p,m,v,g,w],y])=>{const{done:T,behavior:S,align:E,calculateViewLocation:A=UM,...P}=f,O=Lv(f,h,p-1),C=yi(O,h.offsetTree,y)+m+v,_=C+Ut(h.sizeTree,O)[1],F=w+v,V=w+d-g,I=A({itemTop:C,itemBottom:_,viewportTop:F,viewportBottom:V,locationParams:{behavior:S,align:E,...P}});return I?T&&ln(q(l,ce(D=>D===!1),yo(Tt(l)?1:2)),T):T&&T(),I}),ce(f=>f!==null)),c),{scrollIntoView:u}},je(dn,It,vi,mr,Un),{singleton:!0}),qM=Ce(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=ye(),u=X(void 0),f=X(null),h=X(null);return se(a,f),se(l,h),ke(q(c,he(e,n,s,f,h,r)),([d,p,m,v,g,w,y])=>{const T=OM(p.sizeTree);v&&g!==null&&w!==null&&(m=g.scrollTop-w.offsetTop),m-=y,d({ranges:T,scrollTop:m})}),se(q(u,ce(au),re(KM)),o),se(q(i,he(u),ce(([,d])=>d!==void 0),Re(),re(([,d])=>d.ranges)),t),{getState:c,restoreStateFrom:u}},je(dn,It,Si,Yn,Su));function KM(e){return{offset:e.scrollTop,index:0,align:"start"}}const XM=Ce(([e,t,n,r,o,i,s,a,l,c])=>({...e,...t,...n,...r,...o,...i,...s,...a,...l,...c}),je(wu,jM,Yn,Gv,Uv,zM,GM,Su,YM,Un)),qv=Ce(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:i,data:s,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:f},{initialTopMostItemIndex:h,scrolledToInitialItem:d,initialItemFinalLocationReached:p},m,v,g,{listState:w,topItemsIndexes:y,...T},{scrollToIndex:S},E,{topItemCount:A},{groupCounts:P},O])=>(se(T.rangeChanged,O.scrollSeekRangeChanged),se(q(O.windowViewportRect,re(C=>C.visibleHeight)),m.viewportHeight),{totalCount:e,data:s,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:h,scrolledToInitialItem:d,initialItemFinalLocationReached:p,topItemsIndexes:y,topItemCount:A,groupCounts:P,fixedItemHeight:n,defaultItemHeight:r,gap:u,...g,statefulTotalCount:c,listState:w,scrollToIndex:S,trackItemSizes:o,itemSize:i,groupIndices:l,...T,...O,...m,sizes:f,...v}),je(dn,Si,It,qM,VM,mr,vi,WM,RM,$v,XM)),Tu="-webkit-sticky",Kv="sticky",Xv=Yv(()=>{if(typeof document>"u")return Kv;const e=document.createElement("div");return e.style.position=Tu,e.style.position===Tu?Tu:Kv});function Eu(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,f;if(t){const h=t.getBoundingClientRect(),d=l.top-h.top;u=h.height-Math.max(0,d),f=d+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),f=l.top+window.pageYOffset;n.current={offsetTop:f,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:i}=uu(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 Js=b.createContext(void 0),Qv=b.createContext(void 0);function Cu(e){return e}const QM=Ce(([e,t])=>({...e,...t}),je(qv,Ce(()=>{const e=X(l=>`Item ${l}`),t=X(null),n=X(l=>`Group ${l}`),r=X({}),o=X(Cu),i=X("div"),s=X(hr),a=(l,c=null)=>Et(q(r,re(u=>u[l]),Re()),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")}}))),ZM=({height:e})=>b.createElement("div",{style:{height:e}}),JM={position:Xv(),zIndex:1,overflowAnchor:"none"},eF={overflowAnchor:"none"},Zv=b.memo(function({showTopList:t=!1}){const n=me("listState"),r=Ht("sizeRanges"),o=me("useWindowScroll"),i=me("customScrollParent"),s=Ht("windowScrollContainerState"),a=Ht("scrollContainerState"),l=i||o?s:a,c=me("itemContent"),u=me("context"),f=me("groupContent"),h=me("trackItemSizes"),d=me("itemSize"),p=me("log"),m=Ht("gap"),{callbackRef:v}=Tv(r,d,h,t?hr:l,p,m,i),[g,w]=b.useState(0);Au("deviation",I=>{g!==I&&w(I)});const y=me("EmptyPlaceholder"),T=me("ScrollSeekPlaceholder")||ZM,S=me("ListComponent"),E=me("ItemComponent"),A=me("GroupComponent"),P=me("computeItemKey"),O=me("isSeeking"),C=me("groupIndices").length>0,_=me("alignToBottom"),F=me("initialItemFinalLocationReached"),V=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:g!==0?g:_?"auto":0,...F?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&y?b.createElement(y,Ke(y,u)):b.createElement(S,{...Ke(S,u),ref:v,style:V,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(I=>{const D=I.originalIndex,L=P(D+n.firstItemIndex,I.data,u);return O?b.createElement(T,{...Ke(T,u),key:L,index:I.index,height:I.size,type:I.type||"item",...I.type==="group"?{}:{groupIndex:I.groupIndex}}):I.type==="group"?b.createElement(A,{...Ke(A,u),key:L,"data-index":D,"data-known-size":I.size,"data-item-index":I.index,style:JM},f(I.index,u)):b.createElement(E,{...Ke(E,u),...Jv(E,I.data),key:L,"data-index":D,"data-known-size":I.size,"data-item-index":I.index,"data-item-group-index":I.groupIndex,style:eF},C?c(I.index,I.groupIndex,I.data,u):c(I.index,I.data,u))}))}),tF={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},bo=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),nF={width:"100%",position:Xv(),top:0,zIndex:1};function Ke(e,t){if(typeof e!="string")return{context:t}}function Jv(e,t){return{item:typeof e=="string"?void 0:t}}const rF=b.memo(function(){const t=me("HeaderComponent"),n=Ht("headerHeight"),r=me("headerFooterTag"),o=fn(b.useMemo(()=>s=>n(Gt(s,"height")),[n])),i=me("context");return t?b.createElement(r,{ref:o},b.createElement(t,Ke(t,i))):null}),oF=b.memo(function(){const t=me("FooterComponent"),n=Ht("footerHeight"),r=me("headerFooterTag"),o=fn(b.useMemo(()=>s=>n(Gt(s,"height")),[n])),i=me("context");return t?b.createElement(r,{ref:o},b.createElement(t,Ke(t,i))):null});function Pu({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"),f=n("scrollerRef"),h=n("context"),{scrollerRef:d,scrollByCallback:p,scrollToCallback:m}=Cv(l,u,c,f);return t("scrollTo",m),t("scrollBy",p),b.createElement(c,{ref:d,style:{...tF,...i},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...Ke(c,h)},s)})}function Iu({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"),f=n("totalListHeight"),h=n("deviation"),d=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:v,scrollToCallback:g}=Cv(l,u,c,hr,d);return pM(()=>(m.current=d||window,()=>{m.current=null}),[m,d]),t("windowScrollTo",g),t("scrollBy",v),b.createElement(c,{style:{position:"relative",...i,...f!==0?{height:f+h}:{}},"data-virtuoso-scroller":!0,...a,...Ke(c,p)},s)})}const iF=({children:e})=>{const t=b.useContext(Js),n=Ht("viewportHeight"),r=Ht("fixedItemHeight"),o=me("alignToBottom"),i=fn(b.useMemo(()=>pi(n,s=>Gt(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:bo(o),ref:i,"data-viewport-type":"element"},e)},sF=({children:e})=>{const t=b.useContext(Js),n=Ht("windowViewportRect"),r=Ht("fixedItemHeight"),o=me("customScrollParent"),i=Eu(n,o),s=me("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:bo(s),"data-viewport-type":"window"},e)},aF=({children:e})=>{const t=me("TopItemListComponent")||"div",n=me("headerHeight"),r={...nF,marginTop:`${n}px`},o=me("context");return b.createElement(t,{style:r,...Ke(t,o)},e)},lF=b.memo(function(t){const n=me("useWindowScroll"),r=me("topItemsIndexes").length>0,o=me("customScrollParent"),i=o||n?fF:uF,s=o||n?sF:iF;return b.createElement(i,{...t},r&&b.createElement(aF,null,b.createElement(Zv,{showTopList:!0})),b.createElement(s,null,b.createElement(rF,null),b.createElement(Zv,null),b.createElement(oF,null)))}),{Component:cF,usePublisher:Ht,useEmitterValue:me,useEmitter:Au}=cu(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"}},lF),uF=Pu({usePublisher:Ht,useEmitterValue:me,useEmitter:Au}),fF=Iu({usePublisher:Ht,useEmitterValue:me,useEmitter:Au}),dF=cF,eb={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},hF={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:tb,ceil:nb,floor:ea,min:Ou,max:Ei}=Math;function pF(e){return{...hF,items:e}}function rb(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 mF(e,t){return e&&e.column===t.column&&e.row===t.row}function ta(e,t){return e&&e.width===t.width&&e.height===t.height}const gF=Ce(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},f,h,{propsReady:d,didMount:p},{windowViewportRect:m,useWindowScroll:v,customScrollParent:g,windowScrollContainerState:w,windowScrollTo:y},T])=>{const S=X(0),E=X(0),A=X(eb),P=X({height:0,width:0}),O=X({height:0,width:0}),C=ye(),_=ye(),F=X(0),V=X(null),I=X({row:0,column:0}),D=ye(),L=ye(),$=X(!1),z=X(0),G=X(!0),k=X(!1);ke(q(p,he(z),ce(([N,R])=>!!R)),()=>{de(G,!1),de(E,0)}),ke(q(dt(p,G,O,P,z,k),ce(([N,R,W,B,,Y])=>N&&!R&&W.height!==0&&B.height!==0&&!Y)),([,,,,N])=>{de(k,!0),vu(1,()=>{de(C,N)}),ln(q(r),()=>{de(n,[0,0]),de(G,!0)})}),se(q(L,ce(N=>N!=null&&N.scrollTop>0),cn(0)),E),ke(q(p,he(L),ce(([,N])=>N!=null)),([,N])=>{N&&(de(P,N.viewport),de(O,N==null?void 0:N.item),de(I,N.gap),N.scrollTop>0&&(de($,!0),ln(q(r,yo(1)),R=>{de($,!1)}),de(s,{top:N.scrollTop})))}),se(q(P,re(({height:N})=>N)),o),se(q(dt(ue(P,ta),ue(O,ta),ue(I,(N,R)=>N&&N.column===R.column&&N.row===R.row),ue(r)),re(([N,R,W,B])=>({viewport:N,item:R,gap:W,scrollTop:B}))),D),se(q(dt(ue(S),t,ue(I,mF),ue(O,ta),ue(P,ta),ue(V),ue(E),ue($),ue(G),ue(z)),ce(([,,,,,,,N])=>!N),re(([N,[R,W],B,Y,ee,H,Pe,,Xe,_e])=>{const{row:Qe,column:ae}=B,{height:ge,width:ie}=Y,{width:be}=ee;if(Pe===0&&(N===0||be===0))return eb;if(ie===0){const At=bu(_e,N),yr=At===0?Math.max(Pe-1,0):At;return pF(rb(At,yr,H))}const ot=ib(be,ie,ae);let we,it;Xe?R===0&&W===0&&Pe>0?(we=0,it=Pe-1):(we=ot*ea((R+Qe)/(ge+Qe)),it=ot*nb((W+Qe)/(ge+Qe))-1,it=Ou(N-1,Ei(it,ot-1)),we=Ou(it,Ei(0,we))):(we=0,it=-1);const Z=rb(we,it,H),{top:oe,bottom:xe}=ob(ee,B,Y,Z),He=nb(N/ot),Ct=He*ge+(He-1)*Qe-xe;return{items:Z,offsetTop:oe,offsetBottom:Ct,top:oe,bottom:xe,itemHeight:ge,itemWidth:ie}})),A),se(q(V,ce(N=>N!==null),re(N=>N.length)),S),se(q(dt(P,O,A,I),ce(([N,R,{items:W}])=>W.length>0&&R.height!==0&&N.height!==0),re(([N,R,{items:W},B])=>{const{top:Y,bottom:ee}=ob(N,B,R,W);return[Y,ee]}),Re(Ti)),n);const j=X(!1);se(q(r,he(j),re(([N,R])=>R||N!==0)),j);const K=Vt(q(ue(A),ce(({items:N})=>N.length>0),he(S,j),ce(([{items:N},R,W])=>W&&N[N.length-1].index===R-1),re(([,N])=>N-1),Re())),te=Vt(q(ue(A),ce(({items:N})=>N.length>0&&N[0].index===0),cn(0),Re())),Q=Vt(q(ue(A),he($),ce(([{items:N},R])=>N.length>0&&!R),re(([{items:N}])=>({startIndex:N[0].index,endIndex:N[N.length-1].index})),Re(Bv),Gn(0)));se(Q,h.scrollSeekRangeChanged),se(q(C,he(P,O,S,I),re(([N,R,W,B,Y])=>{const ee=_v(N),{align:H,behavior:Pe,offset:Xe}=ee;let _e=ee.index;_e==="LAST"&&(_e=B-1),_e=Ei(0,_e,Ou(B-1,_e));let Qe=ku(R,Y,W,_e);return H==="end"?Qe=tb(Qe-R.height+W.height):H==="center"&&(Qe=tb(Qe-R.height/2+W.height/2)),Xe&&(Qe+=Xe),{top:Qe,behavior:Pe}})),s);const U=Et(q(A,re(N=>N.offsetBottom+N.bottom)),0);return se(q(m,re(N=>({width:N.visibleWidth,height:N.visibleHeight}))),P),{data:V,totalCount:S,viewportDimensions:P,itemDimensions:O,scrollTop:r,scrollHeight:_,overscan:e,scrollBy:i,scrollTo:s,scrollToIndex:C,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:y,useWindowScroll:v,customScrollParent:g,windowScrollContainerState:w,deviation:F,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:I,restoreStateFrom:L,...h,initialTopMostItemIndex:z,gridState:A,totalListHeight:U,...f,startReached:te,endReached:K,rangeChanged:Q,stateChanged:D,propsReady:d,stateRestoreInProgress:$,...T}},je(wu,It,xi,Gv,Yn,Su,Un));function ob(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const i=ku(e,t,n,r[0].index),s=ku(e,t,n,r[r.length-1].index)+o;return{top:i,bottom:s}}function ku(e,t,n,r){const o=ib(e.width,n.width,t.column),i=ea(r/o),s=i*n.height+Ei(0,i-1)*t.row;return s>0?s+t.row:s}function ib(e,t,n){return Ei(1,ea((e+n)/(ea(t)+n)))}const yF=Ce(([e,t])=>({...e,...t}),je(gF,Ce(()=>{const e=X(c=>`Item ${c}`),t=X({}),n=X(null),r=X("virtuoso-grid-item"),o=X("virtuoso-grid-list"),i=X(Cu),s=X("div"),a=X(hr),l=(c,u=null)=>Et(q(t,re(f=>f[c]),Re()),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")}}))),vF=b.memo(function(){const t=Ge("gridState"),n=Ge("listClassName"),r=Ge("itemClassName"),o=Ge("itemContent"),i=Ge("computeItemKey"),s=Ge("isSeeking"),a=Yt("scrollHeight"),l=Ge("ItemComponent"),c=Ge("ListComponent"),u=Ge("ScrollSeekPlaceholder"),f=Ge("context"),h=Yt("itemDimensions"),d=Yt("gap"),p=Ge("log"),m=Ge("stateRestoreInProgress"),v=fn(b.useMemo(()=>g=>{const w=g.parentElement.parentElement.scrollHeight;a(w);const y=g.firstChild;if(y){const{width:T,height:S}=y.getBoundingClientRect();h({width:T,height:S})}d({row:ab("row-gap",getComputedStyle(g).rowGap,p),column:ab("column-gap",getComputedStyle(g).columnGap,p)})},[a,h,d,p]));return m?null:b.createElement(c,{ref:v,className:n,...Ke(c,f),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(g=>{const w=i(g.index,g.data,f);return s?b.createElement(u,{key:w,...Ke(u,f),index:g.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(l,{...Ke(l,f),className:r,"data-index":g.index,key:w},o(g.index,g.data,f))}))}),bF=b.memo(function(){const t=Ge("HeaderComponent"),n=Yt("headerHeight"),r=Ge("headerFooterTag"),o=fn(b.useMemo(()=>s=>n(Gt(s,"height")),[n])),i=Ge("context");return t?b.createElement(r,{ref:o},b.createElement(t,Ke(t,i))):null}),wF=b.memo(function(){const t=Ge("FooterComponent"),n=Yt("footerHeight"),r=Ge("headerFooterTag"),o=fn(b.useMemo(()=>s=>n(Gt(s,"height")),[n])),i=Ge("context");return t?b.createElement(r,{ref:o},b.createElement(t,Ke(t,i))):null}),xF=({children:e})=>{const t=b.useContext(Qv),n=Yt("itemDimensions"),r=Yt("viewportDimensions"),o=fn(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:bo(!1),ref:o},e)},SF=({children:e})=>{const t=b.useContext(Qv),n=Yt("windowViewportRect"),r=Yt("itemDimensions"),o=Ge("customScrollParent"),i=Eu(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:bo(!1)},e)},TF=b.memo(function({...t}){const n=Ge("useWindowScroll"),r=Ge("customScrollParent"),o=r||n?CF:EF,i=r||n?SF:xF;return b.createElement(o,{...t},b.createElement(i,null,b.createElement(bF,null),b.createElement(vF,null),b.createElement(wF,null)))}),{Component:jN,usePublisher:Yt,useEmitterValue:Ge,useEmitter:sb}=cu(yF,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},TF),EF=Pu({usePublisher:Yt,useEmitterValue:Ge,useEmitter:sb}),CF=Iu({usePublisher:Yt,useEmitterValue:Ge,useEmitter:sb});function ab(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,$t.WARN),t==="normal"?0:parseInt(t??"0",10)}const PF=Ce(([e,t])=>({...e,...t}),je(qv,Ce(()=>{const e=X(l=>b.createElement("td",null,"Item $",l)),t=X(null),n=X(null),r=X(null),o=X({}),i=X(Cu),s=X(hr),a=(l,c=null)=>Et(q(o,re(u=>u[l]),Re()),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")}}))),IF=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e}})),AF=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e,padding:0,border:0}})),OF={overflowAnchor:"none"},kF=b.memo(function(){const t=De("listState"),n=qt("sizeRanges"),r=De("useWindowScroll"),o=De("customScrollParent"),i=qt("windowScrollContainerState"),s=qt("scrollContainerState"),a=o||r?i:s,l=De("itemContent"),c=De("trackItemSizes"),u=De("itemSize"),f=De("log"),{callbackRef:h,ref:d}=Tv(n,u,c,a,f,void 0,o),[p,m]=b.useState(0);Du("deviation",L=>{p!==L&&(d.current.style.marginTop=`${L}px`,m(L))});const v=De("EmptyPlaceholder"),g=De("ScrollSeekPlaceholder")||IF,w=De("FillerRow")||AF,y=De("TableBodyComponent"),T=De("TableRowComponent"),S=De("computeItemKey"),E=De("isSeeking"),A=De("paddingTopAddition"),P=De("firstItemIndex"),O=De("statefulTotalCount"),C=De("context");if(O===0&&v)return b.createElement(v,Ke(v,C));const _=t.offsetTop+A+p,F=t.offsetBottom,V=_>0?b.createElement(w,{height:_,key:"padding-top",context:C}):null,I=F>0?b.createElement(w,{height:F,key:"padding-bottom",context:C}):null,D=t.items.map(L=>{const $=L.originalIndex,z=S($+P,L.data,C);return E?b.createElement(g,{...Ke(g,C),key:z,index:L.index,height:L.size,type:L.type||"item"}):b.createElement(T,{...Ke(T,C),...Jv(T,L.data),key:z,"data-index":$,"data-known-size":L.size,"data-item-index":L.index,style:OF},l(L.index,L.data,C))});return b.createElement(y,{ref:h,"data-testid":"virtuoso-item-list",...Ke(y,C)},[V,...D,I])}),DF=({children:e})=>{const t=b.useContext(Js),n=qt("viewportHeight"),r=qt("fixedItemHeight"),o=fn(b.useMemo(()=>pi(n,i=>Gt(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:bo(!1),ref:o,"data-viewport-type":"element"},e)},MF=({children:e})=>{const t=b.useContext(Js),n=qt("windowViewportRect"),r=qt("fixedItemHeight"),o=De("customScrollParent"),i=Eu(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:bo(!1),"data-viewport-type":"window"},e)},FF=b.memo(function(t){const n=De("useWindowScroll"),r=De("customScrollParent"),o=qt("fixedHeaderHeight"),i=qt("fixedFooterHeight"),s=De("fixedHeaderContent"),a=De("fixedFooterContent"),l=De("context"),c=fn(b.useMemo(()=>pi(o,w=>Gt(w,"height")),[o])),u=fn(b.useMemo(()=>pi(i,w=>Gt(w,"height")),[i])),f=r||n?_F:NF,h=r||n?MF:DF,d=De("TableComponent"),p=De("TableHeadComponent"),m=De("TableFooterComponent"),v=s?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...Ke(p,l)},s()):null,g=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...Ke(m,l)},a()):null;return b.createElement(f,{...t},b.createElement(h,null,b.createElement(d,{style:{borderSpacing:0,overflowAnchor:"none"},...Ke(d,l)},[v,b.createElement(kF,{key:"TableBody"}),g])))}),{Component:LF,usePublisher:qt,useEmitterValue:De,useEmitter:Du}=cu(PF,{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"}},FF),NF=Pu({usePublisher:qt,useEmitterValue:De,useEmitter:Du}),_F=Iu({usePublisher:qt,useEmitterValue:De,useEmitter:Du}),VF=LF,$F=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},BF={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"})})},jF=e=>{const t=b.useRef(null),n=$F(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(fi,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(dF,{height:n,useWindowScroll:!0,data:e.source,components:BF,itemContent:(r,o)=>x.jsx(b.Fragment,{children:x.jsx(Dy,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(Ar,{children:x.jsx(Bl,{})})}),x.jsx("div",{})]})};var RF=Object.defineProperty,lb=Object.getOwnPropertySymbols,HF=Object.prototype.hasOwnProperty,WF=Object.prototype.propertyIsEnumerable,cb=(e,t,n)=>t in e?RF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zF=(e,t)=>{for(var n in t||(t={}))HF.call(t,n)&&cb(e,n,t[n]);if(lb)for(var n of lb(t))WF.call(t,n)&&cb(e,n,t[n]);return e},Mu=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},GF=(e,t,n,r)=>ra(Mu,e,t,n,r),wo=e=>typeof e=="object",qn=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!wo(e)&&!wo(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=>qn(e[r],t[r]))},UF=(e,t)=>(wo(e)||Array.isArray(e))&&t?e[t]:e,YF=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,na=e=>/[0-9.]+/.test(e),ub=e=>["string","number"].includes(typeof e),fb=e=>e==null||(e==null?void 0:e.length)===0||e==="",db={eq:qn,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:fb,notEmpty:e=>!fb(e),in:(e,t)=>Mu(t,n=>qn(e,n)),notIn:(e,t)=>hb(t,n=>!qn(e,n))},qF=e=>{if(e in db)return db[e];throw new Error("Linq - Symbol not found")},xo=(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},ra=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=qF(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},KF=(e,t,n,r)=>ra(xo,e,t,n,r),hb=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},XF=(e,t,n,r)=>ra(hb,e,t,n,r),pb=e=>{if(e===null)return null;const t=zF({},e);return Object.keys(t).forEach(n=>t[n]=wo(e[n])?pb(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},mb=(e,t)=>{if(wo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(qn(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(qn(t,r))return!0}return!1},QF=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},ZF=e=>xo(e,(t,n,r)=>wo(t)?n===r.findIndex(o=>qn(o,t)):n===r.indexOf(t)),JF=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},gb=(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())},eL=(e,t)=>gb(e,n=>n[t]),yb=(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},tL=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},nL=(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 na(e)&&na(t)?r.map(s=>Number.parseInt(s)):r},Fu=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&na(e)&&na(t)){const o=[],[i,s]=tL(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return nL(e,t,r)},rL=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Fu(r,o,1):Fu(r,i,Number.parseInt(o,10))}return ub(e)&&ub(t)?Fu(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Lu=(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},vb=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},oL=(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)},iL=(e,t,n,r)=>ra(oL,e,t,n,r),bb=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(YF(t))},wb=(e=>(e.Asc="asc",e.Desc="desc",e))(wb||{}),sL=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),aL=(e,t)=>e.sort(sL(t)),lL=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:xo(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},cL=class Qu{constructor(t=[]){this.array=t}static Range(...t){return rL(...t)}static New(t){return new Qu(t)}Where(t,n,r){return this.array=KF(this.array,t,n,r),this}Some(t,n,r){return GF(this.array,t,n,r)}All(t,n,r){return XF(this.array,t,n,r)}Reverse(){return this.array=vb(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=iL(this.array,t,n,r),this}Distinct(){return this.array=ZF(this.array),this}First(t){return t===void 0?this.array[0]:JF(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?Lu((n,r)=>n+r,0,this.array):Lu((n,r)=>n+UF(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return eL(this.array,t)}GroupWith(t){return gb(this.array,t)}Except(t){return xo(this.array,n=>!mb(t,n))}Intersect(t){return xo(this.array,n=>mb(t,n))}OrderBy(t,n){let r;return r=t?bb(this.array,t):this.array.toSorted(),this.array=n==="desc"?vb(r):r,this}Includes(t){return Mu(this.array,n=>qn(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 Lu(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(yb(this.array,n=>[t,n]))}Zip(t,n){return yb(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:xo(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Qu(pb(this.array))}ToObject(t){return QF(this.array,t)}Sort(t){return Array.isArray(t)?aL(this.array,t):bb(this.array,t)}Unique(t){return lL(this.array,t)}},xb=cL,Nu={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(v,g)=>{try{Object.keys(v).forEach(g)}catch(w){window.console.log(w)}},n=v=>v==null,r=v=>{const g=typeof v;return g==="string"||g==="number"||g==="boolean"||n(v)},o=(v,g)=>{const w=g.getItem(v);try{return JSON.parse(w)}catch{return w??null}},i=v=>Object.keys(v).reduce((g,w)=>({...g,[w]:o(w,v)}),{}),s=v=>v instanceof Date?v:typeof v=="number"?new Date(new Date*1+v*864e5):v,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(v=>v.split("=")).reduce((v,g)=>(v[decodeURIComponent(g[0].trim())]=decodeURIComponent(g[1].trim()),v),{}),c=new Set,u=()=>{const v=l();c.forEach(g=>g(v))},f=[{name:"expires",parse:v=>`expires=${s(v.expires??a)}`},{name:"maxAge",parse:v=>v.maxAge?`max-age=${s(v.expires??a)}`:""},{name:"path",parse:v=>`path=${v.path??"/"}`},{name:"sameSite",parse:v=>`samesite=${v.sameSite??"strict"}`},{name:"useSecure",parse:v=>`${v.useSecure??!0?"secure":""}`},{name:"domain",parse:v=>{const g=v.domain??"";return g===""?"":`domain=${v.multiDomain?".":""}${g}`}},{name:"partitioned",parse:v=>v.partitioned?"Partitioned":""}],h={json:l,listener:v=>(c.add(v),()=>c.delete(v)),clearListeners:()=>c.clear(),has:v=>document.cookie.split(";").some(g=>g.trim().startsWith(`${v}=`)),deleteAll:()=>{document.cookie.split(";").forEach(v=>{document.cookie=v.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:v=>{const g=h.json()[v];if(n(g))return null;try{return JSON.parse(decodeURIComponent(g))}catch{return g}},delete:v=>{document.cookie=`${encodeURIComponent(v)}=;expires=${new Date().toUTCString()}`,u()},set:(v,g,w={})=>{const y=r(g)?g:encodeURIComponent(JSON.stringify(g)),T=f.reduce((S,E)=>{const A=E.parse(w);return A===""?S:S.concat(A)},[`${encodeURIComponent(v)}=${y}`]).join(";");document.cookie=T,u()}},d=v=>{const g=new Set,w=y=>{v().removeItem(y);const T=i(v());g.forEach(S=>S(T))};return{delete:w,listener:y=>(g.add(y),()=>g.delete(y)),clearListeners:()=>g.clear(),json:(y=!1)=>y?i(v()):v(),has:y=>{const T=v().getItem(y);return!n(T)},deleteAll:()=>{t(v(),w),g.forEach(y=>y(v()))},get:y=>o(y,v()),set:(y,T)=>{v().setItem(y,JSON.stringify(T)),g.forEach(S=>S(v()))}}},p=d(()=>window.sessionStorage),m=d(()=>window.localStorage);e.Cookie=h,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=d})(Nu);const _u=e=>e.headerLabel??e.thead??e.id,Vu=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var So=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(So||{});const $u=e=>e.type==="number"?e.valueAsNumber:e.value,uL=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},fL={},dL=(e,t=fL)=>{const n=ms()?null:Nu.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=ec({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 ms()||Nu.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>s(a)}});return{...r,...o,name:e}},Bu=(e,t,n,r={})=>{var l;const o=e.id,i=e.type??So.Text,s=(l=t[i])==null?void 0:l[0].value,a=n[s];return{id:ps(),operation:a,label:_u(e),name:o,type:i,value:"",...r}},ju=()=>{const e=Mt(),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(()=>({[So.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[So.Boolean]:[t.is,t.isNot],[So.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},hL=e=>{const t=Mt(),{operationOptions:n,operations:r}=ju(),o=()=>{const c=e.cols.at(0);e.set(u=>[...u,Bu(c,n,r)])},i=c=>{const u=c.target.dataset.id||"",f=c.target.value;e.set(h=>h.map(d=>{if(u!==d.id)return d;const p=e.cols.find(m=>f===m.id);return Bu(p,n,r,{value:""})}))},s=c=>{const u=c.target.dataset.id||"",f=c.target.value;e.set(h=>h.map(d=>d.id===u?{...d,operation:r[f]}:d))},a=c=>{const u=c.currentTarget.dataset.id||"";e.set(f=>f.filter(h=>h.id!==u))},l=c=>{const u=c.target.dataset.id||"",f=$u(c.target);e.set(h=>h.map(d=>d.id===u?{...d,value:f}:d))};return x.jsx(b.Fragment,{children:x.jsx(fo,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(vC,{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:i}),x.jsx(dr,{"data-id":c.id,onChange:s,value:c.operation.value,options:u,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(fi,{"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(Rr,{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(jl,{size:14})," ",t.tableFilterNewFilter]})})]})})})},pL=({filter:e,onDelete:t,set:n})=>{const r=Mt(),{operationOptions:o,operations:i}=ju(),s=l=>{const c=l.target.value,u=l.target.dataset.id||"";n(f=>f.map(h=>h.id===u?{...h,operation:i[c]}:h))},a=l=>{const c=l.target.dataset.id||"",u=$u(l.target);n(f=>f.map(h=>h.id===c?{...h,value:u}:h))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(dr,{"data-id":e.id,onChange:s,options:o[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder,value:e.operation.value}),x.jsx(fi,{"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(Rr,{className:"text-danger",size:14})})]})},mL=({item:e,onPointerDown:t})=>{const n=jr(0);return x.jsxs(is.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(yC,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},gL=e=>{var l;const t=Mt(),n=Vu(e.cols),r=oC(),[o,i]=b.useState(((l=e.groups[0])==null?void 0:l.thead)||""),s=c=>{var v;const u=c.target,f=u.value,h=u.options.selectedIndex,d=((v=u.options.item(h))==null?void 0:v.label)||"";i(d);const p=new xb(e.rows).GroupBy(f),m=e.cols.find(g=>g.id===f);e.setGroups(Cw(p).map((g,w)=>{const y=p[g];return{...m,groupId:ps(),groupKey:f,index:w,rows:y,groupName:g}}))},a=()=>e.setGroups([]);return x.jsx(b.Fragment,{children:x.jsxs(fo,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(SC,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(dr,{value:o,title:"Tipo de agrupamento",onChange:s,options:n,placeholder:"Agrupar por..."}),x.jsx(Ar,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:x.jsx(Rr,{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(CE,{children:x.jsx(is.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>x.jsx(mL,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},yL=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),vL=(e,t)=>e.toSorted(yL(t)),Sb=(e,t,n)=>({id:ps(),type:n,value:e.id,label:t}),bL=e=>{const t=Mt(),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,Sb(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(f=>f.map(h=>h.id===l?{...h,value:u}:h))},s=l=>c=>{const u=c.target.value;e.set(f=>f.map(h=>h.id===l?{...h,type:u}:h))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(f=>f.id!==c))};return x.jsx(b.Fragment,{children:x.jsx(fo,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(rm,{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:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(dr,{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(Rr,{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(jl,{size:14})," ",t.tableSortAddButton]})})]})})})},wL=e=>{const t=Mt(),[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=Sb(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=_u(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(fC,{size:14}):null,n==="desc"?x.jsx(uC,{size:14}):null,n==="undefined"?x.jsx(rm,{size:14}):null]})},xL=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(hL,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(bL,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(gL,{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=$u(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function SL(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 TL=e=>{const t=b.useId(),n=Mt(),r=e.asLink||"button",o=b.useMemo(()=>SL(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]})})]})},EL={opacity:1},CL={opacity:.75,backgroundColor:"var(--table-border)"},PL={opacity:0,transition:{duration:.4,type:"spring"}},IL=e=>{var f;const t=Mt(),n=e.filters.filter(h=>h.name===e.header.id),o=n.length>0?bC:wC,{operationOptions:i,operations:s}=ju(),a=h=>{const d=h.currentTarget.dataset.id||"";return e.setFilters(p=>p.filter(m=>m.id!==d))},l=e.sorters.find(h=>e.header.id===h.value),c=l!=null&&l.type?l.type===wb.Asc?"ascending":"descending":"none",u=_u(e.header);return x.jsx(is.Item,{...e.header.thProps,as:"th",layout:!0,exit:PL,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader",value:e.header,whileDrag:CL,"aria-sort":c,"aria-busy":e.loading,animate:EL,className:`hidden px-2 py-4 font-medium first:table-cell md:table-cell ${((f=e.header.thProps)==null?void 0:f.className)??""}`,children:x.jsx("span",{className:"flex items-center justify-between",children:x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx(fo,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",u]}),e.inlineFilter?x.jsx(o,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14}):null]}),title:x.jsxs("span",{className:"font-medium text-lg",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(h=>x.jsx("li",{className:"my-1",children:x.jsx(pL,{onDelete:a,filter:h,set:e.setFilters})},`thead-filter-${h.id}`)),x.jsx("li",{children:x.jsxs("button",{onClick:()=>e.setFilters(h=>h.concat(Bu(e.header,i,s))),type:"button",className:"flex items-center gap-1 text-primary",children:[x.jsx(jl,{size:14})," ",t.tableFilterNewFilter]})})]})}),x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter?x.jsx(wL,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})})})},AL=e=>x.jsx(is.Group,{as:"tr",role:"row",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"border-none bg-table-background text-lg",children:x.jsx(Qo,{children:e.headers.map(t=>x.jsx(IL,{inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),Tb=b.createContext({}),OL=()=>b.useContext(Tb),kL=b.forwardRef((e,t)=>x.jsx("tbody",{...e,role:"rowgroup",className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:x.jsx(Qo,{children:e.children})})),DL=b.forwardRef((e,t)=>x.jsx("table",{...e,ref:t,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${e.className??""}`})),ML=b.forwardRef(({context:e,...t},n)=>{var i;const r=OL(),o={...t==null?void 0:t.style,sticky:mn.number(r.sticky)?`${r.sticky}px`:(i=t==null?void 0:t.style)==null?void 0:i.sticky};return x.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),FL=b.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),LL=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:"h-14 bg-card-background px-2",children:x.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),NL={TableHead:ML,Table:DL,TableBody:kL,TableRow:FL,TableFoot:LL},_L=[0,0,0,0,0,0,0,0,0,0],VL=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(b.Fragment,{children:r.map((i,s)=>{var f;const a=`${s},${e}`,l=oc(t,i.id),c=i.Element,u=((f=i.cellProps)==null?void 0:f.className)||"";return b.createElement("td",{...i.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${s}`,className:`hidden h-14 border-none px-2 first:table-cell md:table-cell ${u}`},o?x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}):c?x.jsx(c,{row:t,matrix:a,col:i,rowIndex:e,value:l}):x.jsx(b.Fragment,{children:mn.nil(l)?"":l}))})})},$L=()=>x.jsx(b.Fragment,{}),Eb=({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 f=b.useRef(null),[h,d]=b.useState(!1),p=su(n),m=su(u.loadingMore),v=b.useMemo(()=>{if(u.loading)return _L;if(r)return u.rows;const g=new xb(u.rows);return e.length>0&&e.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:g.Where(w.name,w.operation.symbol,w.value)),s.length===0?g.Select():vL(g.Select(),s)},[u.rows,e,s,u.loading]);return b.useEffect(()=>{if(f.current===null)return()=>{};const g=f.current,w=new IntersectionObserver(y=>{var E;return y[y.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void d(!0)):d(!1)});return w.observe(g),()=>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(VF,{data:v,useWindowScroll:!0,components:NL,totalCount:v.length,itemContent:VL,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:h?$L:null,fixedHeaderContent:()=>x.jsx(AL,{filters:e,headers:a,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter,loading:!!u.loading,setCols:o,setFilters:i,setSorters:c,sorters:s})}),x.jsx("div",{"aria-hidden":"true",ref:f,className:"h-0.5 w-full"})]}),t!==null?x.jsx(TL,{...t}):null]})},BL=(e,t)=>typeof t=="function"?t(e):t,oa=(e,t,n)=>e===t||n==null?void 0:n(t),jL=e=>{const t=b.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=b.useMemo(()=>Vu(e.cols),[e.cols]),[o,i]=ec({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},s=>{const a=l=>c=>{const u=s.state();return{...u,[l]:BL(u[l],c)}};return{cols:a("cols"),filters:a("filters"),groups:a("groups"),sorters:a("sorters")}},{postMiddleware:[(s,a)=>{var l;return console.log("->",s,a),(l=e.set)==null||l.call(e,s),oa((a==null?void 0:a.filters)??[],s.filters??[],e.setFilters),oa((a==null?void 0:a.sorters)??[],s.sorters??[],e.setSorters),oa((a==null?void 0:a.groups)??[],s.groups??[],e.setGroups),oa((a==null?void 0:a.cols)??[],s.cols??[],e.setCols),s}]});return x.jsx(Tb.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full",children:[n?x.jsx(xL,{cols:o.cols,filters:o.filters,groups:o.groups,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,options:r,pagination:e.pagination??null,rows:e.rows,setCols:i.cols,setFilters:i.filters,setGroups:i.groups,setSorters:i.sorters,sorters:o.sorters}):null,o.groups.length===0?x.jsx(Eb,{...e,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,onScrollEnd:e.onScrollEnd,cols:o.cols,filters:o.filters,groups:o.groups,index:0,optionCols:r,options:r,setCols:i.cols,setFilters:i.filters,setGroups:i.groups,setSorters:i.sorters,sorters:o.sorters,pagination:e.pagination??null}):x.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((s,a)=>x.jsx(mt.div,{className:"min-w-full",children:x.jsx(Eb,{...e,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,pagination:null,onScrollEnd:e.onScrollEnd,cols:o.cols,filters:o.filters,group:s,groups:o.groups,index:a,optionCols:r,options:r,rows:s.rows,setCols:i.cols,setFilters:i.filters,setGroups:i.groups,setSorters:i.sorters,sorters:o.sorters})},`group-${s.groupId}`))})]})})};var RL=String.prototype.replace,HL=/%20/g,Ru={RFC1738:"RFC1738",RFC3986:"RFC3986"},Hu={default:Ru.RFC3986,formatters:{RFC1738:function(e){return RL.call(e,HL,"+")},RFC3986:function(e){return String(e)}},RFC1738:Ru.RFC1738,RFC3986:Ru.RFC3986},WL=Hu,Wu=Object.prototype.hasOwnProperty,gr=Array.isArray,hn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),zL=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(gr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Cb=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},GL=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(gr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Wu.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return gr(t)&&!gr(n)&&(o=Cb(t,r)),gr(t)&&gr(n)?(n.forEach(function(i,s){if(Wu.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 Wu.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},UL=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},YL=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}},zu=1024,qL=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(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;l+=zu){for(var c=s.length>=zu?s.slice(l,l+zu):s,u=[],f=0;f<c.length;++f){var h=c.charCodeAt(f);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||i===WL.RFC1738&&(h===40||h===41)){u[u.length]=c.charAt(f);continue}if(h<128){u[u.length]=hn[h];continue}if(h<2048){u[u.length]=hn[192|h>>6]+hn[128|h&63];continue}if(h<55296||h>=57344){u[u.length]=hn[224|h>>12]+hn[128|h>>6&63]+hn[128|h&63];continue}f+=1,h=65536+((h&1023)<<10|c.charCodeAt(f)&1023),u[u.length]=hn[240|h>>18]+hn[128|h>>12&63]+hn[128|h>>6&63]+hn[128|h&63]}a+=u.join("")}return a},KL=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 zL(n),t},XL=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},QL=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},ZL=function(t,n){return[].concat(t,n)},JL=function(t,n){if(gr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Pb={arrayToObject:Cb,assign:UL,combine:ZL,compact:KL,decode:YL,encode:qL,isBuffer:QL,isRegExp:XL,maybeMap:JL,merge:GL},Ib=ww,ia=Pb,Ci=Hu,eN=Object.prototype.hasOwnProperty,Ab={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},pn=Array.isArray,tN=Array.prototype.push,Ob=function(e,t){tN.apply(e,pn(t)?t:[t])},nN=Date.prototype.toISOString,kb=Ci.default,ct={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:ia.encode,encodeValuesOnly:!1,format:kb,formatter:Ci.formatters[kb],indices:!1,serializeDate:function(t){return nN.call(t)},skipNulls:!1,strictNullHandling:!1},rN=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Gu={},oN=function e(t,n,r,o,i,s,a,l,c,u,f,h,d,p,m,v,g,w){for(var y=t,T=w,S=0,E=!1;(T=T.get(Gu))!==void 0&&!E;){var A=T.get(t);if(S+=1,typeof A<"u"){if(A===S)throw new RangeError("Cyclic object value");E=!0}typeof T.get(Gu)>"u"&&(S=0)}if(typeof u=="function"?y=u(n,y):y instanceof Date?y=d(y):r==="comma"&&pn(y)&&(y=ia.maybeMap(y,function(k){return k instanceof Date?d(k):k})),y===null){if(s)return c&&!v?c(n,ct.encoder,g,"key",p):n;y=""}if(rN(y)||ia.isBuffer(y)){if(c){var P=v?n:c(n,ct.encoder,g,"key",p);return[m(P)+"="+m(c(y,ct.encoder,g,"value",p))]}return[m(n)+"="+m(String(y))]}var O=[];if(typeof y>"u")return O;var C;if(r==="comma"&&pn(y))v&&c&&(y=ia.maybeMap(y,c)),C=[{value:y.length>0?y.join(",")||null:void 0}];else if(pn(u))C=u;else{var _=Object.keys(y);C=f?_.sort(f):_}var F=l?n.replace(/\./g,"%2E"):n,V=o&&pn(y)&&y.length===1?F+"[]":F;if(i&&pn(y)&&y.length===0)return V+"[]";for(var I=0;I<C.length;++I){var D=C[I],L=typeof D=="object"&&typeof D.value<"u"?D.value:y[D];if(!(a&&L===null)){var $=h&&l?D.replace(/\./g,"%2E"):D,z=pn(y)?typeof r=="function"?r(V,$):V:V+(h?"."+$:"["+$+"]");w.set(t,S);var G=Ib();G.set(Gu,w),Ob(O,e(L,z,r,o,i,s,a,l,r==="comma"&&v&&pn(y)?null:c,u,f,h,d,p,m,v,g,G))}}return O},iN=function(t){if(!t)return ct;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.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||ct.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=Ci.default;if(typeof t.format<"u"){if(!eN.call(Ci.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Ci.formatters[r],i=ct.filter;(typeof t.filter=="function"||pn(t.filter))&&(i=t.filter);var s;if(t.arrayFormat in Ab?s=t.arrayFormat:"indices"in t?s=t.indices?"indices":"repeat":s=ct.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:ct.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:ct.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ct.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ct.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?ct.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:ct.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:ct.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:ct.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:ct.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:ct.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:ct.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ct.strictNullHandling}},sN=function(e,t){var n=e,r=iN(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):pn(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a=Ab[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=Ib(),u=0;u<o.length;++u){var f=o[u];r.skipNulls&&n[f]===null||Ob(s,oN(n[f],f,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 h=s.join(r.delimiter),d=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),h.length>0?d+h:""},To=Pb,Uu=Object.prototype.hasOwnProperty,aN=Array.isArray,rt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:To.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},lN=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Db=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},cN="utf8=%26%2310003%3B",uN="utf8=%E2%9C%93",fN=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]===uN?c="utf-8":s[l]===cN&&(c="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var u=s[l],f=u.indexOf("]="),h=f===-1?u.indexOf("="):f+1,d,p;h===-1?(d=n.decoder(u,rt.decoder,c,"key"),p=n.strictNullHandling?null:""):(d=n.decoder(u.slice(0,h),rt.decoder,c,"key"),p=To.maybeMap(Db(u.slice(h+1),n),function(v){return n.decoder(v,rt.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=lN(p)),u.indexOf("[]=")>-1&&(p=aN(p)?[p]:p);var m=Uu.call(r,d);m&&n.duplicates==="combine"?r[d]=To.combine(r[d],p):(!m||n.duplicates==="last")&&(r[d]=p)}return r},dN=function(e,t,n,r){for(var o=r?t:Db(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},hN=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&&Uu.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var f=0;r.depth>0&&(l=a.exec(i))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&Uu.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),dN(u,n,r,o)}},pN=function(t){if(!t)return rt;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"?rt.charset:t.charset,r=typeof t.duplicates>"u"?rt.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:rt.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:rt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:rt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:rt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:rt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:rt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:rt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:rt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:rt.decoder,delimiter:typeof t.delimiter=="string"||To.isRegExp(t.delimiter)?t.delimiter:rt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:rt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:rt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:rt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:rt.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:rt.strictNullHandling}},mN=function(e,t){var n=pN(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?fN(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],l=hN(a,r[a],n,typeof e=="string");o=To.merge(o,l,n)}return n.allowSparse===!0?o:To.compact(o)},gN=sN,yN=mN,vN=Hu,bN={formats:vN,parse:yN,stringify:gN};const wN={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},Mb=e=>{const t=new FormData(e),n=new URLSearchParams(t);return bN.parse(n.toString(),wN)},Fb=e=>e.replace("[",".").replace("]","").split("."),Pi=(e,t)=>Fb(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),Ii=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),xN=(e,t)=>{const[n,r]=b.useState(null),o=b.useRef({}),[i,s]=b.useState({}),a=(p,m)=>{const v=Pi(p,e);return{...m,name:p,id:p,form:t,required:!v.isOptional(),error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:v})}}},l=(p,m)=>{const v=Pi(p,e);return{...m,name:p,id:p,form:t,required:!v.isOptional(),error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:v})}}},c=(p,m)=>{const v=Pi(p,e);return{...m,name:p,id:p,form:t,required:!v.isOptional(),error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:v})}}},u=(p,m)=>{const v=Pi(p,e);return{...m,name:p,id:p,required:!v.isOptional(),form:t,type:v._def.typeName==="ZodNumber"?"number":(m==null?void 0:m.type)??"text",error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:v})}}};b.useEffect(()=>{const p=Object.values(o.current).map(v=>{const g=v.element.dataset.origin?document.querySelector(`[data-target="${v.element.name}"]`):v.element,w=v.schema.safeParse(Ii(g)),y=S=>{var O;const E=g.dataset.target||g.name;if(!E)return;const A=Ii(S.target)||(S.relatedTarget?Ii(S.relatedTarget):""),P=v.schema.safeParse(A);if(P.success)return g.setCustomValidity(""),s(C=>ka(C,E,P.data)),r(C=>{const{[E]:_,...F}=C||{};return F===null||mn.empty(F)?null:F});if(g.required){const C=((O=P.error.issues[0])==null?void 0:O.message)||"";g.setCustomValidity(C),r(_=>({..._,[E]:C}))}},T=g.getAttribute("data-trigger")||"blur";return g.addEventListener(T,y),g.tagName==="SELECT"&&g.addEventListener("change",y),{input:v,hasInitialError:g.required?!w.success:!1,unsubscribe:()=>{g.removeEventListener(T,y),g.tagName==="SELECT"&&g.addEventListener("change",y)}}});return p.some(v=>v.hasInitialError)&&r(v=>v===null?{}:v),()=>p.forEach(v=>v.unsubscribe())});const f=b.useCallback(p=>m=>{const v=m.currentTarget,g=Object.values(o.current).reduce((y,T)=>{var O;const S=T.element,E=T.schema.safeParse(Ii(S));if(S.dataset.ignore==="ignore"||E.success)return y;const A=(O=E.error.issues[0])==null?void 0:O.message;S.setAttribute("data-initialized","true");const P=S.dataset.name||S.name||"";return{...y,[P]:A}},{}),w=mn.empty(g)?null:g;r(w),p==null||p({form:v,errors:w||{}})},[]),h=b.useCallback(p=>m=>{m.preventDefault();const v=m.currentTarget;let g=Mb(v);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(v.elements)).forEach(T=>{if(T.tagName==="SELECT"){const S=T;g=ka(g,S.name,S.value)}if(T.tagName==="INPUT"){const S=T;g=ka(g,S.name,Ii(S))}});const y=e.safeParse(i);return y.success?p({form:v,json:g,data:y.data,event:m,reset:()=>iu(v),success:!0,errors:[]}):p({form:v,json:g,event:m,data:g,success:!1,reset:()=>iu(v),errors:y.error.issues.map(T=>({message:T.message,path:T.path.map(S=>String(S))}))})},[t]);return{state:i,input:u,datepicker:a,checkbox:c,select:l,onSubmit:h,errors:n,onInvalid:f,disabled:n!==null,name:t,get:p=>oc(i,p)||""}},SN=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current};J.Alert=PC,J.Autocomplete=jk,J.Button=Ar,J.Calendar=hg,J.Card=pg,J.Checkbox=Dy,J.ColType=So,J.Collapse=cm,J.ComponentsProvider=dA,J.DatePicker=Hk,J.Dropdown=fo,J.Expand=gk,J.FileUpload=eM,J.Form=nM,J.Input=fi,J.InputFeedback=Oy,J.InputField=Vs,J.Menu=Ck,J.MenuItem=Ek,J.Modal=Lk,J.Option=ky,J.Polymorph=Ir,J.Radiobox=rM,J.Select=dr,J.Stats=yA,J.Switch=oM,J.Tab=xA,J.Table=jL,J.Tabs=bA,J.Tag=ux,J.TaskList=iM,J.Toolbar=Nk,J.Tooltip=Ay,J.TransferList=jF,J.convertPath=Fb,J.createColumns=uL,J.createDesignTokens=eg,J.createOptionCols=Vu,J.createStyles=sA,J.createTheme=aA,J.css=Ne,J.defaultDarkTheme=uA,J.defaultLightTheme=fA,J.dispatchInput=Zf,J.formReset=iu,J.formToJson=Mb,J.getSchemaShape=Pi,J.initializeInputDataset=Vi,J.isReactComponent=ix,J.isReactFC=sx,J.isSsr=ms,J.mergeRefs=Fa,J.parsers=tc,J.path=oc,J.reduceTokens=ri,J.safeRegex=ic,J.splitInto=ag,J.useForm=xN,J.usePrevious=SN,J.useReactive=mg,J.useTablePreferences=dL,J.useTranslations=Mt,J.uuid=ps,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})});
201
201
  //# sourceMappingURL=index.umd.js.map