@g4rcez/components 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +20 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +475 -441
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +12 -12
- package/dist/index.umd.js.map +1 -1
- package/dist/preset/src/styles/common.js +3 -3
- package/dist/src/components/display/card.d.ts.map +1 -1
- package/dist/src/components/display/card.js +3 -2
- package/dist/src/components/display/skeleton.d.ts +2 -0
- package/dist/src/components/display/skeleton.d.ts.map +1 -0
- package/dist/src/components/display/skeleton.js +2 -0
- package/dist/src/components/table/index.d.ts +3 -2
- package/dist/src/components/table/index.d.ts.map +1 -1
- package/dist/src/components/table/index.js +7 -18
- package/dist/src/components/table/row.d.ts +12 -0
- package/dist/src/components/table/row.d.ts.map +1 -0
- package/dist/src/components/table/row.js +48 -0
- package/dist/src/components/table/table-lib.d.ts +9 -4
- package/dist/src/components/table/table-lib.d.ts.map +1 -1
- package/dist/src/styles/common.js +3 -3
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(ne,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],E):(ne=typeof globalThis<"u"?globalThis:ne||self,E(ne.components={},ne.React,ne["react/jsx-runtime"],ne.ReactDOM))})(this,function(ne,E,b,wi){"use strict";var hR=Object.defineProperty;var mR=(ne,E,b)=>E in ne?hR(ne,E,{enumerable:!0,configurable:!0,writable:!0,value:b}):ne[E]=b;var pe=(ne,E,b)=>mR(ne,typeof E!="symbol"?E+"":E,b);function Lp(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 k=Lp(E),Oa=Lp(wi);function Vp(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=Vp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function jp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Vp(e))&&(r&&(r+=" "),r+=t);return r}const $p=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Rp=jp,uo=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Rp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const p=$p(u)||$p(d);return o[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(m=>{let[g,h]=m;return Array.isArray(h)?h.includes({...i,...s}[g]):{...i,...s}[g]===h})?[...c,d,p]:c},[]);return Rp(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};var zp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function uS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Dl,Hp;function fo(){return Hp||(Hp=1,Dl=TypeError),Dl}const dS=uS(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Nl,Wp;function Ma(){if(Wp)return Nl;Wp=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,p=typeof WeakRef=="function"&&WeakRef.prototype,f=p?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,g=Object.prototype.toString,h=Function.prototype.toString,v=String.prototype.match,y=String.prototype.slice,x=String.prototype.replace,T=String.prototype.toUpperCase,w=String.prototype.toLowerCase,S=RegExp.prototype.test,C=Array.prototype.concat,P=Array.prototype.join,I=Array.prototype.slice,_=Math.floor,M=typeof BigInt=="function"?BigInt.prototype.valueOf:null,L=Object.getOwnPropertySymbols,$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,A=typeof Symbol=="function"&&typeof Symbol.iterator=="object",O=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||!0)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,V=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(H){return H.__proto__}:null);function F(H,q){if(H===1/0||H===-1/0||H!==H||H&&H>-1e3&&H<1e3||S.call(/e/,q))return q;var Re=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof H=="number"){var et=H<0?-_(-H):_(H);if(et!==H){var ct=String(et),De=y.call(q,ct.length+1);return x.call(ct,Re,"$&_")+"."+x.call(x.call(De,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(q,Re,"$&_")}var z=dS,D=z.custom,R=Ee(D)?D:null,J={__proto__:null,double:'"',single:"'"},te={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Nl=function H(q,Re,et,ct){var De=Re||{};if(se(De,"quoteStyle")&&!se(J,De.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(se(De,"maxStringLength")&&(typeof De.maxStringLength=="number"?De.maxStringLength<0&&De.maxStringLength!==1/0:De.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Er=se(De,"customInspect")?De.customInspect:!0;if(typeof Er!="boolean"&&Er!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(se(De,"indent")&&De.indent!==null&&De.indent!==" "&&!(parseInt(De.indent,10)===De.indent&&De.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(se(De,"numericSeparator")&&typeof De.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var co=De.numericSeparator;if(typeof q>"u")return"undefined";if(q===null)return"null";if(typeof q=="boolean")return q?"true":"false";if(typeof q=="string")return We(q,De);if(typeof q=="number"){if(q===0)return 1/0/q>0?"0":"-0";var rn=String(q);return co?F(q,rn):rn}if(typeof q=="bigint"){var Cr=String(q)+"n";return co?F(q,Cr):Cr}var Ap=typeof De.depth>"u"?5:De.depth;if(typeof et>"u"&&(et=0),et>=Ap&&Ap>0&&typeof q=="object")return Y(q)?"[Array]":"[Object]";var bi=wr(De,et);if(typeof ct>"u")ct=[];else if(ce(ct,q)>=0)return"[Circular]";function Tn(xi,Ml,pR){if(Ml&&(ct=I.call(ct),ct.push(Ml)),pR){var cS={depth:De.depth};return se(De,"quoteStyle")&&(cS.quoteStyle=De.quoteStyle),H(xi,cS,et+1,ct)}return H(xi,De,et+1,ct)}if(typeof q=="function"&&!W(q)){var nS=K(q),rS=Tr(q,Tn);return"[Function"+(nS?": "+nS:" (anonymous)")+"]"+(rS.length>0?" { "+P.call(rS,", ")+" }":"")}if(Ee(q)){var oS=A?x.call(String(q),/^(Symbol\(.*\))_[^)]*$/,"$1"):$.call(q);return typeof q=="object"&&!A?mt(oS):oS}if(_e(q)){for(var Ia="<"+w.call(String(q.nodeName)),_p=q.attributes||[],Ol=0;Ol<_p.length;Ol++)Ia+=" "+_p[Ol].name+"="+ee(Z(_p[Ol].value),"double",De);return Ia+=">",q.childNodes&&q.childNodes.length&&(Ia+="..."),Ia+="</"+w.call(String(q.nodeName))+">",Ia}if(Y(q)){if(q.length===0)return"[]";var Ip=Tr(q,Tn);return bi&&!zn(Ip)?"["+Sr(Ip,bi)+"]":"[ "+P.call(Ip,", ")+" ]"}if(G(q)){var Op=Tr(q,Tn);return!("cause"in Error.prototype)&&"cause"in q&&!N.call(q,"cause")?"{ ["+String(q)+"] "+P.call(C.call("[cause]: "+Tn(q.cause),Op),", ")+" }":Op.length===0?"["+String(q)+"]":"{ ["+String(q)+"] "+P.call(Op,", ")+" }"}if(typeof q=="object"&&Er){if(R&&typeof q[R]=="function"&&z)return z(q,{depth:Ap-et});if(Er!=="symbol"&&typeof q.inspect=="function")return q.inspect()}if(Q(q)){var iS=[];return r&&r.call(q,function(xi,Ml){iS.push(Tn(Ml,q,!0)+" => "+Tn(xi,q))}),Sn("Map",n.call(q),iS,bi)}if(X(q)){var aS=[];return s&&s.call(q,function(xi){aS.push(Tn(xi,q))}),Sn("Set",a.call(q),aS,bi)}if(ie(q))return Lt("WeakMap");if(ue(q))return Lt("WeakSet");if(we(q))return Lt("WeakRef");if(B(q))return mt(Tn(Number(q)));if(Oe(q))return mt(Tn(M.call(q)));if(xe(q))return mt(m.call(q));if(ae(q))return mt(Tn(String(q)));if(typeof window<"u"&&q===window)return"{ [object Window] }";if(typeof globalThis<"u"&&q===globalThis||typeof zp<"u"&&q===zp)return"{ [object globalThis] }";if(!j(q)&&!W(q)){var Mp=Tr(q,Tn),sS=V?V(q)===Object.prototype:q instanceof Object||q.constructor===Object,Dp=q instanceof Object?"":"null prototype",lS=!sS&&O&&Object(q)===q&&O in q?y.call(ye(q),8,-1):Dp?"Object":"",fR=sS||typeof q.constructor!="function"?"":q.constructor.name?q.constructor.name+" ":"",Np=fR+(lS||Dp?"["+P.call(C.call([],lS||[],Dp||[]),": ")+"] ":"");return Mp.length===0?Np+"{}":bi?Np+"{"+Sr(Mp,bi)+"}":Np+"{ "+P.call(Mp,", ")+" }"}return String(q)};function ee(H,q,Re){var et=Re.quoteStyle||q,ct=J[et];return ct+H+ct}function Z(H){return x.call(String(H),/"/g,""")}function U(H){return!O||!(typeof H=="object"&&(O in H||typeof H[O]<"u"))}function Y(H){return ye(H)==="[object Array]"&&U(H)}function j(H){return ye(H)==="[object Date]"&&U(H)}function W(H){return ye(H)==="[object RegExp]"&&U(H)}function G(H){return ye(H)==="[object Error]"&&U(H)}function ae(H){return ye(H)==="[object String]"&&U(H)}function B(H){return ye(H)==="[object Number]"&&U(H)}function xe(H){return ye(H)==="[object Boolean]"&&U(H)}function Ee(H){if(A)return H&&typeof H=="object"&&H instanceof Symbol;if(typeof H=="symbol")return!0;if(!H||typeof H!="object"||!$)return!1;try{return $.call(H),!0}catch{}return!1}function Oe(H){if(!H||typeof H!="object"||!M)return!1;try{return M.call(H),!0}catch{}return!1}var $e=Object.prototype.hasOwnProperty||function(H){return H in this};function se(H,q){return $e.call(H,q)}function ye(H){return g.call(H)}function K(H){if(H.name)return H.name;var q=v.call(h.call(H),/^function\s*([\w$]+)/);return q?q[1]:null}function ce(H,q){if(H.indexOf)return H.indexOf(q);for(var Re=0,et=H.length;Re<et;Re++)if(H[Re]===q)return Re;return-1}function Q(H){if(!n||!H||typeof H!="object")return!1;try{n.call(H);try{a.call(H)}catch{return!0}return H instanceof Map}catch{}return!1}function ie(H){if(!c||!H||typeof H!="object")return!1;try{c.call(H,c);try{d.call(H,d)}catch{return!0}return H instanceof WeakMap}catch{}return!1}function we(H){if(!f||!H||typeof H!="object")return!1;try{return f.call(H),!0}catch{}return!1}function X(H){if(!a||!H||typeof H!="object")return!1;try{a.call(H);try{n.call(H)}catch{return!0}return H instanceof Set}catch{}return!1}function ue(H){if(!d||!H||typeof H!="object")return!1;try{d.call(H,d);try{c.call(H,c)}catch{return!0}return H instanceof WeakSet}catch{}return!1}function _e(H){return!H||typeof H!="object"?!1:typeof HTMLElement<"u"&&H instanceof HTMLElement?!0:typeof H.nodeName=="string"&&typeof H.getAttribute=="function"}function We(H,q){if(H.length>q.maxStringLength){var Re=H.length-q.maxStringLength,et="... "+Re+" more character"+(Re>1?"s":"");return We(y.call(H,0,q.maxStringLength),q)+et}var ct=te[q.quoteStyle||"single"];ct.lastIndex=0;var De=x.call(x.call(H,ct,"\\$1"),/[\x00-\x1f]/g,Ct);return ee(De,"single",q)}function Ct(H){var q=H.charCodeAt(0),Re={8:"b",9:"t",10:"n",12:"f",13:"r"}[q];return Re?"\\"+Re:"\\x"+(q<16?"0":"")+T.call(q.toString(16))}function mt(H){return"Object("+H+")"}function Lt(H){return H+" { ? }"}function Sn(H,q,Re,et){var ct=et?Sr(Re,et):P.call(Re,", ");return H+" ("+q+") {"+ct+"}"}function zn(H){for(var q=0;q<H.length;q++)if(ce(H[q],`
|
|
1
|
+
(function(ne,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],E):(ne=typeof globalThis<"u"?globalThis:ne||self,E(ne.components={},ne.React,ne["react/jsx-runtime"],ne.ReactDOM))})(this,function(ne,E,b,wi){"use strict";var mR=Object.defineProperty;var gR=(ne,E,b)=>E in ne?mR(ne,E,{enumerable:!0,configurable:!0,writable:!0,value:b}):ne[E]=b;var pe=(ne,E,b)=>gR(ne,typeof E!="symbol"?E+"":E,b);function Lp(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 k=Lp(E),Oa=Lp(wi);function Vp(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=Vp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function jp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Vp(e))&&(r&&(r+=" "),r+=t);return r}const $p=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Rp=jp,uo=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Rp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const p=$p(u)||$p(d);return o[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(m=>{let[g,h]=m;return Array.isArray(h)?h.includes({...i,...s}[g]):{...i,...s}[g]===h})?[...c,d,p]:c},[]);return Rp(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};var zp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function uS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Dl,Hp;function fo(){return Hp||(Hp=1,Dl=TypeError),Dl}const dS=uS(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Nl,Wp;function Ma(){if(Wp)return Nl;Wp=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,p=typeof WeakRef=="function"&&WeakRef.prototype,f=p?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,g=Object.prototype.toString,h=Function.prototype.toString,v=String.prototype.match,y=String.prototype.slice,x=String.prototype.replace,T=String.prototype.toUpperCase,w=String.prototype.toLowerCase,S=RegExp.prototype.test,C=Array.prototype.concat,P=Array.prototype.join,I=Array.prototype.slice,_=Math.floor,M=typeof BigInt=="function"?BigInt.prototype.valueOf:null,L=Object.getOwnPropertySymbols,$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,A=typeof Symbol=="function"&&typeof Symbol.iterator=="object",O=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||!0)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,V=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(H){return H.__proto__}:null);function F(H,q){if(H===1/0||H===-1/0||H!==H||H&&H>-1e3&&H<1e3||S.call(/e/,q))return q;var Re=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof H=="number"){var et=H<0?-_(-H):_(H);if(et!==H){var ct=String(et),De=y.call(q,ct.length+1);return x.call(ct,Re,"$&_")+"."+x.call(x.call(De,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(q,Re,"$&_")}var z=dS,D=z.custom,R=Ee(D)?D:null,J={__proto__:null,double:'"',single:"'"},te={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Nl=function H(q,Re,et,ct){var De=Re||{};if(se(De,"quoteStyle")&&!se(J,De.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(se(De,"maxStringLength")&&(typeof De.maxStringLength=="number"?De.maxStringLength<0&&De.maxStringLength!==1/0:De.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Er=se(De,"customInspect")?De.customInspect:!0;if(typeof Er!="boolean"&&Er!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(se(De,"indent")&&De.indent!==null&&De.indent!==" "&&!(parseInt(De.indent,10)===De.indent&&De.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(se(De,"numericSeparator")&&typeof De.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var co=De.numericSeparator;if(typeof q>"u")return"undefined";if(q===null)return"null";if(typeof q=="boolean")return q?"true":"false";if(typeof q=="string")return We(q,De);if(typeof q=="number"){if(q===0)return 1/0/q>0?"0":"-0";var rn=String(q);return co?F(q,rn):rn}if(typeof q=="bigint"){var Cr=String(q)+"n";return co?F(q,Cr):Cr}var Ap=typeof De.depth>"u"?5:De.depth;if(typeof et>"u"&&(et=0),et>=Ap&&Ap>0&&typeof q=="object")return Y(q)?"[Array]":"[Object]";var bi=wr(De,et);if(typeof ct>"u")ct=[];else if(ce(ct,q)>=0)return"[Circular]";function Tn(xi,Ml,hR){if(Ml&&(ct=I.call(ct),ct.push(Ml)),hR){var cS={depth:De.depth};return se(De,"quoteStyle")&&(cS.quoteStyle=De.quoteStyle),H(xi,cS,et+1,ct)}return H(xi,De,et+1,ct)}if(typeof q=="function"&&!W(q)){var nS=K(q),rS=Tr(q,Tn);return"[Function"+(nS?": "+nS:" (anonymous)")+"]"+(rS.length>0?" { "+P.call(rS,", ")+" }":"")}if(Ee(q)){var oS=A?x.call(String(q),/^(Symbol\(.*\))_[^)]*$/,"$1"):$.call(q);return typeof q=="object"&&!A?mt(oS):oS}if(_e(q)){for(var Ia="<"+w.call(String(q.nodeName)),_p=q.attributes||[],Ol=0;Ol<_p.length;Ol++)Ia+=" "+_p[Ol].name+"="+ee(Z(_p[Ol].value),"double",De);return Ia+=">",q.childNodes&&q.childNodes.length&&(Ia+="..."),Ia+="</"+w.call(String(q.nodeName))+">",Ia}if(Y(q)){if(q.length===0)return"[]";var Ip=Tr(q,Tn);return bi&&!zn(Ip)?"["+Sr(Ip,bi)+"]":"[ "+P.call(Ip,", ")+" ]"}if(G(q)){var Op=Tr(q,Tn);return!("cause"in Error.prototype)&&"cause"in q&&!N.call(q,"cause")?"{ ["+String(q)+"] "+P.call(C.call("[cause]: "+Tn(q.cause),Op),", ")+" }":Op.length===0?"["+String(q)+"]":"{ ["+String(q)+"] "+P.call(Op,", ")+" }"}if(typeof q=="object"&&Er){if(R&&typeof q[R]=="function"&&z)return z(q,{depth:Ap-et});if(Er!=="symbol"&&typeof q.inspect=="function")return q.inspect()}if(Q(q)){var iS=[];return r&&r.call(q,function(xi,Ml){iS.push(Tn(Ml,q,!0)+" => "+Tn(xi,q))}),Sn("Map",n.call(q),iS,bi)}if(X(q)){var aS=[];return s&&s.call(q,function(xi){aS.push(Tn(xi,q))}),Sn("Set",a.call(q),aS,bi)}if(ie(q))return Lt("WeakMap");if(ue(q))return Lt("WeakSet");if(we(q))return Lt("WeakRef");if(B(q))return mt(Tn(Number(q)));if(Oe(q))return mt(Tn(M.call(q)));if(xe(q))return mt(m.call(q));if(ae(q))return mt(Tn(String(q)));if(typeof window<"u"&&q===window)return"{ [object Window] }";if(typeof globalThis<"u"&&q===globalThis||typeof zp<"u"&&q===zp)return"{ [object globalThis] }";if(!j(q)&&!W(q)){var Mp=Tr(q,Tn),sS=V?V(q)===Object.prototype:q instanceof Object||q.constructor===Object,Dp=q instanceof Object?"":"null prototype",lS=!sS&&O&&Object(q)===q&&O in q?y.call(ye(q),8,-1):Dp?"Object":"",pR=sS||typeof q.constructor!="function"?"":q.constructor.name?q.constructor.name+" ":"",Np=pR+(lS||Dp?"["+P.call(C.call([],lS||[],Dp||[]),": ")+"] ":"");return Mp.length===0?Np+"{}":bi?Np+"{"+Sr(Mp,bi)+"}":Np+"{ "+P.call(Mp,", ")+" }"}return String(q)};function ee(H,q,Re){var et=Re.quoteStyle||q,ct=J[et];return ct+H+ct}function Z(H){return x.call(String(H),/"/g,""")}function U(H){return!O||!(typeof H=="object"&&(O in H||typeof H[O]<"u"))}function Y(H){return ye(H)==="[object Array]"&&U(H)}function j(H){return ye(H)==="[object Date]"&&U(H)}function W(H){return ye(H)==="[object RegExp]"&&U(H)}function G(H){return ye(H)==="[object Error]"&&U(H)}function ae(H){return ye(H)==="[object String]"&&U(H)}function B(H){return ye(H)==="[object Number]"&&U(H)}function xe(H){return ye(H)==="[object Boolean]"&&U(H)}function Ee(H){if(A)return H&&typeof H=="object"&&H instanceof Symbol;if(typeof H=="symbol")return!0;if(!H||typeof H!="object"||!$)return!1;try{return $.call(H),!0}catch{}return!1}function Oe(H){if(!H||typeof H!="object"||!M)return!1;try{return M.call(H),!0}catch{}return!1}var $e=Object.prototype.hasOwnProperty||function(H){return H in this};function se(H,q){return $e.call(H,q)}function ye(H){return g.call(H)}function K(H){if(H.name)return H.name;var q=v.call(h.call(H),/^function\s*([\w$]+)/);return q?q[1]:null}function ce(H,q){if(H.indexOf)return H.indexOf(q);for(var Re=0,et=H.length;Re<et;Re++)if(H[Re]===q)return Re;return-1}function Q(H){if(!n||!H||typeof H!="object")return!1;try{n.call(H);try{a.call(H)}catch{return!0}return H instanceof Map}catch{}return!1}function ie(H){if(!c||!H||typeof H!="object")return!1;try{c.call(H,c);try{d.call(H,d)}catch{return!0}return H instanceof WeakMap}catch{}return!1}function we(H){if(!f||!H||typeof H!="object")return!1;try{return f.call(H),!0}catch{}return!1}function X(H){if(!a||!H||typeof H!="object")return!1;try{a.call(H);try{n.call(H)}catch{return!0}return H instanceof Set}catch{}return!1}function ue(H){if(!d||!H||typeof H!="object")return!1;try{d.call(H,d);try{c.call(H,c)}catch{return!0}return H instanceof WeakSet}catch{}return!1}function _e(H){return!H||typeof H!="object"?!1:typeof HTMLElement<"u"&&H instanceof HTMLElement?!0:typeof H.nodeName=="string"&&typeof H.getAttribute=="function"}function We(H,q){if(H.length>q.maxStringLength){var Re=H.length-q.maxStringLength,et="... "+Re+" more character"+(Re>1?"s":"");return We(y.call(H,0,q.maxStringLength),q)+et}var ct=te[q.quoteStyle||"single"];ct.lastIndex=0;var De=x.call(x.call(H,ct,"\\$1"),/[\x00-\x1f]/g,Ct);return ee(De,"single",q)}function Ct(H){var q=H.charCodeAt(0),Re={8:"b",9:"t",10:"n",12:"f",13:"r"}[q];return Re?"\\"+Re:"\\x"+(q<16?"0":"")+T.call(q.toString(16))}function mt(H){return"Object("+H+")"}function Lt(H){return H+" { ? }"}function Sn(H,q,Re,et){var ct=et?Sr(Re,et):P.call(Re,", ");return H+" ("+q+") {"+ct+"}"}function zn(H){for(var q=0;q<H.length;q++)if(ce(H[q],`
|
|
2
2
|
`)>=0)return!1;return!0}function wr(H,q){var Re;if(H.indent===" ")Re=" ";else if(typeof H.indent=="number"&&H.indent>0)Re=P.call(Array(H.indent+1)," ");else return null;return{base:Re,prev:P.call(Array(q+1),Re)}}function Sr(H,q){if(H.length===0)return"";var Re=`
|
|
3
3
|
`+q.prev+q.base;return Re+P.call(H,","+Re)+`
|
|
4
|
-
`+q.prev}function Tr(H,q){var Re=Y(H),et=[];if(Re){et.length=H.length;for(var ct=0;ct<H.length;ct++)et[ct]=se(H,ct)?q(H[ct],H):""}var De=typeof L=="function"?L(H):[],Er;if(A){Er={};for(var co=0;co<De.length;co++)Er["$"+De[co]]=De[co]}for(var rn in H)se(H,rn)&&(Re&&String(Number(rn))===rn&&rn<H.length||A&&Er["$"+rn]instanceof Symbol||(S.call(/[^\w$]/,rn)?et.push(q(rn,H)+": "+q(H[rn],H)):et.push(rn+": "+q(H[rn],H))));if(typeof L=="function")for(var Cr=0;Cr<De.length;Cr++)N.call(H,De[Cr])&&et.push("["+q(De[Cr])+"]: "+q(H[De[Cr]],H));return et}return Nl}var Fl,qp;function fS(){if(qp)return Fl;qp=1;var e=Ma(),t=fo(),n=function(s,l,c){for(var u=s,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=s.next,s.next=d),d},r=function(s,l){if(s){var c=n(s,l);return c&&c.value}},o=function(s,l,c){var u=n(s,l);u?u.value=c:s.next={key:l,next:s.next,value:c}},i=function(s,l){return s?!!n(s,l):!1},a=function(s,l){if(s)return n(s,l,!0)};return Fl=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,p=a(l,u);return p&&d&&d===p&&(l=void 0),!!p},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},Fl}var Ll,Up;function Yp(){return Up||(Up=1,Ll=Object),Ll}var Vl,Gp;function pS(){return Gp||(Gp=1,Vl=Error),Vl}var jl,Kp;function hS(){return Kp||(Kp=1,jl=EvalError),jl}var $l,Zp;function mS(){return Zp||(Zp=1,$l=RangeError),$l}var Rl,Xp;function gS(){return Xp||(Xp=1,Rl=ReferenceError),Rl}var zl,Qp;function vS(){return Qp||(Qp=1,zl=SyntaxError),zl}var Bl,Jp;function yS(){return Jp||(Jp=1,Bl=URIError),Bl}var Hl,eh;function bS(){return eh||(eh=1,Hl=Math.abs),Hl}var Wl,th;function xS(){return th||(th=1,Wl=Math.floor),Wl}var ql,nh;function wS(){return nh||(nh=1,ql=Math.max),ql}var Ul,rh;function SS(){return rh||(rh=1,Ul=Math.min),Ul}var Yl,oh;function TS(){return oh||(oh=1,Yl=Math.pow),Yl}var Gl,ih;function ES(){return ih||(ih=1,Gl=Math.round),Gl}var Kl,ah;function CS(){return ah||(ah=1,Kl=Number.isNaN||function(t){return t!==t}),Kl}var Zl,sh;function kS(){if(sh)return Zl;sh=1;var e=CS();return Zl=function(n){return e(n)||n===0?n:n<0?-1:1},Zl}var Xl,lh;function PS(){return lh||(lh=1,Xl=Object.getOwnPropertyDescriptor),Xl}var Ql,ch;function uh(){if(ch)return Ql;ch=1;var e=PS();if(e)try{e([],"length")}catch{e=null}return Ql=e,Ql}var Jl,dh;function AS(){if(dh)return Jl;dh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Jl=e,Jl}var ec,fh;function _S(){return fh||(fh=1,ec=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0}),ec}var tc,ph;function IS(){if(ph)return tc;ph=1;var e=typeof Symbol<"u"&&Symbol,t=_S();return tc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},tc}var nc,hh;function mh(){return hh||(hh=1,nc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),nc}var rc,gh;function vh(){if(gh)return rc;gh=1;var e=Yp();return rc=e.getPrototypeOf||null,rc}var oc,yh;function OS(){if(yh)return oc;yh=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var p=0;p<c.length;p+=1)u[p+l.length]=c[p];return u},i=function(l,c){for(var u=[],d=c,p=0;d<l.length;d+=1,p+=1)u[p]=l[d];return u},a=function(s,l){for(var c="",u=0;u<s.length;u+=1)c+=s[u],u+1<s.length&&(c+=l);return c};return oc=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,p=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),m=[],g=0;g<f;g++)m[g]="$"+g;if(d=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},oc}var ic,bh;function Da(){if(bh)return ic;bh=1;var e=OS();return ic=Function.prototype.bind||e,ic}var ac,xh;function sc(){return xh||(xh=1,ac=Function.prototype.call),ac}var lc,wh;function Sh(){return wh||(wh=1,lc=Function.prototype.apply),lc}var cc,Th;function MS(){return Th||(Th=1,cc=typeof Reflect<"u"&&Reflect&&Reflect.apply),cc}var uc,Eh;function DS(){if(Eh)return uc;Eh=1;var e=Da(),t=Sh(),n=sc(),r=MS();return uc=r||e.call(n,t),uc}var dc,Ch;function kh(){if(Ch)return dc;Ch=1;var e=Da(),t=fo(),n=sc(),r=DS();return dc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},dc}var fc,Ph;function NS(){if(Ph)return fc;Ph=1;var e=kh(),t=uh(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return fc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,fc}var pc,Ah;function FS(){if(Ah)return pc;Ah=1;var e=mh(),t=vh(),n=NS();return pc=e?function(o){return e(o)}:t?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return t(o)}:n?function(o){return n(o)}:null,pc}var hc,_h;function LS(){if(_h)return hc;_h=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Da();return hc=n.call(e,t),hc}var mc,Ih;function gc(){if(Ih)return mc;Ih=1;var e,t=Yp(),n=pS(),r=hS(),o=mS(),i=gS(),a=vS(),s=fo(),l=yS(),c=bS(),u=xS(),d=wS(),p=SS(),f=TS(),m=ES(),g=kS(),h=Function,v=function(W){try{return h('"use strict"; return ('+W+").constructor;")()}catch{}},y=uh(),x=AS(),T=function(){throw new s},w=y?function(){try{return arguments.callee,T}catch{try{return y(arguments,"callee").get}catch{return T}}}():T,S=IS()(),C=FS(),P=vh(),I=mh(),_=Sh(),M=sc(),L={},$=typeof Uint8Array>"u"||!C?e:C(Uint8Array),A={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":S&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":L,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!S||!C?e:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":y,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!S||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&C?C(""[Symbol.iterator]()):e,"%Symbol%":S?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":$,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":M,"%Function.prototype.apply%":_,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":P,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":m,"%Math.sign%":g,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch(W){var O=C(C(W));A["%Error.prototype%"]=O}var N=function W(G){var ae;if(G==="%AsyncFunction%")ae=v("async function () {}");else if(G==="%GeneratorFunction%")ae=v("function* () {}");else if(G==="%AsyncGeneratorFunction%")ae=v("async function* () {}");else if(G==="%AsyncGenerator%"){var B=W("%AsyncGeneratorFunction%");B&&(ae=B.prototype)}else if(G==="%AsyncIteratorPrototype%"){var xe=W("%AsyncGenerator%");xe&&C&&(ae=C(xe.prototype))}return A[G]=ae,ae},V={__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"]},F=Da(),z=LS(),D=F.call(M,Array.prototype.concat),R=F.call(_,Array.prototype.splice),J=F.call(M,String.prototype.replace),te=F.call(M,String.prototype.slice),ee=F.call(M,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,Y=function(G){var ae=te(G,0,1),B=te(G,-1);if(ae==="%"&&B!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&ae!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var xe=[];return J(G,Z,function(Ee,Oe,$e,se){xe[xe.length]=$e?J(se,U,"$1"):Oe||Ee}),xe},j=function(G,ae){var B=G,xe;if(z(V,B)&&(xe=V[B],B="%"+xe[0]+"%"),z(A,B)){var Ee=A[B];if(Ee===L&&(Ee=N(B)),typeof Ee>"u"&&!ae)throw new s("intrinsic "+G+" exists, but is not available. Please file an issue!");return{alias:xe,name:B,value:Ee}}throw new a("intrinsic "+G+" does not exist!")};return mc=function(G,ae){if(typeof G!="string"||G.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ae!="boolean")throw new s('"allowMissing" argument must be a boolean');if(ee(/^%?[^%]*%?$/,G)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=Y(G),xe=B.length>0?B[0]:"",Ee=j("%"+xe+"%",ae),Oe=Ee.name,$e=Ee.value,se=!1,ye=Ee.alias;ye&&(xe=ye[0],R(B,D([0,1],ye)));for(var K=1,ce=!0;K<B.length;K+=1){var Q=B[K],ie=te(Q,0,1),we=te(Q,-1);if((ie==='"'||ie==="'"||ie==="`"||we==='"'||we==="'"||we==="`")&&ie!==we)throw new a("property names with quotes must have matching quotes");if((Q==="constructor"||!ce)&&(se=!0),xe+="."+Q,Oe="%"+xe+"%",z(A,Oe))$e=A[Oe];else if($e!=null){if(!(Q in $e)){if(!ae)throw new s("base intrinsic for "+G+" exists, but the property is not available.");return}if(y&&K+1>=B.length){var X=y($e,Q);ce=!!X,ce&&"get"in X&&!("originalValue"in X.get)?$e=X.get:$e=$e[Q]}else ce=z($e,Q),$e=$e[Q];ce&&!se&&(A[Oe]=$e)}}return $e},mc}var vc,Oh;function Mh(){if(Oh)return vc;Oh=1;var e=gc(),t=kh(),n=t([e("%String.prototype.indexOf%")]);return vc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},vc}var yc,Dh;function Nh(){if(Dh)return yc;Dh=1;var e=gc(),t=Mh(),n=Ma(),r=fo(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return yc=!!o&&function(){var d,p={assert:function(f){if(!p.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var m=l(d,f);return c(d)===0&&(d=void 0),m}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,m){d||(d=new o),a(d,f,m)}};return p},yc}var bc,Fh;function VS(){if(Fh)return bc;Fh=1;var e=gc(),t=Mh(),n=Ma(),r=Nh(),o=fo(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return bc=i?function(){var d,p,f={assert:function(m){if(!f.has(m))throw new o("Side channel does not contain "+n(m))},delete:function(m){if(i&&m&&(typeof m=="object"||typeof m=="function")){if(d)return c(d,m)}else if(r&&p)return p.delete(m);return!1},get:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?a(d,m):p&&p.get(m)},has:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?l(d,m):!!p&&p.has(m)},set:function(m,g){i&&m&&(typeof m=="object"||typeof m=="function")?(d||(d=new i),s(d,m,g)):r&&(p||(p=r()),p.set(m,g))}};return f}:r,bc}var xc,Lh;function jS(){if(Lh)return xc;Lh=1;var e=fo(),t=Ma(),n=fS(),r=Nh(),o=VS(),i=o||r||n;return xc=function(){var s,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!s&&s.delete(c)},get:function(c){return s&&s.get(c)},has:function(c){return!!s&&s.has(c)},set:function(c,u){s||(s=i()),s.set(c,u)}};return l},xc}var Vh=e=>Array.isArray(e),wc=e=>e===void 0,Sc=e=>e===null,$S=Function.bind.call(Function.call,Object.prototype.toString),RS=e=>!!e&&$S(e)==="[object Error]"||e instanceof Error,jh=(e,t)=>e instanceof t,zS=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},BS=e=>Object.prototype.toString.call(e)==="[object Date]"&&jh(e,Date),rt={array:Vh,date:BS,empty:e=>Sc(e)||wc(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:jh,isError:RS,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Sc(e)||wc(e),null:Sc,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Vh(e)&&typeof e=="object",primitive:zS,string:e=>typeof e=="string",undefined:wc},HS=e=>Object.keys(e),kr=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,a)=>i&&i[a],e);return o===void 0?n:o};const Tc="-",WS=e=>{const t=US(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Tc);return s[0]===""&&s.length!==1&&s.shift(),$h(s,t)||qS(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},$h=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?$h(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Tc);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Rh=/^\[(.+)\]$/,qS=e=>{if(Rh.test(e)){const t=Rh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},US=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Ec(n[o],r,o,t);return r},Ec=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:zh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(YS(o)){Ec(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Ec(a,zh(t,i),n,r)})})},zh=(e,t)=>{let n=e;return t.split(Tc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},YS=e=>e.isThemeGetter,GS=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},Cc="!",kc=":",KS=kc.length,ZS=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let m=0;m<o.length;m++){let g=o[m];if(a===0&&s===0){if(g===kc){i.push(o.slice(l,m)),l=m+KS;continue}if(g==="/"){c=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=XS(u),p=d!==u,f=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+kc,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},XS=e=>e.endsWith(Cc)?e.substring(0,e.length-1):e.startsWith(Cc)?e.substring(1):e,QS=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let i=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...i.sort(),a),i=[]):i.push(a)}),o.push(...i.sort()),o}},JS=e=>({cache:GS(e.cacheSize),parseClassName:ZS(e),sortModifiers:QS(e),...WS(e)}),eT=/\s+/,tT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(eT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!g,v=r(h?m.substring(0,g):m);if(!v){if(!h){l=u+(l.length>0?" "+l:l);continue}if(v=r(m),!v){l=u+(l.length>0?" "+l:l);continue}h=!1}const y=i(p).join(":"),x=f?y+Cc:y,T=x+v;if(a.includes(T))continue;a.push(T);const w=o(v,h);for(let S=0;S<w.length;++S){const C=w[S];a.push(x+C)}l=u+(l.length>0?" "+l:l)}return l};function nT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Bh(t))&&(r&&(r+=" "),r+=n);return r}const Bh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Bh(e[r]))&&(n&&(n+=" "),n+=t);return n};function rT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=JS(c),r=n.cache.get,o=n.cache.set,i=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=tT(l,n);return o(l,u),u}return function(){return i(nT.apply(null,arguments))}}const It=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Hh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Wh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,oT=/^\d+\/\d+$/,iT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,aT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,sT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,lT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,po=e=>oT.test(e),je=e=>!!e&&!Number.isNaN(Number(e)),Pr=e=>!!e&&Number.isInteger(Number(e)),qh=e=>e.endsWith("%")&&je(e.slice(0,-1)),Qn=e=>iT.test(e),uT=()=>!0,dT=e=>aT.test(e)&&!sT.test(e),Pc=()=>!1,fT=e=>lT.test(e),pT=e=>cT.test(e),hT=e=>!me(e)&&!ge(e),mT=e=>ho(e,Gh,Pc),me=e=>Hh.test(e),Ar=e=>ho(e,Kh,dT),Ac=e=>ho(e,kT,je),gT=e=>ho(e,Uh,Pc),vT=e=>ho(e,Yh,pT),yT=e=>ho(e,Pc,fT),ge=e=>Wh.test(e),Na=e=>mo(e,Kh),bT=e=>mo(e,PT),xT=e=>mo(e,Uh),wT=e=>mo(e,Gh),ST=e=>mo(e,Yh),TT=e=>mo(e,AT,!0),ho=(e,t,n)=>{const r=Hh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},mo=(e,t,n=!1)=>{const r=Wh.exec(e);return r?r[1]?t(r[1]):n:!1},Uh=e=>e==="position",ET=new Set(["image","url"]),Yh=e=>ET.has(e),CT=new Set(["length","size","percentage"]),Gh=e=>CT.has(e),Kh=e=>e==="length",kT=e=>e==="number",PT=e=>e==="family-name",AT=e=>e==="shadow",_T=rT(()=>{const e=It("color"),t=It("font"),n=It("text"),r=It("font-weight"),o=It("tracking"),i=It("leading"),a=It("breakpoint"),s=It("container"),l=It("spacing"),c=It("radius"),u=It("shadow"),d=It("inset-shadow"),p=It("drop-shadow"),f=It("blur"),m=It("perspective"),g=It("aspect"),h=It("ease"),v=It("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],T=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],S=()=>[ge,me,l],C=()=>[po,"full","auto",...S()],P=()=>[Pr,"none","subgrid",ge,me],I=()=>["auto",{span:["full",Pr,ge,me]},ge,me],_=()=>[Pr,"auto",ge,me],M=()=>["auto","min","max","fr",ge,me],L=()=>["start","end","center","between","around","evenly","stretch","baseline"],$=()=>["start","end","center","stretch"],A=()=>["auto",...S()],O=()=>[po,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],N=()=>[e,ge,me],V=()=>[qh,Ar],F=()=>["","none","full",c,ge,me],z=()=>["",je,Na,Ar],D=()=>["solid","dashed","dotted","double"],R=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>["","none",f,ge,me],te=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge,me],ee=()=>["none",je,ge,me],Z=()=>["none",je,ge,me],U=()=>[je,ge,me],Y=()=>[po,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qn],breakpoint:[Qn],color:[uT],container:[Qn],"drop-shadow":[Qn],ease:["in","out","in-out"],font:[hT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qn],shadow:[Qn],spacing:["px",je],text:[Qn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",po,me,ge,g]}],container:["container"],columns:[{columns:[je,me,ge,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...x(),me,ge]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[Pr,"auto",ge,me]}],basis:[{basis:[po,"full","auto",s,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,po,"auto","initial","none",me]}],grow:[{grow:["",je,ge,me]}],shrink:[{shrink:["",je,ge,me]}],order:[{order:[Pr,"first","last","none",ge,me]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...$(),"baseline"]}],"align-self":[{self:["auto",...$(),"baseline"]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[s,"screen",...O()]}],"min-w":[{"min-w":[s,"screen","none",...O()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...O()]}],h:[{h:["screen",...O()]}],"min-h":[{"min-h":["screen","none",...O()]}],"max-h":[{"max-h":["screen",...O()]}],"font-size":[{text:["base",n,Na,Ar]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ge,Ac]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qh,me]}],"font-family":[{font:[bT,me,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ge,me]}],"line-clamp":[{"line-clamp":[je,"none",ge,Ac]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",ge,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",ge,Ar]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[je,"auto",ge,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),xT,gT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",wT,mT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Pr,ge,me],radial:["",ge,me],conic:[Pr,ge,me]},ST,vT]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...D(),"hidden","none"]}],"divide-style":[{divide:[...D(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...D(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,ge,me]}],"outline-w":[{outline:["",je,Na,Ar]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,TT,yT]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",ge,me,d]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[je,Ar]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":N()}],opacity:[{opacity:[je,ge,me]}],"mix-blend":[{"mix-blend":[...R(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":R()}],filter:[{filter:["","none",ge,me]}],blur:[{blur:J()}],brightness:[{brightness:[je,ge,me]}],contrast:[{contrast:[je,ge,me]}],"drop-shadow":[{"drop-shadow":["","none",p,ge,me]}],grayscale:[{grayscale:["",je,ge,me]}],"hue-rotate":[{"hue-rotate":[je,ge,me]}],invert:[{invert:["",je,ge,me]}],saturate:[{saturate:[je,ge,me]}],sepia:[{sepia:["",je,ge,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,me]}],"backdrop-blur":[{"backdrop-blur":J()}],"backdrop-brightness":[{"backdrop-brightness":[je,ge,me]}],"backdrop-contrast":[{"backdrop-contrast":[je,ge,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,ge,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,ge,me]}],"backdrop-invert":[{"backdrop-invert":["",je,ge,me]}],"backdrop-opacity":[{"backdrop-opacity":[je,ge,me]}],"backdrop-saturate":[{"backdrop-saturate":[je,ge,me]}],"backdrop-sepia":[{"backdrop-sepia":["",je,ge,me]}],"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:["","all","colors","opacity","shadow","transform","none",ge,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",ge,me]}],ease:[{ease:["linear","initial",h,ge,me]}],delay:[{delay:[je,ge,me]}],animate:[{animate:["none",v,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ge,me]}],"perspective-origin":[{"perspective-origin":te()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:U()}],"skew-x":[{"skew-x":U()}],"skew-y":[{"skew-y":U()}],transform:[{transform:[ge,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:te()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Y()}],"translate-x":[{"translate-x":Y()}],"translate-y":[{"translate-y":Y()}],"translate-z":[{"translate-z":Y()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge,me]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[je,Na,Ar,Ac]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}}),Fa=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},IT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),OT=e=>rt.function(e),Le=(...e)=>_T(jp(e)),Zh=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Si=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Xh=e=>e.scrollHeight>e.clientHeight,MT="span",on=E.forwardRef(function(t,n){const r=t.as||MT;return b.jsx(r,{ref:n,...t,as:void 0})}),DT=uo("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-primary text-primary-foreground",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),go=E.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:a,rounded:s,...l},c){const u=r||l.disabled;return b.jsxs(on,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Le(DT({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),vo=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function NT(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const FT=({children:e,...t})=>{const n=vo(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:NT(r.current));return E.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),i(d=>c.isIntersecting?!0:d)});return s.observe(a),()=>s.disconnect()},[]),b.jsx("div",{...t,ref:r,children:o?e:null})},LT=uo("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",primary:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),VT=uo("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),_c=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return b.jsxs(on,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Le(VT({size:a,theme:i}),t),children:[n?b.jsx("span",{"aria-hidden":"true",className:LT({theme:n})}):null,r,s.children]})}),Ti=E.createContext({});function pn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ic=typeof window<"u",La=Ic?E.useLayoutEffect:E.useEffect,Va=E.createContext(null),yo=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class jT extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function $T({children:e,isPresent:t,anchorX:n}){const r=E.useId(),o=E.useRef(null),i=E.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=E.useContext(yo);return E.useInsertionEffect(()=>{const{width:s,height:l,top:c,left:u,right:d}=i.current;if(t||!o.current||!s||!l)return;const p=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const f=document.createElement("style");return a&&(f.nonce=a),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
|
|
4
|
+
`+q.prev}function Tr(H,q){var Re=Y(H),et=[];if(Re){et.length=H.length;for(var ct=0;ct<H.length;ct++)et[ct]=se(H,ct)?q(H[ct],H):""}var De=typeof L=="function"?L(H):[],Er;if(A){Er={};for(var co=0;co<De.length;co++)Er["$"+De[co]]=De[co]}for(var rn in H)se(H,rn)&&(Re&&String(Number(rn))===rn&&rn<H.length||A&&Er["$"+rn]instanceof Symbol||(S.call(/[^\w$]/,rn)?et.push(q(rn,H)+": "+q(H[rn],H)):et.push(rn+": "+q(H[rn],H))));if(typeof L=="function")for(var Cr=0;Cr<De.length;Cr++)N.call(H,De[Cr])&&et.push("["+q(De[Cr])+"]: "+q(H[De[Cr]],H));return et}return Nl}var Fl,qp;function fS(){if(qp)return Fl;qp=1;var e=Ma(),t=fo(),n=function(s,l,c){for(var u=s,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=s.next,s.next=d),d},r=function(s,l){if(s){var c=n(s,l);return c&&c.value}},o=function(s,l,c){var u=n(s,l);u?u.value=c:s.next={key:l,next:s.next,value:c}},i=function(s,l){return s?!!n(s,l):!1},a=function(s,l){if(s)return n(s,l,!0)};return Fl=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,p=a(l,u);return p&&d&&d===p&&(l=void 0),!!p},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},Fl}var Ll,Up;function Yp(){return Up||(Up=1,Ll=Object),Ll}var Vl,Gp;function pS(){return Gp||(Gp=1,Vl=Error),Vl}var jl,Kp;function hS(){return Kp||(Kp=1,jl=EvalError),jl}var $l,Zp;function mS(){return Zp||(Zp=1,$l=RangeError),$l}var Rl,Xp;function gS(){return Xp||(Xp=1,Rl=ReferenceError),Rl}var zl,Qp;function vS(){return Qp||(Qp=1,zl=SyntaxError),zl}var Bl,Jp;function yS(){return Jp||(Jp=1,Bl=URIError),Bl}var Hl,eh;function bS(){return eh||(eh=1,Hl=Math.abs),Hl}var Wl,th;function xS(){return th||(th=1,Wl=Math.floor),Wl}var ql,nh;function wS(){return nh||(nh=1,ql=Math.max),ql}var Ul,rh;function SS(){return rh||(rh=1,Ul=Math.min),Ul}var Yl,oh;function TS(){return oh||(oh=1,Yl=Math.pow),Yl}var Gl,ih;function ES(){return ih||(ih=1,Gl=Math.round),Gl}var Kl,ah;function CS(){return ah||(ah=1,Kl=Number.isNaN||function(t){return t!==t}),Kl}var Zl,sh;function kS(){if(sh)return Zl;sh=1;var e=CS();return Zl=function(n){return e(n)||n===0?n:n<0?-1:1},Zl}var Xl,lh;function PS(){return lh||(lh=1,Xl=Object.getOwnPropertyDescriptor),Xl}var Ql,ch;function uh(){if(ch)return Ql;ch=1;var e=PS();if(e)try{e([],"length")}catch{e=null}return Ql=e,Ql}var Jl,dh;function AS(){if(dh)return Jl;dh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Jl=e,Jl}var ec,fh;function _S(){return fh||(fh=1,ec=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0}),ec}var tc,ph;function IS(){if(ph)return tc;ph=1;var e=typeof Symbol<"u"&&Symbol,t=_S();return tc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},tc}var nc,hh;function mh(){return hh||(hh=1,nc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),nc}var rc,gh;function vh(){if(gh)return rc;gh=1;var e=Yp();return rc=e.getPrototypeOf||null,rc}var oc,yh;function OS(){if(yh)return oc;yh=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var p=0;p<c.length;p+=1)u[p+l.length]=c[p];return u},i=function(l,c){for(var u=[],d=c,p=0;d<l.length;d+=1,p+=1)u[p]=l[d];return u},a=function(s,l){for(var c="",u=0;u<s.length;u+=1)c+=s[u],u+1<s.length&&(c+=l);return c};return oc=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,p=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),m=[],g=0;g<f;g++)m[g]="$"+g;if(d=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},oc}var ic,bh;function Da(){if(bh)return ic;bh=1;var e=OS();return ic=Function.prototype.bind||e,ic}var ac,xh;function sc(){return xh||(xh=1,ac=Function.prototype.call),ac}var lc,wh;function Sh(){return wh||(wh=1,lc=Function.prototype.apply),lc}var cc,Th;function MS(){return Th||(Th=1,cc=typeof Reflect<"u"&&Reflect&&Reflect.apply),cc}var uc,Eh;function DS(){if(Eh)return uc;Eh=1;var e=Da(),t=Sh(),n=sc(),r=MS();return uc=r||e.call(n,t),uc}var dc,Ch;function kh(){if(Ch)return dc;Ch=1;var e=Da(),t=fo(),n=sc(),r=DS();return dc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},dc}var fc,Ph;function NS(){if(Ph)return fc;Ph=1;var e=kh(),t=uh(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return fc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,fc}var pc,Ah;function FS(){if(Ah)return pc;Ah=1;var e=mh(),t=vh(),n=NS();return pc=e?function(o){return e(o)}:t?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return t(o)}:n?function(o){return n(o)}:null,pc}var hc,_h;function LS(){if(_h)return hc;_h=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Da();return hc=n.call(e,t),hc}var mc,Ih;function gc(){if(Ih)return mc;Ih=1;var e,t=Yp(),n=pS(),r=hS(),o=mS(),i=gS(),a=vS(),s=fo(),l=yS(),c=bS(),u=xS(),d=wS(),p=SS(),f=TS(),m=ES(),g=kS(),h=Function,v=function(W){try{return h('"use strict"; return ('+W+").constructor;")()}catch{}},y=uh(),x=AS(),T=function(){throw new s},w=y?function(){try{return arguments.callee,T}catch{try{return y(arguments,"callee").get}catch{return T}}}():T,S=IS()(),C=FS(),P=vh(),I=mh(),_=Sh(),M=sc(),L={},$=typeof Uint8Array>"u"||!C?e:C(Uint8Array),A={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":S&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":L,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!S||!C?e:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":y,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!S||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&C?C(""[Symbol.iterator]()):e,"%Symbol%":S?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":$,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":M,"%Function.prototype.apply%":_,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":P,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":m,"%Math.sign%":g,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch(W){var O=C(C(W));A["%Error.prototype%"]=O}var N=function W(G){var ae;if(G==="%AsyncFunction%")ae=v("async function () {}");else if(G==="%GeneratorFunction%")ae=v("function* () {}");else if(G==="%AsyncGeneratorFunction%")ae=v("async function* () {}");else if(G==="%AsyncGenerator%"){var B=W("%AsyncGeneratorFunction%");B&&(ae=B.prototype)}else if(G==="%AsyncIteratorPrototype%"){var xe=W("%AsyncGenerator%");xe&&C&&(ae=C(xe.prototype))}return A[G]=ae,ae},V={__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"]},F=Da(),z=LS(),D=F.call(M,Array.prototype.concat),R=F.call(_,Array.prototype.splice),J=F.call(M,String.prototype.replace),te=F.call(M,String.prototype.slice),ee=F.call(M,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,Y=function(G){var ae=te(G,0,1),B=te(G,-1);if(ae==="%"&&B!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&ae!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var xe=[];return J(G,Z,function(Ee,Oe,$e,se){xe[xe.length]=$e?J(se,U,"$1"):Oe||Ee}),xe},j=function(G,ae){var B=G,xe;if(z(V,B)&&(xe=V[B],B="%"+xe[0]+"%"),z(A,B)){var Ee=A[B];if(Ee===L&&(Ee=N(B)),typeof Ee>"u"&&!ae)throw new s("intrinsic "+G+" exists, but is not available. Please file an issue!");return{alias:xe,name:B,value:Ee}}throw new a("intrinsic "+G+" does not exist!")};return mc=function(G,ae){if(typeof G!="string"||G.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ae!="boolean")throw new s('"allowMissing" argument must be a boolean');if(ee(/^%?[^%]*%?$/,G)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=Y(G),xe=B.length>0?B[0]:"",Ee=j("%"+xe+"%",ae),Oe=Ee.name,$e=Ee.value,se=!1,ye=Ee.alias;ye&&(xe=ye[0],R(B,D([0,1],ye)));for(var K=1,ce=!0;K<B.length;K+=1){var Q=B[K],ie=te(Q,0,1),we=te(Q,-1);if((ie==='"'||ie==="'"||ie==="`"||we==='"'||we==="'"||we==="`")&&ie!==we)throw new a("property names with quotes must have matching quotes");if((Q==="constructor"||!ce)&&(se=!0),xe+="."+Q,Oe="%"+xe+"%",z(A,Oe))$e=A[Oe];else if($e!=null){if(!(Q in $e)){if(!ae)throw new s("base intrinsic for "+G+" exists, but the property is not available.");return}if(y&&K+1>=B.length){var X=y($e,Q);ce=!!X,ce&&"get"in X&&!("originalValue"in X.get)?$e=X.get:$e=$e[Q]}else ce=z($e,Q),$e=$e[Q];ce&&!se&&(A[Oe]=$e)}}return $e},mc}var vc,Oh;function Mh(){if(Oh)return vc;Oh=1;var e=gc(),t=kh(),n=t([e("%String.prototype.indexOf%")]);return vc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},vc}var yc,Dh;function Nh(){if(Dh)return yc;Dh=1;var e=gc(),t=Mh(),n=Ma(),r=fo(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return yc=!!o&&function(){var d,p={assert:function(f){if(!p.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var m=l(d,f);return c(d)===0&&(d=void 0),m}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,m){d||(d=new o),a(d,f,m)}};return p},yc}var bc,Fh;function VS(){if(Fh)return bc;Fh=1;var e=gc(),t=Mh(),n=Ma(),r=Nh(),o=fo(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return bc=i?function(){var d,p,f={assert:function(m){if(!f.has(m))throw new o("Side channel does not contain "+n(m))},delete:function(m){if(i&&m&&(typeof m=="object"||typeof m=="function")){if(d)return c(d,m)}else if(r&&p)return p.delete(m);return!1},get:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?a(d,m):p&&p.get(m)},has:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?l(d,m):!!p&&p.has(m)},set:function(m,g){i&&m&&(typeof m=="object"||typeof m=="function")?(d||(d=new i),s(d,m,g)):r&&(p||(p=r()),p.set(m,g))}};return f}:r,bc}var xc,Lh;function jS(){if(Lh)return xc;Lh=1;var e=fo(),t=Ma(),n=fS(),r=Nh(),o=VS(),i=o||r||n;return xc=function(){var s,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!s&&s.delete(c)},get:function(c){return s&&s.get(c)},has:function(c){return!!s&&s.has(c)},set:function(c,u){s||(s=i()),s.set(c,u)}};return l},xc}var Vh=e=>Array.isArray(e),wc=e=>e===void 0,Sc=e=>e===null,$S=Function.bind.call(Function.call,Object.prototype.toString),RS=e=>!!e&&$S(e)==="[object Error]"||e instanceof Error,jh=(e,t)=>e instanceof t,zS=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},BS=e=>Object.prototype.toString.call(e)==="[object Date]"&&jh(e,Date),tt={array:Vh,date:BS,empty:e=>Sc(e)||wc(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:jh,isError:RS,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Sc(e)||wc(e),null:Sc,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Vh(e)&&typeof e=="object",primitive:zS,string:e=>typeof e=="string",undefined:wc},HS=e=>Object.keys(e),kr=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,a)=>i&&i[a],e);return o===void 0?n:o};const Tc="-",WS=e=>{const t=US(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Tc);return s[0]===""&&s.length!==1&&s.shift(),$h(s,t)||qS(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},$h=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?$h(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Tc);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Rh=/^\[(.+)\]$/,qS=e=>{if(Rh.test(e)){const t=Rh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},US=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Ec(n[o],r,o,t);return r},Ec=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:zh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(YS(o)){Ec(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Ec(a,zh(t,i),n,r)})})},zh=(e,t)=>{let n=e;return t.split(Tc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},YS=e=>e.isThemeGetter,GS=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},Cc="!",kc=":",KS=kc.length,ZS=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let m=0;m<o.length;m++){let g=o[m];if(a===0&&s===0){if(g===kc){i.push(o.slice(l,m)),l=m+KS;continue}if(g==="/"){c=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=XS(u),p=d!==u,f=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+kc,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},XS=e=>e.endsWith(Cc)?e.substring(0,e.length-1):e.startsWith(Cc)?e.substring(1):e,QS=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let i=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...i.sort(),a),i=[]):i.push(a)}),o.push(...i.sort()),o}},JS=e=>({cache:GS(e.cacheSize),parseClassName:ZS(e),sortModifiers:QS(e),...WS(e)}),eT=/\s+/,tT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(eT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!g,v=r(h?m.substring(0,g):m);if(!v){if(!h){l=u+(l.length>0?" "+l:l);continue}if(v=r(m),!v){l=u+(l.length>0?" "+l:l);continue}h=!1}const y=i(p).join(":"),x=f?y+Cc:y,T=x+v;if(a.includes(T))continue;a.push(T);const w=o(v,h);for(let S=0;S<w.length;++S){const C=w[S];a.push(x+C)}l=u+(l.length>0?" "+l:l)}return l};function nT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Bh(t))&&(r&&(r+=" "),r+=n);return r}const Bh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Bh(e[r]))&&(n&&(n+=" "),n+=t);return n};function rT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=JS(c),r=n.cache.get,o=n.cache.set,i=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=tT(l,n);return o(l,u),u}return function(){return i(nT.apply(null,arguments))}}const It=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Hh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Wh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,oT=/^\d+\/\d+$/,iT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,aT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,sT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,lT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,po=e=>oT.test(e),je=e=>!!e&&!Number.isNaN(Number(e)),Pr=e=>!!e&&Number.isInteger(Number(e)),qh=e=>e.endsWith("%")&&je(e.slice(0,-1)),Qn=e=>iT.test(e),uT=()=>!0,dT=e=>aT.test(e)&&!sT.test(e),Pc=()=>!1,fT=e=>lT.test(e),pT=e=>cT.test(e),hT=e=>!me(e)&&!ge(e),mT=e=>ho(e,Gh,Pc),me=e=>Hh.test(e),Ar=e=>ho(e,Kh,dT),Ac=e=>ho(e,kT,je),gT=e=>ho(e,Uh,Pc),vT=e=>ho(e,Yh,pT),yT=e=>ho(e,Pc,fT),ge=e=>Wh.test(e),Na=e=>mo(e,Kh),bT=e=>mo(e,PT),xT=e=>mo(e,Uh),wT=e=>mo(e,Gh),ST=e=>mo(e,Yh),TT=e=>mo(e,AT,!0),ho=(e,t,n)=>{const r=Hh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},mo=(e,t,n=!1)=>{const r=Wh.exec(e);return r?r[1]?t(r[1]):n:!1},Uh=e=>e==="position",ET=new Set(["image","url"]),Yh=e=>ET.has(e),CT=new Set(["length","size","percentage"]),Gh=e=>CT.has(e),Kh=e=>e==="length",kT=e=>e==="number",PT=e=>e==="family-name",AT=e=>e==="shadow",_T=rT(()=>{const e=It("color"),t=It("font"),n=It("text"),r=It("font-weight"),o=It("tracking"),i=It("leading"),a=It("breakpoint"),s=It("container"),l=It("spacing"),c=It("radius"),u=It("shadow"),d=It("inset-shadow"),p=It("drop-shadow"),f=It("blur"),m=It("perspective"),g=It("aspect"),h=It("ease"),v=It("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],T=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],S=()=>[ge,me,l],C=()=>[po,"full","auto",...S()],P=()=>[Pr,"none","subgrid",ge,me],I=()=>["auto",{span:["full",Pr,ge,me]},ge,me],_=()=>[Pr,"auto",ge,me],M=()=>["auto","min","max","fr",ge,me],L=()=>["start","end","center","between","around","evenly","stretch","baseline"],$=()=>["start","end","center","stretch"],A=()=>["auto",...S()],O=()=>[po,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],N=()=>[e,ge,me],V=()=>[qh,Ar],F=()=>["","none","full",c,ge,me],z=()=>["",je,Na,Ar],D=()=>["solid","dashed","dotted","double"],R=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>["","none",f,ge,me],te=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge,me],ee=()=>["none",je,ge,me],Z=()=>["none",je,ge,me],U=()=>[je,ge,me],Y=()=>[po,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qn],breakpoint:[Qn],color:[uT],container:[Qn],"drop-shadow":[Qn],ease:["in","out","in-out"],font:[hT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qn],shadow:[Qn],spacing:["px",je],text:[Qn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",po,me,ge,g]}],container:["container"],columns:[{columns:[je,me,ge,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...x(),me,ge]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[Pr,"auto",ge,me]}],basis:[{basis:[po,"full","auto",s,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,po,"auto","initial","none",me]}],grow:[{grow:["",je,ge,me]}],shrink:[{shrink:["",je,ge,me]}],order:[{order:[Pr,"first","last","none",ge,me]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...$(),"baseline"]}],"align-self":[{self:["auto",...$(),"baseline"]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[s,"screen",...O()]}],"min-w":[{"min-w":[s,"screen","none",...O()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...O()]}],h:[{h:["screen",...O()]}],"min-h":[{"min-h":["screen","none",...O()]}],"max-h":[{"max-h":["screen",...O()]}],"font-size":[{text:["base",n,Na,Ar]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ge,Ac]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qh,me]}],"font-family":[{font:[bT,me,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ge,me]}],"line-clamp":[{"line-clamp":[je,"none",ge,Ac]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",ge,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",ge,Ar]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[je,"auto",ge,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),xT,gT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",wT,mT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Pr,ge,me],radial:["",ge,me],conic:[Pr,ge,me]},ST,vT]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...D(),"hidden","none"]}],"divide-style":[{divide:[...D(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...D(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,ge,me]}],"outline-w":[{outline:["",je,Na,Ar]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,TT,yT]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",ge,me,d]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[je,Ar]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":N()}],opacity:[{opacity:[je,ge,me]}],"mix-blend":[{"mix-blend":[...R(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":R()}],filter:[{filter:["","none",ge,me]}],blur:[{blur:J()}],brightness:[{brightness:[je,ge,me]}],contrast:[{contrast:[je,ge,me]}],"drop-shadow":[{"drop-shadow":["","none",p,ge,me]}],grayscale:[{grayscale:["",je,ge,me]}],"hue-rotate":[{"hue-rotate":[je,ge,me]}],invert:[{invert:["",je,ge,me]}],saturate:[{saturate:[je,ge,me]}],sepia:[{sepia:["",je,ge,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,me]}],"backdrop-blur":[{"backdrop-blur":J()}],"backdrop-brightness":[{"backdrop-brightness":[je,ge,me]}],"backdrop-contrast":[{"backdrop-contrast":[je,ge,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,ge,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,ge,me]}],"backdrop-invert":[{"backdrop-invert":["",je,ge,me]}],"backdrop-opacity":[{"backdrop-opacity":[je,ge,me]}],"backdrop-saturate":[{"backdrop-saturate":[je,ge,me]}],"backdrop-sepia":[{"backdrop-sepia":["",je,ge,me]}],"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:["","all","colors","opacity","shadow","transform","none",ge,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",ge,me]}],ease:[{ease:["linear","initial",h,ge,me]}],delay:[{delay:[je,ge,me]}],animate:[{animate:["none",v,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ge,me]}],"perspective-origin":[{"perspective-origin":te()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:U()}],"skew-x":[{"skew-x":U()}],"skew-y":[{"skew-y":U()}],transform:[{transform:[ge,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:te()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Y()}],"translate-x":[{"translate-x":Y()}],"translate-y":[{"translate-y":Y()}],"translate-z":[{"translate-z":Y()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge,me]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[je,Na,Ar,Ac]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}}),Fa=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},IT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),OT=e=>tt.function(e),Le=(...e)=>_T(jp(e)),Zh=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Si=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Xh=e=>e.scrollHeight>e.clientHeight,MT="span",on=E.forwardRef(function(t,n){const r=t.as||MT;return b.jsx(r,{ref:n,...t,as:void 0})}),DT=uo("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-primary text-primary-foreground",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),go=E.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:a,rounded:s,...l},c){const u=r||l.disabled;return b.jsxs(on,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Le(DT({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),vo=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function NT(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const FT=({children:e,...t})=>{const n=vo(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:NT(r.current));return E.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),i(d=>c.isIntersecting?!0:d)});return s.observe(a),()=>s.disconnect()},[]),b.jsx("div",{...t,ref:r,children:o?e:null})},LT=uo("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",primary:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),VT=uo("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),_c=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return b.jsxs(on,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Le(VT({size:a,theme:i}),t),children:[n?b.jsx("span",{"aria-hidden":"true",className:LT({theme:n})}):null,r,s.children]})}),Ti=E.createContext({});function pn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ic=typeof window<"u",La=Ic?E.useLayoutEffect:E.useEffect,Va=E.createContext(null),yo=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class jT extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function $T({children:e,isPresent:t,anchorX:n}){const r=E.useId(),o=E.useRef(null),i=E.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=E.useContext(yo);return E.useInsertionEffect(()=>{const{width:s,height:l,top:c,left:u,right:d}=i.current;if(t||!o.current||!s||!l)return;const p=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const f=document.createElement("style");return a&&(f.nonce=a),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
|
|
5
5
|
[data-motion-pop-id="${r}"] {
|
|
6
6
|
position: absolute !important;
|
|
7
7
|
width: ${s}px !important;
|
|
@@ -166,32 +166,32 @@
|
|
|
166
166
|
*
|
|
167
167
|
* This source code is licensed under the MIT license found in the
|
|
168
168
|
* LICENSE file in the root directory of this source tree.
|
|
169
|
-
*/var ib;function $O(){return ib||(ib=1,process.env.NODE_ENV!=="production"&&function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=E,n=rb(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;nd.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function v(S){if(!y){if(y=!0,x=S,S=p(S),f!==void 0&&g.hasValue){var C=g.value;if(f(C,S))return T=C}return T=S}if(C=T,r(x,S))return C;var P=p(S);return f!==void 0&&f(C,P)?(x=S,C):(x=S,T=P)}var y=!1,x,T,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var h=o(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),nd}var ab;function RO(){return ab||(ab=1,process.env.NODE_ENV==="production"?hs.exports=jO():hs.exports=$O()),hs.exports}RO();var Lo=function(){return Lo=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Lo.apply(this,arguments)};function Zi(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function sb(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Vo=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},zO=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},BO=function(e){return Object.entries(e)},lb=function(e){return e instanceof Promise},cb=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},Lo(Lo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},HO=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=performance.now(),c=t.apply(void 0,sb([],Zi(a),!1)),u=function(d,p){return n(function(f){return cb(d,f,i,p)})};return lb(c)?c.then(function(d){o.current={method:e,props:r(),time:performance.now()-l},u(d,o.current)}):(o.current={method:e,props:r(),time:performance.now()-l},void u(c,o.current))}},WO=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,sb([],Zi(a),!1)),c=function(u){return n(function(d){return cb(u,d,i,o.current)})};return lb(l)?l.then(function(u){return c(u)}):c(l)}},rd=function(e,t,n){var r,o,i,a=Zi(E.useState(function(){return e}),2),s=a[0],l=a[1],c=Vo(s),u=Vo((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=Vo(t),p=Vo((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=Vo((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),m=E.useRef(e),g=zO(s),h=Vo(g),v=E.useRef(null);E.useEffect(function(){if(v.current!==null){var T=v.current;p.current.forEach(function(w){w(s,g,T)})}},[s,p,g]);var y=Zi(E.useState(function(){var T=function(){return u.current},w=d.current({props:T,state:function(){return c.current},initialState:m.current,previousState:function(){return h.current}});return BO(w).reduce(function(S,C){var P,I=Zi(C,2),_=I[0],M=I[1];return Lo(Lo({},S),(P={},P[_]=n!=null&&n.debug?HO(_,M,l,T,v,f.current):WO(_,M,l,T,v,f.current),P))},{})}),1),x=y[0];return[s,x,u.current]};const qO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function UO(e,t){return E.useRef(qO(e,t)).current}const gs={hex:e=>e,raw:e=>e,hsl:e=>`hsl(${e})`,rgb:e=>`rgb(${e})`,z:(e,t,n)=>`var(--z-${n})`,hsla:e=>`hsla(${e})`,rgba:e=>`rgba(${e})`,cssVariable:(e,t,n)=>`var(--${n})`,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},jr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(a,l,s))}return o.concat(jr(a,t,n,s))},[]),ub=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(a,i,s)}}return{...o,[i]:ub(a,t,n,s)}},{}),db={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},vs=(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)},YO={default:e=>vs(e,{result:db.default}),dark:e=>vs(e,{result:db.dark})},Xi=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},GO=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),od=(e,t)=>{const n=jr(e.colors,Xi(t==null?void 0:t.colors)),r=jr(e.spacing,Xi(t==null?void 0:t.spacing)),o=jr(e.rounded,Xi(t==null?void 0:t.rounded)),i=jr(e.zIndex,Xi((t==null?void 0:t.zIndex)??GO)),a=e.custom?jr(e.custom,Xi(t==null?void 0:t.customTokens)):[];return n.concat(r,o,a,i)},KO=(e,t)=>vs(od(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),ZO=(e,t)=>od(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),XO=(e,t)=>vs(od(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ys={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>b.jsxs(E.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To",calendarToday:"Today",calendarBackMonth:"Back month",calendarNextMonth:"Next month",calendarMonthLabel:"Month",multiSelectSelectedLabel:"Selected",multiSelectInnerPlaceholder:"Search..."},bs={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0}},jo=E.createContext({tweaks:bs,parser:gs.hsla,map:ys,locale:void 0}),id=e=>{const t=E.useContext(jo);if(e)return e;if(t)return t.locale||e};function QO(e,t){const n=E.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const s=i.changedTouches[0].clientX-n.current;Math.abs(s)>t&&e(i,s>0?"right":"left"),n.current=null}}}const Ot=()=>{const e=E.useContext(jo);return e?e.map:ys},cn=(e,t=2)=>e.toString(16).padStart(t,"0"),$o=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${cn(t,4)+cn(n,3)}-${cn(r[0])+cn(r[1])}-${cn(r[2])+cn(r[3])}-${cn(r[4])+cn(r[5])}-${cn(r[6])+cn(r[7])+cn(r[8])+cn(r[9])}`},fb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),pb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},ad=(e,t)=>{const n=fb(t,pb.basic,e)||fb(t,pb.extend,e);return n===void 0||n===e?void 0:n},$r=()=>typeof window>"u",sd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),hb=(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},JO=e=>!e,ld=()=>{},mb=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},eM={type:"spring",bounce:.3,duration:.6},gb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),vb={enter:gb(1),exit:gb(-1),middle:{x:"0%",opacity:1}},yb={exit:{visibility:"hidden"}},tM=e=>{const t=Pn(Py(e));return ky({start:t,end:Mo(t,{days:41})})},bb=(e,t)=>e.toLocaleDateString(t,{month:"long"}),nM=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=Py(new Date(1970,o,1).setMonth(o)),a=bb(i,n);return b.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),cd={ArrowLeft:(e,t)=>t==="days"?Ui(e,{days:1}):Ui(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Mo(e,{days:1}):Mo(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ui(e,{weeks:1}):Ui(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Mo(e,{weeks:1}):Mo(e,{years:1})},xb=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var a;if(e!=null&&e.dataset.focustrap){const s=(a=t.current)==null?void 0:a.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>s==null?void 0:s.focus({preventScroll:!1}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},Rr=e=>e.getFullYear().toString().padStart(4,"0"),rM=(e,t,n)=>e===void 0||n===void 0?!1:gI(t,e)&&vI(t,n),oM=e=>{var n;const t=Ot();return b.jsx(ft.tbody,{layout:!0,variants:vb,custom:e.direction,onKeyDown:e.onKeyDown,className:Le((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=rt.function((a=e.styles)==null?void 0:a.week)?(s=e.styles)==null?void 0:s.week(r):(l=e.styles)==null?void 0:l.week;return b.jsx("tr",{className:i,children:r.map(c=>{var v,y,x,T,w,S,C,P,I,_,M,L,$,A,O,N,V,F;const u=c.toISOString(),d=e.rangeMode?u===((y=(v=e.range)==null?void 0:v.to)==null?void 0:y.toISOString())||u===((T=(x=e.range)==null?void 0:x.from)==null?void 0:T.toISOString()):u===((w=e.date)==null?void 0:w.toISOString()),p=mO(c)&&e.markToday,f=((S=e.disabledDate)==null?void 0:S.call(e,c))||!1,m=hO(c,e.stateDate),g=!m||f,h=e.rangeMode?rM((C=e.range)==null?void 0:C.from,c,(P=e.range)==null?void 0:P.to):!1;return b.jsxs("td",{align:"center",className:Le("relative",rt.function((I=e.styles)==null?void 0:I.dayFrame)?(_=e.styles)==null?void 0:_.dayFrame(c):(M=e.styles)==null?void 0:M.dayFrame),children:[b.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":m,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Le(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${p?"text-emphasis":""} ${g?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,h&&e.markRange?"size-10 border border-dashed border-card-border":"",rt.function((L=e.styles)==null?void 0:L.day)?($=e.styles)==null?void 0:$.day(c):(A=e.styles)==null?void 0:A.day),children:[c.getDate(),d&&((O=e.stateRange.from)==null?void 0:O.toISOString())===u?b.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:b.jsx("span",{className:"text-xs text-foreground",children:((N=e.labelRange)==null?void 0:N.from)??t.calendarFromDate})}):null,d&&((V=e.stateRange.to)==null?void 0:V.toISOString())===u?b.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:b.jsx("span",{className:"text-xs text-foreground",children:((F=e.labelRange)==null?void 0:F.to)??t.calendarToDate})}):null]}),e.RenderOnDay?b.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},iM=()=>No(new Date),wb=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,...p})=>{const f=E.useRef($o()),m=Ot(),g=id(o),h=E.useRef(null),{date:v,range:y}=p,x=v||new Date,T=E.useRef(null),[w,S]=rd({date:x,isAnimating:!1,year:Rr(x),direction:void 0,range:{from:y==null?void 0:y.from,to:y==null?void 0:y.to},months:nM(f.current,x,g),selectMode:l?"from":void 0,week:ky({start:Pn(x),end:T_(x)})},A=>({onChangeYear:O=>({year:O}),onExitComplete:()=>(xb(T.current||null,h,A.state().date,200),T.current=null,{isAnimating:!1}),date:O=>{const N=O(A.state().date);return{date:N,year:Rr(N)}},nextMonth:O=>{O&&(T.current=O.currentTarget);const N=A.state();if(N.isAnimating)return N;const V=Mo(N.date,{months:1});return{date:V,isAnimating:!0,direction:1,year:Rr(V)}},previousMonth:O=>{O&&(T.current=O.currentTarget);const N=A.state();if(N.isAnimating)return N;const V=Ui(N.date,{months:1});return{date:V,isAnimating:!0,direction:-1,year:Rr(V)}},onSelectDate:O=>{const N=A.state(),V=O.currentTarget.dataset.range==="true",F=O.currentTarget.dataset.date||"",z=new Date(F);return{date:z,year:Rr(z),selectMode:N.selectMode===void 0?void 0:N.selectMode==="from"?"to":"from",range:V?{from:N.selectMode==="from"?z:N.range.from,to:N.selectMode==="to"?z:N.range.to}:N.range}},onChangeMonth:O=>{const N=O.target.value,F=Array.from(O.target.options).find(D=>D.value===N),z=A.state();if(F){const D=F.dataset.index||"",R=new Date(A.state().date);return R.setMonth(+D),{...z,date:R,year:Rr(R)}}return z},onKeyDown:O=>{const N=O.key,V=A.state();if(N in cd){(N==="ArrowUp"||N==="ArrowDown")&&O.preventDefault();const F=A.state().date,z=rt.keyof(cd,N)?cd[N](F,O.shiftKey?"month":"days"):null;if(z!==null)return xb(O.target,h,z),{...V,date:z,year:Rr(z)}}return A.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(A,O,N)=>{var F,z;return(N.method==="onChangeMonth"||N.method==="previousMonth"||N.method==="nextMonth")&&((z=(F=N.props).onChangeMonth)==null||z.call(F,A.date)),A},(A,O,N)=>{var F,z;return N.method==="onChangeYear"&&((z=(F=N.props).onChangeYear)==null||z.call(F,A.date)),A},(A,O,N)=>{const V=N.method==="onSelectDate"||N.method==="setToday"||N.method==="onKeyDown";return l&&V&&t?(c==null||c(A.range),A):(V&&t&&(c==null||c(A.date)),A)}]}),C=tM(w.date),P=hb(C,7),I=w.date.toISOString(),_=bb(w.date,g);E.useEffect(()=>{t||c==null||c(w.date)},[I,t]);const M=UO(A=>S.date(O=>vO(new Date(O),+A)),1200),L=A=>{const O=A.currentTarget.value;S.onChangeYear(O),s==null||s(new Date(O)),M(O)},$=QO((A,O)=>(A.preventDefault(),O==="right"?S.previousMonth():S.nextMonth()),10);return b.jsx(eE,{transition:eM,children:b.jsxs("div",{ref:h,"data-component":"calendar",onTouchEnd:$.onTouchEnd,onTouchStart:$.onTouchStart,className:Le("relative overflow-hidden",rt.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[b.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:b.jsx(Jn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:S.onExitComplete,children:b.jsxs(ft.div,{initial:"enter",animate:"middle",exit:"exit",children:[b.jsxs("header",{className:"relative flex justify-between",children:[b.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"prev",variants:yb,onClick:S.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:b.jsx(JA,{className:"h-4 w-4"})}),b.jsx(ft.span,{layout:!0,variants:vb,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:b.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[b.jsx("select",{value:_,onChange:S.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${_.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),b.jsx(Jy,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:L,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),b.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"next",variants:yb,onClick:S.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:b.jsx(zu,{className:"h-4 w-4"})}),b.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),b.jsxs(ft.table,{className:"mt-2 table min-w-full table-auto border-0",children:[b.jsx("thead",{children:b.jsx("tr",{children:w.week.map(A=>b.jsx("th",{role:"columnheader",className:Le("py-2 text-sm font-medium capitalize",rt.function(u==null?void 0:u.weekDay)?u.weekDay(A):u==null?void 0:u.weekDay),children:A.toLocaleDateString(g,{weekday:"short"})},A.toString()))})}),b.jsx(oM,{zip:P,range:y,styles:u,date:v||null,dispatch:S,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:S.onKeyDown})]})]},_)})}),b.jsx("footer",{className:"mt-2 text-center text-primary",children:b.jsx("button",{type:"button",onClick:()=>S.date(iM),className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},ud=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>b.jsxs(on,{...s,as:r,"data-componen":"card",className:Le("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?b.jsx("header",{className:Le("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,b.jsx("div",{className:Le("min-w-full px-4 lg:px-8",a),children:e})]});ud.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return b.jsxs(i,{...o,className:Le("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[b.jsx(a,{className:"font-semibold",children:o.title}),r?b.jsx(s,{className:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const Sb=e=>{const t=e.Icon??vy,n=Ot();return b.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[b.jsx(t,{size:64,className:"text-disabled"}),b.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Xt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Tb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Eb(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Tb(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Tb(e[o],null)}}}}function zr(...e){return k.useCallback(Eb(...e),e)}function Cb(e,t=[]){let n=[];function r(i,a){const s=k.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...m}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,h=k.useMemo(()=>m,Object.values(m));return b.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=k.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,aM(o,...t)]}function aM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Ro=k.forwardRef((e,t)=>{const{children:n,...r}=e,o=k.Children.toArray(n),i=o.find(lM);if(i){const a=i.props.children,s=o.map(l=>l===i?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return b.jsx(dd,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return b.jsx(dd,{...r,ref:t,children:n})});Ro.displayName="Slot";var dd=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const o=uM(n),i=cM(r,n.props);return n.type!==k.Fragment&&(i.ref=t?Eb(t,o):o),k.cloneElement(n,i)}return k.Children.count(n)>1?k.Children.only(null):null});dd.displayName="SlotClone";var sM=({children:e})=>b.jsx(b.Fragment,{children:e});function lM(e){return k.isValidElement(e)&&e.type===sM}function cM(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function uM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function dM(e){const t=e+"CollectionProvider",[n,r]=Cb(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:m,children:g}=f,h=E.useRef(null),v=E.useRef(new Map).current;return b.jsx(o,{scope:m,itemMap:v,collectionRef:h,children:g})};a.displayName=t;const s=e+"CollectionSlot",l=E.forwardRef((f,m)=>{const{scope:g,children:h}=f,v=i(s,g),y=zr(m,v.collectionRef);return b.jsx(Ro,{ref:y,children:h})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,m)=>{const{scope:g,children:h,...v}=f,y=E.useRef(null),x=zr(m,y),T=i(c,g);return E.useEffect(()=>(T.itemMap.set(y,{ref:y,...v}),()=>void T.itemMap.delete(y))),b.jsx(Ro,{[u]:"",ref:x,children:h})});d.displayName=c;function p(f){const m=i(e+"CollectionConsumer",f);return E.useCallback(()=>{const h=m.collectionRef.current;if(!h)return[];const v=Array.from(h.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((T,w)=>v.indexOf(T.ref.current)-v.indexOf(w.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,r]}var fM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],In=fM.reduce((e,t)=>{const n=k.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Ro:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function kb(e,t){e&&Oa.flushSync(()=>e.dispatchEvent(t))}function Wn(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function pM(e,t=globalThis==null?void 0:globalThis.document){const n=Wn(e);k.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var hM="DismissableLayer",fd="dismissableLayer.update",mM="dismissableLayer.pointerDownOutside",gM="dismissableLayer.focusOutside",Pb,Ab=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_b=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=k.useContext(Ab),[u,d]=k.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=k.useState({}),m=zr(t,C=>d(C)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(h),y=u?g.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,T=y>=v,w=yM(C=>{const P=C.target,I=[...c.branches].some(_=>_.contains(P));!T||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),S=bM(C=>{const P=C.target;[...c.branches].some(_=>_.contains(P))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return pM(C=>{y===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),k.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Pb=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Ob(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Pb)}},[u,p,n,c]),k.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Ob())},[u,c]),k.useEffect(()=>{const C=()=>f({});return document.addEventListener(fd,C),()=>document.removeEventListener(fd,C)},[]),b.jsx(In.div,{...l,ref:m,style:{pointerEvents:x?T?"auto":"none":void 0,...e.style},onFocusCapture:Xt(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Xt(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Xt(e.onPointerDownCapture,w.onPointerDownCapture)})});_b.displayName=hM;var vM="DismissableLayerBranch",Ib=k.forwardRef((e,t)=>{const n=k.useContext(Ab),r=k.useRef(null),o=zr(t,r);return k.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),b.jsx(In.div,{...e,ref:o})});Ib.displayName=vM;function yM(e,t=globalThis==null?void 0:globalThis.document){const n=Wn(e),r=k.useRef(!1),o=k.useRef(()=>{});return k.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){Mb(mM,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function bM(e,t=globalThis==null?void 0:globalThis.document){const n=Wn(e),r=k.useRef(!1);return k.useEffect(()=>{const o=i=>{i.target&&!r.current&&Mb(gM,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ob(){const e=new CustomEvent(fd);document.dispatchEvent(e)}function Mb(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?kb(o,i):o.dispatchEvent(i)}var xM=_b,wM=Ib,xs=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},SM="Portal",Db=k.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=k.useState(!1);xs(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?wi.createPortal(b.jsx(In.div,{...r,ref:t}),a):null});Db.displayName=SM;function TM(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var Nb=e=>{const{present:t,children:n}=e,r=EM(t),o=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),i=zr(r.ref,CM(o));return typeof n=="function"||r.isPresent?k.cloneElement(o,{ref:i}):null};Nb.displayName="Presence";function EM(e){const[t,n]=k.useState(),r=k.useRef({}),o=k.useRef(e),i=k.useRef("none"),a=e?"mounted":"unmounted",[s,l]=TM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const c=ws(r.current);i.current=s==="mounted"?c:"none"},[s]),xs(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=ws(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),xs(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=ws(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=f=>{f.target===t&&(i.current=ws(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:k.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function ws(e){return(e==null?void 0:e.animationName)||"none"}function CM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function kM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=PM({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Wn(n),l=k.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function PM({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=Wn(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var AM="VisuallyHidden",pd=k.forwardRef((e,t)=>b.jsx(In.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));pd.displayName=AM;var hd="ToastProvider",[md,_M,IM]=dM("Toast"),[Fb,WR]=Cb("Toast",[IM]),[OM,Ss]=Fb(hd),Lb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=k.useState(null),[c,u]=k.useState(0),d=k.useRef(!1),p=k.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${hd}\`. Expected non-empty \`string\`.`),b.jsx(md.Provider,{scope:t,children:b.jsx(OM,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:k.useCallback(()=>u(f=>f+1),[]),onToastRemove:k.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};Lb.displayName=hd;var Vb="ToastViewport",MM=["F8"],gd="toast.viewportPause",vd="toast.viewportResume",jb=k.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=MM,label:o="Notifications ({hotkey})",...i}=e,a=Ss(Vb,n),s=_M(n),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),p=zr(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=a.toastCount>0;k.useEffect(()=>{const h=v=>{var x;r.length!==0&&r.every(T=>v[T]||v.code===T)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),k.useEffect(()=>{const h=l.current,v=d.current;if(m&&h&&v){const y=()=>{if(!a.isClosePausedRef.current){const S=new CustomEvent(gd);v.dispatchEvent(S),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const S=new CustomEvent(vd);v.dispatchEvent(S),a.isClosePausedRef.current=!1}},T=S=>{!h.contains(S.relatedTarget)&&x()},w=()=>{h.contains(document.activeElement)||x()};return h.addEventListener("focusin",y),h.addEventListener("focusout",T),h.addEventListener("pointermove",y),h.addEventListener("pointerleave",w),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{h.removeEventListener("focusin",y),h.removeEventListener("focusout",T),h.removeEventListener("pointermove",y),h.removeEventListener("pointerleave",w),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[m,a.isClosePausedRef]);const g=k.useCallback(({tabbingDirection:h})=>{const y=s().map(x=>{const T=x.ref.current,w=[T,...UM(T)];return h==="forwards"?w:w.reverse()});return(h==="forwards"?y.reverse():y).flat()},[s]);return k.useEffect(()=>{const h=d.current;if(h){const v=y=>{var w,S,C;const x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){const P=document.activeElement,I=y.shiftKey;if(y.target===h&&I){(w=c.current)==null||w.focus();return}const L=g({tabbingDirection:I?"backwards":"forwards"}),$=L.findIndex(A=>A===P);xd(L.slice($+1))?y.preventDefault():I?(S=c.current)==null||S.focus():(C=u.current)==null||C.focus()}};return h.addEventListener("keydown",v),()=>h.removeEventListener("keydown",v)}},[s,g]),b.jsxs(wM,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&b.jsx(yd,{ref:c,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});xd(h)}}),b.jsx(md.Slot,{scope:n,children:b.jsx(In.ol,{tabIndex:-1,...i,ref:p})}),m&&b.jsx(yd,{ref:u,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});xd(h)}})]})});jb.displayName=Vb;var $b="ToastFocusProxy",yd=k.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Ss($b,n);return b.jsx(pd,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&r()}})});yd.displayName=$b;var Ts="Toast",DM="toast.swipeStart",NM="toast.swipeMove",FM="toast.swipeCancel",LM="toast.swipeEnd",Rb=k.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=kM({prop:r,defaultProp:o,onChange:i});return b.jsx(Nb,{present:n||s,children:b.jsx($M,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Wn(e.onPause),onResume:Wn(e.onResume),onSwipeStart:Xt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Xt(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Xt(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Xt(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Rb.displayName=Ts;var[VM,jM]=Fb(Ts,{onClose(){}}),$M=k.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...m}=e,g=Ss(Ts,n),[h,v]=k.useState(null),y=zr(t,A=>v(A)),x=k.useRef(null),T=k.useRef(null),w=o||g.duration,S=k.useRef(0),C=k.useRef(w),P=k.useRef(0),{onToastAdd:I,onToastRemove:_}=g,M=Wn(()=>{var O;(h==null?void 0:h.contains(document.activeElement))&&((O=g.viewport)==null||O.focus()),a()}),L=k.useCallback(A=>{!A||A===1/0||(window.clearTimeout(P.current),S.current=new Date().getTime(),P.current=window.setTimeout(M,A))},[M]);k.useEffect(()=>{const A=g.viewport;if(A){const O=()=>{L(C.current),c==null||c()},N=()=>{const V=new Date().getTime()-S.current;C.current=C.current-V,window.clearTimeout(P.current),l==null||l()};return A.addEventListener(gd,N),A.addEventListener(vd,O),()=>{A.removeEventListener(gd,N),A.removeEventListener(vd,O)}}},[g.viewport,w,l,c,L]),k.useEffect(()=>{i&&!g.isClosePausedRef.current&&L(w)},[i,w,g.isClosePausedRef,L]),k.useEffect(()=>(I(),()=>_()),[I,_]);const $=k.useMemo(()=>h?Ub(h):null,[h]);return g.viewport?b.jsxs(b.Fragment,{children:[$&&b.jsx(RM,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:$}),b.jsx(VM,{scope:n,onClose:M,children:Oa.createPortal(b.jsx(md.ItemSlot,{scope:n,children:b.jsx(xM,{asChild:!0,onEscapeKeyDown:Xt(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||M(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(In.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...m,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Xt(e.onKeyDown,A=>{A.key==="Escape"&&(s==null||s(A.nativeEvent),A.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:Xt(e.onPointerDown,A=>{A.button===0&&(x.current={x:A.clientX,y:A.clientY})}),onPointerMove:Xt(e.onPointerMove,A=>{if(!x.current)return;const O=A.clientX-x.current.x,N=A.clientY-x.current.y,V=!!T.current,F=["left","right"].includes(g.swipeDirection),z=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,D=F?z(0,O):0,R=F?0:z(0,N),J=A.pointerType==="touch"?10:2,te={x:D,y:R},ee={originalEvent:A,delta:te};V?(T.current=te,Es(NM,d,ee,{discrete:!1})):Yb(te,g.swipeDirection,J)?(T.current=te,Es(DM,u,ee,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(O)>J||Math.abs(N)>J)&&(x.current=null)}),onPointerUp:Xt(e.onPointerUp,A=>{const O=T.current,N=A.target;if(N.hasPointerCapture(A.pointerId)&&N.releasePointerCapture(A.pointerId),T.current=null,x.current=null,O){const V=A.currentTarget,F={originalEvent:A,delta:O};Yb(O,g.swipeDirection,g.swipeThreshold)?Es(LM,f,F,{discrete:!0}):Es(FM,p,F,{discrete:!0}),V.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),RM=e=>{const{__scopeToast:t,children:n,...r}=e,o=Ss(Ts,t),[i,a]=k.useState(!1),[s,l]=k.useState(!1);return WM(()=>a(!0)),k.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:b.jsx(Db,{asChild:!0,children:b.jsx(pd,{...r,children:i&&b.jsxs(b.Fragment,{children:[o.label," ",n]})})})},zM="ToastTitle",zb=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(In.div,{...r,ref:t})});zb.displayName=zM;var BM="ToastDescription",Bb=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(In.div,{...r,ref:t})});Bb.displayName=BM;var Hb="ToastAction",HM=k.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?b.jsx(qb,{altText:n,asChild:!0,children:b.jsx(bd,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Hb}\`. Expected non-empty \`string\`.`),null)});HM.displayName=Hb;var Wb="ToastClose",bd=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=jM(Wb,n);return b.jsx(qb,{asChild:!0,children:b.jsx(In.button,{type:"button",...r,ref:t,onClick:Xt(e.onClick,o.onClose)})})});bd.displayName=Wb;var qb=k.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return b.jsx(In.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Ub(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),qM(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Ub(r))}}),t}function Es(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?kb(o,i):o.dispatchEvent(i)}var Yb=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function WM(e=()=>{}){const t=Wn(e);xs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function qM(e){return e.nodeType===e.ELEMENT_NODE}function UM(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var YM=Lb,GM=jb,KM=Rb,ZM=zb,XM=Bb,QM=bd;const JM=e=>{const[t,n]=E.useState(!1),r=()=>n(!0),o=()=>n(!1);return E.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},eD=uo("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),Gb=E.createContext(()=>{throw new Error("Not implemented")}),tD=()=>E.useContext(Gb),Kb={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}},nD=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=eD({theme:t.theme||"default"});return b.jsx(KM,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:b.jsx(ft.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:Kb[t.reversedIndex]||Kb.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:b.jsxs("div",{className:a,children:[b.jsxs("div",{className:"flex flex-col p-4",children:[t.title?b.jsx(ZM,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,b.jsx(XM,{className:"select-text truncate",children:t.text})]}),r?b.jsx(QM,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:b.jsx(os,{className:"h-5 w-5"})}):null]})})})});function rD({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=JM(r),[i,a]=E.useState([]),s=E.useCallback(()=>a([]),[]);E.useEffect(()=>s,[s]);const l=E.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const m=[...f,{...u,id:d,text:c}];return m.length>t?m.slice(m.length-t,m.length+1):m}),{clear:s,close:()=>a(f=>f.filter(m=>m.id!==d))}},[t]);return b.jsxs(YM,{duration:n,swipeThreshold:150,children:[b.jsx(Gb.Provider,{value:l,children:e}),b.jsx(Jn,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(m=>m.id!==c.id));return E.createElement(nD,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),b.jsx(GM,{ref:r,"data-items":i.length,style:{justifyContent:"start",height:`${(o?i.length:Math.min(1,i.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const oD=e=>b.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow",children:[b.jsxs("header",{className:"flex items-start gap-4 p-6",children:[b.jsx("div",{className:Le("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:b.jsx("div",{children:b.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),b.jsxs("div",{className:"flex flex-col gap-1",children:[b.jsx("header",{children:b.jsx("h3",{className:"text-base leading-none",children:e.title})}),b.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?b.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),Zb=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},Xb=E.createContext(""),iD=e=>{const[t,n]=Zb(e.active),r=Io(0),o=Io(0),i=E.useRef(null);E.useEffect(()=>{const c=i.current;if(c===null)return;const u=m=>{if(!m)return;const g=m.getBoundingClientRect();o.set(g.width),r.set(m.offsetLeft)},d=()=>{const m=c.querySelector("li[data-active=true]");return void u(m)};window.addEventListener("resize",d);let p=c.querySelector("li[data-active=true]");const f=window.location.hash.replace(/^#/,"");if(e.active===""&&f!==""&&(p=c.querySelector(`li[data-id="${f}"]`),n(f)),p===null){p=c.querySelector("li[data-id]");const m=p.getAttribute("data-id")||"";n(m)}return u(p),()=>window.removeEventListener("resize",d)},[]);const a=vo(e.onChange);E.useEffect(()=>{a.current&&a.current(t)},[a,t]);const s=E.Children.toArray(e.children),l=c=>{const u=c.currentTarget,d=u.getBoundingClientRect();o.set(d.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return b.jsx(Xb.Provider,{value:t,children:b.jsx(ud,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:b.jsx("header",{ref:i,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:b.jsx("nav",{className:"min-w-0",children:b.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:s.map(c=>{const u=c.props;return b.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"w-full border-b-2 transition-all border-card-border data-[active=true]:border-primary data-[active=true]:text-primary",children:b.jsx(on,{onClick:l,"data-id":u.id,"aria-current":"page",as:e.useHash?"a":"button",href:e.useHash?`#${u.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:u.title})},`tab-header-${u.id}`)})})})}),children:e.children})})},aD=()=>E.useContext(Xb),sD=e=>{const t=aD();return b.jsx(E.Fragment,{children:e.id===t?e.children:null})},Cs=e=>b.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[b.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),b.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});Cs.Icon=function(t){return b.jsx("header",{...t,className:Le("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Cs.Body=function(t){return b.jsx(on,{...t,className:Le("min-w-0 flex-1",t.className),children:t.children})},Cs.Right=function(t){return b.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:b.jsx(on,{...t,type:"button"})})};const lD=e=>b.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function ks(){return typeof window<"u"}function or(e){return Qb(e)?(e.nodeName||"").toLowerCase():"#document"}function Ht(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qn(e){var t;return(t=(Qb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Qb(e){return ks()?e instanceof Node||e instanceof Ht(e).Node:!1}function Je(e){return ks()?e instanceof Element||e instanceof Ht(e).Element:!1}function Et(e){return ks()?e instanceof HTMLElement||e instanceof Ht(e).HTMLElement:!1}function wd(e){return!ks()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot}function Qi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function cD(e){return["table","td","th"].includes(or(e))}function Ps(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Sd(e){const t=Td(),n=Je(e)?Qt(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function uD(e){let t=Un(e);for(;Et(t)&&!ir(t);){if(Sd(t))return t;if(Ps(t))return null;t=Un(t)}return null}function Td(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ir(e){return["html","body","#document"].includes(or(e))}function Qt(e){return Ht(e).getComputedStyle(e)}function As(e){return Je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Un(e){if(or(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wd(e)&&e.host||qn(e);return wd(t)?t.host:t}function Jb(e){const t=Un(e);return ir(t)?e.ownerDocument?e.ownerDocument.body:e.body:Et(t)&&Qi(t)?t:Jb(t)}function ar(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Jb(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ht(o);if(i){const s=Ed(a);return t.concat(a,a.visualViewport||[],Qi(o)?o:[],s&&n?ar(s):[])}return t.concat(o,ar(o,[],n))}function Ed(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function yt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&wd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Cd(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function ex(){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 tx(e){return e.mozInputSource===0&&e.isTrusted?!0:Ad()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function kd(e){return dD()?!1:!Ad()&&e.width===0&&e.height===0||Ad()&&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 Pd(){return/apple/i.test(navigator.vendor)}function Ad(){const e=/android/i;return e.test(Cd())||e.test(ex())}function nx(){return Cd().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function dD(){return ex().includes("jsdom/")}function zo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function fD(e){return"nativeEvent"in e}function pD(e){return e.matches("html,body")}function Mt(e){return(e==null?void 0:e.ownerDocument)||document}function _d(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 hD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Id(e){return Et(e)&&e.matches(hD)}function Nt(e){e.preventDefault(),e.stopPropagation()}function rx(e){return e?e.getAttribute("role")==="combobox"&&Id(e):!1}const Mn=Math.min,Jt=Math.max,_s=Math.round,Bo=Math.floor,sr=e=>({x:e,y:e}),mD={left:"right",right:"left",bottom:"top",top:"bottom"},gD={start:"end",end:"start"};function Od(e,t,n){return Jt(e,Mn(t,n))}function Ho(e,t){return typeof e=="function"?e(t):e}function lr(e){return e.split("-")[0]}function Wo(e){return e.split("-")[1]}function ox(e){return e==="x"?"y":"x"}function Md(e){return e==="y"?"height":"width"}function Br(e){return["top","bottom"].includes(lr(e))?"y":"x"}function Dd(e){return ox(Br(e))}function vD(e,t,n){n===void 0&&(n=!1);const r=Wo(e),o=Dd(e),i=Md(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Is(a)),[a,Is(a)]}function yD(e){const t=Is(e);return[Nd(e),t,Nd(t)]}function Nd(e){return e.replace(/start|end/g,t=>gD[t])}function bD(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function xD(e,t,n,r){const o=Wo(e);let i=bD(lr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Nd)))),i}function Is(e){return e.replace(/left|right|bottom|top/g,t=>mD[t])}function wD(e){return{top:0,right:0,bottom:0,left:0,...e}}function ix(e){return typeof e!="number"?wD(e):{top:e,right:e,bottom:e,left:e}}function Os(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
|
|
169
|
+
*/var ib;function $O(){return ib||(ib=1,process.env.NODE_ENV!=="production"&&function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=E,n=rb(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;nd.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function v(S){if(!y){if(y=!0,x=S,S=p(S),f!==void 0&&g.hasValue){var C=g.value;if(f(C,S))return T=C}return T=S}if(C=T,r(x,S))return C;var P=p(S);return f!==void 0&&f(C,P)?(x=S,C):(x=S,T=P)}var y=!1,x,T,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var h=o(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),nd}var ab;function RO(){return ab||(ab=1,process.env.NODE_ENV==="production"?hs.exports=jO():hs.exports=$O()),hs.exports}RO();var Lo=function(){return Lo=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Lo.apply(this,arguments)};function Zi(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function sb(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Vo=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},zO=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},BO=function(e){return Object.entries(e)},lb=function(e){return e instanceof Promise},cb=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},Lo(Lo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},HO=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=performance.now(),c=t.apply(void 0,sb([],Zi(a),!1)),u=function(d,p){return n(function(f){return cb(d,f,i,p)})};return lb(c)?c.then(function(d){o.current={method:e,props:r(),time:performance.now()-l},u(d,o.current)}):(o.current={method:e,props:r(),time:performance.now()-l},void u(c,o.current))}},WO=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,sb([],Zi(a),!1)),c=function(u){return n(function(d){return cb(u,d,i,o.current)})};return lb(l)?l.then(function(u){return c(u)}):c(l)}},rd=function(e,t,n){var r,o,i,a=Zi(E.useState(function(){return e}),2),s=a[0],l=a[1],c=Vo(s),u=Vo((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=Vo(t),p=Vo((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=Vo((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),m=E.useRef(e),g=zO(s),h=Vo(g),v=E.useRef(null);E.useEffect(function(){if(v.current!==null){var T=v.current;p.current.forEach(function(w){w(s,g,T)})}},[s,p,g]);var y=Zi(E.useState(function(){var T=function(){return u.current},w=d.current({props:T,state:function(){return c.current},initialState:m.current,previousState:function(){return h.current}});return BO(w).reduce(function(S,C){var P,I=Zi(C,2),_=I[0],M=I[1];return Lo(Lo({},S),(P={},P[_]=n!=null&&n.debug?HO(_,M,l,T,v,f.current):WO(_,M,l,T,v,f.current),P))},{})}),1),x=y[0];return[s,x,u.current]};const qO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function UO(e,t){return E.useRef(qO(e,t)).current}const gs={hex:e=>e,raw:e=>e,hsl:e=>`hsl(${e})`,rgb:e=>`rgb(${e})`,z:(e,t,n)=>`var(--z-${n})`,hsla:e=>`hsla(${e})`,rgba:e=>`rgba(${e})`,cssVariable:(e,t,n)=>`var(--${n})`,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},jr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(a,l,s))}return o.concat(jr(a,t,n,s))},[]),ub=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(a,i,s)}}return{...o,[i]:ub(a,t,n,s)}},{}),db={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},vs=(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)},YO={default:e=>vs(e,{result:db.default}),dark:e=>vs(e,{result:db.dark})},Xi=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},GO=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),od=(e,t)=>{const n=jr(e.colors,Xi(t==null?void 0:t.colors)),r=jr(e.spacing,Xi(t==null?void 0:t.spacing)),o=jr(e.rounded,Xi(t==null?void 0:t.rounded)),i=jr(e.zIndex,Xi((t==null?void 0:t.zIndex)??GO)),a=e.custom?jr(e.custom,Xi(t==null?void 0:t.customTokens)):[];return n.concat(r,o,a,i)},KO=(e,t)=>vs(od(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),ZO=(e,t)=>od(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),XO=(e,t)=>vs(od(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ys={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>b.jsxs(E.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To",calendarToday:"Today",calendarBackMonth:"Back month",calendarNextMonth:"Next month",calendarMonthLabel:"Month",multiSelectSelectedLabel:"Selected",multiSelectInnerPlaceholder:"Search..."},bs={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0}},jo=E.createContext({tweaks:bs,parser:gs.hsla,map:ys,locale:void 0}),id=e=>{const t=E.useContext(jo);if(e)return e;if(t)return t.locale||e};function QO(e,t){const n=E.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const s=i.changedTouches[0].clientX-n.current;Math.abs(s)>t&&e(i,s>0?"right":"left"),n.current=null}}}const Ot=()=>{const e=E.useContext(jo);return e?e.map:ys},cn=(e,t=2)=>e.toString(16).padStart(t,"0"),$o=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${cn(t,4)+cn(n,3)}-${cn(r[0])+cn(r[1])}-${cn(r[2])+cn(r[3])}-${cn(r[4])+cn(r[5])}-${cn(r[6])+cn(r[7])+cn(r[8])+cn(r[9])}`},fb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),pb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},ad=(e,t)=>{const n=fb(t,pb.basic,e)||fb(t,pb.extend,e);return n===void 0||n===e?void 0:n},$r=()=>typeof window>"u",sd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),hb=(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},JO=e=>!e,ld=()=>{},mb=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},eM={type:"spring",bounce:.3,duration:.6},gb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),vb={enter:gb(1),exit:gb(-1),middle:{x:"0%",opacity:1}},yb={exit:{visibility:"hidden"}},tM=e=>{const t=Pn(Py(e));return ky({start:t,end:Mo(t,{days:41})})},bb=(e,t)=>e.toLocaleDateString(t,{month:"long"}),nM=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=Py(new Date(1970,o,1).setMonth(o)),a=bb(i,n);return b.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),cd={ArrowLeft:(e,t)=>t==="days"?Ui(e,{days:1}):Ui(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Mo(e,{days:1}):Mo(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ui(e,{weeks:1}):Ui(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Mo(e,{weeks:1}):Mo(e,{years:1})},xb=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var a;if(e!=null&&e.dataset.focustrap){const s=(a=t.current)==null?void 0:a.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>s==null?void 0:s.focus({preventScroll:!1}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},Rr=e=>e.getFullYear().toString().padStart(4,"0"),rM=(e,t,n)=>e===void 0||n===void 0?!1:gI(t,e)&&vI(t,n),oM=e=>{var n;const t=Ot();return b.jsx(ft.tbody,{layout:!0,variants:vb,custom:e.direction,onKeyDown:e.onKeyDown,className:Le((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=tt.function((a=e.styles)==null?void 0:a.week)?(s=e.styles)==null?void 0:s.week(r):(l=e.styles)==null?void 0:l.week;return b.jsx("tr",{className:i,children:r.map(c=>{var v,y,x,T,w,S,C,P,I,_,M,L,$,A,O,N,V,F;const u=c.toISOString(),d=e.rangeMode?u===((y=(v=e.range)==null?void 0:v.to)==null?void 0:y.toISOString())||u===((T=(x=e.range)==null?void 0:x.from)==null?void 0:T.toISOString()):u===((w=e.date)==null?void 0:w.toISOString()),p=mO(c)&&e.markToday,f=((S=e.disabledDate)==null?void 0:S.call(e,c))||!1,m=hO(c,e.stateDate),g=!m||f,h=e.rangeMode?rM((C=e.range)==null?void 0:C.from,c,(P=e.range)==null?void 0:P.to):!1;return b.jsxs("td",{align:"center",className:Le("relative",tt.function((I=e.styles)==null?void 0:I.dayFrame)?(_=e.styles)==null?void 0:_.dayFrame(c):(M=e.styles)==null?void 0:M.dayFrame),children:[b.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":m,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Le(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${p?"text-emphasis":""} ${g?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,h&&e.markRange?"size-10 border border-dashed border-card-border":"",tt.function((L=e.styles)==null?void 0:L.day)?($=e.styles)==null?void 0:$.day(c):(A=e.styles)==null?void 0:A.day),children:[c.getDate(),d&&((O=e.stateRange.from)==null?void 0:O.toISOString())===u?b.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:b.jsx("span",{className:"text-xs text-foreground",children:((N=e.labelRange)==null?void 0:N.from)??t.calendarFromDate})}):null,d&&((V=e.stateRange.to)==null?void 0:V.toISOString())===u?b.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:b.jsx("span",{className:"text-xs text-foreground",children:((F=e.labelRange)==null?void 0:F.to)??t.calendarToDate})}):null]}),e.RenderOnDay?b.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},iM=()=>No(new Date),wb=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,...p})=>{const f=E.useRef($o()),m=Ot(),g=id(o),h=E.useRef(null),{date:v,range:y}=p,x=v||new Date,T=E.useRef(null),[w,S]=rd({date:x,isAnimating:!1,year:Rr(x),direction:void 0,range:{from:y==null?void 0:y.from,to:y==null?void 0:y.to},months:nM(f.current,x,g),selectMode:l?"from":void 0,week:ky({start:Pn(x),end:T_(x)})},A=>({onChangeYear:O=>({year:O}),onExitComplete:()=>(xb(T.current||null,h,A.state().date,200),T.current=null,{isAnimating:!1}),date:O=>{const N=O(A.state().date);return{date:N,year:Rr(N)}},nextMonth:O=>{O&&(T.current=O.currentTarget);const N=A.state();if(N.isAnimating)return N;const V=Mo(N.date,{months:1});return{date:V,isAnimating:!0,direction:1,year:Rr(V)}},previousMonth:O=>{O&&(T.current=O.currentTarget);const N=A.state();if(N.isAnimating)return N;const V=Ui(N.date,{months:1});return{date:V,isAnimating:!0,direction:-1,year:Rr(V)}},onSelectDate:O=>{const N=A.state(),V=O.currentTarget.dataset.range==="true",F=O.currentTarget.dataset.date||"",z=new Date(F);return{date:z,year:Rr(z),selectMode:N.selectMode===void 0?void 0:N.selectMode==="from"?"to":"from",range:V?{from:N.selectMode==="from"?z:N.range.from,to:N.selectMode==="to"?z:N.range.to}:N.range}},onChangeMonth:O=>{const N=O.target.value,F=Array.from(O.target.options).find(D=>D.value===N),z=A.state();if(F){const D=F.dataset.index||"",R=new Date(A.state().date);return R.setMonth(+D),{...z,date:R,year:Rr(R)}}return z},onKeyDown:O=>{const N=O.key,V=A.state();if(N in cd){(N==="ArrowUp"||N==="ArrowDown")&&O.preventDefault();const F=A.state().date,z=tt.keyof(cd,N)?cd[N](F,O.shiftKey?"month":"days"):null;if(z!==null)return xb(O.target,h,z),{...V,date:z,year:Rr(z)}}return A.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(A,O,N)=>{var F,z;return(N.method==="onChangeMonth"||N.method==="previousMonth"||N.method==="nextMonth")&&((z=(F=N.props).onChangeMonth)==null||z.call(F,A.date)),A},(A,O,N)=>{var F,z;return N.method==="onChangeYear"&&((z=(F=N.props).onChangeYear)==null||z.call(F,A.date)),A},(A,O,N)=>{const V=N.method==="onSelectDate"||N.method==="setToday"||N.method==="onKeyDown";return l&&V&&t?(c==null||c(A.range),A):(V&&t&&(c==null||c(A.date)),A)}]}),C=tM(w.date),P=hb(C,7),I=w.date.toISOString(),_=bb(w.date,g);E.useEffect(()=>{t||c==null||c(w.date)},[I,t]);const M=UO(A=>S.date(O=>vO(new Date(O),+A)),1200),L=A=>{const O=A.currentTarget.value;S.onChangeYear(O),s==null||s(new Date(O)),M(O)},$=QO((A,O)=>(A.preventDefault(),O==="right"?S.previousMonth():S.nextMonth()),10);return b.jsx(eE,{transition:eM,children:b.jsxs("div",{ref:h,"data-component":"calendar",onTouchEnd:$.onTouchEnd,onTouchStart:$.onTouchStart,className:Le("relative overflow-hidden",tt.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[b.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:b.jsx(Jn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:S.onExitComplete,children:b.jsxs(ft.div,{initial:"enter",animate:"middle",exit:"exit",children:[b.jsxs("header",{className:"relative flex justify-between",children:[b.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"prev",variants:yb,onClick:S.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:b.jsx(JA,{className:"h-4 w-4"})}),b.jsx(ft.span,{layout:!0,variants:vb,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:b.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[b.jsx("select",{value:_,onChange:S.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${_.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),b.jsx(Jy,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:L,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),b.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"next",variants:yb,onClick:S.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:b.jsx(zu,{className:"h-4 w-4"})}),b.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),b.jsxs(ft.table,{className:"mt-2 table min-w-full table-auto border-0",children:[b.jsx("thead",{children:b.jsx("tr",{children:w.week.map(A=>b.jsx("th",{role:"columnheader",className:Le("py-2 text-sm font-medium capitalize",tt.function(u==null?void 0:u.weekDay)?u.weekDay(A):u==null?void 0:u.weekDay),children:A.toLocaleDateString(g,{weekday:"short"})},A.toString()))})}),b.jsx(oM,{zip:P,range:y,styles:u,date:v||null,dispatch:S,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:S.onKeyDown})]})]},_)})}),b.jsx("footer",{className:"mt-2 text-center text-primary",children:b.jsx("button",{type:"button",onClick:()=>S.date(iM),className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},ud=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>b.jsxs(on,{...s,as:r,"data-component":"card",className:Le("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?b.jsx("header",{"data-component":"card-title",className:Le("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,b.jsx("div",{"data-component":"card-body",className:Le("min-w-full px-4 lg:px-8",a),children:e})]});ud.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return b.jsxs(i,{...o,title:tt.string(o.title)?o.title:void 0,className:Le("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[b.jsx(a,{className:"font-semibold",children:o.title}),r?b.jsx(s,{className:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const Sb=e=>{const t=e.Icon??vy,n=Ot();return b.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[b.jsx(t,{size:64,className:"text-disabled"}),b.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Xt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Tb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Eb(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Tb(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Tb(e[o],null)}}}}function zr(...e){return k.useCallback(Eb(...e),e)}function Cb(e,t=[]){let n=[];function r(i,a){const s=k.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...m}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,h=k.useMemo(()=>m,Object.values(m));return b.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=k.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,aM(o,...t)]}function aM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Ro=k.forwardRef((e,t)=>{const{children:n,...r}=e,o=k.Children.toArray(n),i=o.find(lM);if(i){const a=i.props.children,s=o.map(l=>l===i?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return b.jsx(dd,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return b.jsx(dd,{...r,ref:t,children:n})});Ro.displayName="Slot";var dd=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const o=uM(n),i=cM(r,n.props);return n.type!==k.Fragment&&(i.ref=t?Eb(t,o):o),k.cloneElement(n,i)}return k.Children.count(n)>1?k.Children.only(null):null});dd.displayName="SlotClone";var sM=({children:e})=>b.jsx(b.Fragment,{children:e});function lM(e){return k.isValidElement(e)&&e.type===sM}function cM(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function uM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function dM(e){const t=e+"CollectionProvider",[n,r]=Cb(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:m,children:g}=f,h=E.useRef(null),v=E.useRef(new Map).current;return b.jsx(o,{scope:m,itemMap:v,collectionRef:h,children:g})};a.displayName=t;const s=e+"CollectionSlot",l=E.forwardRef((f,m)=>{const{scope:g,children:h}=f,v=i(s,g),y=zr(m,v.collectionRef);return b.jsx(Ro,{ref:y,children:h})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,m)=>{const{scope:g,children:h,...v}=f,y=E.useRef(null),x=zr(m,y),T=i(c,g);return E.useEffect(()=>(T.itemMap.set(y,{ref:y,...v}),()=>void T.itemMap.delete(y))),b.jsx(Ro,{[u]:"",ref:x,children:h})});d.displayName=c;function p(f){const m=i(e+"CollectionConsumer",f);return E.useCallback(()=>{const h=m.collectionRef.current;if(!h)return[];const v=Array.from(h.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((T,w)=>v.indexOf(T.ref.current)-v.indexOf(w.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,r]}var fM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],In=fM.reduce((e,t)=>{const n=k.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Ro:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function kb(e,t){e&&Oa.flushSync(()=>e.dispatchEvent(t))}function Wn(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function pM(e,t=globalThis==null?void 0:globalThis.document){const n=Wn(e);k.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var hM="DismissableLayer",fd="dismissableLayer.update",mM="dismissableLayer.pointerDownOutside",gM="dismissableLayer.focusOutside",Pb,Ab=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_b=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=k.useContext(Ab),[u,d]=k.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=k.useState({}),m=zr(t,C=>d(C)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(h),y=u?g.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,T=y>=v,w=yM(C=>{const P=C.target,I=[...c.branches].some(_=>_.contains(P));!T||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),S=bM(C=>{const P=C.target;[...c.branches].some(_=>_.contains(P))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return pM(C=>{y===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),k.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Pb=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Ob(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Pb)}},[u,p,n,c]),k.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Ob())},[u,c]),k.useEffect(()=>{const C=()=>f({});return document.addEventListener(fd,C),()=>document.removeEventListener(fd,C)},[]),b.jsx(In.div,{...l,ref:m,style:{pointerEvents:x?T?"auto":"none":void 0,...e.style},onFocusCapture:Xt(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Xt(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Xt(e.onPointerDownCapture,w.onPointerDownCapture)})});_b.displayName=hM;var vM="DismissableLayerBranch",Ib=k.forwardRef((e,t)=>{const n=k.useContext(Ab),r=k.useRef(null),o=zr(t,r);return k.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),b.jsx(In.div,{...e,ref:o})});Ib.displayName=vM;function yM(e,t=globalThis==null?void 0:globalThis.document){const n=Wn(e),r=k.useRef(!1),o=k.useRef(()=>{});return k.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){Mb(mM,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function bM(e,t=globalThis==null?void 0:globalThis.document){const n=Wn(e),r=k.useRef(!1);return k.useEffect(()=>{const o=i=>{i.target&&!r.current&&Mb(gM,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ob(){const e=new CustomEvent(fd);document.dispatchEvent(e)}function Mb(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?kb(o,i):o.dispatchEvent(i)}var xM=_b,wM=Ib,xs=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},SM="Portal",Db=k.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=k.useState(!1);xs(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?wi.createPortal(b.jsx(In.div,{...r,ref:t}),a):null});Db.displayName=SM;function TM(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var Nb=e=>{const{present:t,children:n}=e,r=EM(t),o=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),i=zr(r.ref,CM(o));return typeof n=="function"||r.isPresent?k.cloneElement(o,{ref:i}):null};Nb.displayName="Presence";function EM(e){const[t,n]=k.useState(),r=k.useRef({}),o=k.useRef(e),i=k.useRef("none"),a=e?"mounted":"unmounted",[s,l]=TM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const c=ws(r.current);i.current=s==="mounted"?c:"none"},[s]),xs(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=ws(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),xs(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=ws(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=f=>{f.target===t&&(i.current=ws(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:k.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function ws(e){return(e==null?void 0:e.animationName)||"none"}function CM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function kM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=PM({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Wn(n),l=k.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function PM({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=Wn(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var AM="VisuallyHidden",pd=k.forwardRef((e,t)=>b.jsx(In.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));pd.displayName=AM;var hd="ToastProvider",[md,_M,IM]=dM("Toast"),[Fb,qR]=Cb("Toast",[IM]),[OM,Ss]=Fb(hd),Lb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=k.useState(null),[c,u]=k.useState(0),d=k.useRef(!1),p=k.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${hd}\`. Expected non-empty \`string\`.`),b.jsx(md.Provider,{scope:t,children:b.jsx(OM,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:k.useCallback(()=>u(f=>f+1),[]),onToastRemove:k.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};Lb.displayName=hd;var Vb="ToastViewport",MM=["F8"],gd="toast.viewportPause",vd="toast.viewportResume",jb=k.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=MM,label:o="Notifications ({hotkey})",...i}=e,a=Ss(Vb,n),s=_M(n),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),p=zr(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=a.toastCount>0;k.useEffect(()=>{const h=v=>{var x;r.length!==0&&r.every(T=>v[T]||v.code===T)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),k.useEffect(()=>{const h=l.current,v=d.current;if(m&&h&&v){const y=()=>{if(!a.isClosePausedRef.current){const S=new CustomEvent(gd);v.dispatchEvent(S),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const S=new CustomEvent(vd);v.dispatchEvent(S),a.isClosePausedRef.current=!1}},T=S=>{!h.contains(S.relatedTarget)&&x()},w=()=>{h.contains(document.activeElement)||x()};return h.addEventListener("focusin",y),h.addEventListener("focusout",T),h.addEventListener("pointermove",y),h.addEventListener("pointerleave",w),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{h.removeEventListener("focusin",y),h.removeEventListener("focusout",T),h.removeEventListener("pointermove",y),h.removeEventListener("pointerleave",w),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[m,a.isClosePausedRef]);const g=k.useCallback(({tabbingDirection:h})=>{const y=s().map(x=>{const T=x.ref.current,w=[T,...UM(T)];return h==="forwards"?w:w.reverse()});return(h==="forwards"?y.reverse():y).flat()},[s]);return k.useEffect(()=>{const h=d.current;if(h){const v=y=>{var w,S,C;const x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){const P=document.activeElement,I=y.shiftKey;if(y.target===h&&I){(w=c.current)==null||w.focus();return}const L=g({tabbingDirection:I?"backwards":"forwards"}),$=L.findIndex(A=>A===P);xd(L.slice($+1))?y.preventDefault():I?(S=c.current)==null||S.focus():(C=u.current)==null||C.focus()}};return h.addEventListener("keydown",v),()=>h.removeEventListener("keydown",v)}},[s,g]),b.jsxs(wM,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&b.jsx(yd,{ref:c,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});xd(h)}}),b.jsx(md.Slot,{scope:n,children:b.jsx(In.ol,{tabIndex:-1,...i,ref:p})}),m&&b.jsx(yd,{ref:u,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});xd(h)}})]})});jb.displayName=Vb;var $b="ToastFocusProxy",yd=k.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Ss($b,n);return b.jsx(pd,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&r()}})});yd.displayName=$b;var Ts="Toast",DM="toast.swipeStart",NM="toast.swipeMove",FM="toast.swipeCancel",LM="toast.swipeEnd",Rb=k.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=kM({prop:r,defaultProp:o,onChange:i});return b.jsx(Nb,{present:n||s,children:b.jsx($M,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Wn(e.onPause),onResume:Wn(e.onResume),onSwipeStart:Xt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Xt(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Xt(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Xt(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Rb.displayName=Ts;var[VM,jM]=Fb(Ts,{onClose(){}}),$M=k.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...m}=e,g=Ss(Ts,n),[h,v]=k.useState(null),y=zr(t,A=>v(A)),x=k.useRef(null),T=k.useRef(null),w=o||g.duration,S=k.useRef(0),C=k.useRef(w),P=k.useRef(0),{onToastAdd:I,onToastRemove:_}=g,M=Wn(()=>{var O;(h==null?void 0:h.contains(document.activeElement))&&((O=g.viewport)==null||O.focus()),a()}),L=k.useCallback(A=>{!A||A===1/0||(window.clearTimeout(P.current),S.current=new Date().getTime(),P.current=window.setTimeout(M,A))},[M]);k.useEffect(()=>{const A=g.viewport;if(A){const O=()=>{L(C.current),c==null||c()},N=()=>{const V=new Date().getTime()-S.current;C.current=C.current-V,window.clearTimeout(P.current),l==null||l()};return A.addEventListener(gd,N),A.addEventListener(vd,O),()=>{A.removeEventListener(gd,N),A.removeEventListener(vd,O)}}},[g.viewport,w,l,c,L]),k.useEffect(()=>{i&&!g.isClosePausedRef.current&&L(w)},[i,w,g.isClosePausedRef,L]),k.useEffect(()=>(I(),()=>_()),[I,_]);const $=k.useMemo(()=>h?Ub(h):null,[h]);return g.viewport?b.jsxs(b.Fragment,{children:[$&&b.jsx(RM,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:$}),b.jsx(VM,{scope:n,onClose:M,children:Oa.createPortal(b.jsx(md.ItemSlot,{scope:n,children:b.jsx(xM,{asChild:!0,onEscapeKeyDown:Xt(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||M(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(In.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...m,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Xt(e.onKeyDown,A=>{A.key==="Escape"&&(s==null||s(A.nativeEvent),A.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:Xt(e.onPointerDown,A=>{A.button===0&&(x.current={x:A.clientX,y:A.clientY})}),onPointerMove:Xt(e.onPointerMove,A=>{if(!x.current)return;const O=A.clientX-x.current.x,N=A.clientY-x.current.y,V=!!T.current,F=["left","right"].includes(g.swipeDirection),z=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,D=F?z(0,O):0,R=F?0:z(0,N),J=A.pointerType==="touch"?10:2,te={x:D,y:R},ee={originalEvent:A,delta:te};V?(T.current=te,Es(NM,d,ee,{discrete:!1})):Yb(te,g.swipeDirection,J)?(T.current=te,Es(DM,u,ee,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(O)>J||Math.abs(N)>J)&&(x.current=null)}),onPointerUp:Xt(e.onPointerUp,A=>{const O=T.current,N=A.target;if(N.hasPointerCapture(A.pointerId)&&N.releasePointerCapture(A.pointerId),T.current=null,x.current=null,O){const V=A.currentTarget,F={originalEvent:A,delta:O};Yb(O,g.swipeDirection,g.swipeThreshold)?Es(LM,f,F,{discrete:!0}):Es(FM,p,F,{discrete:!0}),V.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),RM=e=>{const{__scopeToast:t,children:n,...r}=e,o=Ss(Ts,t),[i,a]=k.useState(!1),[s,l]=k.useState(!1);return WM(()=>a(!0)),k.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:b.jsx(Db,{asChild:!0,children:b.jsx(pd,{...r,children:i&&b.jsxs(b.Fragment,{children:[o.label," ",n]})})})},zM="ToastTitle",zb=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(In.div,{...r,ref:t})});zb.displayName=zM;var BM="ToastDescription",Bb=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(In.div,{...r,ref:t})});Bb.displayName=BM;var Hb="ToastAction",HM=k.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?b.jsx(qb,{altText:n,asChild:!0,children:b.jsx(bd,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Hb}\`. Expected non-empty \`string\`.`),null)});HM.displayName=Hb;var Wb="ToastClose",bd=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=jM(Wb,n);return b.jsx(qb,{asChild:!0,children:b.jsx(In.button,{type:"button",...r,ref:t,onClick:Xt(e.onClick,o.onClose)})})});bd.displayName=Wb;var qb=k.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return b.jsx(In.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Ub(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),qM(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Ub(r))}}),t}function Es(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?kb(o,i):o.dispatchEvent(i)}var Yb=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function WM(e=()=>{}){const t=Wn(e);xs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function qM(e){return e.nodeType===e.ELEMENT_NODE}function UM(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var YM=Lb,GM=jb,KM=Rb,ZM=zb,XM=Bb,QM=bd;const JM=e=>{const[t,n]=E.useState(!1),r=()=>n(!0),o=()=>n(!1);return E.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},eD=uo("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),Gb=E.createContext(()=>{throw new Error("Not implemented")}),tD=()=>E.useContext(Gb),Kb={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}},nD=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=eD({theme:t.theme||"default"});return b.jsx(KM,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:b.jsx(ft.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:Kb[t.reversedIndex]||Kb.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:b.jsxs("div",{className:a,children:[b.jsxs("div",{className:"flex flex-col p-4",children:[t.title?b.jsx(ZM,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,b.jsx(XM,{className:"select-text truncate",children:t.text})]}),r?b.jsx(QM,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:b.jsx(os,{className:"h-5 w-5"})}):null]})})})});function rD({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=JM(r),[i,a]=E.useState([]),s=E.useCallback(()=>a([]),[]);E.useEffect(()=>s,[s]);const l=E.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const m=[...f,{...u,id:d,text:c}];return m.length>t?m.slice(m.length-t,m.length+1):m}),{clear:s,close:()=>a(f=>f.filter(m=>m.id!==d))}},[t]);return b.jsxs(YM,{duration:n,swipeThreshold:150,children:[b.jsx(Gb.Provider,{value:l,children:e}),b.jsx(Jn,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(m=>m.id!==c.id));return E.createElement(nD,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),b.jsx(GM,{ref:r,"data-items":i.length,style:{justifyContent:"start",height:`${(o?i.length:Math.min(1,i.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const oD=e=>b.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow",children:[b.jsxs("header",{className:"flex items-start gap-4 p-6",children:[b.jsx("div",{className:Le("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:b.jsx("div",{children:b.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),b.jsxs("div",{className:"flex flex-col gap-1",children:[b.jsx("header",{children:b.jsx("h3",{className:"text-base leading-none",children:e.title})}),b.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?b.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),Zb=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},Xb=E.createContext(""),iD=e=>{const[t,n]=Zb(e.active),r=Io(0),o=Io(0),i=E.useRef(null);E.useEffect(()=>{const c=i.current;if(c===null)return;const u=m=>{if(!m)return;const g=m.getBoundingClientRect();o.set(g.width),r.set(m.offsetLeft)},d=()=>{const m=c.querySelector("li[data-active=true]");return void u(m)};window.addEventListener("resize",d);let p=c.querySelector("li[data-active=true]");const f=window.location.hash.replace(/^#/,"");if(e.active===""&&f!==""&&(p=c.querySelector(`li[data-id="${f}"]`),n(f)),p===null){p=c.querySelector("li[data-id]");const m=p.getAttribute("data-id")||"";n(m)}return u(p),()=>window.removeEventListener("resize",d)},[]);const a=vo(e.onChange);E.useEffect(()=>{a.current&&a.current(t)},[a,t]);const s=E.Children.toArray(e.children),l=c=>{const u=c.currentTarget,d=u.getBoundingClientRect();o.set(d.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return b.jsx(Xb.Provider,{value:t,children:b.jsx(ud,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:b.jsx("header",{ref:i,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:b.jsx("nav",{className:"min-w-0",children:b.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:s.map(c=>{const u=c.props;return b.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"w-full border-b-2 transition-all border-card-border data-[active=true]:border-primary data-[active=true]:text-primary",children:b.jsx(on,{onClick:l,"data-id":u.id,"aria-current":"page",as:e.useHash?"a":"button",href:e.useHash?`#${u.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:u.title})},`tab-header-${u.id}`)})})})}),children:e.children})})},aD=()=>E.useContext(Xb),sD=e=>{const t=aD();return b.jsx(E.Fragment,{children:e.id===t?e.children:null})},Cs=e=>b.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[b.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),b.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});Cs.Icon=function(t){return b.jsx("header",{...t,className:Le("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Cs.Body=function(t){return b.jsx(on,{...t,className:Le("min-w-0 flex-1",t.className),children:t.children})},Cs.Right=function(t){return b.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:b.jsx(on,{...t,type:"button"})})};const lD=e=>b.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function ks(){return typeof window<"u"}function or(e){return Qb(e)?(e.nodeName||"").toLowerCase():"#document"}function Ht(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qn(e){var t;return(t=(Qb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Qb(e){return ks()?e instanceof Node||e instanceof Ht(e).Node:!1}function Je(e){return ks()?e instanceof Element||e instanceof Ht(e).Element:!1}function Et(e){return ks()?e instanceof HTMLElement||e instanceof Ht(e).HTMLElement:!1}function wd(e){return!ks()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot}function Qi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function cD(e){return["table","td","th"].includes(or(e))}function Ps(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Sd(e){const t=Td(),n=Je(e)?Qt(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function uD(e){let t=Un(e);for(;Et(t)&&!ir(t);){if(Sd(t))return t;if(Ps(t))return null;t=Un(t)}return null}function Td(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ir(e){return["html","body","#document"].includes(or(e))}function Qt(e){return Ht(e).getComputedStyle(e)}function As(e){return Je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Un(e){if(or(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wd(e)&&e.host||qn(e);return wd(t)?t.host:t}function Jb(e){const t=Un(e);return ir(t)?e.ownerDocument?e.ownerDocument.body:e.body:Et(t)&&Qi(t)?t:Jb(t)}function ar(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Jb(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ht(o);if(i){const s=Ed(a);return t.concat(a,a.visualViewport||[],Qi(o)?o:[],s&&n?ar(s):[])}return t.concat(o,ar(o,[],n))}function Ed(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function yt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&wd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Cd(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function ex(){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 tx(e){return e.mozInputSource===0&&e.isTrusted?!0:Ad()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function kd(e){return dD()?!1:!Ad()&&e.width===0&&e.height===0||Ad()&&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 Pd(){return/apple/i.test(navigator.vendor)}function Ad(){const e=/android/i;return e.test(Cd())||e.test(ex())}function nx(){return Cd().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function dD(){return ex().includes("jsdom/")}function zo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function fD(e){return"nativeEvent"in e}function pD(e){return e.matches("html,body")}function Mt(e){return(e==null?void 0:e.ownerDocument)||document}function _d(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 hD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Id(e){return Et(e)&&e.matches(hD)}function Nt(e){e.preventDefault(),e.stopPropagation()}function rx(e){return e?e.getAttribute("role")==="combobox"&&Id(e):!1}const Mn=Math.min,Jt=Math.max,_s=Math.round,Bo=Math.floor,sr=e=>({x:e,y:e}),mD={left:"right",right:"left",bottom:"top",top:"bottom"},gD={start:"end",end:"start"};function Od(e,t,n){return Jt(e,Mn(t,n))}function Ho(e,t){return typeof e=="function"?e(t):e}function lr(e){return e.split("-")[0]}function Wo(e){return e.split("-")[1]}function ox(e){return e==="x"?"y":"x"}function Md(e){return e==="y"?"height":"width"}function Br(e){return["top","bottom"].includes(lr(e))?"y":"x"}function Dd(e){return ox(Br(e))}function vD(e,t,n){n===void 0&&(n=!1);const r=Wo(e),o=Dd(e),i=Md(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Is(a)),[a,Is(a)]}function yD(e){const t=Is(e);return[Nd(e),t,Nd(t)]}function Nd(e){return e.replace(/start|end/g,t=>gD[t])}function bD(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function xD(e,t,n,r){const o=Wo(e);let i=bD(lr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Nd)))),i}function Is(e){return e.replace(/left|right|bottom|top/g,t=>mD[t])}function wD(e){return{top:0,right:0,bottom:0,left:0,...e}}function ix(e){return typeof e!="number"?wD(e):{top:e,right:e,bottom:e,left:e}}function Os(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
|
|
170
170
|
* tabbable 6.2.0
|
|
171
171
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
172
|
-
*/var SD=["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])"],Ms=SD.join(","),ax=typeof Element>"u",qo=ax?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ds=!ax&&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},Ns=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},TD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},ED=function(t,n,r){if(Ns(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ms));return n&&qo.call(t,Ms)&&o.unshift(t),o=o.filter(r),o},CD=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ns(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=qo.call(a,Ms);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Ns(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},sx=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},lx=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||TD(t))&&!sx(t)?0:t.tabIndex},kD=function(t,n){var r=lx(t);return r<0&&n&&!sx(t)?0:r},PD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},cx=function(t){return t.tagName==="INPUT"},AD=function(t){return cx(t)&&t.type==="hidden"},_D=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},ID=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},OD=function(t){if(!t.name)return!0;var n=t.form||Ds(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=ID(o,t.form);return!i||i===t},MD=function(t){return cx(t)&&t.type==="radio"},DD=function(t){return MD(t)&&!OD(t)},ND=function(t){var n,r=t&&Ds(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Ds(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},ux=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},FD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=qo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(qo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=Ds(t);if(l&&!l.shadowRoot&&o(l)===!0)return ux(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(ND(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ux(t);return!1},LD=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 qo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},VD=function(t,n){return!(n.disabled||Ns(n)||AD(n)||FD(n,t)||_D(n)||LD(n))},Fd=function(t,n){return!(DD(n)||lx(n)<0||!VD(t,n))},jD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},$D=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=kD(s,a),c=a?e(o.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:c})}),r.sort(PD).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ji=function(t,n){n=n||{};var r;return n.getShadowRoot?r=CD([t],n.includeContainer,{filter:Fd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:jD}):r=ED(t,n.includeContainer,Fd.bind(null,n)),$D(r)},RD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return qo.call(t,Ms)===!1?!1:Fd(n,t)};function dx(e,t,n){let{reference:r,floating:o}=e;const i=Br(t),a=Dd(t),s=Md(a),l=lr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Wo(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const zD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=dx(c,r,l),p=r,f={},m=0;for(let g=0;g<s.length;g++){const{name:h,fn:v}=s[g],{x:y,y:x,data:T,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=y??u,d=x??d,f={...f,[h]:{...f[h],...T}},w&&m<=50&&(m++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=dx(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function Ld(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=Ho(t,e),m=ix(f),h=s[p?d==="floating"?"reference":"floating":d],v=Os(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},w=Os(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:x,strategy:l}):y);return{top:(v.top-w.top+m.top)/T.y,bottom:(w.bottom-v.bottom+m.bottom)/T.y,left:(v.left-w.left+m.left)/T.x,right:(w.right-v.right+m.right)/T.x}}const BD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Ho(e,t)||{};if(c==null)return{};const d=ix(u),p={x:n,y:r},f=Dd(o),m=Md(f),g=await a.getDimensions(c),h=f==="y",v=h?"top":"left",y=h?"bottom":"right",x=h?"clientHeight":"clientWidth",T=i.reference[m]+i.reference[f]-p[f]-i.floating[m],w=p[f]-i.reference[f],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=S?S[x]:0;(!C||!await(a.isElement==null?void 0:a.isElement(S)))&&(C=s.floating[x]||i.floating[m]);const P=T/2-w/2,I=C/2-g[m]/2-1,_=Mn(d[v],I),M=Mn(d[y],I),L=_,$=C-g[m]-M,A=C/2-g[m]/2+P,O=Od(L,A,$),N=!l.arrow&&Wo(o)!=null&&A!==O&&i.reference[m]/2-(A<L?_:M)-g[m]/2<0,V=N?A<L?A-L:A-$:0;return{[f]:p[f]+V,data:{[f]:O,centerOffset:A-O-V,...N&&{alignmentOffset:V}},reset:N}}}),HD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...h}=Ho(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=lr(o),y=Br(s),x=lr(s)===s,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(x||!g?[Is(s)]:yD(s)),S=m!=="none";!p&&S&&w.push(...xD(s,g,m,T));const C=[s,...w],P=await Ld(t,h),I=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(P[v]),d){const A=vD(o,a,T);I.push(P[A[0]],P[A[1]])}if(_=[..._,{placement:o,overflows:I}],!I.every(A=>A<=0)){var M,L;const A=(((M=i.flip)==null?void 0:M.index)||0)+1,O=C[A];if(O)return{data:{index:A,overflows:_},reset:{placement:O}};let N=(L=_.filter(V=>V.overflows[0]<=0).sort((V,F)=>V.overflows[1]-F.overflows[1])[0])==null?void 0:L.placement;if(!N)switch(f){case"bestFit":{var $;const V=($=_.filter(F=>{if(S){const z=Br(F.placement);return z===y||z==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(z=>z>0).reduce((z,D)=>z+D,0)]).sort((F,z)=>F[1]-z[1])[0])==null?void 0:$[0];V&&(N=V);break}case"initialPlacement":N=s;break}if(o!==N)return{reset:{placement:N}}}return{}}}};async function WD(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=lr(n),s=Wo(n),l=Br(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=Ho(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof m=="number"&&(f=s==="end"?m*-1:m),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const qD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await WD(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},UD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x:v,y}=h;return{x:v,y}}},...l}=Ho(e,t),c={x:n,y:r},u=await Ld(t,l),d=Br(lr(o)),p=ox(d);let f=c[p],m=c[d];if(i){const h=p==="y"?"top":"left",v=p==="y"?"bottom":"right",y=f+u[h],x=f-u[v];f=Od(y,f,x)}if(a){const h=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+u[h],x=m-u[v];m=Od(y,m,x)}const g=s.fn({...t,[p]:f,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},YD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Ho(e,t),l=await Ld(t,s),c=lr(n),u=Wo(n),d=Br(n)==="y",{width:p,height:f}=r.floating;let m,g;c==="top"||c==="bottom"?(m=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,m=u==="end"?"top":"bottom");const h=f-l.top-l.bottom,v=p-l.left-l.right,y=Mn(f-l[m],h),x=Mn(p-l[g],v),T=!t.middlewareData.shift;let w=y,S=x;if(d?S=u||T?Mn(x,v):v:w=u||T?Mn(y,h):h,T&&!u){const P=Jt(l.left,0),I=Jt(l.right,0),_=Jt(l.top,0),M=Jt(l.bottom,0);d?S=p-2*(P!==0||I!==0?P+I:Jt(l.left,l.right)):w=f-2*(_!==0||M!==0?_+M:Jt(l.top,l.bottom))}await a({...t,availableWidth:S,availableHeight:w});const C=await o.getDimensions(i.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function fx(e){const t=Qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Et(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=_s(n)!==i||_s(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Vd(e){return Je(e)?e:e.contextElement}function Uo(e){const t=Vd(e);if(!Et(t))return sr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=fx(t);let a=(i?_s(n.width):n.width)/r,s=(i?_s(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const GD=sr(0);function px(e){const t=Ht(e);return!Td()||!t.visualViewport?GD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function KD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ht(e)?!1:t}function Hr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Vd(e);let a=sr(1);t&&(r?Je(r)&&(a=Uo(r)):a=Uo(e));const s=KD(i,n,r)?px(i):sr(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=Ht(i),f=r&&Je(r)?Ht(r):r;let m=p,g=Ed(m);for(;g&&r&&f!==m;){const h=Uo(g),v=g.getBoundingClientRect(),y=Qt(g),x=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*h.x,T=v.top+(g.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=x,c+=T,m=Ht(g),g=Ed(m)}}return Os({width:u,height:d,x:l,y:c})}function ZD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=qn(r),s=t?Ps(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=sr(1);const u=sr(0),d=Et(r);if((d||!d&&!i)&&((or(r)!=="body"||Qi(a))&&(l=As(r)),Et(r))){const p=Hr(r);c=Uo(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function XD(e){return Array.from(e.getClientRects())}function hx(e){return Hr(qn(e)).left+As(e).scrollLeft}function QD(e){const t=qn(e),n=As(e),r=e.ownerDocument.body,o=Jt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Jt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+hx(e);const s=-n.scrollTop;return Qt(r).direction==="rtl"&&(a+=Jt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function JD(e,t){const n=Ht(e),r=qn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=Td();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function eN(e,t){const n=Hr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Et(e)?Uo(e):sr(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function mx(e,t,n){let r;if(t==="viewport")r=JD(e,n);else if(t==="document")r=QD(qn(e));else if(Je(t))r=eN(t,n);else{const o=px(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Os(r)}function gx(e,t){const n=Un(e);return n===t||!Je(n)||ir(n)?!1:Qt(n).position==="fixed"||gx(n,t)}function tN(e,t){const n=t.get(e);if(n)return n;let r=ar(e,[],!1).filter(s=>Je(s)&&or(s)!=="body"),o=null;const i=Qt(e).position==="fixed";let a=i?Un(e):e;for(;Je(a)&&!ir(a);){const s=Qt(a),l=Sd(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Qi(a)&&!l&&gx(e,a))?r=r.filter(u=>u!==a):o=s,a=Un(a)}return t.set(e,r),r}function nN(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Ps(t)?[]:tN(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=mx(t,u,o);return c.top=Jt(d.top,c.top),c.right=Mn(d.right,c.right),c.bottom=Mn(d.bottom,c.bottom),c.left=Jt(d.left,c.left),c},mx(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function rN(e){const{width:t,height:n}=fx(e);return{width:t,height:n}}function oN(e,t,n){const r=Et(t),o=qn(t),i=n==="fixed",a=Hr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=sr(0);if(r||!r&&!i)if((or(t)!=="body"||Qi(o))&&(s=As(t)),r){const d=Hr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=hx(o));const c=a.left+s.scrollLeft-l.x,u=a.top+s.scrollTop-l.y;return{x:c,y:u,width:a.width,height:a.height}}function jd(e){return Qt(e).position==="static"}function vx(e,t){return!Et(e)||Qt(e).position==="fixed"?null:t?t(e):e.offsetParent}function yx(e,t){const n=Ht(e);if(Ps(e))return n;if(!Et(e)){let o=Un(e);for(;o&&!ir(o);){if(Je(o)&&!jd(o))return o;o=Un(o)}return n}let r=vx(e,t);for(;r&&cD(r)&&jd(r);)r=vx(r,t);return r&&ir(r)&&jd(r)&&!Sd(r)?n:r||uD(e)||n}const iN=async function(e){const t=this.getOffsetParent||yx,n=this.getDimensions,r=await n(e.floating);return{reference:oN(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function aN(e){return Qt(e).direction==="rtl"}const sN={convertOffsetParentRelativeRectToViewportRelativeRect:ZD,getDocumentElement:qn,getClippingRect:nN,getOffsetParent:yx,getElementRects:iN,getClientRects:XD,getDimensions:rN,getScale:Uo,isElement:Je,isRTL:aN};function lN(e,t){let n=null,r;const o=qn(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f=Bo(u),m=Bo(o.clientWidth-(c+d)),g=Bo(o.clientHeight-(u+p)),h=Bo(c),y={rootMargin:-f+"px "+-m+"px "+-g+"px "+-h+"px",threshold:Jt(0,Mn(1,l))||1};let x=!0;function T(w){const S=w[0].intersectionRatio;if(S!==l){if(!x)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(T,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,y)}n.observe(e)}return a(!0),i}function ea(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Vd(e),u=o||i?[...c?ar(c):[],...ar(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?lN(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let m,g=l?Hr(e):null;l&&h();function h(){const v=Hr(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,m=requestAnimationFrame(h)}return n(),()=>{var v;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d==null||d(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const cN=qD,uN=UD,dN=HD,fN=YD,bx=BD,pN=(e,t,n)=>{const r=new Map,o={platform:sN,...n},i={...o.platform,_c:r};return zD(e,t,{...o,platform:i})};var Fs=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ls(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(!Ls(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)&&!Ls(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function xx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wx(e,t){const n=xx(e);return Math.round(t*n)/n}function $d(e){const t=k.useRef(e);return Fs(()=>{t.current=e}),t}function hN(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=k.useState(r);Ls(p,r)||f(r);const[m,g]=k.useState(null),[h,v]=k.useState(null),y=k.useCallback(F=>{F!==S.current&&(S.current=F,g(F))},[]),x=k.useCallback(F=>{F!==C.current&&(C.current=F,v(F))},[]),T=i||m,w=a||h,S=k.useRef(null),C=k.useRef(null),P=k.useRef(u),I=l!=null,_=$d(l),M=$d(o),L=$d(c),$=k.useCallback(()=>{if(!S.current||!C.current)return;const F={placement:t,strategy:n,middleware:p};M.current&&(F.platform=M.current),pN(S.current,C.current,F).then(z=>{const D={...z,isPositioned:L.current!==!1};A.current&&!Ls(P.current,D)&&(P.current=D,Oa.flushSync(()=>{d(D)}))})},[p,t,n,M,L]);Fs(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[c]);const A=k.useRef(!1);Fs(()=>(A.current=!0,()=>{A.current=!1}),[]),Fs(()=>{if(T&&(S.current=T),w&&(C.current=w),T&&w){if(_.current)return _.current(T,w,$);$()}},[T,w,$,_,I]);const O=k.useMemo(()=>({reference:S,floating:C,setReference:y,setFloating:x}),[y,x]),N=k.useMemo(()=>({reference:T,floating:w}),[T,w]),V=k.useMemo(()=>{const F={position:n,left:0,top:0};if(!N.floating)return F;const z=wx(N.floating,u.x),D=wx(N.floating,u.y);return s?{...F,transform:"translate("+z+"px, "+D+"px)",...xx(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:D}},[n,s,N.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:$,refs:O,elements:N,floatingStyles:V}),[u,$,O,N,V])}const mN=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?bx({element:r.current,padding:o}).fn(n):{}:r?bx({element:r,padding:o}).fn(n):{}}}},ta=(e,t)=>({...cN(e),options:[e,t]}),Rd=(e,t)=>({...uN(e),options:[e,t]}),zd=(e,t)=>({...dN(e),options:[e,t]}),Sx=(e,t)=>({...fN(e),options:[e,t]}),Tx=(e,t)=>({...mN(e),options:[e,t]});function Bd(e){return k.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const Ex={...k},gN=Ex.useInsertionEffect||(e=>e());function Pt(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return gN(()=>{t.current=e}),k.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 Hd="ArrowUp",na="ArrowDown",Yo="ArrowLeft",Go="ArrowRight";function Vs(e,t,n){return Math.floor(e/t)!==n}function ra(e,t){return t<0||t>=e.current.length}function Wd(e,t){return $t(e,{disabledIndices:t})}function Cx(e,t){return $t(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function $t(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=r?-i:i;while(s>=0&&s<=a.length-1&&js(a,s,o));return s}function vN(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===Hd){if(u&&Nt(n),c===-1)d=l;else if(d=$t(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||d<0)){const p=c%i,f=l%i,m=l-(f-p);f===p?d=l:d=f>p?m:m-i}ra(e,d)&&(d=c)}if(n.key===na&&(u&&Nt(n),c===-1?d=s:(d=$t(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=$t(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),ra(e,d)&&(d=c)),r==="both"){const p=Bo(c/i);n.key===Go&&(u&&Nt(n),c%i!==i-1?(d=$t(e,{startingIndex:c,disabledIndices:a}),o&&Vs(d,i,p)&&(d=$t(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=$t(e,{startingIndex:c-c%i-1,disabledIndices:a})),Vs(d,i,p)&&(d=c)),n.key===Yo&&(u&&Nt(n),c%i!==0?(d=$t(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Vs(d,i,p)&&(d=$t(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=$t(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Vs(d,i,p)&&(d=c));const f=Bo(l/i)===p;ra(e,d)&&(o&&f?d=n.key===Yo?l:$t(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function yN(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:l}=i;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<s;d++)for(let p=0;p<l;p++)u.push(o+d+p*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function bN(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function xN(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function js(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 kx=0;function cr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(kx);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():kx=requestAnimationFrame(i)}var Be=typeof document<"u"?E.useLayoutEffect:E.useEffect;function wN(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 SN(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 Px=k.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function TN(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=k.useState(()=>new Map),a=k.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=k.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Be(()=>{const l=new Map(o);Array.from(l.keys()).sort(wN).forEach((u,d)=>{l.set(u,d)}),SN(o,l)||i(l)},[o]),k.createElement(Px.Provider,{value:k.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function Ax(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=k.useContext(Px),[s,l]=k.useState(null),c=k.useRef(null),u=k.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d==null?void 0:d.textContent)!=null?p:null}},[s,i,a,t]);return Be(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Be(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),k.useMemo(()=>({ref:u,index:s??-1}),[s,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 _x=!1,EN=0;const Ix=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+EN++;function CN(){const[e,t]=k.useState(()=>_x?Ix():void 0);return Be(()=>{e==null&&t(Ix())},[]),k.useEffect(()=>{_x=!0},[]),e}const Zo=Ex.useId||CN;let oa;process.env.NODE_ENV!=="production"&&(oa=new Set);function $s(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.warn(o)}}function kN(){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=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.error(o)}}const Ox=k.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...m}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||$s("The `ref` prop is required for `FloatingArrow`."));const h=Zo(),[v,y]=k.useState(!1);if(Be(()=>{if(!o)return;Qt(o).direction==="rtl"&&y(!0)},[o]),!o)return null;const x=c*2,T=x/2,w=a/2*(l/-8+1),S=s/2*l/4,[C,P]=r.split("-"),I=!!p,_=C==="top"||C==="bottom",M=u&&P==="end"?"bottom":"top";let L=u&&P==="end"?"right":"left";u&&v&&(L=P==="end"?"left":"right");const $=(i==null?void 0:i.x)!=null?u||i.x:"",A=(i==null?void 0:i.y)!=null?u||i.y:"",O=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-S))+(" Q"+a/2+","+s+" "+w+","+(s-S))+" Z",N={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return k.createElement("svg",Ko({},g,{"aria-hidden":!0,ref:n,width:I?a:a+x,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[L]:$,[M]:A,[C]:_||I?"100%":"calc(100% - "+x/2+"px)",transform:""+N+(f??""),...m}}),x>0&&k.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:x+(p?0:1),d:O}),k.createElement("path",{stroke:x&&!p?g.fill:"none",d:O}),k.createElement("clipPath",{id:h},k.createElement("rect",{x:-T,y:T*(I?-1:1),width:a+x,height:a})))});function Mx(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Dx=k.createContext(null),Nx=k.createContext(null),ur=()=>{var e;return((e=k.useContext(Dx))==null?void 0:e.id)||null},dr=()=>k.useContext(Nx);function PN(e){const t=Zo(),n=dr(),o=ur();return Be(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function AN(e){const{children:t,id:n}=e,r=ur();return k.createElement(Dx.Provider,{value:k.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function _N(e){const{children:t}=e,n=k.useRef([]),r=k.useCallback(a=>{n.current=[...n.current,a]},[]),o=k.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=k.useState(()=>Mx())[0];return k.createElement(Nx.Provider,{value:k.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function fr(e){return"data-floating-ui-"+e}function Ft(e){const t=E.useRef(e);return Be(()=>{t.current=e}),t}const Fx=fr("safe-polygon");function qd(e,t,n){return n&&!zo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Lx(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:p=!0}=t,f=dr(),m=ur(),g=Ft(c),h=Ft(l),v=Ft(n),y=k.useRef(),x=k.useRef(-1),T=k.useRef(),w=k.useRef(-1),S=k.useRef(!0),C=k.useRef(!1),P=k.useRef(()=>{}),I=k.useCallback(()=>{var O;const N=(O=o.current.openEvent)==null?void 0:O.type;return(N==null?void 0:N.includes("mouse"))&&N!=="mousedown"},[o]);k.useEffect(()=>{if(!s)return;function O(N){let{open:V}=N;V||(clearTimeout(x.current),clearTimeout(w.current),S.current=!0)}return i.on("openchange",O),()=>{i.off("openchange",O)}},[s,i]),k.useEffect(()=>{if(!s||!g.current||!n)return;function O(V){I()&&r(!1,V,"hover")}const N=Mt(a.floating).documentElement;return N.addEventListener("mouseleave",O),()=>{N.removeEventListener("mouseleave",O)}},[a.floating,n,r,s,g,I]);const _=k.useCallback(function(O,N,V){N===void 0&&(N=!0),V===void 0&&(V="hover");const F=qd(h.current,"close",y.current);F&&!T.current?(clearTimeout(x.current),x.current=window.setTimeout(()=>r(!1,O,V),F)):N&&(clearTimeout(x.current),r(!1,O,V))},[h,r]),M=Pt(()=>{P.current(),T.current=void 0}),L=Pt(()=>{if(C.current){const O=Mt(a.floating).body;O.style.pointerEvents="",O.removeAttribute(Fx),C.current=!1}});k.useEffect(()=>{if(!s)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function N(D){if(clearTimeout(x.current),S.current=!1,u&&!zo(y.current)||d>0&&!qd(h.current,"open"))return;const R=qd(h.current,"open",y.current);R?x.current=window.setTimeout(()=>{v.current||r(!0,D,"hover")},R):r(!0,D,"hover")}function V(D){if(O())return;P.current();const R=Mt(a.floating);if(clearTimeout(w.current),g.current&&o.current.floatingContext){n||clearTimeout(x.current),T.current=g.current({...o.current.floatingContext,tree:f,x:D.clientX,y:D.clientY,onClose(){L(),M(),_(D,!0,"safe-polygon")}});const te=T.current;R.addEventListener("mousemove",te),P.current=()=>{R.removeEventListener("mousemove",te)};return}(y.current==="touch"?!yt(a.floating,D.relatedTarget):!0)&&_(D)}function F(D){O()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:D.clientX,y:D.clientY,onClose(){L(),M(),_(D)}})(D))}if(Je(a.domReference)){var z;const D=a.domReference;return n&&D.addEventListener("mouseleave",F),(z=a.floating)==null||z.addEventListener("mouseleave",F),p&&D.addEventListener("mousemove",N,{once:!0}),D.addEventListener("mouseenter",N),D.addEventListener("mouseleave",V),()=>{var R;n&&D.removeEventListener("mouseleave",F),(R=a.floating)==null||R.removeEventListener("mouseleave",F),p&&D.removeEventListener("mousemove",N),D.removeEventListener("mouseenter",N),D.removeEventListener("mouseleave",V)}}},[a,s,e,u,d,p,_,M,L,r,n,v,f,h,g,o]),Be(()=>{var O;if(s&&n&&(O=g.current)!=null&&O.__options.blockPointerEvents&&I()){const V=Mt(a.floating).body;V.setAttribute(Fx,""),V.style.pointerEvents="none",C.current=!0;const F=a.floating;if(Je(a.domReference)&&F){var N;const z=a.domReference,D=f==null||(N=f.nodesRef.current.find(R=>R.id===m))==null||(N=N.context)==null?void 0:N.elements.floating;return D&&(D.style.pointerEvents=""),z.style.pointerEvents="auto",F.style.pointerEvents="auto",()=>{z.style.pointerEvents="",F.style.pointerEvents=""}}}},[s,n,m,a,f,g,I]),Be(()=>{n||(y.current=void 0,M(),L())},[n,M,L]),k.useEffect(()=>()=>{M(),clearTimeout(x.current),clearTimeout(w.current),L()},[s,a.domReference,M,L]);const $=k.useMemo(()=>{function O(N){y.current=N.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(N){const{nativeEvent:V}=N;function F(){!S.current&&!v.current&&r(!0,V,"hover")}u&&!zo(y.current)||n||d===0||(clearTimeout(w.current),y.current==="touch"?F():w.current=window.setTimeout(F,d))}}},[u,r,n,v,d]),A=k.useMemo(()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(O){_(O.nativeEvent,!1)}}),[_]);return k.useMemo(()=>s?{reference:$,floating:A}:{},[s,$,A])}function IN(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Wr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function ON(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Wr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Xo=new WeakMap,Rs=new WeakSet,zs={},Ud=0;const MN=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Vx=e=>e&&(e.host||Vx(e.parentNode)),DN=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Vx(n);return e.contains(r)?r:null}).filter(n=>n!=null);function NN(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=DN(t,e),s=new Set,l=new Set(a),c=[];zs[o]||(zs[o]=new WeakMap);const u=zs[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,m=>{if(or(m)!=="script")if(s.has(m))p(m);else{const g=i?m.getAttribute(i):null,h=g!==null&&g!=="false",v=(Xo.get(m)||0)+1,y=(u.get(m)||0)+1;Xo.set(m,v),u.set(m,y),c.push(m),v===1&&h&&Rs.add(m),y===1&&m.setAttribute(o,""),!h&&i&&m.setAttribute(i,"true")}})}return Ud++,()=>{c.forEach(f=>{const m=(Xo.get(f)||0)-1,g=(u.get(f)||0)-1;Xo.set(f,m),u.set(f,g),m||(!Rs.has(f)&&i&&f.removeAttribute(i),Rs.delete(f)),g||f.removeAttribute(o)}),Ud--,Ud||(Xo=new WeakMap,Xo=new WeakMap,Rs=new WeakSet,zs={})}}function jx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Mt(e[0]).body;return NN(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Qo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function $x(e,t){const n=Ji(e,Qo());t==="prev"&&n.reverse();const r=n.indexOf(gn(Mt(e)));return n.slice(r+1)[0]}function Rx(){return $x(document.body,"next")}function zx(){return $x(document.body,"prev")}function ia(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!yt(n,r)}function FN(e){Ji(e,Qo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function LN(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 VN(e,t,n){const r=e.indexOf(t);function o(a){const s=fr("focus-guard");let l=r+(a?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(s)||yt(n,c));)a?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const Yd={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 jN;function Bx(e){e.key==="Tab"&&(e.target,clearTimeout(jN))}const Bs=k.forwardRef(function(t,n){const[r,o]=k.useState();Be(()=>(Pd()&&o("button"),document.addEventListener("keydown",Bx),()=>{document.removeEventListener("keydown",Bx)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[fr("focus-guard")]:"",style:Yd};return k.createElement("span",Ko({},t,i))}),Hx=k.createContext(null),Wx=fr("portal");function $N(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Zo(),o=qx(),[i,a]=k.useState(null),s=k.useRef(null);return Be(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),Be(()=>{if(!r||s.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Wx,""),l.appendChild(c),s.current=c,a(c)},[t,r]),Be(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Je(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(Wx,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function qr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=$N({id:n,root:r}),[a,s]=k.useState(null),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return k.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(m){i&&ia(m)&&(m.type==="focusin"?LN:FN)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),k.createElement(Hx.Provider,{value:k.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&k.createElement(Bs,{"data-type":"outside",ref:l,onFocus:f=>{if(ia(f,i)){var m;(m=u.current)==null||m.focus()}else{const g=zx()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&k.createElement("span",{"aria-owns":i.id,style:Yd}),i&&Oa.createPortal(t,i),p&&i&&k.createElement(Bs,{"data-type":"outside",ref:c,onFocus:f=>{if(ia(f,i)){var m;(m=d.current)==null||m.focus()}else{const g=Rx()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const qx=()=>k.useContext(Hx),RN=20;let Ur=[];function Gd(e){Ur=Ur.filter(n=>n.isConnected);let t=e;if(!(!t||or(t)==="body")){if(!RD(t,Qo())){const n=Ji(t,Qo())[0];n&&(t=n)}Ur.push(t),Ur.length>RN&&(Ur=Ur.slice(-20))}}function Ux(){return Ur.slice().reverse().find(e=>e.isConnected)}const zN=k.forwardRef(function(t,n){return k.createElement("button",Ko({},t,{type:"button",ref:n,tabIndex:-1,style:Yd}))});function Jo(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:f,nodeId:m,onOpenChange:g,events:h,dataRef:v,floatingId:y,elements:{domReference:x,floating:T}}=t,w=typeof a=="number"&&a<0,S=rx(x)&&w,C=MN()?i:!0,P=Ft(o),I=Ft(a),_=Ft(s),M=dr(),L=qx(),$=k.useRef(null),A=k.useRef(null),O=k.useRef(!1),N=k.useRef(!1),V=k.useRef(-1),F=L!=null,z=T==null?void 0:T.firstElementChild,D=(z==null?void 0:z.id)===y?z:T,R=Pt(function(Z){return Z===void 0&&(Z=D),Z?Ji(Z,Qo()):[]}),J=Pt(Z=>{const U=R(Z);return P.current.map(Y=>x&&Y==="reference"?x:D&&Y==="floating"?D:U).filter(Boolean).flat()});k.useEffect(()=>{if(r||!c)return;function Z(Y){if(Y.key==="Tab"){yt(D,gn(Mt(D)))&&R().length===0&&!S&&Nt(Y);const j=J(),W=On(Y);P.current[0]==="reference"&&W===x&&(Nt(Y),Y.shiftKey?cr(j[j.length-1]):cr(j[1])),P.current[1]==="floating"&&W===D&&Y.shiftKey&&(Nt(Y),cr(j[0]))}}const U=Mt(D);return U.addEventListener("keydown",Z),()=>{U.removeEventListener("keydown",Z)}},[r,x,D,c,P,S,R,J]),k.useEffect(()=>{if(r||!T)return;function Z(U){const Y=On(U),W=R().indexOf(Y);W!==-1&&(V.current=W)}return T.addEventListener("focusin",Z),()=>{T.removeEventListener("focusin",Z)}},[r,T,R]),k.useEffect(()=>{if(r||!d)return;function Z(){N.current=!0,setTimeout(()=>{N.current=!1})}function U(Y){const j=Y.relatedTarget;queueMicrotask(()=>{const W=!(yt(x,j)||yt(T,j)||yt(j,T)||yt(L==null?void 0:L.portalNode,j)||j!=null&&j.hasAttribute(fr("focus-guard"))||M&&(Wr(M.nodesRef.current,m).find(G=>{var ae,B;return yt((ae=G.context)==null?void 0:ae.elements.floating,j)||yt((B=G.context)==null?void 0:B.elements.domReference,j)})||IN(M.nodesRef.current,m).find(G=>{var ae,B;return((ae=G.context)==null?void 0:ae.elements.floating)===j||((B=G.context)==null?void 0:B.elements.domReference)===j})));if(l&&W&&gn(Mt(D))===Mt(D).body){Et(D)&&(D==null||D.focus());const G=V.current,ae=R(),B=ae[G]||ae[ae.length-1]||D;Et(B)&&B.focus()}(S||!c)&&j&&W&&!N.current&&j!==Ux()&&(O.current=!0,g(!1,Y))})}if(T&&Et(x))return x.addEventListener("focusout",U),x.addEventListener("pointerdown",Z),T.addEventListener("focusout",U),()=>{x.removeEventListener("focusout",U),x.removeEventListener("pointerdown",Z),T.removeEventListener("focusout",U)}},[r,x,T,D,c,m,M,L,g,d,l,R,S]),k.useEffect(()=>{var Z;if(r)return;const U=Array.from((L==null||(Z=L.portalNode)==null?void 0:Z.querySelectorAll("["+fr("portal")+"]"))||[]);if(T){const Y=[T,...U,$.current,A.current,P.current.includes("reference")||S?x:null].filter(W=>W!=null),j=c||S?jx(Y,C,!C):jx(Y);return()=>{j()}}},[r,x,T,c,P,L,S,C]),Be(()=>{if(r||!Et(D))return;const Z=Mt(D),U=gn(Z);queueMicrotask(()=>{const Y=J(D),j=I.current,W=(typeof j=="number"?Y[j]:j.current)||D,G=yt(D,U);!w&&!G&&p&&cr(W,{preventScroll:W===D})})},[r,p,D,w,J,I]),Be(()=>{if(r||!D)return;let Z=!1;const U=Mt(D),Y=gn(U);let W=v.current.openEvent;const G=f.domReference.current;Gd(Y);function ae(B){let{open:xe,reason:Ee,event:Oe,nested:$e}=B;xe&&(W=Oe),Ee==="escape-key"&&f.domReference.current&&Gd(f.domReference.current),Ee==="hover"&&Oe.type==="mouseleave"&&(O.current=!0),Ee==="outside-press"&&($e?(O.current=!1,Z=!0):O.current=!(tx(Oe)||kd(Oe)))}return h.on("openchange",ae),()=>{h.off("openchange",ae);const B=gn(U),xe=yt(T,B)||M&&Wr(M.nodesRef.current,m).some(se=>{var ye;return yt((ye=se.context)==null?void 0:ye.elements.floating,B)});(xe||W&&["click","mousedown"].includes(W.type))&&f.domReference.current&&Gd(f.domReference.current);const Oe=G||Y,$e=Ji(Mt(Oe).body,Qo());queueMicrotask(()=>{let se=Ux();!se&&Et(Oe)&&T&&(se=VN($e,Oe,T)),_.current&&!O.current&&Et(se)&&(!(se!==B&&B!==U.body)||xe)&&se.focus({preventScroll:Z})})}},[r,T,D,_,v,f,h,M,m]),Be(()=>{if(!r&&L)return L.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{L.setFocusManagerState(null)}},[r,L,c,p,g,f,d]),Be(()=>{if(r||!D||typeof MutationObserver!="function"||w)return;const Z=()=>{const Y=D.getAttribute("tabindex"),j=R(),W=gn(Mt(T)),G=j.indexOf(W);G!==-1&&(V.current=G),P.current.includes("floating")||W!==f.domReference.current&&j.length===0?Y!=="0"&&D.setAttribute("tabindex","0"):Y!=="-1"&&D.setAttribute("tabindex","-1")};Z();const U=new MutationObserver(Z);return U.observe(D,{childList:!0,subtree:!0,attributes:!0}),()=>{U.disconnect()}},[r,T,D,f,P,R,w]);function te(Z){return r||!u||!c?null:k.createElement(zN,{ref:Z==="start"?$:A,onClick:U=>g(!1,U.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&C&&(c?!S:!0)&&(F||c);return k.createElement(k.Fragment,null,ee&&k.createElement(Bs,{"data-type":"inside",ref:L==null?void 0:L.beforeInsideRef,onFocus:Z=>{if(c){const Y=J();cr(o[0]==="reference"?Y[0]:Y[Y.length-1])}else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(O.current=!1,ia(Z,L.portalNode)){const Y=Rx()||x;Y==null||Y.focus()}else{var U;(U=L.beforeOutsideRef.current)==null||U.focus()}}}),!S&&te("start"),n,te("end"),ee&&k.createElement(Bs,{"data-type":"inside",ref:L==null?void 0:L.afterInsideRef,onFocus:Z=>{if(c)cr(J()[0]);else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(d&&(O.current=!0),ia(Z,L.portalNode)){const Y=zx()||x;Y==null||Y.focus()}else{var U;(U=L.afterOutsideRef.current)==null||U.focus()}}}))}const Kd=new Set,BN=k.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Zo();return Be(()=>{if(!r)return;Kd.add(i);const a=/iP(hone|ad|od)|iOS/.test(Cd()),s=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=s.left?parseFloat(s.left):window.scrollX,p=s.top?parseFloat(s.top):window.scrollY;if(s.overflow="hidden",u&&(s[c]=u+"px"),a){var f,m;const g=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,h=((m=window.visualViewport)==null?void 0:m.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(p-Math.floor(h))+"px",left:-(d-Math.floor(g))+"px",right:"0"})}return()=>{Kd.delete(i),Kd.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),k.createElement("div",Ko({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Yx(e){return Et(e.target)&&e.target.tagName==="BUTTON"}function Gx(e){return Id(e)}function aa(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=k.useRef(),p=k.useRef(!1),f=k.useMemo(()=>({onPointerDown(m){d.current=m.pointerType},onMouseDown(m){const g=d.current;m.button===0&&s!=="click"&&(zo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){const g=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}zo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){d.current=void 0,!(m.defaultPrevented||!u||Yx(m))&&(m.key===" "&&!Gx(i)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||Yx(m)||Gx(i)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return k.useMemo(()=>a?{reference:f}:{},[a,f])}function HN(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=a.width,d=a.height,p=a.x,f=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),p-=n||0,f-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,p=s&&t.x!=null?t.x:p,f=l&&t.y!=null?t.y:f):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:p,y:f,top:f,right:p+u,bottom:f+d,left:p}}}}function Kx(e){return e!=null&&e.clientX!=null}function WN(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=k.useRef(!1),p=k.useRef(null),[f,m]=k.useState(),[g,h]=k.useState([]),v=Pt((S,C)=>{d.current||r.current.openEvent&&!Kx(r.current.openEvent)||a.setPositionReference(HN(i,{x:S,y:C,axis:l,dataRef:r,pointerType:f}))}),y=Pt(S=>{c!=null||u!=null||(n?p.current||h([]):v(S.clientX,S.clientY))}),x=zo(f)?o:n,T=k.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const S=Ht(o);function C(P){const I=On(P);yt(o,I)?(S.removeEventListener("mousemove",C),p.current=null):v(P.clientX,P.clientY)}if(!r.current.openEvent||Kx(r.current.openEvent)){S.addEventListener("mousemove",C);const P=()=>{S.removeEventListener("mousemove",C),p.current=null};return p.current=P,P}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,v]);k.useEffect(()=>T(),[T,g]),k.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),k.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),Be(()=>{s&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[s,c,u,v]);const w=k.useMemo(()=>{function S(C){let{pointerType:P}=C;m(P)}return{onPointerDown:S,onPointerEnter:S,onMouseMove:y,onMouseEnter:y}},[y]);return k.useMemo(()=>s?{reference:w}:{},[s,w])}const qN={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},UN={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Zx=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 Yr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=dr(),h=Pt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?h:l,y=k.useRef(!1),x=k.useRef(!1),{escapeKey:T,outsidePress:w}=Zx(f),{escapeKey:S,outsidePress:C}=Zx(m),P=Pt(A=>{var O;if(!n||!a||!s||A.key!=="Escape")return;const N=(O=i.current.floatingContext)==null?void 0:O.nodeId,V=g?Wr(g.nodesRef.current,N):[];if(!T&&(A.stopPropagation(),V.length>0)){let F=!0;if(V.forEach(z=>{var D;if((D=z.context)!=null&&D.open&&!z.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}r(!1,fD(A)?A.nativeEvent:A,"escape-key")}),I=Pt(A=>{var O;const N=()=>{var V;P(A),(V=On(A))==null||V.removeEventListener("keydown",N)};(O=On(A))==null||O.addEventListener("keydown",N)}),_=Pt(A=>{var O;const N=y.current;y.current=!1;const V=x.current;if(x.current=!1,c==="click"&&V||N||typeof v=="function"&&!v(A))return;const F=On(A),z="["+fr("inert")+"]",D=Mt(o.floating).querySelectorAll(z);let R=Je(F)?F:null;for(;R&&!ir(R);){const Z=Un(R);if(ir(Z)||!Je(Z))break;R=Z}if(D.length&&Je(F)&&!pD(F)&&!yt(F,o.floating)&&Array.from(D).every(Z=>!yt(R,Z)))return;if(Et(F)&&$){const Z=F.clientWidth>0&&F.scrollWidth>F.clientWidth,U=F.clientHeight>0&&F.scrollHeight>F.clientHeight;let Y=U&&A.offsetX>F.clientWidth;if(U&&Qt(F).direction==="rtl"&&(Y=A.offsetX<=F.offsetWidth-F.clientWidth),Y||Z&&A.offsetY>F.clientHeight)return}const J=(O=i.current.floatingContext)==null?void 0:O.nodeId,te=g&&Wr(g.nodesRef.current,J).some(Z=>{var U;return _d(A,(U=Z.context)==null?void 0:U.elements.floating)});if(_d(A,o.floating)||_d(A,o.domReference)||te)return;const ee=g?Wr(g.nodesRef.current,J):[];if(ee.length>0){let Z=!0;if(ee.forEach(U=>{var Y;if((Y=U.context)!=null&&Y.open&&!U.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}r(!1,A,"outside-press")}),M=Pt(A=>{var O;const N=()=>{var V;_(A),(V=On(A))==null||V.removeEventListener(c,N)};(O=On(A))==null||O.addEventListener(c,N)});k.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=T,i.current.__outsidePressBubbles=w;function A(V){r(!1,V,"ancestor-scroll")}const O=Mt(o.floating);s&&O.addEventListener("keydown",S?I:P,S),v&&O.addEventListener(c,C?M:_,C);let N=[];return p&&(Je(o.domReference)&&(N=ar(o.domReference)),Je(o.floating)&&(N=N.concat(ar(o.floating))),!Je(o.reference)&&o.reference&&o.reference.contextElement&&(N=N.concat(ar(o.reference.contextElement)))),N=N.filter(V=>{var F;return V!==((F=O.defaultView)==null?void 0:F.visualViewport)}),N.forEach(V=>{V.addEventListener("scroll",A,{passive:!0})}),()=>{s&&O.removeEventListener("keydown",S?I:P,S),v&&O.removeEventListener(c,C?M:_,C),N.forEach(V=>{V.removeEventListener("scroll",A)})}},[i,o,s,v,c,n,r,p,a,T,w,P,S,I,_,C,M]),k.useEffect(()=>{y.current=!1},[v,c]);const L=k.useMemo(()=>({onKeyDown:P,[qN[d]]:A=>{u&&r(!1,A.nativeEvent,"reference-press")}}),[P,r,u,d]),$=k.useMemo(()=>({onKeyDown:P,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[UN[c]]:()=>{y.current=!0}}),[P,c]);return k.useMemo(()=>a?{reference:L,floating:$}:{},[a,L,$])}function YN(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Zo(),i=k.useRef({}),[a]=k.useState(()=>Mx()),s=ur()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!Je(f)&&kN("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]=k.useState(r.reference),u=Pt((f,m,g)=>{i.current.openEvent=f?m:void 0,a.emit("openchange",{open:f,event:m,reason:g,nested:s}),n==null||n(f,m,g)}),d=k.useMemo(()=>({setPositionReference:c}),[]),p=k.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return k.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function Gr(e){e===void 0&&(e={});const{nodeId:t}=e,n=YN({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=k.useState(null),[s,l]=k.useState(null),u=(o==null?void 0:o.reference)||i,d=k.useRef(null),p=dr();Be(()=>{u&&(d.current=u)},[u]);const f=hN({...e,elements:{...o,...s&&{reference:s}}}),m=k.useCallback(x=>{const T=Je(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l(T),f.refs.setReference(T)},[f.refs]),g=k.useCallback(x=>{(Je(x)||x===null)&&(d.current=x,a(x)),(Je(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!Je(x))&&f.refs.setReference(x)},[f.refs]),h=k.useMemo(()=>({...f.refs,setReference:g,setPositionReference:m,domReference:d}),[f.refs,g,m]),v=k.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),y=k.useMemo(()=>({...f,...r,refs:h,elements:v,nodeId:t}),[f,h,v,t,r]);return Be(()=>{r.dataRef.current.floatingContext=y;const x=p==null?void 0:p.nodesRef.current.find(T=>T.id===t);x&&(x.context=y)}),k.useMemo(()=>({...f,context:y,refs:h,elements:v}),[f,h,v,y])}function GN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=k.useRef(!1),u=k.useRef(),d=k.useRef(!0);k.useEffect(()=>{if(!s)return;const f=Ht(a.domReference);function m(){!n&&Et(a.domReference)&&a.domReference===gn(Mt(a.domReference))&&(c.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",m),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",m),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),k.useEffect(()=>{if(!s)return;function f(m){let{reason:g}=m;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),k.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=k.useMemo(()=>({onPointerDown(f){kd(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const m=On(f.nativeEvent);if(l&&Je(m))try{if(Pd()&&nx())throw Error();if(!m.matches(":focus-visible"))return}catch{if(!d.current&&!Id(m))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const m=f.relatedTarget,g=f.nativeEvent,h=Je(m)&&m.hasAttribute(fr("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const y=gn(a.domReference?a.domReference.ownerDocument:document);!m&&y===a.domReference||yt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,y)||yt(a.domReference,y)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return k.useMemo(()=>s?{reference:p}:{},[s,p])}const Xx="active",Qx="selected";function Zd(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Xx]:a,[Qx]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1},...i,...t.map(a=>{const s=a?a[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[c,u]=l;if(!(o&&[Xx,Qx].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),a[c]=function(){for(var p,f=arguments.length,m=new Array(f),g=0;g<f;g++)m[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(h=>h(...m)).find(h=>h!==void 0)}}}else a[c]=u}),a),{})}}function Kr(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),o=k.useCallback(s=>Zd(s,e,"reference"),t),i=k.useCallback(s=>Zd(s,e,"floating"),n),a=k.useCallback(s=>Zd(s,e,"item"),r);return k.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let Jx=!1;function Hs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function e0(e,t){return Hs(t,e===Hd||e===na,e===Yo||e===Go)}function Xd(e,t,n){return Hs(t,e===na,n?e===Yo:e===Go)||e==="Enter"||e===" "||e===""}function KN(e,t,n){return Hs(t,n?e===Yo:e===Go,e===na)}function t0(e,t,n){return Hs(t,n?e===Go:e===Yo,e===Hd)}function Qd(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:h=!0,openOnArrowKeyDown:v=!0,disabledIndices:y=void 0,orientation:x="vertical",cols:T=1,scrollItemIntoView:w=!0,virtualItemRef:S,itemSizes:C,dense:P=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||$s("`useListNavigation` looping must be enabled to allow escaping."),m||$s("`useListNavigation` must be virtual to allow escaping.")),x==="vertical"&&T>1&&$s("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=ur(),_=dr(),M=Pt(s),L=k.useRef(g),$=k.useRef(c??-1),A=k.useRef(null),O=k.useRef(!0),N=k.useRef(M),V=k.useRef(!!o.floating),F=k.useRef(n),z=k.useRef(!1),D=k.useRef(!1),R=Ft(y),J=Ft(n),te=Ft(w),ee=Ft(o.floating),Z=Ft(c),[U,Y]=k.useState(),[j,W]=k.useState(),G=Pt(function(se,ye,K){K===void 0&&(K=!1);function ce(ie){m?(Y(ie.id),_==null||_.events.emit("virtualfocus",ie),S&&(S.current=ie)):cr(ie,{preventScroll:!0,sync:nx()&&Pd()?Jx||z.current:!1})}const Q=se.current[ye.current];Q&&ce(Q),requestAnimationFrame(()=>{const ie=se.current[ye.current]||Q;if(!ie)return;Q||ce(ie);const we=te.current;we&&B&&(K||!O.current)&&(ie.scrollIntoView==null||ie.scrollIntoView(typeof we=="boolean"?{block:"nearest",inline:"nearest"}:we))})});Be(()=>{document.createElement("div").focus({get preventScroll(){return Jx=!0,!1}})},[]),Be(()=>{l&&(n&&o.floating?L.current&&c!=null&&(D.current=!0,$.current=c,M(c)):V.current&&($.current=-1,N.current(null)))},[l,n,o.floating,c,M]),Be(()=>{if(l&&n&&o.floating)if(a==null){if(z.current=!1,Z.current!=null)return;if(V.current&&($.current=-1,G(i,$)),(!F.current||!V.current)&&L.current&&(A.current!=null||L.current===!0&&A.current==null)){let se=0;const ye=()=>{i.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(ye),se++):($.current=A.current==null||Xd(A.current,x,f)||p?Wd(i,R.current):Cx(i,R.current),A.current=null,M($.current))};ye()}}else ra(i,a)||($.current=a,G(i,$,D.current),D.current=!1)},[l,n,o.floating,a,Z,p,i,x,f,M,G,R]),Be(()=>{var se;if(!l||o.floating||!_||m||!V.current)return;const ye=_.nodesRef.current,K=(se=ye.find(ie=>ie.id===I))==null||(se=se.context)==null?void 0:se.elements.floating,ce=gn(Mt(o.floating)),Q=ye.some(ie=>ie.context&&yt(ie.context.elements.floating,ce));K&&!Q&&O.current&&K.focus({preventScroll:!0})},[l,o.floating,_,I,m]),Be(()=>{if(!l||!_||!m||I)return;function se(ye){W(ye.id),S&&(S.current=ye)}return _.events.on("virtualfocus",se),()=>{_.events.off("virtualfocus",se)}},[l,_,m,I,S]),Be(()=>{N.current=M,V.current=!!o.floating}),Be(()=>{n||(A.current=null)},[n]),Be(()=>{F.current=n},[n]);const ae=a!=null,B=k.useMemo(()=>{function se(K){if(!n)return;const ce=i.current.indexOf(K);ce!==-1&&M(ce)}return{onFocus(K){let{currentTarget:ce}=K;se(ce)},onClick:K=>{let{currentTarget:ce}=K;return ce.focus({preventScroll:!0})},...h&&{onMouseMove(K){let{currentTarget:ce}=K;se(ce)},onPointerLeave(K){let{pointerType:ce}=K;!O.current||ce==="touch"||($.current=-1,G(i,$),M(null),m||cr(ee.current,{preventScroll:!0}))}}}},[n,ee,G,h,i,M,m]),xe=Pt(se=>{if(O.current=!1,z.current=!0,!J.current&&se.currentTarget===ee.current)return;if(p&&t0(se.key,x,f)){Nt(se),r(!1,se.nativeEvent,"list-navigation"),Et(o.domReference)&&!m&&o.domReference.focus();return}const ye=$.current,K=Wd(i,y),ce=Cx(i,y);if(se.key==="Home"&&(Nt(se),$.current=K,M($.current)),se.key==="End"&&(Nt(se),$.current=ce,M($.current)),T>1){const Q=C||Array.from({length:i.current.length},()=>({width:1,height:1})),ie=yN(Q,T,P),we=ie.findIndex(ue=>ue!=null&&!js(i.current,ue,y)),X=ie.reduce((ue,_e,We)=>_e!=null&&!js(i.current,_e,y)?We:ue,-1);if($.current=ie[vN({current:ie.map(ue=>ue!=null?i.current[ue]:null)},{event:se,orientation:x,loop:d,cols:T,disabledIndices:xN([...y||i.current.map((ue,_e)=>js(i.current,_e)?_e:void 0),void 0],ie),minIndex:we,maxIndex:X,prevIndex:bN($.current>ce?K:$.current,Q,ie,T,se.key===na?"bl":se.key===Go?"tr":"tl"),stopEvent:!0})],M($.current),x==="both")return}if(e0(se.key,x)){if(Nt(se),n&&!m&&gn(se.currentTarget.ownerDocument)===se.currentTarget){$.current=Xd(se.key,x,f)?K:ce,M($.current);return}Xd(se.key,x,f)?d?$.current=ye>=ce?u&&ye!==i.current.length?-1:K:$t(i,{startingIndex:ye,disabledIndices:y}):$.current=Math.min(ce,$t(i,{startingIndex:ye,disabledIndices:y})):d?$.current=ye<=K?u&&ye!==-1?i.current.length:ce:$t(i,{startingIndex:ye,decrement:!0,disabledIndices:y}):$.current=Math.max(K,$t(i,{startingIndex:ye,decrement:!0,disabledIndices:y})),ra(i,$.current)?M(null):M($.current)}}),Ee=k.useMemo(()=>m&&n&&ae&&{"aria-activedescendant":j||U},[m,n,ae,j,U]),Oe=k.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...!rx(o.domReference)&&Ee,onKeyDown:xe,onPointerMove(){O.current=!0}}),[Ee,xe,o.domReference,x]),$e=k.useMemo(()=>{function se(K){g==="auto"&&tx(K.nativeEvent)&&(L.current=!0)}function ye(K){L.current=g,g==="auto"&&kd(K.nativeEvent)&&(L.current=!0)}return{...Ee,onKeyDown(K){O.current=!1;const ce=K.key.indexOf("Arrow")===0,Q=KN(K.key,x,f),ie=t0(K.key,x,f),we=e0(K.key,x),X=(p?Q:we)||K.key==="Enter"||K.key.trim()==="";if(m&&n){const Ct=_==null?void 0:_.nodesRef.current.find(Lt=>Lt.parentId==null),mt=_&&Ct?ON(_.nodesRef.current,Ct.id):null;if(ce&&mt&&S){const Lt=new KeyboardEvent("keydown",{key:K.key,bubbles:!0});if(Q||ie){var ue,_e;const Sn=((ue=mt.context)==null?void 0:ue.elements.domReference)===K.currentTarget,zn=ie&&!Sn?(_e=mt.context)==null?void 0:_e.elements.domReference:Q?i.current.find(wr=>(wr==null?void 0:wr.id)===U):null;zn&&(Nt(K),zn.dispatchEvent(Lt),W(void 0))}if(we&&mt.context&&mt.context.open&&mt.parentId&&K.currentTarget!==mt.context.elements.domReference){var We;Nt(K),(We=mt.context.elements.domReference)==null||We.dispatchEvent(Lt);return}}return xe(K)}if(!(!n&&!v&&ce)){if(X&&(A.current=p&&we?null:K.key),p){Q&&(Nt(K),n?($.current=Wd(i,R.current),M($.current)):r(!0,K.nativeEvent,"list-navigation"));return}we&&(c!=null&&($.current=c),Nt(K),!n&&v?r(!0,K.nativeEvent,"list-navigation"):xe(K),n&&M($.current))}},onFocus(){n&&!m&&M(null)},onPointerDown:ye,onMouseDown:se,onClick:se}},[U,Ee,xe,R,g,i,p,M,r,n,v,x,f,c,_,m,S]);return k.useMemo(()=>l?{reference:$e,floating:Oe,item:B}:{},[l,$e,Oe,B])}const ZN=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Zr(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=ZN.get(a))!=null?n:a,l=Zo(),u=ur()!=null,d=k.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&u&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,r,l,a]),p=k.useMemo(()=>{const m={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?m:{...m,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),f=k.useCallback(m=>{let{active:g,selected:h}=m;const v={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...v,"aria-selected":g&&h};case"combobox":return{...v,...g&&{"aria-selected":!0}}}return{}},[o,a]);return k.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const n0=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function ei(e,t){return typeof e=="function"?e(t):e}function XN(e,t){const[n,r]=k.useState(e);return e&&!n&&r(!0),k.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function QN(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[s,l]=k.useState("unmounted"),c=XN(n,a);return!c&&s==="close"&&l("unmounted"),Be(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function r0(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=k.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,m]=k.useState(()=>({...ei(i,c),...ei(n,c)})),{isMounted:g,status:h}=QN(e,{duration:a}),v=Ft(n),y=Ft(r),x=Ft(o),T=Ft(i);return Be(()=>{const w=ei(v.current,c),S=ei(x.current,c),C=ei(T.current,c),P=ei(y.current,c)||Object.keys(w).reduce((I,_)=>(I[_]="",I),{});if(h==="initial"&&m(I=>({transitionProperty:I.transitionProperty,...C,...w})),h==="open"&&m({transitionProperty:Object.keys(P).map(n0).join(","),transitionDuration:d+"ms",...C,...P}),h==="close"){const I=S||w;m({transitionProperty:Object.keys(I).map(n0).join(","),transitionDuration:p+"ms",...C,...I})}},[p,x,v,y,T,d,h,c]),{isMounted:g,styles:f}}function JN(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,m=k.useRef(),g=k.useRef(""),h=k.useRef((n=f??a)!=null?n:-1),v=k.useRef(null),y=Pt(s),x=Pt(l),T=Ft(u),w=Ft(p);Be(()=>{r&&(clearTimeout(m.current),v.current=null,g.current="")},[r]),Be(()=>{if(r&&g.current===""){var _;h.current=(_=f??a)!=null?_:-1}},[r,f,a]);const S=Pt(_=>{_?o.current.typing||(o.current.typing=_,x(_)):o.current.typing&&(o.current.typing=_,x(_))}),C=Pt(_=>{function M(N,V,F){const z=T.current?T.current(V,F):V.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(F.toLocaleLowerCase()))===0);return z?N.indexOf(z):-1}const L=i.current;if(g.current.length>0&&g.current[0]!==" "&&(M(L,L,g.current)===-1?S(!1):_.key===" "&&Nt(_)),L==null||w.current.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(Nt(_),S(!0)),L.every(N=>{var V,F;return N?((V=N[0])==null?void 0:V.toLocaleLowerCase())!==((F=N[1])==null?void 0:F.toLocaleLowerCase()):!0})&&g.current===_.key&&(g.current="",h.current=v.current),g.current+=_.key,clearTimeout(m.current),m.current=setTimeout(()=>{g.current="",h.current=v.current,S(!1)},d);const A=h.current,O=M(L,[...L.slice((A||0)+1),...L.slice(0,(A||0)+1)],g.current);O!==-1?(y(O),v.current=O):_.key!==" "&&(g.current="",S(!1))}),P=k.useMemo(()=>({onKeyDown:C}),[C]),I=k.useMemo(()=>({onKeyDown:C,onKeyUp(_){_.key===" "&&S(!1)}}),[C,S]);return k.useMemo(()=>c?{reference:P,floating:I}:{},[c,P,I])}function o0(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let a=0,s=i-1;a<i;s=a++){const[l,c]=t[a]||[0,0],[u,d]=t[s]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function eF(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function i0(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();function c(d,p){const f=performance.now(),m=f-l;if(a===null||s===null||m===0)return a=d,s=p,l=f,null;const g=d-a,h=p-s,y=Math.sqrt(g*g+h*h)/m;return a=d,s=p,l=f,y}const u=d=>{let{x:p,y:f,placement:m,elements:g,onClose:h,nodeId:v,tree:y}=d;return function(T){function w(){clearTimeout(o),h()}if(clearTimeout(o),!g.domReference||!g.floating||m==null||p==null||f==null)return;const{clientX:S,clientY:C}=T,P=[S,C],I=On(T),_=T.type==="mouseleave",M=yt(g.floating,I),L=yt(g.domReference,I),$=g.domReference.getBoundingClientRect(),A=g.floating.getBoundingClientRect(),O=m.split("-")[0],N=p>A.right-A.width/2,V=f>A.bottom-A.height/2,F=eF(P,$),z=A.width>$.width,D=A.height>$.height,R=(z?$:A).left,J=(z?$:A).right,te=(D?$:A).top,ee=(D?$:A).bottom;if(M&&(i=!0,!_))return;if(L&&(i=!1),L&&!_){i=!0;return}if(_&&Je(T.relatedTarget)&&yt(g.floating,T.relatedTarget)||y&&Wr(y.nodesRef.current,v).some(Y=>{let{context:j}=Y;return j==null?void 0:j.open}))return;if(O==="top"&&f>=$.bottom-1||O==="bottom"&&f<=$.top+1||O==="left"&&p>=$.right-1||O==="right"&&p<=$.left+1)return w();let Z=[];switch(O){case"top":Z=[[R,$.top+1],[R,A.bottom-1],[J,A.bottom-1],[J,$.top+1]];break;case"bottom":Z=[[R,A.top+1],[R,$.bottom-1],[J,$.bottom-1],[J,A.top+1]];break;case"left":Z=[[A.right-1,ee],[A.right-1,te],[$.left+1,te],[$.left+1,ee]];break;case"right":Z=[[$.right-1,ee],[$.right-1,te],[A.left+1,te],[A.left+1,ee]];break}function U(Y){let[j,W]=Y;switch(O){case"top":{const G=[z?j+t/2:N?j+t*4:j-t*4,W+t+1],ae=[z?j-t/2:N?j+t*4:j-t*4,W+t+1],B=[[A.left,N||z?A.bottom-t:A.top],[A.right,N?z?A.bottom-t:A.top:A.bottom-t]];return[G,ae,...B]}case"bottom":{const G=[z?j+t/2:N?j+t*4:j-t*4,W-t],ae=[z?j-t/2:N?j+t*4:j-t*4,W-t],B=[[A.left,N||z?A.top+t:A.bottom],[A.right,N?z?A.top+t:A.bottom:A.top+t]];return[G,ae,...B]}case"left":{const G=[j+t+1,D?W+t/2:V?W+t*4:W-t*4],ae=[j+t+1,D?W-t/2:V?W+t*4:W-t*4];return[...[[V||D?A.right-t:A.left,A.top],[V?D?A.right-t:A.left:A.right-t,A.bottom]],G,ae]}case"right":{const G=[j-t,D?W+t/2:V?W+t*4:W-t*4],ae=[j-t,D?W-t/2:V?W+t*4:W-t*4],B=[[V||D?A.left+t:A.right,A.top],[V?D?A.left+t:A.right:A.left+t,A.bottom]];return[G,ae,...B]}}}if(!o0([S,C],Z)){if(i&&!F)return w();if(!_&&r){const Y=c(T.clientX,T.clientY);if(Y!==null&&Y<.1)return w()}o0([S,C],U([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const ti=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[ta(10),zd({fallbackAxisSideDirection:"end"}),Rd(),Tx({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=Gr({open:n,middleware:i,transform:!0,whileElementsMounted:ea,onOpenChange:(m,g)=>{var v;const h=g==null?void 0:g.relatedTarget;h&&h.dataset.floating==="true"&&!m||(r(m),(v=e.onChange)==null||v.call(e,m))}}),c=aa(l),u=Yr(l),d=Zr(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=Kr([c,u,d]);return b.jsxs(E.Fragment,{children:[b.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&b.jsx(qr,{preserveTabOrder:!0,id:`${t}-portal`,children:b.jsx(Jo,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:b.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-2xl",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[b.jsx(Ox,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),b.jsx("header",{className:"mb-2",children:b.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},tF=e=>{const t=E.useRef(null),n=E.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=E.useState(e.open??!1);E.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=Gr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=aa(s,{enabled:e.disabled??!0}),u=Zr(s,{role:"tooltip"}),d=Yr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=Kr([c,u,d]);return b.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[b.jsx(go,{...f(e),as:ft.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:b.jsx(ft.span,{layoutId:o,children:e.trigger})}),b.jsx(Jn,{children:i?b.jsx(qr,{root:t,children:b.jsx(Jo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:b.jsx(ft.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},a0=300,nF=500,s0=(e="")=>Le("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),Jd=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),l0=E.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o,floatingClassName:i="",label:a,...s},l)=>{const[c,u]=E.useState(r??!1),[d,p]=E.useState(!1),[f,m]=E.useState(null),g=E.useRef([]),h=E.useRef([]),v=E.useContext(Jd),y=ur(),x=dr(),T=PN(),w=Ax(),S=y!==null,{floatingStyles:C,refs:P,context:I}=Gr({nodeId:T,open:c,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:ea,placement:S?"right":"bottom-start",middleware:[ta({mainAxis:S?0:4,alignmentAxis:S?-4:0}),zd(),Rd()]}),_=Zr(I,{role:"menu"}),M=Yr(I,{bubbles:!0}),L=Lx(I,{move:!1,enabled:n,delay:{open:a0},handleClose:i0({blockPointerEvents:!0})}),$=aa(I,{event:"mousedown",toggle:!S,ignoreMouse:S,keyboardHandlers:!0}),A=Qd(I,{loop:!0,listRef:g,activeIndex:f,nested:S,onNavigate:m}),O=JN(I,{activeIndex:f,listRef:h,resetMs:nF,onMatch:c?m:void 0}),{getReferenceProps:N,getFloatingProps:V,getItemProps:F}=Kr([L,$,_,M,A,O]);E.useEffect(()=>{if(!x)return;function D(){u(!1)}function R(J){J.nodeId!==T&&J.parentId===y&&u(!1)}return x.events.on("click",D),x.events.on("menuopen",R),()=>{x.events.off("click",D),x.events.off("menuopen",R)}},[x,T,y]),E.useEffect(()=>{c&&x&&x.events.emit("menuopen",{parentId:y,nodeId:T})},[x,c,T,y]);const z=o?s.className:Le(s0(s.className));return b.jsxs(AN,{id:T,children:[b.jsx(E.Fragment,{children:s.asChild?b.jsx(Ro,{...N(v.getItemProps({...s,onFocus(D){var R;(R=s.onFocus)==null||R.call(s,D),p(!1),v.setHasFocusInside(!0)}})),children:a,ref:Bd([P.setReference,w.ref,l]),tabIndex:S?v.activeIndex===w.index?0:-1:void 0,"data-open":c?"":void 0,"data-nested":S?"":void 0,role:S?"menuitem":void 0,"data-focus-inside":d?"":void 0,className:z}):b.jsxs("button",{type:"button",className:z,"data-open":c?"":void 0,"data-nested":S?"":void 0,role:S?"menuitem":void 0,"data-focus-inside":d?"":void 0,ref:Bd([P.setReference,w.ref,l]),tabIndex:S?v.activeIndex===w.index?0:-1:void 0,...N(v.getItemProps({...s,onFocus(D){var R;(R=s.onFocus)==null||R.call(s,D),p(!1),v.setHasFocusInside(!0)}})),children:[a,S&&b.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[b.jsx("span",{className:"sr-only",children:"Next menu"}),b.jsx(zu,{size:14})]})]})}),b.jsx(Jd.Provider,{value:{activeIndex:f,setActiveIndex:m,getItemProps:F,setHasFocusInside:p,isOpen:c},children:b.jsx(TN,{elementsRef:g,labelsRef:h,children:c&&b.jsx(qr,{preserveTabOrder:!0,children:b.jsx(Jo,{context:I,modal:!1,initialFocus:S?-1:0,returnFocus:!S,children:b.jsx(t,{...V(),ref:P.setFloating,style:{...s.style,...C},className:Le("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",i),children:e})})})})})]})}),rF=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(Jd),s=Ax({label:n?null:e}),l=dr(),c=s.index===a.activeIndex;return b.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:Bd([s.ref,i]),className:s0(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),a.setHasFocusInside(!0)}}),children:[r,t?b.jsx(t,{size:16}):null]})}),oF=E.forwardRef((e,t)=>ur()!==null?b.jsx(l0,{...e,isParent:!1,ref:t}):b.jsx(_N,{children:b.jsx(l0,{...e,isParent:!0,ref:t})})),iF=(e,t)=>$r()?t:window.matchMedia(e).matches,aF=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(iF(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},c0=()=>window.matchMedia("@media (pointer: coarse)"),sF=()=>{var r;const e=E.useRef($r()?null:c0()),[t,n]=E.useState($r()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?c0():e.current).addEventListener("change",i=>n(i.matches))},[]),t},lF=e=>{const t=sF(),n=E.useRef($r()?"":document.documentElement.style.overflowY);E.useEffect(()=>{const r=document.documentElement;if(e){if(n.current=document.documentElement.style.overflowY,r.style.overflowY="hidden",t||mb())return;r.style.padding=Xh(r)?"0 15px 0 0":""}else r.style.padding="",document.documentElement.style.overflowY=n.current},[e,t]),E.useEffect(()=>{if(!e)return;const r=new AbortController,o=document.documentElement,i=a=>a.target===o&&e?a.preventDefault():void 0;return o.addEventListener("wheel",i,{signal:r.signal,passive:!1}),o.addEventListener("scroll",i,{signal:r.signal,passive:!1}),()=>{r.abort()}},[e])},vn="600ms",cF={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:vn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:vn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:vn}},uF={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:vn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:vn}},ef={drawer:e=>e==="left"?cF:uF,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:vn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:vn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:vn,originY:"bottom"}},dialog:{exit:{opacity:0,scale:.97,animationDuration:vn},initial:{opacity:0,scale:.95,animationDuration:vn},enter:{opacity:1,scale:[1.05,1],animationDuration:vn}}},dF=uo("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"}}),fF={top:0,left:0,right:0,bottom:-1},pF=e=>e*.62,hF=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x,p=Math.abs(u+d);return e.value.set(p)}const i=e.parent.current.getBoundingClientRect(),a=e.value.get()||i.height,s=Math.abs(a-r.delta.y),l=pF(window.outerHeight);return s<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(s)}};return b.jsx(ft.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:fF,whileDrag:{cursor:"grabbing"},className:Le("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?b.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Ws={drawer:"right",sheet:"none",dialog:"none"},mF=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ws.drawer:Ws[o]:t?Ws[o]:Ws.sheet},gF=({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,layoutId:a,onChange:s,className:l,resizer:c=!0,closable:u=!0,forceType:d=!1,overlayClassName:p="",type:f="dialog",position:m,overlayClickClose:g=!1,ariaTitle:h,...v})=>{lF(e);const y=E.useId(),x=E.useId(),T=aF("(min-width: 64rem)"),w=f!=="dialog",S=mF(T,d,f,m),C=T||d?ef[f]:ef.sheet,P=typeof C=="function"?C(S):C,I=T||d?f:"sheet",{refs:_,context:M}=Gr({open:e,onOpenChange:s}),L=aa(M),$=Zr(M,{role:"dialog"}),A=Yr(M,{escapeKey:!0,referencePress:!0,outsidePress:g}),{getReferenceProps:O,getFloatingProps:N}=Kr([L,$,A]),V=o,F=Io(void 0),z=()=>s(!1);return b.jsxs(E.Fragment,{children:[o?b.jsx(E.Fragment,{children:r?b.jsx(Ro,{ref:_.setReference,...O({layoutId:a}),children:V}):b.jsx(ft.button,{ref:_.setReference,...O(),layoutId:a,type:"button",children:V})}):null,b.jsx(qr,{children:b.jsx(Jn,{mode:"wait",presenceAffectsLayout:!0,children:e?b.jsx(BN,{lockScroll:!1,className:Le(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${I==="drawer"?"":"flex items-start justify-center p-10"}`,p),children:b.jsx(Jo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:M,children:b.jsxs(ft.div,{...v,exit:"exit",animate:"enter",initial:"initial",variants:P,"data-component":"modal",ref:_.setFloating,"aria-modal":e,layoutId:a,className:Le(dF({position:S,type:I}),l),style:I==="drawer"?{width:F}:{height:F},...t?{"aria-labelledby":y,"aria-describedby":x}:{"aria-label":h},...N(),children:[t?b.jsx("header",{className:"relative w-full",children:t?b.jsx("h2",{id:y,className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,b.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:i}),n?b.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:n}):null,u?b.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:b.jsx("button",{type:"button",onClick:z,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:b.jsx(os,{})})}):null,w&&c?b.jsx(hF,{onChange:s,parent:_.floating,position:S,sheet:I==="sheet",value:F}):null]})})}):null})})]})},vF=e=>b.jsx(ft.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),tf=E.forwardRef(function({as:t,title:n,children:r,placement:o,open:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,followCursor:u=!1,onChange:d=ld,...p},f){const[m,g]=E.useState(i??!1),h=E.useRef(null),v=t||"span",y=A=>{g(A),d==null||d(A)},{refs:x,floatingStyles:T,context:w}=Gr({open:m,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:ea,onOpenChange:i?void 0:y,middleware:[Rd(),ta(5),zd({fallbackAxisSideDirection:"start"}),Tx({padding:5,element:h})]}),S=Lx(w,{move:!0,delay:{open:a0},enabled:l?s:!1,handleClose:c?i0():null}),C=GN(w,{enabled:l?a:!1}),P=aa(w,{enabled:l?c:!1}),I=Yr(w,{enabled:l}),_=Zr(w,{role:"tooltip",enabled:l}),M=WN(w,{enabled:!!l&&!!u}),{getReferenceProps:L,getFloatingProps:$}=Kr([_,I,M,a?C:void 0,s?S:void 0,c?P:void 0]);return E.useEffect(()=>g(i===void 0?!1:i),[i]),b.jsxs(E.Fragment,{children:[b.jsx(v,{...L(p),ref:Fa(x.setReference,f),children:n}),m&&b.jsx(qr,{preserveTabOrder:!0,children:b.jsxs(on,{...$(),ref:x.setFloating,style:T,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[b.jsx(Ox,{ref:h,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})});class qs{static getDescendantProperty(t,n,r=[]){let o,i,a,s,l,c;if(n){if(a=n.indexOf("."),a===-1?o=n:(o=n.slice(0,a),i=n.slice(a+1)),s=t[o],s!==null&&typeof s<"u")if(!i&&(typeof s=="string"||typeof s=="number"))r.push(s);else if(Object.prototype.toString.call(s)==="[object Array]")for(l=0,c=s.length;l<c;l++)qs.getDescendantProperty(s[l],i,r);else i&&qs.getDescendantProperty(s,i,r)}else r.push(t);return r}}class Xr{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=Xr.isMatch(o,t,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const a=qs.getDescendantProperty(o,this.keys[i]);let s=!1;for(let l=0;l<a.length;l++){const c=Xr.isMatch(a[l],t,this.options.caseSensitive);if(c){s=!0,n.push({item:o,score:c});break}}if(s)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Xr.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 Xr.indexesOfFirstLetter(t,n).forEach((a,s)=>{let l=a+1;o[s]=[a];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[s]=!1;break}o[s].push(l),l++}}),o=o.filter(a=>a!==!1),o.length?o.sort((a,s)=>a.length===1?a[0]-s[0]:(a=a[a.length-1]-a[0],s=s[s.length-1]-s[0],a-s))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}const Us=0,pr=1,ni=2,u0=4;function d0(e){return()=>e}function yF(e){e()}function sa(e,t){return n=>e(t(n))}function f0(e,t){return()=>e(t)}function p0(e,t){return n=>e(t,n)}function nf(e){return e!==void 0}function bF(...e){return()=>{e.map(yF)}}function ri(){}function Ys(e,t){return t(e),e}function xF(e,t){return t(e)}function at(...e){return e}function Xe(e,t){return e(pr,t)}function Me(e,t){e(Us,t)}function rf(e){e(ni)}function Rt(e){return e(u0)}function be(e,t){return Xe(e,p0(t,Us))}function Dn(e,t){const n=e(pr,r=>{n(),t(r)});return n}function h0(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function m0(e,t){return e===t}function st(e=m0){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ce(e){return t=>n=>{e(n)&&t(n)}}function he(e){return t=>sa(t,e)}function Nn(e){return t=>()=>{t(e)}}function re(e,...t){const n=wF(...t);return(r,o)=>{switch(r){case ni:rf(e);return;case pr:return Xe(e,n(o))}}}function Fn(e,t){return n=>r=>{n(t=e(t,r))}}function oi(e){return t=>n=>{e>0?e--:t(n)}}function hr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Ne(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Xe(i,l=>{const c=n;n=n|s,t[a]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function wF(...e){return t=>e.reduceRight(xF,t)}function SF(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case pr:return i?n===i?void 0:(r(),n=i,t=Xe(e,i),t):(r(),ri);case ni:r(),n=null;return}}}function le(e){let t=e;const n=ze();return(r,o)=>{switch(r){case Us:t=o;break;case pr:{o(t);break}case u0:return t}return n(r,o)}}function zt(e,t){return Ys(le(t),n=>be(e,n))}function ze(){const e=[];return(t,n)=>{switch(t){case Us:e.slice().forEach(r=>{r(n)});return;case ni:e.splice(0,e.length);return;case pr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function en(e){return Ys(ze(),t=>be(e,t))}function Ue(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:TF(),singleton:n}}const TF=()=>Symbol();function EF(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function At(...e){const t=ze(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Xe(i,l=>{n[a]=l,r=r|s,r===o&&Me(t,n)})}),function(i,a){switch(i){case ni:{rf(t);return}case pr:return r===o&&a(n),Xe(t,a)}}}function Pe(e,t=m0){return re(e,st(t))}function g0(...e){return function(t,n){switch(t){case ni:return;case pr:return bF(...e.map(r=>Xe(r,n)))}}}var tn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(tn||{});const CF={0:"debug",3:"error",1:"log",2:"warn"},kF=()=>typeof globalThis>"u"?window:globalThis,mr=Ue(()=>{const e=le(3);return{log:le((t,n,r=1)=>{var o;const i=(o=kF().VIRTUOSO_LOG_LEVEL)!=null?o:Rt(e);r>=i&&console[CF[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Ln(e,t,n){return of(e,t,n).callbackRef}function of(e,t,n){const r=E.useRef(null);let o=i=>{};if(typeof ResizeObserver<"u"){const i=E.useMemo(()=>new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}),[e]);o=a=>{a&&t?(i.observe(a),r.current=a):(r.current&&i.unobserve(r.current),r.current=null)}}return{callbackRef:o,ref:r}}function v0(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=PF(u.children,t,s?"offsetWidth":"offsetHeight",o);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const f=p.lastElementChild.dataset.viewportType==="window";let m;f&&(m=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?m.scrollX||m.document.documentElement.scrollLeft:m.scrollY||m.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:f?s?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,v=a?s?a.offsetWidth:a.offsetHeight:f?s?m.innerWidth:m.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:v}),i==null||i(s?y0("column-gap",getComputedStyle(u).columnGap,o):y0("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return of(c,n,l)}function PF(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const s=e.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},tn.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function y0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}function af(e,t,n){const r=E.useRef(null),o=E.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,p;if(t){const f=t.getBoundingClientRect(),m=c.top-f.top;p=f.height-Math.max(0,m),d=m+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;p=f.innerHeight-Math.max(0,c.top),d=c.top+f.scrollY}r.current={offsetTop:d,visibleHeight:p,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=of(o,!0,n),s=E.useCallback(()=>{o(a.current)},[o,a]);return E.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c==null||c.addEventListener("scroll",s),c==null||c.addEventListener("resize",s),()=>{c==null||c.removeEventListener("scroll",s),c==null||c.removeEventListener("resize",s)}}},[s,t]),i}const Wt=Ue(()=>{const e=ze(),t=ze(),n=le(0),r=ze(),o=le(0),i=ze(),a=ze(),s=le(0),l=le(0),c=le(0),u=le(0),d=ze(),p=ze(),f=le(!1),m=le(!1),g=le(!1);return be(re(e,he(({scrollTop:h})=>h)),t),be(re(e,he(({scrollHeight:h})=>h)),a),be(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:m,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),la={lvl:0};function b0(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function tt(e){return e===la}function ca(e,t){if(!tt(e))return t===e.k?e.v:t<e.k?ca(e.l,t):ca(e.r,t)}function yn(e,t,n="k"){if(tt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=yn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return yn(e.l,t,n)}function nn(e,t,n){return tt(e)?S0(t,n,1):t===e.k?_t(e,{k:t,v:n}):t<e.k?T0(_t(e,{l:nn(e.l,t,n)})):T0(_t(e,{r:nn(e.r,t,n)}))}function ii(){return la}function Gs(e,t,n){if(tt(e))return[];const r=yn(e,t)[0];return AF(lf(e,r,n))}function sf(e,t){if(tt(e))return la;const{k:n,l:r,r:o}=e;if(t===n){if(tt(r))return o;if(tt(o))return r;{const[i,a]=w0(r);return Ks(_t(e,{k:i,l:x0(r),v:a}))}}else return t<n?Ks(_t(e,{l:sf(r,t)})):Ks(_t(e,{r:sf(o,t)}))}function Qr(e){return tt(e)?[]:[...Qr(e.l),{k:e.k,v:e.v},...Qr(e.r)]}function lf(e,t,n){if(tt(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(lf(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(lf(i,t,n))),s}function Ks(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(cf(t))return E0(_t(e,{lvl:n-1}));if(!tt(t)&&!tt(t.r))return _t(t.r,{l:_t(t,{r:t.r.l}),lvl:n,r:_t(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(cf(e))return uf(_t(e,{lvl:n-1}));if(!tt(r)&&!tt(r.l)){const o=r.l,i=cf(o)?r.lvl-1:r.lvl;return _t(o,{l:_t(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:uf(_t(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function _t(e,t){return S0(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 x0(e){return tt(e.r)?e.l:Ks(_t(e,{r:x0(e.r)}))}function cf(e){return tt(e)||e.lvl>e.r.lvl}function w0(e){return tt(e.r)?[e.k,e.v]:w0(e.r)}function S0(e,t,n,r=la,o=la){return{k:e,l:r,lvl:n,r:o,v:t}}function T0(e){return uf(E0(e))}function E0(e){const{l:t}=e;return!tt(t)&&t.lvl===e.lvl?_t(t,{r:_t(e,{l:t.r})}):e}function uf(e){const{lvl:t,r:n}=e;return!tt(n)&&!tt(n.r)&&n.lvl===t&&n.r.lvl===t?_t(n,{l:_t(e,{r:n.l}),lvl:t+1}):e}function AF(e){return b0(e,({k:t,v:n})=>({index:t,value:n}))}function C0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ua(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const df=Ue(()=>({recalcInProgress:le(!1)}),[],{singleton:!0});function k0(e,t,n){return e[Zs(e,t,n)]}function Zs(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),a=e[i],s=n(a,t);if(s===0)return i;if(s===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function _F(e,t,n,r){const o=Zs(e,t,r),i=Zs(e,n,r,o);return e.slice(o,i+1)}function bn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Xs(e){return!tt(e.groupOffsetTree)}function ff({index:e},t){return t===e?0:t<e?-1:1}function IF(){return{groupIndices:[],groupOffsetTree:ii(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:ii()}}function OF(e,t){let n=tt(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),tt(e)){e=nn(e,0,i);continue}const s=Gs(e,a-1,o+1);if(s.some(jF(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=sf(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=nn(e,o+1,p));c&&(e=nn(e,a,i))}return[e,n]}function MF(e){return typeof e.groupIndex<"u"}function DF({offset:e},t){return t===e?0:t<e?-1:1}function da(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=k0(t,e,ff),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function P0(e,t){if(!Xs(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function A0(e,t,n){if(MF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=P0(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function NF(e,t,n,r=0){return r>0&&(t=Math.max(t,k0(e,r,ff).offset)),b0(_F(e,t,n,DF),VF)}function FF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,tn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&tt(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((m,g)=>nn(nn(m,g,p),g+1,f),a)}else[a,s]=OF(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=pf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>nn(p,f,da(f,d,o)),ii()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function LF(e){return Qr(e).map(({k:t,v:n},r,o)=>{const i=o[r+1];return{endIndex:i?i.k-1:1/0,size:n,startIndex:t}})}function _0(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 pf(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Zs(o,t-1,ff),s=o[l].offset;const c=yn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===yn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Gs(n,t,1/0)){const d=c-i,p=d*a+s+d*r;o.push({index:c,offset:p,size:u}),i=c,s=p,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function VF(e){return{index:e.index,value:e}}function jF(e){const{endIndex:t,size:n,startIndex:r}=e;return o=>o.start===r&&(o.end===t||o.end===1/0)&&o.value===n}const $F={offsetHeight:"height",offsetWidth:"width"},Vn=Ue(([{log:e},{recalcInProgress:t}])=>{const n=ze(),r=ze(),o=zt(r,0),i=ze(),a=ze(),s=le(0),l=le([]),c=le(void 0),u=le(void 0),d=le((w,S)=>bn(w,$F[S])),p=le(void 0),f=le(0),m=IF(),g=zt(re(n,Ne(l,e,f),Fn(FF,m),st()),m),h=zt(re(l,st(),Fn((w,S)=>({current:S,prev:w.current}),{current:[],prev:[]}),he(({prev:w})=>w)),[]);be(re(l,Ce(w=>w.length>0),Ne(g,f),he(([w,S,C])=>{const P=w.reduce((I,_,M)=>nn(I,_,da(_,S.offsetTree,C)||M),ii());return{...S,groupIndices:w,groupOffsetTree:P}})),g),be(re(r,Ne(g),Ce(([w,{lastIndex:S}])=>w<S),he(([w,{lastIndex:S,lastSize:C}])=>[{endIndex:S,size:C,startIndex:w}])),n),be(c,u);const v=zt(re(c,he(w=>w===void 0)),!0);be(re(u,Ce(w=>w!==void 0&&tt(Rt(g).sizeTree)),he(w=>[{endIndex:0,size:w,startIndex:0}])),n);const y=en(re(n,Ne(g),Fn(({sizes:w},[S,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:m}),he(w=>w.changed)));Xe(re(s,Fn((w,S)=>({diff:w.prev-S,prev:S}),{diff:0,prev:0}),he(w=>w.diff)),w=>{const{groupIndices:S}=Rt(g);if(w>0)Me(t,!0),Me(i,w+_0(w,S));else if(w<0){const C=Rt(h);C.length>0&&(w-=_0(-w,C)),Me(a,w)}}),Xe(re(s,Ne(e)),([w,S])=>{w<0&&S("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},tn.ERROR)});const x=en(i);be(re(i,Ne(g),he(([w,S])=>{const C=S.groupIndices.length>0,P=[],I=S.lastSize;if(C){const _=ca(S.sizeTree,0);let M=0,L=0;for(;M<w;){const A=S.groupIndices[L],O=S.groupIndices.length===L+1?1/0:S.groupIndices[L+1]-A-1;P.push({endIndex:A,size:_,startIndex:A}),P.push({endIndex:A+1+O-1,size:I,startIndex:A+1}),L++,M+=O+1}const $=Qr(S.sizeTree);return M!==w&&$.shift(),$.reduce((A,{k:O,v:N})=>{let V=A.ranges;return A.prevSize!==0&&(V=[...A.ranges,{endIndex:O+w-1,size:A.prevSize,startIndex:A.prevIndex}]),{prevIndex:O+w,prevSize:N,ranges:V}},{prevIndex:w,prevSize:0,ranges:P}).ranges}return Qr(S.sizeTree).reduce((_,{k:M,v:L})=>({prevIndex:M+w,prevSize:L,ranges:[..._.ranges,{endIndex:M+w-1,size:_.prevSize,startIndex:_.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const T=en(re(a,Ne(g,f),he(([w,{offsetTree:S},C])=>{const P=-w;return da(P,S,C)})));return be(re(a,Ne(g,f),he(([w,S,C])=>{if(S.groupIndices.length>0){if(tt(S.sizeTree))return S;let P=ii();const I=Rt(h);let _=0,M=0,L=0;for(;_<-w;){L=I[M];const $=I[M+1]-L-1;M++,_+=$+1}if(P=Qr(S.sizeTree).reduce(($,{k:A,v:O})=>nn($,Math.max(0,A+w),O),P),_!==-w){const $=ca(S.sizeTree,L);P=nn(P,0,$);const A=yn(S.sizeTree,-w+1)[1];P=nn(P,1,A)}return{...S,sizeTree:P,...pf(S.offsetTree,0,P,C)}}else{const P=Qr(S.sizeTree).reduce((I,{k:_,v:M})=>nn(I,Math.max(0,_+w),M),ii());return{...S,sizeTree:P,...pf(S.offsetTree,0,P,C)}}})),g),{beforeUnshiftWith:x,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:y,shiftWith:a,shiftWithOffset:T,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}},at(mr,df),{singleton:!0});function RF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const I0=Ue(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=ze(),a=ze(),s=en(re(i,he(RF)));return be(re(s,he(l=>l.totalCount)),n),be(re(s,he(l=>l.groupIndices)),e),be(re(At(o,t,r),Ce(([l,c])=>Xs(c)),he(([l,c,u])=>yn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),st(),he(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},at(Vn,Wt)),gr=Ue(([{log:e}])=>{const t=le(!1),n=en(re(t,Ce(r=>r),st()));return Xe(t,r=>{r&&Rt(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},at(mr),{singleton:!0}),zF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function O0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!zF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const fa=Ue(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=ze(),m=ze(),g=le(0);let h=null,v=null,y=null;function x(){h&&(h(),h=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),Me(l,!1)}return be(re(f,Ne(n,d,r,g,s,a,p),Ne(e,i,o),he(([[T,w,S,C,P,I,_,M],L,$,A])=>{const O=O0(T),{align:N,behavior:V,offset:F}=O,z=C-1,D=A0(O,w,z);let R=da(D,w.offsetTree,L)+I;N==="end"?(R+=$+yn(w.sizeTree,D)[1]-S+A,D===z&&(R+=_)):N==="center"?R+=($+yn(w.sizeTree,D)[1]-S+A)/2:R-=P,F&&(R+=F);const J=te=>{x(),te?(M("retrying to scroll to",{location:T},tn.DEBUG),Me(f,T)):(Me(m,!0),M("list did not change, scroll successful",{},tn.DEBUG))};if(x(),V==="smooth"){let te=!1;y=Xe(t,ee=>{te=te||ee}),h=Dn(u,()=>{J(te)})}else h=Dn(re(t,BF(150)),J);return v=setTimeout(()=>{x()},1200),Me(l,!0),M("scrolling from index to",{behavior:V,index:D,top:R},tn.DEBUG),{behavior:V,top:R}})),c),{scrollTargetReached:m,scrollToIndex:f,topListHeight:g}},at(Vn,Wt,mr),{singleton:!0});function BF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function hf(e,t){e==0?t():requestAnimationFrame(()=>{hf(e-1,t)})}function mf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const pa=Ue(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=le(!0),l=le(0),c=le(!0);return be(re(a,Ne(l),Ce(([u,d])=>!!d),Nn(!1)),s),be(re(a,Ne(l),Ce(([u,d])=>!!d),Nn(!1)),c),Xe(re(At(t,a),Ne(s,n,e,c),Ce(([[,u],d,{sizeTree:p},f,m])=>u&&(!tt(p)||nf(f))&&!d&&!m),Ne(l)),([,u])=>{Dn(o,()=>{Me(c,!0)}),hf(4,()=>{Dn(r,()=>{Me(s,!0)}),Me(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},at(Vn,Wt,fa,gr),{singleton:!0});function M0(e,t){return Math.abs(e-t)<1.01}const ha="up",ma="down",HF="none",WF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},qF=0,ga=Ue(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=le(!1),s=le(!0),l=ze(),c=ze(),u=le(4),d=le(qF),p=zt(re(g0(re(Pe(o),oi(1),Nn(!0)),re(Pe(o),oi(1),Nn(!1),h0(100))),st()),!1),f=zt(re(g0(re(n,Nn(!0)),re(n,Nn(!1),h0(200))),st()),!1);be(re(At(Pe(o),Pe(d)),he(([y,x])=>y<=x),st()),s),be(re(s,hr(50)),c);const m=en(re(At(r,Pe(i),Pe(t),Pe(e),Pe(u)),Fn((y,[{scrollHeight:x,scrollTop:T},w,S,C,P])=>{const I=T+w-x>-P,_={scrollHeight:x,scrollTop:T,viewportHeight:w};if(I){let L,$;return T>y.state.scrollTop?(L="SCROLLED_DOWN",$=y.state.scrollTop-T):(L="SIZE_DECREASED",$=y.state.scrollTop-T||y.scrollTopDelta),{atBottom:!0,atBottomBecause:L,scrollTopDelta:$,state:_}}let M;return _.scrollHeight>y.state.scrollHeight?M="SIZE_INCREASED":w<y.state.viewportHeight?M="VIEWPORT_HEIGHT_DECREASING":T<y.state.scrollTop?M="SCROLLING_UPWARDS":M="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:M,state:_}},WF),st((y,x)=>y&&y.atBottom===x.atBottom))),g=zt(re(r,Fn((y,{scrollHeight:x,scrollTop:T,viewportHeight:w})=>{if(M0(y.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:T};{const S=x-(T+w)<1;return y.scrollTop!==T&&S?{changed:!0,jump:y.scrollTop-T,scrollHeight:x,scrollTop:T}:{changed:!0,jump:0,scrollHeight:x,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ce(y=>y.changed),he(y=>y.jump)),0);be(re(m,he(y=>y.atBottom)),a),be(re(a,hr(50)),l);const h=le(ma);be(re(r,he(({scrollTop:y})=>y),st(),Fn((y,x)=>Rt(f)?{direction:y.direction,prevScrollTop:x}:{direction:x<y.prevScrollTop?ha:ma,prevScrollTop:x},{direction:ma,prevScrollTop:0}),he(y=>y.direction)),h),be(re(r,hr(50),Nn(HF)),h);const v=le(0);return be(re(p,Ce(y=>!y),Nn(0)),v),be(re(o,hr(100),Ne(p),Ce(([y,x])=>!!x),Fn(([y,x],[T])=>[x,T],[0,0]),he(([y,x])=>x-y)),v),{atBottomState:m,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:v}},at(Wt)),Qs="top",Js="bottom",D0="none";function N0(e,t,n){return typeof e=="number"?n===ha&&t===Qs||n===ma&&t===Js?e:0:n===ha?t===Qs?e.main:e.reverse:t===Js?e.main:e.reverse}function F0(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const gf=Ue(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=ze(),a=le(0),s=le(0),l=le(0),c=zt(re(At(Pe(r),Pe(o),Pe(n),Pe(i,ua),Pe(l),Pe(a),Pe(t),Pe(e),Pe(s)),he(([u,d,p,[f,m],g,h,v,y,x])=>{const T=u-y,w=h+v,S=Math.max(p-T,0);let C=D0;const P=F0(x,Qs),I=F0(x,Js);return f-=y,f+=p+v,m+=p+v,m-=y,f>u+w-P&&(C=ha),m<u-S+d+I&&(C=ma),C!==D0?[Math.max(T-p-N0(g,Qs,C)-P,0),T-S-v+d+N0(g,Js,C)+I]:null}),Ce(u=>u!=null),st(ua)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},at(Wt),{singleton:!0});function UF(e,t,n){if(Xs(t)){const r=P0(e,t);return[{index:yn(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:r,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:e,offset:0,size:0}]}const vf={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function el(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-a,p=s+d*l+(d-1)*r,f=c,m=p-u;return{bottom:u,firstItemIndex:i,items:V0(e,o,i),offsetBottom:m,offsetTop:c,top:f,topItems:V0(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function L0(e,t,n,r,o,i){let a=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-a>=e)break;a++}const s=e+a,l=mf(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return el(c,[],s,o,n,r)}function V0(e,t,n){if(e.length===0)return[];if(!Xs(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],a=Gs(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}const Jr=Ue(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:m}])=>{const g=le([]),h=le(0),v=ze();be(i.topItemsIndexes,g);const y=zt(re(At(f,m,Pe(l,ua),Pe(o),Pe(r),Pe(c),u,Pe(g),Pe(t),Pe(n),e),Ce(([S,C,,P,,,,,,,I])=>{const _=I&&I.length!==P;return S&&!C&&!_}),he(([,,[S,C],P,I,_,M,L,$,A,O])=>{const N=I,{offsetTree:V,sizeTree:F}=N,z=Rt(h);if(P===0)return{...vf,totalCount:P};if(S===0&&C===0)return z===0?{...vf,totalCount:P}:L0(z,_,I,$,A,O||[]);if(tt(F))return z>0?null:el(UF(mf(_,P),N,O),[],P,A,N,$);const D=[];if(L.length>0){const Z=L[0],U=L[L.length-1];let Y=0;for(const j of Gs(F,Z,U)){const W=j.value,G=Math.max(j.start,Z),ae=Math.min(j.end,U);for(let B=G;B<=ae;B++)D.push({data:O==null?void 0:O[B],index:B,offset:Y,size:W}),Y+=W}}if(!M)return el([],D,P,A,N,$);const R=L.length>0?L[L.length-1]+1:0,J=NF(V,S,C,R);if(J.length===0)return null;const te=P-1,ee=Ys([],Z=>{for(const U of J){const Y=U.value;let j=Y.offset,W=U.start;const G=Y.size;if(Y.offset<S){W+=Math.floor((S-Y.offset+A)/(G+A));const B=W-U.start;j+=B*G+B*A}W<R&&(j+=(R-W)*G,W=R);const ae=Math.min(U.end,te);for(let B=W;B<=ae&&!(j>=C);B++)Z.push({data:O==null?void 0:O[B],index:B,offset:j,size:G}),j+=G+A}});return el(ee,D,P,A,N,$)}),Ce(S=>S!==null),st()),vf);be(re(e,Ce(nf),he(S=>S==null?void 0:S.length)),o),be(re(y,he(S=>S.topListHeight)),d),be(d,s),be(re(y,he(S=>[S.top,S.bottom])),a),be(re(y,he(S=>S.items)),v);const x=en(re(y,Ce(({items:S})=>S.length>0),Ne(o,e),Ce(([{items:S},C])=>S[S.length-1].originalIndex===C-1),he(([,S,C])=>[S-1,C]),st(ua),he(([S])=>S))),T=en(re(y,hr(200),Ce(({items:S,topItems:C})=>S.length>0&&S[0].originalIndex===C.length),he(({items:S})=>S[0].index),st())),w=en(re(y,Ce(({items:S})=>S.length>0),he(({items:S})=>{let C=0,P=S.length-1;for(;S[C].type==="group"&&C<P;)C++;for(;S[P].type==="group"&&P>C;)P--;return{endIndex:S[P].index,startIndex:S[C].index}}),st(C0)));return{endReached:x,initialItemCount:h,itemsRendered:v,listState:y,rangeChanged:w,startReached:T,topItemsIndexes:g,...p}},at(Vn,I0,gf,pa,fa,ga,gr,df),{singleton:!0}),j0=Ue(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=ze(),a=zt(re(At(n,e,r,t,o),he(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return be(Pe(a),i),{totalListHeight:a,totalListHeightChanged:i}},at(Wt,Jr),{singleton:!0}),YF=Ue(([{viewportHeight:e},{totalListHeight:t}])=>{const n=le(!1),r=zt(re(At(n,e,t),Ce(([o])=>o),he(([,o,i])=>Math.max(0,o-i)),hr(0),st()),0);return{alignToBottom:n,paddingTopAddition:r}},at(Wt,j0),{singleton:!0});function $0(e){return e?e==="smooth"?"smooth":"auto":!1}const GF=(e,t)=>typeof e=="function"?$0(e(t)):t&&$0(e),KF=Ue(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=le(!1),d=ze();let p=null;function f(g){Me(o,{align:"end",behavior:g,index:"LAST"})}Xe(re(At(re(Pe(t),oi(1)),a),Ne(Pe(u),r,i,c),he(([[g,h],v,y,x,T])=>{let w=h&&x,S="auto";return w&&(S=GF(v,y||T),w=w&&!!S),{followOutputBehavior:S,shouldFollow:w,totalCount:g}}),Ce(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:h})=>{p&&(p(),p=null),p=Dn(e,()=>{Rt(l)("following output to ",{totalCount:h},tn.DEBUG),f(g),p=null})});function m(g){const h=Dn(n,v=>{g&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Rt(l)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(h,100)}return Xe(re(At(Pe(u),t,s),Ce(([g,,h])=>g&&h),Fn(({value:g},[,h])=>({refreshed:g===h,value:h}),{refreshed:!1,value:0}),Ce(({refreshed:g})=>g),Ne(u,t)),([,g])=>{Rt(i)&&m(g!==!1)}),Xe(d,()=>{m(Rt(u)!==!1)}),Xe(At(Pe(u),n),([g,h])=>{g&&!h.atBottom&&h.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},at(Vn,ga,fa,pa,gr,mr,Wt)),ZF=Ue(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(be(re(s,Ne(i),Ce(([,l])=>l!==0),Ne(o,r,t,n,e),he(([[,l],c,u,d,p,f=[]])=>L0(l,c,u,d,p,f))),a),{}),at(Vn,pa,Jr,gr),{singleton:!0}),XF=Ue(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=le(0);return Xe(re(e,Ne(r),Ce(([,o])=>o!==0),he(([,o])=>({top:o}))),o=>{Dn(re(n,oi(1),Ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Me(t,o)})})}),{initialScrollTop:r}},at(gr,Wt,Jr),{singleton:!0}),QF=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:a})=>t<a?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,JF=Ue(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=ze();return be(re(u,Ne(t,l,n,i,o,r,s),Ne(e),he(([[d,p,f,m,g,h,v,y],x])=>{const{align:T,behavior:w,calculateViewLocation:S=QF,done:C,...P}=d,I=A0(d,p,m-1),_=da(I,p.offsetTree,x)+g+h,M=_+yn(p.sizeTree,I)[1],L=y+h,$=y+f-v,A=S({itemBottom:M,itemTop:_,locationParams:{align:T,behavior:w,...P},viewportBottom:$,viewportTop:L});return A?C&&Dn(re(a,Ce(O=>!O),oi(Rt(a)?1:2)),C):C&&C(),A}),Ce(d=>d!==null)),c),{scrollIntoView:u}},at(Vn,Wt,fa,Jr,mr),{singleton:!0}),R0=Ue(([{scrollVelocity:e}])=>{const t=le(!1),n=ze(),r=le(!1);return be(re(e,Ne(r,t,n),Ce(([o,i])=>!!i),he(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),st()),t),Xe(re(At(t,e,n),Ne(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},at(ga),{singleton:!0}),yf=Ue(([{scrollContainerState:e,scrollTo:t}])=>{const n=ze(),r=ze(),o=ze(),i=le(!1),a=le(void 0);return be(re(At(n,r),he(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),be(re(t,Ne(r),he(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},at(Wt)),eL=Ue(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=ze(),u=le(void 0),d=le(null),p=le(null);return be(s,d),be(l,p),Xe(re(c,Ne(t,r,a,d,p,n)),([f,m,g,h,v,y,x])=>{const T=LF(m.sizeTree);h&&v!==null&&y!==null&&(g=v.scrollTop-y.offsetTop),g-=x,f({ranges:T,scrollTop:g})}),be(re(u,Ce(nf),he(tL)),o),be(re(i,Ne(u),Ce(([,f])=>f!==void 0),st(),he(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},at(Vn,Wt,pa,gr,yf));function tL(e){return{align:"start",index:0,offset:e.scrollTop}}const nL=Ue(([{topItemsIndexes:e}])=>{const t=le(0);return be(re(t,Ce(n=>n>=0),he(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},at(Jr));function z0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const rL=z0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),oL=Ue(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:m}])=>{const g=en(re(l,Ne(a),Fn(([,v,y,x],[{bottom:T,items:w,offsetBottom:S,totalCount:C},P])=>{const I=T+S;let _=0;return y===C&&v.length>0&&w.length>0&&(w[0].originalIndex===0&&v[0].originalIndex===0||(_=I-x,_!==0&&(_+=P))),[_,w,C,I]},[0,[],0,0]),Ce(([v])=>v!==0),Ne(r,s,n,o,f,m),Ce(([,v,y,x,,,T])=>!T&&!x&&v!==0&&y===ha),he(([[v],,,,,y])=>(y("Upward scrolling compensation",{amount:v},tn.DEBUG),v))));function h(v){v>0?(Me(t,{behavior:"auto",top:-v}),Me(e,0)):(Me(e,0),Me(t,{behavior:"auto",top:-v}))}return Xe(re(g,Ne(e,i)),([v,y,x])=>{x&&rL()?Me(e,y-v):h(-v)}),Xe(re(At(zt(i,!1),e,m),Ce(([v,y,x])=>!v&&!x&&y!==0),he(([v,y])=>y),hr(1)),h),be(re(d,he(v=>({top:-v}))),t),Xe(re(c,Ne(p,u),he(([v,{groupIndices:y,lastSize:x,sizeTree:T},w])=>{function S(C){return C*(x+w)}if(y.length===0)return S(v);{let C=0;const P=ca(T,0);let I=0,_=0;for(;I<v;){I++,C+=P;let M=y.length===_+1?1/0:y[_+1]-y[_]-1;I+M>v&&(C-=P,M=v-I+1),I+=M,C+=S(M),_++}return C}})),v=>{Me(e,v),requestAnimationFrame(()=>{Me(t,{top:v}),requestAnimationFrame(()=>{Me(e,0),Me(m,!1)})})}),{deviation:e}},at(Wt,ga,Jr,Vn,mr,df)),iL=Ue(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),at(gf,ZF,gr,R0,j0,XF,YF,yf,JF,mr)),B0=Ue(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m},g,h,v,{listState:y,topItemsIndexes:x,...T},{scrollToIndex:w},S,{topItemCount:C},{groupCounts:P},I])=>(be(T.rangeChanged,I.scrollSeekRangeChanged),be(re(I.windowViewportRect,he(_=>_.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:P,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m,sizeRanges:s,topItemCount:C,topItemsIndexes:x,totalCount:u,...v,groupIndices:i,itemSize:a,listState:y,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...T,...I,...g,sizes:l,...h}),at(Vn,pa,Wt,eL,KF,Jr,fa,oL,nL,I0,iL));function aL(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const a in t)Object.hasOwn(r,a)||(n[a]=t[a]);return n}const tl=typeof document<"u"?E.useLayoutEffect:E.useEffect;function bf(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=E.createContext({});function l(h,v){h.propsReady&&Me(h.propsReady,!1);for(const y of r){const x=h[t.required[y]];Me(x,v[y])}for(const y of o)if(y in v){const x=h[t.optional[y]];Me(x,v[y])}h.propsReady&&Me(h.propsReady,!0)}function c(h){return i.reduce((v,y)=>(v[y]=x=>{const T=h[t.methods[y]];Me(T,x)},v),{})}function u(h){return a.reduce((v,y)=>(v[y]=SF(h[t.events[y]]),v),{})}const d=E.forwardRef((h,v)=>{const{children:y,...x}=h,[T]=E.useState(()=>Ys(EF(e),C=>{l(C,x)})),[w]=E.useState(f0(u,T));tl(()=>{for(const C of a)C in x&&Xe(w[C],x[C]);return()=>{Object.values(w).map(rf)}},[x,w,T]),tl(()=>{l(T,x)}),E.useImperativeHandle(v,d0(c(T)));const S=n;return b.jsx(s.Provider,{value:T,children:n?b.jsx(S,{...aL([...r,...o,...a],x),children:y}):y})}),p=h=>E.useCallback(p0(Me,E.useContext(s)[h]),[h]),f=h=>{const v=E.useContext(s)[h],y=E.useCallback(x=>Xe(v,x),[v]);return E.useSyncExternalStore(y,()=>Rt(v),()=>Rt(v))},m=h=>{const v=E.useContext(s)[h],[y,x]=E.useState(f0(Rt,v));return tl(()=>Xe(v,T=>{T!==y&&x(d0(T))}),[v,y]),y},g=E.version.startsWith("18")?f:m;return{Component:d,useEmitter:(h,v)=>{const y=E.useContext(s)[h];tl(()=>Xe(y,v),[v,y])},useEmitterValue:g,usePublisher:p}}const nl=E.createContext(void 0),H0=E.createContext(void 0),W0=typeof document<"u"?E.useLayoutEffect:E.useEffect;function xf(e){return"self"in e}function sL(e){return"body"in e}function q0(e,t,n,r=ri,o,i){const a=E.useRef(null),s=E.useRef(null),l=E.useRef(null),c=E.useCallback(p=>{let f,m,g;const h=p.target;if(sL(h)||xf(h)){const y=xf(h)?h:h.defaultView;g=i?y.scrollX:y.scrollY,f=i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight,m=i?y.innerWidth:y.innerHeight}else g=i?h.scrollLeft:h.scrollTop,f=i?h.scrollWidth:h.scrollHeight,m=i?h.offsetWidth:h.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:m})};p.suppressFlushSync?v():wi.flushSync(v),s.current!==null&&(g===s.current||g<=0||g===f-m)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);E.useEffect(()=>{const p=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",c,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(p){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const m=p.behavior==="smooth";let g,h,v;xf(f)?(h=Math.max(bn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,v=i?window.scrollX:window.scrollY):(h=f[i?"scrollWidth":"scrollHeight"],g=bn(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const y=h-g;if(p.top=Math.ceil(Math.max(Math.min(y,p.top),0)),M0(g,h)||p.top===v){e({scrollHeight:h,scrollTop:v,viewportHeight:g}),m&&t(!0);return}m?(s.current=p.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),f.scrollTo(p)}function d(p){i&&(p={behavior:p.behavior,left:p.top}),a.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const wf="-webkit-sticky",U0="sticky",Y0=z0(()=>{if(typeof document>"u")return U0;const e=document.createElement("div");return e.style.position=wf,e.style.position===wf?wf:U0});function Sf(e){return e}const lL=Ue(()=>{const e=le(l=>`Item ${l}`),t=le(null),n=le(l=>`Group ${l}`),r=le({}),o=le(Sf),i=le("div"),a=le(ri),s=(l,c=null)=>zt(re(r,he(u=>u[l]),st()),c);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),cL=Ue(([e,t])=>({...e,...t}),at(B0,lL)),uL=({height:e})=>b.jsx("div",{style:{height:e}}),dL={overflowAnchor:"none",position:Y0(),zIndex:1},G0={overflowAnchor:"none"},fL={...G0,display:"inline-block",height:"100%"},K0=E.memo(function({showTopList:e=!1}){const t=Ae("listState"),n=un("sizeRanges"),r=Ae("useWindowScroll"),o=Ae("customScrollParent"),i=un("windowScrollContainerState"),a=un("scrollContainerState"),s=o||r?i:a,l=Ae("itemContent"),c=Ae("context"),u=Ae("groupContent"),d=Ae("trackItemSizes"),p=Ae("itemSize"),f=Ae("log"),m=un("gap"),g=Ae("horizontalDirection"),{callbackRef:h}=v0(n,p,d,e?ri:s,f,m,o,g,Ae("skipAnimationFrameInResizeObserver")),[v,y]=E.useState(0);Cf("deviation",A=>{v!==A&&y(A)});const x=Ae("EmptyPlaceholder"),T=Ae("ScrollSeekPlaceholder")||uL,w=Ae("ListComponent"),S=Ae("ItemComponent"),C=Ae("GroupComponent"),P=Ae("computeItemKey"),I=Ae("isSeeking"),_=Ae("groupIndices").length>0,M=Ae("alignToBottom"),L=Ae("initialItemFinalLocationReached"),$=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:M?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:M?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...L?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?b.jsx(x,{...lt(x,c)}):b.jsx(w,{...lt(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:$,children:(e?t.topItems:t.items).map(A=>{const O=A.originalIndex,N=P(O+t.firstItemIndex,A.data,c);return I?E.createElement(T,{...lt(T,c),height:A.size,index:A.index,key:N,type:A.type||"item",...A.type==="group"?{}:{groupIndex:A.groupIndex}}):A.type==="group"?E.createElement(C,{...lt(C,c),"data-index":O,"data-item-index":A.index,"data-known-size":A.size,key:N,style:dL},u(A.index,c)):E.createElement(S,{...lt(S,c),...Z0(S,A.data),"data-index":O,"data-item-group-index":A.groupIndex,"data-item-index":A.index,"data-known-size":A.size,key:N,style:g?fL:G0},_?l(A.index,A.groupIndex,A.data,c):l(A.index,A.data,c))})})}),pL={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},hL={outline:"none",overflowX:"auto",position:"relative"},ai=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),mL={position:Y0(),top:0,width:"100%",zIndex:1};function lt(e,t){if(typeof e!="string")return{context:t}}function Z0(e,t){return{item:typeof e=="string"?void 0:t}}const gL=E.memo(function(){const e=Ae("HeaderComponent"),t=un("headerHeight"),n=Ae("HeaderFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...lt(e,o)})}):null}),vL=E.memo(function(){const e=Ae("FooterComponent"),t=un("footerHeight"),n=Ae("HeaderFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...lt(e,o)})}):null});function Tf({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:m}=q0(a,l,s,c,void 0,d);return e("scrollTo",m),e("scrollBy",p),b.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?hL:pL,...o},tabIndex:0,...i,...lt(s,u),children:r})})}function Ef({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),p=t("context"),f=E.useRef(null),m=t("scrollerRef"),{scrollByCallback:g,scrollerRef:h,scrollToCallback:v}=q0(a,l,s,m,d);return W0(()=>{var y;return h.current=d||((y=f.current)==null?void 0:y.ownerDocument.defaultView),()=>{h.current=null}},[h,d]),e("windowScrollTo",v),e("scrollBy",g),b.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...lt(s,p),children:r})})}const yL=({children:e})=>{const t=E.useContext(nl),n=un("viewportHeight"),r=un("fixedItemHeight"),o=Ae("alignToBottom"),i=Ae("horizontalDirection"),a=E.useMemo(()=>sa(n,l=>bn(l,i?"width":"height")),[n,i]),s=Ln(a,!0,Ae("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.jsx("div",{"data-viewport-type":"element",ref:s,style:ai(o),children:e})},bL=({children:e})=>{const t=E.useContext(nl),n=un("windowViewportRect"),r=un("fixedItemHeight"),o=Ae("customScrollParent"),i=af(n,o,Ae("skipAnimationFrameInResizeObserver")),a=Ae("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.jsx("div",{"data-viewport-type":"window",ref:i,style:ai(a),children:e})},xL=({children:e})=>{const t=Ae("TopItemListComponent")||"div",n=Ae("headerHeight"),r={...mL,marginTop:`${n}px`},o=Ae("context");return b.jsx(t,{style:r,...lt(t,o),children:e})},wL=E.memo(function(e){const t=Ae("useWindowScroll"),n=Ae("topItemsIndexes").length>0,r=Ae("customScrollParent"),o=Ae("context"),i=r||t?EL:TL,a=r||t?bL:yL;return b.jsxs(i,{...e,...lt(i,o),children:[n&&b.jsx(xL,{children:b.jsx(K0,{showTopList:!0})}),b.jsxs(a,{children:[b.jsx(gL,{}),b.jsx(K0,{}),b.jsx(vL,{})]})]})}),{Component:SL,useEmitter:Cf,useEmitterValue:Ae,usePublisher:un}=bf(cL,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{autoscrollToBottom:"autoscrollToBottom",getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupContent:"groupContent",groupCounts:"groupCounts",headerFooterTag:"HeaderFooterTag",horizontalDirection:"horizontalDirection",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},wL),TL=Tf({useEmitter:Cf,useEmitterValue:Ae,usePublisher:un}),EL=Ef({useEmitter:Cf,useEmitterValue:Ae,usePublisher:un}),kf=SL,CL=Ue(()=>{const e=le(l=>b.jsxs("td",{children:["Item $",l]})),t=le(null),n=le(null),r=le(null),o=le({}),i=le(Sf),a=le(ri),s=(l,c=null)=>zt(re(o,he(u=>u[l]),st()),c);return{components:o,computeItemKey:i,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),kL=Ue(([e,t])=>({...e,...t}),at(B0,CL)),PL=({height:e})=>b.jsx("tr",{children:b.jsx("td",{style:{height:e}})}),AL=({height:e})=>b.jsx("tr",{children:b.jsx("td",{style:{border:0,height:e,padding:0}})}),_L={overflowAnchor:"none"},X0=E.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=Fe("computeItemKey"),r=Fe("firstItemIndex"),o=Fe("isSeeking"),i=Fe("ScrollSeekPlaceholder")||PL,a=Fe("context"),s=Fe("TableRowComponent"),l=Fe("fixedHeaderHeight"),c=Fe("itemContent"),u=(e?t.topItems:[]).reduce((p,f,m)=>(m===0?p.push(f.size):p.push(p[m-1]+f.size),p),[]),d=(e?t.topItems:t.items).map(p=>{const f=p.originalIndex,m=n(f+r,p.data,a),g=e?f===0?0:u[f-1]:0;return o?E.createElement(i,{...lt(i,a),height:p.size,index:p.index,key:m,type:p.type||"item"}):E.createElement(s,{...lt(s,a),...Z0(s,p.data),"data-index":f,"data-item-index":p.index,"data-known-size":p.size,key:m,style:e?{overflowAnchor:"none",position:"sticky",top:l+g,zIndex:2}:_L},c(p.index,p.data,a))});return b.jsx(b.Fragment,{children:d})}),IL=E.memo(function(){const e=Fe("listState"),t=Fe("topItemsIndexes").length>0,n=xn("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=xn("windowScrollContainerState"),a=xn("scrollContainerState"),s=o||r?i:a,l=Fe("trackItemSizes"),c=Fe("itemSize"),u=Fe("log"),{callbackRef:d,ref:p}=v0(n,c,l,s,u,void 0,o,!1,Fe("skipAnimationFrameInResizeObserver")),[f,m]=E.useState(0);Pf("deviation",_=>{f!==_&&(p.current.style.marginTop=`${_}px`,m(_))});const g=Fe("EmptyPlaceholder"),h=Fe("FillerRow")||AL,v=Fe("TableBodyComponent"),y=Fe("paddingTopAddition"),x=Fe("statefulTotalCount"),T=Fe("context");if(x===0&&g)return b.jsx(g,{...lt(g,T)});const w=(t?e.topItems:[]).reduce((_,M)=>_+M.size,0),S=e.offsetTop+y+f-w,C=e.offsetBottom,P=S>0?b.jsx(h,{context:T,height:S},"padding-top"):null,I=C>0?b.jsx(h,{context:T,height:C},"padding-bottom"):null;return b.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...lt(v,T),children:[P,t&&b.jsx(X0,{showTopList:!0}),b.jsx(X0,{}),I]})}),OL=({children:e})=>{const t=E.useContext(nl),n=xn("viewportHeight"),r=xn("fixedItemHeight"),o=Ln(E.useMemo(()=>sa(n,i=>bn(i,"height")),[n]),!0,Fe("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.jsx("div",{"data-viewport-type":"element",ref:o,style:ai(!1),children:e})},ML=({children:e})=>{const t=E.useContext(nl),n=xn("windowViewportRect"),r=xn("fixedItemHeight"),o=Fe("customScrollParent"),i=af(n,o,Fe("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.jsx("div",{"data-viewport-type":"window",ref:i,style:ai(!1),children:e})},DL=E.memo(function(e){const t=Fe("useWindowScroll"),n=Fe("customScrollParent"),r=xn("fixedHeaderHeight"),o=xn("fixedFooterHeight"),i=Fe("fixedHeaderContent"),a=Fe("fixedFooterContent"),s=Fe("context"),l=Ln(E.useMemo(()=>sa(r,v=>bn(v,"height")),[r]),!0,Fe("skipAnimationFrameInResizeObserver")),c=Ln(E.useMemo(()=>sa(o,v=>bn(v,"height")),[o]),!0,Fe("skipAnimationFrameInResizeObserver")),u=n||t?LL:FL,d=n||t?ML:OL,p=Fe("TableComponent"),f=Fe("TableHeadComponent"),m=Fe("TableFooterComponent"),g=i?b.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...lt(f,s),children:i()},"TableHead"):null,h=a?b.jsx(m,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...lt(m,s),children:a()},"TableFoot"):null;return b.jsx(u,{...e,...lt(u,s),children:b.jsx(d,{children:b.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...lt(p,s),children:[g,b.jsx(IL,{},"TableBody"),h]})})})}),{Component:NL,useEmitter:Pf,useEmitterValue:Fe,usePublisher:xn}=bf(kL,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedFooterContent:"fixedFooterContent",fixedHeaderContent:"fixedHeaderContent",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupCounts:"groupCounts",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},DL),FL=Tf({useEmitter:Pf,useEmitterValue:Fe,usePublisher:xn}),LL=Ef({useEmitter:Pf,useEmitterValue:Fe,usePublisher:xn}),VL=NL,Q0={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},jL={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:J0,floor:rl,max:va,min:Af,round:ew}=Math;function tw(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function $L(e){return{...jL,items:e}}function ol(e,t){return e&&e.width===t.width&&e.height===t.height}function RL(e,t){return e&&e.column===t.column&&e.row===t.row}const zL=Ue(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:m,propsReady:g},{customScrollParent:h,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:T},w])=>{const S=le(0),C=le(0),P=le(Q0),I=le({height:0,width:0}),_=le({height:0,width:0}),M=ze(),L=ze(),$=le(0),A=le(null),O=le({column:0,row:0}),N=ze(),V=ze(),F=le(!1),z=le(0),D=le(!0),R=le(!1),J=le(!1);Xe(re(m,Ne(z),Ce(([j,W])=>!!W)),()=>{Me(D,!1)}),Xe(re(At(m,D,_,I,z,R),Ce(([j,W,G,ae,,B])=>j&&!W&&G.height!==0&&ae.height!==0&&!B)),([,,,,j])=>{Me(R,!0),hf(1,()=>{Me(M,j)}),Dn(re(c),()=>{Me(t,[0,0]),Me(D,!0)})}),be(re(V,Ce(j=>j!=null&&j.scrollTop>0),Nn(0)),C),Xe(re(m,Ne(V),Ce(([,j])=>j!=null)),([,j])=>{j&&(Me(I,j.viewport),Me(_,j.item),Me(O,j.gap),j.scrollTop>0&&(Me(F,!0),Dn(re(c,oi(1)),W=>{Me(F,!1)}),Me(l,{top:j.scrollTop})))}),be(re(I,he(({height:j})=>j)),d),be(re(At(Pe(I,ol),Pe(_,ol),Pe(O,(j,W)=>j&&j.column===W.column&&j.row===W.row),Pe(c)),he(([j,W,G,ae])=>({gap:G,item:W,scrollTop:ae,viewport:j}))),N),be(re(At(Pe(S),r,Pe(O,RL),Pe(_,ol),Pe(I,ol),Pe(A),Pe(C),Pe(F),Pe(D),Pe(z)),Ce(([,,,,,,,j])=>!j),he(([j,[W,G],ae,B,xe,Ee,Oe,,$e,se])=>{const{column:ye,row:K}=ae,{height:ce,width:Q}=B,{width:ie}=xe;if(Oe===0&&(j===0||ie===0))return Q0;if(Q===0){const Sn=mf(se,j),zn=Sn+Math.max(Oe-1,0);return $L(tw(Sn,zn,Ee))}const we=nw(ie,Q,ye);let X,ue;$e?W===0&&G===0&&Oe>0?(X=0,ue=Oe-1):(X=we*rl((W+K)/(ce+K)),ue=we*J0((G+K)/(ce+K))-1,ue=Af(j-1,va(ue,we-1)),X=Af(ue,va(0,X))):(X=0,ue=-1);const _e=tw(X,ue,Ee),{bottom:We,top:Ct}=rw(xe,ae,B,_e),mt=J0(j/we),Lt=mt*ce+(mt-1)*K-We;return{bottom:We,itemHeight:ce,items:_e,itemWidth:Q,offsetBottom:Lt,offsetTop:Ct,top:Ct}})),P),be(re(A,Ce(j=>j!==null),he(j=>j.length)),S),be(re(At(I,_,P,O),Ce(([j,W,{items:G}])=>G.length>0&&W.height!==0&&j.height!==0),he(([j,W,{items:G},ae])=>{const{bottom:B,top:xe}=rw(j,ae,W,G);return[xe,B]}),st(ua)),t);const te=le(!1);be(re(c,Ne(te),he(([j,W])=>W||j!==0)),te);const ee=en(re(At(P,S),Ce(([{items:j}])=>j.length>0),Ne(te),Ce(([[j,W],G])=>{const ae=j.items[j.items.length-1].index===W-1;return(G||j.bottom>0&&j.itemHeight>0&&j.offsetBottom===0&&j.items.length===W)&&ae}),he(([[,j]])=>j-1),st())),Z=en(re(Pe(P),Ce(({items:j})=>j.length>0&&j[0].index===0),Nn(0),st())),U=en(re(Pe(P),Ne(F),Ce(([{items:j},W])=>j.length>0&&!W),he(([{items:j}])=>({endIndex:j[j.length-1].index,startIndex:j[0].index})),st(C0),hr(0)));be(U,f.scrollSeekRangeChanged),be(re(M,Ne(I,_,S,O),he(([j,W,G,ae,B])=>{const xe=O0(j),{align:Ee,behavior:Oe,offset:$e}=xe;let se=xe.index;se==="LAST"&&(se=ae-1),se=va(0,se,Af(ae-1,se));let ye=_f(W,B,G,se);return Ee==="end"?ye=ew(ye-W.height+G.height):Ee==="center"&&(ye=ew(ye-W.height/2+G.height/2)),$e&&(ye+=$e),{behavior:Oe,top:ye}})),l);const Y=zt(re(P,he(j=>j.offsetBottom+j.bottom)),0);return be(re(T,he(j=>({height:j.visibleHeight,width:j.visibleWidth}))),I),{customScrollParent:h,data:A,deviation:$,footerHeight:o,gap:O,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:_,overscan:n,restoreStateFrom:V,scrollBy:a,scrollContainerState:s,scrollHeight:L,scrollTo:l,scrollToIndex:M,scrollTop:c,smoothScrollTargetReached:u,totalCount:S,useWindowScroll:v,viewportDimensions:I,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:T,...f,gridState:P,horizontalDirection:J,initialTopMostItemIndex:z,totalListHeight:Y,...p,endReached:ee,propsReady:g,rangeChanged:U,startReached:Z,stateChanged:N,stateRestoreInProgress:F,...w}},at(gf,Wt,ga,R0,gr,yf,mr));function nw(e,t,n){return va(1,rl((e+n)/(rl(t)+n)))}function rw(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=_f(e,t,n,r[0].index);return{bottom:_f(e,t,n,r[r.length-1].index)+o,top:i}}function _f(e,t,n,r){const o=nw(e.width,n.width,t.column),i=rl(r/o),a=i*n.height+va(0,i-1)*t.row;return a>0?a+t.row:a}const BL=Ue(()=>{const e=le(d=>`Item ${d}`),t=le({}),n=le(null),r=le("virtuoso-grid-item"),o=le("virtuoso-grid-list"),i=le(Sf),a=le("div"),s=le(ri),l=(d,p=null)=>zt(re(t,he(f=>f[d]),st()),p),c=le(!1),u=le(!1);return be(Pe(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),HL=Ue(([e,t])=>({...e,...t}),at(zL,BL)),WL=E.memo(function(){const e=ut("gridState"),t=ut("listClassName"),n=ut("itemClassName"),r=ut("itemContent"),o=ut("computeItemKey"),i=ut("isSeeking"),a=dn("scrollHeight"),s=ut("ItemComponent"),l=ut("ListComponent"),c=ut("ScrollSeekPlaceholder"),u=ut("context"),d=dn("itemDimensions"),p=dn("gap"),f=ut("log"),m=ut("stateRestoreInProgress"),g=dn("reportReadyState"),h=Ln(E.useMemo(()=>v=>{const y=v.parentElement.parentElement.scrollHeight;a(y);const x=v.firstChild;if(x){const{height:T,width:w}=x.getBoundingClientRect();d({height:T,width:w})}p({column:iw("column-gap",getComputedStyle(v).columnGap,f),row:iw("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return W0(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),m?null:b.jsx(l,{className:t,ref:h,...lt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const y=o(v.index,v.data,u);return i?b.jsx(c,{...lt(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},y):E.createElement(s,{...lt(s,u),className:n,"data-index":v.index,key:y},r(v.index,v.data,u))})})}),qL=E.memo(function(){const e=ut("HeaderComponent"),t=dn("headerHeight"),n=ut("headerFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,!1),o=ut("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...lt(e,o)})}):null}),UL=E.memo(function(){const e=ut("FooterComponent"),t=dn("footerHeight"),n=ut("headerFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,!1),o=ut("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...lt(e,o)})}):null}),YL=({children:e})=>{const t=E.useContext(H0),n=dn("itemDimensions"),r=dn("viewportDimensions"),o=Ln(E.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return E.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),b.jsx("div",{ref:o,style:ai(!1),children:e})},GL=({children:e})=>{const t=E.useContext(H0),n=dn("windowViewportRect"),r=dn("itemDimensions"),o=ut("customScrollParent"),i=af(n,o,!1);return E.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),b.jsx("div",{ref:i,style:ai(!1),children:e})},KL=E.memo(function({...e}){const t=ut("useWindowScroll"),n=ut("customScrollParent"),r=n||t?XL:ZL,o=n||t?GL:YL,i=ut("context");return b.jsx(r,{...e,...lt(r,i),children:b.jsxs(o,{children:[b.jsx(qL,{}),b.jsx(WL,{}),b.jsx(UL,{})]})})}),{useEmitter:ow,useEmitterValue:ut,usePublisher:dn}=bf(HL,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",isScrolling:"isScrolling",rangeChanged:"rangeChanged",readyStateChanged:"readyStateChanged",startReached:"startReached",stateChanged:"stateChanged"},methods:{scrollBy:"scrollBy",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",headerFooterTag:"headerFooterTag",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",itemClassName:"itemClassName",itemContent:"itemContent",listClassName:"listClassName",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",totalCount:"totalCount",useWindowScroll:"useWindowScroll"}},KL),ZL=Tf({useEmitter:ow,useEmitterValue:ut,usePublisher:dn}),XL=Ef({useEmitter:ow,useEmitterValue:ut,usePublisher:dn});function iw(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}const If=()=>{const e=E.useContext(jo);return e?e.tweaks:bs},aw=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>b.jsxs("span",{className:Le("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:b.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[i,e||r?b.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?b.jsx(tf,{as:"button",type:"button","aria-description":r,title:b.jsxs("span",{className:"cursor-help",children:[b.jsx("span",{className:"sr-only",children:r}),b.jsx(yy,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:b.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?b.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[b.jsx(gy,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),b.jsx(e_,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),o]}),ya=E.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:p="",name:f,title:m,componentName:g,placeholder:h,hideLeft:v=!1,required:y,disabled:x,reportStatus:T},w)=>{const S=If(),C=T!==void 0?T:S.input.iconFeedback,P=d??f,I=Ot(),_=e??I.inputOptionalLabel;return b.jsxs("fieldset",{ref:w,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":g,"data-interactive":!!i,className:Le("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[b.jsxs("label",{form:u,htmlFor:P,className:"text-field-label max-w-full w-full relative inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[b.jsx(aw,{info:s,hideLeft:v,reportStatus:C,title:m,placeholder:h,children:_||n?b.jsxs(E.Fragment,{children:[y?null:b.jsx("span",{"aria-disabled":x,className:"text-opacity-70 aria-disabled:text-disabled",children:_}),n?b.jsx(E.Fragment,{children:n}):null]}):null}),b.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${p}`,children:[t?b.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?b.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),b.jsx("p",{className:"mt-input-gap hidden whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger",children:c}),b.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),QL=e=>b.jsx(E.Fragment,{children:e.children}),JL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},e2={caseSensitive:!1,sort:!1},t2=[],n2=E.forwardRef(function(t,n){return b.jsx(ft.ul,{...t,ref:n,className:"w-full rounded-lg border-b border-tooltip-border last:border-transparent",children:b.jsx(Jn,{children:t.children})})}),r2=E.forwardRef(function({item:t,context:n,...r},o){return b.jsx(ft.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),o2={List:n2,Item:r2},si=320,Of=40,i2=E.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,...g},h)=>{const v=E.useRef(null),y=E.useRef(null),x=g.value??g.defaultValue??"",T=Ot(),[w,S]=E.useState(()=>Math.min(si,Of*o.length)),[C,P]=E.useState(!1),[I,_]=E.useState(""),[M,L]=E.useState(x),[$,A]=E.useState(()=>{var K;return((K=o.find(ce=>ce.value===x))==null?void 0:K.label)??x}),[O,N]=E.useState(null),V=E.useRef(t2),F=m&&I!==""?[{value:I,label:I,"data-dynamic":"true"},...o]:o,z=new Xr(F,["value","label"],e2).search(I),D=()=>{P(!1),S(0)},R=z.filter(K=>K.hidden!==!0),J=m?void 0:`^(${o.map(K=>`${sd(K.value)}${K.label?"|"+sd(K.label):""}`).join("|")})$`;E.useEffect(()=>{if(g.value){const K=o.find(ce=>ce.value===g.value);L((K==null?void 0:K.label)??g.value)}},[g.value]),E.useEffect(()=>{C||S(0)},[C]),E.useEffect(()=>{if(!C)return;const K=U.floating;if(K.current===null)return;let ce=0;Array.from(K.current.querySelectorAll("li")).slice(0,Math.min(R.length,10)).forEach(we=>{const X=we.getBoundingClientRect();ce+=X.height});const ie=Math.min(ce,si);S(ie)},[I,C]);const{x:te,y:ee,strategy:Z,refs:U,context:Y}=Gr({open:C,transform:!0,strategy:"absolute",onOpenChange:P,whileElementsMounted:ea,middleware:[ta(4),Sx({padding:10,elementContext:"reference",apply(K){const ce=v.current.getBoundingClientRect().width,Q=K.elements.floating.querySelector("ul"),ie=(Q==null?void 0:Q.getBoundingClientRect().height)||0,we=Math.min(ie<Of?si:ie,si);wi.flushSync(()=>setTimeout(()=>{const X=(Q==null?void 0:Q.getBoundingClientRect().height)??0;return X<Of?void S(we):void S(Math.min(X,si))},50)),Object.assign(K.elements.floating.style,{width:`${ce}px`,maxWidth:`${ce}px`,maxHeight:`${si}`})}})]}),j=r0(Y,JL),{getReferenceProps:W,getFloatingProps:G,getItemProps:ae}=Kr([Zr(Y,{role:"listbox"}),Yr(Y),Qd(Y,{cols:0,listRef:V,loop:!0,virtual:!0,allowEscape:!0,activeIndex:O,selectedIndex:O,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{const K=U.reference.current;if(K)return Si(K)},[]);const B=(K,ce)=>{L(K.value);const Q=U.reference.current;if(!Q)return;Q==null||Q.setAttribute("data-value",K.value),Q.value=K.value;const ie=new Event("change",{bubbles:!1,cancelable:!0});Q.dispatchEvent(ie),g.onChange&&g.onChange(ie),A(K.label??""),D(),_(""),N(ce)},xe=K=>{var Q;const ce=K.target.value;return _(ce),!C&&ce===""?P(!0):(K.target.name=g.name||"",ce?P(!0):(Q=g.onChange)==null?void 0:Q.call(g,K))},Ee=()=>{var K;P(!0),_(""),(K=U.reference.current)==null||K.focus()},Oe=()=>{N(K=>K===null?0:K),P(!0),_("")},$e=()=>{var K;(K=U.reference.current)==null||K.setAttribute("data-value",""),_(""),L(""),A(""),Zh(U.reference.current),D()},se=g.id||g.name,ye=R.length===0;return b.jsxs(ya,{...g,left:e,error:t,ref:v,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:p,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:g.name||g.id,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:b.jsxs("span",{className:"flex items-center gap-0.5",children:[n,b.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:Ee,children:[b.jsx(Ru,{size:20}),b.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),M?b.jsx("button",{type:"button",onClick:$e,className:"p-2 transition-colors link:text-danger md:p-1",children:b.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[b.jsx("input",{"data-shadow":"true",...W({...g,onChange:xe,onFocus:Oe,pattern:J,ref:U.setReference,name:`${se}-shadow`,id:`${se}-shadow`,onClick:K=>K.currentTarget.focus(),onKeyDown(K){var ce,Q;if(K.key==="Escape")return K.currentTarget.blur(),D();if(C){if(K.key==="ArrowDown"){let ie=rt.number(O)?O+1:0;return ie>R.length-1&&(ie=0),(ce=y.current)==null||ce.scrollIntoView({index:ie}),N(ie)}if(K.key==="ArrowUp"){let ie=rt.number(O)?O-1:R.length-1;return ie<0&&(ie=R.length-1),(Q=y.current)==null||Q.scrollIntoView({index:ie}),N(ie)}if(K.key==="Enter"){if(O!==null&&R[O])return K.preventDefault(),B(R[O],O);if(R.length===1)return K.preventDefault(),B(R[0],0)}}}}),"data-value":M,"data-error":!!t,"data-name":se,"data-target":se,required:f,value:C?I:$||M,"aria-autocomplete":"list",autoComplete:"off",className:Le("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",g.className)}),b.jsx("input",{id:se,name:se,type:"hidden","data-origin":se,ref:h,required:f,defaultValue:g.value||M||void 0}),b.jsx(qr,{preserveTabOrder:!0,children:C?b.jsx(Jo,{guards:!0,returnFocus:!1,context:Y,initialFocus:-1,visuallyHiddenDismiss:!0,children:b.jsxs(ft.ul,{...G({ref:U.setFloating,style:{...j.styles,top:ee??0,position:Z,left:(te??0)+(M?36:25)}}),initial:!1,"data-floating":"true",animate:{height:ye?"auto":w},className:"isolate z-floating m-0 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[ye?b.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:b.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||T.autocompleteEmpty})}):null,b.jsx(kf,{ref:y,hidden:ye,data:R,style:{height:w},components:o2,className:"rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(K,ce)=>{const Q=ce.Render??QL,ie=M===ce.value||M===ce.label,we=O===K,X=ce.label??ce.value;return b.jsx("button",{"data-value":ce.value,...ae({ref:ue=>void(V.current[K]=ue),role:"option",type:"button","aria-checked":ie,"aria-current":ie,"aria-selected":ie,"aria-busy":ce.disabled,onClick:()=>B(ce,K),className:`cursor-pointer w-full p-2 text-left ${ie?"bg-primary-hover text-primary-foreground":""} ${we?"bg-floating-hover text-floating-foreground":""}`}),children:b.jsx(Q,{...g,label:ce.label,value:ce.value,children:X})})}})]})}):null})]})}),Mf=E.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...l},c)=>{const u=l.disabled||r;return b.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Le("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[b.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Le("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",i)}),e,b.jsx("span",{"data-name":"checkbox-label",className:Le("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),sw=(e,t,n,r)=>E.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:m="text",labelClassName:g,feedback:h=null,hideLeft:v=!1,loading:y,...x},T)=>{const w=e,S=x.id??x.name,C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const P=C.current,I=Si(C.current),_=r==null?void 0:r(P),M=L=>{const $=L;if($.key==="Enter"&&P.enterKeyHint==="next"){const A=P.getAttribute("data-next");if(A){const O=document.getElementById(A);if(O)return O.focus(),void $.preventDefault()}}};return P.addEventListener("keydown",M),()=>{_==null||_(),I(),P.removeEventListener("keydown",M)}},[]),b.jsx(ya,{...n,info:i,left:a,error:l,right:c,loading:y,form:x.form,name:x.name,feedback:h,hideLeft:v,title:x.title,container:Le(u,n.container),rightLabel:d,disabled:x.disabled,interactive:p,required:x.required,componentName:t,id:x.name||x.id,optionalText:f,labelClassName:g,placeholder:x.placeholder,children:b.jsx(w,{...n,...x,id:S,name:S,type:m,"data-next":s,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:Fa(T,C),className:Le("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",x.className)})})}),ba=sw(Jy,"input",{type:"text"}),lw=new Date(1970,11,31),Df={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},cw={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},a2={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")},Nf=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},s2=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=id(t),l=E.useId(),c=Ot(),u=E.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=E.useState(e||void 0),[f,m]=E.useState(!1),g=Nf(u,lw).flatMap(C=>rt.keyof(Df,C.type)?Df[C.type](C.value):[]),h=Nf(u,lw).reduce((C,P)=>C+(rt.keyof(cw,P.type)?cw[P.type](P.value):""),""),[v,y]=E.useState(d?Nf(u,d).reduce((C,P)=>C+(rt.keyof(Df,P.type)?a2[P.type](d,P.value):""),""):""),x=C=>{const P=C.target.value;if(y(P),g.length===P.length&&g.every((_,M)=>{const L=P.charAt(M);return typeof _=="string"?L===_:_.test(L)})){const _=No(fO(P,h,new Date));return p(_),r==null?void 0:r(_)}return p(void 0),r==null?void 0:r(void 0)},T=C=>(p(C),r==null||r(C),y(C?fI(C,h):"")),w=Cy(d),S=w?d.toISOString():void 0;return b.jsx(ba,{...i,mask:g,value:v,id:void 0,name:void 0,className:"uppercase","data-value":S,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:x,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??h,right:b.jsxs(E.Fragment,{children:[b.jsx("input",{"data-origin":i.name,defaultValue:S,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),b.jsx(ti,{open:f,onChange:m,trigger:b.jsxs("span",{"aria-labelledby":l,children:[b.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),b.jsx(QA,{})]}),buttonProps:{"aria-describedby":l},children:b.jsx(wb,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:w?d:void 0})})]})})}),l2=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],c2=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],u2=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],d2=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],uw=(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 dw(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?d2:u2:t.binary?c2:l2,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){const u=uw(e,t.locale,a);return i+u+r+n[0]}const s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,a||(e=e.toPrecision(3));const l=uw(Number(e),t.locale,a),c=n[s];return i+l+r+c}var il={exports:{}},al={exports:{}},Ye={};/** @license React v16.13.1
|
|
172
|
+
*/var SD=["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])"],Ms=SD.join(","),ax=typeof Element>"u",qo=ax?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ds=!ax&&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},Ns=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},TD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},ED=function(t,n,r){if(Ns(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ms));return n&&qo.call(t,Ms)&&o.unshift(t),o=o.filter(r),o},CD=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ns(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=qo.call(a,Ms);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Ns(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},sx=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},lx=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||TD(t))&&!sx(t)?0:t.tabIndex},kD=function(t,n){var r=lx(t);return r<0&&n&&!sx(t)?0:r},PD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},cx=function(t){return t.tagName==="INPUT"},AD=function(t){return cx(t)&&t.type==="hidden"},_D=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},ID=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},OD=function(t){if(!t.name)return!0;var n=t.form||Ds(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=ID(o,t.form);return!i||i===t},MD=function(t){return cx(t)&&t.type==="radio"},DD=function(t){return MD(t)&&!OD(t)},ND=function(t){var n,r=t&&Ds(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Ds(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},ux=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},FD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=qo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(qo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=Ds(t);if(l&&!l.shadowRoot&&o(l)===!0)return ux(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(ND(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ux(t);return!1},LD=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 qo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},VD=function(t,n){return!(n.disabled||Ns(n)||AD(n)||FD(n,t)||_D(n)||LD(n))},Fd=function(t,n){return!(DD(n)||lx(n)<0||!VD(t,n))},jD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},$D=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=kD(s,a),c=a?e(o.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:c})}),r.sort(PD).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ji=function(t,n){n=n||{};var r;return n.getShadowRoot?r=CD([t],n.includeContainer,{filter:Fd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:jD}):r=ED(t,n.includeContainer,Fd.bind(null,n)),$D(r)},RD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return qo.call(t,Ms)===!1?!1:Fd(n,t)};function dx(e,t,n){let{reference:r,floating:o}=e;const i=Br(t),a=Dd(t),s=Md(a),l=lr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Wo(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const zD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=dx(c,r,l),p=r,f={},m=0;for(let g=0;g<s.length;g++){const{name:h,fn:v}=s[g],{x:y,y:x,data:T,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=y??u,d=x??d,f={...f,[h]:{...f[h],...T}},w&&m<=50&&(m++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=dx(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function Ld(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=Ho(t,e),m=ix(f),h=s[p?d==="floating"?"reference":"floating":d],v=Os(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},w=Os(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:x,strategy:l}):y);return{top:(v.top-w.top+m.top)/T.y,bottom:(w.bottom-v.bottom+m.bottom)/T.y,left:(v.left-w.left+m.left)/T.x,right:(w.right-v.right+m.right)/T.x}}const BD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Ho(e,t)||{};if(c==null)return{};const d=ix(u),p={x:n,y:r},f=Dd(o),m=Md(f),g=await a.getDimensions(c),h=f==="y",v=h?"top":"left",y=h?"bottom":"right",x=h?"clientHeight":"clientWidth",T=i.reference[m]+i.reference[f]-p[f]-i.floating[m],w=p[f]-i.reference[f],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=S?S[x]:0;(!C||!await(a.isElement==null?void 0:a.isElement(S)))&&(C=s.floating[x]||i.floating[m]);const P=T/2-w/2,I=C/2-g[m]/2-1,_=Mn(d[v],I),M=Mn(d[y],I),L=_,$=C-g[m]-M,A=C/2-g[m]/2+P,O=Od(L,A,$),N=!l.arrow&&Wo(o)!=null&&A!==O&&i.reference[m]/2-(A<L?_:M)-g[m]/2<0,V=N?A<L?A-L:A-$:0;return{[f]:p[f]+V,data:{[f]:O,centerOffset:A-O-V,...N&&{alignmentOffset:V}},reset:N}}}),HD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...h}=Ho(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=lr(o),y=Br(s),x=lr(s)===s,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(x||!g?[Is(s)]:yD(s)),S=m!=="none";!p&&S&&w.push(...xD(s,g,m,T));const C=[s,...w],P=await Ld(t,h),I=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(P[v]),d){const A=vD(o,a,T);I.push(P[A[0]],P[A[1]])}if(_=[..._,{placement:o,overflows:I}],!I.every(A=>A<=0)){var M,L;const A=(((M=i.flip)==null?void 0:M.index)||0)+1,O=C[A];if(O)return{data:{index:A,overflows:_},reset:{placement:O}};let N=(L=_.filter(V=>V.overflows[0]<=0).sort((V,F)=>V.overflows[1]-F.overflows[1])[0])==null?void 0:L.placement;if(!N)switch(f){case"bestFit":{var $;const V=($=_.filter(F=>{if(S){const z=Br(F.placement);return z===y||z==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(z=>z>0).reduce((z,D)=>z+D,0)]).sort((F,z)=>F[1]-z[1])[0])==null?void 0:$[0];V&&(N=V);break}case"initialPlacement":N=s;break}if(o!==N)return{reset:{placement:N}}}return{}}}};async function WD(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=lr(n),s=Wo(n),l=Br(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=Ho(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof m=="number"&&(f=s==="end"?m*-1:m),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const qD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await WD(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},UD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x:v,y}=h;return{x:v,y}}},...l}=Ho(e,t),c={x:n,y:r},u=await Ld(t,l),d=Br(lr(o)),p=ox(d);let f=c[p],m=c[d];if(i){const h=p==="y"?"top":"left",v=p==="y"?"bottom":"right",y=f+u[h],x=f-u[v];f=Od(y,f,x)}if(a){const h=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+u[h],x=m-u[v];m=Od(y,m,x)}const g=s.fn({...t,[p]:f,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},YD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Ho(e,t),l=await Ld(t,s),c=lr(n),u=Wo(n),d=Br(n)==="y",{width:p,height:f}=r.floating;let m,g;c==="top"||c==="bottom"?(m=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,m=u==="end"?"top":"bottom");const h=f-l.top-l.bottom,v=p-l.left-l.right,y=Mn(f-l[m],h),x=Mn(p-l[g],v),T=!t.middlewareData.shift;let w=y,S=x;if(d?S=u||T?Mn(x,v):v:w=u||T?Mn(y,h):h,T&&!u){const P=Jt(l.left,0),I=Jt(l.right,0),_=Jt(l.top,0),M=Jt(l.bottom,0);d?S=p-2*(P!==0||I!==0?P+I:Jt(l.left,l.right)):w=f-2*(_!==0||M!==0?_+M:Jt(l.top,l.bottom))}await a({...t,availableWidth:S,availableHeight:w});const C=await o.getDimensions(i.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function fx(e){const t=Qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Et(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=_s(n)!==i||_s(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Vd(e){return Je(e)?e:e.contextElement}function Uo(e){const t=Vd(e);if(!Et(t))return sr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=fx(t);let a=(i?_s(n.width):n.width)/r,s=(i?_s(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const GD=sr(0);function px(e){const t=Ht(e);return!Td()||!t.visualViewport?GD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function KD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ht(e)?!1:t}function Hr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Vd(e);let a=sr(1);t&&(r?Je(r)&&(a=Uo(r)):a=Uo(e));const s=KD(i,n,r)?px(i):sr(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=Ht(i),f=r&&Je(r)?Ht(r):r;let m=p,g=Ed(m);for(;g&&r&&f!==m;){const h=Uo(g),v=g.getBoundingClientRect(),y=Qt(g),x=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*h.x,T=v.top+(g.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=x,c+=T,m=Ht(g),g=Ed(m)}}return Os({width:u,height:d,x:l,y:c})}function ZD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=qn(r),s=t?Ps(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=sr(1);const u=sr(0),d=Et(r);if((d||!d&&!i)&&((or(r)!=="body"||Qi(a))&&(l=As(r)),Et(r))){const p=Hr(r);c=Uo(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function XD(e){return Array.from(e.getClientRects())}function hx(e){return Hr(qn(e)).left+As(e).scrollLeft}function QD(e){const t=qn(e),n=As(e),r=e.ownerDocument.body,o=Jt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Jt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+hx(e);const s=-n.scrollTop;return Qt(r).direction==="rtl"&&(a+=Jt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function JD(e,t){const n=Ht(e),r=qn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=Td();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function eN(e,t){const n=Hr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Et(e)?Uo(e):sr(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function mx(e,t,n){let r;if(t==="viewport")r=JD(e,n);else if(t==="document")r=QD(qn(e));else if(Je(t))r=eN(t,n);else{const o=px(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Os(r)}function gx(e,t){const n=Un(e);return n===t||!Je(n)||ir(n)?!1:Qt(n).position==="fixed"||gx(n,t)}function tN(e,t){const n=t.get(e);if(n)return n;let r=ar(e,[],!1).filter(s=>Je(s)&&or(s)!=="body"),o=null;const i=Qt(e).position==="fixed";let a=i?Un(e):e;for(;Je(a)&&!ir(a);){const s=Qt(a),l=Sd(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Qi(a)&&!l&&gx(e,a))?r=r.filter(u=>u!==a):o=s,a=Un(a)}return t.set(e,r),r}function nN(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Ps(t)?[]:tN(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=mx(t,u,o);return c.top=Jt(d.top,c.top),c.right=Mn(d.right,c.right),c.bottom=Mn(d.bottom,c.bottom),c.left=Jt(d.left,c.left),c},mx(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function rN(e){const{width:t,height:n}=fx(e);return{width:t,height:n}}function oN(e,t,n){const r=Et(t),o=qn(t),i=n==="fixed",a=Hr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=sr(0);if(r||!r&&!i)if((or(t)!=="body"||Qi(o))&&(s=As(t)),r){const d=Hr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=hx(o));const c=a.left+s.scrollLeft-l.x,u=a.top+s.scrollTop-l.y;return{x:c,y:u,width:a.width,height:a.height}}function jd(e){return Qt(e).position==="static"}function vx(e,t){return!Et(e)||Qt(e).position==="fixed"?null:t?t(e):e.offsetParent}function yx(e,t){const n=Ht(e);if(Ps(e))return n;if(!Et(e)){let o=Un(e);for(;o&&!ir(o);){if(Je(o)&&!jd(o))return o;o=Un(o)}return n}let r=vx(e,t);for(;r&&cD(r)&&jd(r);)r=vx(r,t);return r&&ir(r)&&jd(r)&&!Sd(r)?n:r||uD(e)||n}const iN=async function(e){const t=this.getOffsetParent||yx,n=this.getDimensions,r=await n(e.floating);return{reference:oN(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function aN(e){return Qt(e).direction==="rtl"}const sN={convertOffsetParentRelativeRectToViewportRelativeRect:ZD,getDocumentElement:qn,getClippingRect:nN,getOffsetParent:yx,getElementRects:iN,getClientRects:XD,getDimensions:rN,getScale:Uo,isElement:Je,isRTL:aN};function lN(e,t){let n=null,r;const o=qn(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f=Bo(u),m=Bo(o.clientWidth-(c+d)),g=Bo(o.clientHeight-(u+p)),h=Bo(c),y={rootMargin:-f+"px "+-m+"px "+-g+"px "+-h+"px",threshold:Jt(0,Mn(1,l))||1};let x=!0;function T(w){const S=w[0].intersectionRatio;if(S!==l){if(!x)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(T,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,y)}n.observe(e)}return a(!0),i}function ea(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Vd(e),u=o||i?[...c?ar(c):[],...ar(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?lN(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let m,g=l?Hr(e):null;l&&h();function h(){const v=Hr(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,m=requestAnimationFrame(h)}return n(),()=>{var v;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d==null||d(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const cN=qD,uN=UD,dN=HD,fN=YD,bx=BD,pN=(e,t,n)=>{const r=new Map,o={platform:sN,...n},i={...o.platform,_c:r};return zD(e,t,{...o,platform:i})};var Fs=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ls(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(!Ls(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)&&!Ls(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function xx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wx(e,t){const n=xx(e);return Math.round(t*n)/n}function $d(e){const t=k.useRef(e);return Fs(()=>{t.current=e}),t}function hN(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=k.useState(r);Ls(p,r)||f(r);const[m,g]=k.useState(null),[h,v]=k.useState(null),y=k.useCallback(F=>{F!==S.current&&(S.current=F,g(F))},[]),x=k.useCallback(F=>{F!==C.current&&(C.current=F,v(F))},[]),T=i||m,w=a||h,S=k.useRef(null),C=k.useRef(null),P=k.useRef(u),I=l!=null,_=$d(l),M=$d(o),L=$d(c),$=k.useCallback(()=>{if(!S.current||!C.current)return;const F={placement:t,strategy:n,middleware:p};M.current&&(F.platform=M.current),pN(S.current,C.current,F).then(z=>{const D={...z,isPositioned:L.current!==!1};A.current&&!Ls(P.current,D)&&(P.current=D,Oa.flushSync(()=>{d(D)}))})},[p,t,n,M,L]);Fs(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[c]);const A=k.useRef(!1);Fs(()=>(A.current=!0,()=>{A.current=!1}),[]),Fs(()=>{if(T&&(S.current=T),w&&(C.current=w),T&&w){if(_.current)return _.current(T,w,$);$()}},[T,w,$,_,I]);const O=k.useMemo(()=>({reference:S,floating:C,setReference:y,setFloating:x}),[y,x]),N=k.useMemo(()=>({reference:T,floating:w}),[T,w]),V=k.useMemo(()=>{const F={position:n,left:0,top:0};if(!N.floating)return F;const z=wx(N.floating,u.x),D=wx(N.floating,u.y);return s?{...F,transform:"translate("+z+"px, "+D+"px)",...xx(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:D}},[n,s,N.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:$,refs:O,elements:N,floatingStyles:V}),[u,$,O,N,V])}const mN=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?bx({element:r.current,padding:o}).fn(n):{}:r?bx({element:r,padding:o}).fn(n):{}}}},ta=(e,t)=>({...cN(e),options:[e,t]}),Rd=(e,t)=>({...uN(e),options:[e,t]}),zd=(e,t)=>({...dN(e),options:[e,t]}),Sx=(e,t)=>({...fN(e),options:[e,t]}),Tx=(e,t)=>({...mN(e),options:[e,t]});function Bd(e){return k.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const Ex={...k},gN=Ex.useInsertionEffect||(e=>e());function Pt(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return gN(()=>{t.current=e}),k.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 Hd="ArrowUp",na="ArrowDown",Yo="ArrowLeft",Go="ArrowRight";function Vs(e,t,n){return Math.floor(e/t)!==n}function ra(e,t){return t<0||t>=e.current.length}function Wd(e,t){return $t(e,{disabledIndices:t})}function Cx(e,t){return $t(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function $t(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=r?-i:i;while(s>=0&&s<=a.length-1&&js(a,s,o));return s}function vN(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===Hd){if(u&&Nt(n),c===-1)d=l;else if(d=$t(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||d<0)){const p=c%i,f=l%i,m=l-(f-p);f===p?d=l:d=f>p?m:m-i}ra(e,d)&&(d=c)}if(n.key===na&&(u&&Nt(n),c===-1?d=s:(d=$t(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=$t(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),ra(e,d)&&(d=c)),r==="both"){const p=Bo(c/i);n.key===Go&&(u&&Nt(n),c%i!==i-1?(d=$t(e,{startingIndex:c,disabledIndices:a}),o&&Vs(d,i,p)&&(d=$t(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=$t(e,{startingIndex:c-c%i-1,disabledIndices:a})),Vs(d,i,p)&&(d=c)),n.key===Yo&&(u&&Nt(n),c%i!==0?(d=$t(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Vs(d,i,p)&&(d=$t(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=$t(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Vs(d,i,p)&&(d=c));const f=Bo(l/i)===p;ra(e,d)&&(o&&f?d=n.key===Yo?l:$t(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function yN(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:l}=i;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<s;d++)for(let p=0;p<l;p++)u.push(o+d+p*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function bN(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function xN(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function js(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 kx=0;function cr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(kx);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():kx=requestAnimationFrame(i)}var Be=typeof document<"u"?E.useLayoutEffect:E.useEffect;function wN(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 SN(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 Px=k.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function TN(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=k.useState(()=>new Map),a=k.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=k.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Be(()=>{const l=new Map(o);Array.from(l.keys()).sort(wN).forEach((u,d)=>{l.set(u,d)}),SN(o,l)||i(l)},[o]),k.createElement(Px.Provider,{value:k.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function Ax(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=k.useContext(Px),[s,l]=k.useState(null),c=k.useRef(null),u=k.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d==null?void 0:d.textContent)!=null?p:null}},[s,i,a,t]);return Be(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Be(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),k.useMemo(()=>({ref:u,index:s??-1}),[s,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 _x=!1,EN=0;const Ix=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+EN++;function CN(){const[e,t]=k.useState(()=>_x?Ix():void 0);return Be(()=>{e==null&&t(Ix())},[]),k.useEffect(()=>{_x=!0},[]),e}const Zo=Ex.useId||CN;let oa;process.env.NODE_ENV!=="production"&&(oa=new Set);function $s(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.warn(o)}}function kN(){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=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.error(o)}}const Ox=k.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...m}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||$s("The `ref` prop is required for `FloatingArrow`."));const h=Zo(),[v,y]=k.useState(!1);if(Be(()=>{if(!o)return;Qt(o).direction==="rtl"&&y(!0)},[o]),!o)return null;const x=c*2,T=x/2,w=a/2*(l/-8+1),S=s/2*l/4,[C,P]=r.split("-"),I=!!p,_=C==="top"||C==="bottom",M=u&&P==="end"?"bottom":"top";let L=u&&P==="end"?"right":"left";u&&v&&(L=P==="end"?"left":"right");const $=(i==null?void 0:i.x)!=null?u||i.x:"",A=(i==null?void 0:i.y)!=null?u||i.y:"",O=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-S))+(" Q"+a/2+","+s+" "+w+","+(s-S))+" Z",N={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return k.createElement("svg",Ko({},g,{"aria-hidden":!0,ref:n,width:I?a:a+x,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[L]:$,[M]:A,[C]:_||I?"100%":"calc(100% - "+x/2+"px)",transform:""+N+(f??""),...m}}),x>0&&k.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:x+(p?0:1),d:O}),k.createElement("path",{stroke:x&&!p?g.fill:"none",d:O}),k.createElement("clipPath",{id:h},k.createElement("rect",{x:-T,y:T*(I?-1:1),width:a+x,height:a})))});function Mx(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Dx=k.createContext(null),Nx=k.createContext(null),ur=()=>{var e;return((e=k.useContext(Dx))==null?void 0:e.id)||null},dr=()=>k.useContext(Nx);function PN(e){const t=Zo(),n=dr(),o=ur();return Be(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function AN(e){const{children:t,id:n}=e,r=ur();return k.createElement(Dx.Provider,{value:k.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function _N(e){const{children:t}=e,n=k.useRef([]),r=k.useCallback(a=>{n.current=[...n.current,a]},[]),o=k.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=k.useState(()=>Mx())[0];return k.createElement(Nx.Provider,{value:k.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function fr(e){return"data-floating-ui-"+e}function Ft(e){const t=E.useRef(e);return Be(()=>{t.current=e}),t}const Fx=fr("safe-polygon");function qd(e,t,n){return n&&!zo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Lx(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:p=!0}=t,f=dr(),m=ur(),g=Ft(c),h=Ft(l),v=Ft(n),y=k.useRef(),x=k.useRef(-1),T=k.useRef(),w=k.useRef(-1),S=k.useRef(!0),C=k.useRef(!1),P=k.useRef(()=>{}),I=k.useCallback(()=>{var O;const N=(O=o.current.openEvent)==null?void 0:O.type;return(N==null?void 0:N.includes("mouse"))&&N!=="mousedown"},[o]);k.useEffect(()=>{if(!s)return;function O(N){let{open:V}=N;V||(clearTimeout(x.current),clearTimeout(w.current),S.current=!0)}return i.on("openchange",O),()=>{i.off("openchange",O)}},[s,i]),k.useEffect(()=>{if(!s||!g.current||!n)return;function O(V){I()&&r(!1,V,"hover")}const N=Mt(a.floating).documentElement;return N.addEventListener("mouseleave",O),()=>{N.removeEventListener("mouseleave",O)}},[a.floating,n,r,s,g,I]);const _=k.useCallback(function(O,N,V){N===void 0&&(N=!0),V===void 0&&(V="hover");const F=qd(h.current,"close",y.current);F&&!T.current?(clearTimeout(x.current),x.current=window.setTimeout(()=>r(!1,O,V),F)):N&&(clearTimeout(x.current),r(!1,O,V))},[h,r]),M=Pt(()=>{P.current(),T.current=void 0}),L=Pt(()=>{if(C.current){const O=Mt(a.floating).body;O.style.pointerEvents="",O.removeAttribute(Fx),C.current=!1}});k.useEffect(()=>{if(!s)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function N(D){if(clearTimeout(x.current),S.current=!1,u&&!zo(y.current)||d>0&&!qd(h.current,"open"))return;const R=qd(h.current,"open",y.current);R?x.current=window.setTimeout(()=>{v.current||r(!0,D,"hover")},R):r(!0,D,"hover")}function V(D){if(O())return;P.current();const R=Mt(a.floating);if(clearTimeout(w.current),g.current&&o.current.floatingContext){n||clearTimeout(x.current),T.current=g.current({...o.current.floatingContext,tree:f,x:D.clientX,y:D.clientY,onClose(){L(),M(),_(D,!0,"safe-polygon")}});const te=T.current;R.addEventListener("mousemove",te),P.current=()=>{R.removeEventListener("mousemove",te)};return}(y.current==="touch"?!yt(a.floating,D.relatedTarget):!0)&&_(D)}function F(D){O()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:D.clientX,y:D.clientY,onClose(){L(),M(),_(D)}})(D))}if(Je(a.domReference)){var z;const D=a.domReference;return n&&D.addEventListener("mouseleave",F),(z=a.floating)==null||z.addEventListener("mouseleave",F),p&&D.addEventListener("mousemove",N,{once:!0}),D.addEventListener("mouseenter",N),D.addEventListener("mouseleave",V),()=>{var R;n&&D.removeEventListener("mouseleave",F),(R=a.floating)==null||R.removeEventListener("mouseleave",F),p&&D.removeEventListener("mousemove",N),D.removeEventListener("mouseenter",N),D.removeEventListener("mouseleave",V)}}},[a,s,e,u,d,p,_,M,L,r,n,v,f,h,g,o]),Be(()=>{var O;if(s&&n&&(O=g.current)!=null&&O.__options.blockPointerEvents&&I()){const V=Mt(a.floating).body;V.setAttribute(Fx,""),V.style.pointerEvents="none",C.current=!0;const F=a.floating;if(Je(a.domReference)&&F){var N;const z=a.domReference,D=f==null||(N=f.nodesRef.current.find(R=>R.id===m))==null||(N=N.context)==null?void 0:N.elements.floating;return D&&(D.style.pointerEvents=""),z.style.pointerEvents="auto",F.style.pointerEvents="auto",()=>{z.style.pointerEvents="",F.style.pointerEvents=""}}}},[s,n,m,a,f,g,I]),Be(()=>{n||(y.current=void 0,M(),L())},[n,M,L]),k.useEffect(()=>()=>{M(),clearTimeout(x.current),clearTimeout(w.current),L()},[s,a.domReference,M,L]);const $=k.useMemo(()=>{function O(N){y.current=N.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(N){const{nativeEvent:V}=N;function F(){!S.current&&!v.current&&r(!0,V,"hover")}u&&!zo(y.current)||n||d===0||(clearTimeout(w.current),y.current==="touch"?F():w.current=window.setTimeout(F,d))}}},[u,r,n,v,d]),A=k.useMemo(()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(O){_(O.nativeEvent,!1)}}),[_]);return k.useMemo(()=>s?{reference:$,floating:A}:{},[s,$,A])}function IN(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Wr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function ON(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Wr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Xo=new WeakMap,Rs=new WeakSet,zs={},Ud=0;const MN=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Vx=e=>e&&(e.host||Vx(e.parentNode)),DN=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Vx(n);return e.contains(r)?r:null}).filter(n=>n!=null);function NN(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=DN(t,e),s=new Set,l=new Set(a),c=[];zs[o]||(zs[o]=new WeakMap);const u=zs[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,m=>{if(or(m)!=="script")if(s.has(m))p(m);else{const g=i?m.getAttribute(i):null,h=g!==null&&g!=="false",v=(Xo.get(m)||0)+1,y=(u.get(m)||0)+1;Xo.set(m,v),u.set(m,y),c.push(m),v===1&&h&&Rs.add(m),y===1&&m.setAttribute(o,""),!h&&i&&m.setAttribute(i,"true")}})}return Ud++,()=>{c.forEach(f=>{const m=(Xo.get(f)||0)-1,g=(u.get(f)||0)-1;Xo.set(f,m),u.set(f,g),m||(!Rs.has(f)&&i&&f.removeAttribute(i),Rs.delete(f)),g||f.removeAttribute(o)}),Ud--,Ud||(Xo=new WeakMap,Xo=new WeakMap,Rs=new WeakSet,zs={})}}function jx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Mt(e[0]).body;return NN(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Qo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function $x(e,t){const n=Ji(e,Qo());t==="prev"&&n.reverse();const r=n.indexOf(gn(Mt(e)));return n.slice(r+1)[0]}function Rx(){return $x(document.body,"next")}function zx(){return $x(document.body,"prev")}function ia(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!yt(n,r)}function FN(e){Ji(e,Qo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function LN(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 VN(e,t,n){const r=e.indexOf(t);function o(a){const s=fr("focus-guard");let l=r+(a?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(s)||yt(n,c));)a?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const Yd={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 jN;function Bx(e){e.key==="Tab"&&(e.target,clearTimeout(jN))}const Bs=k.forwardRef(function(t,n){const[r,o]=k.useState();Be(()=>(Pd()&&o("button"),document.addEventListener("keydown",Bx),()=>{document.removeEventListener("keydown",Bx)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[fr("focus-guard")]:"",style:Yd};return k.createElement("span",Ko({},t,i))}),Hx=k.createContext(null),Wx=fr("portal");function $N(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Zo(),o=qx(),[i,a]=k.useState(null),s=k.useRef(null);return Be(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),Be(()=>{if(!r||s.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Wx,""),l.appendChild(c),s.current=c,a(c)},[t,r]),Be(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Je(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(Wx,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function qr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=$N({id:n,root:r}),[a,s]=k.useState(null),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return k.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(m){i&&ia(m)&&(m.type==="focusin"?LN:FN)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),k.createElement(Hx.Provider,{value:k.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&k.createElement(Bs,{"data-type":"outside",ref:l,onFocus:f=>{if(ia(f,i)){var m;(m=u.current)==null||m.focus()}else{const g=zx()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&k.createElement("span",{"aria-owns":i.id,style:Yd}),i&&Oa.createPortal(t,i),p&&i&&k.createElement(Bs,{"data-type":"outside",ref:c,onFocus:f=>{if(ia(f,i)){var m;(m=d.current)==null||m.focus()}else{const g=Rx()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const qx=()=>k.useContext(Hx),RN=20;let Ur=[];function Gd(e){Ur=Ur.filter(n=>n.isConnected);let t=e;if(!(!t||or(t)==="body")){if(!RD(t,Qo())){const n=Ji(t,Qo())[0];n&&(t=n)}Ur.push(t),Ur.length>RN&&(Ur=Ur.slice(-20))}}function Ux(){return Ur.slice().reverse().find(e=>e.isConnected)}const zN=k.forwardRef(function(t,n){return k.createElement("button",Ko({},t,{type:"button",ref:n,tabIndex:-1,style:Yd}))});function Jo(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:f,nodeId:m,onOpenChange:g,events:h,dataRef:v,floatingId:y,elements:{domReference:x,floating:T}}=t,w=typeof a=="number"&&a<0,S=rx(x)&&w,C=MN()?i:!0,P=Ft(o),I=Ft(a),_=Ft(s),M=dr(),L=qx(),$=k.useRef(null),A=k.useRef(null),O=k.useRef(!1),N=k.useRef(!1),V=k.useRef(-1),F=L!=null,z=T==null?void 0:T.firstElementChild,D=(z==null?void 0:z.id)===y?z:T,R=Pt(function(Z){return Z===void 0&&(Z=D),Z?Ji(Z,Qo()):[]}),J=Pt(Z=>{const U=R(Z);return P.current.map(Y=>x&&Y==="reference"?x:D&&Y==="floating"?D:U).filter(Boolean).flat()});k.useEffect(()=>{if(r||!c)return;function Z(Y){if(Y.key==="Tab"){yt(D,gn(Mt(D)))&&R().length===0&&!S&&Nt(Y);const j=J(),W=On(Y);P.current[0]==="reference"&&W===x&&(Nt(Y),Y.shiftKey?cr(j[j.length-1]):cr(j[1])),P.current[1]==="floating"&&W===D&&Y.shiftKey&&(Nt(Y),cr(j[0]))}}const U=Mt(D);return U.addEventListener("keydown",Z),()=>{U.removeEventListener("keydown",Z)}},[r,x,D,c,P,S,R,J]),k.useEffect(()=>{if(r||!T)return;function Z(U){const Y=On(U),W=R().indexOf(Y);W!==-1&&(V.current=W)}return T.addEventListener("focusin",Z),()=>{T.removeEventListener("focusin",Z)}},[r,T,R]),k.useEffect(()=>{if(r||!d)return;function Z(){N.current=!0,setTimeout(()=>{N.current=!1})}function U(Y){const j=Y.relatedTarget;queueMicrotask(()=>{const W=!(yt(x,j)||yt(T,j)||yt(j,T)||yt(L==null?void 0:L.portalNode,j)||j!=null&&j.hasAttribute(fr("focus-guard"))||M&&(Wr(M.nodesRef.current,m).find(G=>{var ae,B;return yt((ae=G.context)==null?void 0:ae.elements.floating,j)||yt((B=G.context)==null?void 0:B.elements.domReference,j)})||IN(M.nodesRef.current,m).find(G=>{var ae,B;return((ae=G.context)==null?void 0:ae.elements.floating)===j||((B=G.context)==null?void 0:B.elements.domReference)===j})));if(l&&W&&gn(Mt(D))===Mt(D).body){Et(D)&&(D==null||D.focus());const G=V.current,ae=R(),B=ae[G]||ae[ae.length-1]||D;Et(B)&&B.focus()}(S||!c)&&j&&W&&!N.current&&j!==Ux()&&(O.current=!0,g(!1,Y))})}if(T&&Et(x))return x.addEventListener("focusout",U),x.addEventListener("pointerdown",Z),T.addEventListener("focusout",U),()=>{x.removeEventListener("focusout",U),x.removeEventListener("pointerdown",Z),T.removeEventListener("focusout",U)}},[r,x,T,D,c,m,M,L,g,d,l,R,S]),k.useEffect(()=>{var Z;if(r)return;const U=Array.from((L==null||(Z=L.portalNode)==null?void 0:Z.querySelectorAll("["+fr("portal")+"]"))||[]);if(T){const Y=[T,...U,$.current,A.current,P.current.includes("reference")||S?x:null].filter(W=>W!=null),j=c||S?jx(Y,C,!C):jx(Y);return()=>{j()}}},[r,x,T,c,P,L,S,C]),Be(()=>{if(r||!Et(D))return;const Z=Mt(D),U=gn(Z);queueMicrotask(()=>{const Y=J(D),j=I.current,W=(typeof j=="number"?Y[j]:j.current)||D,G=yt(D,U);!w&&!G&&p&&cr(W,{preventScroll:W===D})})},[r,p,D,w,J,I]),Be(()=>{if(r||!D)return;let Z=!1;const U=Mt(D),Y=gn(U);let W=v.current.openEvent;const G=f.domReference.current;Gd(Y);function ae(B){let{open:xe,reason:Ee,event:Oe,nested:$e}=B;xe&&(W=Oe),Ee==="escape-key"&&f.domReference.current&&Gd(f.domReference.current),Ee==="hover"&&Oe.type==="mouseleave"&&(O.current=!0),Ee==="outside-press"&&($e?(O.current=!1,Z=!0):O.current=!(tx(Oe)||kd(Oe)))}return h.on("openchange",ae),()=>{h.off("openchange",ae);const B=gn(U),xe=yt(T,B)||M&&Wr(M.nodesRef.current,m).some(se=>{var ye;return yt((ye=se.context)==null?void 0:ye.elements.floating,B)});(xe||W&&["click","mousedown"].includes(W.type))&&f.domReference.current&&Gd(f.domReference.current);const Oe=G||Y,$e=Ji(Mt(Oe).body,Qo());queueMicrotask(()=>{let se=Ux();!se&&Et(Oe)&&T&&(se=VN($e,Oe,T)),_.current&&!O.current&&Et(se)&&(!(se!==B&&B!==U.body)||xe)&&se.focus({preventScroll:Z})})}},[r,T,D,_,v,f,h,M,m]),Be(()=>{if(!r&&L)return L.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{L.setFocusManagerState(null)}},[r,L,c,p,g,f,d]),Be(()=>{if(r||!D||typeof MutationObserver!="function"||w)return;const Z=()=>{const Y=D.getAttribute("tabindex"),j=R(),W=gn(Mt(T)),G=j.indexOf(W);G!==-1&&(V.current=G),P.current.includes("floating")||W!==f.domReference.current&&j.length===0?Y!=="0"&&D.setAttribute("tabindex","0"):Y!=="-1"&&D.setAttribute("tabindex","-1")};Z();const U=new MutationObserver(Z);return U.observe(D,{childList:!0,subtree:!0,attributes:!0}),()=>{U.disconnect()}},[r,T,D,f,P,R,w]);function te(Z){return r||!u||!c?null:k.createElement(zN,{ref:Z==="start"?$:A,onClick:U=>g(!1,U.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&C&&(c?!S:!0)&&(F||c);return k.createElement(k.Fragment,null,ee&&k.createElement(Bs,{"data-type":"inside",ref:L==null?void 0:L.beforeInsideRef,onFocus:Z=>{if(c){const Y=J();cr(o[0]==="reference"?Y[0]:Y[Y.length-1])}else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(O.current=!1,ia(Z,L.portalNode)){const Y=Rx()||x;Y==null||Y.focus()}else{var U;(U=L.beforeOutsideRef.current)==null||U.focus()}}}),!S&&te("start"),n,te("end"),ee&&k.createElement(Bs,{"data-type":"inside",ref:L==null?void 0:L.afterInsideRef,onFocus:Z=>{if(c)cr(J()[0]);else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(d&&(O.current=!0),ia(Z,L.portalNode)){const Y=zx()||x;Y==null||Y.focus()}else{var U;(U=L.afterOutsideRef.current)==null||U.focus()}}}))}const Kd=new Set,BN=k.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Zo();return Be(()=>{if(!r)return;Kd.add(i);const a=/iP(hone|ad|od)|iOS/.test(Cd()),s=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=s.left?parseFloat(s.left):window.scrollX,p=s.top?parseFloat(s.top):window.scrollY;if(s.overflow="hidden",u&&(s[c]=u+"px"),a){var f,m;const g=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,h=((m=window.visualViewport)==null?void 0:m.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(p-Math.floor(h))+"px",left:-(d-Math.floor(g))+"px",right:"0"})}return()=>{Kd.delete(i),Kd.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),k.createElement("div",Ko({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Yx(e){return Et(e.target)&&e.target.tagName==="BUTTON"}function Gx(e){return Id(e)}function aa(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=k.useRef(),p=k.useRef(!1),f=k.useMemo(()=>({onPointerDown(m){d.current=m.pointerType},onMouseDown(m){const g=d.current;m.button===0&&s!=="click"&&(zo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){const g=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}zo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){d.current=void 0,!(m.defaultPrevented||!u||Yx(m))&&(m.key===" "&&!Gx(i)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||Yx(m)||Gx(i)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return k.useMemo(()=>a?{reference:f}:{},[a,f])}function HN(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=a.width,d=a.height,p=a.x,f=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),p-=n||0,f-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,p=s&&t.x!=null?t.x:p,f=l&&t.y!=null?t.y:f):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:p,y:f,top:f,right:p+u,bottom:f+d,left:p}}}}function Kx(e){return e!=null&&e.clientX!=null}function WN(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=k.useRef(!1),p=k.useRef(null),[f,m]=k.useState(),[g,h]=k.useState([]),v=Pt((S,C)=>{d.current||r.current.openEvent&&!Kx(r.current.openEvent)||a.setPositionReference(HN(i,{x:S,y:C,axis:l,dataRef:r,pointerType:f}))}),y=Pt(S=>{c!=null||u!=null||(n?p.current||h([]):v(S.clientX,S.clientY))}),x=zo(f)?o:n,T=k.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const S=Ht(o);function C(P){const I=On(P);yt(o,I)?(S.removeEventListener("mousemove",C),p.current=null):v(P.clientX,P.clientY)}if(!r.current.openEvent||Kx(r.current.openEvent)){S.addEventListener("mousemove",C);const P=()=>{S.removeEventListener("mousemove",C),p.current=null};return p.current=P,P}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,v]);k.useEffect(()=>T(),[T,g]),k.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),k.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),Be(()=>{s&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[s,c,u,v]);const w=k.useMemo(()=>{function S(C){let{pointerType:P}=C;m(P)}return{onPointerDown:S,onPointerEnter:S,onMouseMove:y,onMouseEnter:y}},[y]);return k.useMemo(()=>s?{reference:w}:{},[s,w])}const qN={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},UN={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Zx=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 Yr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=dr(),h=Pt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?h:l,y=k.useRef(!1),x=k.useRef(!1),{escapeKey:T,outsidePress:w}=Zx(f),{escapeKey:S,outsidePress:C}=Zx(m),P=Pt(A=>{var O;if(!n||!a||!s||A.key!=="Escape")return;const N=(O=i.current.floatingContext)==null?void 0:O.nodeId,V=g?Wr(g.nodesRef.current,N):[];if(!T&&(A.stopPropagation(),V.length>0)){let F=!0;if(V.forEach(z=>{var D;if((D=z.context)!=null&&D.open&&!z.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}r(!1,fD(A)?A.nativeEvent:A,"escape-key")}),I=Pt(A=>{var O;const N=()=>{var V;P(A),(V=On(A))==null||V.removeEventListener("keydown",N)};(O=On(A))==null||O.addEventListener("keydown",N)}),_=Pt(A=>{var O;const N=y.current;y.current=!1;const V=x.current;if(x.current=!1,c==="click"&&V||N||typeof v=="function"&&!v(A))return;const F=On(A),z="["+fr("inert")+"]",D=Mt(o.floating).querySelectorAll(z);let R=Je(F)?F:null;for(;R&&!ir(R);){const Z=Un(R);if(ir(Z)||!Je(Z))break;R=Z}if(D.length&&Je(F)&&!pD(F)&&!yt(F,o.floating)&&Array.from(D).every(Z=>!yt(R,Z)))return;if(Et(F)&&$){const Z=F.clientWidth>0&&F.scrollWidth>F.clientWidth,U=F.clientHeight>0&&F.scrollHeight>F.clientHeight;let Y=U&&A.offsetX>F.clientWidth;if(U&&Qt(F).direction==="rtl"&&(Y=A.offsetX<=F.offsetWidth-F.clientWidth),Y||Z&&A.offsetY>F.clientHeight)return}const J=(O=i.current.floatingContext)==null?void 0:O.nodeId,te=g&&Wr(g.nodesRef.current,J).some(Z=>{var U;return _d(A,(U=Z.context)==null?void 0:U.elements.floating)});if(_d(A,o.floating)||_d(A,o.domReference)||te)return;const ee=g?Wr(g.nodesRef.current,J):[];if(ee.length>0){let Z=!0;if(ee.forEach(U=>{var Y;if((Y=U.context)!=null&&Y.open&&!U.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}r(!1,A,"outside-press")}),M=Pt(A=>{var O;const N=()=>{var V;_(A),(V=On(A))==null||V.removeEventListener(c,N)};(O=On(A))==null||O.addEventListener(c,N)});k.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=T,i.current.__outsidePressBubbles=w;function A(V){r(!1,V,"ancestor-scroll")}const O=Mt(o.floating);s&&O.addEventListener("keydown",S?I:P,S),v&&O.addEventListener(c,C?M:_,C);let N=[];return p&&(Je(o.domReference)&&(N=ar(o.domReference)),Je(o.floating)&&(N=N.concat(ar(o.floating))),!Je(o.reference)&&o.reference&&o.reference.contextElement&&(N=N.concat(ar(o.reference.contextElement)))),N=N.filter(V=>{var F;return V!==((F=O.defaultView)==null?void 0:F.visualViewport)}),N.forEach(V=>{V.addEventListener("scroll",A,{passive:!0})}),()=>{s&&O.removeEventListener("keydown",S?I:P,S),v&&O.removeEventListener(c,C?M:_,C),N.forEach(V=>{V.removeEventListener("scroll",A)})}},[i,o,s,v,c,n,r,p,a,T,w,P,S,I,_,C,M]),k.useEffect(()=>{y.current=!1},[v,c]);const L=k.useMemo(()=>({onKeyDown:P,[qN[d]]:A=>{u&&r(!1,A.nativeEvent,"reference-press")}}),[P,r,u,d]),$=k.useMemo(()=>({onKeyDown:P,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[UN[c]]:()=>{y.current=!0}}),[P,c]);return k.useMemo(()=>a?{reference:L,floating:$}:{},[a,L,$])}function YN(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Zo(),i=k.useRef({}),[a]=k.useState(()=>Mx()),s=ur()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!Je(f)&&kN("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]=k.useState(r.reference),u=Pt((f,m,g)=>{i.current.openEvent=f?m:void 0,a.emit("openchange",{open:f,event:m,reason:g,nested:s}),n==null||n(f,m,g)}),d=k.useMemo(()=>({setPositionReference:c}),[]),p=k.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return k.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function Gr(e){e===void 0&&(e={});const{nodeId:t}=e,n=YN({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=k.useState(null),[s,l]=k.useState(null),u=(o==null?void 0:o.reference)||i,d=k.useRef(null),p=dr();Be(()=>{u&&(d.current=u)},[u]);const f=hN({...e,elements:{...o,...s&&{reference:s}}}),m=k.useCallback(x=>{const T=Je(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l(T),f.refs.setReference(T)},[f.refs]),g=k.useCallback(x=>{(Je(x)||x===null)&&(d.current=x,a(x)),(Je(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!Je(x))&&f.refs.setReference(x)},[f.refs]),h=k.useMemo(()=>({...f.refs,setReference:g,setPositionReference:m,domReference:d}),[f.refs,g,m]),v=k.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),y=k.useMemo(()=>({...f,...r,refs:h,elements:v,nodeId:t}),[f,h,v,t,r]);return Be(()=>{r.dataRef.current.floatingContext=y;const x=p==null?void 0:p.nodesRef.current.find(T=>T.id===t);x&&(x.context=y)}),k.useMemo(()=>({...f,context:y,refs:h,elements:v}),[f,h,v,y])}function GN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=k.useRef(!1),u=k.useRef(),d=k.useRef(!0);k.useEffect(()=>{if(!s)return;const f=Ht(a.domReference);function m(){!n&&Et(a.domReference)&&a.domReference===gn(Mt(a.domReference))&&(c.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",m),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",m),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),k.useEffect(()=>{if(!s)return;function f(m){let{reason:g}=m;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),k.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=k.useMemo(()=>({onPointerDown(f){kd(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const m=On(f.nativeEvent);if(l&&Je(m))try{if(Pd()&&nx())throw Error();if(!m.matches(":focus-visible"))return}catch{if(!d.current&&!Id(m))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const m=f.relatedTarget,g=f.nativeEvent,h=Je(m)&&m.hasAttribute(fr("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const y=gn(a.domReference?a.domReference.ownerDocument:document);!m&&y===a.domReference||yt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,y)||yt(a.domReference,y)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return k.useMemo(()=>s?{reference:p}:{},[s,p])}const Xx="active",Qx="selected";function Zd(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Xx]:a,[Qx]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1},...i,...t.map(a=>{const s=a?a[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[c,u]=l;if(!(o&&[Xx,Qx].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),a[c]=function(){for(var p,f=arguments.length,m=new Array(f),g=0;g<f;g++)m[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(h=>h(...m)).find(h=>h!==void 0)}}}else a[c]=u}),a),{})}}function Kr(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),o=k.useCallback(s=>Zd(s,e,"reference"),t),i=k.useCallback(s=>Zd(s,e,"floating"),n),a=k.useCallback(s=>Zd(s,e,"item"),r);return k.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let Jx=!1;function Hs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function e0(e,t){return Hs(t,e===Hd||e===na,e===Yo||e===Go)}function Xd(e,t,n){return Hs(t,e===na,n?e===Yo:e===Go)||e==="Enter"||e===" "||e===""}function KN(e,t,n){return Hs(t,n?e===Yo:e===Go,e===na)}function t0(e,t,n){return Hs(t,n?e===Go:e===Yo,e===Hd)}function Qd(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:h=!0,openOnArrowKeyDown:v=!0,disabledIndices:y=void 0,orientation:x="vertical",cols:T=1,scrollItemIntoView:w=!0,virtualItemRef:S,itemSizes:C,dense:P=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||$s("`useListNavigation` looping must be enabled to allow escaping."),m||$s("`useListNavigation` must be virtual to allow escaping.")),x==="vertical"&&T>1&&$s("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=ur(),_=dr(),M=Pt(s),L=k.useRef(g),$=k.useRef(c??-1),A=k.useRef(null),O=k.useRef(!0),N=k.useRef(M),V=k.useRef(!!o.floating),F=k.useRef(n),z=k.useRef(!1),D=k.useRef(!1),R=Ft(y),J=Ft(n),te=Ft(w),ee=Ft(o.floating),Z=Ft(c),[U,Y]=k.useState(),[j,W]=k.useState(),G=Pt(function(se,ye,K){K===void 0&&(K=!1);function ce(ie){m?(Y(ie.id),_==null||_.events.emit("virtualfocus",ie),S&&(S.current=ie)):cr(ie,{preventScroll:!0,sync:nx()&&Pd()?Jx||z.current:!1})}const Q=se.current[ye.current];Q&&ce(Q),requestAnimationFrame(()=>{const ie=se.current[ye.current]||Q;if(!ie)return;Q||ce(ie);const we=te.current;we&&B&&(K||!O.current)&&(ie.scrollIntoView==null||ie.scrollIntoView(typeof we=="boolean"?{block:"nearest",inline:"nearest"}:we))})});Be(()=>{document.createElement("div").focus({get preventScroll(){return Jx=!0,!1}})},[]),Be(()=>{l&&(n&&o.floating?L.current&&c!=null&&(D.current=!0,$.current=c,M(c)):V.current&&($.current=-1,N.current(null)))},[l,n,o.floating,c,M]),Be(()=>{if(l&&n&&o.floating)if(a==null){if(z.current=!1,Z.current!=null)return;if(V.current&&($.current=-1,G(i,$)),(!F.current||!V.current)&&L.current&&(A.current!=null||L.current===!0&&A.current==null)){let se=0;const ye=()=>{i.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(ye),se++):($.current=A.current==null||Xd(A.current,x,f)||p?Wd(i,R.current):Cx(i,R.current),A.current=null,M($.current))};ye()}}else ra(i,a)||($.current=a,G(i,$,D.current),D.current=!1)},[l,n,o.floating,a,Z,p,i,x,f,M,G,R]),Be(()=>{var se;if(!l||o.floating||!_||m||!V.current)return;const ye=_.nodesRef.current,K=(se=ye.find(ie=>ie.id===I))==null||(se=se.context)==null?void 0:se.elements.floating,ce=gn(Mt(o.floating)),Q=ye.some(ie=>ie.context&&yt(ie.context.elements.floating,ce));K&&!Q&&O.current&&K.focus({preventScroll:!0})},[l,o.floating,_,I,m]),Be(()=>{if(!l||!_||!m||I)return;function se(ye){W(ye.id),S&&(S.current=ye)}return _.events.on("virtualfocus",se),()=>{_.events.off("virtualfocus",se)}},[l,_,m,I,S]),Be(()=>{N.current=M,V.current=!!o.floating}),Be(()=>{n||(A.current=null)},[n]),Be(()=>{F.current=n},[n]);const ae=a!=null,B=k.useMemo(()=>{function se(K){if(!n)return;const ce=i.current.indexOf(K);ce!==-1&&M(ce)}return{onFocus(K){let{currentTarget:ce}=K;se(ce)},onClick:K=>{let{currentTarget:ce}=K;return ce.focus({preventScroll:!0})},...h&&{onMouseMove(K){let{currentTarget:ce}=K;se(ce)},onPointerLeave(K){let{pointerType:ce}=K;!O.current||ce==="touch"||($.current=-1,G(i,$),M(null),m||cr(ee.current,{preventScroll:!0}))}}}},[n,ee,G,h,i,M,m]),xe=Pt(se=>{if(O.current=!1,z.current=!0,!J.current&&se.currentTarget===ee.current)return;if(p&&t0(se.key,x,f)){Nt(se),r(!1,se.nativeEvent,"list-navigation"),Et(o.domReference)&&!m&&o.domReference.focus();return}const ye=$.current,K=Wd(i,y),ce=Cx(i,y);if(se.key==="Home"&&(Nt(se),$.current=K,M($.current)),se.key==="End"&&(Nt(se),$.current=ce,M($.current)),T>1){const Q=C||Array.from({length:i.current.length},()=>({width:1,height:1})),ie=yN(Q,T,P),we=ie.findIndex(ue=>ue!=null&&!js(i.current,ue,y)),X=ie.reduce((ue,_e,We)=>_e!=null&&!js(i.current,_e,y)?We:ue,-1);if($.current=ie[vN({current:ie.map(ue=>ue!=null?i.current[ue]:null)},{event:se,orientation:x,loop:d,cols:T,disabledIndices:xN([...y||i.current.map((ue,_e)=>js(i.current,_e)?_e:void 0),void 0],ie),minIndex:we,maxIndex:X,prevIndex:bN($.current>ce?K:$.current,Q,ie,T,se.key===na?"bl":se.key===Go?"tr":"tl"),stopEvent:!0})],M($.current),x==="both")return}if(e0(se.key,x)){if(Nt(se),n&&!m&&gn(se.currentTarget.ownerDocument)===se.currentTarget){$.current=Xd(se.key,x,f)?K:ce,M($.current);return}Xd(se.key,x,f)?d?$.current=ye>=ce?u&&ye!==i.current.length?-1:K:$t(i,{startingIndex:ye,disabledIndices:y}):$.current=Math.min(ce,$t(i,{startingIndex:ye,disabledIndices:y})):d?$.current=ye<=K?u&&ye!==-1?i.current.length:ce:$t(i,{startingIndex:ye,decrement:!0,disabledIndices:y}):$.current=Math.max(K,$t(i,{startingIndex:ye,decrement:!0,disabledIndices:y})),ra(i,$.current)?M(null):M($.current)}}),Ee=k.useMemo(()=>m&&n&&ae&&{"aria-activedescendant":j||U},[m,n,ae,j,U]),Oe=k.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...!rx(o.domReference)&&Ee,onKeyDown:xe,onPointerMove(){O.current=!0}}),[Ee,xe,o.domReference,x]),$e=k.useMemo(()=>{function se(K){g==="auto"&&tx(K.nativeEvent)&&(L.current=!0)}function ye(K){L.current=g,g==="auto"&&kd(K.nativeEvent)&&(L.current=!0)}return{...Ee,onKeyDown(K){O.current=!1;const ce=K.key.indexOf("Arrow")===0,Q=KN(K.key,x,f),ie=t0(K.key,x,f),we=e0(K.key,x),X=(p?Q:we)||K.key==="Enter"||K.key.trim()==="";if(m&&n){const Ct=_==null?void 0:_.nodesRef.current.find(Lt=>Lt.parentId==null),mt=_&&Ct?ON(_.nodesRef.current,Ct.id):null;if(ce&&mt&&S){const Lt=new KeyboardEvent("keydown",{key:K.key,bubbles:!0});if(Q||ie){var ue,_e;const Sn=((ue=mt.context)==null?void 0:ue.elements.domReference)===K.currentTarget,zn=ie&&!Sn?(_e=mt.context)==null?void 0:_e.elements.domReference:Q?i.current.find(wr=>(wr==null?void 0:wr.id)===U):null;zn&&(Nt(K),zn.dispatchEvent(Lt),W(void 0))}if(we&&mt.context&&mt.context.open&&mt.parentId&&K.currentTarget!==mt.context.elements.domReference){var We;Nt(K),(We=mt.context.elements.domReference)==null||We.dispatchEvent(Lt);return}}return xe(K)}if(!(!n&&!v&&ce)){if(X&&(A.current=p&&we?null:K.key),p){Q&&(Nt(K),n?($.current=Wd(i,R.current),M($.current)):r(!0,K.nativeEvent,"list-navigation"));return}we&&(c!=null&&($.current=c),Nt(K),!n&&v?r(!0,K.nativeEvent,"list-navigation"):xe(K),n&&M($.current))}},onFocus(){n&&!m&&M(null)},onPointerDown:ye,onMouseDown:se,onClick:se}},[U,Ee,xe,R,g,i,p,M,r,n,v,x,f,c,_,m,S]);return k.useMemo(()=>l?{reference:$e,floating:Oe,item:B}:{},[l,$e,Oe,B])}const ZN=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Zr(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=ZN.get(a))!=null?n:a,l=Zo(),u=ur()!=null,d=k.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&u&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,r,l,a]),p=k.useMemo(()=>{const m={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?m:{...m,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),f=k.useCallback(m=>{let{active:g,selected:h}=m;const v={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...v,"aria-selected":g&&h};case"combobox":return{...v,...g&&{"aria-selected":!0}}}return{}},[o,a]);return k.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const n0=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function ei(e,t){return typeof e=="function"?e(t):e}function XN(e,t){const[n,r]=k.useState(e);return e&&!n&&r(!0),k.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function QN(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[s,l]=k.useState("unmounted"),c=XN(n,a);return!c&&s==="close"&&l("unmounted"),Be(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function r0(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=k.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,m]=k.useState(()=>({...ei(i,c),...ei(n,c)})),{isMounted:g,status:h}=QN(e,{duration:a}),v=Ft(n),y=Ft(r),x=Ft(o),T=Ft(i);return Be(()=>{const w=ei(v.current,c),S=ei(x.current,c),C=ei(T.current,c),P=ei(y.current,c)||Object.keys(w).reduce((I,_)=>(I[_]="",I),{});if(h==="initial"&&m(I=>({transitionProperty:I.transitionProperty,...C,...w})),h==="open"&&m({transitionProperty:Object.keys(P).map(n0).join(","),transitionDuration:d+"ms",...C,...P}),h==="close"){const I=S||w;m({transitionProperty:Object.keys(I).map(n0).join(","),transitionDuration:p+"ms",...C,...I})}},[p,x,v,y,T,d,h,c]),{isMounted:g,styles:f}}function JN(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,m=k.useRef(),g=k.useRef(""),h=k.useRef((n=f??a)!=null?n:-1),v=k.useRef(null),y=Pt(s),x=Pt(l),T=Ft(u),w=Ft(p);Be(()=>{r&&(clearTimeout(m.current),v.current=null,g.current="")},[r]),Be(()=>{if(r&&g.current===""){var _;h.current=(_=f??a)!=null?_:-1}},[r,f,a]);const S=Pt(_=>{_?o.current.typing||(o.current.typing=_,x(_)):o.current.typing&&(o.current.typing=_,x(_))}),C=Pt(_=>{function M(N,V,F){const z=T.current?T.current(V,F):V.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(F.toLocaleLowerCase()))===0);return z?N.indexOf(z):-1}const L=i.current;if(g.current.length>0&&g.current[0]!==" "&&(M(L,L,g.current)===-1?S(!1):_.key===" "&&Nt(_)),L==null||w.current.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(Nt(_),S(!0)),L.every(N=>{var V,F;return N?((V=N[0])==null?void 0:V.toLocaleLowerCase())!==((F=N[1])==null?void 0:F.toLocaleLowerCase()):!0})&&g.current===_.key&&(g.current="",h.current=v.current),g.current+=_.key,clearTimeout(m.current),m.current=setTimeout(()=>{g.current="",h.current=v.current,S(!1)},d);const A=h.current,O=M(L,[...L.slice((A||0)+1),...L.slice(0,(A||0)+1)],g.current);O!==-1?(y(O),v.current=O):_.key!==" "&&(g.current="",S(!1))}),P=k.useMemo(()=>({onKeyDown:C}),[C]),I=k.useMemo(()=>({onKeyDown:C,onKeyUp(_){_.key===" "&&S(!1)}}),[C,S]);return k.useMemo(()=>c?{reference:P,floating:I}:{},[c,P,I])}function o0(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let a=0,s=i-1;a<i;s=a++){const[l,c]=t[a]||[0,0],[u,d]=t[s]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function eF(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function i0(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();function c(d,p){const f=performance.now(),m=f-l;if(a===null||s===null||m===0)return a=d,s=p,l=f,null;const g=d-a,h=p-s,y=Math.sqrt(g*g+h*h)/m;return a=d,s=p,l=f,y}const u=d=>{let{x:p,y:f,placement:m,elements:g,onClose:h,nodeId:v,tree:y}=d;return function(T){function w(){clearTimeout(o),h()}if(clearTimeout(o),!g.domReference||!g.floating||m==null||p==null||f==null)return;const{clientX:S,clientY:C}=T,P=[S,C],I=On(T),_=T.type==="mouseleave",M=yt(g.floating,I),L=yt(g.domReference,I),$=g.domReference.getBoundingClientRect(),A=g.floating.getBoundingClientRect(),O=m.split("-")[0],N=p>A.right-A.width/2,V=f>A.bottom-A.height/2,F=eF(P,$),z=A.width>$.width,D=A.height>$.height,R=(z?$:A).left,J=(z?$:A).right,te=(D?$:A).top,ee=(D?$:A).bottom;if(M&&(i=!0,!_))return;if(L&&(i=!1),L&&!_){i=!0;return}if(_&&Je(T.relatedTarget)&&yt(g.floating,T.relatedTarget)||y&&Wr(y.nodesRef.current,v).some(Y=>{let{context:j}=Y;return j==null?void 0:j.open}))return;if(O==="top"&&f>=$.bottom-1||O==="bottom"&&f<=$.top+1||O==="left"&&p>=$.right-1||O==="right"&&p<=$.left+1)return w();let Z=[];switch(O){case"top":Z=[[R,$.top+1],[R,A.bottom-1],[J,A.bottom-1],[J,$.top+1]];break;case"bottom":Z=[[R,A.top+1],[R,$.bottom-1],[J,$.bottom-1],[J,A.top+1]];break;case"left":Z=[[A.right-1,ee],[A.right-1,te],[$.left+1,te],[$.left+1,ee]];break;case"right":Z=[[$.right-1,ee],[$.right-1,te],[A.left+1,te],[A.left+1,ee]];break}function U(Y){let[j,W]=Y;switch(O){case"top":{const G=[z?j+t/2:N?j+t*4:j-t*4,W+t+1],ae=[z?j-t/2:N?j+t*4:j-t*4,W+t+1],B=[[A.left,N||z?A.bottom-t:A.top],[A.right,N?z?A.bottom-t:A.top:A.bottom-t]];return[G,ae,...B]}case"bottom":{const G=[z?j+t/2:N?j+t*4:j-t*4,W-t],ae=[z?j-t/2:N?j+t*4:j-t*4,W-t],B=[[A.left,N||z?A.top+t:A.bottom],[A.right,N?z?A.top+t:A.bottom:A.top+t]];return[G,ae,...B]}case"left":{const G=[j+t+1,D?W+t/2:V?W+t*4:W-t*4],ae=[j+t+1,D?W-t/2:V?W+t*4:W-t*4];return[...[[V||D?A.right-t:A.left,A.top],[V?D?A.right-t:A.left:A.right-t,A.bottom]],G,ae]}case"right":{const G=[j-t,D?W+t/2:V?W+t*4:W-t*4],ae=[j-t,D?W-t/2:V?W+t*4:W-t*4],B=[[V||D?A.left+t:A.right,A.top],[V?D?A.left+t:A.right:A.left+t,A.bottom]];return[G,ae,...B]}}}if(!o0([S,C],Z)){if(i&&!F)return w();if(!_&&r){const Y=c(T.clientX,T.clientY);if(Y!==null&&Y<.1)return w()}o0([S,C],U([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const ti=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[ta(10),zd({fallbackAxisSideDirection:"end"}),Rd(),Tx({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=Gr({open:n,middleware:i,transform:!0,whileElementsMounted:ea,onOpenChange:(m,g)=>{var v;const h=g==null?void 0:g.relatedTarget;h&&h.dataset.floating==="true"&&!m||(r(m),(v=e.onChange)==null||v.call(e,m))}}),c=aa(l),u=Yr(l),d=Zr(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=Kr([c,u,d]);return b.jsxs(E.Fragment,{children:[b.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&b.jsx(qr,{preserveTabOrder:!0,id:`${t}-portal`,children:b.jsx(Jo,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:b.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-2xl",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[b.jsx(Ox,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),b.jsx("header",{className:"mb-2",children:b.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},tF=e=>{const t=E.useRef(null),n=E.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=E.useState(e.open??!1);E.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=Gr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=aa(s,{enabled:e.disabled??!0}),u=Zr(s,{role:"tooltip"}),d=Yr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=Kr([c,u,d]);return b.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[b.jsx(go,{...f(e),as:ft.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:b.jsx(ft.span,{layoutId:o,children:e.trigger})}),b.jsx(Jn,{children:i?b.jsx(qr,{root:t,children:b.jsx(Jo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:b.jsx(ft.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},a0=300,nF=500,s0=(e="")=>Le("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),Jd=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),l0=E.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o,floatingClassName:i="",label:a,...s},l)=>{const[c,u]=E.useState(r??!1),[d,p]=E.useState(!1),[f,m]=E.useState(null),g=E.useRef([]),h=E.useRef([]),v=E.useContext(Jd),y=ur(),x=dr(),T=PN(),w=Ax(),S=y!==null,{floatingStyles:C,refs:P,context:I}=Gr({nodeId:T,open:c,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:ea,placement:S?"right":"bottom-start",middleware:[ta({mainAxis:S?0:4,alignmentAxis:S?-4:0}),zd(),Rd()]}),_=Zr(I,{role:"menu"}),M=Yr(I,{bubbles:!0}),L=Lx(I,{move:!1,enabled:n,delay:{open:a0},handleClose:i0({blockPointerEvents:!0})}),$=aa(I,{event:"mousedown",toggle:!S,ignoreMouse:S,keyboardHandlers:!0}),A=Qd(I,{loop:!0,listRef:g,activeIndex:f,nested:S,onNavigate:m}),O=JN(I,{activeIndex:f,listRef:h,resetMs:nF,onMatch:c?m:void 0}),{getReferenceProps:N,getFloatingProps:V,getItemProps:F}=Kr([L,$,_,M,A,O]);E.useEffect(()=>{if(!x)return;function D(){u(!1)}function R(J){J.nodeId!==T&&J.parentId===y&&u(!1)}return x.events.on("click",D),x.events.on("menuopen",R),()=>{x.events.off("click",D),x.events.off("menuopen",R)}},[x,T,y]),E.useEffect(()=>{c&&x&&x.events.emit("menuopen",{parentId:y,nodeId:T})},[x,c,T,y]);const z=o?s.className:Le(s0(s.className));return b.jsxs(AN,{id:T,children:[b.jsx(E.Fragment,{children:s.asChild?b.jsx(Ro,{...N(v.getItemProps({...s,onFocus(D){var R;(R=s.onFocus)==null||R.call(s,D),p(!1),v.setHasFocusInside(!0)}})),children:a,ref:Bd([P.setReference,w.ref,l]),tabIndex:S?v.activeIndex===w.index?0:-1:void 0,"data-open":c?"":void 0,"data-nested":S?"":void 0,role:S?"menuitem":void 0,"data-focus-inside":d?"":void 0,className:z}):b.jsxs("button",{type:"button",className:z,"data-open":c?"":void 0,"data-nested":S?"":void 0,role:S?"menuitem":void 0,"data-focus-inside":d?"":void 0,ref:Bd([P.setReference,w.ref,l]),tabIndex:S?v.activeIndex===w.index?0:-1:void 0,...N(v.getItemProps({...s,onFocus(D){var R;(R=s.onFocus)==null||R.call(s,D),p(!1),v.setHasFocusInside(!0)}})),children:[a,S&&b.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[b.jsx("span",{className:"sr-only",children:"Next menu"}),b.jsx(zu,{size:14})]})]})}),b.jsx(Jd.Provider,{value:{activeIndex:f,setActiveIndex:m,getItemProps:F,setHasFocusInside:p,isOpen:c},children:b.jsx(TN,{elementsRef:g,labelsRef:h,children:c&&b.jsx(qr,{preserveTabOrder:!0,children:b.jsx(Jo,{context:I,modal:!1,initialFocus:S?-1:0,returnFocus:!S,children:b.jsx(t,{...V(),ref:P.setFloating,style:{...s.style,...C},className:Le("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",i),children:e})})})})})]})}),rF=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(Jd),s=Ax({label:n?null:e}),l=dr(),c=s.index===a.activeIndex;return b.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:Bd([s.ref,i]),className:s0(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),a.setHasFocusInside(!0)}}),children:[r,t?b.jsx(t,{size:16}):null]})}),oF=E.forwardRef((e,t)=>ur()!==null?b.jsx(l0,{...e,isParent:!1,ref:t}):b.jsx(_N,{children:b.jsx(l0,{...e,isParent:!0,ref:t})})),iF=(e,t)=>$r()?t:window.matchMedia(e).matches,aF=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(iF(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},c0=()=>window.matchMedia("@media (pointer: coarse)"),sF=()=>{var r;const e=E.useRef($r()?null:c0()),[t,n]=E.useState($r()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?c0():e.current).addEventListener("change",i=>n(i.matches))},[]),t},lF=e=>{const t=sF(),n=E.useRef($r()?"":document.documentElement.style.overflowY);E.useEffect(()=>{const r=document.documentElement;if(e){if(n.current=document.documentElement.style.overflowY,r.style.overflowY="hidden",t||mb())return;r.style.padding=Xh(r)?"0 15px 0 0":""}else r.style.padding="",document.documentElement.style.overflowY=n.current},[e,t]),E.useEffect(()=>{if(!e)return;const r=new AbortController,o=document.documentElement,i=a=>a.target===o&&e?a.preventDefault():void 0;return o.addEventListener("wheel",i,{signal:r.signal,passive:!1}),o.addEventListener("scroll",i,{signal:r.signal,passive:!1}),()=>{r.abort()}},[e])},vn="600ms",cF={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:vn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:vn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:vn}},uF={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:vn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:vn}},ef={drawer:e=>e==="left"?cF:uF,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:vn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:vn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:vn,originY:"bottom"}},dialog:{exit:{opacity:0,scale:.97,animationDuration:vn},initial:{opacity:0,scale:.95,animationDuration:vn},enter:{opacity:1,scale:[1.05,1],animationDuration:vn}}},dF=uo("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"}}),fF={top:0,left:0,right:0,bottom:-1},pF=e=>e*.62,hF=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x,p=Math.abs(u+d);return e.value.set(p)}const i=e.parent.current.getBoundingClientRect(),a=e.value.get()||i.height,s=Math.abs(a-r.delta.y),l=pF(window.outerHeight);return s<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(s)}};return b.jsx(ft.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:fF,whileDrag:{cursor:"grabbing"},className:Le("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?b.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Ws={drawer:"right",sheet:"none",dialog:"none"},mF=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ws.drawer:Ws[o]:t?Ws[o]:Ws.sheet},gF=({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,layoutId:a,onChange:s,className:l,resizer:c=!0,closable:u=!0,forceType:d=!1,overlayClassName:p="",type:f="dialog",position:m,overlayClickClose:g=!1,ariaTitle:h,...v})=>{lF(e);const y=E.useId(),x=E.useId(),T=aF("(min-width: 64rem)"),w=f!=="dialog",S=mF(T,d,f,m),C=T||d?ef[f]:ef.sheet,P=typeof C=="function"?C(S):C,I=T||d?f:"sheet",{refs:_,context:M}=Gr({open:e,onOpenChange:s}),L=aa(M),$=Zr(M,{role:"dialog"}),A=Yr(M,{escapeKey:!0,referencePress:!0,outsidePress:g}),{getReferenceProps:O,getFloatingProps:N}=Kr([L,$,A]),V=o,F=Io(void 0),z=()=>s(!1);return b.jsxs(E.Fragment,{children:[o?b.jsx(E.Fragment,{children:r?b.jsx(Ro,{ref:_.setReference,...O({layoutId:a}),children:V}):b.jsx(ft.button,{ref:_.setReference,...O(),layoutId:a,type:"button",children:V})}):null,b.jsx(qr,{children:b.jsx(Jn,{mode:"wait",presenceAffectsLayout:!0,children:e?b.jsx(BN,{lockScroll:!1,className:Le(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${I==="drawer"?"":"flex items-start justify-center p-10"}`,p),children:b.jsx(Jo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:M,children:b.jsxs(ft.div,{...v,exit:"exit",animate:"enter",initial:"initial",variants:P,"data-component":"modal",ref:_.setFloating,"aria-modal":e,layoutId:a,className:Le(dF({position:S,type:I}),l),style:I==="drawer"?{width:F}:{height:F},...t?{"aria-labelledby":y,"aria-describedby":x}:{"aria-label":h},...N(),children:[t?b.jsx("header",{className:"relative w-full",children:t?b.jsx("h2",{id:y,className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,b.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:i}),n?b.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:n}):null,u?b.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:b.jsx("button",{type:"button",onClick:z,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:b.jsx(os,{})})}):null,w&&c?b.jsx(hF,{onChange:s,parent:_.floating,position:S,sheet:I==="sheet",value:F}):null]})})}):null})})]})},vF=e=>b.jsx(ft.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),tf=E.forwardRef(function({as:t,title:n,children:r,placement:o,open:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,followCursor:u=!1,onChange:d=ld,...p},f){const[m,g]=E.useState(i??!1),h=E.useRef(null),v=t||"span",y=A=>{g(A),d==null||d(A)},{refs:x,floatingStyles:T,context:w}=Gr({open:m,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:ea,onOpenChange:i?void 0:y,middleware:[Rd(),ta(5),zd({fallbackAxisSideDirection:"start"}),Tx({padding:5,element:h})]}),S=Lx(w,{move:!0,delay:{open:a0},enabled:l?s:!1,handleClose:c?i0():null}),C=GN(w,{enabled:l?a:!1}),P=aa(w,{enabled:l?c:!1}),I=Yr(w,{enabled:l}),_=Zr(w,{role:"tooltip",enabled:l}),M=WN(w,{enabled:!!l&&!!u}),{getReferenceProps:L,getFloatingProps:$}=Kr([_,I,M,a?C:void 0,s?S:void 0,c?P:void 0]);return E.useEffect(()=>g(i===void 0?!1:i),[i]),b.jsxs(E.Fragment,{children:[b.jsx(v,{...L(p),ref:Fa(x.setReference,f),children:n}),m&&b.jsx(qr,{preserveTabOrder:!0,children:b.jsxs(on,{...$(),ref:x.setFloating,style:T,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[b.jsx(Ox,{ref:h,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})});class qs{static getDescendantProperty(t,n,r=[]){let o,i,a,s,l,c;if(n){if(a=n.indexOf("."),a===-1?o=n:(o=n.slice(0,a),i=n.slice(a+1)),s=t[o],s!==null&&typeof s<"u")if(!i&&(typeof s=="string"||typeof s=="number"))r.push(s);else if(Object.prototype.toString.call(s)==="[object Array]")for(l=0,c=s.length;l<c;l++)qs.getDescendantProperty(s[l],i,r);else i&&qs.getDescendantProperty(s,i,r)}else r.push(t);return r}}class Xr{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=Xr.isMatch(o,t,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const a=qs.getDescendantProperty(o,this.keys[i]);let s=!1;for(let l=0;l<a.length;l++){const c=Xr.isMatch(a[l],t,this.options.caseSensitive);if(c){s=!0,n.push({item:o,score:c});break}}if(s)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Xr.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 Xr.indexesOfFirstLetter(t,n).forEach((a,s)=>{let l=a+1;o[s]=[a];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[s]=!1;break}o[s].push(l),l++}}),o=o.filter(a=>a!==!1),o.length?o.sort((a,s)=>a.length===1?a[0]-s[0]:(a=a[a.length-1]-a[0],s=s[s.length-1]-s[0],a-s))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}const Us=0,pr=1,ni=2,u0=4;function d0(e){return()=>e}function yF(e){e()}function sa(e,t){return n=>e(t(n))}function f0(e,t){return()=>e(t)}function p0(e,t){return n=>e(t,n)}function nf(e){return e!==void 0}function bF(...e){return()=>{e.map(yF)}}function ri(){}function Ys(e,t){return t(e),e}function xF(e,t){return t(e)}function at(...e){return e}function Xe(e,t){return e(pr,t)}function Me(e,t){e(Us,t)}function rf(e){e(ni)}function Rt(e){return e(u0)}function be(e,t){return Xe(e,p0(t,Us))}function Dn(e,t){const n=e(pr,r=>{n(),t(r)});return n}function h0(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function m0(e,t){return e===t}function st(e=m0){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ce(e){return t=>n=>{e(n)&&t(n)}}function he(e){return t=>sa(t,e)}function Nn(e){return t=>()=>{t(e)}}function re(e,...t){const n=wF(...t);return(r,o)=>{switch(r){case ni:rf(e);return;case pr:return Xe(e,n(o))}}}function Fn(e,t){return n=>r=>{n(t=e(t,r))}}function oi(e){return t=>n=>{e>0?e--:t(n)}}function hr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Ne(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Xe(i,l=>{const c=n;n=n|s,t[a]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function wF(...e){return t=>e.reduceRight(xF,t)}function SF(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case pr:return i?n===i?void 0:(r(),n=i,t=Xe(e,i),t):(r(),ri);case ni:r(),n=null;return}}}function le(e){let t=e;const n=ze();return(r,o)=>{switch(r){case Us:t=o;break;case pr:{o(t);break}case u0:return t}return n(r,o)}}function zt(e,t){return Ys(le(t),n=>be(e,n))}function ze(){const e=[];return(t,n)=>{switch(t){case Us:e.slice().forEach(r=>{r(n)});return;case ni:e.splice(0,e.length);return;case pr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function en(e){return Ys(ze(),t=>be(e,t))}function Ue(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:TF(),singleton:n}}const TF=()=>Symbol();function EF(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function At(...e){const t=ze(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Xe(i,l=>{n[a]=l,r=r|s,r===o&&Me(t,n)})}),function(i,a){switch(i){case ni:{rf(t);return}case pr:return r===o&&a(n),Xe(t,a)}}}function Pe(e,t=m0){return re(e,st(t))}function g0(...e){return function(t,n){switch(t){case ni:return;case pr:return bF(...e.map(r=>Xe(r,n)))}}}var tn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(tn||{});const CF={0:"debug",3:"error",1:"log",2:"warn"},kF=()=>typeof globalThis>"u"?window:globalThis,mr=Ue(()=>{const e=le(3);return{log:le((t,n,r=1)=>{var o;const i=(o=kF().VIRTUOSO_LOG_LEVEL)!=null?o:Rt(e);r>=i&&console[CF[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Ln(e,t,n){return of(e,t,n).callbackRef}function of(e,t,n){const r=E.useRef(null);let o=i=>{};if(typeof ResizeObserver<"u"){const i=E.useMemo(()=>new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}),[e]);o=a=>{a&&t?(i.observe(a),r.current=a):(r.current&&i.unobserve(r.current),r.current=null)}}return{callbackRef:o,ref:r}}function v0(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=PF(u.children,t,s?"offsetWidth":"offsetHeight",o);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const f=p.lastElementChild.dataset.viewportType==="window";let m;f&&(m=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?m.scrollX||m.document.documentElement.scrollLeft:m.scrollY||m.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:f?s?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,v=a?s?a.offsetWidth:a.offsetHeight:f?s?m.innerWidth:m.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:v}),i==null||i(s?y0("column-gap",getComputedStyle(u).columnGap,o):y0("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return of(c,n,l)}function PF(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const s=e.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},tn.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function y0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}function af(e,t,n){const r=E.useRef(null),o=E.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,p;if(t){const f=t.getBoundingClientRect(),m=c.top-f.top;p=f.height-Math.max(0,m),d=m+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;p=f.innerHeight-Math.max(0,c.top),d=c.top+f.scrollY}r.current={offsetTop:d,visibleHeight:p,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=of(o,!0,n),s=E.useCallback(()=>{o(a.current)},[o,a]);return E.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c==null||c.addEventListener("scroll",s),c==null||c.addEventListener("resize",s),()=>{c==null||c.removeEventListener("scroll",s),c==null||c.removeEventListener("resize",s)}}},[s,t]),i}const Wt=Ue(()=>{const e=ze(),t=ze(),n=le(0),r=ze(),o=le(0),i=ze(),a=ze(),s=le(0),l=le(0),c=le(0),u=le(0),d=ze(),p=ze(),f=le(!1),m=le(!1),g=le(!1);return be(re(e,he(({scrollTop:h})=>h)),t),be(re(e,he(({scrollHeight:h})=>h)),a),be(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:m,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),la={lvl:0};function b0(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function nt(e){return e===la}function ca(e,t){if(!nt(e))return t===e.k?e.v:t<e.k?ca(e.l,t):ca(e.r,t)}function yn(e,t,n="k"){if(nt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=yn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return yn(e.l,t,n)}function nn(e,t,n){return nt(e)?S0(t,n,1):t===e.k?_t(e,{k:t,v:n}):t<e.k?T0(_t(e,{l:nn(e.l,t,n)})):T0(_t(e,{r:nn(e.r,t,n)}))}function ii(){return la}function Gs(e,t,n){if(nt(e))return[];const r=yn(e,t)[0];return AF(lf(e,r,n))}function sf(e,t){if(nt(e))return la;const{k:n,l:r,r:o}=e;if(t===n){if(nt(r))return o;if(nt(o))return r;{const[i,a]=w0(r);return Ks(_t(e,{k:i,l:x0(r),v:a}))}}else return t<n?Ks(_t(e,{l:sf(r,t)})):Ks(_t(e,{r:sf(o,t)}))}function Qr(e){return nt(e)?[]:[...Qr(e.l),{k:e.k,v:e.v},...Qr(e.r)]}function lf(e,t,n){if(nt(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(lf(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(lf(i,t,n))),s}function Ks(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(cf(t))return E0(_t(e,{lvl:n-1}));if(!nt(t)&&!nt(t.r))return _t(t.r,{l:_t(t,{r:t.r.l}),lvl:n,r:_t(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(cf(e))return uf(_t(e,{lvl:n-1}));if(!nt(r)&&!nt(r.l)){const o=r.l,i=cf(o)?r.lvl-1:r.lvl;return _t(o,{l:_t(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:uf(_t(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function _t(e,t){return S0(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 x0(e){return nt(e.r)?e.l:Ks(_t(e,{r:x0(e.r)}))}function cf(e){return nt(e)||e.lvl>e.r.lvl}function w0(e){return nt(e.r)?[e.k,e.v]:w0(e.r)}function S0(e,t,n,r=la,o=la){return{k:e,l:r,lvl:n,r:o,v:t}}function T0(e){return uf(E0(e))}function E0(e){const{l:t}=e;return!nt(t)&&t.lvl===e.lvl?_t(t,{r:_t(e,{l:t.r})}):e}function uf(e){const{lvl:t,r:n}=e;return!nt(n)&&!nt(n.r)&&n.lvl===t&&n.r.lvl===t?_t(n,{l:_t(e,{r:n.l}),lvl:t+1}):e}function AF(e){return b0(e,({k:t,v:n})=>({index:t,value:n}))}function C0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ua(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const df=Ue(()=>({recalcInProgress:le(!1)}),[],{singleton:!0});function k0(e,t,n){return e[Zs(e,t,n)]}function Zs(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),a=e[i],s=n(a,t);if(s===0)return i;if(s===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function _F(e,t,n,r){const o=Zs(e,t,r),i=Zs(e,n,r,o);return e.slice(o,i+1)}function bn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Xs(e){return!nt(e.groupOffsetTree)}function ff({index:e},t){return t===e?0:t<e?-1:1}function IF(){return{groupIndices:[],groupOffsetTree:ii(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:ii()}}function OF(e,t){let n=nt(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),nt(e)){e=nn(e,0,i);continue}const s=Gs(e,a-1,o+1);if(s.some(jF(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=sf(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=nn(e,o+1,p));c&&(e=nn(e,a,i))}return[e,n]}function MF(e){return typeof e.groupIndex<"u"}function DF({offset:e},t){return t===e?0:t<e?-1:1}function da(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=k0(t,e,ff),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function P0(e,t){if(!Xs(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function A0(e,t,n){if(MF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=P0(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function NF(e,t,n,r=0){return r>0&&(t=Math.max(t,k0(e,r,ff).offset)),b0(_F(e,t,n,DF),VF)}function FF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,tn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&nt(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((m,g)=>nn(nn(m,g,p),g+1,f),a)}else[a,s]=OF(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=pf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>nn(p,f,da(f,d,o)),ii()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function LF(e){return Qr(e).map(({k:t,v:n},r,o)=>{const i=o[r+1];return{endIndex:i?i.k-1:1/0,size:n,startIndex:t}})}function _0(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 pf(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Zs(o,t-1,ff),s=o[l].offset;const c=yn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===yn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Gs(n,t,1/0)){const d=c-i,p=d*a+s+d*r;o.push({index:c,offset:p,size:u}),i=c,s=p,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function VF(e){return{index:e.index,value:e}}function jF(e){const{endIndex:t,size:n,startIndex:r}=e;return o=>o.start===r&&(o.end===t||o.end===1/0)&&o.value===n}const $F={offsetHeight:"height",offsetWidth:"width"},Vn=Ue(([{log:e},{recalcInProgress:t}])=>{const n=ze(),r=ze(),o=zt(r,0),i=ze(),a=ze(),s=le(0),l=le([]),c=le(void 0),u=le(void 0),d=le((w,S)=>bn(w,$F[S])),p=le(void 0),f=le(0),m=IF(),g=zt(re(n,Ne(l,e,f),Fn(FF,m),st()),m),h=zt(re(l,st(),Fn((w,S)=>({current:S,prev:w.current}),{current:[],prev:[]}),he(({prev:w})=>w)),[]);be(re(l,Ce(w=>w.length>0),Ne(g,f),he(([w,S,C])=>{const P=w.reduce((I,_,M)=>nn(I,_,da(_,S.offsetTree,C)||M),ii());return{...S,groupIndices:w,groupOffsetTree:P}})),g),be(re(r,Ne(g),Ce(([w,{lastIndex:S}])=>w<S),he(([w,{lastIndex:S,lastSize:C}])=>[{endIndex:S,size:C,startIndex:w}])),n),be(c,u);const v=zt(re(c,he(w=>w===void 0)),!0);be(re(u,Ce(w=>w!==void 0&&nt(Rt(g).sizeTree)),he(w=>[{endIndex:0,size:w,startIndex:0}])),n);const y=en(re(n,Ne(g),Fn(({sizes:w},[S,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:m}),he(w=>w.changed)));Xe(re(s,Fn((w,S)=>({diff:w.prev-S,prev:S}),{diff:0,prev:0}),he(w=>w.diff)),w=>{const{groupIndices:S}=Rt(g);if(w>0)Me(t,!0),Me(i,w+_0(w,S));else if(w<0){const C=Rt(h);C.length>0&&(w-=_0(-w,C)),Me(a,w)}}),Xe(re(s,Ne(e)),([w,S])=>{w<0&&S("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},tn.ERROR)});const x=en(i);be(re(i,Ne(g),he(([w,S])=>{const C=S.groupIndices.length>0,P=[],I=S.lastSize;if(C){const _=ca(S.sizeTree,0);let M=0,L=0;for(;M<w;){const A=S.groupIndices[L],O=S.groupIndices.length===L+1?1/0:S.groupIndices[L+1]-A-1;P.push({endIndex:A,size:_,startIndex:A}),P.push({endIndex:A+1+O-1,size:I,startIndex:A+1}),L++,M+=O+1}const $=Qr(S.sizeTree);return M!==w&&$.shift(),$.reduce((A,{k:O,v:N})=>{let V=A.ranges;return A.prevSize!==0&&(V=[...A.ranges,{endIndex:O+w-1,size:A.prevSize,startIndex:A.prevIndex}]),{prevIndex:O+w,prevSize:N,ranges:V}},{prevIndex:w,prevSize:0,ranges:P}).ranges}return Qr(S.sizeTree).reduce((_,{k:M,v:L})=>({prevIndex:M+w,prevSize:L,ranges:[..._.ranges,{endIndex:M+w-1,size:_.prevSize,startIndex:_.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const T=en(re(a,Ne(g,f),he(([w,{offsetTree:S},C])=>{const P=-w;return da(P,S,C)})));return be(re(a,Ne(g,f),he(([w,S,C])=>{if(S.groupIndices.length>0){if(nt(S.sizeTree))return S;let P=ii();const I=Rt(h);let _=0,M=0,L=0;for(;_<-w;){L=I[M];const $=I[M+1]-L-1;M++,_+=$+1}if(P=Qr(S.sizeTree).reduce(($,{k:A,v:O})=>nn($,Math.max(0,A+w),O),P),_!==-w){const $=ca(S.sizeTree,L);P=nn(P,0,$);const A=yn(S.sizeTree,-w+1)[1];P=nn(P,1,A)}return{...S,sizeTree:P,...pf(S.offsetTree,0,P,C)}}else{const P=Qr(S.sizeTree).reduce((I,{k:_,v:M})=>nn(I,Math.max(0,_+w),M),ii());return{...S,sizeTree:P,...pf(S.offsetTree,0,P,C)}}})),g),{beforeUnshiftWith:x,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:y,shiftWith:a,shiftWithOffset:T,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}},at(mr,df),{singleton:!0});function RF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const I0=Ue(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=ze(),a=ze(),s=en(re(i,he(RF)));return be(re(s,he(l=>l.totalCount)),n),be(re(s,he(l=>l.groupIndices)),e),be(re(At(o,t,r),Ce(([l,c])=>Xs(c)),he(([l,c,u])=>yn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),st(),he(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},at(Vn,Wt)),gr=Ue(([{log:e}])=>{const t=le(!1),n=en(re(t,Ce(r=>r),st()));return Xe(t,r=>{r&&Rt(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},at(mr),{singleton:!0}),zF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function O0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!zF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const fa=Ue(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=ze(),m=ze(),g=le(0);let h=null,v=null,y=null;function x(){h&&(h(),h=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),Me(l,!1)}return be(re(f,Ne(n,d,r,g,s,a,p),Ne(e,i,o),he(([[T,w,S,C,P,I,_,M],L,$,A])=>{const O=O0(T),{align:N,behavior:V,offset:F}=O,z=C-1,D=A0(O,w,z);let R=da(D,w.offsetTree,L)+I;N==="end"?(R+=$+yn(w.sizeTree,D)[1]-S+A,D===z&&(R+=_)):N==="center"?R+=($+yn(w.sizeTree,D)[1]-S+A)/2:R-=P,F&&(R+=F);const J=te=>{x(),te?(M("retrying to scroll to",{location:T},tn.DEBUG),Me(f,T)):(Me(m,!0),M("list did not change, scroll successful",{},tn.DEBUG))};if(x(),V==="smooth"){let te=!1;y=Xe(t,ee=>{te=te||ee}),h=Dn(u,()=>{J(te)})}else h=Dn(re(t,BF(150)),J);return v=setTimeout(()=>{x()},1200),Me(l,!0),M("scrolling from index to",{behavior:V,index:D,top:R},tn.DEBUG),{behavior:V,top:R}})),c),{scrollTargetReached:m,scrollToIndex:f,topListHeight:g}},at(Vn,Wt,mr),{singleton:!0});function BF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function hf(e,t){e==0?t():requestAnimationFrame(()=>{hf(e-1,t)})}function mf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const pa=Ue(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=le(!0),l=le(0),c=le(!0);return be(re(a,Ne(l),Ce(([u,d])=>!!d),Nn(!1)),s),be(re(a,Ne(l),Ce(([u,d])=>!!d),Nn(!1)),c),Xe(re(At(t,a),Ne(s,n,e,c),Ce(([[,u],d,{sizeTree:p},f,m])=>u&&(!nt(p)||nf(f))&&!d&&!m),Ne(l)),([,u])=>{Dn(o,()=>{Me(c,!0)}),hf(4,()=>{Dn(r,()=>{Me(s,!0)}),Me(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},at(Vn,Wt,fa,gr),{singleton:!0});function M0(e,t){return Math.abs(e-t)<1.01}const ha="up",ma="down",HF="none",WF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},qF=0,ga=Ue(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=le(!1),s=le(!0),l=ze(),c=ze(),u=le(4),d=le(qF),p=zt(re(g0(re(Pe(o),oi(1),Nn(!0)),re(Pe(o),oi(1),Nn(!1),h0(100))),st()),!1),f=zt(re(g0(re(n,Nn(!0)),re(n,Nn(!1),h0(200))),st()),!1);be(re(At(Pe(o),Pe(d)),he(([y,x])=>y<=x),st()),s),be(re(s,hr(50)),c);const m=en(re(At(r,Pe(i),Pe(t),Pe(e),Pe(u)),Fn((y,[{scrollHeight:x,scrollTop:T},w,S,C,P])=>{const I=T+w-x>-P,_={scrollHeight:x,scrollTop:T,viewportHeight:w};if(I){let L,$;return T>y.state.scrollTop?(L="SCROLLED_DOWN",$=y.state.scrollTop-T):(L="SIZE_DECREASED",$=y.state.scrollTop-T||y.scrollTopDelta),{atBottom:!0,atBottomBecause:L,scrollTopDelta:$,state:_}}let M;return _.scrollHeight>y.state.scrollHeight?M="SIZE_INCREASED":w<y.state.viewportHeight?M="VIEWPORT_HEIGHT_DECREASING":T<y.state.scrollTop?M="SCROLLING_UPWARDS":M="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:M,state:_}},WF),st((y,x)=>y&&y.atBottom===x.atBottom))),g=zt(re(r,Fn((y,{scrollHeight:x,scrollTop:T,viewportHeight:w})=>{if(M0(y.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:T};{const S=x-(T+w)<1;return y.scrollTop!==T&&S?{changed:!0,jump:y.scrollTop-T,scrollHeight:x,scrollTop:T}:{changed:!0,jump:0,scrollHeight:x,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ce(y=>y.changed),he(y=>y.jump)),0);be(re(m,he(y=>y.atBottom)),a),be(re(a,hr(50)),l);const h=le(ma);be(re(r,he(({scrollTop:y})=>y),st(),Fn((y,x)=>Rt(f)?{direction:y.direction,prevScrollTop:x}:{direction:x<y.prevScrollTop?ha:ma,prevScrollTop:x},{direction:ma,prevScrollTop:0}),he(y=>y.direction)),h),be(re(r,hr(50),Nn(HF)),h);const v=le(0);return be(re(p,Ce(y=>!y),Nn(0)),v),be(re(o,hr(100),Ne(p),Ce(([y,x])=>!!x),Fn(([y,x],[T])=>[x,T],[0,0]),he(([y,x])=>x-y)),v),{atBottomState:m,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:v}},at(Wt)),Qs="top",Js="bottom",D0="none";function N0(e,t,n){return typeof e=="number"?n===ha&&t===Qs||n===ma&&t===Js?e:0:n===ha?t===Qs?e.main:e.reverse:t===Js?e.main:e.reverse}function F0(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const gf=Ue(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=ze(),a=le(0),s=le(0),l=le(0),c=zt(re(At(Pe(r),Pe(o),Pe(n),Pe(i,ua),Pe(l),Pe(a),Pe(t),Pe(e),Pe(s)),he(([u,d,p,[f,m],g,h,v,y,x])=>{const T=u-y,w=h+v,S=Math.max(p-T,0);let C=D0;const P=F0(x,Qs),I=F0(x,Js);return f-=y,f+=p+v,m+=p+v,m-=y,f>u+w-P&&(C=ha),m<u-S+d+I&&(C=ma),C!==D0?[Math.max(T-p-N0(g,Qs,C)-P,0),T-S-v+d+N0(g,Js,C)+I]:null}),Ce(u=>u!=null),st(ua)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},at(Wt),{singleton:!0});function UF(e,t,n){if(Xs(t)){const r=P0(e,t);return[{index:yn(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:r,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:e,offset:0,size:0}]}const vf={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function el(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-a,p=s+d*l+(d-1)*r,f=c,m=p-u;return{bottom:u,firstItemIndex:i,items:V0(e,o,i),offsetBottom:m,offsetTop:c,top:f,topItems:V0(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function L0(e,t,n,r,o,i){let a=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-a>=e)break;a++}const s=e+a,l=mf(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return el(c,[],s,o,n,r)}function V0(e,t,n){if(e.length===0)return[];if(!Xs(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],a=Gs(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}const Jr=Ue(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:m}])=>{const g=le([]),h=le(0),v=ze();be(i.topItemsIndexes,g);const y=zt(re(At(f,m,Pe(l,ua),Pe(o),Pe(r),Pe(c),u,Pe(g),Pe(t),Pe(n),e),Ce(([S,C,,P,,,,,,,I])=>{const _=I&&I.length!==P;return S&&!C&&!_}),he(([,,[S,C],P,I,_,M,L,$,A,O])=>{const N=I,{offsetTree:V,sizeTree:F}=N,z=Rt(h);if(P===0)return{...vf,totalCount:P};if(S===0&&C===0)return z===0?{...vf,totalCount:P}:L0(z,_,I,$,A,O||[]);if(nt(F))return z>0?null:el(UF(mf(_,P),N,O),[],P,A,N,$);const D=[];if(L.length>0){const Z=L[0],U=L[L.length-1];let Y=0;for(const j of Gs(F,Z,U)){const W=j.value,G=Math.max(j.start,Z),ae=Math.min(j.end,U);for(let B=G;B<=ae;B++)D.push({data:O==null?void 0:O[B],index:B,offset:Y,size:W}),Y+=W}}if(!M)return el([],D,P,A,N,$);const R=L.length>0?L[L.length-1]+1:0,J=NF(V,S,C,R);if(J.length===0)return null;const te=P-1,ee=Ys([],Z=>{for(const U of J){const Y=U.value;let j=Y.offset,W=U.start;const G=Y.size;if(Y.offset<S){W+=Math.floor((S-Y.offset+A)/(G+A));const B=W-U.start;j+=B*G+B*A}W<R&&(j+=(R-W)*G,W=R);const ae=Math.min(U.end,te);for(let B=W;B<=ae&&!(j>=C);B++)Z.push({data:O==null?void 0:O[B],index:B,offset:j,size:G}),j+=G+A}});return el(ee,D,P,A,N,$)}),Ce(S=>S!==null),st()),vf);be(re(e,Ce(nf),he(S=>S==null?void 0:S.length)),o),be(re(y,he(S=>S.topListHeight)),d),be(d,s),be(re(y,he(S=>[S.top,S.bottom])),a),be(re(y,he(S=>S.items)),v);const x=en(re(y,Ce(({items:S})=>S.length>0),Ne(o,e),Ce(([{items:S},C])=>S[S.length-1].originalIndex===C-1),he(([,S,C])=>[S-1,C]),st(ua),he(([S])=>S))),T=en(re(y,hr(200),Ce(({items:S,topItems:C})=>S.length>0&&S[0].originalIndex===C.length),he(({items:S})=>S[0].index),st())),w=en(re(y,Ce(({items:S})=>S.length>0),he(({items:S})=>{let C=0,P=S.length-1;for(;S[C].type==="group"&&C<P;)C++;for(;S[P].type==="group"&&P>C;)P--;return{endIndex:S[P].index,startIndex:S[C].index}}),st(C0)));return{endReached:x,initialItemCount:h,itemsRendered:v,listState:y,rangeChanged:w,startReached:T,topItemsIndexes:g,...p}},at(Vn,I0,gf,pa,fa,ga,gr,df),{singleton:!0}),j0=Ue(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=ze(),a=zt(re(At(n,e,r,t,o),he(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return be(Pe(a),i),{totalListHeight:a,totalListHeightChanged:i}},at(Wt,Jr),{singleton:!0}),YF=Ue(([{viewportHeight:e},{totalListHeight:t}])=>{const n=le(!1),r=zt(re(At(n,e,t),Ce(([o])=>o),he(([,o,i])=>Math.max(0,o-i)),hr(0),st()),0);return{alignToBottom:n,paddingTopAddition:r}},at(Wt,j0),{singleton:!0});function $0(e){return e?e==="smooth"?"smooth":"auto":!1}const GF=(e,t)=>typeof e=="function"?$0(e(t)):t&&$0(e),KF=Ue(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=le(!1),d=ze();let p=null;function f(g){Me(o,{align:"end",behavior:g,index:"LAST"})}Xe(re(At(re(Pe(t),oi(1)),a),Ne(Pe(u),r,i,c),he(([[g,h],v,y,x,T])=>{let w=h&&x,S="auto";return w&&(S=GF(v,y||T),w=w&&!!S),{followOutputBehavior:S,shouldFollow:w,totalCount:g}}),Ce(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:h})=>{p&&(p(),p=null),p=Dn(e,()=>{Rt(l)("following output to ",{totalCount:h},tn.DEBUG),f(g),p=null})});function m(g){const h=Dn(n,v=>{g&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Rt(l)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(h,100)}return Xe(re(At(Pe(u),t,s),Ce(([g,,h])=>g&&h),Fn(({value:g},[,h])=>({refreshed:g===h,value:h}),{refreshed:!1,value:0}),Ce(({refreshed:g})=>g),Ne(u,t)),([,g])=>{Rt(i)&&m(g!==!1)}),Xe(d,()=>{m(Rt(u)!==!1)}),Xe(At(Pe(u),n),([g,h])=>{g&&!h.atBottom&&h.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},at(Vn,ga,fa,pa,gr,mr,Wt)),ZF=Ue(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(be(re(s,Ne(i),Ce(([,l])=>l!==0),Ne(o,r,t,n,e),he(([[,l],c,u,d,p,f=[]])=>L0(l,c,u,d,p,f))),a),{}),at(Vn,pa,Jr,gr),{singleton:!0}),XF=Ue(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=le(0);return Xe(re(e,Ne(r),Ce(([,o])=>o!==0),he(([,o])=>({top:o}))),o=>{Dn(re(n,oi(1),Ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Me(t,o)})})}),{initialScrollTop:r}},at(gr,Wt,Jr),{singleton:!0}),QF=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:a})=>t<a?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,JF=Ue(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=ze();return be(re(u,Ne(t,l,n,i,o,r,s),Ne(e),he(([[d,p,f,m,g,h,v,y],x])=>{const{align:T,behavior:w,calculateViewLocation:S=QF,done:C,...P}=d,I=A0(d,p,m-1),_=da(I,p.offsetTree,x)+g+h,M=_+yn(p.sizeTree,I)[1],L=y+h,$=y+f-v,A=S({itemBottom:M,itemTop:_,locationParams:{align:T,behavior:w,...P},viewportBottom:$,viewportTop:L});return A?C&&Dn(re(a,Ce(O=>!O),oi(Rt(a)?1:2)),C):C&&C(),A}),Ce(d=>d!==null)),c),{scrollIntoView:u}},at(Vn,Wt,fa,Jr,mr),{singleton:!0}),R0=Ue(([{scrollVelocity:e}])=>{const t=le(!1),n=ze(),r=le(!1);return be(re(e,Ne(r,t,n),Ce(([o,i])=>!!i),he(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),st()),t),Xe(re(At(t,e,n),Ne(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},at(ga),{singleton:!0}),yf=Ue(([{scrollContainerState:e,scrollTo:t}])=>{const n=ze(),r=ze(),o=ze(),i=le(!1),a=le(void 0);return be(re(At(n,r),he(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),be(re(t,Ne(r),he(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},at(Wt)),e2=Ue(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=ze(),u=le(void 0),d=le(null),p=le(null);return be(s,d),be(l,p),Xe(re(c,Ne(t,r,a,d,p,n)),([f,m,g,h,v,y,x])=>{const T=LF(m.sizeTree);h&&v!==null&&y!==null&&(g=v.scrollTop-y.offsetTop),g-=x,f({ranges:T,scrollTop:g})}),be(re(u,Ce(nf),he(t2)),o),be(re(i,Ne(u),Ce(([,f])=>f!==void 0),st(),he(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},at(Vn,Wt,pa,gr,yf));function t2(e){return{align:"start",index:0,offset:e.scrollTop}}const n2=Ue(([{topItemsIndexes:e}])=>{const t=le(0);return be(re(t,Ce(n=>n>=0),he(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},at(Jr));function z0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const r2=z0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),o2=Ue(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:m}])=>{const g=en(re(l,Ne(a),Fn(([,v,y,x],[{bottom:T,items:w,offsetBottom:S,totalCount:C},P])=>{const I=T+S;let _=0;return y===C&&v.length>0&&w.length>0&&(w[0].originalIndex===0&&v[0].originalIndex===0||(_=I-x,_!==0&&(_+=P))),[_,w,C,I]},[0,[],0,0]),Ce(([v])=>v!==0),Ne(r,s,n,o,f,m),Ce(([,v,y,x,,,T])=>!T&&!x&&v!==0&&y===ha),he(([[v],,,,,y])=>(y("Upward scrolling compensation",{amount:v},tn.DEBUG),v))));function h(v){v>0?(Me(t,{behavior:"auto",top:-v}),Me(e,0)):(Me(e,0),Me(t,{behavior:"auto",top:-v}))}return Xe(re(g,Ne(e,i)),([v,y,x])=>{x&&r2()?Me(e,y-v):h(-v)}),Xe(re(At(zt(i,!1),e,m),Ce(([v,y,x])=>!v&&!x&&y!==0),he(([v,y])=>y),hr(1)),h),be(re(d,he(v=>({top:-v}))),t),Xe(re(c,Ne(p,u),he(([v,{groupIndices:y,lastSize:x,sizeTree:T},w])=>{function S(C){return C*(x+w)}if(y.length===0)return S(v);{let C=0;const P=ca(T,0);let I=0,_=0;for(;I<v;){I++,C+=P;let M=y.length===_+1?1/0:y[_+1]-y[_]-1;I+M>v&&(C-=P,M=v-I+1),I+=M,C+=S(M),_++}return C}})),v=>{Me(e,v),requestAnimationFrame(()=>{Me(t,{top:v}),requestAnimationFrame(()=>{Me(e,0),Me(m,!1)})})}),{deviation:e}},at(Wt,ga,Jr,Vn,mr,df)),i2=Ue(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),at(gf,ZF,gr,R0,j0,XF,YF,yf,JF,mr)),B0=Ue(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m},g,h,v,{listState:y,topItemsIndexes:x,...T},{scrollToIndex:w},S,{topItemCount:C},{groupCounts:P},I])=>(be(T.rangeChanged,I.scrollSeekRangeChanged),be(re(I.windowViewportRect,he(_=>_.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:P,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m,sizeRanges:s,topItemCount:C,topItemsIndexes:x,totalCount:u,...v,groupIndices:i,itemSize:a,listState:y,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...T,...I,...g,sizes:l,...h}),at(Vn,pa,Wt,e2,KF,Jr,fa,o2,n2,I0,i2));function a2(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const a in t)Object.hasOwn(r,a)||(n[a]=t[a]);return n}const tl=typeof document<"u"?E.useLayoutEffect:E.useEffect;function bf(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=E.createContext({});function l(h,v){h.propsReady&&Me(h.propsReady,!1);for(const y of r){const x=h[t.required[y]];Me(x,v[y])}for(const y of o)if(y in v){const x=h[t.optional[y]];Me(x,v[y])}h.propsReady&&Me(h.propsReady,!0)}function c(h){return i.reduce((v,y)=>(v[y]=x=>{const T=h[t.methods[y]];Me(T,x)},v),{})}function u(h){return a.reduce((v,y)=>(v[y]=SF(h[t.events[y]]),v),{})}const d=E.forwardRef((h,v)=>{const{children:y,...x}=h,[T]=E.useState(()=>Ys(EF(e),C=>{l(C,x)})),[w]=E.useState(f0(u,T));tl(()=>{for(const C of a)C in x&&Xe(w[C],x[C]);return()=>{Object.values(w).map(rf)}},[x,w,T]),tl(()=>{l(T,x)}),E.useImperativeHandle(v,d0(c(T)));const S=n;return b.jsx(s.Provider,{value:T,children:n?b.jsx(S,{...a2([...r,...o,...a],x),children:y}):y})}),p=h=>E.useCallback(p0(Me,E.useContext(s)[h]),[h]),f=h=>{const v=E.useContext(s)[h],y=E.useCallback(x=>Xe(v,x),[v]);return E.useSyncExternalStore(y,()=>Rt(v),()=>Rt(v))},m=h=>{const v=E.useContext(s)[h],[y,x]=E.useState(f0(Rt,v));return tl(()=>Xe(v,T=>{T!==y&&x(d0(T))}),[v,y]),y},g=E.version.startsWith("18")?f:m;return{Component:d,useEmitter:(h,v)=>{const y=E.useContext(s)[h];tl(()=>Xe(y,v),[v,y])},useEmitterValue:g,usePublisher:p}}const nl=E.createContext(void 0),H0=E.createContext(void 0),W0=typeof document<"u"?E.useLayoutEffect:E.useEffect;function xf(e){return"self"in e}function s2(e){return"body"in e}function q0(e,t,n,r=ri,o,i){const a=E.useRef(null),s=E.useRef(null),l=E.useRef(null),c=E.useCallback(p=>{let f,m,g;const h=p.target;if(s2(h)||xf(h)){const y=xf(h)?h:h.defaultView;g=i?y.scrollX:y.scrollY,f=i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight,m=i?y.innerWidth:y.innerHeight}else g=i?h.scrollLeft:h.scrollTop,f=i?h.scrollWidth:h.scrollHeight,m=i?h.offsetWidth:h.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:m})};p.suppressFlushSync?v():wi.flushSync(v),s.current!==null&&(g===s.current||g<=0||g===f-m)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);E.useEffect(()=>{const p=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",c,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(p){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const m=p.behavior==="smooth";let g,h,v;xf(f)?(h=Math.max(bn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,v=i?window.scrollX:window.scrollY):(h=f[i?"scrollWidth":"scrollHeight"],g=bn(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const y=h-g;if(p.top=Math.ceil(Math.max(Math.min(y,p.top),0)),M0(g,h)||p.top===v){e({scrollHeight:h,scrollTop:v,viewportHeight:g}),m&&t(!0);return}m?(s.current=p.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),f.scrollTo(p)}function d(p){i&&(p={behavior:p.behavior,left:p.top}),a.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const wf="-webkit-sticky",U0="sticky",Y0=z0(()=>{if(typeof document>"u")return U0;const e=document.createElement("div");return e.style.position=wf,e.style.position===wf?wf:U0});function Sf(e){return e}const l2=Ue(()=>{const e=le(l=>`Item ${l}`),t=le(null),n=le(l=>`Group ${l}`),r=le({}),o=le(Sf),i=le("div"),a=le(ri),s=(l,c=null)=>zt(re(r,he(u=>u[l]),st()),c);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),c2=Ue(([e,t])=>({...e,...t}),at(B0,l2)),u2=({height:e})=>b.jsx("div",{style:{height:e}}),d2={overflowAnchor:"none",position:Y0(),zIndex:1},G0={overflowAnchor:"none"},f2={...G0,display:"inline-block",height:"100%"},K0=E.memo(function({showTopList:e=!1}){const t=Ae("listState"),n=un("sizeRanges"),r=Ae("useWindowScroll"),o=Ae("customScrollParent"),i=un("windowScrollContainerState"),a=un("scrollContainerState"),s=o||r?i:a,l=Ae("itemContent"),c=Ae("context"),u=Ae("groupContent"),d=Ae("trackItemSizes"),p=Ae("itemSize"),f=Ae("log"),m=un("gap"),g=Ae("horizontalDirection"),{callbackRef:h}=v0(n,p,d,e?ri:s,f,m,o,g,Ae("skipAnimationFrameInResizeObserver")),[v,y]=E.useState(0);Cf("deviation",A=>{v!==A&&y(A)});const x=Ae("EmptyPlaceholder"),T=Ae("ScrollSeekPlaceholder")||u2,w=Ae("ListComponent"),S=Ae("ItemComponent"),C=Ae("GroupComponent"),P=Ae("computeItemKey"),I=Ae("isSeeking"),_=Ae("groupIndices").length>0,M=Ae("alignToBottom"),L=Ae("initialItemFinalLocationReached"),$=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:M?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:M?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...L?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?b.jsx(x,{...lt(x,c)}):b.jsx(w,{...lt(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:$,children:(e?t.topItems:t.items).map(A=>{const O=A.originalIndex,N=P(O+t.firstItemIndex,A.data,c);return I?E.createElement(T,{...lt(T,c),height:A.size,index:A.index,key:N,type:A.type||"item",...A.type==="group"?{}:{groupIndex:A.groupIndex}}):A.type==="group"?E.createElement(C,{...lt(C,c),"data-index":O,"data-item-index":A.index,"data-known-size":A.size,key:N,style:d2},u(A.index,c)):E.createElement(S,{...lt(S,c),...Z0(S,A.data),"data-index":O,"data-item-group-index":A.groupIndex,"data-item-index":A.index,"data-known-size":A.size,key:N,style:g?f2:G0},_?l(A.index,A.groupIndex,A.data,c):l(A.index,A.data,c))})})}),p2={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},h2={outline:"none",overflowX:"auto",position:"relative"},ai=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),m2={position:Y0(),top:0,width:"100%",zIndex:1};function lt(e,t){if(typeof e!="string")return{context:t}}function Z0(e,t){return{item:typeof e=="string"?void 0:t}}const g2=E.memo(function(){const e=Ae("HeaderComponent"),t=un("headerHeight"),n=Ae("HeaderFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...lt(e,o)})}):null}),v2=E.memo(function(){const e=Ae("FooterComponent"),t=un("footerHeight"),n=Ae("HeaderFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...lt(e,o)})}):null});function Tf({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:m}=q0(a,l,s,c,void 0,d);return e("scrollTo",m),e("scrollBy",p),b.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?h2:p2,...o},tabIndex:0,...i,...lt(s,u),children:r})})}function Ef({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),p=t("context"),f=E.useRef(null),m=t("scrollerRef"),{scrollByCallback:g,scrollerRef:h,scrollToCallback:v}=q0(a,l,s,m,d);return W0(()=>{var y;return h.current=d||((y=f.current)==null?void 0:y.ownerDocument.defaultView),()=>{h.current=null}},[h,d]),e("windowScrollTo",v),e("scrollBy",g),b.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...lt(s,p),children:r})})}const y2=({children:e})=>{const t=E.useContext(nl),n=un("viewportHeight"),r=un("fixedItemHeight"),o=Ae("alignToBottom"),i=Ae("horizontalDirection"),a=E.useMemo(()=>sa(n,l=>bn(l,i?"width":"height")),[n,i]),s=Ln(a,!0,Ae("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.jsx("div",{"data-viewport-type":"element",ref:s,style:ai(o),children:e})},b2=({children:e})=>{const t=E.useContext(nl),n=un("windowViewportRect"),r=un("fixedItemHeight"),o=Ae("customScrollParent"),i=af(n,o,Ae("skipAnimationFrameInResizeObserver")),a=Ae("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.jsx("div",{"data-viewport-type":"window",ref:i,style:ai(a),children:e})},x2=({children:e})=>{const t=Ae("TopItemListComponent")||"div",n=Ae("headerHeight"),r={...m2,marginTop:`${n}px`},o=Ae("context");return b.jsx(t,{style:r,...lt(t,o),children:e})},w2=E.memo(function(e){const t=Ae("useWindowScroll"),n=Ae("topItemsIndexes").length>0,r=Ae("customScrollParent"),o=Ae("context"),i=r||t?E2:T2,a=r||t?b2:y2;return b.jsxs(i,{...e,...lt(i,o),children:[n&&b.jsx(x2,{children:b.jsx(K0,{showTopList:!0})}),b.jsxs(a,{children:[b.jsx(g2,{}),b.jsx(K0,{}),b.jsx(v2,{})]})]})}),{Component:S2,useEmitter:Cf,useEmitterValue:Ae,usePublisher:un}=bf(c2,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{autoscrollToBottom:"autoscrollToBottom",getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupContent:"groupContent",groupCounts:"groupCounts",headerFooterTag:"HeaderFooterTag",horizontalDirection:"horizontalDirection",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},w2),T2=Tf({useEmitter:Cf,useEmitterValue:Ae,usePublisher:un}),E2=Ef({useEmitter:Cf,useEmitterValue:Ae,usePublisher:un}),kf=S2,C2=Ue(()=>{const e=le(l=>b.jsxs("td",{children:["Item $",l]})),t=le(null),n=le(null),r=le(null),o=le({}),i=le(Sf),a=le(ri),s=(l,c=null)=>zt(re(o,he(u=>u[l]),st()),c);return{components:o,computeItemKey:i,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),k2=Ue(([e,t])=>({...e,...t}),at(B0,C2)),P2=({height:e})=>b.jsx("tr",{children:b.jsx("td",{style:{height:e}})}),A2=({height:e})=>b.jsx("tr",{children:b.jsx("td",{style:{border:0,height:e,padding:0}})}),_2={overflowAnchor:"none"},X0=E.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=Fe("computeItemKey"),r=Fe("firstItemIndex"),o=Fe("isSeeking"),i=Fe("ScrollSeekPlaceholder")||P2,a=Fe("context"),s=Fe("TableRowComponent"),l=Fe("fixedHeaderHeight"),c=Fe("itemContent"),u=(e?t.topItems:[]).reduce((p,f,m)=>(m===0?p.push(f.size):p.push(p[m-1]+f.size),p),[]),d=(e?t.topItems:t.items).map(p=>{const f=p.originalIndex,m=n(f+r,p.data,a),g=e?f===0?0:u[f-1]:0;return o?E.createElement(i,{...lt(i,a),height:p.size,index:p.index,key:m,type:p.type||"item"}):E.createElement(s,{...lt(s,a),...Z0(s,p.data),"data-index":f,"data-item-index":p.index,"data-known-size":p.size,key:m,style:e?{overflowAnchor:"none",position:"sticky",top:l+g,zIndex:2}:_2},c(p.index,p.data,a))});return b.jsx(b.Fragment,{children:d})}),I2=E.memo(function(){const e=Fe("listState"),t=Fe("topItemsIndexes").length>0,n=xn("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=xn("windowScrollContainerState"),a=xn("scrollContainerState"),s=o||r?i:a,l=Fe("trackItemSizes"),c=Fe("itemSize"),u=Fe("log"),{callbackRef:d,ref:p}=v0(n,c,l,s,u,void 0,o,!1,Fe("skipAnimationFrameInResizeObserver")),[f,m]=E.useState(0);Pf("deviation",_=>{f!==_&&(p.current.style.marginTop=`${_}px`,m(_))});const g=Fe("EmptyPlaceholder"),h=Fe("FillerRow")||A2,v=Fe("TableBodyComponent"),y=Fe("paddingTopAddition"),x=Fe("statefulTotalCount"),T=Fe("context");if(x===0&&g)return b.jsx(g,{...lt(g,T)});const w=(t?e.topItems:[]).reduce((_,M)=>_+M.size,0),S=e.offsetTop+y+f-w,C=e.offsetBottom,P=S>0?b.jsx(h,{context:T,height:S},"padding-top"):null,I=C>0?b.jsx(h,{context:T,height:C},"padding-bottom"):null;return b.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...lt(v,T),children:[P,t&&b.jsx(X0,{showTopList:!0}),b.jsx(X0,{}),I]})}),O2=({children:e})=>{const t=E.useContext(nl),n=xn("viewportHeight"),r=xn("fixedItemHeight"),o=Ln(E.useMemo(()=>sa(n,i=>bn(i,"height")),[n]),!0,Fe("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.jsx("div",{"data-viewport-type":"element",ref:o,style:ai(!1),children:e})},M2=({children:e})=>{const t=E.useContext(nl),n=xn("windowViewportRect"),r=xn("fixedItemHeight"),o=Fe("customScrollParent"),i=af(n,o,Fe("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.jsx("div",{"data-viewport-type":"window",ref:i,style:ai(!1),children:e})},D2=E.memo(function(e){const t=Fe("useWindowScroll"),n=Fe("customScrollParent"),r=xn("fixedHeaderHeight"),o=xn("fixedFooterHeight"),i=Fe("fixedHeaderContent"),a=Fe("fixedFooterContent"),s=Fe("context"),l=Ln(E.useMemo(()=>sa(r,v=>bn(v,"height")),[r]),!0,Fe("skipAnimationFrameInResizeObserver")),c=Ln(E.useMemo(()=>sa(o,v=>bn(v,"height")),[o]),!0,Fe("skipAnimationFrameInResizeObserver")),u=n||t?L2:F2,d=n||t?M2:O2,p=Fe("TableComponent"),f=Fe("TableHeadComponent"),m=Fe("TableFooterComponent"),g=i?b.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...lt(f,s),children:i()},"TableHead"):null,h=a?b.jsx(m,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...lt(m,s),children:a()},"TableFoot"):null;return b.jsx(u,{...e,...lt(u,s),children:b.jsx(d,{children:b.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...lt(p,s),children:[g,b.jsx(I2,{},"TableBody"),h]})})})}),{Component:N2,useEmitter:Pf,useEmitterValue:Fe,usePublisher:xn}=bf(k2,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedFooterContent:"fixedFooterContent",fixedHeaderContent:"fixedHeaderContent",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupCounts:"groupCounts",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},D2),F2=Tf({useEmitter:Pf,useEmitterValue:Fe,usePublisher:xn}),L2=Ef({useEmitter:Pf,useEmitterValue:Fe,usePublisher:xn}),V2=N2,Q0={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},j2={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:J0,floor:rl,max:va,min:Af,round:ew}=Math;function tw(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function $2(e){return{...j2,items:e}}function ol(e,t){return e&&e.width===t.width&&e.height===t.height}function R2(e,t){return e&&e.column===t.column&&e.row===t.row}const z2=Ue(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:m,propsReady:g},{customScrollParent:h,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:T},w])=>{const S=le(0),C=le(0),P=le(Q0),I=le({height:0,width:0}),_=le({height:0,width:0}),M=ze(),L=ze(),$=le(0),A=le(null),O=le({column:0,row:0}),N=ze(),V=ze(),F=le(!1),z=le(0),D=le(!0),R=le(!1),J=le(!1);Xe(re(m,Ne(z),Ce(([j,W])=>!!W)),()=>{Me(D,!1)}),Xe(re(At(m,D,_,I,z,R),Ce(([j,W,G,ae,,B])=>j&&!W&&G.height!==0&&ae.height!==0&&!B)),([,,,,j])=>{Me(R,!0),hf(1,()=>{Me(M,j)}),Dn(re(c),()=>{Me(t,[0,0]),Me(D,!0)})}),be(re(V,Ce(j=>j!=null&&j.scrollTop>0),Nn(0)),C),Xe(re(m,Ne(V),Ce(([,j])=>j!=null)),([,j])=>{j&&(Me(I,j.viewport),Me(_,j.item),Me(O,j.gap),j.scrollTop>0&&(Me(F,!0),Dn(re(c,oi(1)),W=>{Me(F,!1)}),Me(l,{top:j.scrollTop})))}),be(re(I,he(({height:j})=>j)),d),be(re(At(Pe(I,ol),Pe(_,ol),Pe(O,(j,W)=>j&&j.column===W.column&&j.row===W.row),Pe(c)),he(([j,W,G,ae])=>({gap:G,item:W,scrollTop:ae,viewport:j}))),N),be(re(At(Pe(S),r,Pe(O,R2),Pe(_,ol),Pe(I,ol),Pe(A),Pe(C),Pe(F),Pe(D),Pe(z)),Ce(([,,,,,,,j])=>!j),he(([j,[W,G],ae,B,xe,Ee,Oe,,$e,se])=>{const{column:ye,row:K}=ae,{height:ce,width:Q}=B,{width:ie}=xe;if(Oe===0&&(j===0||ie===0))return Q0;if(Q===0){const Sn=mf(se,j),zn=Sn+Math.max(Oe-1,0);return $2(tw(Sn,zn,Ee))}const we=nw(ie,Q,ye);let X,ue;$e?W===0&&G===0&&Oe>0?(X=0,ue=Oe-1):(X=we*rl((W+K)/(ce+K)),ue=we*J0((G+K)/(ce+K))-1,ue=Af(j-1,va(ue,we-1)),X=Af(ue,va(0,X))):(X=0,ue=-1);const _e=tw(X,ue,Ee),{bottom:We,top:Ct}=rw(xe,ae,B,_e),mt=J0(j/we),Lt=mt*ce+(mt-1)*K-We;return{bottom:We,itemHeight:ce,items:_e,itemWidth:Q,offsetBottom:Lt,offsetTop:Ct,top:Ct}})),P),be(re(A,Ce(j=>j!==null),he(j=>j.length)),S),be(re(At(I,_,P,O),Ce(([j,W,{items:G}])=>G.length>0&&W.height!==0&&j.height!==0),he(([j,W,{items:G},ae])=>{const{bottom:B,top:xe}=rw(j,ae,W,G);return[xe,B]}),st(ua)),t);const te=le(!1);be(re(c,Ne(te),he(([j,W])=>W||j!==0)),te);const ee=en(re(At(P,S),Ce(([{items:j}])=>j.length>0),Ne(te),Ce(([[j,W],G])=>{const ae=j.items[j.items.length-1].index===W-1;return(G||j.bottom>0&&j.itemHeight>0&&j.offsetBottom===0&&j.items.length===W)&&ae}),he(([[,j]])=>j-1),st())),Z=en(re(Pe(P),Ce(({items:j})=>j.length>0&&j[0].index===0),Nn(0),st())),U=en(re(Pe(P),Ne(F),Ce(([{items:j},W])=>j.length>0&&!W),he(([{items:j}])=>({endIndex:j[j.length-1].index,startIndex:j[0].index})),st(C0),hr(0)));be(U,f.scrollSeekRangeChanged),be(re(M,Ne(I,_,S,O),he(([j,W,G,ae,B])=>{const xe=O0(j),{align:Ee,behavior:Oe,offset:$e}=xe;let se=xe.index;se==="LAST"&&(se=ae-1),se=va(0,se,Af(ae-1,se));let ye=_f(W,B,G,se);return Ee==="end"?ye=ew(ye-W.height+G.height):Ee==="center"&&(ye=ew(ye-W.height/2+G.height/2)),$e&&(ye+=$e),{behavior:Oe,top:ye}})),l);const Y=zt(re(P,he(j=>j.offsetBottom+j.bottom)),0);return be(re(T,he(j=>({height:j.visibleHeight,width:j.visibleWidth}))),I),{customScrollParent:h,data:A,deviation:$,footerHeight:o,gap:O,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:_,overscan:n,restoreStateFrom:V,scrollBy:a,scrollContainerState:s,scrollHeight:L,scrollTo:l,scrollToIndex:M,scrollTop:c,smoothScrollTargetReached:u,totalCount:S,useWindowScroll:v,viewportDimensions:I,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:T,...f,gridState:P,horizontalDirection:J,initialTopMostItemIndex:z,totalListHeight:Y,...p,endReached:ee,propsReady:g,rangeChanged:U,startReached:Z,stateChanged:N,stateRestoreInProgress:F,...w}},at(gf,Wt,ga,R0,gr,yf,mr));function nw(e,t,n){return va(1,rl((e+n)/(rl(t)+n)))}function rw(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=_f(e,t,n,r[0].index);return{bottom:_f(e,t,n,r[r.length-1].index)+o,top:i}}function _f(e,t,n,r){const o=nw(e.width,n.width,t.column),i=rl(r/o),a=i*n.height+va(0,i-1)*t.row;return a>0?a+t.row:a}const B2=Ue(()=>{const e=le(d=>`Item ${d}`),t=le({}),n=le(null),r=le("virtuoso-grid-item"),o=le("virtuoso-grid-list"),i=le(Sf),a=le("div"),s=le(ri),l=(d,p=null)=>zt(re(t,he(f=>f[d]),st()),p),c=le(!1),u=le(!1);return be(Pe(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),H2=Ue(([e,t])=>({...e,...t}),at(z2,B2)),W2=E.memo(function(){const e=ut("gridState"),t=ut("listClassName"),n=ut("itemClassName"),r=ut("itemContent"),o=ut("computeItemKey"),i=ut("isSeeking"),a=dn("scrollHeight"),s=ut("ItemComponent"),l=ut("ListComponent"),c=ut("ScrollSeekPlaceholder"),u=ut("context"),d=dn("itemDimensions"),p=dn("gap"),f=ut("log"),m=ut("stateRestoreInProgress"),g=dn("reportReadyState"),h=Ln(E.useMemo(()=>v=>{const y=v.parentElement.parentElement.scrollHeight;a(y);const x=v.firstChild;if(x){const{height:T,width:w}=x.getBoundingClientRect();d({height:T,width:w})}p({column:iw("column-gap",getComputedStyle(v).columnGap,f),row:iw("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return W0(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),m?null:b.jsx(l,{className:t,ref:h,...lt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const y=o(v.index,v.data,u);return i?b.jsx(c,{...lt(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},y):E.createElement(s,{...lt(s,u),className:n,"data-index":v.index,key:y},r(v.index,v.data,u))})})}),q2=E.memo(function(){const e=ut("HeaderComponent"),t=dn("headerHeight"),n=ut("headerFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,!1),o=ut("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...lt(e,o)})}):null}),U2=E.memo(function(){const e=ut("FooterComponent"),t=dn("footerHeight"),n=ut("headerFooterTag"),r=Ln(E.useMemo(()=>i=>{t(bn(i,"height"))},[t]),!0,!1),o=ut("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...lt(e,o)})}):null}),Y2=({children:e})=>{const t=E.useContext(H0),n=dn("itemDimensions"),r=dn("viewportDimensions"),o=Ln(E.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return E.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),b.jsx("div",{ref:o,style:ai(!1),children:e})},G2=({children:e})=>{const t=E.useContext(H0),n=dn("windowViewportRect"),r=dn("itemDimensions"),o=ut("customScrollParent"),i=af(n,o,!1);return E.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),b.jsx("div",{ref:i,style:ai(!1),children:e})},K2=E.memo(function({...e}){const t=ut("useWindowScroll"),n=ut("customScrollParent"),r=n||t?X2:Z2,o=n||t?G2:Y2,i=ut("context");return b.jsx(r,{...e,...lt(r,i),children:b.jsxs(o,{children:[b.jsx(q2,{}),b.jsx(W2,{}),b.jsx(U2,{})]})})}),{useEmitter:ow,useEmitterValue:ut,usePublisher:dn}=bf(H2,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",isScrolling:"isScrolling",rangeChanged:"rangeChanged",readyStateChanged:"readyStateChanged",startReached:"startReached",stateChanged:"stateChanged"},methods:{scrollBy:"scrollBy",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",headerFooterTag:"headerFooterTag",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",itemClassName:"itemClassName",itemContent:"itemContent",listClassName:"listClassName",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",totalCount:"totalCount",useWindowScroll:"useWindowScroll"}},K2),Z2=Tf({useEmitter:ow,useEmitterValue:ut,usePublisher:dn}),X2=Ef({useEmitter:ow,useEmitterValue:ut,usePublisher:dn});function iw(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}const If=()=>{const e=E.useContext(jo);return e?e.tweaks:bs},aw=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>b.jsxs("span",{className:Le("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:b.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[i,e||r?b.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?b.jsx(tf,{as:"button",type:"button","aria-description":r,title:b.jsxs("span",{className:"cursor-help",children:[b.jsx("span",{className:"sr-only",children:r}),b.jsx(yy,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:b.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?b.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[b.jsx(gy,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),b.jsx(e_,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),o]}),ya=E.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:p="",name:f,title:m,componentName:g,placeholder:h,hideLeft:v=!1,required:y,disabled:x,reportStatus:T},w)=>{const S=If(),C=T!==void 0?T:S.input.iconFeedback,P=d??f,I=Ot(),_=e??I.inputOptionalLabel;return b.jsxs("fieldset",{ref:w,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":g,"data-interactive":!!i,className:Le("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[b.jsxs("label",{form:u,htmlFor:P,className:"text-field-label max-w-full w-full relative inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[b.jsx(aw,{info:s,hideLeft:v,reportStatus:C,title:m,placeholder:h,children:_||n?b.jsxs(E.Fragment,{children:[y?null:b.jsx("span",{"aria-disabled":x,className:"text-opacity-70 aria-disabled:text-disabled",children:_}),n?b.jsx(E.Fragment,{children:n}):null]}):null}),b.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${p}`,children:[t?b.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?b.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),b.jsx("p",{className:"mt-input-gap hidden whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger",children:c}),b.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),Q2=e=>b.jsx(E.Fragment,{children:e.children}),J2={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},eL={caseSensitive:!1,sort:!1},tL=[],nL=E.forwardRef(function(t,n){return b.jsx(ft.ul,{...t,ref:n,className:"w-full rounded-lg border-b border-tooltip-border last:border-transparent",children:b.jsx(Jn,{children:t.children})})}),rL=E.forwardRef(function({item:t,context:n,...r},o){return b.jsx(ft.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),oL={List:nL,Item:rL},si=320,Of=40,iL=E.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,...g},h)=>{const v=E.useRef(null),y=E.useRef(null),x=g.value??g.defaultValue??"",T=Ot(),[w,S]=E.useState(()=>Math.min(si,Of*o.length)),[C,P]=E.useState(!1),[I,_]=E.useState(""),[M,L]=E.useState(x),[$,A]=E.useState(()=>{var K;return((K=o.find(ce=>ce.value===x))==null?void 0:K.label)??x}),[O,N]=E.useState(null),V=E.useRef(tL),F=m&&I!==""?[{value:I,label:I,"data-dynamic":"true"},...o]:o,z=new Xr(F,["value","label"],eL).search(I),D=()=>{P(!1),S(0)},R=z.filter(K=>K.hidden!==!0),J=m?void 0:`^(${o.map(K=>`${sd(K.value)}${K.label?"|"+sd(K.label):""}`).join("|")})$`;E.useEffect(()=>{if(g.value){const K=o.find(ce=>ce.value===g.value);L((K==null?void 0:K.label)??g.value)}},[g.value]),E.useEffect(()=>{C||S(0)},[C]),E.useEffect(()=>{if(!C)return;const K=U.floating;if(K.current===null)return;let ce=0;Array.from(K.current.querySelectorAll("li")).slice(0,Math.min(R.length,10)).forEach(we=>{const X=we.getBoundingClientRect();ce+=X.height});const ie=Math.min(ce,si);S(ie)},[I,C]);const{x:te,y:ee,strategy:Z,refs:U,context:Y}=Gr({open:C,transform:!0,strategy:"absolute",onOpenChange:P,whileElementsMounted:ea,middleware:[ta(4),Sx({padding:10,elementContext:"reference",apply(K){const ce=v.current.getBoundingClientRect().width,Q=K.elements.floating.querySelector("ul"),ie=(Q==null?void 0:Q.getBoundingClientRect().height)||0,we=Math.min(ie<Of?si:ie,si);wi.flushSync(()=>setTimeout(()=>{const X=(Q==null?void 0:Q.getBoundingClientRect().height)??0;return X<Of?void S(we):void S(Math.min(X,si))},50)),Object.assign(K.elements.floating.style,{width:`${ce}px`,maxWidth:`${ce}px`,maxHeight:`${si}`})}})]}),j=r0(Y,J2),{getReferenceProps:W,getFloatingProps:G,getItemProps:ae}=Kr([Zr(Y,{role:"listbox"}),Yr(Y),Qd(Y,{cols:0,listRef:V,loop:!0,virtual:!0,allowEscape:!0,activeIndex:O,selectedIndex:O,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{const K=U.reference.current;if(K)return Si(K)},[]);const B=(K,ce)=>{L(K.value);const Q=U.reference.current;if(!Q)return;Q==null||Q.setAttribute("data-value",K.value),Q.value=K.value;const ie=new Event("change",{bubbles:!1,cancelable:!0});Q.dispatchEvent(ie),g.onChange&&g.onChange(ie),A(K.label??""),D(),_(""),N(ce)},xe=K=>{var Q;const ce=K.target.value;return _(ce),!C&&ce===""?P(!0):(K.target.name=g.name||"",ce?P(!0):(Q=g.onChange)==null?void 0:Q.call(g,K))},Ee=()=>{var K;P(!0),_(""),(K=U.reference.current)==null||K.focus()},Oe=()=>{N(K=>K===null?0:K),P(!0),_("")},$e=()=>{var K;(K=U.reference.current)==null||K.setAttribute("data-value",""),_(""),L(""),A(""),Zh(U.reference.current),D()},se=g.id||g.name,ye=R.length===0;return b.jsxs(ya,{...g,left:e,error:t,ref:v,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:p,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:g.name||g.id,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:b.jsxs("span",{className:"flex items-center gap-0.5",children:[n,b.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:Ee,children:[b.jsx(Ru,{size:20}),b.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),M?b.jsx("button",{type:"button",onClick:$e,className:"p-2 transition-colors link:text-danger md:p-1",children:b.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[b.jsx("input",{"data-shadow":"true",...W({...g,onChange:xe,onFocus:Oe,pattern:J,ref:U.setReference,name:`${se}-shadow`,id:`${se}-shadow`,onClick:K=>K.currentTarget.focus(),onKeyDown(K){var ce,Q;if(K.key==="Escape")return K.currentTarget.blur(),D();if(C){if(K.key==="ArrowDown"){let ie=tt.number(O)?O+1:0;return ie>R.length-1&&(ie=0),(ce=y.current)==null||ce.scrollIntoView({index:ie}),N(ie)}if(K.key==="ArrowUp"){let ie=tt.number(O)?O-1:R.length-1;return ie<0&&(ie=R.length-1),(Q=y.current)==null||Q.scrollIntoView({index:ie}),N(ie)}if(K.key==="Enter"){if(O!==null&&R[O])return K.preventDefault(),B(R[O],O);if(R.length===1)return K.preventDefault(),B(R[0],0)}}}}),"data-value":M,"data-error":!!t,"data-name":se,"data-target":se,required:f,value:C?I:$||M,"aria-autocomplete":"list",autoComplete:"off",className:Le("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",g.className)}),b.jsx("input",{id:se,name:se,type:"hidden","data-origin":se,ref:h,required:f,defaultValue:g.value||M||void 0}),b.jsx(qr,{preserveTabOrder:!0,children:C?b.jsx(Jo,{guards:!0,returnFocus:!1,context:Y,initialFocus:-1,visuallyHiddenDismiss:!0,children:b.jsxs(ft.ul,{...G({ref:U.setFloating,style:{...j.styles,top:ee??0,position:Z,left:(te??0)+(M?36:25)}}),initial:!1,"data-floating":"true",animate:{height:ye?"auto":w},className:"isolate z-floating m-0 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[ye?b.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:b.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||T.autocompleteEmpty})}):null,b.jsx(kf,{ref:y,hidden:ye,data:R,style:{height:w},components:oL,className:"rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(K,ce)=>{const Q=ce.Render??Q2,ie=M===ce.value||M===ce.label,we=O===K,X=ce.label??ce.value;return b.jsx("button",{"data-value":ce.value,...ae({ref:ue=>void(V.current[K]=ue),role:"option",type:"button","aria-checked":ie,"aria-current":ie,"aria-selected":ie,"aria-busy":ce.disabled,onClick:()=>B(ce,K),className:`cursor-pointer w-full p-2 text-left ${ie?"bg-primary-hover text-primary-foreground":""} ${we?"bg-floating-hover text-floating-foreground":""}`}),children:b.jsx(Q,{...g,label:ce.label,value:ce.value,children:X})})}})]})}):null})]})}),Mf=E.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...l},c)=>{const u=l.disabled||r;return b.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Le("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[b.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Le("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",i)}),e,b.jsx("span",{"data-name":"checkbox-label",className:Le("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),sw=(e,t,n,r)=>E.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:m="text",labelClassName:g,feedback:h=null,hideLeft:v=!1,loading:y,...x},T)=>{const w=e,S=x.id??x.name,C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const P=C.current,I=Si(C.current),_=r==null?void 0:r(P),M=L=>{const $=L;if($.key==="Enter"&&P.enterKeyHint==="next"){const A=P.getAttribute("data-next");if(A){const O=document.getElementById(A);if(O)return O.focus(),void $.preventDefault()}}};return P.addEventListener("keydown",M),()=>{_==null||_(),I(),P.removeEventListener("keydown",M)}},[]),b.jsx(ya,{...n,info:i,left:a,error:l,right:c,loading:y,form:x.form,name:x.name,feedback:h,hideLeft:v,title:x.title,container:Le(u,n.container),rightLabel:d,disabled:x.disabled,interactive:p,required:x.required,componentName:t,id:x.name||x.id,optionalText:f,labelClassName:g,placeholder:x.placeholder,children:b.jsx(w,{...n,...x,id:S,name:S,type:m,"data-next":s,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:Fa(T,C),className:Le("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",x.className)})})}),ba=sw(Jy,"input",{type:"text"}),lw=new Date(1970,11,31),Df={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},cw={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},aL={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")},Nf=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},sL=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=id(t),l=E.useId(),c=Ot(),u=E.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=E.useState(e||void 0),[f,m]=E.useState(!1),g=Nf(u,lw).flatMap(C=>tt.keyof(Df,C.type)?Df[C.type](C.value):[]),h=Nf(u,lw).reduce((C,P)=>C+(tt.keyof(cw,P.type)?cw[P.type](P.value):""),""),[v,y]=E.useState(d?Nf(u,d).reduce((C,P)=>C+(tt.keyof(Df,P.type)?aL[P.type](d,P.value):""),""):""),x=C=>{const P=C.target.value;if(y(P),g.length===P.length&&g.every((_,M)=>{const L=P.charAt(M);return typeof _=="string"?L===_:_.test(L)})){const _=No(fO(P,h,new Date));return p(_),r==null?void 0:r(_)}return p(void 0),r==null?void 0:r(void 0)},T=C=>(p(C),r==null||r(C),y(C?fI(C,h):"")),w=Cy(d),S=w?d.toISOString():void 0;return b.jsx(ba,{...i,mask:g,value:v,id:void 0,name:void 0,className:"uppercase","data-value":S,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:x,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??h,right:b.jsxs(E.Fragment,{children:[b.jsx("input",{"data-origin":i.name,defaultValue:S,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),b.jsx(ti,{open:f,onChange:m,trigger:b.jsxs("span",{"aria-labelledby":l,children:[b.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),b.jsx(QA,{})]}),buttonProps:{"aria-describedby":l},children:b.jsx(wb,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:w?d:void 0})})]})})}),lL=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],cL=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],uL=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],dL=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],uw=(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 dw(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?dL:uL:t.binary?cL:lL,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){const u=uw(e,t.locale,a);return i+u+r+n[0]}const s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,a||(e=e.toPrecision(3));const l=uw(Number(e),t.locale,a),c=n[s];return i+l+r+c}var il={exports:{}},al={exports:{}},Ye={};/** @license React v16.13.1
|
|
173
173
|
* react-is.production.min.js
|
|
174
174
|
*
|
|
175
175
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
176
176
|
*
|
|
177
177
|
* This source code is licensed under the MIT license found in the
|
|
178
178
|
* LICENSE file in the root directory of this source tree.
|
|
179
|
-
*/var fw;function
|
|
179
|
+
*/var fw;function fL(){if(fw)return Ye;fw=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(w){if(typeof w=="object"&&w!==null){var S=w.$$typeof;switch(S){case t:switch(w=w.type,w){case l:case c:case r:case i:case o:case d:return w;default:switch(w=w&&w.$$typeof,w){case s:case u:case m:case f:case a:return w;default:return S}}case n:return S}}}function T(w){return x(w)===c}return Ye.AsyncMode=l,Ye.ConcurrentMode=c,Ye.ContextConsumer=s,Ye.ContextProvider=a,Ye.Element=t,Ye.ForwardRef=u,Ye.Fragment=r,Ye.Lazy=m,Ye.Memo=f,Ye.Portal=n,Ye.Profiler=i,Ye.StrictMode=o,Ye.Suspense=d,Ye.isAsyncMode=function(w){return T(w)||x(w)===l},Ye.isConcurrentMode=T,Ye.isContextConsumer=function(w){return x(w)===s},Ye.isContextProvider=function(w){return x(w)===a},Ye.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ye.isForwardRef=function(w){return x(w)===u},Ye.isFragment=function(w){return x(w)===r},Ye.isLazy=function(w){return x(w)===m},Ye.isMemo=function(w){return x(w)===f},Ye.isPortal=function(w){return x(w)===n},Ye.isProfiler=function(w){return x(w)===i},Ye.isStrictMode=function(w){return x(w)===o},Ye.isSuspense=function(w){return x(w)===d},Ye.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===i||w===o||w===d||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===m||w.$$typeof===f||w.$$typeof===a||w.$$typeof===s||w.$$typeof===u||w.$$typeof===h||w.$$typeof===v||w.$$typeof===y||w.$$typeof===g)},Ye.typeOf=x,Ye}var Ge={};/** @license React v16.13.1
|
|
180
180
|
* react-is.development.js
|
|
181
181
|
*
|
|
182
182
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
183
183
|
*
|
|
184
184
|
* This source code is licensed under the MIT license found in the
|
|
185
185
|
* LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/var pw;function
|
|
186
|
+
*/var pw;function pL(){return pw||(pw=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===d||B===p||typeof B=="object"&&B!==null&&(B.$$typeof===m||B.$$typeof===f||B.$$typeof===a||B.$$typeof===s||B.$$typeof===u||B.$$typeof===h||B.$$typeof===v||B.$$typeof===y||B.$$typeof===g)}function T(B){if(typeof B=="object"&&B!==null){var xe=B.$$typeof;switch(xe){case t:var Ee=B.type;switch(Ee){case l:case c:case r:case i:case o:case d:return Ee;default:var Oe=Ee&&Ee.$$typeof;switch(Oe){case s:case u:case m:case f:case a:return Oe;default:return xe}}case n:return xe}}}var w=l,S=c,C=s,P=a,I=t,_=u,M=r,L=m,$=f,A=n,O=i,N=o,V=d,F=!1;function z(B){return F||(F=!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.")),D(B)||T(B)===l}function D(B){return T(B)===c}function R(B){return T(B)===s}function J(B){return T(B)===a}function te(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function ee(B){return T(B)===u}function Z(B){return T(B)===r}function U(B){return T(B)===m}function Y(B){return T(B)===f}function j(B){return T(B)===n}function W(B){return T(B)===i}function G(B){return T(B)===o}function ae(B){return T(B)===d}Ge.AsyncMode=w,Ge.ConcurrentMode=S,Ge.ContextConsumer=C,Ge.ContextProvider=P,Ge.Element=I,Ge.ForwardRef=_,Ge.Fragment=M,Ge.Lazy=L,Ge.Memo=$,Ge.Portal=A,Ge.Profiler=O,Ge.StrictMode=N,Ge.Suspense=V,Ge.isAsyncMode=z,Ge.isConcurrentMode=D,Ge.isContextConsumer=R,Ge.isContextProvider=J,Ge.isElement=te,Ge.isForwardRef=ee,Ge.isFragment=Z,Ge.isLazy=U,Ge.isMemo=Y,Ge.isPortal=j,Ge.isProfiler=W,Ge.isStrictMode=G,Ge.isSuspense=ae,Ge.isValidElementType=x,Ge.typeOf=T}()),Ge}var hw;function mw(){return hw||(hw=1,process.env.NODE_ENV==="production"?al.exports=fL():al.exports=pL()),al.exports}/*
|
|
187
187
|
object-assign
|
|
188
188
|
(c) Sindre Sorhus
|
|
189
189
|
@license MIT
|
|
190
|
-
*/var Ff,gw;function
|
|
191
|
-
Valid keys: `+JSON.stringify(Object.keys(D),null," "));var B=ae(Y,G,ee,Z,U+"."+G,n);if(B)return B}return null}return h(R)}function A(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(A);if(D===null||s(D))return!0;var R=d(D);if(R){var J=R.call(D),te;if(R!==D.entries){for(;!(te=J.next()).done;)if(!A(te.value))return!1}else for(;!(te=J.next()).done;){var ee=te.value;if(ee&&!A(ee[1]))return!1}}else return!1;return!0;default:return!1}}function O(D,R){return D==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function N(D){var R=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":O(R,D)?"symbol":R}function V(D){if(typeof D>"u"||D===null)return""+D;var R=N(D);if(R==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return R}function F(D){var R=V(D);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function z(D){return!D.constructor||!D.constructor.name?p:D.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},Rf}var zf,Sw;function v2(){if(Sw)return zf;Sw=1;var e=Vf();function t(){}function n(){}return n.resetWarningCache=t,zf=function(){function r(a,s,l,c,u,d){if(d!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},zf}var Tw;function y2(){if(Tw)return il.exports;if(Tw=1,process.env.NODE_ENV!=="production"){var e=mw(),t=!0;il.exports=g2()(e.isElement,t)}else il.exports=v2()();return il.exports}var b2=y2();const nt=Bp(b2);function eo(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const x2=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function li(e,t,n){const r=w2(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Ew(r,"path",i),Ew(r,"relativePath",i),r}function w2(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=x2.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Ew(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const S2=[".DS_Store","Thumbs.db"];function T2(e){return eo(this,void 0,void 0,function*(){return sl(e)&&E2(e.dataTransfer)?A2(e.dataTransfer,e.type):C2(e)?k2(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?P2(e):[]})}function E2(e){return sl(e)}function C2(e){return sl(e)&&sl(e.target)}function sl(e){return typeof e=="object"&&e!==null}function k2(e){return Bf(e.target.files).map(t=>li(t))}function P2(e){return eo(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>li(n))})}function A2(e,t){return eo(this,void 0,void 0,function*(){if(e.items){const n=Bf(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(_2));return Cw(kw(r))}return Cw(Bf(e.files).map(n=>li(n)))})}function Cw(e){return e.filter(t=>S2.indexOf(t.name)===-1)}function Bf(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function _2(e){if(typeof e.webkitGetAsEntry!="function")return Pw(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Aw(t):Pw(e,t)}function kw(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?kw(n):[n]],[])}function Pw(e,t){return eo(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const a=yield i.getFile();return a.handle=i,li(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return li(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function I2(e){return eo(this,void 0,void 0,function*(){return e.isDirectory?Aw(e):O2(e)})}function Aw(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>eo(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(I2));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function O2(e){return eo(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=li(r,e.fullPath);t(o)},r=>{n(r)})})})}var ll={},_w;function M2(){return _w||(_w=1,ll.__esModule=!0,ll.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0}),ll}var D2=M2();const Hf=Bp(D2);function Iw(e){return L2(e)||F2(e)||Nw(e)||N2()}function N2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
192
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
193
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nw(e,t){if(e){if(typeof e=="string")return Wf(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 Wf(e,t)}}function Wf(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
|
|
190
|
+
*/var Ff,gw;function hL(){if(gw)return Ff;gw=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ff=o()?Object.assign:function(i,a){for(var s,l=r(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){c=e(s);for(var p=0;p<c.length;p++)n.call(s,c[p])&&(l[c[p]]=s[c[p]])}}return l},Ff}var Lf,vw;function Vf(){if(vw)return Lf;vw=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Lf=e,Lf}var jf,yw;function bw(){return yw||(yw=1,jf=Function.call.bind(Object.prototype.hasOwnProperty)),jf}var $f,xw;function mL(){if(xw)return $f;xw=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Vf(),n={},r=bw();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var p=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}d=i[u](a,u,l,s,null,t)}catch(m){d=m}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=c?c():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},$f=o,$f}var Rf,ww;function gL(){if(ww)return Rf;ww=1;var e=mw(),t=hL(),n=Vf(),r=bw(),o=mL(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return Rf=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(D){var R=D&&(c&&D[c]||D[u]);if(typeof R=="function")return R}var p="<<anonymous>>",f={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:y(),arrayOf:x,element:T(),elementType:w(),instanceOf:S,node:_(),objectOf:P,oneOf:C,oneOfType:I,shape:L,exact:$};function m(D,R){return D===R?D!==0||1/D===1/R:D!==D&&R!==R}function g(D,R){this.message=D,this.data=R&&typeof R=="object"?R:{},this.stack=""}g.prototype=Error.prototype;function h(D){if(process.env.NODE_ENV!=="production")var R={},J=0;function te(Z,U,Y,j,W,G,ae){if(j=j||p,G=G||Y,ae!==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 xe=j+":"+Y;!R[xe]&&J<3&&(i("You are manually calling a React.PropTypes validation function for the `"+G+"` prop on `"+j+"`. 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[xe]=!0,J++)}}return U[Y]==null?Z?U[Y]===null?new g("The "+W+" `"+G+"` is marked as required "+("in `"+j+"`, but its value is `null`.")):new g("The "+W+" `"+G+"` is marked as required in "+("`"+j+"`, but its value is `undefined`.")):null:D(U,Y,j,W,G)}var ee=te.bind(null,!1);return ee.isRequired=te.bind(null,!0),ee}function v(D){function R(J,te,ee,Z,U,Y){var j=J[te],W=N(j);if(W!==D){var G=V(j);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+G+"` supplied to `"+ee+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return h(R)}function y(){return h(a)}function x(D){function R(J,te,ee,Z,U){if(typeof D!="function")return new g("Property `"+U+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var Y=J[te];if(!Array.isArray(Y)){var j=N(Y);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+j+"` supplied to `"+ee+"`, expected an array."))}for(var W=0;W<Y.length;W++){var G=D(Y,W,ee,Z,U+"["+W+"]",n);if(G instanceof Error)return G}return null}return h(R)}function T(){function D(R,J,te,ee,Z){var U=R[J];if(!s(U)){var Y=N(U);return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+Y+"` supplied to `"+te+"`, expected a single ReactElement."))}return null}return h(D)}function w(){function D(R,J,te,ee,Z){var U=R[J];if(!e.isValidElementType(U)){var Y=N(U);return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+Y+"` supplied to `"+te+"`, expected a single ReactElement type."))}return null}return h(D)}function S(D){function R(J,te,ee,Z,U){if(!(J[te]instanceof D)){var Y=D.name||p,j=z(J[te]);return new g("Invalid "+Z+" `"+U+"` of type "+("`"+j+"` supplied to `"+ee+"`, expected ")+("instance of `"+Y+"`."))}return null}return h(R)}function C(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function R(J,te,ee,Z,U){for(var Y=J[te],j=0;j<D.length;j++)if(m(Y,D[j]))return null;var W=JSON.stringify(D,function(ae,B){var xe=V(B);return xe==="symbol"?String(B):B});return new g("Invalid "+Z+" `"+U+"` of value `"+String(Y)+"` "+("supplied to `"+ee+"`, expected one of "+W+"."))}return h(R)}function P(D){function R(J,te,ee,Z,U){if(typeof D!="function")return new g("Property `"+U+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var Y=J[te],j=N(Y);if(j!=="object")return new g("Invalid "+Z+" `"+U+"` of type "+("`"+j+"` supplied to `"+ee+"`, expected an object."));for(var W in Y)if(r(Y,W)){var G=D(Y,W,ee,Z,U+"."+W,n);if(G instanceof Error)return G}return null}return h(R)}function I(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var R=0;R<D.length;R++){var J=D[R];if(typeof J!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+F(J)+" at index "+R+"."),a}function te(ee,Z,U,Y,j){for(var W=[],G=0;G<D.length;G++){var ae=D[G],B=ae(ee,Z,U,Y,j,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&W.push(B.data.expectedType)}var xe=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new g("Invalid "+Y+" `"+j+"` supplied to "+("`"+U+"`"+xe+"."))}return h(te)}function _(){function D(R,J,te,ee,Z){return A(R[J])?null:new g("Invalid "+ee+" `"+Z+"` supplied to "+("`"+te+"`, expected a ReactNode."))}return h(D)}function M(D,R,J,te,ee){return new g((D||"React class")+": "+R+" type `"+J+"."+te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function L(D){function R(J,te,ee,Z,U){var Y=J[te],j=N(Y);if(j!=="object")return new g("Invalid "+Z+" `"+U+"` of type `"+j+"` "+("supplied to `"+ee+"`, expected `object`."));for(var W in D){var G=D[W];if(typeof G!="function")return M(ee,Z,U,W,V(G));var ae=G(Y,W,ee,Z,U+"."+W,n);if(ae)return ae}return null}return h(R)}function $(D){function R(J,te,ee,Z,U){var Y=J[te],j=N(Y);if(j!=="object")return new g("Invalid "+Z+" `"+U+"` of type `"+j+"` "+("supplied to `"+ee+"`, expected `object`."));var W=t({},J[te],D);for(var G in W){var ae=D[G];if(r(D,G)&&typeof ae!="function")return M(ee,Z,U,G,V(ae));if(!ae)return new g("Invalid "+Z+" `"+U+"` key `"+G+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(J[te],null," ")+`
|
|
191
|
+
Valid keys: `+JSON.stringify(Object.keys(D),null," "));var B=ae(Y,G,ee,Z,U+"."+G,n);if(B)return B}return null}return h(R)}function A(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(A);if(D===null||s(D))return!0;var R=d(D);if(R){var J=R.call(D),te;if(R!==D.entries){for(;!(te=J.next()).done;)if(!A(te.value))return!1}else for(;!(te=J.next()).done;){var ee=te.value;if(ee&&!A(ee[1]))return!1}}else return!1;return!0;default:return!1}}function O(D,R){return D==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function N(D){var R=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":O(R,D)?"symbol":R}function V(D){if(typeof D>"u"||D===null)return""+D;var R=N(D);if(R==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return R}function F(D){var R=V(D);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function z(D){return!D.constructor||!D.constructor.name?p:D.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},Rf}var zf,Sw;function vL(){if(Sw)return zf;Sw=1;var e=Vf();function t(){}function n(){}return n.resetWarningCache=t,zf=function(){function r(a,s,l,c,u,d){if(d!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},zf}var Tw;function yL(){if(Tw)return il.exports;if(Tw=1,process.env.NODE_ENV!=="production"){var e=mw(),t=!0;il.exports=gL()(e.isElement,t)}else il.exports=vL()();return il.exports}var bL=yL();const rt=Bp(bL);function eo(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const xL=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function li(e,t,n){const r=wL(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Ew(r,"path",i),Ew(r,"relativePath",i),r}function wL(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=xL.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Ew(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const SL=[".DS_Store","Thumbs.db"];function TL(e){return eo(this,void 0,void 0,function*(){return sl(e)&&EL(e.dataTransfer)?AL(e.dataTransfer,e.type):CL(e)?kL(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?PL(e):[]})}function EL(e){return sl(e)}function CL(e){return sl(e)&&sl(e.target)}function sl(e){return typeof e=="object"&&e!==null}function kL(e){return Bf(e.target.files).map(t=>li(t))}function PL(e){return eo(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>li(n))})}function AL(e,t){return eo(this,void 0,void 0,function*(){if(e.items){const n=Bf(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(_L));return Cw(kw(r))}return Cw(Bf(e.files).map(n=>li(n)))})}function Cw(e){return e.filter(t=>SL.indexOf(t.name)===-1)}function Bf(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function _L(e){if(typeof e.webkitGetAsEntry!="function")return Pw(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Aw(t):Pw(e,t)}function kw(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?kw(n):[n]],[])}function Pw(e,t){return eo(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const a=yield i.getFile();return a.handle=i,li(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return li(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function IL(e){return eo(this,void 0,void 0,function*(){return e.isDirectory?Aw(e):OL(e)})}function Aw(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>eo(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(IL));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function OL(e){return eo(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=li(r,e.fullPath);t(o)},r=>{n(r)})})})}var ll={},_w;function ML(){return _w||(_w=1,ll.__esModule=!0,ll.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0}),ll}var DL=ML();const Hf=Bp(DL);function Iw(e){return LL(e)||FL(e)||Nw(e)||NL()}function NL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
192
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LL(e){if(Array.isArray(e))return Wf(e)}function Ow(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 Mw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ow(Object(n),!0).forEach(function(r){Dw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ow(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xa(e,t){return $L(e)||jL(e,t)||Nw(e,t)||VL()}function VL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
193
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nw(e,t){if(e){if(typeof e=="string")return Wf(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 Wf(e,t)}}function Wf(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 jL(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function $L(e){if(Array.isArray(e))return e}var RL=typeof Hf=="function"?Hf:Hf.default,zL="file-invalid-type",BL="file-too-large",HL="file-too-small",WL="too-many-files",qL=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:zL,message:"File type must be ".concat(r)}},Fw=function(t){return{code:BL,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Lw=function(t){return{code:HL,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},UL={code:WL,message:"Too many files"};function Vw(e,t){var n=e.type==="application/x-moz-file"||RL(e,t);return[n,n?null:qL(t)]}function jw(e,t,n){if(to(e.size))if(to(t)&&to(n)){if(e.size>n)return[!1,Fw(n)];if(e.size<t)return[!1,Lw(t)]}else{if(to(t)&&e.size<t)return[!1,Lw(t)];if(to(n)&&e.size>n)return[!1,Fw(n)]}return[!0,null]}function to(e){return e!=null}function YL(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(l){var c=Vw(l,n),u=xa(c,1),d=u[0],p=jw(l,r,o),f=xa(p,1),m=f[0],g=s?s(l):null;return d&&m&&!g})}function cl(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ul(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 $w(e){e.preventDefault()}function GL(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function KL(e){return e.indexOf("Edge/")!==-1}function ZL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return GL(e)||KL(e)}function jn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!cl(r)&&s&&s.apply(void 0,[r].concat(i)),cl(r)})}}function XL(){return"showOpenFilePicker"in window}function QL(e){if(to(e)){var t=Object.entries(e).filter(function(n){var r=xa(n,2),o=r[0],i=r[1],a=!0;return Rw(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(i)||!i.every(zw))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=xa(r,2),i=o[0],a=o[1];return Mw(Mw({},n),{},Dw({},i,a))},{});return[{description:"Files",accept:t}]}return e}function JL(e){if(to(e))return Object.entries(e).reduce(function(t,n){var r=xa(n,2),o=r[0],i=r[1];return[].concat(Iw(t),[o],Iw(i))},[]).filter(function(t){return Rw(t)||zw(t)}).join(",")}function eV(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function tV(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Rw(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function zw(e){return/^.*\.[\w]+$/.test(e)}var nV=["children"],rV=["open"],oV=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],iV=["refKey","onChange","onClick"];function aV(e){return cV(e)||lV(e)||Bw(e)||sV()}function sV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
194
194
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cV(e){if(Array.isArray(e))return Uf(e)}function qf(e,t){return fV(e)||dV(e,t)||Bw(e,t)||uV()}function uV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
195
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bw(e,t){if(e){if(typeof e=="string")return Uf(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 Uf(e,t)}}function Uf(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 dV(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function fV(e){if(Array.isArray(e))return e}function Hw(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 ht(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hw(Object(n),!0).forEach(function(r){Yf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dl(e,t){if(e==null)return{};var n=pV(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 pV(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 Gf=E.forwardRef(function(e,t){var n=e.children,r=dl(e,nV),o=qw(r),i=o.open,a=dl(o,rV);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(ht(ht({},a),{},{open:i})))});Gf.displayName="Dropzone";var Ww={disabled:!1,getFilesFromEvent:T2,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Gf.defaultProps=Ww,Gf.propTypes={children:nt.func,accept:nt.objectOf(nt.arrayOf(nt.string)),multiple:nt.bool,preventDropOnDocument:nt.bool,noClick:nt.bool,noKeyboard:nt.bool,noDrag:nt.bool,noDragEventsBubbling:nt.bool,minSize:nt.number,maxSize:nt.number,maxFiles:nt.number,disabled:nt.bool,getFilesFromEvent:nt.func,onFileDialogCancel:nt.func,onFileDialogOpen:nt.func,useFsAccessApi:nt.bool,autoFocus:nt.bool,onDragEnter:nt.func,onDragLeave:nt.func,onDragOver:nt.func,onDrop:nt.func,onDropAccepted:nt.func,onDropRejected:nt.func,onError:nt.func,validator:nt.func};var Kf={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function qw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ht(ht({},Ww),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,w=t.noKeyboard,S=t.noDrag,C=t.noDragEventsBubbling,P=t.onError,I=t.validator,_=E.useMemo(function(){return J2(n)},[n]),M=E.useMemo(function(){return Q2(n)},[n]),L=E.useMemo(function(){return typeof h=="function"?h:Uw},[h]),$=E.useMemo(function(){return typeof g=="function"?g:Uw},[g]),A=E.useRef(null),O=E.useRef(null),N=E.useReducer(hV,Kf),V=qf(N,2),F=V[0],z=V[1],D=F.isFocused,R=F.isFileDialogActive,J=E.useRef(typeof window<"u"&&window.isSecureContext&&v&&X2()),te=function(){!J.current&&R&&setTimeout(function(){if(O.current){var ue=O.current.files;ue.length||(z({type:"closeDialog"}),$())}},300)};E.useEffect(function(){return window.addEventListener("focus",te,!1),function(){window.removeEventListener("focus",te,!1)}},[O,R,$,J]);var ee=E.useRef([]),Z=function(ue){A.current&&A.current.contains(ue.target)||(ue.preventDefault(),ee.current=[])};E.useEffect(function(){return x&&(document.addEventListener("dragover",$w,!1),document.addEventListener("drop",Z,!1)),function(){x&&(document.removeEventListener("dragover",$w),document.removeEventListener("drop",Z))}},[A,x]),E.useEffect(function(){return!r&&y&&A.current&&A.current.focus(),function(){}},[A,y,r]);var U=E.useCallback(function(X){P?P(X):console.error(X)},[P]),Y=E.useCallback(function(X){X.preventDefault(),X.persist(),ce(X),ee.current=[].concat(aV(ee.current),[X.target]),ul(X)&&Promise.resolve(o(X)).then(function(ue){if(!(cl(X)&&!C)){var _e=ue.length,We=_e>0&&Y2({files:ue,accept:_,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),Ct=_e>0&&!We;z({isDragAccept:We,isDragReject:Ct,isDragActive:!0,type:"setDraggedFiles"}),c&&c(X)}}).catch(function(ue){return U(ue)})},[o,c,U,C,_,a,i,s,l,I]),j=E.useCallback(function(X){X.preventDefault(),X.persist(),ce(X);var ue=ul(X);if(ue&&X.dataTransfer)try{X.dataTransfer.dropEffect="copy"}catch{}return ue&&d&&d(X),!1},[d,C]),W=E.useCallback(function(X){X.preventDefault(),X.persist(),ce(X);var ue=ee.current.filter(function(We){return A.current&&A.current.contains(We)}),_e=ue.indexOf(X.target);_e!==-1&&ue.splice(_e,1),ee.current=ue,!(ue.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ul(X)&&u&&u(X))},[A,u,C]),G=E.useCallback(function(X,ue){var _e=[],We=[];X.forEach(function(Ct){var mt=Vw(Ct,_),Lt=qf(mt,2),Sn=Lt[0],zn=Lt[1],wr=jw(Ct,a,i),Sr=qf(wr,2),Tr=Sr[0],H=Sr[1],q=I?I(Ct):null;if(Sn&&Tr&&!q)_e.push(Ct);else{var Re=[zn,H];q&&(Re=Re.concat(q)),We.push({file:Ct,errors:Re.filter(function(et){return et})})}}),(!s&&_e.length>1||s&&l>=1&&_e.length>l)&&(_e.forEach(function(Ct){We.push({file:Ct,errors:[U2]})}),_e.splice(0)),z({acceptedFiles:_e,fileRejections:We,isDragReject:We.length>0,type:"setFiles"}),p&&p(_e,We,ue),We.length>0&&m&&m(We,ue),_e.length>0&&f&&f(_e,ue)},[z,s,_,a,i,l,p,f,m,I]),ae=E.useCallback(function(X){X.preventDefault(),X.persist(),ce(X),ee.current=[],ul(X)&&Promise.resolve(o(X)).then(function(ue){cl(X)&&!C||G(ue,X)}).catch(function(ue){return U(ue)}),z({type:"reset"})},[o,G,U,C]),B=E.useCallback(function(){if(J.current){z({type:"openDialog"}),L();var X={multiple:s,types:M};window.showOpenFilePicker(X).then(function(ue){return o(ue)}).then(function(ue){G(ue,null),z({type:"closeDialog"})}).catch(function(ue){eV(ue)?($(ue),z({type:"closeDialog"})):tV(ue)?(J.current=!1,O.current?(O.current.value=null,O.current.click()):U(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):U(ue)});return}O.current&&(z({type:"openDialog"}),L(),O.current.value=null,O.current.click())},[z,L,$,v,G,U,M,s]),xe=E.useCallback(function(X){!A.current||!A.current.isEqualNode(X.target)||(X.key===" "||X.key==="Enter"||X.keyCode===32||X.keyCode===13)&&(X.preventDefault(),B())},[A,B]),Ee=E.useCallback(function(){z({type:"focus"})},[]),Oe=E.useCallback(function(){z({type:"blur"})},[]),$e=E.useCallback(function(){T||(Z2()?setTimeout(B,0):B())},[T,B]),se=function(ue){return r?null:ue},ye=function(ue){return w?null:se(ue)},K=function(ue){return S?null:se(ue)},ce=function(ue){C&&ue.stopPropagation()},Q=E.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ue=X.refKey,_e=ue===void 0?"ref":ue,We=X.role,Ct=X.onKeyDown,mt=X.onFocus,Lt=X.onBlur,Sn=X.onClick,zn=X.onDragEnter,wr=X.onDragOver,Sr=X.onDragLeave,Tr=X.onDrop,H=dl(X,oV);return ht(ht(Yf({onKeyDown:ye(jn(Ct,xe)),onFocus:ye(jn(mt,Ee)),onBlur:ye(jn(Lt,Oe)),onClick:se(jn(Sn,$e)),onDragEnter:K(jn(zn,Y)),onDragOver:K(jn(wr,j)),onDragLeave:K(jn(Sr,W)),onDrop:K(jn(Tr,ae)),role:typeof We=="string"&&We!==""?We:"presentation"},_e,A),!r&&!w?{tabIndex:0}:{}),H)}},[A,xe,Ee,Oe,$e,Y,j,W,ae,w,S,r]),ie=E.useCallback(function(X){X.stopPropagation()},[]),we=E.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ue=X.refKey,_e=ue===void 0?"ref":ue,We=X.onChange,Ct=X.onClick,mt=dl(X,iV),Lt=Yf({accept:_,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:se(jn(We,ae)),onClick:se(jn(Ct,ie)),tabIndex:-1},_e,O);return ht(ht({},Lt),mt)}},[O,n,s,ae,r]);return ht(ht({},F),{},{isFocused:D&&!r,getRootProps:Q,getInputProps:we,rootRef:A,inputRef:O,open:se(B)})}function hV(e,t){switch(t.type){case"focus":return ht(ht({},e),{},{isFocused:!0});case"blur":return ht(ht({},e),{},{isFocused:!1});case"openDialog":return ht(ht({},Kf),{},{isFileDialogActive:!0});case"closeDialog":return ht(ht({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ht(ht({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ht(ht({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return ht({},Kf);default:return e}}function Uw(){}const mV={isImage:e=>e.type.includes("image")},gV=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(mV.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:dw(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:dw(e.file.size)})},[e.file]),t.type==="img"?b.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[b.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[b.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),b.jsxs("div",{className:"flex flex-col",children:[b.jsx("span",{children:e.file.name}),b.jsx("span",{children:t.size})]})]}),b.jsx(go,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:b.jsx(Oo,{})})]}):b.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[b.jsxs("header",{className:"flex flex-row items-center gap-4",children:[b.jsx(vy,{size:48}),b.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[b.jsx("span",{children:e.file.name}),b.jsx("span",{children:t.size})]})]}),b.jsx(go,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:b.jsx(Oo,{className:"text-danger"})})]})},vV=e=>b.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>b.jsx(gV,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),yV=e=>e.isDragActive?b.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?b.jsx(vV,{onDeleteFile:e.onDeleteFile,files:e.files}):b.jsx(E.Fragment,{children:e.idle}),bV=b.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[b.jsx(s_,{size:64}),b.jsxs("p",{children:["You can drag your files or"," ",b.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),xV=({idle:e=bV,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=E.useState([]),a=d=>{n==null||n(d),i(d)},{getRootProps:s,getInputProps:l,isDragActive:c}=qw({onDrop:a});return b.jsxs("div",{...s(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[b.jsx("input",{...l(r),name:r.name,id:r.name}),b.jsx(yV,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},wV=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return b.jsx("form",{...e,onSubmit:t})};class no extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof no&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new no(this);return t?t(n):n}}const SV=e=>b.jsx(E.Fragment,{children:e.children}),TV={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},EV={caseSensitive:!1,sort:!1},Yw=[],CV=E.forwardRef(function(t,n){return b.jsx(ft.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:b.jsx(Jn,{children:t.children})})}),kV=E.forwardRef(function({item:t,context:n,...r},o){return b.jsx(ft.li,{...r,ref:o,className:"last:rounded-t-lg"})}),PV={List:CV,Item:kV},AV=e=>{const t=Ot(),n=E.useRef(null),r=E.Children.count(e.children),[o,i]=E.useState(!1);return E.useEffect(()=>{if(n.current===null)return;const a=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>a.width)return i(!0)},[r]),b.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?b.jsxs(_c,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},_V=E.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,onChangeOptions:g,...h},v)=>{const y=E.useMemo(()=>new no(r.map(Q=>[Q.value,Q])),[r]),x=E.useRef(null),T=E.useRef(null),w=h.value??h.defaultValue??Yw,S=Ot(),[C,P]=E.useState(0),[I,_]=E.useState(!1),[M,L]=E.useState(""),[$,A]=E.useState(()=>{const Q=new no;return w.forEach(ie=>{const we=y.get(ie);return we?Q.set(ie,we):void 0}),Q}),O=E.useMemo(()=>Array.from($.keys()),[$]),[N,V]=E.useState(()=>{const Q=new Set(w);return r.reduce((ie,we)=>Q.has(we.value)?[...ie,we.label??we.value]:ie,[])??w}),[F,z]=E.useState(null),D=E.useRef(Yw),R=m&&M!==""?[{value:M,label:M,"data-dynamic":"true"},...r]:r,J=new Xr(R,["value","label"],EV).search(M);E.useEffect(()=>{I||P(0)},[I]),E.useEffect(()=>{h.value&&A(new no(h.value.map(Q=>[Q,y.get(Q)])))},[h.value,y]);const te=J.filter(Q=>Q.hidden!==!0),ee=te.length===0,{x:Z,y:U,strategy:Y,refs:j,context:W}=Gr({open:I,transform:!0,strategy:"absolute",onOpenChange:_,whileElementsMounted:ea,middleware:[ta(4),Sx({padding:10,elementContext:"reference",apply(Q){if(x.current===null)return;const ie=x.current.getBoundingClientRect().width,we=360;wi.flushSync(()=>setTimeout(()=>P(we),200)),Object.assign(Q.elements.floating.style,{width:`${ie}px`,maxWidth:`${ie}px`,maxHeight:ee?"auto":`${we}px`,height:ee?"auto":`${we}px`})}})]}),G=r0(W,TV),{getReferenceProps:ae,getFloatingProps:B,getItemProps:xe}=Kr([Zr(W,{role:"listbox"}),Yr(W),Qd(W,{cols:0,listRef:D,loop:!0,virtual:!0,allowEscape:!0,activeIndex:F,selectedIndex:F,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:Q=>z(ie=>Q??ie)})]);E.useEffect(()=>{const Q=j.reference.current;if(Q)return Si(Q)},[]);const Ee=(Q,ie)=>{const we=$.clone(_e=>_e.has(Q.value)?_e.remove(Q.value):_e.set(Q.value,Q));A(we);const X=j.reference.current;if(!X)return;const ue=we.map(_e=>_e.value);X==null||X.setAttribute("data-value",JSON.stringify(ue)),g&&g(ue),V(_e=>_e.concat(Q.label??"")),L(""),z(ie)},Oe=Q=>{const ie=Q.target.value;return L(ie),!I&&ie===""?_(!0):(Q.target.name=h.name||"",ie?_(!0):void 0)},$e=()=>{var Q;_(!0),L(""),(Q=j.reference.current)==null||Q.focus()},se=()=>{_(!0),L("")},ye=()=>{var Q;(Q=j.reference.current)==null||Q.setAttribute("data-value","[]"),L(""),_(!1),A(new no),g==null||g([])},K=h.id||h.name,ce=$.map((Q,ie)=>b.jsx(_c,{size:"small",icon:b.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:we=>{we.stopPropagation(),Ee(Q,ie)},children:b.jsx(os,{size:14})}),children:Q.label??Q.value},`MultiSelect-${Q.value}-x`));return b.jsxs(ya,{...h,left:e,error:t,ref:x,form:h.form,name:h.name,feedback:d,hideLeft:p,required:f,title:h.title,container:o,rightLabel:i,interactive:a,id:h.name||h.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:b.jsxs("span",{className:"flex items-center gap-0.5",children:[n,b.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:$e,children:[b.jsx(Ru,{size:20}),b.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),$?b.jsx("button",{type:"button",onClick:ye,className:"transition-colors link:text-danger",children:b.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[b.jsx("button",{...ae({...h,onFocus:se,id:`${K}-shadow`,name:`${K}-shadow`,ref:j.setReference}),type:"button","data-name":K,"data-target":K,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":O.join(","),value:I?M:N||$,className:Le("input placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",h.className),children:b.jsx(AV,{label:c,children:ce})}),b.jsx("input",{id:K,name:K,type:"hidden","data-origin":K,ref:v,required:f,defaultValue:h.value||O||void 0}),b.jsx(qr,{preserveTabOrder:!0,children:I?b.jsx(Jo,{modal:!0,guards:!0,returnFocus:!1,context:W,initialFocus:-1,visuallyHiddenDismiss:!0,children:b.jsxs("div",{...B({ref:j.setFloating,style:{...G.styles,top:U??0,position:Y,left:(Z??0)+($?26:18)}}),"data-floating":"true",className:"isolate z-floating m-0 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[b.jsx("input",{autoFocus:!0,value:M,onChange:Oe,title:h.title,placeholder:S.multiSelectInnerPlaceholder,onKeyDown:Q=>{var ie,we;if(Q.key==="ArrowDown"){let X=F+1;return X>te.length-1&&(X=0),(ie=T.current)==null||ie.scrollIntoView({index:X}),z(X)}if(Q.key==="ArrowUp"){let X=F-1;return X<0&&(X=te.length-1),(we=T.current)==null||we.scrollIntoView({index:X}),z(X)}if(Q.key==="Escape")return Q.currentTarget.blur(),_(!1);if(Q.key==="Enter"){if(F!==null&&te[F])return Q.preventDefault(),Ee(te[F],F);if(te.length===1)return Q.preventDefault(),Ee(te[0],0)}},className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary"}),ee?b.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:b.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||S.autocompleteEmpty})}):null,ee?null:b.jsx(kf,{ref:T,hidden:ee,data:te,components:PV,style:{height:ee?"0":$.size===0?C-49:C-86},className:"border-floating-border bg-floating-background p-0 text-foreground",itemContent:(Q,ie)=>{const we=ie.Render??SV,X=$.has(ie.value)||$.has(ie.label??""),ue=F===Q,_e=ie.label??ie.value;return b.jsxs("button",{"data-value":ie.value,...xe({ref:We=>void(D.current[Q]=We),role:"option",type:"button","aria-checked":X,"aria-current":X,"aria-selected":X,"aria-busy":ie.disabled,onClick:()=>Ee(ie,Q)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${X||ue?"bg-floating-hover text-floating-foreground":""}`,children:[b.jsx(Mf,{onChange:ld,checked:X,"aria-checked":X,onClick:We=>{We.stopPropagation(),Ee(ie,Q)}}),b.jsx(we,{...h,label:ie.label,value:ie.value,children:_e})]})}}),$.size===0?null:b.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:ce})]})}):null})]})}),IV=({children:e,className:t="",size:n,...r})=>b.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[b.jsx("input",{...r,type:"radio",className:Le("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),ro=E.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:p,left:f,error:m,...g},h)=>{const v=Ot(),y=E.useRef(null),x=g.id??g.name;E.useImperativeHandle(h,()=>y.current),E.useEffect(()=>{if(y.current===null)return;const w=new AbortController,S=y.current,C=Si(y.current);return S.addEventListener("change",()=>S.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const T=()=>{var w;return(w=y.current)==null?void 0:w.focus()};return b.jsx(ya,{info:n,left:f,error:m,form:g.form,loading:l,name:g.name,feedback:o,hideLeft:d,required:e,title:g.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:g.name||g.id,optionalText:c,labelClassName:i,placeholder:g.placeholder,right:b.jsxs("label",{htmlFor:x,children:[p,b.jsxs("button",{onClick:T,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[b.jsx(Ru,{size:20}),b.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})]}),children:b.jsxs("select",{...g,id:x,name:x,value:g.value,required:e,ref:Fa(h,y),"data-selected":!!g.value||!1,defaultValue:g.value?void 0:"",title:typeof g.title=="string"?g.title:void 0,className:Le("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",g.className),children:[b.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>E.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${x}-select-option-${w.value}`}))]})})});function Gw(e,[t,n]){return Math.min(n,Math.max(t,e))}function ci(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Kw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zw(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Kw(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Kw(e[o],null)}}}}function oo(...e){return k.useCallback(Zw(...e),e)}function Xw(e,t=[]){let n=[];function r(i,a){const s=k.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...m}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,h=k.useMemo(()=>m,Object.values(m));return b.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=k.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,OV(o,...t)]}function OV(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Qw(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function MV({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=DV({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Qw(n),l=k.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function DV({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=Qw(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var NV=k.createContext(void 0);function FV(e){const t=k.useContext(NV);return e||t||"ltr"}function LV(e){const t=k.useRef({value:e,previous:e});return k.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var VV=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{};function jV(e){const[t,n]=k.useState(void 0);return VV(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Zf(e){const t=$V(e),n=k.forwardRef((r,o)=>{const{children:i,...a}=r,s=k.Children.toArray(i),l=s.find(zV);if(l){const c=l.props.children,u=s.map(d=>d===l?k.Children.count(c)>1?k.Children.only(null):k.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:k.isValidElement(c)?k.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function $V(e){const t=k.forwardRef((n,r)=>{const{children:o,...i}=n;if(k.isValidElement(o)){const a=HV(o),s=BV(i,o.props);return o.type!==k.Fragment&&(s.ref=r?Zw(r,a):a),k.cloneElement(o,s)}return k.Children.count(o)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var RV=Symbol("radix.slottable");function zV(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===RV}function BV(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function HV(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)}var WV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],fl=WV.reduce((e,t)=>{const n=Zf(`Primitive.${t}`),r=k.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qV(e){const t=e+"CollectionProvider",[n,r]=Xw(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:h,children:v}=g,y=E.useRef(null),x=E.useRef(new Map).current;return b.jsx(o,{scope:h,itemMap:x,collectionRef:y,children:v})};a.displayName=t;const s=e+"CollectionSlot",l=Zf(s),c=E.forwardRef((g,h)=>{const{scope:v,children:y}=g,x=i(s,v),T=oo(h,x.collectionRef);return b.jsx(l,{ref:T,children:y})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=Zf(u),f=E.forwardRef((g,h)=>{const{scope:v,children:y,...x}=g,T=E.useRef(null),w=oo(h,T),S=i(u,v);return E.useEffect(()=>(S.itemMap.set(T,{ref:T,...x}),()=>void S.itemMap.delete(T))),b.jsx(p,{[d]:"",ref:w,children:y})});f.displayName=u;function m(g){const h=i(e+"CollectionConsumer",g);return E.useCallback(()=>{const y=h.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((S,C)=>x.indexOf(S.ref.current)-x.indexOf(C.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},m,r]}var Jw=["PageUp","PageDown"],e1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],t1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ui="Slider",[Xf,UV,YV]=qV(ui),[n1,YR]=Xw(ui,[YV]),[GV,pl]=n1(ui),r1=k.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:m,...g}=e,h=k.useRef(new Set),v=k.useRef(0),x=a==="horizontal"?KV:ZV,[T=[],w]=MV({prop:u,defaultProp:c,onChange:M=>{var $;($=[...h.current][v.current])==null||$.focus(),d(M)}}),S=k.useRef(T);function C(M){const L=tj(T,M);_(M,L)}function P(M){_(M,v.current)}function I(){const M=S.current[v.current];T[v.current]!==M&&p(T)}function _(M,L,{commit:$}={commit:!1}){const A=ij(i),O=aj(Math.round((M-r)/i)*i+r,A),N=Gw(O,[r,o]);w((V=[])=>{const F=JV(V,N,L);if(oj(F,l*i)){v.current=F.indexOf(N);const z=String(F)!==String(V);return z&&$&&p(F),z?F:V}else return V})}return b.jsx(GV,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:v,thumbs:h.current,values:T,orientation:a,form:m,children:b.jsx(Xf.Provider,{scope:e.__scopeSlider,children:b.jsx(Xf.Slot,{scope:e.__scopeSlider,children:b.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:ci(g.onPointerDown,()=>{s||(S.current=T)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:C,onSlideMove:s?void 0:P,onSlideEnd:s?void 0:I,onHomeKeyDown:()=>!s&&_(r,0,{commit:!0}),onEndKeyDown:()=>!s&&_(o,T.length-1,{commit:!0}),onStepKeyDown:({event:M,direction:L})=>{if(!s){const O=Jw.includes(M.key)||M.shiftKey&&e1.includes(M.key)?10:1,N=v.current,V=T[N],F=i*O*L;_(V+F,N,{commit:!0})}}})})})})});r1.displayName=ui;var[o1,i1]=n1(ui,{startEdge:"left",endEdge:"right",size:"width",direction:1}),KV=k.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=k.useState(null),f=oo(t,x=>p(x)),m=k.useRef(void 0),g=FV(o),h=g==="ltr",v=h&&!i||!h&&i;function y(x){const T=m.current||d.getBoundingClientRect(),w=[0,T.width],C=ep(w,v?[n,r]:[r,n]);return m.current=T,C(x-T.left)}return b.jsx(o1,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:b.jsx(a1,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const T=y(x.clientX);a==null||a(T)},onSlideMove:x=>{const T=y(x.clientX);s==null||s(T)},onSlideEnd:()=>{m.current=void 0,l==null||l()},onStepKeyDown:x=>{const w=t1[v?"from-left":"from-right"].includes(x.key);c==null||c({event:x,direction:w?-1:1})}})})}),ZV=k.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=k.useRef(null),d=oo(t,u),p=k.useRef(void 0),f=!o;function m(g){const h=p.current||u.current.getBoundingClientRect(),v=[0,h.height],x=ep(v,f?[r,n]:[n,r]);return p.current=h,x(g-h.top)}return b.jsx(o1,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:b.jsx(a1,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const h=m(g.clientY);i==null||i(h)},onSlideMove:g=>{const h=m(g.clientY);a==null||a(h)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:g=>{const v=t1[f?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:v?-1:1})}})})}),a1=k.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=pl(ui,n);return b.jsx(fl.span,{...c,ref:t,onKeyDown:ci(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):Jw.concat(e1).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:ci(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:ci(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:ci(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),s1="SliderTrack",l1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=pl(s1,n);return b.jsx(fl.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});l1.displayName=s1;var Qf="SliderRange",c1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=pl(Qf,n),i=i1(Qf,n),a=k.useRef(null),s=oo(t,a),l=o.values.length,c=o.values.map(p=>d1(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return b.jsx(fl.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});c1.displayName=Qf;var Jf="SliderThumb",u1=k.forwardRef((e,t)=>{const n=UV(e.__scopeSlider),[r,o]=k.useState(null),i=oo(t,s=>o(s)),a=k.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return b.jsx(XV,{...e,ref:i,index:a})}),XV=k.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=pl(Jf,n),s=i1(Jf,n),[l,c]=k.useState(null),u=oo(t,y=>c(y)),d=l?a.form||!!l.closest("form"):!0,p=jV(l),f=a.values[r],m=f===void 0?0:d1(f,a.min,a.max),g=ej(r,a.values.length),h=p==null?void 0:p[s.size],v=h?nj(h,m,s.direction):0;return k.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),b.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${m}% + ${v}px)`},children:[b.jsx(Xf.ItemSlot,{scope:e.__scopeSlider,children:b.jsx(fl.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:ci(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&b.jsx(QV,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});u1.displayName=Jf;var QV=e=>{const{value:t,...n}=e,r=k.useRef(null),o=LV(t);return k.useEffect(()=>{const i=r.current,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(o!==t&&l){const c=new Event("input",{bubbles:!0});l.call(i,t),i.dispatchEvent(c)}},[o,t]),b.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function JV(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function d1(e,t,n){const i=100/(n-t)*(e-t);return Gw(i,[0,100])}function ej(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function tj(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function nj(e,t,n){const r=e/2,i=ep([0,50],[0,r]);return(r-i(t)*n)*n}function rj(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function oj(e,t){if(t>0){const n=rj(e);return Math.min(...n)>=t}return!0}function ep(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function ij(e){return(String(e).split(".")[1]||"").length}function aj(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var sj=r1,lj=l1,cj=c1,uj=u1;const dj=e=>{const[t,n]=E.useState(null),r=E.useRef(null);return E.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));rt.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(rt.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),b.jsx(tf,{title:"",ref:r,as:uj,enabled:e.tooltip,className:"block size-5 cursor-grab rounded-full border-2 border-card-border bg-card-background shadow active:cursor-grabbing",children:t})},fj=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef($o()),s=r||o||[];return b.jsxs(sj,{...i,defaultValue:r,value:o,className:Le("relative flex h-5 w-full touch-none select-none items-center",n),children:[b.jsx(lj,{className:"relative h-2 grow rounded-full bg-background",children:b.jsx(cj,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>b.jsx(dj,{tooltip:t??!1},`${a.current}-${c}`))]})},pj=E.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=E.useId(),[s,l]=E.useState(o.checked??!1),c=s,u=E.useRef(null),d=vo(o.onChange);E.useImperativeHandle(i,()=>u.current),E.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},m=u.current;return m.addEventListener("change",f),()=>m==null?void 0:m.removeEventListener("change",f)}},[]);const p=()=>{var m,g;const f=!((m=u.current)!=null&&m.checked);l(f),(g=o==null?void 0:o.onCheck)==null||g.call(o,f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return b.jsxs("fieldset",{className:Le("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[b.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[b.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:f=>l(f.target.checked)}),b.jsx("button",{type:"button",role:"switch",onClick:p,"aria-checked":c,"data-checked":c,"aria-labelledby":`${a}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:b.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),b.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:b.jsx("span",{className:"font-medium text-foreground",children:e})})]}),b.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),hj=e=>{const[t,n]=FA();return E.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const a=i.target,s=Array.from(r.querySelectorAll("input[data-task=true]")),l=s.every(u=>u.checked),c=s.indexOf(a);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:RA(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),b.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},mj=sw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
|
|
196
|
-
`);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),gj=e=>{const[t,n]=E.useState(0);return E.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},vj={Item:E.forwardRef(function(t,n){return b.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return b.jsx("ul",{...t,ref:n,className:"space-y-3"})})},yj=e=>{const t=E.useRef(null),n=gj(t);return b.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[b.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[b.jsx("header",{className:"border-b border-card-border pb-2"}),b.jsxs("div",{className:"px-8 space-y-2",children:[b.jsx(ba,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),b.jsx(kf,{height:n,useWindowScroll:!0,data:e.source,components:vj,itemContent:(r,o)=>b.jsx(E.Fragment,{children:b.jsx(Mf,{children:b.jsx(e.Item,{data:o})})})})]})]}),b.jsx("div",{children:b.jsx(go,{children:b.jsx(zu,{})})}),b.jsx("div",{})]})};var bj=Object.defineProperty,f1=Object.getOwnPropertySymbols,xj=Object.prototype.hasOwnProperty,wj=Object.prototype.propertyIsEnumerable,p1=(e,t,n)=>t in e?bj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sj=(e,t)=>{for(var n in t||(t={}))xj.call(t,n)&&p1(e,n,t[n]);if(f1)for(var n of f1(t))wj.call(t,n)&&p1(e,n,t[n]);return e},tp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},Tj=(e,t,n,r)=>ml(tp,e,t,n,r),di=e=>typeof e=="object",vr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!di(e)&&!di(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>vr(e[r],t[r]))},Ej=(e,t)=>(di(e)||Array.isArray(e))&&t?e[t]:e,Cj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,hl=e=>/[0-9.]+/.test(e),h1=e=>["string","number"].includes(typeof e),m1=e=>e==null||(e==null?void 0:e.length)===0||e==="",g1={eq:vr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:m1,notEmpty:e=>!m1(e),in:(e,t)=>tp(t,n=>vr(e,n)),notIn:(e,t)=>v1(t,n=>!vr(e,n))},kj=e=>{if(e in g1)return g1[e];throw new Error("Linq - Symbol not found")},fi=(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},ml=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=kj(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},Pj=(e,t,n,r)=>ml(fi,e,t,n,r),v1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},Aj=(e,t,n,r)=>ml(v1,e,t,n,r),y1=e=>{if(e===null)return null;const t=Sj({},e);return Object.keys(t).forEach(n=>t[n]=di(e[n])?y1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},b1=(e,t)=>{if(di(t)){for(let n=0;n<e.length;n++){const r=e[n];if(vr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(vr(t,r))return!0}return!1},_j=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},Ij=e=>fi(e,(t,n,r)=>di(t)?n===r.findIndex(o=>vr(o,t)):n===r.indexOf(t)),Oj=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},x1=(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())},Mj=(e,t)=>x1(e,n=>n[t]),w1=(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},Dj=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},Nj=(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 hl(e)&&hl(t)?r.map(a=>Number.parseInt(a)):r},np=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&hl(e)&&hl(t)){const o=[],[i,a]=Dj(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return Nj(e,t,r)},Fj=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?np(r,o,1):np(r,i,Number.parseInt(o,10))}return h1(e)&&h1(t)?np(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},rp=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const a=n[i];r=e(r,a,i,n)}return r},S1=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},Lj=(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)},Vj=(e,t,n,r)=>ml(Lj,e,t,n,r),T1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(Cj(t))},E1=(e=>(e.Asc="asc",e.Desc="desc",e))(E1||{}),jj=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.key,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),$j=(e,t)=>e.sort(jj(t)),Rj=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:fi(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},zj=class Fp{constructor(t=[]){this.array=t}static Range(...t){return Fj(...t)}static New(t){return new Fp(t)}Where(t,n,r){return this.array=Pj(this.array,t,n,r),this}Some(t,n,r){return Tj(this.array,t,n,r)}All(t,n,r){return Aj(this.array,t,n,r)}Reverse(){return this.array=S1(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=Vj(this.array,t,n,r),this}Distinct(){return this.array=Ij(this.array),this}First(t){return t===void 0?this.array[0]:Oj(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?rp((n,r)=>n+r,0,this.array):rp((n,r)=>n+Ej(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return Mj(this.array,t)}GroupWith(t){return x1(this.array,t)}Except(t){return fi(this.array,n=>!b1(t,n))}Intersect(t){return fi(this.array,n=>b1(t,n))}OrderBy(t,n){let r;return r=t?T1(this.array,t):this.array.toSorted(),this.array=n==="desc"?S1(r):r,this}Includes(t){return tp(this.array,n=>vr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return rp(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(w1(this.array,n=>[t,n]))}Zip(t,n){return w1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:fi(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Fp(y1(this.array))}ToObject(t){return _j(this.array,t)}Sort(t){return Array.isArray(t)?$j(this.array,t):T1(this.array,t)}Unique(t){return Rj(this.array,t)}},C1=zj,op={},k1;function Bj(){return k1||(k1=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,v)=>{try{Object.keys(h).forEach(v)}catch(y){window.console.log(y)}},n=h=>h==null,r=h=>{const v=typeof h;return v==="string"||v==="number"||v==="boolean"||n(h)},o=(h,v)=>{const y=v.getItem(h);try{return JSON.parse(y)}catch{return y??null}},i=h=>Object.keys(h).reduce((v,y)=>({...v,[y]:o(y,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,v)=>(h[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(v=>v(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const v=h.domain??"";return v===""?"":`domain=${h.multiDomain?".":""}${v}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],p={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(v=>v.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const v=p.json()[h];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,v,y={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((w,S)=>{const C=S.parse(y);return C===""?w:w.concat(C)},[`${encodeURIComponent(h)}=${x}`]).join(";");document.cookie=T,u()}},f=h=>{const v=new Set,y=x=>{h().removeItem(x);const T=i(h());v.forEach(w=>w(T))};return{delete:y,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(h()):h(),has:x=>{const T=h().getItem(x);return!n(T)},deleteAll:()=>{t(h(),y),v.forEach(x=>x(h()))},get:x=>o(x,h()),set:(x,T)=>{h().setItem(x,JSON.stringify(T)),v.forEach(w=>w(h()))}}},m=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=m,e.createStorage=f}(op)),op}var wa=Bj();const ip=e=>e.headerLabel??e.thead??e.id,ap=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var pi=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(pi||{});const sp=e=>e.type==="number"?e.valueAsNumber:e.value,Hj=e=>{let t=[];return e({add:(o,i,a)=>t.push({...a,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},Wj={},qj=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const a=r.get(o.id);return a===void 0?e[i]:a})},Uj=(e,t,n=Wj)=>{const r=$r()?null:wa.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=rd({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:qj(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return $r()||wa.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},Yj=e=>{const t=vo(e),n=E.useRef(null),r=E.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-colid="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},lp=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??pi.Text,a=t[i]??[],s=((c=a.find(d=>d["data-default"]))==null?void 0:c.value)??((u=a[0])==null?void 0:u.value),l=n[s];return{id:$o(),operation:l,label:ip(e),name:o,type:i,value:"",...r}},cp=()=>{const e=Ot(),t=E.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:E.useMemo(()=>({[pi.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[pi.Boolean]:[t.is,t.isNot],[pi.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},Gj=e=>{const t=Ot(),n=cp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,lp(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>{if(c!==p.id)return p;const f=e.cols.find(m=>u===m.id);return lp(f,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>p.id===c?{...p,operation:n.operations[u]}:p))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=sp(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return b.jsx(E.Fragment,{children:b.jsx(ti,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(n_,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:b.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return b.jsxs("li",{className:"flex flex-nowrap gap-3",children:[b.jsx(ro,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),b.jsx(ro,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),b.jsx(ba,{"data-id":l.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),b.jsx("div",{className:"mt-5 flex items-center justify-center",children:b.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:b.jsx(Oo,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),b.jsx("li",{children:b.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[b.jsx(Bu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},Kj=({filter:e,onDelete:t,set:n})=>{const r=Ot(),o=cp(),i=s=>{const l=s.target.value,c=s.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},a=s=>{const l=s.target.dataset.id||"",c=sp(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return b.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[b.jsx(ro,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),b.jsx(ba,{optionalText:" ","data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),b.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:b.jsx(Oo,{className:"text-danger",size:14})})]})},Zj=({item:e,onPointerDown:t})=>{const n=Io(0);return b.jsxs(fy,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[b.jsx("button",{type:"button",className:"cursor-grab",children:b.jsx(t_,{size:14})}),b.jsx("span",{children:e.groupName})]},e.groupId)},Xj=e=>{var l;const t=Ot(),n=ap(e.cols),r=jA(),[o,i]=E.useState(((l=e.groups[0])==null?void 0:l.thead)||""),a=c=>{var h;const u=c.target,d=u.value,p=u.options.selectedIndex,f=((h=u.options.item(p))==null?void 0:h.label)||"";i(f);const m=new C1(e.rows).GroupBy(d),g=e.cols.find(v=>v.id===d);e.setGroups(HS(m).map((v,y)=>{const x=m[v];return{...g,groupId:$o(),groupKey:d,index:y,rows:x,groupName:v}}))},s=()=>e.setGroups([]);return b.jsx(E.Fragment,{children:b.jsxs(ti,{arrow:!1,title:t.tableGroupLabel,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(a_,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[b.jsxs("div",{className:"flex flex-nowrap items-center",children:[b.jsx(ro,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),b.jsx(go,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:b.jsx(Oo,{size:16,className:"text-danger"})})]}),e.groups.length>0?b.jsxs("section",{className:"my-4",children:[b.jsx("header",{children:b.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),b.jsx(ZT,{children:b.jsx(uy,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>b.jsx(Zj,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},Qj=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.value,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),Jj=(e,t)=>e.toSorted(Qj(t)),P1=(e,t,n)=>({label:t,id:$o(),type:n,value:e.id}),e$=e=>{const t=Ot(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,P1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,type:u}:p))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return b.jsx(E.Fragment,{children:b.jsx(ti,{title:t.tableSortDropdownTitle,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(my,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:b.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>b.jsxs("li",{className:"flex flex-nowrap gap-3",children:[b.jsx(ro,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),b.jsx(ro,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),b.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:b.jsx(Oo,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),b.jsx("li",{children:b.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[b.jsx(Bu,{size:14})," ",t.tableSortAddButton]})})]})})})},t$=e=>{const t=Ot(),[n,r]=E.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");E.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=P1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=ip(e.col);return b.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[b.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?b.jsx(XA,{size:14}):null,n==="desc"?b.jsx(ZA,{size:14}):null,n==="undefined"?b.jsx(my,{size:14}):null]})},n$=e=>b.jsx("header",{className:"min-w-full mb-1",children:b.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[b.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[b.jsx("span",{children:b.jsx(Gj,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),b.jsx("span",{children:b.jsx(e$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),b.jsx("span",{children:b.jsx(Xj,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),b.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>b.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[b.jsxs("span",{children:[b.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),b.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[b.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),b.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=sp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function r$(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let s=o>2?o:2;s<=Math.min(t,i);s++)n.push(s);const a=t-2;return i+1!==a&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const o$=e=>{const t=E.useId(),n=Ot(),r=E.useMemo(()=>r$(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return b.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[b.jsx("p",{children:b.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?b.jsxs(E.Fragment,{children:[b.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),b.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>b.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),b.jsx("nav",{children:b.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?b.jsx("li",{children:b.jsx(on,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:b.jsx(E.Fragment,{children:typeof i=="string"?b.jsx("li",{children:"..."}):b.jsx("li",{children:b.jsx(on,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?b.jsx("li",{children:b.jsx(on,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},i$={top:0,left:0,right:0,bottom:-1},a$=e=>{var g;const t=If(),n=Ot(),r=e.filters.filter(h=>h.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=cp(),l=o?r_:o_,c=E.useRef(null),u=h=>{const v=h.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(x=>x.id!==v))},d=E.useCallback(h=>{if(h===null)return;c.current=h;const v=new AbortController;return h.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:v.signal}),()=>v.abort()},[]),p=e.sorters.find(h=>e.header.id===h.value),f=p!=null&&p.type?p.type===E1.Asc?"ascending":"descending":"none",m=ip(e.header);return b.jsxs(fy,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative hidden min-w-0 cursor-grab border-0 font-medium first:table-cell md:table-cell ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[b.jsx("span",{className:`flex h-full items-center justify-between bg-table-header px-2 py-4 ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:b.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?b.jsx(ti,{arrow:!0,trigger:b.jsxs("span",{children:[b.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",m]}),b.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:b.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",b.jsx("span",{className:"font-medium",children:m})]}),children:b.jsxs("ul",{className:"font-medium",children:[r.length===0?null:b.jsx(E.Fragment,{children:r.map(h=>b.jsx("li",{className:"my-1",children:b.jsx(Kj,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),b.jsx("li",{children:b.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(h=>h.concat(lp(e.header,s.options,s.operations))),children:[b.jsx(Bu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,b.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?b.jsx(t$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:b.jsx(ft.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:i$,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-table-border hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:h=>void h.currentTarget.focus(),onKeyDown:h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,x=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(v+x)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(h,v)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,x=v.delta.x;c.current.style.width=`${Math.abs(y+x)}px`}})]})},s$=e=>{const[t,n]=Yj(e.setCols);return b.jsx(uy,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,className:"text-lg",children:b.jsx(Jn,{children:e.headers.map((r,o)=>b.jsx(a$,{index:o,header:r,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:o===e.headers.length-1},`header-child-item-${r.id}`))})})},A1=E.createContext({}),l$=()=>E.useContext(A1),c$=E.forwardRef(({context:e,className:t="",...n},r)=>b.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:b.jsx(Jn,{children:n.children})})),u$=E.forwardRef(({context:e,className:t="",...n},r)=>b.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-collapse divide-y divide-table-border border-0 text-left ${t??""}`})),d$=E.forwardRef(({context:e,...t},n)=>{const r=l$(),o={...t==null?void 0:t.style,top:rt.number(r.sticky)?`${r.sticky}px`:void 0};return b.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-transparent",ref:n})}),f$=E.forwardRef(({context:e,item:t,...n},r)=>b.jsx("tr",{...n,role:"row",ref:r,className:`group table-row ${(n==null?void 0:n.className)??""}`})),p$=E.forwardRef((e,t)=>e.context.loadingMore?b.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:b.jsx("tr",{role:"row",className:"bg-card-background",children:b.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:b.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),h$={TableHead:d$,Table:u$,TableBody:c$,TableRow:f$,TableFoot:p$},m$=[0,0,0,0,0,0,0,0,0,0],_1=b.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),g$=e=>b.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?_1:b.jsx(Sb,{})}),v$=()=>b.jsx(E.Fragment,{}),y$=(e,t,n)=>{const r=n.cols,o=n.loading;return b.jsx(E.Fragment,{children:r.map((i,a)=>{var d;const s=`${a},${e}`,l=ad(t,i.id),c=i.Element,u=((d=i.cellProps)==null?void 0:d.className)||"";return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`relative hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},o?_1:c?b.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l}):b.jsx(E.Fragment,{children:rt.nil(l)?"":l}))})})},b$=()=>b.jsx(E.Fragment,{}),x$=[],I1=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,border:s=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=E.useRef(null),[p,f]=E.useState(!1),m=vo(a),g=vo(u.loadingMore),h=E.useMemo(()=>{if(u.loading)return m$;if(c)return u.rows;const y=new C1(u.rows);return t.length>0&&t.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:y.Where(x.name,x.operation.symbol,x.value)),r.length===0?y.Select():Jj(y.Select(),r)},[u.loading,u.rows,c,t,r]);E.useEffect(()=>{if(d.current===null)return()=>{};const y=d.current,x=new IntersectionObserver(T=>{var C;return T[T.length-1].isIntersecting&&g.current?((C=m.current)==null||C.call(m),void f(!0)):f(!1)});return x.observe(y),()=>x.disconnect()},[g,m]);const v=h.length===0;return b.jsxs("div",{className:"min-w-full",children:[b.jsxs("div",{className:`group rounded-lg ${s?"border border-table-border":""}`,children:[b.jsx(VL,{useWindowScroll:!0,followOutput:"smooth",components:h$,totalCount:h.length,data:v?x$:h,itemContent:v?v$:y$,fixedFooterContent:p?b$:null,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>b.jsx(s$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),v?b.jsx(g$,{loading:u.loading}):null,b.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?b.jsx(o$,{...l}):null]})},w$=(e,t)=>typeof t=="function"?t(e):t,gl=(e,t,n)=>e===t||n==null?void 0:n(t),S$=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=If(),r=e.operations??n.table.operations??!0,o=E.useMemo(()=>ap(e.cols),[e.cols]),[i,a]=rd({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:w$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>{var c;return(c=e.set)==null||c.call(e,s),gl((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),gl((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),gl((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),gl((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return b.jsx(A1.Provider,{value:t,children:b.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?b.jsx(n$,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?b.jsx(I1,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):b.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>b.jsx("div",{className:"min-w-full",children:b.jsx(I1,{...e,group:s,index:l,cols:i.cols,pagination:null,rows:s.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${s.groupId}`))})]})})},T$=["INPUT","SELECT"],O1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{T$.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var up,M1;function dp(){if(M1)return up;M1=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return up={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},up}var fp,D1;function N1(){if(D1)return fp;D1=1;var e=dp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var h=[],v=0;v<256;++v)h.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return h}(),o=function(v){for(;v.length>1;){var y=v.pop(),x=y.obj[y.prop];if(n(x)){for(var T=[],w=0;w<x.length;++w)typeof x[w]<"u"&&T.push(x[w]);y.obj[y.prop]=T}}},i=function(v,y){for(var x=y&&y.plainObjects?{__proto__:null}:{},T=0;T<v.length;++T)typeof v[T]<"u"&&(x[T]=v[T]);return x},a=function h(v,y,x){if(!y)return v;if(typeof y!="object"&&typeof y!="function"){if(n(v))v.push(y);else if(v&&typeof v=="object")(x&&(x.plainObjects||x.allowPrototypes)||!t.call(Object.prototype,y))&&(v[y]=!0);else return[v,y];return v}if(!v||typeof v!="object")return[v].concat(y);var T=v;return n(v)&&!n(y)&&(T=i(v,x)),n(v)&&n(y)?(y.forEach(function(w,S){if(t.call(v,S)){var C=v[S];C&&typeof C=="object"&&w&&typeof w=="object"?v[S]=h(C,w,x):v.push(w)}else v[S]=w}),v):Object.keys(y).reduce(function(w,S){var C=y[S];return t.call(w,S)?w[S]=h(w[S],C,x):w[S]=C,w},T)},s=function(v,y){return Object.keys(y).reduce(function(x,T){return x[T]=y[T],x},v)},l=function(h,v,y){var x=h.replace(/\+/g," ");if(y==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},c=1024,u=function(v,y,x,T,w){if(v.length===0)return v;var S=v;if(typeof v=="symbol"?S=Symbol.prototype.toString.call(v):typeof v!="string"&&(S=String(v)),x==="iso-8859-1")return escape(S).replace(/%u[0-9a-f]{4}/gi,function($){return"%26%23"+parseInt($.slice(2),16)+"%3B"});for(var C="",P=0;P<S.length;P+=c){for(var I=S.length>=c?S.slice(P,P+c):S,_=[],M=0;M<I.length;++M){var L=I.charCodeAt(M);if(L===45||L===46||L===95||L===126||L>=48&&L<=57||L>=65&&L<=90||L>=97&&L<=122||w===e.RFC1738&&(L===40||L===41)){_[_.length]=I.charAt(M);continue}if(L<128){_[_.length]=r[L];continue}if(L<2048){_[_.length]=r[192|L>>6]+r[128|L&63];continue}if(L<55296||L>=57344){_[_.length]=r[224|L>>12]+r[128|L>>6&63]+r[128|L&63];continue}M+=1,L=65536+((L&1023)<<10|I.charCodeAt(M)&1023),_[_.length]=r[240|L>>18]+r[128|L>>12&63]+r[128|L>>6&63]+r[128|L&63]}C+=_.join("")}return C},d=function(v){for(var y=[{obj:{o:v},prop:"o"}],x=[],T=0;T<y.length;++T)for(var w=y[T],S=w.obj[w.prop],C=Object.keys(S),P=0;P<C.length;++P){var I=C[P],_=S[I];typeof _=="object"&&_!==null&&x.indexOf(_)===-1&&(y.push({obj:S,prop:I}),x.push(_))}return o(y),v},p=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},f=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},m=function(v,y){return[].concat(v,y)},g=function(v,y){if(n(v)){for(var x=[],T=0;T<v.length;T+=1)x.push(y(v[T]));return x}return y(v)};return fp={arrayToObject:i,assign:s,combine:m,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},fp}var pp,F1;function E$(){if(F1)return pp;F1=1;var e=jS(),t=N1(),n=dp(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,v){return h+"["+v+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},p={},f=function g(h,v,y,x,T,w,S,C,P,I,_,M,L,$,A,O,N,V){for(var F=h,z=V,D=0,R=!1;(z=z.get(p))!==void 0&&!R;){var J=z.get(h);if(D+=1,typeof J<"u"){if(J===D)throw new RangeError("Cyclic object value");R=!0}typeof z.get(p)>"u"&&(D=0)}if(typeof I=="function"?F=I(v,F):F instanceof Date?F=L(F):y==="comma"&&i(F)&&(F=t.maybeMap(F,function(Oe){return Oe instanceof Date?L(Oe):Oe})),F===null){if(w)return P&&!O?P(v,u.encoder,N,"key",$):v;F=""}if(d(F)||t.isBuffer(F)){if(P){var te=O?v:P(v,u.encoder,N,"key",$);return[A(te)+"="+A(P(F,u.encoder,N,"value",$))]}return[A(v)+"="+A(String(F))]}var ee=[];if(typeof F>"u")return ee;var Z;if(y==="comma"&&i(F))O&&P&&(F=t.maybeMap(F,P)),Z=[{value:F.length>0?F.join(",")||null:void 0}];else if(i(I))Z=I;else{var U=Object.keys(F);Z=_?U.sort(_):U}var Y=C?String(v).replace(/\./g,"%2E"):String(v),j=x&&i(F)&&F.length===1?Y+"[]":Y;if(T&&i(F)&&F.length===0)return j+"[]";for(var W=0;W<Z.length;++W){var G=Z[W],ae=typeof G=="object"&&G&&typeof G.value<"u"?G.value:F[G];if(!(S&&ae===null)){var B=M&&C?String(G).replace(/\./g,"%2E"):String(G),xe=i(F)?typeof y=="function"?y(j,B):j:j+(M?"."+B:"["+B+"]");V.set(h,D);var Ee=e();Ee.set(p,V),s(ee,g(ae,xe,y,x,T,w,S,C,y==="comma"&&O&&i(F)?null:P,I,_,M,L,$,A,O,N,Ee))}}return ee},m=function(h){if(!h)return u;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var y=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");y=h.format}var x=n.formatters[y],T=u.filter;(typeof h.filter=="function"||i(h.filter))&&(T=h.filter);var w;if(h.arrayFormat in o?w=h.arrayFormat:"indices"in h?w=h.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var S=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:S,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:v,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:y,formatter:x,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:u.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:u.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:u.strictNullHandling}};return pp=function(g,h){var v=g,y=m(h),x,T;typeof y.filter=="function"?(T=y.filter,v=T("",v)):i(y.filter)&&(T=y.filter,x=T);var w=[];if(typeof v!="object"||v===null)return"";var S=o[y.arrayFormat],C=S==="comma"&&y.commaRoundTrip;x||(x=Object.keys(v)),y.sort&&x.sort(y.sort);for(var P=e(),I=0;I<x.length;++I){var _=x[I],M=v[_];y.skipNulls&&M===null||s(w,f(M,_,S,C,y.allowEmptyArrays,y.strictNullHandling,y.skipNulls,y.encodeDotInKeys,y.encode?y.encoder:null,y.filter,y.sort,y.allowDots,y.serializeDate,y.format,y.formatter,y.encodeValuesOnly,y.charset,P))}var L=w.join(y.delimiter),$=y.addQueryPrefix===!0?"?":"";return y.charsetSentinel&&(y.charset==="iso-8859-1"?$+="utf8=%26%2310003%3B&":$+="utf8=%E2%9C%93&"),L.length>0?$+L:""},pp}var hp,L1;function C$(){if(L1)return hp;L1=1;var e=N1(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(f,m){return String.fromCharCode(parseInt(m,10))})},i=function(p,f,m){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&m>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,m){var g={__proto__:null},h=m.ignoreQueryPrefix?f.replace(/^\?/,""):f;h=h.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=m.parameterLimit===1/0?void 0:m.parameterLimit,y=h.split(m.delimiter,m.throwOnLimitExceeded?v+1:v);if(m.throwOnLimitExceeded&&y.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var x=-1,T,w=m.charset;if(m.charsetSentinel)for(T=0;T<y.length;++T)y[T].indexOf("utf8=")===0&&(y[T]===s?w="utf-8":y[T]===a&&(w="iso-8859-1"),x=T,T=y.length);for(T=0;T<y.length;++T)if(T!==x){var S=y[T],C=S.indexOf("]="),P=C===-1?S.indexOf("="):C+1,I,_;P===-1?(I=m.decoder(S,r.decoder,w,"key"),_=m.strictNullHandling?null:""):(I=m.decoder(S.slice(0,P),r.decoder,w,"key"),_=e.maybeMap(i(S.slice(P+1),m,n(g[I])?g[I].length:0),function(L){return m.decoder(L,r.decoder,w,"value")})),_&&m.interpretNumericEntities&&w==="iso-8859-1"&&(_=o(String(_))),S.indexOf("[]=")>-1&&(_=n(_)?[_]:_);var M=t.call(g,I);M&&m.duplicates==="combine"?g[I]=e.combine(g[I],_):(!M||m.duplicates==="last")&&(g[I]=_)}return g},c=function(p,f,m,g){var h=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");h=Array.isArray(f)&&f[v]?f[v].length:0}for(var y=g?f:i(f,m,h),x=p.length-1;x>=0;--x){var T,w=p[x];if(w==="[]"&&m.parseArrays)T=m.allowEmptyArrays&&(y===""||m.strictNullHandling&&y===null)?[]:e.combine([],y);else{T=m.plainObjects?{__proto__:null}:{};var S=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=m.decodeDotInKeys?S.replace(/%2E/g,"."):S,P=parseInt(C,10);!m.parseArrays&&C===""?T={0:y}:!isNaN(P)&&w!==C&&String(P)===C&&P>=0&&m.parseArrays&&P<=m.arrayLimit?(T=[],T[P]=y):C!=="__proto__"&&(T[C]=y)}y=T}return y},u=function(f,m,g,h){if(f){var v=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,y=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,T=g.depth>0&&y.exec(v),w=T?v.slice(0,T.index):v,S=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;S.push(w)}for(var C=0;g.depth>0&&(T=x.exec(v))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,T[1].slice(1,-1))&&!g.allowPrototypes)return;S.push(T[1])}if(T){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");S.push("["+v.slice(T.index)+"]")}return c(S,m,g,h)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var m=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var h=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:h,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:m,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return hp=function(p,f){var m=d(f);if(p===""||p===null||typeof p>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,m):p,h=m.plainObjects?{__proto__:null}:{},v=Object.keys(g),y=0;y<v.length;++y){var x=v[y],T=u(x,g[x],m,typeof p=="string");h=e.merge(h,T,m)}return m.allowSparse===!0?h:e.compact(h)},hp}var mp,V1;function k$(){if(V1)return mp;V1=1;var e=E$(),t=C$(),n=dp();return mp={formats:n,parse:t,stringify:e},mp}var P$=k$(),He;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(He||(He={}));var j1;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(j1||(j1={}));const fe=He.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),yr=e=>{switch(typeof e){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},oe=He.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 fn extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof fn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.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()}}fn.create=e=>new fn(e);const Sa=(e,t)=>{let n;switch(e.code){case oe.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case oe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,He.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:n=`Unrecognized key(s) in object: ${He.joinValues(e.keys,", ")}`;break;case oe.invalid_union:n="Invalid input";break;case oe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${He.joinValues(e.options)}`;break;case oe.invalid_enum_value:n=`Invalid enum value. Expected ${He.joinValues(e.options)}, received '${e.received}'`;break;case oe.invalid_arguments:n="Invalid function arguments";break;case oe.invalid_return_type:n="Invalid function return type";break;case oe.invalid_date:n="Invalid date";break;case oe.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}"`:He.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case oe.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 oe.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 oe.custom:n="Invalid input";break;case oe.invalid_intersection_types:n="Intersection results could not be merged";break;case oe.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case oe.not_finite:n="Number must be finite";break;default:n=t.defaultError,He.assertNever(e)}return{message:n}};let A$=Sa;function gp(){return A$}const vp=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function de(e,t){const n=gp(),r=vp({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Sa?void 0:Sa].filter(o=>!!o)});e.common.issues.push(r)}class qt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return ke;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,a=await o.value;r.push({key:i,value:a})}return qt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return ke;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const ke=Object.freeze({status:"aborted"}),Ta=e=>({status:"dirty",value:e}),Zt=e=>({status:"valid",value:e}),$1=e=>e.status==="aborted",R1=e=>e.status==="dirty",hi=e=>e.status==="valid",vl=e=>typeof Promise<"u"&&e instanceof Promise;function yl(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function z1(e,t,n,r,o){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var ve;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ve||(ve={}));var Ea,Ca;class $n{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 B1=(e,t)=>{if(hi(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 fn(e.common.issues);return this._error=n,this._error}}};function Ie(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{var l,c;const{message:u}=e;return a.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:s.defaultError}},description:o}}class Ve{get description(){return this._def.description}_getType(t){return yr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:yr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new qt,ctx:{common:t.parent.common,data:t.data,parsedType:yr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(vl(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:yr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return B1(o,i)}"~validate"(t){var n,r;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:yr(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return hi(i)?{value:i.value}:{issues:o.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:o}).then(i=>hi(i)?{value:i.value}:{issues:o.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:yr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(vl(o)?o:Promise.resolve(o));return B1(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:oe.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Zn({schema:this,typeName:Te.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Xn.create(this,this._def)}nullable(){return so.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Rn.create(this)}promise(){return Aa.create(this,this._def)}or(t){return wl.create([this,t],this._def)}and(t){return Sl.create(this,t,this._def)}transform(t){return new Zn({...Ie(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Pl({...Ie(this._def),innerType:this,defaultValue:n,typeName:Te.ZodDefault})}brand(){return new U1({typeName:Te.ZodBranded,type:this,...Ie(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Al({...Ie(this._def),innerType:this,catchValue:n,typeName:Te.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return _l.create(this,t)}readonly(){return Il.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const _$=/^c[^\s-]{8,}$/i,I$=/^[0-9a-z]+$/,O$=/^[0-9A-HJKMNP-TV-Z]{26}$/i,M$=/^[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,D$=/^[a-z0-9_-]{21}$/i,N$=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,F$=/^[-+]?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)?)??$/,L$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,V$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let yp;const j$=/^(?:(?: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])$/,$$=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,R$=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,z$=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,B$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,H$=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,H1="((\\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])))",W$=new RegExp(`^${H1}$`);function W1(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 q$(e){return new RegExp(`^${W1(e)}$`)}function U$(e){let t=`${H1}T${W1(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 Y$(e,t){return!!((t==="v4"||!t)&&j$.test(e)||(t==="v6"||!t)&&R$.test(e))}function G$(e,t){if(!N$.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||!o.typ||!o.alg||t&&o.alg!==t)}catch{return!1}}function K$(e,t){return!!((t==="v4"||!t)&&$$.test(e)||(t==="v6"||!t)&&z$.test(e))}class Yn extends Ve{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return de(i,{code:oe.invalid_type,expected:fe.string,received:i.parsedType}),ke}const r=new qt;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),de(o,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),de(o,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?de(o,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&de(o,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")L$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"email",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")yp||(yp=new RegExp(V$,"u")),yp.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"emoji",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")M$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"uuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")D$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"nanoid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")_$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"cuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")I$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"cuid2",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")O$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"ulid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),de(o,{validation:"url",code:oe.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"regex",code:oe.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?U$(i).test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?W$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?q$(i).test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?F$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"duration",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Y$(t.data,i.version)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"ip",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?G$(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"jwt",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?K$(t.data,i.version)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"cidr",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?B$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"base64",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?H$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"base64url",code:oe.invalid_string,message:i.message}),r.dirty()):He.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:oe.invalid_string,...ve.errToObj(r)})}_addCheck(t){return new Yn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ve.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ve.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ve.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ve.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ve.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ve.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ve.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ve.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ve.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ve.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ve.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ve.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ve.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ve.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ve.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ve.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ve.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ve.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ve.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ve.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ve.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ve.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ve.errToObj(n)})}nonempty(t){return this.min(1,ve.errToObj(t))}trim(){return new Yn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Yn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Yn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Yn.create=e=>{var t;return new Yn({checks:[],typeName:Te.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ie(e)})};function Z$(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class io extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==fe.number){const i=this._getOrReturnCtx(t);return de(i,{code:oe.invalid_type,expected:fe.number,received:i.parsedType}),ke}let r;const o=new qt;for(const i of this._def.checks)i.kind==="int"?He.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),de(r,{code:oe.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),de(r,{code:oe.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),de(r,{code:oe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Z$(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),de(r,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),de(r,{code:oe.not_finite,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new io({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new io({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ve.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ve.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ve.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ve.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&He.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)}}io.create=e=>new io({checks:[],typeName:Te.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ie(e)});class mi extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==fe.bigint)return this._getInvalidInput(t);let r;const o=new qt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),de(r,{code:oe.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),de(r,{code:oe.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),de(r,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return de(n,{code:oe.invalid_type,expected:fe.bigint,received:n.parsedType}),ke}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new mi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new mi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}mi.create=e=>{var t;return new mi({checks:[],typeName:Te.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ie(e)})};class bp extends Ve{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.boolean,received:r.parsedType}),ke}return Zt(t.data)}}bp.create=e=>new bp({typeName:Te.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ie(e)});class ka extends Ve{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return de(i,{code:oe.invalid_type,expected:fe.date,received:i.parsedType}),ke}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return de(i,{code:oe.invalid_date}),ke}const r=new qt;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),de(o,{code:oe.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),de(o,{code:oe.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):He.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ka({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ve.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ve.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}ka.create=e=>new ka({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Te.ZodDate,...Ie(e)});class xp extends Ve{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.symbol,received:r.parsedType}),ke}return Zt(t.data)}}xp.create=e=>new xp({typeName:Te.ZodSymbol,...Ie(e)});class bl extends Ve{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.undefined,received:r.parsedType}),ke}return Zt(t.data)}}bl.create=e=>new bl({typeName:Te.ZodUndefined,...Ie(e)});class xl extends Ve{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.null,received:r.parsedType}),ke}return Zt(t.data)}}xl.create=e=>new xl({typeName:Te.ZodNull,...Ie(e)});class wp extends Ve{constructor(){super(...arguments),this._any=!0}_parse(t){return Zt(t.data)}}wp.create=e=>new wp({typeName:Te.ZodAny,...Ie(e)});class gi extends Ve{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Zt(t.data)}}gi.create=e=>new gi({typeName:Te.ZodUnknown,...Ie(e)});class br extends Ve{_parse(t){const n=this._getOrReturnCtx(t);return de(n,{code:oe.invalid_type,expected:fe.never,received:n.parsedType}),ke}}br.create=e=>new br({typeName:Te.ZodNever,...Ie(e)});class Sp extends Ve{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.void,received:r.parsedType}),ke}return Zt(t.data)}}Sp.create=e=>new Sp({typeName:Te.ZodVoid,...Ie(e)});class Rn extends Ve{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return de(n,{code:oe.invalid_type,expected:fe.array,received:n.parsedType}),ke;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(de(n,{code:a?oe.too_big:oe.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(de(n,{code:oe.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&&(de(n,{code:oe.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new $n(n,a,n.path,s)))).then(a=>qt.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new $n(n,a,n.path,s)));return qt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Rn({...this._def,minLength:{value:t,message:ve.toString(n)}})}max(t,n){return new Rn({...this._def,maxLength:{value:t,message:ve.toString(n)}})}length(t,n){return new Rn({...this._def,exactLength:{value:t,message:ve.toString(n)}})}nonempty(t){return this.min(1,t)}}Rn.create=(e,t)=>new Rn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Te.ZodArray,...Ie(t)});function vi(e){if(e instanceof bt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Xn.create(vi(r))}return new bt({...e._def,shape:()=>t})}else return e instanceof Rn?new Rn({...e._def,type:vi(e.element)}):e instanceof Xn?Xn.create(vi(e.unwrap())):e instanceof so?so.create(vi(e.unwrap())):e instanceof Kn?Kn.create(e.items.map(t=>vi(t))):e}class bt extends Ve{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=He.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return de(c,{code:oe.invalid_type,expected:fe.object,received:c.parsedType}),ke}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof br&&this._def.unknownKeys==="strip"))for(const c in o.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new $n(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof br){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(de(o,{code:oe.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new $n(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>qt.mergeObjectSync(r,c)):qt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ve.errToObj,new bt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const l=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ve.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new bt({...this._def,unknownKeys:"strip"})}passthrough(){return new bt({...this._def,unknownKeys:"passthrough"})}extend(t){return new bt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new bt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Te.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new bt({...this._def,catchall:t})}pick(t){const n={};return He.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new bt({...this._def,shape:()=>n})}omit(t){const n={};return He.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new bt({...this._def,shape:()=>n})}deepPartial(){return vi(this)}partial(t){const n={};return He.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new bt({...this._def,shape:()=>n})}required(t){const n={};return He.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Xn;)i=i._def.innerType;n[r]=i}}),new bt({...this._def,shape:()=>n})}keyof(){return q1(He.objectKeys(this.shape))}}bt.create=(e,t)=>new bt({shape:()=>e,unknownKeys:"strip",catchall:br.create(),typeName:Te.ZodObject,...Ie(t)}),bt.strictCreate=(e,t)=>new bt({shape:()=>e,unknownKeys:"strict",catchall:br.create(),typeName:Te.ZodObject,...Ie(t)}),bt.lazycreate=(e,t)=>new bt({shape:e,unknownKeys:"strip",catchall:br.create(),typeName:Te.ZodObject,...Ie(t)});class wl extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new fn(s.ctx.common.issues));return de(n,{code:oe.invalid_union,unionErrors:a}),ke}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new fn(l));return de(n,{code:oe.invalid_union,unionErrors:s}),ke}}get options(){return this._def.options}}wl.create=(e,t)=>new wl({options:e,typeName:Te.ZodUnion,...Ie(t)});const Gn=e=>e instanceof El?Gn(e.schema):e instanceof Zn?Gn(e.innerType()):e instanceof Cl?[e.value]:e instanceof ao?e.options:e instanceof kl?He.objectValues(e.enum):e instanceof Pl?Gn(e._def.innerType):e instanceof bl?[void 0]:e instanceof xl?[null]:e instanceof Xn?[void 0,...Gn(e.unwrap())]:e instanceof so?[null,...Gn(e.unwrap())]:e instanceof U1||e instanceof Il?Gn(e.unwrap()):e instanceof Al?Gn(e._def.innerType):[];class Tp extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return de(n,{code:oe.invalid_type,expected:fe.object,received:n.parsedType}),ke;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(de(n,{code:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ke)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=Gn(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new Tp({typeName:Te.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ie(r)})}}function Ep(e,t){const n=yr(e),r=yr(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=He.objectKeys(t),i=He.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Ep(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===fe.array&&r===fe.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],l=Ep(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===fe.date&&r===fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Sl extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if($1(i)||$1(a))return ke;const s=Ep(i.value,a.value);return s.valid?((R1(i)||R1(a))&&n.dirty(),{status:n.value,value:s.data}):(de(r,{code:oe.invalid_intersection_types}),ke)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Sl.create=(e,t,n)=>new Sl({left:e,right:t,typeName:Te.ZodIntersection,...Ie(n)});class Kn extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return de(r,{code:oe.invalid_type,expected:fe.array,received:r.parsedType}),ke;if(r.data.length<this._def.items.length)return de(r,{code:oe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ke;!this._def.rest&&r.data.length>this._def.items.length&&(de(r,{code:oe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new $n(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>qt.mergeArray(n,a)):qt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Kn({...this._def,rest:t})}}Kn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Kn({items:e,typeName:Te.ZodTuple,rest:null,...Ie(t)})};class Tl extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.object)return de(r,{code:oe.invalid_type,expected:fe.object,received:r.parsedType}),ke;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new $n(r,s,r.path,s)),value:a._parse(new $n(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?qt.mergeObjectAsync(n,o):qt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ve?new Tl({keyType:t,valueType:n,typeName:Te.ZodRecord,...Ie(r)}):new Tl({keyType:Yn.create(),valueType:t,typeName:Te.ZodRecord,...Ie(n)})}}class Cp extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.map)return de(r,{code:oe.invalid_type,expected:fe.map,received:r.parsedType}),ke;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new $n(r,s,r.path,[c,"key"])),value:i._parse(new $n(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return ke;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return ke;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}Cp.create=(e,t,n)=>new Cp({valueType:t,keyType:e,typeName:Te.ZodMap,...Ie(n)});class yi extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return de(r,{code:oe.invalid_type,expected:fe.set,received:r.parsedType}),ke;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(de(r,{code:oe.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&&(de(r,{code:oe.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return ke;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>i._parse(new $n(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new yi({...this._def,minSize:{value:t,message:ve.toString(n)}})}max(t,n){return new yi({...this._def,maxSize:{value:t,message:ve.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}yi.create=(e,t)=>new yi({valueType:e,minSize:null,maxSize:null,typeName:Te.ZodSet,...Ie(t)});class Pa extends Ve{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return de(n,{code:oe.invalid_type,expected:fe.function,received:n.parsedType}),ke;function r(s,l){return vp({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,gp(),Sa].filter(c=>!!c),issueData:{code:oe.invalid_arguments,argumentsError:l}})}function o(s,l){return vp({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,gp(),Sa].filter(c=>!!c),issueData:{code:oe.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Aa){const s=this;return Zt(async function(...l){const c=new fn([]),u=await s._def.args.parseAsync(l,i).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const s=this;return Zt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new fn([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new fn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Pa({...this._def,args:Kn.create(t).rest(gi.create())})}returns(t){return new Pa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Pa({args:t||Kn.create([]).rest(gi.create()),returns:n||gi.create(),typeName:Te.ZodFunction,...Ie(r)})}}class El extends Ve{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})}}El.create=(e,t)=>new El({getter:e,typeName:Te.ZodLazy,...Ie(t)});class Cl extends Ve{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return de(n,{received:n.data,code:oe.invalid_literal,expected:this._def.value}),ke}return{status:"valid",value:t.data}}get value(){return this._def.value}}Cl.create=(e,t)=>new Cl({value:e,typeName:Te.ZodLiteral,...Ie(t)});function q1(e,t){return new ao({values:e,typeName:Te.ZodEnum,...Ie(t)})}class ao extends Ve{constructor(){super(...arguments),Ea.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return de(n,{expected:He.joinValues(r),received:n.parsedType,code:oe.invalid_type}),ke}if(yl(this,Ea)||z1(this,Ea,new Set(this._def.values)),!yl(this,Ea).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return de(n,{received:n.data,code:oe.invalid_enum_value,options:r}),ke}return Zt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return ao.create(t,{...this._def,...n})}exclude(t,n=this._def){return ao.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ea=new WeakMap,ao.create=q1;class kl extends Ve{constructor(){super(...arguments),Ca.set(this,void 0)}_parse(t){const n=He.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=He.objectValues(n);return de(r,{expected:He.joinValues(o),received:r.parsedType,code:oe.invalid_type}),ke}if(yl(this,Ca)||z1(this,Ca,new Set(He.getValidEnumValues(this._def.values))),!yl(this,Ca).has(t.data)){const o=He.objectValues(n);return de(r,{received:r.data,code:oe.invalid_enum_value,options:o}),ke}return Zt(t.data)}get enum(){return this._def.values}}Ca=new WeakMap,kl.create=(e,t)=>new kl({values:e,typeName:Te.ZodNativeEnum,...Ie(t)});class Aa extends Ve{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return de(n,{code:oe.invalid_type,expected:fe.promise,received:n.parsedType}),ke;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Aa.create=(e,t)=>new Aa({type:e,typeName:Te.ZodPromise,...Ie(t)});class Zn extends Ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Te.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{de(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return ke;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?ke:l.status==="dirty"||n.value==="dirty"?Ta(l.value):l});{if(n.value==="aborted")return ke;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?ke:s.status==="dirty"||n.value==="dirty"?Ta(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ke:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?ke:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!hi(a))return a;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>hi(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);He.assertNever(o)}}Zn.create=(e,t,n)=>new Zn({schema:e,typeName:Te.ZodEffects,effect:t,...Ie(n)}),Zn.createWithPreprocess=(e,t,n)=>new Zn({schema:t,effect:{type:"preprocess",transform:e},typeName:Te.ZodEffects,...Ie(n)});class Xn extends Ve{_parse(t){return this._getType(t)===fe.undefined?Zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Xn.create=(e,t)=>new Xn({innerType:e,typeName:Te.ZodOptional,...Ie(t)});class so extends Ve{_parse(t){return this._getType(t)===fe.null?Zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}so.create=(e,t)=>new so({innerType:e,typeName:Te.ZodNullable,...Ie(t)});class Pl extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Pl.create=(e,t)=>new Pl({innerType:e,typeName:Te.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ie(t)});class Al extends Ve{_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 vl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new fn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new fn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Al.create=(e,t)=>new Al({innerType:e,typeName:Te.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ie(t)});class kp extends Ve{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.nan,received:r.parsedType}),ke}return{status:"valid",value:t.data}}}kp.create=e=>new kp({typeName:Te.ZodNaN,...Ie(e)});class U1 extends Ve{_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 _l extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ke:i.status==="dirty"?(n.dirty(),Ta(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ke: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 _l({in:t,out:n,typeName:Te.ZodPipeline})}}class Il extends Ve{_parse(t){const n=this._def.innerType._parse(t),r=o=>(hi(o)&&(o.value=Object.freeze(o.value)),o);return vl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Il.create=(e,t)=>new Il({innerType:e,typeName:Te.ZodReadonly,...Ie(t)}),bt.lazycreate;var Te;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Te||(Te={})),Yn.create,io.create,kp.create,mi.create,bp.create,ka.create,xp.create,bl.create,xl.create,wp.create,gi.create,br.create,Sp.create,Rn.create,bt.create,bt.strictCreate,wl.create,Tp.create,Sl.create,Kn.create,Tl.create,Cp.create,yi.create,Pa.create,El.create,Cl.create,ao.create,kl.create,Aa.create,Zn.create,Xn.create,so.create,Zn.createWithPreprocess,_l.create;const X$=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},Q$=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const i=t[o];if(o===r)e[i]=n;else{if(!(i in e)||typeof e[i]!="object"){const a=t[o+1];e[i]=isNaN(Number(a))?{}:[]}e=e[i]}}},Y1=e=>e.replace(/\[(\d+)]/g,".$1").split("."),wn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):Y1(t),o=structuredClone(e);return Q$(o,r,n),o},J$=(e,t)=>e.localeCompare(t),_a={},G1=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return K1(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=G1(e._def.innerType);return t==="ZodArray"?n??[]:n}},K1=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,G1(n)])),Z1=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],i=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof i=="object"&&i!==null&&!Array.isArray(i)?n[r]=Z1(i,o):n[r]=o||i)}return n},eR={sort:J$,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},X1=e=>{const t=new FormData(e),n=new URLSearchParams(t);return P$.parse(n.toString(),eR)},lo=(e,t)=>Y1(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),xr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Pp=e=>{const t=e.dataset.target;if(!t)return xr(e);const n=document.querySelector(`[data-origin="${t}"]`);return xr(n||e)},tR={state:{},loading:!1,useOnChange:!1},Q1=e=>e.dataset.target||e.name,nR=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=wa.LocalStorage.get(t);return X$(n)?n:{}},clear:()=>void wa.LocalStorage.delete(t),set:n=>wa.LocalStorage.set(t,n)}},rR=(e,t,n=tR)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>rt.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??K1(e)??{}),l=E.useCallback(y=>{var I;const x=y.target,T=y.currentTarget;if(x.dataset.optional==="true")return;const S=Q1(x),C=Pp(x)||(T?xr(T):""),P=lo(S,e);if(x.setAttribute("data-initialized","true"),P){const _=P.safeParse(C),M=_.success?void 0:((I=_.error.issues[0])==null?void 0:I.message)??"";o(L=>wn(L??{},S,M))}},[]),c=E.useCallback(y=>x=>{const T=x.currentTarget,w=Object.values(i.current).reduce((C,P)=>{var $;const I=P.element,_=P.schema.safeParse(xr(I));if(I.dataset.ignore==="ignore"||_.success)return C;const M=($=_.error.issues[0])==null?void 0:$.message;I.setAttribute("data-initialized","true");const L=I.dataset.name||I.name||"";return wn(C,L,M)},{}),S=rt.empty(w)?null:w;o(S),console.error(S),y==null||y({form:T,errors:S||{}})},[]),u=(y,x=_a)=>{const T=lo(y,e),w=S=>{var P;if(!S)return;const C=S instanceof Date?S.toISOString():S.target.value;s(I=>wn(I,y,C)),(P=x==null?void 0:x.onChange)==null||P.call(x,S)};return{...x,loading:n.loading,name:y,id:y,onChange:w,form:t,date:rt.string(a[y])?new Date(a[y]):a[y],required:x.required??!T.isOptional(),error:r==null?void 0:r[y],ref:S=>{S!==null&&(i.current[y]={element:S,schema:T})}}},d=(y,x=_a)=>{const T=lo(y,e);return{...x,name:y,id:y,onChange:S=>{var P;const C=S.target.value;s(I=>wn(I,y,C)),(P=x==null?void 0:x.onChange)==null||P.call(x,S)},form:t,loading:n.loading,onInvalid:l,error:kr(r,y,void 0),value:kr(a,y,void 0)||"",required:x.required??!T.isOptional(),ref:S=>S!==null?i.current[y]={element:S,schema:T}:void 0}},p=(y,x=_a)=>{const T=lo(y,e);return{...x,name:y,id:y,onChange:S=>{var P;const C=S.target.checked;s(I=>wn(I??{},y,C)),(P=x==null?void 0:x.onChange)==null||P.call(x,S)},form:t,loading:n.loading,onInvalid:l,error:kr(r,y,void 0),required:x.required??!T.isOptional(),ref:S=>S!==null?void(i.current[y]={element:S,schema:T}):void 0}},f=(y,x=_a)=>{const T=lo(y,e),w=S=>{var P,I;(P=S.persist)==null||P.call(S);const C=S.target.value;(I=x==null?void 0:x.onChange)==null||I.call(x,S),s(_=>wn(_,y,C))};return{...x,loading:n.loading,name:y,id:y,onChange:w,form:t,onInvalid:l,error:kr(r,y,void 0),required:x.required??!T.isOptional(),value:kr(a,y,void 0)||(x==null?void 0:x.value)||"",type:rt.instance(T,io)?"number":(x==null?void 0:x.type)??"text",ref:S=>S===null?void 0:i.current[y]={element:S,schema:T}}},m=(y,x=_a)=>{const T=lo(y,e),w=T._def.typeName==="ZodNumber";return{...x,name:y,id:y,onChange:C=>{var I,_;(I=C.persist)==null||I.call(C);const P=w?C.target.valueAsNumber:C.target.value;(_=x==null?void 0:x.onChange)==null||_.call(x,C),s(M=>wn(M,y,P))},form:t,loading:n.loading,onInvalid:l,error:kr(r,y,void 0),required:x.required??!T.isOptional(),type:w?"number":(x==null?void 0:x.type)??"text",value:kr(a,y,void 0)||(x==null?void 0:x.value)||"",ref:C=>C===null?void 0:void(i.current[y]={element:C,schema:T})}};E.useEffect(()=>{const y=Object.values(i.current).map(T=>{const w=T.element.dataset.origin?document.querySelector(`[data-target="${T.element.name}"]`):T.element,S=T.schema.safeParse(xr(w)),C=M=>{var N;const L=Q1(M.target);if(!L)return!1;const $=M.target,A=Pp(M.target)||(M.relatedTarget?xr(M.relatedTarget):""),O=T.schema.safeParse(A);if($.setAttribute("value",A),O.success)return w.setCustomValidity(""),o(V=>{if(rt.null(V))return null;const F=wn(V,L,void 0);return rt.empty(V)||rt.nil(V)||rt.empty(F)?null:F}),!1;if(w.required){const V=((N=O.error.issues[0])==null?void 0:N.message)||"";w.setCustomValidity(V),o(F=>{if(rt.null(F))return null;const z=wn(F,L,V||void 0);return rt.empty(z)?null:z})}return!1},P=new AbortController,I=w.getAttribute("data-trigger")||"blur";w.addEventListener(I,C,{signal:P.signal});const _=w.dataset.shadow?!1:w.required?!S.success:!1;return{input:T,hasInitialError:_,unsubscribe:()=>P.abort()}});return y.some(T=>T.hasInitialError)&&o(T=>T===null?{}:T),()=>y.forEach(T=>T.unsubscribe())});const g=y=>x=>{var _;x.preventDefault();const T=x.currentTarget;let w=X1(T);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(T.elements)).forEach(M=>{if(M.tagName==="SELECT"){const L=M;w=wn(w,L.name,L.value)}if(M.tagName==="INPUT"){const L=M,$=Pp(L)||(L?xr(L):"");w=wn(w,L.dataset.target||L.name,$)}});const C=Z1(w,a),P=e.safeParse(C),I=()=>{var M;O1(T),(M=n.interceptor)==null||M.clear()};if(P.success){const M=JSON.stringify(P.data);return T.setAttribute("data-json",M),(_=n.interceptor)==null||_.clear(),y==null?void 0:y(x,{form:T,event:x,reset:I,errors:[],success:!0,data:P.data,json:P.data})}return console.group("useForm error"),console.info(P),console.info(P.error.issues),console.error(P.error),console.groupEnd(),T.reportValidity(),y==null?void 0:y(x,{form:T,json:w,event:x,reset:I,data:w,success:!1,errors:P.error.issues.map(M=>({message:M.message,path:M.path.map(L=>String(L))}))})},h=y=>ad(a,y)||"",v=y=>({...y,id:t,name:t});return E.useEffect(()=>{var y;n.interceptor&&((y=n.interceptor)==null||y.set(a))},[a]),{get:h,input:m,state:a,errors:r,select:d,checkbox:p,onSubmit:g,setState:s,textarea:f,onInvalid:c,controller:v,datepicker:u,name:t,disabled:r!==null}},oR=e=>e?JSON.parse(e.getAttribute("data-json")):{},iR=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},J1={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},eS={base:"1rem",lg:"1.5rem",sm:"0.75rem","field-height":"1.5rem","field-label":"1.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},tS={normal:"1",navbar:"19",calendar:"2",overlay:"20",tooltip:"13",floating:"21"},aR={name:"dark",zIndex:tS,rounded:J1,spacing:eS,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",muted:"hsla(0, 0%, 12%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 27%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 33%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},sR={rounded:J1,spacing:eS,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},zIndex:tS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 88%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(221, 20%, 97%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},lR=aR,cR=sR,uR=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...bs,...e.tweaks},parser:e.parser||gs.hsla,map:{...ys,...e.map}}),[e]);return b.jsx(jo.Provider,{value:t,children:e.children})},dR=()=>{const e=E.useContext(jo);return e?e.parser:gs.hsla};ne.Alert=u_,ne.Autocomplete=i2,ne.Button=go,ne.Calendar=wb,ne.Card=ud,ne.Checkbox=Mf,ne.ColType=pi,ne.Collapse=xy,ne.ComponentsProvider=uR,ne.Context=jo,ne.DatePicker=s2,ne.Dropdown=ti,ne.Empty=Sb,ne.Expand=tF,ne.FileUpload=xV,ne.Form=wV,ne.Input=ba,ne.InputFeedback=aw,ne.InputField=ya,ne.Menu=oF,ne.MenuItem=rF,ne.Modal=gF,ne.MultiSelect=_V,ne.Notifications=rD,ne.Polymorph=on,ne.Radiobox=IV,ne.RenderOnView=FT,ne.Select=ro,ne.Slider=fj,ne.Stats=oD,ne.Switch=pj,ne.Tab=sD,ne.Table=S$,ne.Tabs=iD,ne.Tag=_c,ne.TaskList=hj,ne.Textarea=mj,ne.Timeline=lD,ne.TimelineItem=Cs,ne.Toolbar=vF,ne.Tooltip=tf,ne.TransferList=yj,ne.createColumns=Hj,ne.createCssProperties=ZO,ne.createDesignTokens=ub,ne.createFormStorage=nR,ne.createOptionCols=ap,ne.createStyles=YO,ne.createTheme=KO,ne.createTokenStyles=XO,ne.css=Le,ne.defaultDarkTheme=lR,ne.defaultLightTheme=cR,ne.defaultTranslations=ys,ne.defaultTweaks=bs,ne.dispatchInput=Zh,ne.formReset=O1,ne.formToJson=X1,ne.getJsonForm=oR,ne.getSchemaShape=lo,ne.hasVerticalScroll=Xh,ne.initializeInputDataset=Si,ne.isMobile=mb,ne.isReactComponent=IT,ne.isReactFC=OT,ne.isSsr=$r,ne.mergeRefs=Fa,ne.negate=JO,ne.noop=ld,ne.parsers=gs,ne.path=ad,ne.reduceTokens=jr,ne.safeRegex=sd,ne.splitInto=hb,ne.useColorParser=dR,ne.useForm=rR,ne.useLocale=id,ne.useNotification=tD,ne.usePrevious=iR,ne.useReactive=Zb,ne.useTablePreferences=Uj,ne.useTranslations=Ot,ne.uuid=$o,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
|
|
195
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bw(e,t){if(e){if(typeof e=="string")return Uf(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 Uf(e,t)}}function Uf(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 dV(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function fV(e){if(Array.isArray(e))return e}function Hw(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 ht(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hw(Object(n),!0).forEach(function(r){Yf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dl(e,t){if(e==null)return{};var n=pV(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 pV(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 Gf=E.forwardRef(function(e,t){var n=e.children,r=dl(e,nV),o=qw(r),i=o.open,a=dl(o,rV);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(ht(ht({},a),{},{open:i})))});Gf.displayName="Dropzone";var Ww={disabled:!1,getFilesFromEvent:TL,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Gf.defaultProps=Ww,Gf.propTypes={children:rt.func,accept:rt.objectOf(rt.arrayOf(rt.string)),multiple:rt.bool,preventDropOnDocument:rt.bool,noClick:rt.bool,noKeyboard:rt.bool,noDrag:rt.bool,noDragEventsBubbling:rt.bool,minSize:rt.number,maxSize:rt.number,maxFiles:rt.number,disabled:rt.bool,getFilesFromEvent:rt.func,onFileDialogCancel:rt.func,onFileDialogOpen:rt.func,useFsAccessApi:rt.bool,autoFocus:rt.bool,onDragEnter:rt.func,onDragLeave:rt.func,onDragOver:rt.func,onDrop:rt.func,onDropAccepted:rt.func,onDropRejected:rt.func,onError:rt.func,validator:rt.func};var Kf={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function qw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ht(ht({},Ww),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,w=t.noKeyboard,S=t.noDrag,C=t.noDragEventsBubbling,P=t.onError,I=t.validator,_=E.useMemo(function(){return JL(n)},[n]),M=E.useMemo(function(){return QL(n)},[n]),L=E.useMemo(function(){return typeof h=="function"?h:Uw},[h]),$=E.useMemo(function(){return typeof g=="function"?g:Uw},[g]),A=E.useRef(null),O=E.useRef(null),N=E.useReducer(hV,Kf),V=qf(N,2),F=V[0],z=V[1],D=F.isFocused,R=F.isFileDialogActive,J=E.useRef(typeof window<"u"&&window.isSecureContext&&v&&XL()),te=function(){!J.current&&R&&setTimeout(function(){if(O.current){var ue=O.current.files;ue.length||(z({type:"closeDialog"}),$())}},300)};E.useEffect(function(){return window.addEventListener("focus",te,!1),function(){window.removeEventListener("focus",te,!1)}},[O,R,$,J]);var ee=E.useRef([]),Z=function(ue){A.current&&A.current.contains(ue.target)||(ue.preventDefault(),ee.current=[])};E.useEffect(function(){return x&&(document.addEventListener("dragover",$w,!1),document.addEventListener("drop",Z,!1)),function(){x&&(document.removeEventListener("dragover",$w),document.removeEventListener("drop",Z))}},[A,x]),E.useEffect(function(){return!r&&y&&A.current&&A.current.focus(),function(){}},[A,y,r]);var U=E.useCallback(function(X){P?P(X):console.error(X)},[P]),Y=E.useCallback(function(X){X.preventDefault(),X.persist(),ce(X),ee.current=[].concat(aV(ee.current),[X.target]),ul(X)&&Promise.resolve(o(X)).then(function(ue){if(!(cl(X)&&!C)){var _e=ue.length,We=_e>0&&YL({files:ue,accept:_,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),Ct=_e>0&&!We;z({isDragAccept:We,isDragReject:Ct,isDragActive:!0,type:"setDraggedFiles"}),c&&c(X)}}).catch(function(ue){return U(ue)})},[o,c,U,C,_,a,i,s,l,I]),j=E.useCallback(function(X){X.preventDefault(),X.persist(),ce(X);var ue=ul(X);if(ue&&X.dataTransfer)try{X.dataTransfer.dropEffect="copy"}catch{}return ue&&d&&d(X),!1},[d,C]),W=E.useCallback(function(X){X.preventDefault(),X.persist(),ce(X);var ue=ee.current.filter(function(We){return A.current&&A.current.contains(We)}),_e=ue.indexOf(X.target);_e!==-1&&ue.splice(_e,1),ee.current=ue,!(ue.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ul(X)&&u&&u(X))},[A,u,C]),G=E.useCallback(function(X,ue){var _e=[],We=[];X.forEach(function(Ct){var mt=Vw(Ct,_),Lt=qf(mt,2),Sn=Lt[0],zn=Lt[1],wr=jw(Ct,a,i),Sr=qf(wr,2),Tr=Sr[0],H=Sr[1],q=I?I(Ct):null;if(Sn&&Tr&&!q)_e.push(Ct);else{var Re=[zn,H];q&&(Re=Re.concat(q)),We.push({file:Ct,errors:Re.filter(function(et){return et})})}}),(!s&&_e.length>1||s&&l>=1&&_e.length>l)&&(_e.forEach(function(Ct){We.push({file:Ct,errors:[UL]})}),_e.splice(0)),z({acceptedFiles:_e,fileRejections:We,isDragReject:We.length>0,type:"setFiles"}),p&&p(_e,We,ue),We.length>0&&m&&m(We,ue),_e.length>0&&f&&f(_e,ue)},[z,s,_,a,i,l,p,f,m,I]),ae=E.useCallback(function(X){X.preventDefault(),X.persist(),ce(X),ee.current=[],ul(X)&&Promise.resolve(o(X)).then(function(ue){cl(X)&&!C||G(ue,X)}).catch(function(ue){return U(ue)}),z({type:"reset"})},[o,G,U,C]),B=E.useCallback(function(){if(J.current){z({type:"openDialog"}),L();var X={multiple:s,types:M};window.showOpenFilePicker(X).then(function(ue){return o(ue)}).then(function(ue){G(ue,null),z({type:"closeDialog"})}).catch(function(ue){eV(ue)?($(ue),z({type:"closeDialog"})):tV(ue)?(J.current=!1,O.current?(O.current.value=null,O.current.click()):U(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):U(ue)});return}O.current&&(z({type:"openDialog"}),L(),O.current.value=null,O.current.click())},[z,L,$,v,G,U,M,s]),xe=E.useCallback(function(X){!A.current||!A.current.isEqualNode(X.target)||(X.key===" "||X.key==="Enter"||X.keyCode===32||X.keyCode===13)&&(X.preventDefault(),B())},[A,B]),Ee=E.useCallback(function(){z({type:"focus"})},[]),Oe=E.useCallback(function(){z({type:"blur"})},[]),$e=E.useCallback(function(){T||(ZL()?setTimeout(B,0):B())},[T,B]),se=function(ue){return r?null:ue},ye=function(ue){return w?null:se(ue)},K=function(ue){return S?null:se(ue)},ce=function(ue){C&&ue.stopPropagation()},Q=E.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ue=X.refKey,_e=ue===void 0?"ref":ue,We=X.role,Ct=X.onKeyDown,mt=X.onFocus,Lt=X.onBlur,Sn=X.onClick,zn=X.onDragEnter,wr=X.onDragOver,Sr=X.onDragLeave,Tr=X.onDrop,H=dl(X,oV);return ht(ht(Yf({onKeyDown:ye(jn(Ct,xe)),onFocus:ye(jn(mt,Ee)),onBlur:ye(jn(Lt,Oe)),onClick:se(jn(Sn,$e)),onDragEnter:K(jn(zn,Y)),onDragOver:K(jn(wr,j)),onDragLeave:K(jn(Sr,W)),onDrop:K(jn(Tr,ae)),role:typeof We=="string"&&We!==""?We:"presentation"},_e,A),!r&&!w?{tabIndex:0}:{}),H)}},[A,xe,Ee,Oe,$e,Y,j,W,ae,w,S,r]),ie=E.useCallback(function(X){X.stopPropagation()},[]),we=E.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ue=X.refKey,_e=ue===void 0?"ref":ue,We=X.onChange,Ct=X.onClick,mt=dl(X,iV),Lt=Yf({accept:_,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:se(jn(We,ae)),onClick:se(jn(Ct,ie)),tabIndex:-1},_e,O);return ht(ht({},Lt),mt)}},[O,n,s,ae,r]);return ht(ht({},F),{},{isFocused:D&&!r,getRootProps:Q,getInputProps:we,rootRef:A,inputRef:O,open:se(B)})}function hV(e,t){switch(t.type){case"focus":return ht(ht({},e),{},{isFocused:!0});case"blur":return ht(ht({},e),{},{isFocused:!1});case"openDialog":return ht(ht({},Kf),{},{isFileDialogActive:!0});case"closeDialog":return ht(ht({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ht(ht({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ht(ht({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return ht({},Kf);default:return e}}function Uw(){}const mV={isImage:e=>e.type.includes("image")},gV=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(mV.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:dw(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:dw(e.file.size)})},[e.file]),t.type==="img"?b.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[b.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[b.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),b.jsxs("div",{className:"flex flex-col",children:[b.jsx("span",{children:e.file.name}),b.jsx("span",{children:t.size})]})]}),b.jsx(go,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:b.jsx(Oo,{})})]}):b.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[b.jsxs("header",{className:"flex flex-row items-center gap-4",children:[b.jsx(vy,{size:48}),b.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[b.jsx("span",{children:e.file.name}),b.jsx("span",{children:t.size})]})]}),b.jsx(go,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:b.jsx(Oo,{className:"text-danger"})})]})},vV=e=>b.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>b.jsx(gV,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),yV=e=>e.isDragActive?b.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?b.jsx(vV,{onDeleteFile:e.onDeleteFile,files:e.files}):b.jsx(E.Fragment,{children:e.idle}),bV=b.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[b.jsx(s_,{size:64}),b.jsxs("p",{children:["You can drag your files or"," ",b.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),xV=({idle:e=bV,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=E.useState([]),a=d=>{n==null||n(d),i(d)},{getRootProps:s,getInputProps:l,isDragActive:c}=qw({onDrop:a});return b.jsxs("div",{...s(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[b.jsx("input",{...l(r),name:r.name,id:r.name}),b.jsx(yV,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},wV=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return b.jsx("form",{...e,onSubmit:t})};class no extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof no&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new no(this);return t?t(n):n}}const SV=e=>b.jsx(E.Fragment,{children:e.children}),TV={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},EV={caseSensitive:!1,sort:!1},Yw=[],CV=E.forwardRef(function(t,n){return b.jsx(ft.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:b.jsx(Jn,{children:t.children})})}),kV=E.forwardRef(function({item:t,context:n,...r},o){return b.jsx(ft.li,{...r,ref:o,className:"last:rounded-t-lg"})}),PV={List:CV,Item:kV},AV=e=>{const t=Ot(),n=E.useRef(null),r=E.Children.count(e.children),[o,i]=E.useState(!1);return E.useEffect(()=>{if(n.current===null)return;const a=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>a.width)return i(!0)},[r]),b.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?b.jsxs(_c,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},_V=E.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,onChangeOptions:g,...h},v)=>{const y=E.useMemo(()=>new no(r.map(Q=>[Q.value,Q])),[r]),x=E.useRef(null),T=E.useRef(null),w=h.value??h.defaultValue??Yw,S=Ot(),[C,P]=E.useState(0),[I,_]=E.useState(!1),[M,L]=E.useState(""),[$,A]=E.useState(()=>{const Q=new no;return w.forEach(ie=>{const we=y.get(ie);return we?Q.set(ie,we):void 0}),Q}),O=E.useMemo(()=>Array.from($.keys()),[$]),[N,V]=E.useState(()=>{const Q=new Set(w);return r.reduce((ie,we)=>Q.has(we.value)?[...ie,we.label??we.value]:ie,[])??w}),[F,z]=E.useState(null),D=E.useRef(Yw),R=m&&M!==""?[{value:M,label:M,"data-dynamic":"true"},...r]:r,J=new Xr(R,["value","label"],EV).search(M);E.useEffect(()=>{I||P(0)},[I]),E.useEffect(()=>{h.value&&A(new no(h.value.map(Q=>[Q,y.get(Q)])))},[h.value,y]);const te=J.filter(Q=>Q.hidden!==!0),ee=te.length===0,{x:Z,y:U,strategy:Y,refs:j,context:W}=Gr({open:I,transform:!0,strategy:"absolute",onOpenChange:_,whileElementsMounted:ea,middleware:[ta(4),Sx({padding:10,elementContext:"reference",apply(Q){if(x.current===null)return;const ie=x.current.getBoundingClientRect().width,we=360;wi.flushSync(()=>setTimeout(()=>P(we),200)),Object.assign(Q.elements.floating.style,{width:`${ie}px`,maxWidth:`${ie}px`,maxHeight:ee?"auto":`${we}px`,height:ee?"auto":`${we}px`})}})]}),G=r0(W,TV),{getReferenceProps:ae,getFloatingProps:B,getItemProps:xe}=Kr([Zr(W,{role:"listbox"}),Yr(W),Qd(W,{cols:0,listRef:D,loop:!0,virtual:!0,allowEscape:!0,activeIndex:F,selectedIndex:F,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:Q=>z(ie=>Q??ie)})]);E.useEffect(()=>{const Q=j.reference.current;if(Q)return Si(Q)},[]);const Ee=(Q,ie)=>{const we=$.clone(_e=>_e.has(Q.value)?_e.remove(Q.value):_e.set(Q.value,Q));A(we);const X=j.reference.current;if(!X)return;const ue=we.map(_e=>_e.value);X==null||X.setAttribute("data-value",JSON.stringify(ue)),g&&g(ue),V(_e=>_e.concat(Q.label??"")),L(""),z(ie)},Oe=Q=>{const ie=Q.target.value;return L(ie),!I&&ie===""?_(!0):(Q.target.name=h.name||"",ie?_(!0):void 0)},$e=()=>{var Q;_(!0),L(""),(Q=j.reference.current)==null||Q.focus()},se=()=>{_(!0),L("")},ye=()=>{var Q;(Q=j.reference.current)==null||Q.setAttribute("data-value","[]"),L(""),_(!1),A(new no),g==null||g([])},K=h.id||h.name,ce=$.map((Q,ie)=>b.jsx(_c,{size:"small",icon:b.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:we=>{we.stopPropagation(),Ee(Q,ie)},children:b.jsx(os,{size:14})}),children:Q.label??Q.value},`MultiSelect-${Q.value}-x`));return b.jsxs(ya,{...h,left:e,error:t,ref:x,form:h.form,name:h.name,feedback:d,hideLeft:p,required:f,title:h.title,container:o,rightLabel:i,interactive:a,id:h.name||h.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:b.jsxs("span",{className:"flex items-center gap-0.5",children:[n,b.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:$e,children:[b.jsx(Ru,{size:20}),b.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),$?b.jsx("button",{type:"button",onClick:ye,className:"transition-colors link:text-danger",children:b.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[b.jsx("button",{...ae({...h,onFocus:se,id:`${K}-shadow`,name:`${K}-shadow`,ref:j.setReference}),type:"button","data-name":K,"data-target":K,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":O.join(","),value:I?M:N||$,className:Le("input placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",h.className),children:b.jsx(AV,{label:c,children:ce})}),b.jsx("input",{id:K,name:K,type:"hidden","data-origin":K,ref:v,required:f,defaultValue:h.value||O||void 0}),b.jsx(qr,{preserveTabOrder:!0,children:I?b.jsx(Jo,{modal:!0,guards:!0,returnFocus:!1,context:W,initialFocus:-1,visuallyHiddenDismiss:!0,children:b.jsxs("div",{...B({ref:j.setFloating,style:{...G.styles,top:U??0,position:Y,left:(Z??0)+($?26:18)}}),"data-floating":"true",className:"isolate z-floating m-0 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[b.jsx("input",{autoFocus:!0,value:M,onChange:Oe,title:h.title,placeholder:S.multiSelectInnerPlaceholder,onKeyDown:Q=>{var ie,we;if(Q.key==="ArrowDown"){let X=F+1;return X>te.length-1&&(X=0),(ie=T.current)==null||ie.scrollIntoView({index:X}),z(X)}if(Q.key==="ArrowUp"){let X=F-1;return X<0&&(X=te.length-1),(we=T.current)==null||we.scrollIntoView({index:X}),z(X)}if(Q.key==="Escape")return Q.currentTarget.blur(),_(!1);if(Q.key==="Enter"){if(F!==null&&te[F])return Q.preventDefault(),Ee(te[F],F);if(te.length===1)return Q.preventDefault(),Ee(te[0],0)}},className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary"}),ee?b.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:b.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||S.autocompleteEmpty})}):null,ee?null:b.jsx(kf,{ref:T,hidden:ee,data:te,components:PV,style:{height:ee?"0":$.size===0?C-49:C-86},className:"border-floating-border bg-floating-background p-0 text-foreground",itemContent:(Q,ie)=>{const we=ie.Render??SV,X=$.has(ie.value)||$.has(ie.label??""),ue=F===Q,_e=ie.label??ie.value;return b.jsxs("button",{"data-value":ie.value,...xe({ref:We=>void(D.current[Q]=We),role:"option",type:"button","aria-checked":X,"aria-current":X,"aria-selected":X,"aria-busy":ie.disabled,onClick:()=>Ee(ie,Q)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${X||ue?"bg-floating-hover text-floating-foreground":""}`,children:[b.jsx(Mf,{onChange:ld,checked:X,"aria-checked":X,onClick:We=>{We.stopPropagation(),Ee(ie,Q)}}),b.jsx(we,{...h,label:ie.label,value:ie.value,children:_e})]})}}),$.size===0?null:b.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:ce})]})}):null})]})}),IV=({children:e,className:t="",size:n,...r})=>b.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[b.jsx("input",{...r,type:"radio",className:Le("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),ro=E.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:p,left:f,error:m,...g},h)=>{const v=Ot(),y=E.useRef(null),x=g.id??g.name;E.useImperativeHandle(h,()=>y.current),E.useEffect(()=>{if(y.current===null)return;const w=new AbortController,S=y.current,C=Si(y.current);return S.addEventListener("change",()=>S.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const T=()=>{var w;return(w=y.current)==null?void 0:w.focus()};return b.jsx(ya,{info:n,left:f,error:m,form:g.form,loading:l,name:g.name,feedback:o,hideLeft:d,required:e,title:g.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:g.name||g.id,optionalText:c,labelClassName:i,placeholder:g.placeholder,right:b.jsxs("label",{htmlFor:x,children:[p,b.jsxs("button",{onClick:T,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[b.jsx(Ru,{size:20}),b.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})]}),children:b.jsxs("select",{...g,id:x,name:x,value:g.value,required:e,ref:Fa(h,y),"data-selected":!!g.value||!1,defaultValue:g.value?void 0:"",title:typeof g.title=="string"?g.title:void 0,className:Le("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",g.className),children:[b.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>E.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${x}-select-option-${w.value}`}))]})})});function Gw(e,[t,n]){return Math.min(n,Math.max(t,e))}function ci(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Kw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zw(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Kw(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Kw(e[o],null)}}}}function oo(...e){return k.useCallback(Zw(...e),e)}function Xw(e,t=[]){let n=[];function r(i,a){const s=k.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...m}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,h=k.useMemo(()=>m,Object.values(m));return b.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=k.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,OV(o,...t)]}function OV(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Qw(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function MV({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=DV({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Qw(n),l=k.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function DV({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=Qw(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var NV=k.createContext(void 0);function FV(e){const t=k.useContext(NV);return e||t||"ltr"}function LV(e){const t=k.useRef({value:e,previous:e});return k.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var VV=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{};function jV(e){const[t,n]=k.useState(void 0);return VV(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Zf(e){const t=$V(e),n=k.forwardRef((r,o)=>{const{children:i,...a}=r,s=k.Children.toArray(i),l=s.find(zV);if(l){const c=l.props.children,u=s.map(d=>d===l?k.Children.count(c)>1?k.Children.only(null):k.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:k.isValidElement(c)?k.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function $V(e){const t=k.forwardRef((n,r)=>{const{children:o,...i}=n;if(k.isValidElement(o)){const a=HV(o),s=BV(i,o.props);return o.type!==k.Fragment&&(s.ref=r?Zw(r,a):a),k.cloneElement(o,s)}return k.Children.count(o)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var RV=Symbol("radix.slottable");function zV(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===RV}function BV(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function HV(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)}var WV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],fl=WV.reduce((e,t)=>{const n=Zf(`Primitive.${t}`),r=k.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qV(e){const t=e+"CollectionProvider",[n,r]=Xw(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:h,children:v}=g,y=E.useRef(null),x=E.useRef(new Map).current;return b.jsx(o,{scope:h,itemMap:x,collectionRef:y,children:v})};a.displayName=t;const s=e+"CollectionSlot",l=Zf(s),c=E.forwardRef((g,h)=>{const{scope:v,children:y}=g,x=i(s,v),T=oo(h,x.collectionRef);return b.jsx(l,{ref:T,children:y})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=Zf(u),f=E.forwardRef((g,h)=>{const{scope:v,children:y,...x}=g,T=E.useRef(null),w=oo(h,T),S=i(u,v);return E.useEffect(()=>(S.itemMap.set(T,{ref:T,...x}),()=>void S.itemMap.delete(T))),b.jsx(p,{[d]:"",ref:w,children:y})});f.displayName=u;function m(g){const h=i(e+"CollectionConsumer",g);return E.useCallback(()=>{const y=h.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((S,C)=>x.indexOf(S.ref.current)-x.indexOf(C.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},m,r]}var Jw=["PageUp","PageDown"],e1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],t1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ui="Slider",[Xf,UV,YV]=qV(ui),[n1,GR]=Xw(ui,[YV]),[GV,pl]=n1(ui),r1=k.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:m,...g}=e,h=k.useRef(new Set),v=k.useRef(0),x=a==="horizontal"?KV:ZV,[T=[],w]=MV({prop:u,defaultProp:c,onChange:M=>{var $;($=[...h.current][v.current])==null||$.focus(),d(M)}}),S=k.useRef(T);function C(M){const L=tj(T,M);_(M,L)}function P(M){_(M,v.current)}function I(){const M=S.current[v.current];T[v.current]!==M&&p(T)}function _(M,L,{commit:$}={commit:!1}){const A=ij(i),O=aj(Math.round((M-r)/i)*i+r,A),N=Gw(O,[r,o]);w((V=[])=>{const F=JV(V,N,L);if(oj(F,l*i)){v.current=F.indexOf(N);const z=String(F)!==String(V);return z&&$&&p(F),z?F:V}else return V})}return b.jsx(GV,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:v,thumbs:h.current,values:T,orientation:a,form:m,children:b.jsx(Xf.Provider,{scope:e.__scopeSlider,children:b.jsx(Xf.Slot,{scope:e.__scopeSlider,children:b.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:ci(g.onPointerDown,()=>{s||(S.current=T)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:C,onSlideMove:s?void 0:P,onSlideEnd:s?void 0:I,onHomeKeyDown:()=>!s&&_(r,0,{commit:!0}),onEndKeyDown:()=>!s&&_(o,T.length-1,{commit:!0}),onStepKeyDown:({event:M,direction:L})=>{if(!s){const O=Jw.includes(M.key)||M.shiftKey&&e1.includes(M.key)?10:1,N=v.current,V=T[N],F=i*O*L;_(V+F,N,{commit:!0})}}})})})})});r1.displayName=ui;var[o1,i1]=n1(ui,{startEdge:"left",endEdge:"right",size:"width",direction:1}),KV=k.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=k.useState(null),f=oo(t,x=>p(x)),m=k.useRef(void 0),g=FV(o),h=g==="ltr",v=h&&!i||!h&&i;function y(x){const T=m.current||d.getBoundingClientRect(),w=[0,T.width],C=ep(w,v?[n,r]:[r,n]);return m.current=T,C(x-T.left)}return b.jsx(o1,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:b.jsx(a1,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const T=y(x.clientX);a==null||a(T)},onSlideMove:x=>{const T=y(x.clientX);s==null||s(T)},onSlideEnd:()=>{m.current=void 0,l==null||l()},onStepKeyDown:x=>{const w=t1[v?"from-left":"from-right"].includes(x.key);c==null||c({event:x,direction:w?-1:1})}})})}),ZV=k.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=k.useRef(null),d=oo(t,u),p=k.useRef(void 0),f=!o;function m(g){const h=p.current||u.current.getBoundingClientRect(),v=[0,h.height],x=ep(v,f?[r,n]:[n,r]);return p.current=h,x(g-h.top)}return b.jsx(o1,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:b.jsx(a1,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const h=m(g.clientY);i==null||i(h)},onSlideMove:g=>{const h=m(g.clientY);a==null||a(h)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:g=>{const v=t1[f?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:v?-1:1})}})})}),a1=k.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=pl(ui,n);return b.jsx(fl.span,{...c,ref:t,onKeyDown:ci(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):Jw.concat(e1).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:ci(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:ci(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:ci(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),s1="SliderTrack",l1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=pl(s1,n);return b.jsx(fl.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});l1.displayName=s1;var Qf="SliderRange",c1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=pl(Qf,n),i=i1(Qf,n),a=k.useRef(null),s=oo(t,a),l=o.values.length,c=o.values.map(p=>d1(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return b.jsx(fl.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});c1.displayName=Qf;var Jf="SliderThumb",u1=k.forwardRef((e,t)=>{const n=UV(e.__scopeSlider),[r,o]=k.useState(null),i=oo(t,s=>o(s)),a=k.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return b.jsx(XV,{...e,ref:i,index:a})}),XV=k.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=pl(Jf,n),s=i1(Jf,n),[l,c]=k.useState(null),u=oo(t,y=>c(y)),d=l?a.form||!!l.closest("form"):!0,p=jV(l),f=a.values[r],m=f===void 0?0:d1(f,a.min,a.max),g=ej(r,a.values.length),h=p==null?void 0:p[s.size],v=h?nj(h,m,s.direction):0;return k.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),b.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${m}% + ${v}px)`},children:[b.jsx(Xf.ItemSlot,{scope:e.__scopeSlider,children:b.jsx(fl.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:ci(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&b.jsx(QV,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});u1.displayName=Jf;var QV=e=>{const{value:t,...n}=e,r=k.useRef(null),o=LV(t);return k.useEffect(()=>{const i=r.current,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(o!==t&&l){const c=new Event("input",{bubbles:!0});l.call(i,t),i.dispatchEvent(c)}},[o,t]),b.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function JV(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function d1(e,t,n){const i=100/(n-t)*(e-t);return Gw(i,[0,100])}function ej(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function tj(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function nj(e,t,n){const r=e/2,i=ep([0,50],[0,r]);return(r-i(t)*n)*n}function rj(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function oj(e,t){if(t>0){const n=rj(e);return Math.min(...n)>=t}return!0}function ep(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function ij(e){return(String(e).split(".")[1]||"").length}function aj(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var sj=r1,lj=l1,cj=c1,uj=u1;const dj=e=>{const[t,n]=E.useState(null),r=E.useRef(null);return E.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));tt.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(tt.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),b.jsx(tf,{title:"",ref:r,as:uj,enabled:e.tooltip,className:"block size-5 cursor-grab rounded-full border-2 border-card-border bg-card-background shadow active:cursor-grabbing",children:t})},fj=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef($o()),s=r||o||[];return b.jsxs(sj,{...i,defaultValue:r,value:o,className:Le("relative flex h-5 w-full touch-none select-none items-center",n),children:[b.jsx(lj,{className:"relative h-2 grow rounded-full bg-background",children:b.jsx(cj,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>b.jsx(dj,{tooltip:t??!1},`${a.current}-${c}`))]})},pj=E.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=E.useId(),[s,l]=E.useState(o.checked??!1),c=s,u=E.useRef(null),d=vo(o.onChange);E.useImperativeHandle(i,()=>u.current),E.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},m=u.current;return m.addEventListener("change",f),()=>m==null?void 0:m.removeEventListener("change",f)}},[]);const p=()=>{var m,g;const f=!((m=u.current)!=null&&m.checked);l(f),(g=o==null?void 0:o.onCheck)==null||g.call(o,f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return b.jsxs("fieldset",{className:Le("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[b.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[b.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:f=>l(f.target.checked)}),b.jsx("button",{type:"button",role:"switch",onClick:p,"aria-checked":c,"data-checked":c,"aria-labelledby":`${a}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:b.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),b.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:b.jsx("span",{className:"font-medium text-foreground",children:e})})]}),b.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),hj=e=>{const[t,n]=FA();return E.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const a=i.target,s=Array.from(r.querySelectorAll("input[data-task=true]")),l=s.every(u=>u.checked),c=s.indexOf(a);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:RA(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),b.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},mj=sw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
|
|
196
|
+
`);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),gj=e=>{const[t,n]=E.useState(0);return E.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},vj={Item:E.forwardRef(function(t,n){return b.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return b.jsx("ul",{...t,ref:n,className:"space-y-3"})})},yj=e=>{const t=E.useRef(null),n=gj(t);return b.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[b.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[b.jsx("header",{className:"border-b border-card-border pb-2"}),b.jsxs("div",{className:"px-8 space-y-2",children:[b.jsx(ba,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),b.jsx(kf,{height:n,useWindowScroll:!0,data:e.source,components:vj,itemContent:(r,o)=>b.jsx(E.Fragment,{children:b.jsx(Mf,{children:b.jsx(e.Item,{data:o})})})})]})]}),b.jsx("div",{children:b.jsx(go,{children:b.jsx(zu,{})})}),b.jsx("div",{})]})};var bj=Object.defineProperty,f1=Object.getOwnPropertySymbols,xj=Object.prototype.hasOwnProperty,wj=Object.prototype.propertyIsEnumerable,p1=(e,t,n)=>t in e?bj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sj=(e,t)=>{for(var n in t||(t={}))xj.call(t,n)&&p1(e,n,t[n]);if(f1)for(var n of f1(t))wj.call(t,n)&&p1(e,n,t[n]);return e},tp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},Tj=(e,t,n,r)=>ml(tp,e,t,n,r),di=e=>typeof e=="object",vr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!di(e)&&!di(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>vr(e[r],t[r]))},Ej=(e,t)=>(di(e)||Array.isArray(e))&&t?e[t]:e,Cj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,hl=e=>/[0-9.]+/.test(e),h1=e=>["string","number"].includes(typeof e),m1=e=>e==null||(e==null?void 0:e.length)===0||e==="",g1={eq:vr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:m1,notEmpty:e=>!m1(e),in:(e,t)=>tp(t,n=>vr(e,n)),notIn:(e,t)=>v1(t,n=>!vr(e,n))},kj=e=>{if(e in g1)return g1[e];throw new Error("Linq - Symbol not found")},fi=(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},ml=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=kj(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},Pj=(e,t,n,r)=>ml(fi,e,t,n,r),v1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},Aj=(e,t,n,r)=>ml(v1,e,t,n,r),y1=e=>{if(e===null)return null;const t=Sj({},e);return Object.keys(t).forEach(n=>t[n]=di(e[n])?y1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},b1=(e,t)=>{if(di(t)){for(let n=0;n<e.length;n++){const r=e[n];if(vr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(vr(t,r))return!0}return!1},_j=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},Ij=e=>fi(e,(t,n,r)=>di(t)?n===r.findIndex(o=>vr(o,t)):n===r.indexOf(t)),Oj=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},x1=(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())},Mj=(e,t)=>x1(e,n=>n[t]),w1=(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},Dj=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},Nj=(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 hl(e)&&hl(t)?r.map(a=>Number.parseInt(a)):r},np=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&hl(e)&&hl(t)){const o=[],[i,a]=Dj(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return Nj(e,t,r)},Fj=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?np(r,o,1):np(r,i,Number.parseInt(o,10))}return h1(e)&&h1(t)?np(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},rp=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const a=n[i];r=e(r,a,i,n)}return r},S1=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},Lj=(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)},Vj=(e,t,n,r)=>ml(Lj,e,t,n,r),T1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(Cj(t))},E1=(e=>(e.Asc="asc",e.Desc="desc",e))(E1||{}),jj=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.key,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),$j=(e,t)=>e.sort(jj(t)),Rj=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:fi(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},zj=class Fp{constructor(t=[]){this.array=t}static Range(...t){return Fj(...t)}static New(t){return new Fp(t)}Where(t,n,r){return this.array=Pj(this.array,t,n,r),this}Some(t,n,r){return Tj(this.array,t,n,r)}All(t,n,r){return Aj(this.array,t,n,r)}Reverse(){return this.array=S1(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=Vj(this.array,t,n,r),this}Distinct(){return this.array=Ij(this.array),this}First(t){return t===void 0?this.array[0]:Oj(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?rp((n,r)=>n+r,0,this.array):rp((n,r)=>n+Ej(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return Mj(this.array,t)}GroupWith(t){return x1(this.array,t)}Except(t){return fi(this.array,n=>!b1(t,n))}Intersect(t){return fi(this.array,n=>b1(t,n))}OrderBy(t,n){let r;return r=t?T1(this.array,t):this.array.toSorted(),this.array=n==="desc"?S1(r):r,this}Includes(t){return tp(this.array,n=>vr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return rp(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(w1(this.array,n=>[t,n]))}Zip(t,n){return w1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:fi(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Fp(y1(this.array))}ToObject(t){return _j(this.array,t)}Sort(t){return Array.isArray(t)?$j(this.array,t):T1(this.array,t)}Unique(t){return Rj(this.array,t)}},C1=zj;const k1=b.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"});var op={},P1;function Bj(){return P1||(P1=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,v)=>{try{Object.keys(h).forEach(v)}catch(y){window.console.log(y)}},n=h=>h==null,r=h=>{const v=typeof h;return v==="string"||v==="number"||v==="boolean"||n(h)},o=(h,v)=>{const y=v.getItem(h);try{return JSON.parse(y)}catch{return y??null}},i=h=>Object.keys(h).reduce((v,y)=>({...v,[y]:o(y,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,v)=>(h[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(v=>v(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const v=h.domain??"";return v===""?"":`domain=${h.multiDomain?".":""}${v}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],p={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(v=>v.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const v=p.json()[h];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,v,y={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((w,S)=>{const C=S.parse(y);return C===""?w:w.concat(C)},[`${encodeURIComponent(h)}=${x}`]).join(";");document.cookie=T,u()}},f=h=>{const v=new Set,y=x=>{h().removeItem(x);const T=i(h());v.forEach(w=>w(T))};return{delete:y,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(h()):h(),has:x=>{const T=h().getItem(x);return!n(T)},deleteAll:()=>{t(h(),y),v.forEach(x=>x(h()))},get:x=>o(x,h()),set:(x,T)=>{h().setItem(x,JSON.stringify(T)),v.forEach(w=>w(h()))}}},m=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=m,e.createStorage=f}(op)),op}var wa=Bj();const ip=e=>e.headerLabel??e.thead??e.id,ap=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var pi=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(pi||{});const sp=e=>e.type==="number"?e.valueAsNumber:e.value,Hj=e=>{let t=[];return e({add:(o,i,a)=>t.push({...a,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},Wj={},qj=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const a=r.get(o.id);return a===void 0?e[i]:a})},Uj=(e,t,n=Wj)=>{const r=$r()?null:wa.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=rd({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:qj(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return $r()||wa.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},Yj=e=>{const t=vo(e),n=E.useRef(null),r=E.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-colid="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},lp=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??pi.Text,a=t[i]??[],s=((c=a.find(d=>d["data-default"]))==null?void 0:c.value)??((u=a[0])==null?void 0:u.value),l=n[s];return{id:$o(),operation:l,label:ip(e),name:o,type:i,value:"",...r}},cp=()=>{const e=Ot(),t=E.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:E.useMemo(()=>({[pi.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[pi.Boolean]:[t.is,t.isNot],[pi.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},Gj=e=>{const t=Ot(),n=cp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,lp(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>{if(c!==p.id)return p;const f=e.cols.find(m=>u===m.id);return lp(f,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>p.id===c?{...p,operation:n.operations[u]}:p))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=sp(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return b.jsx(E.Fragment,{children:b.jsx(ti,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(n_,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:b.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return b.jsxs("li",{className:"flex flex-nowrap gap-3",children:[b.jsx(ro,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),b.jsx(ro,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),b.jsx(ba,{"data-id":l.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),b.jsx("div",{className:"mt-5 flex items-center justify-center",children:b.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:b.jsx(Oo,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),b.jsx("li",{children:b.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[b.jsx(Bu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},Kj=({filter:e,onDelete:t,set:n})=>{const r=Ot(),o=cp(),i=s=>{const l=s.target.value,c=s.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},a=s=>{const l=s.target.dataset.id||"",c=sp(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return b.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[b.jsx(ro,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),b.jsx(ba,{optionalText:" ","data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),b.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:b.jsx(Oo,{className:"text-danger",size:14})})]})},Zj=({item:e,onPointerDown:t})=>{const n=Io(0);return b.jsxs(fy,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[b.jsx("button",{type:"button",className:"cursor-grab",children:b.jsx(t_,{size:14})}),b.jsx("span",{children:e.groupName})]},e.groupId)},Xj=e=>{var l;const t=Ot(),n=ap(e.cols),r=jA(),[o,i]=E.useState(((l=e.groups[0])==null?void 0:l.thead)||""),a=c=>{var h;const u=c.target,d=u.value,p=u.options.selectedIndex,f=((h=u.options.item(p))==null?void 0:h.label)||"";i(f);const m=new C1(e.rows).GroupBy(d),g=e.cols.find(v=>v.id===d);e.setGroups(HS(m).map((v,y)=>{const x=m[v];return{...g,groupId:$o(),groupKey:d,index:y,rows:x,groupName:v}}))},s=()=>e.setGroups([]);return b.jsx(E.Fragment,{children:b.jsxs(ti,{arrow:!1,title:t.tableGroupLabel,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(a_,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[b.jsxs("div",{className:"flex flex-nowrap items-center",children:[b.jsx(ro,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),b.jsx(go,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:b.jsx(Oo,{size:16,className:"text-danger"})})]}),e.groups.length>0?b.jsxs("section",{className:"my-4",children:[b.jsx("header",{children:b.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),b.jsx(ZT,{children:b.jsx(uy,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>b.jsx(Zj,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},Qj=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.value,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),Jj=(e,t)=>e.toSorted(Qj(t)),A1=(e,t,n)=>({label:t,id:$o(),type:n,value:e.id}),e$=e=>{const t=Ot(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,A1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,type:u}:p))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return b.jsx(E.Fragment,{children:b.jsx(ti,{title:t.tableSortDropdownTitle,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(my,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:b.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>b.jsxs("li",{className:"flex flex-nowrap gap-3",children:[b.jsx(ro,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),b.jsx(ro,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),b.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:b.jsx(Oo,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),b.jsx("li",{children:b.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[b.jsx(Bu,{size:14})," ",t.tableSortAddButton]})})]})})})},t$=e=>{const t=Ot(),[n,r]=E.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");E.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=A1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=ip(e.col);return b.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[b.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?b.jsx(XA,{size:14}):null,n==="desc"?b.jsx(ZA,{size:14}):null,n==="undefined"?b.jsx(my,{size:14}):null]})},n$=e=>b.jsx("header",{className:"min-w-full mb-1",children:b.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[b.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[b.jsx("span",{children:b.jsx(Gj,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),b.jsx("span",{children:b.jsx(e$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),b.jsx("span",{children:b.jsx(Xj,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),b.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>b.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[b.jsxs("span",{children:[b.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),b.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[b.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),b.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=sp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function r$(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let s=o>2?o:2;s<=Math.min(t,i);s++)n.push(s);const a=t-2;return i+1!==a&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const o$=e=>{const t=E.useId(),n=Ot(),r=E.useMemo(()=>r$(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return b.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[b.jsx("p",{children:b.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?b.jsxs(E.Fragment,{children:[b.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),b.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>b.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),b.jsx("nav",{children:b.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?b.jsx("li",{children:b.jsx(on,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:b.jsx(E.Fragment,{children:typeof i=="string"?b.jsx("li",{children:"..."}):b.jsx("li",{children:b.jsx(on,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?b.jsx("li",{children:b.jsx(on,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},i$=e=>{const t=E.useRef(null),n=E.useRef(null),[r,o]=E.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return E.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),b.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full min-w-8 max-w-20 items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:b.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},a$=(e,t,n)=>{const r=n.cols,o=n.loading;return b.jsx(E.Fragment,{children:r.map((i,a)=>{var f;const s=`${a},${e}`,l=ad(t,i.id),c=i.Element,u=((f=i.cellProps)==null?void 0:f.className)||"",d=a===0&&n.Aside&&o===!1,p=n.Aside;return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`group-table-cell relative hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},d?b.jsx(i$,{children:b.jsx(p,{col:i,row:t,rowIndex:e})}):null,b.jsx("span",{className:"relative",children:o?k1:c?b.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l}):b.jsx(E.Fragment,{children:tt.nil(l)?"":l})}))})})},s$={top:0,left:0,right:0,bottom:-1},l$=e=>{var g;const t=If(),n=Ot(),r=e.filters.filter(h=>h.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=cp(),l=o?r_:o_,c=E.useRef(null),u=h=>{const v=h.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(x=>x.id!==v))},d=E.useCallback(h=>{if(h===null)return;c.current=h;const v=new AbortController;return h.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:v.signal}),()=>v.abort()},[]),p=e.sorters.find(h=>e.header.id===h.value),f=p!=null&&p.type?p.type===E1.Asc?"ascending":"descending":"none",m=ip(e.header);return b.jsxs(fy,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative hidden min-w-0 cursor-grab border-0 font-medium first:table-cell md:table-cell ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[b.jsx("span",{className:`flex h-full items-center justify-between bg-table-header px-2 py-4 ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:b.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?b.jsx(ti,{arrow:!0,trigger:b.jsxs("span",{children:[b.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",m]}),b.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:b.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",b.jsx("span",{className:"font-medium",children:m})]}),children:b.jsxs("ul",{className:"font-medium",children:[r.length===0?null:b.jsx(E.Fragment,{children:r.map(h=>b.jsx("li",{className:"my-1",children:b.jsx(Kj,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),b.jsx("li",{children:b.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(h=>h.concat(lp(e.header,s.options,s.operations))),children:[b.jsx(Bu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,b.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?b.jsx(t$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:b.jsx(ft.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:s$,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-table-border hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:h=>void h.currentTarget.focus(),onKeyDown:h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,x=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(v+x)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(h,v)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,x=v.delta.x;c.current.style.width=`${Math.abs(y+x)}px`}})]})},c$=e=>{const[t,n]=Yj(e.setCols);return b.jsx(uy,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,className:"text-lg",children:b.jsx(Jn,{children:e.headers.map((r,o)=>b.jsx(l$,{index:o,header:r,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:o===e.headers.length-1},`header-child-item-${r.id}`))})})},_1=E.createContext({}),u$=()=>E.useContext(_1),d$=E.forwardRef(({context:e,className:t="",...n},r)=>b.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:b.jsx(Jn,{children:n.children})})),f$=E.forwardRef(({context:e,className:t="",...n},r)=>b.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-collapse divide-y divide-table-border border-0 text-left ${t??""}`})),p$=E.forwardRef(({context:e,...t},n)=>{const r=u$(),o={...t==null?void 0:t.style,top:tt.number(r.sticky)?`${r.sticky}px`:void 0};return b.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-transparent",ref:n})}),h$=E.forwardRef(({context:e,item:t,...n},r)=>b.jsx("tr",{...n,role:"row",ref:r,className:`group-table-row table-row ${(n==null?void 0:n.className)??""}`})),m$=E.forwardRef((e,t)=>e.context.loadingMore?b.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:b.jsx("tr",{role:"row",className:"bg-card-background",children:b.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:b.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),g$={TableHead:p$,Table:f$,TableBody:d$,TableRow:h$,TableFoot:m$},v$=[0,0,0,0,0,0,0,0,0,0],y$=e=>b.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?k1:b.jsx(Sb,{})}),b$=()=>b.jsx(E.Fragment,{}),x$=()=>b.jsx(E.Fragment,{}),w$=[],I1=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,border:s=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=E.useRef(null),[p,f]=E.useState(!1),m=vo(a),g=vo(u.loadingMore),h=E.useMemo(()=>{if(u.loading)return v$;if(c)return u.rows;const x=new C1(u.rows);return t.length>0&&t.forEach(T=>T.value===""||Number.isNaN(T.value)?void 0:x.Where(T.name,T.operation.symbol,T.value)),r.length===0?x.Select():Jj(x.Select(),r)},[u.loading,u.rows,c,t,r]);E.useEffect(()=>{if(d.current===null)return()=>{};const x=d.current,T=new IntersectionObserver(w=>{var P;return w[w.length-1].isIntersecting&&g.current?((P=m.current)==null||P.call(m),void f(!0)):f(!1)});return T.observe(x),()=>T.disconnect()},[g,m]);const v=h.length===0,y={loading:u.loading,loadingMore:u.loadingMore,cols:e,Aside:u.Aside};return b.jsxs("div",{className:"min-w-full",children:[b.jsxs("div",{className:`group rounded-lg ${s?"border border-table-border":""}`,children:[b.jsx(V2,{useWindowScroll:!0,followOutput:"smooth",components:g$,totalCount:h.length,data:v?w$:h,itemContent:v?b$:a$,fixedFooterContent:p?x$:null,context:y,fixedHeaderContent:()=>b.jsx(c$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),v?b.jsx(y$,{loading:u.loading}):null,b.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?b.jsx(o$,{...l}):null]})},S$=(e,t)=>typeof t=="function"?t(e):t,gl=(e,t,n)=>e===t||n==null?void 0:n(t),T$=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=If(),r=e.operations??n.table.operations??!0,o=E.useMemo(()=>ap(e.cols),[e.cols]),[i,a]=rd({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:S$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>{var c;return(c=e.set)==null||c.call(e,s),gl((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),gl((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),gl((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),gl((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return b.jsx(_1.Provider,{value:t,children:b.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?b.jsx(n$,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?b.jsx(I1,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):b.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>b.jsx("div",{className:"min-w-full",children:b.jsx(I1,{...e,group:s,index:l,cols:i.cols,pagination:null,rows:s.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${s.groupId}`))})]})})},E$=["INPUT","SELECT"],O1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{E$.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var up,M1;function dp(){if(M1)return up;M1=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return up={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},up}var fp,D1;function N1(){if(D1)return fp;D1=1;var e=dp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var h=[],v=0;v<256;++v)h.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return h}(),o=function(v){for(;v.length>1;){var y=v.pop(),x=y.obj[y.prop];if(n(x)){for(var T=[],w=0;w<x.length;++w)typeof x[w]<"u"&&T.push(x[w]);y.obj[y.prop]=T}}},i=function(v,y){for(var x=y&&y.plainObjects?{__proto__:null}:{},T=0;T<v.length;++T)typeof v[T]<"u"&&(x[T]=v[T]);return x},a=function h(v,y,x){if(!y)return v;if(typeof y!="object"&&typeof y!="function"){if(n(v))v.push(y);else if(v&&typeof v=="object")(x&&(x.plainObjects||x.allowPrototypes)||!t.call(Object.prototype,y))&&(v[y]=!0);else return[v,y];return v}if(!v||typeof v!="object")return[v].concat(y);var T=v;return n(v)&&!n(y)&&(T=i(v,x)),n(v)&&n(y)?(y.forEach(function(w,S){if(t.call(v,S)){var C=v[S];C&&typeof C=="object"&&w&&typeof w=="object"?v[S]=h(C,w,x):v.push(w)}else v[S]=w}),v):Object.keys(y).reduce(function(w,S){var C=y[S];return t.call(w,S)?w[S]=h(w[S],C,x):w[S]=C,w},T)},s=function(v,y){return Object.keys(y).reduce(function(x,T){return x[T]=y[T],x},v)},l=function(h,v,y){var x=h.replace(/\+/g," ");if(y==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},c=1024,u=function(v,y,x,T,w){if(v.length===0)return v;var S=v;if(typeof v=="symbol"?S=Symbol.prototype.toString.call(v):typeof v!="string"&&(S=String(v)),x==="iso-8859-1")return escape(S).replace(/%u[0-9a-f]{4}/gi,function($){return"%26%23"+parseInt($.slice(2),16)+"%3B"});for(var C="",P=0;P<S.length;P+=c){for(var I=S.length>=c?S.slice(P,P+c):S,_=[],M=0;M<I.length;++M){var L=I.charCodeAt(M);if(L===45||L===46||L===95||L===126||L>=48&&L<=57||L>=65&&L<=90||L>=97&&L<=122||w===e.RFC1738&&(L===40||L===41)){_[_.length]=I.charAt(M);continue}if(L<128){_[_.length]=r[L];continue}if(L<2048){_[_.length]=r[192|L>>6]+r[128|L&63];continue}if(L<55296||L>=57344){_[_.length]=r[224|L>>12]+r[128|L>>6&63]+r[128|L&63];continue}M+=1,L=65536+((L&1023)<<10|I.charCodeAt(M)&1023),_[_.length]=r[240|L>>18]+r[128|L>>12&63]+r[128|L>>6&63]+r[128|L&63]}C+=_.join("")}return C},d=function(v){for(var y=[{obj:{o:v},prop:"o"}],x=[],T=0;T<y.length;++T)for(var w=y[T],S=w.obj[w.prop],C=Object.keys(S),P=0;P<C.length;++P){var I=C[P],_=S[I];typeof _=="object"&&_!==null&&x.indexOf(_)===-1&&(y.push({obj:S,prop:I}),x.push(_))}return o(y),v},p=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},f=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},m=function(v,y){return[].concat(v,y)},g=function(v,y){if(n(v)){for(var x=[],T=0;T<v.length;T+=1)x.push(y(v[T]));return x}return y(v)};return fp={arrayToObject:i,assign:s,combine:m,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},fp}var pp,F1;function C$(){if(F1)return pp;F1=1;var e=jS(),t=N1(),n=dp(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,v){return h+"["+v+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},p={},f=function g(h,v,y,x,T,w,S,C,P,I,_,M,L,$,A,O,N,V){for(var F=h,z=V,D=0,R=!1;(z=z.get(p))!==void 0&&!R;){var J=z.get(h);if(D+=1,typeof J<"u"){if(J===D)throw new RangeError("Cyclic object value");R=!0}typeof z.get(p)>"u"&&(D=0)}if(typeof I=="function"?F=I(v,F):F instanceof Date?F=L(F):y==="comma"&&i(F)&&(F=t.maybeMap(F,function(Oe){return Oe instanceof Date?L(Oe):Oe})),F===null){if(w)return P&&!O?P(v,u.encoder,N,"key",$):v;F=""}if(d(F)||t.isBuffer(F)){if(P){var te=O?v:P(v,u.encoder,N,"key",$);return[A(te)+"="+A(P(F,u.encoder,N,"value",$))]}return[A(v)+"="+A(String(F))]}var ee=[];if(typeof F>"u")return ee;var Z;if(y==="comma"&&i(F))O&&P&&(F=t.maybeMap(F,P)),Z=[{value:F.length>0?F.join(",")||null:void 0}];else if(i(I))Z=I;else{var U=Object.keys(F);Z=_?U.sort(_):U}var Y=C?String(v).replace(/\./g,"%2E"):String(v),j=x&&i(F)&&F.length===1?Y+"[]":Y;if(T&&i(F)&&F.length===0)return j+"[]";for(var W=0;W<Z.length;++W){var G=Z[W],ae=typeof G=="object"&&G&&typeof G.value<"u"?G.value:F[G];if(!(S&&ae===null)){var B=M&&C?String(G).replace(/\./g,"%2E"):String(G),xe=i(F)?typeof y=="function"?y(j,B):j:j+(M?"."+B:"["+B+"]");V.set(h,D);var Ee=e();Ee.set(p,V),s(ee,g(ae,xe,y,x,T,w,S,C,y==="comma"&&O&&i(F)?null:P,I,_,M,L,$,A,O,N,Ee))}}return ee},m=function(h){if(!h)return u;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var y=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");y=h.format}var x=n.formatters[y],T=u.filter;(typeof h.filter=="function"||i(h.filter))&&(T=h.filter);var w;if(h.arrayFormat in o?w=h.arrayFormat:"indices"in h?w=h.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var S=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:S,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:v,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:y,formatter:x,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:u.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:u.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:u.strictNullHandling}};return pp=function(g,h){var v=g,y=m(h),x,T;typeof y.filter=="function"?(T=y.filter,v=T("",v)):i(y.filter)&&(T=y.filter,x=T);var w=[];if(typeof v!="object"||v===null)return"";var S=o[y.arrayFormat],C=S==="comma"&&y.commaRoundTrip;x||(x=Object.keys(v)),y.sort&&x.sort(y.sort);for(var P=e(),I=0;I<x.length;++I){var _=x[I],M=v[_];y.skipNulls&&M===null||s(w,f(M,_,S,C,y.allowEmptyArrays,y.strictNullHandling,y.skipNulls,y.encodeDotInKeys,y.encode?y.encoder:null,y.filter,y.sort,y.allowDots,y.serializeDate,y.format,y.formatter,y.encodeValuesOnly,y.charset,P))}var L=w.join(y.delimiter),$=y.addQueryPrefix===!0?"?":"";return y.charsetSentinel&&(y.charset==="iso-8859-1"?$+="utf8=%26%2310003%3B&":$+="utf8=%E2%9C%93&"),L.length>0?$+L:""},pp}var hp,L1;function k$(){if(L1)return hp;L1=1;var e=N1(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(f,m){return String.fromCharCode(parseInt(m,10))})},i=function(p,f,m){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&m>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,m){var g={__proto__:null},h=m.ignoreQueryPrefix?f.replace(/^\?/,""):f;h=h.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=m.parameterLimit===1/0?void 0:m.parameterLimit,y=h.split(m.delimiter,m.throwOnLimitExceeded?v+1:v);if(m.throwOnLimitExceeded&&y.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var x=-1,T,w=m.charset;if(m.charsetSentinel)for(T=0;T<y.length;++T)y[T].indexOf("utf8=")===0&&(y[T]===s?w="utf-8":y[T]===a&&(w="iso-8859-1"),x=T,T=y.length);for(T=0;T<y.length;++T)if(T!==x){var S=y[T],C=S.indexOf("]="),P=C===-1?S.indexOf("="):C+1,I,_;P===-1?(I=m.decoder(S,r.decoder,w,"key"),_=m.strictNullHandling?null:""):(I=m.decoder(S.slice(0,P),r.decoder,w,"key"),_=e.maybeMap(i(S.slice(P+1),m,n(g[I])?g[I].length:0),function(L){return m.decoder(L,r.decoder,w,"value")})),_&&m.interpretNumericEntities&&w==="iso-8859-1"&&(_=o(String(_))),S.indexOf("[]=")>-1&&(_=n(_)?[_]:_);var M=t.call(g,I);M&&m.duplicates==="combine"?g[I]=e.combine(g[I],_):(!M||m.duplicates==="last")&&(g[I]=_)}return g},c=function(p,f,m,g){var h=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");h=Array.isArray(f)&&f[v]?f[v].length:0}for(var y=g?f:i(f,m,h),x=p.length-1;x>=0;--x){var T,w=p[x];if(w==="[]"&&m.parseArrays)T=m.allowEmptyArrays&&(y===""||m.strictNullHandling&&y===null)?[]:e.combine([],y);else{T=m.plainObjects?{__proto__:null}:{};var S=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=m.decodeDotInKeys?S.replace(/%2E/g,"."):S,P=parseInt(C,10);!m.parseArrays&&C===""?T={0:y}:!isNaN(P)&&w!==C&&String(P)===C&&P>=0&&m.parseArrays&&P<=m.arrayLimit?(T=[],T[P]=y):C!=="__proto__"&&(T[C]=y)}y=T}return y},u=function(f,m,g,h){if(f){var v=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,y=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,T=g.depth>0&&y.exec(v),w=T?v.slice(0,T.index):v,S=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;S.push(w)}for(var C=0;g.depth>0&&(T=x.exec(v))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,T[1].slice(1,-1))&&!g.allowPrototypes)return;S.push(T[1])}if(T){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");S.push("["+v.slice(T.index)+"]")}return c(S,m,g,h)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var m=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var h=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:h,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:m,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return hp=function(p,f){var m=d(f);if(p===""||p===null||typeof p>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,m):p,h=m.plainObjects?{__proto__:null}:{},v=Object.keys(g),y=0;y<v.length;++y){var x=v[y],T=u(x,g[x],m,typeof p=="string");h=e.merge(h,T,m)}return m.allowSparse===!0?h:e.compact(h)},hp}var mp,V1;function P$(){if(V1)return mp;V1=1;var e=C$(),t=k$(),n=dp();return mp={formats:n,parse:t,stringify:e},mp}var A$=P$(),He;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(He||(He={}));var j1;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(j1||(j1={}));const fe=He.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),yr=e=>{switch(typeof e){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},oe=He.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 fn extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof fn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.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()}}fn.create=e=>new fn(e);const Sa=(e,t)=>{let n;switch(e.code){case oe.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case oe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,He.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:n=`Unrecognized key(s) in object: ${He.joinValues(e.keys,", ")}`;break;case oe.invalid_union:n="Invalid input";break;case oe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${He.joinValues(e.options)}`;break;case oe.invalid_enum_value:n=`Invalid enum value. Expected ${He.joinValues(e.options)}, received '${e.received}'`;break;case oe.invalid_arguments:n="Invalid function arguments";break;case oe.invalid_return_type:n="Invalid function return type";break;case oe.invalid_date:n="Invalid date";break;case oe.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}"`:He.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case oe.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 oe.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 oe.custom:n="Invalid input";break;case oe.invalid_intersection_types:n="Intersection results could not be merged";break;case oe.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case oe.not_finite:n="Number must be finite";break;default:n=t.defaultError,He.assertNever(e)}return{message:n}};let _$=Sa;function gp(){return _$}const vp=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function de(e,t){const n=gp(),r=vp({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Sa?void 0:Sa].filter(o=>!!o)});e.common.issues.push(r)}class qt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return ke;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,a=await o.value;r.push({key:i,value:a})}return qt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return ke;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const ke=Object.freeze({status:"aborted"}),Ta=e=>({status:"dirty",value:e}),Zt=e=>({status:"valid",value:e}),$1=e=>e.status==="aborted",R1=e=>e.status==="dirty",hi=e=>e.status==="valid",vl=e=>typeof Promise<"u"&&e instanceof Promise;function yl(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function z1(e,t,n,r,o){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var ve;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ve||(ve={}));var Ea,Ca;class $n{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 B1=(e,t)=>{if(hi(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 fn(e.common.issues);return this._error=n,this._error}}};function Ie(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{var l,c;const{message:u}=e;return a.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:s.defaultError}},description:o}}class Ve{get description(){return this._def.description}_getType(t){return yr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:yr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new qt,ctx:{common:t.parent.common,data:t.data,parsedType:yr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(vl(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:yr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return B1(o,i)}"~validate"(t){var n,r;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:yr(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return hi(i)?{value:i.value}:{issues:o.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:o}).then(i=>hi(i)?{value:i.value}:{issues:o.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:yr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(vl(o)?o:Promise.resolve(o));return B1(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:oe.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Zn({schema:this,typeName:Te.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Xn.create(this,this._def)}nullable(){return so.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Rn.create(this)}promise(){return Aa.create(this,this._def)}or(t){return wl.create([this,t],this._def)}and(t){return Sl.create(this,t,this._def)}transform(t){return new Zn({...Ie(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Pl({...Ie(this._def),innerType:this,defaultValue:n,typeName:Te.ZodDefault})}brand(){return new U1({typeName:Te.ZodBranded,type:this,...Ie(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Al({...Ie(this._def),innerType:this,catchValue:n,typeName:Te.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return _l.create(this,t)}readonly(){return Il.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const I$=/^c[^\s-]{8,}$/i,O$=/^[0-9a-z]+$/,M$=/^[0-9A-HJKMNP-TV-Z]{26}$/i,D$=/^[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,N$=/^[a-z0-9_-]{21}$/i,F$=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,L$=/^[-+]?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)?)??$/,V$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,j$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let yp;const $$=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,R$=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,z$=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,B$=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,H$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,W$=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,H1="((\\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])))",q$=new RegExp(`^${H1}$`);function W1(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 U$(e){return new RegExp(`^${W1(e)}$`)}function Y$(e){let t=`${H1}T${W1(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 G$(e,t){return!!((t==="v4"||!t)&&$$.test(e)||(t==="v6"||!t)&&z$.test(e))}function K$(e,t){if(!F$.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||!o.typ||!o.alg||t&&o.alg!==t)}catch{return!1}}function Z$(e,t){return!!((t==="v4"||!t)&&R$.test(e)||(t==="v6"||!t)&&B$.test(e))}class Yn extends Ve{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return de(i,{code:oe.invalid_type,expected:fe.string,received:i.parsedType}),ke}const r=new qt;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),de(o,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),de(o,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?de(o,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&de(o,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")V$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"email",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")yp||(yp=new RegExp(j$,"u")),yp.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"emoji",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")D$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"uuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")N$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"nanoid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")I$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"cuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")O$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"cuid2",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")M$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"ulid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),de(o,{validation:"url",code:oe.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"regex",code:oe.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Y$(i).test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?q$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?U$(i).test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{code:oe.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?L$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"duration",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?G$(t.data,i.version)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"ip",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?K$(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"jwt",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Z$(t.data,i.version)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"cidr",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?H$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"base64",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?W$.test(t.data)||(o=this._getOrReturnCtx(t,o),de(o,{validation:"base64url",code:oe.invalid_string,message:i.message}),r.dirty()):He.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:oe.invalid_string,...ve.errToObj(r)})}_addCheck(t){return new Yn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ve.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ve.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ve.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ve.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ve.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ve.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ve.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ve.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ve.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ve.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ve.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ve.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ve.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ve.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ve.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ve.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ve.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ve.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ve.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ve.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ve.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ve.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ve.errToObj(n)})}nonempty(t){return this.min(1,ve.errToObj(t))}trim(){return new Yn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Yn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Yn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Yn.create=e=>{var t;return new Yn({checks:[],typeName:Te.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ie(e)})};function X$(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class io extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==fe.number){const i=this._getOrReturnCtx(t);return de(i,{code:oe.invalid_type,expected:fe.number,received:i.parsedType}),ke}let r;const o=new qt;for(const i of this._def.checks)i.kind==="int"?He.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),de(r,{code:oe.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),de(r,{code:oe.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),de(r,{code:oe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?X$(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),de(r,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),de(r,{code:oe.not_finite,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new io({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new io({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ve.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ve.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ve.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ve.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&He.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)}}io.create=e=>new io({checks:[],typeName:Te.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ie(e)});class mi extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==fe.bigint)return this._getInvalidInput(t);let r;const o=new qt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),de(r,{code:oe.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),de(r,{code:oe.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),de(r,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return de(n,{code:oe.invalid_type,expected:fe.bigint,received:n.parsedType}),ke}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new mi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new mi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}mi.create=e=>{var t;return new mi({checks:[],typeName:Te.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ie(e)})};class bp extends Ve{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.boolean,received:r.parsedType}),ke}return Zt(t.data)}}bp.create=e=>new bp({typeName:Te.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ie(e)});class ka extends Ve{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return de(i,{code:oe.invalid_type,expected:fe.date,received:i.parsedType}),ke}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return de(i,{code:oe.invalid_date}),ke}const r=new qt;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),de(o,{code:oe.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),de(o,{code:oe.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):He.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ka({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ve.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ve.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}ka.create=e=>new ka({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Te.ZodDate,...Ie(e)});class xp extends Ve{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.symbol,received:r.parsedType}),ke}return Zt(t.data)}}xp.create=e=>new xp({typeName:Te.ZodSymbol,...Ie(e)});class bl extends Ve{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.undefined,received:r.parsedType}),ke}return Zt(t.data)}}bl.create=e=>new bl({typeName:Te.ZodUndefined,...Ie(e)});class xl extends Ve{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.null,received:r.parsedType}),ke}return Zt(t.data)}}xl.create=e=>new xl({typeName:Te.ZodNull,...Ie(e)});class wp extends Ve{constructor(){super(...arguments),this._any=!0}_parse(t){return Zt(t.data)}}wp.create=e=>new wp({typeName:Te.ZodAny,...Ie(e)});class gi extends Ve{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Zt(t.data)}}gi.create=e=>new gi({typeName:Te.ZodUnknown,...Ie(e)});class br extends Ve{_parse(t){const n=this._getOrReturnCtx(t);return de(n,{code:oe.invalid_type,expected:fe.never,received:n.parsedType}),ke}}br.create=e=>new br({typeName:Te.ZodNever,...Ie(e)});class Sp extends Ve{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.void,received:r.parsedType}),ke}return Zt(t.data)}}Sp.create=e=>new Sp({typeName:Te.ZodVoid,...Ie(e)});class Rn extends Ve{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return de(n,{code:oe.invalid_type,expected:fe.array,received:n.parsedType}),ke;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(de(n,{code:a?oe.too_big:oe.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(de(n,{code:oe.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&&(de(n,{code:oe.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new $n(n,a,n.path,s)))).then(a=>qt.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new $n(n,a,n.path,s)));return qt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Rn({...this._def,minLength:{value:t,message:ve.toString(n)}})}max(t,n){return new Rn({...this._def,maxLength:{value:t,message:ve.toString(n)}})}length(t,n){return new Rn({...this._def,exactLength:{value:t,message:ve.toString(n)}})}nonempty(t){return this.min(1,t)}}Rn.create=(e,t)=>new Rn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Te.ZodArray,...Ie(t)});function vi(e){if(e instanceof bt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Xn.create(vi(r))}return new bt({...e._def,shape:()=>t})}else return e instanceof Rn?new Rn({...e._def,type:vi(e.element)}):e instanceof Xn?Xn.create(vi(e.unwrap())):e instanceof so?so.create(vi(e.unwrap())):e instanceof Kn?Kn.create(e.items.map(t=>vi(t))):e}class bt extends Ve{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=He.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return de(c,{code:oe.invalid_type,expected:fe.object,received:c.parsedType}),ke}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof br&&this._def.unknownKeys==="strip"))for(const c in o.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new $n(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof br){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(de(o,{code:oe.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new $n(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>qt.mergeObjectSync(r,c)):qt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ve.errToObj,new bt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const l=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ve.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new bt({...this._def,unknownKeys:"strip"})}passthrough(){return new bt({...this._def,unknownKeys:"passthrough"})}extend(t){return new bt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new bt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Te.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new bt({...this._def,catchall:t})}pick(t){const n={};return He.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new bt({...this._def,shape:()=>n})}omit(t){const n={};return He.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new bt({...this._def,shape:()=>n})}deepPartial(){return vi(this)}partial(t){const n={};return He.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new bt({...this._def,shape:()=>n})}required(t){const n={};return He.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Xn;)i=i._def.innerType;n[r]=i}}),new bt({...this._def,shape:()=>n})}keyof(){return q1(He.objectKeys(this.shape))}}bt.create=(e,t)=>new bt({shape:()=>e,unknownKeys:"strip",catchall:br.create(),typeName:Te.ZodObject,...Ie(t)}),bt.strictCreate=(e,t)=>new bt({shape:()=>e,unknownKeys:"strict",catchall:br.create(),typeName:Te.ZodObject,...Ie(t)}),bt.lazycreate=(e,t)=>new bt({shape:e,unknownKeys:"strip",catchall:br.create(),typeName:Te.ZodObject,...Ie(t)});class wl extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new fn(s.ctx.common.issues));return de(n,{code:oe.invalid_union,unionErrors:a}),ke}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new fn(l));return de(n,{code:oe.invalid_union,unionErrors:s}),ke}}get options(){return this._def.options}}wl.create=(e,t)=>new wl({options:e,typeName:Te.ZodUnion,...Ie(t)});const Gn=e=>e instanceof El?Gn(e.schema):e instanceof Zn?Gn(e.innerType()):e instanceof Cl?[e.value]:e instanceof ao?e.options:e instanceof kl?He.objectValues(e.enum):e instanceof Pl?Gn(e._def.innerType):e instanceof bl?[void 0]:e instanceof xl?[null]:e instanceof Xn?[void 0,...Gn(e.unwrap())]:e instanceof so?[null,...Gn(e.unwrap())]:e instanceof U1||e instanceof Il?Gn(e.unwrap()):e instanceof Al?Gn(e._def.innerType):[];class Tp extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return de(n,{code:oe.invalid_type,expected:fe.object,received:n.parsedType}),ke;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(de(n,{code:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ke)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=Gn(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new Tp({typeName:Te.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ie(r)})}}function Ep(e,t){const n=yr(e),r=yr(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=He.objectKeys(t),i=He.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Ep(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===fe.array&&r===fe.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],l=Ep(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===fe.date&&r===fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Sl extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if($1(i)||$1(a))return ke;const s=Ep(i.value,a.value);return s.valid?((R1(i)||R1(a))&&n.dirty(),{status:n.value,value:s.data}):(de(r,{code:oe.invalid_intersection_types}),ke)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Sl.create=(e,t,n)=>new Sl({left:e,right:t,typeName:Te.ZodIntersection,...Ie(n)});class Kn extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return de(r,{code:oe.invalid_type,expected:fe.array,received:r.parsedType}),ke;if(r.data.length<this._def.items.length)return de(r,{code:oe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ke;!this._def.rest&&r.data.length>this._def.items.length&&(de(r,{code:oe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new $n(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>qt.mergeArray(n,a)):qt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Kn({...this._def,rest:t})}}Kn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Kn({items:e,typeName:Te.ZodTuple,rest:null,...Ie(t)})};class Tl extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.object)return de(r,{code:oe.invalid_type,expected:fe.object,received:r.parsedType}),ke;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new $n(r,s,r.path,s)),value:a._parse(new $n(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?qt.mergeObjectAsync(n,o):qt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ve?new Tl({keyType:t,valueType:n,typeName:Te.ZodRecord,...Ie(r)}):new Tl({keyType:Yn.create(),valueType:t,typeName:Te.ZodRecord,...Ie(n)})}}class Cp extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.map)return de(r,{code:oe.invalid_type,expected:fe.map,received:r.parsedType}),ke;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new $n(r,s,r.path,[c,"key"])),value:i._parse(new $n(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return ke;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return ke;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}Cp.create=(e,t,n)=>new Cp({valueType:t,keyType:e,typeName:Te.ZodMap,...Ie(n)});class yi extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return de(r,{code:oe.invalid_type,expected:fe.set,received:r.parsedType}),ke;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(de(r,{code:oe.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&&(de(r,{code:oe.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return ke;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>i._parse(new $n(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new yi({...this._def,minSize:{value:t,message:ve.toString(n)}})}max(t,n){return new yi({...this._def,maxSize:{value:t,message:ve.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}yi.create=(e,t)=>new yi({valueType:e,minSize:null,maxSize:null,typeName:Te.ZodSet,...Ie(t)});class Pa extends Ve{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return de(n,{code:oe.invalid_type,expected:fe.function,received:n.parsedType}),ke;function r(s,l){return vp({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,gp(),Sa].filter(c=>!!c),issueData:{code:oe.invalid_arguments,argumentsError:l}})}function o(s,l){return vp({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,gp(),Sa].filter(c=>!!c),issueData:{code:oe.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Aa){const s=this;return Zt(async function(...l){const c=new fn([]),u=await s._def.args.parseAsync(l,i).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const s=this;return Zt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new fn([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new fn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Pa({...this._def,args:Kn.create(t).rest(gi.create())})}returns(t){return new Pa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Pa({args:t||Kn.create([]).rest(gi.create()),returns:n||gi.create(),typeName:Te.ZodFunction,...Ie(r)})}}class El extends Ve{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})}}El.create=(e,t)=>new El({getter:e,typeName:Te.ZodLazy,...Ie(t)});class Cl extends Ve{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return de(n,{received:n.data,code:oe.invalid_literal,expected:this._def.value}),ke}return{status:"valid",value:t.data}}get value(){return this._def.value}}Cl.create=(e,t)=>new Cl({value:e,typeName:Te.ZodLiteral,...Ie(t)});function q1(e,t){return new ao({values:e,typeName:Te.ZodEnum,...Ie(t)})}class ao extends Ve{constructor(){super(...arguments),Ea.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return de(n,{expected:He.joinValues(r),received:n.parsedType,code:oe.invalid_type}),ke}if(yl(this,Ea)||z1(this,Ea,new Set(this._def.values)),!yl(this,Ea).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return de(n,{received:n.data,code:oe.invalid_enum_value,options:r}),ke}return Zt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return ao.create(t,{...this._def,...n})}exclude(t,n=this._def){return ao.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ea=new WeakMap,ao.create=q1;class kl extends Ve{constructor(){super(...arguments),Ca.set(this,void 0)}_parse(t){const n=He.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=He.objectValues(n);return de(r,{expected:He.joinValues(o),received:r.parsedType,code:oe.invalid_type}),ke}if(yl(this,Ca)||z1(this,Ca,new Set(He.getValidEnumValues(this._def.values))),!yl(this,Ca).has(t.data)){const o=He.objectValues(n);return de(r,{received:r.data,code:oe.invalid_enum_value,options:o}),ke}return Zt(t.data)}get enum(){return this._def.values}}Ca=new WeakMap,kl.create=(e,t)=>new kl({values:e,typeName:Te.ZodNativeEnum,...Ie(t)});class Aa extends Ve{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return de(n,{code:oe.invalid_type,expected:fe.promise,received:n.parsedType}),ke;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Aa.create=(e,t)=>new Aa({type:e,typeName:Te.ZodPromise,...Ie(t)});class Zn extends Ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Te.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{de(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return ke;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?ke:l.status==="dirty"||n.value==="dirty"?Ta(l.value):l});{if(n.value==="aborted")return ke;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?ke:s.status==="dirty"||n.value==="dirty"?Ta(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ke:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?ke:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!hi(a))return a;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>hi(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);He.assertNever(o)}}Zn.create=(e,t,n)=>new Zn({schema:e,typeName:Te.ZodEffects,effect:t,...Ie(n)}),Zn.createWithPreprocess=(e,t,n)=>new Zn({schema:t,effect:{type:"preprocess",transform:e},typeName:Te.ZodEffects,...Ie(n)});class Xn extends Ve{_parse(t){return this._getType(t)===fe.undefined?Zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Xn.create=(e,t)=>new Xn({innerType:e,typeName:Te.ZodOptional,...Ie(t)});class so extends Ve{_parse(t){return this._getType(t)===fe.null?Zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}so.create=(e,t)=>new so({innerType:e,typeName:Te.ZodNullable,...Ie(t)});class Pl extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Pl.create=(e,t)=>new Pl({innerType:e,typeName:Te.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ie(t)});class Al extends Ve{_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 vl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new fn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new fn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Al.create=(e,t)=>new Al({innerType:e,typeName:Te.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ie(t)});class kp extends Ve{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return de(r,{code:oe.invalid_type,expected:fe.nan,received:r.parsedType}),ke}return{status:"valid",value:t.data}}}kp.create=e=>new kp({typeName:Te.ZodNaN,...Ie(e)});class U1 extends Ve{_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 _l extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ke:i.status==="dirty"?(n.dirty(),Ta(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ke: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 _l({in:t,out:n,typeName:Te.ZodPipeline})}}class Il extends Ve{_parse(t){const n=this._def.innerType._parse(t),r=o=>(hi(o)&&(o.value=Object.freeze(o.value)),o);return vl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Il.create=(e,t)=>new Il({innerType:e,typeName:Te.ZodReadonly,...Ie(t)}),bt.lazycreate;var Te;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Te||(Te={})),Yn.create,io.create,kp.create,mi.create,bp.create,ka.create,xp.create,bl.create,xl.create,wp.create,gi.create,br.create,Sp.create,Rn.create,bt.create,bt.strictCreate,wl.create,Tp.create,Sl.create,Kn.create,Tl.create,Cp.create,yi.create,Pa.create,El.create,Cl.create,ao.create,kl.create,Aa.create,Zn.create,Xn.create,so.create,Zn.createWithPreprocess,_l.create;const Q$=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},J$=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const i=t[o];if(o===r)e[i]=n;else{if(!(i in e)||typeof e[i]!="object"){const a=t[o+1];e[i]=isNaN(Number(a))?{}:[]}e=e[i]}}},Y1=e=>e.replace(/\[(\d+)]/g,".$1").split("."),wn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):Y1(t),o=structuredClone(e);return J$(o,r,n),o},eR=(e,t)=>e.localeCompare(t),_a={},G1=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return K1(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=G1(e._def.innerType);return t==="ZodArray"?n??[]:n}},K1=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,G1(n)])),Z1=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],i=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof i=="object"&&i!==null&&!Array.isArray(i)?n[r]=Z1(i,o):n[r]=o||i)}return n},tR={sort:eR,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},X1=e=>{const t=new FormData(e),n=new URLSearchParams(t);return A$.parse(n.toString(),tR)},lo=(e,t)=>Y1(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),xr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Pp=e=>{const t=e.dataset.target;if(!t)return xr(e);const n=document.querySelector(`[data-origin="${t}"]`);return xr(n||e)},nR={state:{},loading:!1,useOnChange:!1},Q1=e=>e.dataset.target||e.name,rR=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=wa.LocalStorage.get(t);return Q$(n)?n:{}},clear:()=>void wa.LocalStorage.delete(t),set:n=>wa.LocalStorage.set(t,n)}},oR=(e,t,n=nR)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>tt.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??K1(e)??{}),l=E.useCallback(y=>{var I;const x=y.target,T=y.currentTarget;if(x.dataset.optional==="true")return;const S=Q1(x),C=Pp(x)||(T?xr(T):""),P=lo(S,e);if(x.setAttribute("data-initialized","true"),P){const _=P.safeParse(C),M=_.success?void 0:((I=_.error.issues[0])==null?void 0:I.message)??"";o(L=>wn(L??{},S,M))}},[]),c=E.useCallback(y=>x=>{const T=x.currentTarget,w=Object.values(i.current).reduce((C,P)=>{var $;const I=P.element,_=P.schema.safeParse(xr(I));if(I.dataset.ignore==="ignore"||_.success)return C;const M=($=_.error.issues[0])==null?void 0:$.message;I.setAttribute("data-initialized","true");const L=I.dataset.name||I.name||"";return wn(C,L,M)},{}),S=tt.empty(w)?null:w;o(S),console.error(S),y==null||y({form:T,errors:S||{}})},[]),u=(y,x=_a)=>{const T=lo(y,e),w=S=>{var P;if(!S)return;const C=S instanceof Date?S.toISOString():S.target.value;s(I=>wn(I,y,C)),(P=x==null?void 0:x.onChange)==null||P.call(x,S)};return{...x,loading:n.loading,name:y,id:y,onChange:w,form:t,date:tt.string(a[y])?new Date(a[y]):a[y],required:x.required??!T.isOptional(),error:r==null?void 0:r[y],ref:S=>{S!==null&&(i.current[y]={element:S,schema:T})}}},d=(y,x=_a)=>{const T=lo(y,e);return{...x,name:y,id:y,onChange:S=>{var P;const C=S.target.value;s(I=>wn(I,y,C)),(P=x==null?void 0:x.onChange)==null||P.call(x,S)},form:t,loading:n.loading,onInvalid:l,error:kr(r,y,void 0),value:kr(a,y,void 0)||"",required:x.required??!T.isOptional(),ref:S=>S!==null?i.current[y]={element:S,schema:T}:void 0}},p=(y,x=_a)=>{const T=lo(y,e);return{...x,name:y,id:y,onChange:S=>{var P;const C=S.target.checked;s(I=>wn(I??{},y,C)),(P=x==null?void 0:x.onChange)==null||P.call(x,S)},form:t,loading:n.loading,onInvalid:l,error:kr(r,y,void 0),required:x.required??!T.isOptional(),ref:S=>S!==null?void(i.current[y]={element:S,schema:T}):void 0}},f=(y,x=_a)=>{const T=lo(y,e),w=S=>{var P,I;(P=S.persist)==null||P.call(S);const C=S.target.value;(I=x==null?void 0:x.onChange)==null||I.call(x,S),s(_=>wn(_,y,C))};return{...x,loading:n.loading,name:y,id:y,onChange:w,form:t,onInvalid:l,error:kr(r,y,void 0),required:x.required??!T.isOptional(),value:kr(a,y,void 0)||(x==null?void 0:x.value)||"",type:tt.instance(T,io)?"number":(x==null?void 0:x.type)??"text",ref:S=>S===null?void 0:i.current[y]={element:S,schema:T}}},m=(y,x=_a)=>{const T=lo(y,e),w=T._def.typeName==="ZodNumber";return{...x,name:y,id:y,onChange:C=>{var I,_;(I=C.persist)==null||I.call(C);const P=w?C.target.valueAsNumber:C.target.value;(_=x==null?void 0:x.onChange)==null||_.call(x,C),s(M=>wn(M,y,P))},form:t,loading:n.loading,onInvalid:l,error:kr(r,y,void 0),required:x.required??!T.isOptional(),type:w?"number":(x==null?void 0:x.type)??"text",value:kr(a,y,void 0)||(x==null?void 0:x.value)||"",ref:C=>C===null?void 0:void(i.current[y]={element:C,schema:T})}};E.useEffect(()=>{const y=Object.values(i.current).map(T=>{const w=T.element.dataset.origin?document.querySelector(`[data-target="${T.element.name}"]`):T.element,S=T.schema.safeParse(xr(w)),C=M=>{var N;const L=Q1(M.target);if(!L)return!1;const $=M.target,A=Pp(M.target)||(M.relatedTarget?xr(M.relatedTarget):""),O=T.schema.safeParse(A);if($.setAttribute("value",A),O.success)return w.setCustomValidity(""),o(V=>{if(tt.null(V))return null;const F=wn(V,L,void 0);return tt.empty(V)||tt.nil(V)||tt.empty(F)?null:F}),!1;if(w.required){const V=((N=O.error.issues[0])==null?void 0:N.message)||"";w.setCustomValidity(V),o(F=>{if(tt.null(F))return null;const z=wn(F,L,V||void 0);return tt.empty(z)?null:z})}return!1},P=new AbortController,I=w.getAttribute("data-trigger")||"blur";w.addEventListener(I,C,{signal:P.signal});const _=w.dataset.shadow?!1:w.required?!S.success:!1;return{input:T,hasInitialError:_,unsubscribe:()=>P.abort()}});return y.some(T=>T.hasInitialError)&&o(T=>T===null?{}:T),()=>y.forEach(T=>T.unsubscribe())});const g=y=>x=>{var _;x.preventDefault();const T=x.currentTarget;let w=X1(T);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(T.elements)).forEach(M=>{if(M.tagName==="SELECT"){const L=M;w=wn(w,L.name,L.value)}if(M.tagName==="INPUT"){const L=M,$=Pp(L)||(L?xr(L):"");w=wn(w,L.dataset.target||L.name,$)}});const C=Z1(w,a),P=e.safeParse(C),I=()=>{var M;O1(T),(M=n.interceptor)==null||M.clear()};if(P.success){const M=JSON.stringify(P.data);return T.setAttribute("data-json",M),(_=n.interceptor)==null||_.clear(),y==null?void 0:y(x,{form:T,event:x,reset:I,errors:[],success:!0,data:P.data,json:P.data})}return console.group("useForm error"),console.info(P),console.info(P.error.issues),console.error(P.error),console.groupEnd(),T.reportValidity(),y==null?void 0:y(x,{form:T,json:w,event:x,reset:I,data:w,success:!1,errors:P.error.issues.map(M=>({message:M.message,path:M.path.map(L=>String(L))}))})},h=y=>ad(a,y)||"",v=y=>({...y,id:t,name:t});return E.useEffect(()=>{var y;n.interceptor&&((y=n.interceptor)==null||y.set(a))},[a]),{get:h,input:m,state:a,errors:r,select:d,checkbox:p,onSubmit:g,setState:s,textarea:f,onInvalid:c,controller:v,datepicker:u,name:t,disabled:r!==null}},iR=e=>e?JSON.parse(e.getAttribute("data-json")):{},aR=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},J1={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},eS={base:"1rem",lg:"1.5rem",sm:"0.75rem","field-height":"1.5rem","field-label":"1.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},tS={normal:"1",navbar:"19",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},sR={name:"dark",zIndex:tS,rounded:J1,spacing:eS,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",muted:"hsla(0, 0%, 12%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 27%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 33%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},lR={rounded:J1,spacing:eS,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},zIndex:tS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 88%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(221, 20%, 97%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},cR=sR,uR=lR,dR=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...bs,...e.tweaks},parser:e.parser||gs.hsla,map:{...ys,...e.map}}),[e]);return b.jsx(jo.Provider,{value:t,children:e.children})},fR=()=>{const e=E.useContext(jo);return e?e.parser:gs.hsla};ne.Alert=u_,ne.Autocomplete=iL,ne.Button=go,ne.Calendar=wb,ne.Card=ud,ne.Checkbox=Mf,ne.ColType=pi,ne.Collapse=xy,ne.ComponentsProvider=dR,ne.Context=jo,ne.DatePicker=sL,ne.Dropdown=ti,ne.Empty=Sb,ne.Expand=tF,ne.FileUpload=xV,ne.Form=wV,ne.Input=ba,ne.InputFeedback=aw,ne.InputField=ya,ne.Menu=oF,ne.MenuItem=rF,ne.Modal=gF,ne.MultiSelect=_V,ne.Notifications=rD,ne.Polymorph=on,ne.Radiobox=IV,ne.RenderOnView=FT,ne.Select=ro,ne.Slider=fj,ne.Stats=oD,ne.Switch=pj,ne.Tab=sD,ne.Table=T$,ne.Tabs=iD,ne.Tag=_c,ne.TaskList=hj,ne.Textarea=mj,ne.Timeline=lD,ne.TimelineItem=Cs,ne.Toolbar=vF,ne.Tooltip=tf,ne.TransferList=yj,ne.createColumns=Hj,ne.createCssProperties=ZO,ne.createDesignTokens=ub,ne.createFormStorage=rR,ne.createOptionCols=ap,ne.createStyles=YO,ne.createTheme=KO,ne.createTokenStyles=XO,ne.css=Le,ne.defaultDarkTheme=cR,ne.defaultLightTheme=uR,ne.defaultTranslations=ys,ne.defaultTweaks=bs,ne.dispatchInput=Zh,ne.formReset=O1,ne.formToJson=X1,ne.getJsonForm=iR,ne.getSchemaShape=lo,ne.hasVerticalScroll=Xh,ne.initializeInputDataset=Si,ne.isMobile=mb,ne.isReactComponent=IT,ne.isReactFC=OT,ne.isSsr=$r,ne.mergeRefs=Fa,ne.negate=JO,ne.noop=ld,ne.parsers=gs,ne.path=ad,ne.reduceTokens=jr,ne.safeRegex=sd,ne.splitInto=hb,ne.useColorParser=fR,ne.useForm=oR,ne.useLocale=id,ne.useNotification=tD,ne.usePrevious=aR,ne.useReactive=Zb,ne.useTablePreferences=Uj,ne.useTranslations=Ot,ne.uuid=$o,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
|
|
197
197
|
//# sourceMappingURL=index.umd.js.map
|