@g4rcez/components 0.0.17 → 0.0.18
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/components/core/tag.d.ts.map +1 -1
- package/dist/components/core/tag.js +6 -9
- package/dist/components/floating/modal.d.ts.map +1 -1
- package/dist/components/floating/modal.js +8 -11
- package/dist/components/floating/tooltip.d.ts +1 -1
- package/dist/components/floating/tooltip.d.ts.map +1 -1
- package/dist/components/floating/tooltip.js +3 -3
- package/dist/index.css +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1436 -1451
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +29 -29
- package/dist/index.umd.js.map +1 -1
- package/dist/preset/preset.tailwind.js +1 -1
- package/dist/preset/src/styles/theme.d.ts.map +1 -1
- package/dist/preset/src/styles/theme.js +14 -19
- package/dist/preset/src/styles/theme.types.d.ts +1 -0
- package/dist/preset/src/styles/theme.types.d.ts.map +1 -1
- package/dist/styles/theme.d.ts.map +1 -1
- package/dist/styles/theme.js +14 -19
- package/dist/styles/theme.types.d.ts +1 -0
- package/dist/styles/theme.types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
(function(se,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],b):(se=typeof globalThis<"u"?globalThis:se||self,b(se.components={},se.React,se["react/jsx-runtime"],se.ReactDOM))})(this,function(se,b,T,of){"use strict";function sf(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const M=sf(b),af=sf(of);function Pn(t){return lf(t)?(t.nodeName||"").toLowerCase():"#document"}function At(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function pn(t){var e;return(e=(lf(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function lf(t){return t instanceof Node||t instanceof At(t).Node}function $e(t){return t instanceof Element||t instanceof At(t).Element}function et(t){return t instanceof HTMLElement||t instanceof At(t).HTMLElement}function xa(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof At(t).ShadowRoot}function bo(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=Dt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(o)}function
|
|
1
|
+
(function(se,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],b):(se=typeof globalThis<"u"?globalThis:se||self,b(se.components={},se.React,se["react/jsx-runtime"],se.ReactDOM))})(this,function(se,b,T,of){"use strict";function sf(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const M=sf(b),af=sf(of);function Pn(t){return lf(t)?(t.nodeName||"").toLowerCase():"#document"}function At(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function pn(t){var e;return(e=(lf(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function lf(t){return t instanceof Node||t instanceof At(t).Node}function $e(t){return t instanceof Element||t instanceof At(t).Element}function et(t){return t instanceof HTMLElement||t instanceof At(t).HTMLElement}function xa(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof At(t).ShadowRoot}function bo(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=Dt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(o)}function eb(t){return["table","td","th"].includes(Pn(t))}function _i(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function wa(t){const e=Sa(),n=Dt(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function tb(t){let e=mn(t);for(;et(e)&&!In(e);){if(_i(e))return null;if(wa(e))return e;e=mn(e)}return null}function Sa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function In(t){return["html","body","#document"].includes(Pn(t))}function Dt(t){return At(t).getComputedStyle(t)}function Pi(t){return $e(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function mn(t){if(Pn(t)==="html")return t;const e=t.assignedSlot||t.parentNode||xa(t)&&t.host||pn(t);return xa(e)?e.host:e}function cf(t){const e=mn(t);return In(e)?t.ownerDocument?t.ownerDocument.body:t.body:et(e)&&bo(e)?e:cf(e)}function On(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=cf(t),i=o===((r=t.ownerDocument)==null?void 0:r.body),s=At(o);return i?e.concat(s,s.visualViewport||[],bo(o)?o:[],s.frameElement&&n?On(s.frameElement):[]):e.concat(o,On(o,[],n))}function Wt(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function at(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&xa(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function Ta(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function uf(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function ff(t){return t.mozInputSource===0&&t.isTrusted?!0:Aa()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Ea(t){return nb()?!1:!Aa()&&t.width===0&&t.height===0||Aa()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function Ca(){return/apple/i.test(navigator.vendor)}function Aa(){const t=/android/i;return t.test(Ta())||t.test(uf())}function df(){return Ta().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function nb(){return uf().includes("jsdom/")}function xo(t,e){const n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)}function rb(t){return"nativeEvent"in t}function ob(t){return t.matches("html,body")}function lt(t){return(t==null?void 0:t.ownerDocument)||document}function _a(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function kn(t){return"composedPath"in t?t.composedPath()[0]:t.target}const ib="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Pa(t){return et(t)&&t.matches(ib)}function xt(t){t.preventDefault(),t.stopPropagation()}function hf(t){return t?t.getAttribute("role")==="combobox"&&Pa(t):!1}const Xt=Math.min,Mt=Math.max,Ii=Math.round,Tr=Math.floor,Dn=t=>({x:t,y:t}),sb={left:"right",right:"left",bottom:"top",top:"bottom"},ab={start:"end",end:"start"};function Ia(t,e,n){return Mt(t,Xt(e,n))}function Er(t,e){return typeof t=="function"?t(e):t}function Mn(t){return t.split("-")[0]}function Cr(t){return t.split("-")[1]}function pf(t){return t==="x"?"y":"x"}function Oa(t){return t==="y"?"height":"width"}function Jn(t){return["top","bottom"].includes(Mn(t))?"y":"x"}function ka(t){return pf(Jn(t))}function lb(t,e,n){n===void 0&&(n=!1);const r=Cr(t),o=ka(t),i=Oa(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=Oi(s)),[s,Oi(s)]}function cb(t){const e=Oi(t);return[Da(t),e,Da(e)]}function Da(t){return t.replace(/start|end/g,e=>ab[e])}function ub(t,e,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:r:e?r:o;case"left":case"right":return e?i:s;default:return[]}}function fb(t,e,n,r){const o=Cr(t);let i=ub(Mn(t),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),e&&(i=i.concat(i.map(Da)))),i}function Oi(t){return t.replace(/left|right|bottom|top/g,e=>sb[e])}function db(t){return{top:0,right:0,bottom:0,left:0,...t}}function mf(t){return typeof t!="number"?db(t):{top:t,right:t,bottom:t,left:t}}function ki(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}/*!
|
|
2
2
|
* tabbable 6.2.0
|
|
3
3
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
4
|
-
*/var db=["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])"],Di=db.join(","),gf=typeof Element>"u",Ar=gf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Mi=!gf&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Fi=function t(e,n){var r;n===void 0&&(n=!0);var o=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),i=o===""||o==="true",s=i||n&&e&&t(e.parentNode);return s},hb=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},pb=function(e,n,r){if(Fi(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(Di));return n&&Ar.call(e,Di)&&o.unshift(e),o=o.filter(r),o},mb=function t(e,n,r){for(var o=[],i=Array.from(e);i.length;){var s=i.shift();if(!Fi(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=t(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=Ar.call(s,Di);u&&r.filter(s)&&(n||!e.includes(s))&&o.push(s);var f=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),d=!Fi(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(f&&d){var h=t(f===!0?s.children:f.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:s,candidates:h})}else i.unshift.apply(i,s.children)}}return o},yf=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},vf=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||hb(e))&&!yf(e)?0:e.tabIndex},gb=function(e,n){var r=vf(e);return r<0&&n&&!yf(e)?0:r},yb=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},bf=function(e){return e.tagName==="INPUT"},vb=function(e){return bf(e)&&e.type==="hidden"},bb=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},xb=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},wb=function(e){if(!e.name)return!0;var n=e.form||Mi(e),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(e.name));else try{o=r(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=xb(o,e.form);return!i||i===e},Sb=function(e){return bf(e)&&e.type==="radio"},Tb=function(e){return Sb(e)&&!wb(e)},Eb=function(e){var n,r=e&&Mi(e),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==e){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!i&&o;){var c,u,f;r=Mi(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},xf=function(e){var n=e.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Cb=function(e,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var i=Ar.call(e,"details>summary:first-of-type"),s=i?e.parentElement:e;if(Ar.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=e;e;){var l=e.parentElement,c=Mi(e);if(l&&!l.shadowRoot&&o(l)===!0)return xf(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=a}if(Eb(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return xf(e);return!1},Ab=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.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 Ar.call(n,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}n=n.parentElement}return!1},_b=function(e,n){return!(n.disabled||Fi(n)||vb(n)||Cb(n,e)||bb(n)||Ab(n))},Ma=function(e,n){return!(Tb(n)||vf(n)<0||!_b(e,n))},Pb=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Ib=function t(e){var n=[],r=[];return e.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=gb(a,s),c=s?t(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(yb).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Li=function(e,n){n=n||{};var r;return n.getShadowRoot?r=mb([e],n.includeContainer,{filter:Ma.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Pb}):r=pb(e,n.includeContainer,Ma.bind(null,n)),Ib(r)},Ob=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Ar.call(e,Di)===!1?!1:Ma(n,e)};function wf(t,e,n){let{reference:r,floating:o}=t;const i=Jn(e),s=ka(e),a=Oa(s),l=Mn(e),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Cr(e)){case"start":h[s]-=d*(n&&c?-1:1);break;case"end":h[s]+=d*(n&&c?-1:1);break}return h}const kb=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:f}=wf(c,r,l),d=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:g,fn:v}=a[m],{x,y,data:S,reset:w}=await v({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:t,floating:e}});u=x??u,f=y??f,h={...h,[g]:{...h[g],...S}},w&&p<=50&&(p++,typeof w=="object"&&(w.placement&&(d=w.placement),w.rects&&(c=w.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):w.rects),{x:u,y:f}=wf(c,d,l)),m=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:h}};async function Fa(t,e){var n;e===void 0&&(e={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=Er(e,t),p=mf(h),g=a[d?f==="floating"?"reference":"floating":f],v=ki(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},w=ki(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:y,strategy:l}):x);return{top:(v.top-w.top+p.top)/S.y,bottom:(w.bottom-v.bottom+p.bottom)/S.y,left:(v.left-w.left+p.left)/S.x,right:(w.right-v.right+p.right)/S.x}}const Db=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=Er(t,e)||{};if(c==null)return{};const f=mf(u),d={x:n,y:r},h=ka(o),p=Oa(h),m=await s.getDimensions(c),g=h==="y",v=g?"top":"left",x=g?"bottom":"right",y=g?"clientHeight":"clientWidth",S=i.reference[p]+i.reference[h]-d[h]-i.floating[p],w=d[h]-i.reference[h],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let _=E?E[y]:0;(!_||!await(s.isElement==null?void 0:s.isElement(E)))&&(_=a.floating[y]||i.floating[p]);const I=S/2-w/2,D=_/2-m[p]/2-1,F=Xt(f[v],D),N=Xt(f[x],D),P=F,$=_-m[p]-N,O=_/2-m[p]/2+I,A=Ia(P,O,$),L=!l.arrow&&Cr(o)!=null&&O!==A&&i.reference[p]/2-(O<P?F:N)-m[p]/2<0,V=L?O<P?O-P:O-$:0;return{[h]:d[h]+V,data:{[h]:A,centerOffset:O-A-V,...L&&{alignmentOffset:V}},reset:L}}}),Mb=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=Er(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Mn(o),x=Jn(a),y=Mn(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=d||(y||!m?[Oi(a)]:lb(a)),E=p!=="none";!d&&E&&w.push(...ub(a,m,p,S));const _=[a,...w],I=await Fa(e,g),D=[];let F=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&D.push(I[v]),f){const O=ab(o,s,S);D.push(I[O[0]],I[O[1]])}if(F=[...F,{placement:o,overflows:D}],!D.every(O=>O<=0)){var N,P;const O=(((N=i.flip)==null?void 0:N.index)||0)+1,A=_[O];if(A)return{data:{index:O,overflows:F},reset:{placement:A}};let L=(P=F.filter(V=>V.overflows[0]<=0).sort((V,z)=>V.overflows[1]-z.overflows[1])[0])==null?void 0:P.placement;if(!L)switch(h){case"bestFit":{var $;const V=($=F.filter(z=>{if(E){const Z=Jn(z.placement);return Z===x||Z==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(Z=>Z>0).reduce((Z,C)=>Z+C,0)]).sort((z,Z)=>z[1]-Z[1])[0])==null?void 0:$[0];V&&(L=V);break}case"initialPlacement":L=a;break}if(o!==L)return{reset:{placement:L}}}return{}}}};async function Fb(t,e){const{placement:n,platform:r,elements:o}=t,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Mn(n),a=Cr(n),l=Jn(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,f=Er(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:d*c}:{x:d*c,y:h*u}}const Lb=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=e,l=await Fb(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Nb=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:v,y:x}=g;return{x:v,y:x}}},...l}=Er(t,e),c={x:n,y:r},u=await Fa(e,l),f=Jn(Mn(o)),d=pf(f);let h=c[d],p=c[f];if(i){const g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",x=h+u[g],y=h-u[v];h=Ia(x,h,y)}if(s){const g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",x=p+u[g],y=p-u[v];p=Ia(x,p,y)}const m=a.fn({...e,[d]:h,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},Vb=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:o,elements:i}=e,{apply:s=()=>{},...a}=Er(t,e),l=await Fa(e,a),c=Mn(n),u=Cr(n),f=Jn(n)==="y",{width:d,height:h}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const g=h-l.top-l.bottom,v=d-l.left-l.right,x=Xt(h-l[p],g),y=Xt(d-l[m],v),S=!e.middlewareData.shift;let w=x,E=y;if(f?E=u||S?Xt(y,v):v:w=u||S?Xt(x,g):g,S&&!u){const I=Mt(l.left,0),D=Mt(l.right,0),F=Mt(l.top,0),N=Mt(l.bottom,0);f?E=d-2*(I!==0||D!==0?I+D:Mt(l.left,l.right)):w=h-2*(F!==0||N!==0?F+N:Mt(l.top,l.bottom))}await s({...e,availableWidth:E,availableHeight:w});const _=await o.getDimensions(i.floating);return d!==_.width||h!==_.height?{reset:{rects:!0}}:{}}}};function Sf(t){const e=Dt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=et(t),i=o?t.offsetWidth:n,s=o?t.offsetHeight:r,a=Ii(n)!==i||Ii(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function La(t){return $e(t)?t:t.contextElement}function _r(t){const e=La(t);if(!et(e))return Dn(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:i}=Sf(e);let s=(i?Ii(n.width):n.width)/r,a=(i?Ii(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Rb=Dn(0);function Tf(t){const e=At(t);return!Sa()||!e.visualViewport?Rb:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function $b(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==At(t)?!1:e}function Qn(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=La(t);let s=Dn(1);e&&(r?$e(r)&&(s=_r(r)):s=_r(t));const a=$b(i,n,r)?Tf(i):Dn(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const d=At(i),h=r&&$e(r)?At(r):r;let p=d,m=p.frameElement;for(;m&&r&&h!==p;){const g=_r(m),v=m.getBoundingClientRect(),x=Dt(m),y=v.left+(m.clientLeft+parseFloat(x.paddingLeft))*g.x,S=v.top+(m.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,f*=g.y,l+=y,c+=S,p=At(m),m=p.frameElement}}return ki({width:u,height:f,x:l,y:c})}function jb(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const i=o==="fixed",s=pn(r),a=e?_i(e.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Dn(1);const u=Dn(0),f=et(r);if((f||!f&&!i)&&((Pn(r)!=="body"||bo(s))&&(l=Pi(r)),et(r))){const d=Qn(r);c=_r(r),u.x=d.x+r.clientLeft,u.y=d.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 Bb(t){return Array.from(t.getClientRects())}function Ef(t){return Qn(pn(t)).left+Pi(t).scrollLeft}function zb(t){const e=pn(t),n=Pi(t),r=t.ownerDocument.body,o=Mt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=Mt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ef(t);const a=-n.scrollTop;return Dt(r).direction==="rtl"&&(s+=Mt(e.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function Hb(t,e){const n=At(t),r=pn(t),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=Sa();(!c||c&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function Wb(t,e){const n=Qn(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,i=et(t)?_r(t):Dn(1),s=t.clientWidth*i.x,a=t.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Cf(t,e,n){let r;if(e==="viewport")r=Hb(t,n);else if(e==="document")r=zb(pn(t));else if($e(e))r=Wb(e,n);else{const o=Tf(t);r={...e,x:e.x-o.x,y:e.y-o.y}}return ki(r)}function Af(t,e){const n=mn(t);return n===e||!$e(n)||In(n)?!1:Dt(n).position==="fixed"||Af(n,e)}function Ub(t,e){const n=e.get(t);if(n)return n;let r=On(t,[],!1).filter(a=>$e(a)&&Pn(a)!=="body"),o=null;const i=Dt(t).position==="fixed";let s=i?mn(t):t;for(;$e(s)&&!In(s);){const a=Dt(s),l=wa(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||bo(s)&&!l&&Af(t,s))?r=r.filter(u=>u!==s):o=a,s=mn(s)}return e.set(t,r),r}function Gb(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const s=[...n==="clippingAncestors"?_i(e)?[]:Ub(e,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const f=Cf(e,u,o);return c.top=Mt(f.top,c.top),c.right=Xt(f.right,c.right),c.bottom=Xt(f.bottom,c.bottom),c.left=Mt(f.left,c.left),c},Cf(e,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Kb(t){const{width:e,height:n}=Sf(t);return{width:e,height:n}}function qb(t,e,n){const r=et(e),o=pn(e),i=n==="fixed",s=Qn(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Dn(0);if(r||!r&&!i)if((Pn(e)!=="body"||bo(o))&&(a=Pi(e)),r){const f=Qn(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else o&&(l.x=Ef(o));const c=s.left+a.scrollLeft-l.x,u=s.top+a.scrollTop-l.y;return{x:c,y:u,width:s.width,height:s.height}}function Na(t){return Dt(t).position==="static"}function _f(t,e){return!et(t)||Dt(t).position==="fixed"?null:e?e(t):t.offsetParent}function Pf(t,e){const n=At(t);if(_i(t))return n;if(!et(t)){let o=mn(t);for(;o&&!In(o);){if($e(o)&&!Na(o))return o;o=mn(o)}return n}let r=_f(t,e);for(;r&&Qv(r)&&Na(r);)r=_f(r,e);return r&&In(r)&&Na(r)&&!wa(r)?n:r||eb(t)||n}const Zb=async function(t){const e=this.getOffsetParent||Pf,n=this.getDimensions,r=await n(t.floating);return{reference:qb(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Yb(t){return Dt(t).direction==="rtl"}const Xb={convertOffsetParentRelativeRectToViewportRelativeRect:jb,getDocumentElement:pn,getClippingRect:Gb,getOffsetParent:Pf,getElementRects:Zb,getClientRects:Bb,getDimensions:Kb,getScale:_r,isElement:$e,isRTL:Yb};function Jb(t,e){let n=null,r;const o=pn(t);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:f,height:d}=t.getBoundingClientRect();if(a||e(),!f||!d)return;const h=Tr(u),p=Tr(o.clientWidth-(c+f)),m=Tr(o.clientHeight-(u+d)),g=Tr(c),x={rootMargin:-h+"px "+-p+"px "+-m+"px "+-g+"px",threshold:Mt(0,Xt(1,l))||1};let y=!0;function S(w){const E=w[0].intersectionRatio;if(E!==l){if(!y)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(t)}return s(!0),i}function Va(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=La(t),u=o||i?[...c?On(c):[],...On(e)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const f=c&&a?Jb(c,n):null;let d=-1,h=null;s&&(h=new ResizeObserver(v=>{let[x]=v;x&&x.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(e)})),n()}),c&&!l&&h.observe(c),h.observe(e));let p,m=l?Qn(t):null;l&&g();function g(){const v=Qn(t);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,p=requestAnimationFrame(g)}return n(),()=>{var v;u.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),f==null||f(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const Qb=Lb,e0=Nb,t0=Mb,n0=Vb,If=Db,r0=(t,e,n)=>{const r=new Map,o={platform:Xb,...n},i={...o.platform,_c:r};return kb(t,e,{...o,platform:i})};var Ni=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Vi(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Vi(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&t.$$typeof)&&!Vi(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function Of(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function kf(t,e){const n=Of(t);return Math.round(e*n)/n}function Df(t){const e=M.useRef(t);return Ni(()=>{e.current=t}),e}function o0(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=M.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=M.useState(r);Vi(d,r)||h(r);const[p,m]=M.useState(null),[g,v]=M.useState(null),x=M.useCallback(V=>{V!==E.current&&(E.current=V,m(V))},[]),y=M.useCallback(V=>{V!==_.current&&(_.current=V,v(V))},[]),S=i||p,w=s||g,E=M.useRef(null),_=M.useRef(null),I=M.useRef(u),D=l!=null,F=Df(l),N=Df(o),P=M.useCallback(()=>{if(!E.current||!_.current)return;const V={placement:e,strategy:n,middleware:d};N.current&&(V.platform=N.current),r0(E.current,_.current,V).then(z=>{const Z={...z,isPositioned:!0};$.current&&!Vi(I.current,Z)&&(I.current=Z,af.flushSync(()=>{f(Z)}))})},[d,e,n,N]);Ni(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(V=>({...V,isPositioned:!1})))},[c]);const $=M.useRef(!1);Ni(()=>($.current=!0,()=>{$.current=!1}),[]),Ni(()=>{if(S&&(E.current=S),w&&(_.current=w),S&&w){if(F.current)return F.current(S,w,P);P()}},[S,w,P,F,D]);const O=M.useMemo(()=>({reference:E,floating:_,setReference:x,setFloating:y}),[x,y]),A=M.useMemo(()=>({reference:S,floating:w}),[S,w]),L=M.useMemo(()=>{const V={position:n,left:0,top:0};if(!A.floating)return V;const z=kf(A.floating,u.x),Z=kf(A.floating,u.y);return a?{...V,transform:"translate("+z+"px, "+Z+"px)",...Of(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:Z}},[n,a,A.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:P,refs:O,elements:A,floatingStyles:L}),[u,P,O,A,L])}const i0=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:o}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?If({element:r.current,padding:o}).fn(n):{}:r?If({element:r,padding:o}).fn(n):{}}}},Ra=(t,e)=>({...Qb(t),options:[t,e]}),Mf=(t,e)=>({...e0(t),options:[t,e]}),Ff=(t,e)=>({...t0(t),options:[t,e]}),s0=(t,e)=>({...n0(t),options:[t,e]}),Lf=(t,e)=>({...i0(t),options:[t,e]}),Nf={...M},a0=Nf.useInsertionEffect||(t=>t());function Ft(t){const e=M.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return a0(()=>{e.current=t}),M.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}const $a="ArrowUp",wo="ArrowDown",Pr="ArrowLeft",Ir="ArrowRight";function Ri(t,e,n){return Math.floor(t/e)!==n}function So(t,e){return e<0||e>=t.current.length}function ja(t,e){return pt(t,{disabledIndices:e})}function Vf(t,e){return pt(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function pt(t,e){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=e===void 0?{}:e;const s=t.current;let a=n;do a+=r?-i:i;while(a>=0&&a<=s.length-1&&$i(s,a,o));return a}function l0(t,e){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=e,f=c;if(n.key===$a){if(u&&xt(n),c===-1)f=l;else if(f=pt(t,{startingIndex:f,amount:i,decrement:!0,disabledIndices:s}),o&&(c-i<a||f<0)){const d=c%i,h=l%i,p=l-(h-d);h===d?f=l:f=h>d?p:p-i}So(t,f)&&(f=c)}if(n.key===wo&&(u&&xt(n),c===-1?f=a:(f=pt(t,{startingIndex:c,amount:i,disabledIndices:s}),o&&c+i>l&&(f=pt(t,{startingIndex:c%i-i,amount:i,disabledIndices:s}))),So(t,f)&&(f=c)),r==="both"){const d=Tr(c/i);n.key===Ir&&(u&&xt(n),c%i!==i-1?(f=pt(t,{startingIndex:c,disabledIndices:s}),o&&Ri(f,i,d)&&(f=pt(t,{startingIndex:c-c%i-1,disabledIndices:s}))):o&&(f=pt(t,{startingIndex:c-c%i-1,disabledIndices:s})),Ri(f,i,d)&&(f=c)),n.key===Pr&&(u&&xt(n),c%i!==0?(f=pt(t,{startingIndex:c,decrement:!0,disabledIndices:s}),o&&Ri(f,i,d)&&(f=pt(t,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s}))):o&&(f=pt(t,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s})),Ri(f,i,d)&&(f=c));const h=Tr(l/i)===d;So(t,f)&&(o&&h?f=n.key===Pr?l:pt(t,{startingIndex:c-c%i-1,disabledIndices:s}):f=c)}return f}function c0(t,e,n){const r=[];let o=0;return t.forEach((i,s)=>{let{width:a,height:l}=i;if(a>e&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let f=0;f<a;f++)for(let d=0;d<l;d++)u.push(o+f+d*e);o%e+a<=e&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=s}),c=!0):o++}}),[...r]}function u0(t,e,n,r,o){if(t===-1)return-1;const i=n.indexOf(t),s=e[t];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(t)}}function f0(t,e){return e.flatMap((n,r)=>t.includes(n)?[r]:[])}function $i(t,e,n){if(n)return n.includes(e);const r=t[e];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let Rf=0;function gn(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=e;r&&cancelAnimationFrame(Rf);const i=()=>t==null?void 0:t.focus({preventScroll:n});o?i():Rf=requestAnimationFrame(i)}var je=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Or(){return Or=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Or.apply(this,arguments)}let $f=!1,d0=0;const jf=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+d0++;function h0(){const[t,e]=M.useState(()=>$f?jf():void 0);return je(()=>{t==null&&e(jf())},[]),M.useEffect(()=>{$f=!0},[]),t}const To=Nf.useId||h0;let Eo;process.env.NODE_ENV!=="production"&&(Eo=new Set);function ji(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((t=Eo)!=null&&t.has(o))){var i;(i=Eo)==null||i.add(o),console.warn(o)}}function p0(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((t=Eo)!=null&&t.has(o))){var i;(i=Eo)==null||i.add(o),console.error(o)}}const Bf=M.forwardRef(function(e,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:s=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:f,d,style:{transform:h,...p}={},...m}=e;process.env.NODE_ENV!=="production"&&(n||ji("The `ref` prop is required for `FloatingArrow`."));const g=To(),[v,x]=M.useState(!1);if(je(()=>{if(!o)return;Dt(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const y=c*2,S=y/2,w=s/2*(l/-8+1),E=a/2*l/4,[_,I]=r.split("-"),D=!!d,F=_==="top"||_==="bottom",N=u&&I==="end"?"bottom":"top";let P=u&&I==="end"?"right":"left";u&&v&&(P=I==="end"?"left":"right");const $=(i==null?void 0:i.x)!=null?u||i.x:"",O=(i==null?void 0:i.y)!=null?u||i.y:"",A=d||"M0,0"+(" H"+s)+(" L"+(s-w)+","+(a-E))+(" Q"+s/2+","+a+" "+w+","+(a-E))+" Z",L={top:D?"rotate(180deg)":"",left:D?"rotate(90deg)":"rotate(-90deg)",bottom:D?"":"rotate(180deg)",right:D?"rotate(-90deg)":"rotate(90deg)"}[_];return M.createElement("svg",Or({},m,{"aria-hidden":!0,ref:n,width:D?s:s+y,height:s,viewBox:"0 0 "+s+" "+(a>s?a:s),style:{position:"absolute",pointerEvents:"none",[P]:$,[N]:O,[_]:F||D?"100%":"calc(100% - "+y/2+"px)",transform:""+L+(h??""),...p}}),y>0&&M.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:f,strokeWidth:y+(d?0:1),d:A}),M.createElement("path",{stroke:y&&!d?m.fill:"none",d:A}),M.createElement("clipPath",{id:g},M.createElement("rect",{x:-S,y:S*(D?-1:1),width:s+y,height:s})))});function m0(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(o=>o(n))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,((r=t.get(e))==null?void 0:r.filter(o=>o!==n))||[])}}}const g0=M.createContext(null),y0=M.createContext(null),Bi=()=>{var t;return((t=M.useContext(g0))==null?void 0:t.id)||null},Co=()=>M.useContext(y0);function er(t){return"data-floating-ui-"+t}function wt(t){const e=b.useRef(t);return je(()=>{e.current=t}),e}const zf=er("safe-polygon");function Ba(t,e,n){return n&&!xo(n)?0:typeof t=="number"?t:t==null?void 0:t[e]}function v0(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=t,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:d=!0}=e,h=Co(),p=Bi(),m=wt(c),g=wt(l),v=wt(n),x=M.useRef(),y=M.useRef(-1),S=M.useRef(),w=M.useRef(-1),E=M.useRef(!0),_=M.useRef(!1),I=M.useRef(()=>{}),D=M.useCallback(()=>{var A;const L=(A=o.current.openEvent)==null?void 0:A.type;return(L==null?void 0:L.includes("mouse"))&&L!=="mousedown"},[o]);M.useEffect(()=>{if(!a)return;function A(L){let{open:V}=L;V||(clearTimeout(y.current),clearTimeout(w.current),E.current=!0)}return i.on("openchange",A),()=>{i.off("openchange",A)}},[a,i]),M.useEffect(()=>{if(!a||!m.current||!n)return;function A(V){D()&&r(!1,V,"hover")}const L=lt(s.floating).documentElement;return L.addEventListener("mouseleave",A),()=>{L.removeEventListener("mouseleave",A)}},[s.floating,n,r,a,m,D]);const F=M.useCallback(function(A,L,V){L===void 0&&(L=!0),V===void 0&&(V="hover");const z=Ba(g.current,"close",x.current);z&&!S.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>r(!1,A,V),z)):L&&(clearTimeout(y.current),r(!1,A,V))},[g,r]),N=Ft(()=>{I.current(),S.current=void 0}),P=Ft(()=>{if(_.current){const A=lt(s.floating).body;A.style.pointerEvents="",A.removeAttribute(zf),_.current=!1}});M.useEffect(()=>{if(!a)return;function A(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function L(C){if(clearTimeout(y.current),E.current=!1,u&&!xo(x.current)||f>0&&!Ba(g.current,"open"))return;const j=Ba(g.current,"open",x.current);j?y.current=window.setTimeout(()=>{v.current||r(!0,C,"hover")},j):r(!0,C,"hover")}function V(C){if(A())return;I.current();const j=lt(s.floating);if(clearTimeout(w.current),m.current&&o.current.floatingContext){n||clearTimeout(y.current),S.current=m.current({...o.current.floatingContext,tree:h,x:C.clientX,y:C.clientY,onClose(){P(),N(),F(C,!0,"safe-polygon")}});const re=S.current;j.addEventListener("mousemove",re),I.current=()=>{j.removeEventListener("mousemove",re)};return}(x.current==="touch"?!at(s.floating,C.relatedTarget):!0)&&F(C)}function z(C){A()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:C.clientX,y:C.clientY,onClose(){P(),N(),F(C)}})(C))}if($e(s.domReference)){var Z;const C=s.domReference;return n&&C.addEventListener("mouseleave",z),(Z=s.floating)==null||Z.addEventListener("mouseleave",z),d&&C.addEventListener("mousemove",L,{once:!0}),C.addEventListener("mouseenter",L),C.addEventListener("mouseleave",V),()=>{var j;n&&C.removeEventListener("mouseleave",z),(j=s.floating)==null||j.removeEventListener("mouseleave",z),d&&C.removeEventListener("mousemove",L),C.removeEventListener("mouseenter",L),C.removeEventListener("mouseleave",V)}}},[s,a,t,u,f,d,F,N,P,r,n,v,h,g,m,o]),je(()=>{var A;if(a&&n&&(A=m.current)!=null&&A.__options.blockPointerEvents&&D()){const V=lt(s.floating).body;V.setAttribute(zf,""),V.style.pointerEvents="none",_.current=!0;const z=s.floating;if($e(s.domReference)&&z){var L;const Z=s.domReference,C=h==null||(L=h.nodesRef.current.find(j=>j.id===p))==null||(L=L.context)==null?void 0:L.elements.floating;return C&&(C.style.pointerEvents=""),Z.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{Z.style.pointerEvents="",z.style.pointerEvents=""}}}},[a,n,p,s,h,m,D]),je(()=>{n||(x.current=void 0,N(),P())},[n,N,P]),M.useEffect(()=>()=>{N(),clearTimeout(y.current),clearTimeout(w.current),P()},[a,s.domReference,N,P]);const $=M.useMemo(()=>{function A(L){x.current=L.pointerType}return{onPointerDown:A,onPointerEnter:A,onMouseMove(L){const{nativeEvent:V}=L;function z(){!E.current&&!v.current&&r(!0,V,"hover")}u&&!xo(x.current)||n||f===0||(clearTimeout(w.current),x.current==="touch"?z():w.current=window.setTimeout(z,f))}}},[u,r,n,v,f]),O=M.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(A){F(A.nativeEvent,!1)}}),[F]);return M.useMemo(()=>a?{reference:$,floating:O}:{},[a,$,O])}function b0(t,e){var n;let r=[],o=(n=t.find(i=>i.id===e))==null?void 0:n.parentId;for(;o;){const i=t.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function kr(t,e){let n=t.filter(o=>{var i;return o.parentId===e&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=t.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function x0(t,e){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),kr(t,i).forEach(l=>{o(l.id,s+1)})}return o(e,0),t.find(i=>i.id===n)}let Dr=new WeakMap,zi=new WeakSet,Hi={},za=0;const w0=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Hf=t=>t&&(t.host||Hf(t.parentNode)),S0=(t,e)=>e.map(n=>{if(t.contains(n))return n;const r=Hf(n);return t.contains(r)?r:null}).filter(n=>n!=null);function T0(t,e,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=S0(e,t),a=new Set,l=new Set(s),c=[];Hi[o]||(Hi[o]=new WeakMap);const u=Hi[o];s.forEach(f),d(e),a.clear();function f(h){!h||a.has(h)||(a.add(h),h.parentNode&&f(h.parentNode))}function d(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(Pn(p)!=="script")if(a.has(p))d(p);else{const m=i?p.getAttribute(i):null,g=m!==null&&m!=="false",v=(Dr.get(p)||0)+1,x=(u.get(p)||0)+1;Dr.set(p,v),u.set(p,x),c.push(p),v===1&&g&&zi.add(p),x===1&&p.setAttribute(o,""),!g&&i&&p.setAttribute(i,"true")}})}return za++,()=>{c.forEach(h=>{const p=(Dr.get(h)||0)-1,m=(u.get(h)||0)-1;Dr.set(h,p),u.set(h,m),p||(!zi.has(h)&&i&&h.removeAttribute(i),zi.delete(h)),m||h.removeAttribute(o)}),za--,za||(Dr=new WeakMap,Dr=new WeakMap,zi=new WeakSet,Hi={})}}function Wf(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=lt(t[0]).body;return T0(t.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,e,n)}const Ao=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Uf(t,e){const n=Li(t,Ao());e==="prev"&&n.reverse();const r=n.indexOf(Wt(lt(t)));return n.slice(r+1)[0]}function Gf(){return Uf(document.body,"next")}function Kf(){return Uf(document.body,"prev")}function _o(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!at(n,r)}function E0(t){Li(t,Ao()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function C0(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Ha={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 A0;function qf(t){t.key==="Tab"&&(t.target,clearTimeout(A0))}const Wi=M.forwardRef(function(e,n){const[r,o]=M.useState();je(()=>(Ca()&&o("button"),document.addEventListener("keydown",qf),()=>{document.removeEventListener("keydown",qf)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[er("focus-guard")]:"",style:Ha};return M.createElement("span",Or({},e,i))}),Zf=M.createContext(null),Yf=er("portal");function _0(t){t===void 0&&(t={});const{id:e,root:n}=t,r=To(),o=Xf(),[i,s]=M.useState(null),a=M.useRef(null);return je(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),je(()=>{if(!r||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Yf,""),l.appendChild(c),a.current=c,s(c)},[e,r]),je(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!$e(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(Yf,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[e,n,r,o]),i}function Ui(t){const{children:e,id:n,root:r=null,preserveTabOrder:o=!0}=t,i=_0({id:n,root:r}),[s,a]=M.useState(null),l=M.useRef(null),c=M.useRef(null),u=M.useRef(null),f=M.useRef(null),d=!!s&&!s.modal&&s.open&&o&&!!(r||i);return M.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function h(p){i&&_o(p)&&(p.type==="focusin"?C0:E0)(i)}return i.addEventListener("focusin",h,!0),i.addEventListener("focusout",h,!0),()=>{i.removeEventListener("focusin",h,!0),i.removeEventListener("focusout",h,!0)}},[i,o,s==null?void 0:s.modal]),M.createElement(Zf.Provider,{value:M.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:a}),[o,i])},d&&i&&M.createElement(Wi,{"data-type":"outside",ref:l,onFocus:h=>{if(_o(h,i)){var p;(p=u.current)==null||p.focus()}else{const m=Kf()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),d&&i&&M.createElement("span",{"aria-owns":i.id,style:Ha}),i&&af.createPortal(e,i),d&&i&&M.createElement(Wi,{"data-type":"outside",ref:c,onFocus:h=>{if(_o(h,i)){var p;(p=f.current)==null||p.focus()}else{const m=Gf()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,h.nativeEvent))}}}))}const Xf=()=>M.useContext(Zf),Jf=20;let tr=[];function Wa(t){tr=tr.filter(n=>n.isConnected);let e=t;if(!(!e||Pn(e)==="body")){if(!Ob(e,Ao())){const n=Li(e,Ao())[0];n&&(e=n)}tr.push(e),tr.length>Jf&&(tr=tr.slice(-Jf))}}function Qf(){return tr.slice().reverse().find(t=>t.isConnected)}const P0=M.forwardRef(function(e,n){return M.createElement("button",Or({},e,{type:"button",ref:n,tabIndex:-1,style:Ha}))});function Ua(t){const{context:e,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=t,{open:d,refs:h,nodeId:p,onOpenChange:m,events:g,dataRef:v,floatingId:x,elements:{domReference:y,floating:S}}=e,w=typeof s=="number"&&s<0,E=hf(y)&&w,_=w0()?i:!0,I=wt(o),D=wt(s),F=wt(a),N=Co(),P=Xf(),$=M.useRef(null),O=M.useRef(null),A=M.useRef(!1),L=M.useRef(!1),V=M.useRef(-1),z=P!=null,Z=S==null?void 0:S.firstElementChild,C=(Z==null?void 0:Z.id)===x?Z:S,j=Ft(function(H){return H===void 0&&(H=C),H?Li(H,Ao()):[]}),X=Ft(H=>{const k=j(H);return I.current.map(R=>y&&R==="reference"?y:C&&R==="floating"?C:k).filter(Boolean).flat()});M.useEffect(()=>{if(r||!c)return;function H(R){if(R.key==="Tab"){at(C,Wt(lt(C)))&&j().length===0&&!E&&xt(R);const W=X(),K=kn(R);I.current[0]==="reference"&&K===y&&(xt(R),R.shiftKey?gn(W[W.length-1]):gn(W[1])),I.current[1]==="floating"&&K===C&&R.shiftKey&&(xt(R),gn(W[0]))}}const k=lt(C);return k.addEventListener("keydown",H),()=>{k.removeEventListener("keydown",H)}},[r,y,C,c,I,E,j,X]),M.useEffect(()=>{if(r||!S)return;function H(k){const R=kn(k),K=j().indexOf(R);K!==-1&&(V.current=K)}return S.addEventListener("focusin",H),()=>{S.removeEventListener("focusin",H)}},[r,S,j]),M.useEffect(()=>{if(r||!f)return;function H(){L.current=!0,setTimeout(()=>{L.current=!1})}function k(R){const W=R.relatedTarget;queueMicrotask(()=>{const K=!(at(y,W)||at(S,W)||at(W,S)||at(P==null?void 0:P.portalNode,W)||W!=null&&W.hasAttribute(er("focus-guard"))||N&&(kr(N.nodesRef.current,p).find(J=>{var ce,B;return at((ce=J.context)==null?void 0:ce.elements.floating,W)||at((B=J.context)==null?void 0:B.elements.domReference,W)})||b0(N.nodesRef.current,p).find(J=>{var ce,B;return((ce=J.context)==null?void 0:ce.elements.floating)===W||((B=J.context)==null?void 0:B.elements.domReference)===W})));if(l&&K&&Wt(lt(C))===lt(C).body){et(C)&&(C==null||C.focus());const J=V.current,ce=j(),B=ce[J]||ce[ce.length-1]||C;et(B)&&B.focus()}(E||!c)&&W&&K&&!L.current&&W!==Qf()&&(A.current=!0,m(!1,R))})}if(S&&et(y))return y.addEventListener("focusout",k),y.addEventListener("pointerdown",H),S.addEventListener("focusout",k),()=>{y.removeEventListener("focusout",k),y.removeEventListener("pointerdown",H),S.removeEventListener("focusout",k)}},[r,y,S,C,c,p,N,P,m,f,l,j,E]),M.useEffect(()=>{var H;if(r)return;const k=Array.from((P==null||(H=P.portalNode)==null?void 0:H.querySelectorAll("["+er("portal")+"]"))||[]);if(S){const R=[S,...k,$.current,O.current,I.current.includes("reference")||E?y:null].filter(K=>K!=null),W=c||E?Wf(R,_,!_):Wf(R);return()=>{W()}}},[r,y,S,c,I,P,E,_]),je(()=>{if(r||!et(C))return;const H=lt(C),k=Wt(H);queueMicrotask(()=>{const R=X(C),W=D.current,K=(typeof W=="number"?R[W]:W.current)||C,J=at(C,k);!w&&!J&&d&&gn(K,{preventScroll:K===C})})},[r,d,C,w,X,D]),je(()=>{if(r||!C)return;let H=!1;const k=lt(C),R=Wt(k);let K=v.current.openEvent;Wa(R);function J(ce){let{open:B,reason:Me,event:Ue,nested:Qe}=ce;B&&(K=Ue),Me==="escape-key"&&h.domReference.current&&Wa(h.domReference.current),Me==="hover"&&Ue.type==="mouseleave"&&(A.current=!0),Me==="outside-press"&&(Qe?(A.current=!1,H=!0):A.current=!(ff(Ue)||Ea(Ue)))}return g.on("openchange",J),()=>{g.off("openchange",J);const ce=Wt(k),B=at(S,ce)||N&&kr(N.nodesRef.current,p).some(Qe=>{var ae;return at((ae=Qe.context)==null?void 0:ae.elements.floating,ce)});(B||K&&["click","mousedown"].includes(K.type))&&h.domReference.current&&Wa(h.domReference.current);const Ue=Qf();F.current&&!A.current&&et(Ue)&&(!(Ue!==ce&&ce!==k.body)||B)&&gn(Ue,{cancelPrevious:!1,preventScroll:H})}},[r,S,C,F,v,h,g,N,p]),je(()=>{if(!r&&P)return P.setFocusManagerState({modal:c,closeOnFocusOut:f,open:d,onOpenChange:m,refs:h}),()=>{P.setFocusManagerState(null)}},[r,P,c,d,m,h,f]),je(()=>{if(r||!C||typeof MutationObserver!="function"||w)return;const H=()=>{const R=C.getAttribute("tabindex"),W=j(),K=Wt(lt(S)),J=W.indexOf(K);J!==-1&&(V.current=J),I.current.includes("floating")||K!==h.domReference.current&&W.length===0?R!=="0"&&C.setAttribute("tabindex","0"):R!=="-1"&&C.setAttribute("tabindex","-1")};H();const k=new MutationObserver(H);return k.observe(C,{childList:!0,subtree:!0,attributes:!0}),()=>{k.disconnect()}},[r,S,C,h,I,j,w]);function re(H){return r||!u||!c?null:M.createElement(P0,{ref:H==="start"?$:O,onClick:k=>m(!1,k.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&_&&(c?!E:!0)&&(z||c);return M.createElement(M.Fragment,null,ee&&M.createElement(Wi,{"data-type":"inside",ref:P==null?void 0:P.beforeInsideRef,onFocus:H=>{if(c){const R=X();gn(o[0]==="reference"?R[0]:R[R.length-1])}else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(A.current=!1,_o(H,P.portalNode)){const R=Gf()||y;R==null||R.focus()}else{var k;(k=P.beforeOutsideRef.current)==null||k.focus()}}}),!E&&re("start"),n,re("end"),ee&&M.createElement(Wi,{"data-type":"inside",ref:P==null?void 0:P.afterInsideRef,onFocus:H=>{if(c)gn(X()[0]);else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(f&&(A.current=!0),_o(H,P.portalNode)){const R=Kf()||y;R==null||R.focus()}else{var k;(k=P.afterOutsideRef.current)==null||k.focus()}}}))}const Ga=new Set,I0=M.forwardRef(function(e,n){const{lockScroll:r=!1,...o}=e,i=To();return je(()=>{if(!r)return;Ga.add(i);const s=/iP(hone|ad|od)|iOS/.test(Ta()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,f=a.left?parseFloat(a.left):window.scrollX,d=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),s){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,g=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(d-Math.floor(g))+"px",left:-(f-Math.floor(m))+"px",right:"0"})}return()=>{Ga.delete(i),Ga.size===0&&(Object.assign(a,{overflow:"",[c]:""}),s&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(f,d)))}},[i,r]),M.createElement("div",Or({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function ed(t){return et(t.target)&&t.target.tagName==="BUTTON"}function td(t){return Pa(t)}function nd(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=t,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=e,f=M.useRef(),d=M.useRef(!1),h=M.useMemo(()=>({onPointerDown(p){f.current=p.pointerType},onMouseDown(p){const m=f.current;p.button===0&&a!=="click"&&(xo(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent,"click"):(p.preventDefault(),r(!0,p.nativeEvent,"click"))))},onClick(p){const m=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}xo(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){f.current=void 0,!(p.defaultPrevented||!u||ed(p))&&(p.key===" "&&!td(i)&&(p.preventDefault(),d.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||ed(p)||td(i)||p.key===" "&&d.current&&(d.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,l]);return M.useMemo(()=>s?{reference:h}:{},[s,h])}const O0={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},k0={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},rd=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t==null?void 0:t.outsidePress)!=null?n:!0}};function Gi(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=t,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:h,capture:p}=e,m=Co(),g=Ft(typeof l=="function"?l:()=>!1),v=typeof l=="function"?g:l,x=M.useRef(!1),y=M.useRef(!1),{escapeKey:S,outsidePress:w}=rd(h),{escapeKey:E,outsidePress:_}=rd(p),I=Ft(O=>{var A;if(!n||!s||!a||O.key!=="Escape")return;const L=(A=i.current.floatingContext)==null?void 0:A.nodeId,V=m?kr(m.nodesRef.current,L):[];if(!S&&(O.stopPropagation(),V.length>0)){let z=!0;if(V.forEach(Z=>{var C;if((C=Z.context)!=null&&C.open&&!Z.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}r(!1,nb(O)?O.nativeEvent:O,"escape-key")}),D=Ft(O=>{var A;const L=()=>{var V;I(O),(V=kn(O))==null||V.removeEventListener("keydown",L)};(A=kn(O))==null||A.addEventListener("keydown",L)}),F=Ft(O=>{var A;const L=x.current;x.current=!1;const V=y.current;if(y.current=!1,c==="click"&&V||L||typeof v=="function"&&!v(O))return;const z=kn(O),Z="["+er("inert")+"]",C=lt(o.floating).querySelectorAll(Z);let j=$e(z)?z:null;for(;j&&!In(j);){const H=mn(j);if(In(H)||!$e(H))break;j=H}if(C.length&&$e(z)&&!rb(z)&&!at(z,o.floating)&&Array.from(C).every(H=>!at(j,H)))return;if(et(z)&&$){const H=z.clientWidth>0&&z.scrollWidth>z.clientWidth,k=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let R=k&&O.offsetX>z.clientWidth;if(k&&Dt(z).direction==="rtl"&&(R=O.offsetX<=z.offsetWidth-z.clientWidth),R||H&&O.offsetY>z.clientHeight)return}const X=(A=i.current.floatingContext)==null?void 0:A.nodeId,re=m&&kr(m.nodesRef.current,X).some(H=>{var k;return _a(O,(k=H.context)==null?void 0:k.elements.floating)});if(_a(O,o.floating)||_a(O,o.domReference)||re)return;const ee=m?kr(m.nodesRef.current,X):[];if(ee.length>0){let H=!0;if(ee.forEach(k=>{var R;if((R=k.context)!=null&&R.open&&!k.context.dataRef.current.__outsidePressBubbles){H=!1;return}}),!H)return}r(!1,O,"outside-press")}),N=Ft(O=>{var A;const L=()=>{var V;F(O),(V=kn(O))==null||V.removeEventListener(c,L)};(A=kn(O))==null||A.addEventListener(c,L)});M.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=w;function O(V){r(!1,V,"ancestor-scroll")}const A=lt(o.floating);a&&A.addEventListener("keydown",E?D:I,E),v&&A.addEventListener(c,_?N:F,_);let L=[];return d&&($e(o.domReference)&&(L=On(o.domReference)),$e(o.floating)&&(L=L.concat(On(o.floating))),!$e(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(On(o.reference.contextElement)))),L=L.filter(V=>{var z;return V!==((z=A.defaultView)==null?void 0:z.visualViewport)}),L.forEach(V=>{V.addEventListener("scroll",O,{passive:!0})}),()=>{a&&A.removeEventListener("keydown",E?D:I,E),v&&A.removeEventListener(c,_?N:F,_),L.forEach(V=>{V.removeEventListener("scroll",O)})}},[i,o,a,v,c,n,r,d,s,S,w,I,E,D,F,_,N]),M.useEffect(()=>{x.current=!1},[v,c]);const P=M.useMemo(()=>({onKeyDown:I,[O0[f]]:O=>{u&&r(!1,O.nativeEvent,"reference-press")}}),[I,r,u,f]),$=M.useMemo(()=>({onKeyDown:I,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[k0[c]]:()=>{x.current=!0}}),[I,c]);return M.useMemo(()=>s?{reference:P,floating:$}:{},[s,P,$])}function D0(t){const{open:e=!1,onOpenChange:n,elements:r}=t,o=To(),i=M.useRef({}),[s]=M.useState(()=>m0()),a=Bi()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!$e(h)&&p0("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=M.useState(r.reference),u=Ft((h,p,m)=>{i.current.openEvent=h?p:void 0,s.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),f=M.useMemo(()=>({setPositionReference:c}),[]),d=M.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return M.useMemo(()=>({dataRef:i,open:e,onOpenChange:u,elements:d,events:s,floatingId:o,refs:f}),[e,u,d,s,o,f])}function Ki(t){t===void 0&&(t={});const{nodeId:e}=t,n=D0({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,o=r.elements,[i,s]=M.useState(null),[a,l]=M.useState(null),u=(o==null?void 0:o.reference)||i,f=M.useRef(null),d=Co();je(()=>{u&&(f.current=u)},[u]);const h=o0({...t,elements:{...o,...a&&{reference:a}}}),p=M.useCallback(y=>{const S=$e(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(S),h.refs.setReference(S)},[h.refs]),m=M.useCallback(y=>{($e(y)||y===null)&&(f.current=y,s(y)),($e(h.refs.reference.current)||h.refs.reference.current===null||y!==null&&!$e(y))&&h.refs.setReference(y)},[h.refs]),g=M.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:f}),[h.refs,m,p]),v=M.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),x=M.useMemo(()=>({...h,...r,refs:g,elements:v,nodeId:e}),[h,g,v,e,r]);return je(()=>{r.dataRef.current.floatingContext=x;const y=d==null?void 0:d.nodesRef.current.find(S=>S.id===e);y&&(y.context=x)}),M.useMemo(()=>({...h,context:x,refs:g,elements:v}),[h,g,v,x])}function M0(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=t,{enabled:a=!0,visibleOnly:l=!0}=e,c=M.useRef(!1),u=M.useRef(),f=M.useRef(!0);M.useEffect(()=>{if(!a)return;const h=At(s.domReference);function p(){!n&&et(s.domReference)&&s.domReference===Wt(lt(s.domReference))&&(c.current=!0)}function m(){f.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[s.domReference,n,a]),M.useEffect(()=>{if(!a)return;function h(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,a]),M.useEffect(()=>()=>{clearTimeout(u.current)},[]);const d=M.useMemo(()=>({onPointerDown(h){Ea(h.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=kn(h.nativeEvent);if(l&&$e(p))try{if(Ca()&&df())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!f.current&&!Pa(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,g=$e(p)&&p.hasAttribute(er("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const x=Wt(s.domReference?s.domReference.ownerDocument:document);!p&&x===s.domReference||at((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,x)||at(s.domReference,x)||g||r(!1,m,"focus")})}}),[i,s.domReference,r,l]);return M.useMemo(()=>a?{reference:d}:{},[a,d])}const od="active",id="selected";function Ka(t,e,n){const r=new Map,o=n==="item";let i=t;if(o&&t){const{[od]:s,[id]:a,...l}=t;i=l}return{...n==="floating"&&{tabIndex:-1},...i,...e.map(s=>{const a=s?s[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[od,id].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),s[c]=function(){for(var d,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(d=r.get(c))==null?void 0:d.map(g=>g(...p)).find(g=>g!==void 0)}}}else s[c]=u}),s),{})}}function qi(t){t===void 0&&(t=[]);const e=t.map(a=>a==null?void 0:a.reference),n=t.map(a=>a==null?void 0:a.floating),r=t.map(a=>a==null?void 0:a.item),o=M.useCallback(a=>Ka(a,t,"reference"),e),i=M.useCallback(a=>Ka(a,t,"floating"),n),s=M.useCallback(a=>Ka(a,t,"item"),r);return M.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}let sd=!1;function Zi(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function ad(t,e){return Zi(e,t===$a||t===wo,t===Pr||t===Ir)}function qa(t,e,n){return Zi(e,t===wo,n?t===Pr:t===Ir)||t==="Enter"||t===" "||t===""}function F0(t,e,n){return Zi(e,n?t===Pr:t===Ir,t===wo)}function ld(t,e,n){return Zi(e,n?t===Ir:t===Pr,t===$a)}function L0(t,e){const{open:n,onOpenChange:r,elements:o}=t,{listRef:i,activeIndex:s,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:f=!1,nested:d=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:v=!0,disabledIndices:x=void 0,orientation:y="vertical",cols:S=1,scrollItemIntoView:w=!0,virtualItemRef:E,itemSizes:_,dense:I=!1}=e;process.env.NODE_ENV!=="production"&&(u&&(f||ji("`useListNavigation` looping must be enabled to allow escaping."),p||ji("`useListNavigation` must be virtual to allow escaping.")),y==="vertical"&&S>1&&ji("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const D=Bi(),F=Co(),N=Ft(a),P=M.useRef(m),$=M.useRef(c??-1),O=M.useRef(null),A=M.useRef(!0),L=M.useRef(N),V=M.useRef(!!o.floating),z=M.useRef(!1),Z=M.useRef(!1),C=wt(x),j=wt(n),X=wt(w),re=wt(o.floating),ee=wt(c),[H,k]=M.useState(),[R,W]=M.useState(),K=Ft(function(ae,_e,Te){Te===void 0&&(Te=!1);function Ae(Oe){p?(k(Oe.id),F==null||F.events.emit("virtualfocus",Oe),E&&(E.current=Oe)):gn(Oe,{preventScroll:!0,sync:df()&&Ca()?sd||z.current:!1})}const me=ae.current[_e.current];me&&Ae(me),requestAnimationFrame(()=>{const Oe=ae.current[_e.current]||me;if(!Oe)return;me||Ae(Oe);const rt=X.current;rt&&ce&&(Te||!A.current)&&(Oe.scrollIntoView==null||Oe.scrollIntoView(typeof rt=="boolean"?{block:"nearest",inline:"nearest"}:rt))})});je(()=>{document.createElement("div").focus({get preventScroll(){return sd=!0,!1}})},[]),je(()=>{l&&(n&&o.floating?P.current&&c!=null&&(Z.current=!0,$.current=c,N(c)):V.current&&($.current=-1,L.current(null)))},[l,n,o.floating,c,N]),je(()=>{if(l&&n&&o.floating)if(s==null){if(z.current=!1,ee.current!=null)return;if(V.current&&($.current=-1,K(i,$)),!V.current&&P.current&&(O.current!=null||P.current===!0&&O.current==null)){let ae=0;const _e=()=>{i.current[0]==null?(ae<2&&(ae?requestAnimationFrame:queueMicrotask)(_e),ae++):($.current=O.current==null||qa(O.current,y,h)||d?ja(i,C.current):Vf(i,C.current),O.current=null,N($.current))};_e()}}else So(i,s)||($.current=s,K(i,$,Z.current),Z.current=!1)},[l,n,o.floating,s,ee,d,i,y,h,N,K,C]),je(()=>{var ae;if(!l||o.floating||!F||p||!V.current)return;const _e=F.nodesRef.current,Te=(ae=_e.find(Oe=>Oe.id===D))==null||(ae=ae.context)==null?void 0:ae.elements.floating,Ae=Wt(lt(o.floating)),me=_e.some(Oe=>Oe.context&&at(Oe.context.elements.floating,Ae));Te&&!me&&A.current&&Te.focus({preventScroll:!0})},[l,o.floating,F,D,p]),je(()=>{if(!l||!F||!p||D)return;function ae(_e){W(_e.id),E&&(E.current=_e)}return F.events.on("virtualfocus",ae),()=>{F.events.off("virtualfocus",ae)}},[l,F,p,D,E]),je(()=>{L.current=N,V.current=!!o.floating}),je(()=>{n||(O.current=null)},[n]);const J=s!=null,ce=M.useMemo(()=>{function ae(Te){if(!n)return;const Ae=i.current.indexOf(Te);Ae!==-1&&N(Ae)}return{onFocus(Te){let{currentTarget:Ae}=Te;ae(Ae)},onClick:Te=>{let{currentTarget:Ae}=Te;return Ae.focus({preventScroll:!0})},...g&&{onMouseMove(Te){let{currentTarget:Ae}=Te;ae(Ae)},onPointerLeave(Te){let{pointerType:Ae}=Te;!A.current||Ae==="touch"||($.current=-1,K(i,$),N(null),p||gn(re.current,{preventScroll:!0}))}}}},[n,re,K,g,i,N,p]),B=Ft(ae=>{if(A.current=!1,z.current=!0,!j.current&&ae.currentTarget===re.current)return;if(d&&ld(ae.key,y,h)){xt(ae),r(!1,ae.nativeEvent,"list-navigation"),et(o.domReference)&&!p&&o.domReference.focus();return}const _e=$.current,Te=ja(i,x),Ae=Vf(i,x);if(ae.key==="Home"&&(xt(ae),$.current=Te,N($.current)),ae.key==="End"&&(xt(ae),$.current=Ae,N($.current)),S>1){const me=_||Array.from({length:i.current.length},()=>({width:1,height:1})),Oe=c0(me,S,I),rt=Oe.findIndex(q=>q!=null&&!$i(i.current,q,x)),Ct=Oe.reduce((q,oe,Ne)=>oe!=null&&!$i(i.current,oe,x)?Ne:q,-1);if($.current=Oe[l0({current:Oe.map(q=>q!=null?i.current[q]:null)},{event:ae,orientation:y,loop:f,cols:S,disabledIndices:f0([...x||i.current.map((q,oe)=>$i(i.current,oe)?oe:void 0),void 0],Oe),minIndex:rt,maxIndex:Ct,prevIndex:u0($.current>Ae?Te:$.current,me,Oe,S,ae.key===wo?"bl":ae.key===Ir?"tr":"tl"),stopEvent:!0})],N($.current),y==="both")return}if(ad(ae.key,y)){if(xt(ae),n&&!p&&Wt(ae.currentTarget.ownerDocument)===ae.currentTarget){$.current=qa(ae.key,y,h)?Te:Ae,N($.current);return}qa(ae.key,y,h)?f?$.current=_e>=Ae?u&&_e!==i.current.length?-1:Te:pt(i,{startingIndex:_e,disabledIndices:x}):$.current=Math.min(Ae,pt(i,{startingIndex:_e,disabledIndices:x})):f?$.current=_e<=Te?u&&_e!==-1?i.current.length:Ae:pt(i,{startingIndex:_e,decrement:!0,disabledIndices:x}):$.current=Math.max(Te,pt(i,{startingIndex:_e,decrement:!0,disabledIndices:x})),So(i,$.current)?N(null):N($.current)}}),Me=M.useMemo(()=>p&&n&&J&&{"aria-activedescendant":R||H},[p,n,J,R,H]),Ue=M.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...!hf(o.domReference)&&Me,onKeyDown:B,onPointerMove(){A.current=!0}}),[Me,B,o.domReference,y]),Qe=M.useMemo(()=>{const ae=C.current,_e=i.current.find(me=>(me==null?void 0:me.id)===H);function Te(me){m==="auto"&&ff(me.nativeEvent)&&(P.current=!0)}function Ae(me){P.current=m,m==="auto"&&Ea(me.nativeEvent)&&(P.current=!0)}return{...Me,onKeyDown(me){A.current=!1;const Oe=me.key.indexOf("Arrow")===0,rt=F0(me.key,y,h),Ct=ld(me.key,y,h),q=ad(me.key,y),oe=(d?rt:q)||me.key==="Enter"||me.key.trim()==="";if(p&&n){const dn=F==null?void 0:F.nodesRef.current.find(hn=>hn.parentId==null),ot=F&&dn?x0(F.nodesRef.current,dn.id):null;if(Oe&&ot&&E){const hn=new KeyboardEvent("keydown",{key:me.key,bubbles:!0});if(rt||Ct){var Ne,qe;const Ai=((Ne=ot.context)==null?void 0:Ne.elements.domReference)===me.currentTarget,vo=Ct&&!Ai?(qe=ot.context)==null?void 0:qe.elements.domReference:rt?_e:null;vo&&(xt(me),vo.dispatchEvent(hn),W(void 0))}if(q&&ot.context&&ot.context.open&&ot.parentId&&me.currentTarget!==ot.context.elements.domReference){var ht;xt(me),(ht=ot.context.elements.domReference)==null||ht.dispatchEvent(hn);return}}return B(me)}if(!(!n&&!v&&Oe)){if(oe&&(O.current=d&&q?null:me.key),d){rt&&(xt(me),n?($.current=ja(i,ae),N($.current)):r(!0,me.nativeEvent,"list-navigation"));return}q&&(c!=null&&($.current=c),xt(me),!n&&v?r(!0,me.nativeEvent,"list-navigation"):B(me),n&&N($.current))}},onFocus(){n&&!p&&N(null)},onPointerDown:Ae,onMouseDown:Te,onClick:Te}},[H,Me,B,C,m,i,d,N,r,n,v,y,h,c,F,p,E]);return M.useMemo(()=>l?{reference:Qe,floating:Ue,item:ce}:{},[l,Qe,Ue,ce])}const N0=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Yi(t,e){var n;e===void 0&&(e={});const{open:r,floatingId:o}=t,{enabled:i=!0,role:s="dialog"}=e,a=(n=N0.get(s))!=null?n:s,l=To(),u=Bi()!=null,f=M.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,s]),d=M.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,s]),h=M.useCallback(p=>{let{active:m,selected:g}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(s){case"select":return{...v,"aria-selected":m&&g};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,s]);return M.useMemo(()=>i?{reference:f,floating:d,item:h}:{},[i,f,d,h])}const cd=t=>t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,n)=>(n?"-":"")+e.toLowerCase());function Mr(t,e){return typeof t=="function"?t(e):t}function V0(t,e){const[n,r]=M.useState(t);return t&&!n&&r(!0),M.useEffect(()=>{if(!t&&n){const o=setTimeout(()=>r(!1),e);return()=>clearTimeout(o)}},[t,n,e]),n}function R0(t,e){e===void 0&&(e={});const{open:n,elements:{floating:r}}=t,{duration:o=250}=e,s=(typeof o=="number"?o:o.close)||0,[a,l]=M.useState("unmounted"),c=V0(n,s);return!c&&a==="close"&&l("unmounted"),je(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function $0(t,e){e===void 0&&(e={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=e,a=t.placement,l=a.split("-")[0],c=M.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",f=(u?s:s.open)||0,d=(u?s:s.close)||0,[h,p]=M.useState(()=>({...Mr(i,c),...Mr(n,c)})),{isMounted:m,status:g}=R0(t,{duration:s}),v=wt(n),x=wt(r),y=wt(o),S=wt(i);return je(()=>{const w=Mr(v.current,c),E=Mr(y.current,c),_=Mr(S.current,c),I=Mr(x.current,c)||Object.keys(w).reduce((D,F)=>(D[F]="",D),{});if(g==="initial"&&p(D=>({transitionProperty:D.transitionProperty,..._,...w})),g==="open"&&p({transitionProperty:Object.keys(I).map(cd).join(","),transitionDuration:f+"ms",..._,...I}),g==="close"){const D=E||w;p({transitionProperty:Object.keys(D).map(cd).join(","),transitionDuration:d+"ms",..._,...D})}},[d,y,v,x,S,f,g,c]),{isMounted:m,styles:h}}class Xi{static getDescendantProperty(e,n,r=[]){let o,i,s,a,l,c;if(n){if(s=n.indexOf("."),s===-1?o=n:(o=n.slice(0,s),i=n.slice(s+1)),a=e[o],a!==null&&typeof a<"u")if(!i&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)Xi.getDescendantProperty(a[l],i,r);else i&&Xi.getDescendantProperty(a,i,r)}else r.push(e);return r}}class Fr{constructor(e=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=e,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(e=""){if(e==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const i=Fr.isMatch(o,e,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const s=Xi.getDescendantProperty(o,this.keys[i]);let a=!1;for(let l=0;l<s.length;l++){const c=Fr.isMatch(s[l],e,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(e,n,r){e=String(e),n=String(n),r||(e=e.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Fr.nearestIndexesFor(e,n);return o?e===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(e,n){const r=n.split("");let o=[];return Fr.indexesOfFirstLetter(e,n).forEach((s,a)=>{let l=s+1;o[a]=[s];for(let c=1;c<r.length;c++){const u=r[c];if(l=e.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(s=>s!==!1),o.length?o.sort((s,a)=>s.length===1?s[0]-a[0]:(s=s[s.length-1]-s[0],a=a[a.length-1]-a[0],s-a))[0]:!1}static indexesOfFirstLetter(e,n){const r=n[0];return e.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}/**
|
|
4
|
+
*/var hb=["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])"],Di=hb.join(","),gf=typeof Element>"u",Ar=gf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Mi=!gf&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Fi=function t(e,n){var r;n===void 0&&(n=!0);var o=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),i=o===""||o==="true",s=i||n&&e&&t(e.parentNode);return s},pb=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},mb=function(e,n,r){if(Fi(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(Di));return n&&Ar.call(e,Di)&&o.unshift(e),o=o.filter(r),o},gb=function t(e,n,r){for(var o=[],i=Array.from(e);i.length;){var s=i.shift();if(!Fi(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=t(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=Ar.call(s,Di);u&&r.filter(s)&&(n||!e.includes(s))&&o.push(s);var f=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),d=!Fi(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(f&&d){var h=t(f===!0?s.children:f.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:s,candidates:h})}else i.unshift.apply(i,s.children)}}return o},yf=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},vf=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||pb(e))&&!yf(e)?0:e.tabIndex},yb=function(e,n){var r=vf(e);return r<0&&n&&!yf(e)?0:r},vb=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},bf=function(e){return e.tagName==="INPUT"},bb=function(e){return bf(e)&&e.type==="hidden"},xb=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},wb=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},Sb=function(e){if(!e.name)return!0;var n=e.form||Mi(e),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(e.name));else try{o=r(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=wb(o,e.form);return!i||i===e},Tb=function(e){return bf(e)&&e.type==="radio"},Eb=function(e){return Tb(e)&&!Sb(e)},Cb=function(e){var n,r=e&&Mi(e),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==e){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!i&&o;){var c,u,f;r=Mi(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},xf=function(e){var n=e.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Ab=function(e,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var i=Ar.call(e,"details>summary:first-of-type"),s=i?e.parentElement:e;if(Ar.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=e;e;){var l=e.parentElement,c=Mi(e);if(l&&!l.shadowRoot&&o(l)===!0)return xf(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=a}if(Cb(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return xf(e);return!1},_b=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.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 Ar.call(n,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}n=n.parentElement}return!1},Pb=function(e,n){return!(n.disabled||Fi(n)||bb(n)||Ab(n,e)||xb(n)||_b(n))},Ma=function(e,n){return!(Eb(n)||vf(n)<0||!Pb(e,n))},Ib=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Ob=function t(e){var n=[],r=[];return e.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=yb(a,s),c=s?t(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(vb).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Li=function(e,n){n=n||{};var r;return n.getShadowRoot?r=gb([e],n.includeContainer,{filter:Ma.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Ib}):r=mb(e,n.includeContainer,Ma.bind(null,n)),Ob(r)},kb=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Ar.call(e,Di)===!1?!1:Ma(n,e)};function wf(t,e,n){let{reference:r,floating:o}=t;const i=Jn(e),s=ka(e),a=Oa(s),l=Mn(e),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Cr(e)){case"start":h[s]-=d*(n&&c?-1:1);break;case"end":h[s]+=d*(n&&c?-1:1);break}return h}const Db=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:f}=wf(c,r,l),d=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:g,fn:v}=a[m],{x,y,data:S,reset:w}=await v({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:t,floating:e}});u=x??u,f=y??f,h={...h,[g]:{...h[g],...S}},w&&p<=50&&(p++,typeof w=="object"&&(w.placement&&(d=w.placement),w.rects&&(c=w.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):w.rects),{x:u,y:f}=wf(c,d,l)),m=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:h}};async function Fa(t,e){var n;e===void 0&&(e={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=Er(e,t),p=mf(h),g=a[d?f==="floating"?"reference":"floating":f],v=ki(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},w=ki(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:y,strategy:l}):x);return{top:(v.top-w.top+p.top)/S.y,bottom:(w.bottom-v.bottom+p.bottom)/S.y,left:(v.left-w.left+p.left)/S.x,right:(w.right-v.right+p.right)/S.x}}const Mb=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=Er(t,e)||{};if(c==null)return{};const f=mf(u),d={x:n,y:r},h=ka(o),p=Oa(h),m=await s.getDimensions(c),g=h==="y",v=g?"top":"left",x=g?"bottom":"right",y=g?"clientHeight":"clientWidth",S=i.reference[p]+i.reference[h]-d[h]-i.floating[p],w=d[h]-i.reference[h],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let _=E?E[y]:0;(!_||!await(s.isElement==null?void 0:s.isElement(E)))&&(_=a.floating[y]||i.floating[p]);const I=S/2-w/2,D=_/2-m[p]/2-1,F=Xt(f[v],D),N=Xt(f[x],D),P=F,$=_-m[p]-N,O=_/2-m[p]/2+I,A=Ia(P,O,$),L=!l.arrow&&Cr(o)!=null&&O!==A&&i.reference[p]/2-(O<P?F:N)-m[p]/2<0,V=L?O<P?O-P:O-$:0;return{[h]:d[h]+V,data:{[h]:A,centerOffset:O-A-V,...L&&{alignmentOffset:V}},reset:L}}}),Fb=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=Er(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Mn(o),x=Jn(a),y=Mn(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=d||(y||!m?[Oi(a)]:cb(a)),E=p!=="none";!d&&E&&w.push(...fb(a,m,p,S));const _=[a,...w],I=await Fa(e,g),D=[];let F=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&D.push(I[v]),f){const O=lb(o,s,S);D.push(I[O[0]],I[O[1]])}if(F=[...F,{placement:o,overflows:D}],!D.every(O=>O<=0)){var N,P;const O=(((N=i.flip)==null?void 0:N.index)||0)+1,A=_[O];if(A)return{data:{index:O,overflows:F},reset:{placement:A}};let L=(P=F.filter(V=>V.overflows[0]<=0).sort((V,z)=>V.overflows[1]-z.overflows[1])[0])==null?void 0:P.placement;if(!L)switch(h){case"bestFit":{var $;const V=($=F.filter(z=>{if(E){const Z=Jn(z.placement);return Z===x||Z==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(Z=>Z>0).reduce((Z,C)=>Z+C,0)]).sort((z,Z)=>z[1]-Z[1])[0])==null?void 0:$[0];V&&(L=V);break}case"initialPlacement":L=a;break}if(o!==L)return{reset:{placement:L}}}return{}}}};async function Lb(t,e){const{placement:n,platform:r,elements:o}=t,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Mn(n),a=Cr(n),l=Jn(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,f=Er(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:d*c}:{x:d*c,y:h*u}}const Nb=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=e,l=await Lb(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Vb=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:v,y:x}=g;return{x:v,y:x}}},...l}=Er(t,e),c={x:n,y:r},u=await Fa(e,l),f=Jn(Mn(o)),d=pf(f);let h=c[d],p=c[f];if(i){const g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",x=h+u[g],y=h-u[v];h=Ia(x,h,y)}if(s){const g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",x=p+u[g],y=p-u[v];p=Ia(x,p,y)}const m=a.fn({...e,[d]:h,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},Rb=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:o,elements:i}=e,{apply:s=()=>{},...a}=Er(t,e),l=await Fa(e,a),c=Mn(n),u=Cr(n),f=Jn(n)==="y",{width:d,height:h}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const g=h-l.top-l.bottom,v=d-l.left-l.right,x=Xt(h-l[p],g),y=Xt(d-l[m],v),S=!e.middlewareData.shift;let w=x,E=y;if(f?E=u||S?Xt(y,v):v:w=u||S?Xt(x,g):g,S&&!u){const I=Mt(l.left,0),D=Mt(l.right,0),F=Mt(l.top,0),N=Mt(l.bottom,0);f?E=d-2*(I!==0||D!==0?I+D:Mt(l.left,l.right)):w=h-2*(F!==0||N!==0?F+N:Mt(l.top,l.bottom))}await s({...e,availableWidth:E,availableHeight:w});const _=await o.getDimensions(i.floating);return d!==_.width||h!==_.height?{reset:{rects:!0}}:{}}}};function Sf(t){const e=Dt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=et(t),i=o?t.offsetWidth:n,s=o?t.offsetHeight:r,a=Ii(n)!==i||Ii(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function La(t){return $e(t)?t:t.contextElement}function _r(t){const e=La(t);if(!et(e))return Dn(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:i}=Sf(e);let s=(i?Ii(n.width):n.width)/r,a=(i?Ii(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const $b=Dn(0);function Tf(t){const e=At(t);return!Sa()||!e.visualViewport?$b:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function jb(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==At(t)?!1:e}function Qn(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=La(t);let s=Dn(1);e&&(r?$e(r)&&(s=_r(r)):s=_r(t));const a=jb(i,n,r)?Tf(i):Dn(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const d=At(i),h=r&&$e(r)?At(r):r;let p=d,m=p.frameElement;for(;m&&r&&h!==p;){const g=_r(m),v=m.getBoundingClientRect(),x=Dt(m),y=v.left+(m.clientLeft+parseFloat(x.paddingLeft))*g.x,S=v.top+(m.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,f*=g.y,l+=y,c+=S,p=At(m),m=p.frameElement}}return ki({width:u,height:f,x:l,y:c})}function Bb(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const i=o==="fixed",s=pn(r),a=e?_i(e.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Dn(1);const u=Dn(0),f=et(r);if((f||!f&&!i)&&((Pn(r)!=="body"||bo(s))&&(l=Pi(r)),et(r))){const d=Qn(r);c=_r(r),u.x=d.x+r.clientLeft,u.y=d.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 zb(t){return Array.from(t.getClientRects())}function Ef(t){return Qn(pn(t)).left+Pi(t).scrollLeft}function Hb(t){const e=pn(t),n=Pi(t),r=t.ownerDocument.body,o=Mt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=Mt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ef(t);const a=-n.scrollTop;return Dt(r).direction==="rtl"&&(s+=Mt(e.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function Wb(t,e){const n=At(t),r=pn(t),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=Sa();(!c||c&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function Ub(t,e){const n=Qn(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,i=et(t)?_r(t):Dn(1),s=t.clientWidth*i.x,a=t.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Cf(t,e,n){let r;if(e==="viewport")r=Wb(t,n);else if(e==="document")r=Hb(pn(t));else if($e(e))r=Ub(e,n);else{const o=Tf(t);r={...e,x:e.x-o.x,y:e.y-o.y}}return ki(r)}function Af(t,e){const n=mn(t);return n===e||!$e(n)||In(n)?!1:Dt(n).position==="fixed"||Af(n,e)}function Gb(t,e){const n=e.get(t);if(n)return n;let r=On(t,[],!1).filter(a=>$e(a)&&Pn(a)!=="body"),o=null;const i=Dt(t).position==="fixed";let s=i?mn(t):t;for(;$e(s)&&!In(s);){const a=Dt(s),l=wa(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||bo(s)&&!l&&Af(t,s))?r=r.filter(u=>u!==s):o=a,s=mn(s)}return e.set(t,r),r}function Kb(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const s=[...n==="clippingAncestors"?_i(e)?[]:Gb(e,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const f=Cf(e,u,o);return c.top=Mt(f.top,c.top),c.right=Xt(f.right,c.right),c.bottom=Xt(f.bottom,c.bottom),c.left=Mt(f.left,c.left),c},Cf(e,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function qb(t){const{width:e,height:n}=Sf(t);return{width:e,height:n}}function Zb(t,e,n){const r=et(e),o=pn(e),i=n==="fixed",s=Qn(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Dn(0);if(r||!r&&!i)if((Pn(e)!=="body"||bo(o))&&(a=Pi(e)),r){const f=Qn(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else o&&(l.x=Ef(o));const c=s.left+a.scrollLeft-l.x,u=s.top+a.scrollTop-l.y;return{x:c,y:u,width:s.width,height:s.height}}function Na(t){return Dt(t).position==="static"}function _f(t,e){return!et(t)||Dt(t).position==="fixed"?null:e?e(t):t.offsetParent}function Pf(t,e){const n=At(t);if(_i(t))return n;if(!et(t)){let o=mn(t);for(;o&&!In(o);){if($e(o)&&!Na(o))return o;o=mn(o)}return n}let r=_f(t,e);for(;r&&eb(r)&&Na(r);)r=_f(r,e);return r&&In(r)&&Na(r)&&!wa(r)?n:r||tb(t)||n}const Yb=async function(t){const e=this.getOffsetParent||Pf,n=this.getDimensions,r=await n(t.floating);return{reference:Zb(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Xb(t){return Dt(t).direction==="rtl"}const Jb={convertOffsetParentRelativeRectToViewportRelativeRect:Bb,getDocumentElement:pn,getClippingRect:Kb,getOffsetParent:Pf,getElementRects:Yb,getClientRects:zb,getDimensions:qb,getScale:_r,isElement:$e,isRTL:Xb};function Qb(t,e){let n=null,r;const o=pn(t);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:f,height:d}=t.getBoundingClientRect();if(a||e(),!f||!d)return;const h=Tr(u),p=Tr(o.clientWidth-(c+f)),m=Tr(o.clientHeight-(u+d)),g=Tr(c),x={rootMargin:-h+"px "+-p+"px "+-m+"px "+-g+"px",threshold:Mt(0,Xt(1,l))||1};let y=!0;function S(w){const E=w[0].intersectionRatio;if(E!==l){if(!y)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(t)}return s(!0),i}function Va(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=La(t),u=o||i?[...c?On(c):[],...On(e)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const f=c&&a?Qb(c,n):null;let d=-1,h=null;s&&(h=new ResizeObserver(v=>{let[x]=v;x&&x.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(e)})),n()}),c&&!l&&h.observe(c),h.observe(e));let p,m=l?Qn(t):null;l&&g();function g(){const v=Qn(t);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,p=requestAnimationFrame(g)}return n(),()=>{var v;u.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),f==null||f(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const e0=Nb,t0=Vb,n0=Fb,r0=Rb,If=Mb,o0=(t,e,n)=>{const r=new Map,o={platform:Jb,...n},i={...o.platform,_c:r};return Db(t,e,{...o,platform:i})};var Ni=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Vi(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Vi(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&t.$$typeof)&&!Vi(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function Of(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function kf(t,e){const n=Of(t);return Math.round(e*n)/n}function Df(t){const e=M.useRef(t);return Ni(()=>{e.current=t}),e}function i0(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=M.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=M.useState(r);Vi(d,r)||h(r);const[p,m]=M.useState(null),[g,v]=M.useState(null),x=M.useCallback(V=>{V!==E.current&&(E.current=V,m(V))},[]),y=M.useCallback(V=>{V!==_.current&&(_.current=V,v(V))},[]),S=i||p,w=s||g,E=M.useRef(null),_=M.useRef(null),I=M.useRef(u),D=l!=null,F=Df(l),N=Df(o),P=M.useCallback(()=>{if(!E.current||!_.current)return;const V={placement:e,strategy:n,middleware:d};N.current&&(V.platform=N.current),o0(E.current,_.current,V).then(z=>{const Z={...z,isPositioned:!0};$.current&&!Vi(I.current,Z)&&(I.current=Z,af.flushSync(()=>{f(Z)}))})},[d,e,n,N]);Ni(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(V=>({...V,isPositioned:!1})))},[c]);const $=M.useRef(!1);Ni(()=>($.current=!0,()=>{$.current=!1}),[]),Ni(()=>{if(S&&(E.current=S),w&&(_.current=w),S&&w){if(F.current)return F.current(S,w,P);P()}},[S,w,P,F,D]);const O=M.useMemo(()=>({reference:E,floating:_,setReference:x,setFloating:y}),[x,y]),A=M.useMemo(()=>({reference:S,floating:w}),[S,w]),L=M.useMemo(()=>{const V={position:n,left:0,top:0};if(!A.floating)return V;const z=kf(A.floating,u.x),Z=kf(A.floating,u.y);return a?{...V,transform:"translate("+z+"px, "+Z+"px)",...Of(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:Z}},[n,a,A.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:P,refs:O,elements:A,floatingStyles:L}),[u,P,O,A,L])}const s0=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:o}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?If({element:r.current,padding:o}).fn(n):{}:r?If({element:r,padding:o}).fn(n):{}}}},Ra=(t,e)=>({...e0(t),options:[t,e]}),Mf=(t,e)=>({...t0(t),options:[t,e]}),Ff=(t,e)=>({...n0(t),options:[t,e]}),a0=(t,e)=>({...r0(t),options:[t,e]}),Lf=(t,e)=>({...s0(t),options:[t,e]}),Nf={...M},l0=Nf.useInsertionEffect||(t=>t());function Ft(t){const e=M.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return l0(()=>{e.current=t}),M.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}const $a="ArrowUp",wo="ArrowDown",Pr="ArrowLeft",Ir="ArrowRight";function Ri(t,e,n){return Math.floor(t/e)!==n}function So(t,e){return e<0||e>=t.current.length}function ja(t,e){return pt(t,{disabledIndices:e})}function Vf(t,e){return pt(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function pt(t,e){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=e===void 0?{}:e;const s=t.current;let a=n;do a+=r?-i:i;while(a>=0&&a<=s.length-1&&$i(s,a,o));return a}function c0(t,e){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=e,f=c;if(n.key===$a){if(u&&xt(n),c===-1)f=l;else if(f=pt(t,{startingIndex:f,amount:i,decrement:!0,disabledIndices:s}),o&&(c-i<a||f<0)){const d=c%i,h=l%i,p=l-(h-d);h===d?f=l:f=h>d?p:p-i}So(t,f)&&(f=c)}if(n.key===wo&&(u&&xt(n),c===-1?f=a:(f=pt(t,{startingIndex:c,amount:i,disabledIndices:s}),o&&c+i>l&&(f=pt(t,{startingIndex:c%i-i,amount:i,disabledIndices:s}))),So(t,f)&&(f=c)),r==="both"){const d=Tr(c/i);n.key===Ir&&(u&&xt(n),c%i!==i-1?(f=pt(t,{startingIndex:c,disabledIndices:s}),o&&Ri(f,i,d)&&(f=pt(t,{startingIndex:c-c%i-1,disabledIndices:s}))):o&&(f=pt(t,{startingIndex:c-c%i-1,disabledIndices:s})),Ri(f,i,d)&&(f=c)),n.key===Pr&&(u&&xt(n),c%i!==0?(f=pt(t,{startingIndex:c,decrement:!0,disabledIndices:s}),o&&Ri(f,i,d)&&(f=pt(t,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s}))):o&&(f=pt(t,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s})),Ri(f,i,d)&&(f=c));const h=Tr(l/i)===d;So(t,f)&&(o&&h?f=n.key===Pr?l:pt(t,{startingIndex:c-c%i-1,disabledIndices:s}):f=c)}return f}function u0(t,e,n){const r=[];let o=0;return t.forEach((i,s)=>{let{width:a,height:l}=i;if(a>e&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let f=0;f<a;f++)for(let d=0;d<l;d++)u.push(o+f+d*e);o%e+a<=e&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=s}),c=!0):o++}}),[...r]}function f0(t,e,n,r,o){if(t===-1)return-1;const i=n.indexOf(t),s=e[t];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(t)}}function d0(t,e){return e.flatMap((n,r)=>t.includes(n)?[r]:[])}function $i(t,e,n){if(n)return n.includes(e);const r=t[e];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let Rf=0;function gn(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=e;r&&cancelAnimationFrame(Rf);const i=()=>t==null?void 0:t.focus({preventScroll:n});o?i():Rf=requestAnimationFrame(i)}var je=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Or(){return Or=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Or.apply(this,arguments)}let $f=!1,h0=0;const jf=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+h0++;function p0(){const[t,e]=M.useState(()=>$f?jf():void 0);return je(()=>{t==null&&e(jf())},[]),M.useEffect(()=>{$f=!0},[]),t}const To=Nf.useId||p0;let Eo;process.env.NODE_ENV!=="production"&&(Eo=new Set);function ji(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((t=Eo)!=null&&t.has(o))){var i;(i=Eo)==null||i.add(o),console.warn(o)}}function m0(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((t=Eo)!=null&&t.has(o))){var i;(i=Eo)==null||i.add(o),console.error(o)}}const Bf=M.forwardRef(function(e,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:s=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:f,d,style:{transform:h,...p}={},...m}=e;process.env.NODE_ENV!=="production"&&(n||ji("The `ref` prop is required for `FloatingArrow`."));const g=To(),[v,x]=M.useState(!1);if(je(()=>{if(!o)return;Dt(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const y=c*2,S=y/2,w=s/2*(l/-8+1),E=a/2*l/4,[_,I]=r.split("-"),D=!!d,F=_==="top"||_==="bottom",N=u&&I==="end"?"bottom":"top";let P=u&&I==="end"?"right":"left";u&&v&&(P=I==="end"?"left":"right");const $=(i==null?void 0:i.x)!=null?u||i.x:"",O=(i==null?void 0:i.y)!=null?u||i.y:"",A=d||"M0,0"+(" H"+s)+(" L"+(s-w)+","+(a-E))+(" Q"+s/2+","+a+" "+w+","+(a-E))+" Z",L={top:D?"rotate(180deg)":"",left:D?"rotate(90deg)":"rotate(-90deg)",bottom:D?"":"rotate(180deg)",right:D?"rotate(-90deg)":"rotate(90deg)"}[_];return M.createElement("svg",Or({},m,{"aria-hidden":!0,ref:n,width:D?s:s+y,height:s,viewBox:"0 0 "+s+" "+(a>s?a:s),style:{position:"absolute",pointerEvents:"none",[P]:$,[N]:O,[_]:F||D?"100%":"calc(100% - "+y/2+"px)",transform:""+L+(h??""),...p}}),y>0&&M.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:f,strokeWidth:y+(d?0:1),d:A}),M.createElement("path",{stroke:y&&!d?m.fill:"none",d:A}),M.createElement("clipPath",{id:g},M.createElement("rect",{x:-S,y:S*(D?-1:1),width:s+y,height:s})))});function g0(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(o=>o(n))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,((r=t.get(e))==null?void 0:r.filter(o=>o!==n))||[])}}}const y0=M.createContext(null),v0=M.createContext(null),Bi=()=>{var t;return((t=M.useContext(y0))==null?void 0:t.id)||null},Co=()=>M.useContext(v0);function er(t){return"data-floating-ui-"+t}function wt(t){const e=b.useRef(t);return je(()=>{e.current=t}),e}const zf=er("safe-polygon");function Ba(t,e,n){return n&&!xo(n)?0:typeof t=="number"?t:t==null?void 0:t[e]}function b0(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=t,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:d=!0}=e,h=Co(),p=Bi(),m=wt(c),g=wt(l),v=wt(n),x=M.useRef(),y=M.useRef(-1),S=M.useRef(),w=M.useRef(-1),E=M.useRef(!0),_=M.useRef(!1),I=M.useRef(()=>{}),D=M.useCallback(()=>{var A;const L=(A=o.current.openEvent)==null?void 0:A.type;return(L==null?void 0:L.includes("mouse"))&&L!=="mousedown"},[o]);M.useEffect(()=>{if(!a)return;function A(L){let{open:V}=L;V||(clearTimeout(y.current),clearTimeout(w.current),E.current=!0)}return i.on("openchange",A),()=>{i.off("openchange",A)}},[a,i]),M.useEffect(()=>{if(!a||!m.current||!n)return;function A(V){D()&&r(!1,V,"hover")}const L=lt(s.floating).documentElement;return L.addEventListener("mouseleave",A),()=>{L.removeEventListener("mouseleave",A)}},[s.floating,n,r,a,m,D]);const F=M.useCallback(function(A,L,V){L===void 0&&(L=!0),V===void 0&&(V="hover");const z=Ba(g.current,"close",x.current);z&&!S.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>r(!1,A,V),z)):L&&(clearTimeout(y.current),r(!1,A,V))},[g,r]),N=Ft(()=>{I.current(),S.current=void 0}),P=Ft(()=>{if(_.current){const A=lt(s.floating).body;A.style.pointerEvents="",A.removeAttribute(zf),_.current=!1}});M.useEffect(()=>{if(!a)return;function A(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function L(C){if(clearTimeout(y.current),E.current=!1,u&&!xo(x.current)||f>0&&!Ba(g.current,"open"))return;const j=Ba(g.current,"open",x.current);j?y.current=window.setTimeout(()=>{v.current||r(!0,C,"hover")},j):r(!0,C,"hover")}function V(C){if(A())return;I.current();const j=lt(s.floating);if(clearTimeout(w.current),m.current&&o.current.floatingContext){n||clearTimeout(y.current),S.current=m.current({...o.current.floatingContext,tree:h,x:C.clientX,y:C.clientY,onClose(){P(),N(),F(C,!0,"safe-polygon")}});const re=S.current;j.addEventListener("mousemove",re),I.current=()=>{j.removeEventListener("mousemove",re)};return}(x.current==="touch"?!at(s.floating,C.relatedTarget):!0)&&F(C)}function z(C){A()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:C.clientX,y:C.clientY,onClose(){P(),N(),F(C)}})(C))}if($e(s.domReference)){var Z;const C=s.domReference;return n&&C.addEventListener("mouseleave",z),(Z=s.floating)==null||Z.addEventListener("mouseleave",z),d&&C.addEventListener("mousemove",L,{once:!0}),C.addEventListener("mouseenter",L),C.addEventListener("mouseleave",V),()=>{var j;n&&C.removeEventListener("mouseleave",z),(j=s.floating)==null||j.removeEventListener("mouseleave",z),d&&C.removeEventListener("mousemove",L),C.removeEventListener("mouseenter",L),C.removeEventListener("mouseleave",V)}}},[s,a,t,u,f,d,F,N,P,r,n,v,h,g,m,o]),je(()=>{var A;if(a&&n&&(A=m.current)!=null&&A.__options.blockPointerEvents&&D()){const V=lt(s.floating).body;V.setAttribute(zf,""),V.style.pointerEvents="none",_.current=!0;const z=s.floating;if($e(s.domReference)&&z){var L;const Z=s.domReference,C=h==null||(L=h.nodesRef.current.find(j=>j.id===p))==null||(L=L.context)==null?void 0:L.elements.floating;return C&&(C.style.pointerEvents=""),Z.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{Z.style.pointerEvents="",z.style.pointerEvents=""}}}},[a,n,p,s,h,m,D]),je(()=>{n||(x.current=void 0,N(),P())},[n,N,P]),M.useEffect(()=>()=>{N(),clearTimeout(y.current),clearTimeout(w.current),P()},[a,s.domReference,N,P]);const $=M.useMemo(()=>{function A(L){x.current=L.pointerType}return{onPointerDown:A,onPointerEnter:A,onMouseMove(L){const{nativeEvent:V}=L;function z(){!E.current&&!v.current&&r(!0,V,"hover")}u&&!xo(x.current)||n||f===0||(clearTimeout(w.current),x.current==="touch"?z():w.current=window.setTimeout(z,f))}}},[u,r,n,v,f]),O=M.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(A){F(A.nativeEvent,!1)}}),[F]);return M.useMemo(()=>a?{reference:$,floating:O}:{},[a,$,O])}function x0(t,e){var n;let r=[],o=(n=t.find(i=>i.id===e))==null?void 0:n.parentId;for(;o;){const i=t.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function kr(t,e){let n=t.filter(o=>{var i;return o.parentId===e&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=t.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function w0(t,e){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),kr(t,i).forEach(l=>{o(l.id,s+1)})}return o(e,0),t.find(i=>i.id===n)}let Dr=new WeakMap,zi=new WeakSet,Hi={},za=0;const S0=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Hf=t=>t&&(t.host||Hf(t.parentNode)),T0=(t,e)=>e.map(n=>{if(t.contains(n))return n;const r=Hf(n);return t.contains(r)?r:null}).filter(n=>n!=null);function E0(t,e,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=T0(e,t),a=new Set,l=new Set(s),c=[];Hi[o]||(Hi[o]=new WeakMap);const u=Hi[o];s.forEach(f),d(e),a.clear();function f(h){!h||a.has(h)||(a.add(h),h.parentNode&&f(h.parentNode))}function d(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(Pn(p)!=="script")if(a.has(p))d(p);else{const m=i?p.getAttribute(i):null,g=m!==null&&m!=="false",v=(Dr.get(p)||0)+1,x=(u.get(p)||0)+1;Dr.set(p,v),u.set(p,x),c.push(p),v===1&&g&&zi.add(p),x===1&&p.setAttribute(o,""),!g&&i&&p.setAttribute(i,"true")}})}return za++,()=>{c.forEach(h=>{const p=(Dr.get(h)||0)-1,m=(u.get(h)||0)-1;Dr.set(h,p),u.set(h,m),p||(!zi.has(h)&&i&&h.removeAttribute(i),zi.delete(h)),m||h.removeAttribute(o)}),za--,za||(Dr=new WeakMap,Dr=new WeakMap,zi=new WeakSet,Hi={})}}function Wf(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=lt(t[0]).body;return E0(t.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,e,n)}const Ao=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Uf(t,e){const n=Li(t,Ao());e==="prev"&&n.reverse();const r=n.indexOf(Wt(lt(t)));return n.slice(r+1)[0]}function Gf(){return Uf(document.body,"next")}function Kf(){return Uf(document.body,"prev")}function _o(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!at(n,r)}function C0(t){Li(t,Ao()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function A0(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Ha={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 _0;function qf(t){t.key==="Tab"&&(t.target,clearTimeout(_0))}const Wi=M.forwardRef(function(e,n){const[r,o]=M.useState();je(()=>(Ca()&&o("button"),document.addEventListener("keydown",qf),()=>{document.removeEventListener("keydown",qf)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[er("focus-guard")]:"",style:Ha};return M.createElement("span",Or({},e,i))}),Zf=M.createContext(null),Yf=er("portal");function P0(t){t===void 0&&(t={});const{id:e,root:n}=t,r=To(),o=Xf(),[i,s]=M.useState(null),a=M.useRef(null);return je(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),je(()=>{if(!r||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Yf,""),l.appendChild(c),a.current=c,s(c)},[e,r]),je(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!$e(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(Yf,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[e,n,r,o]),i}function Ui(t){const{children:e,id:n,root:r=null,preserveTabOrder:o=!0}=t,i=P0({id:n,root:r}),[s,a]=M.useState(null),l=M.useRef(null),c=M.useRef(null),u=M.useRef(null),f=M.useRef(null),d=!!s&&!s.modal&&s.open&&o&&!!(r||i);return M.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function h(p){i&&_o(p)&&(p.type==="focusin"?A0:C0)(i)}return i.addEventListener("focusin",h,!0),i.addEventListener("focusout",h,!0),()=>{i.removeEventListener("focusin",h,!0),i.removeEventListener("focusout",h,!0)}},[i,o,s==null?void 0:s.modal]),M.createElement(Zf.Provider,{value:M.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:a}),[o,i])},d&&i&&M.createElement(Wi,{"data-type":"outside",ref:l,onFocus:h=>{if(_o(h,i)){var p;(p=u.current)==null||p.focus()}else{const m=Kf()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),d&&i&&M.createElement("span",{"aria-owns":i.id,style:Ha}),i&&af.createPortal(e,i),d&&i&&M.createElement(Wi,{"data-type":"outside",ref:c,onFocus:h=>{if(_o(h,i)){var p;(p=f.current)==null||p.focus()}else{const m=Gf()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,h.nativeEvent))}}}))}const Xf=()=>M.useContext(Zf),Jf=20;let tr=[];function Wa(t){tr=tr.filter(n=>n.isConnected);let e=t;if(!(!e||Pn(e)==="body")){if(!kb(e,Ao())){const n=Li(e,Ao())[0];n&&(e=n)}tr.push(e),tr.length>Jf&&(tr=tr.slice(-Jf))}}function Qf(){return tr.slice().reverse().find(t=>t.isConnected)}const I0=M.forwardRef(function(e,n){return M.createElement("button",Or({},e,{type:"button",ref:n,tabIndex:-1,style:Ha}))});function Ua(t){const{context:e,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=t,{open:d,refs:h,nodeId:p,onOpenChange:m,events:g,dataRef:v,floatingId:x,elements:{domReference:y,floating:S}}=e,w=typeof s=="number"&&s<0,E=hf(y)&&w,_=S0()?i:!0,I=wt(o),D=wt(s),F=wt(a),N=Co(),P=Xf(),$=M.useRef(null),O=M.useRef(null),A=M.useRef(!1),L=M.useRef(!1),V=M.useRef(-1),z=P!=null,Z=S==null?void 0:S.firstElementChild,C=(Z==null?void 0:Z.id)===x?Z:S,j=Ft(function(H){return H===void 0&&(H=C),H?Li(H,Ao()):[]}),X=Ft(H=>{const k=j(H);return I.current.map(R=>y&&R==="reference"?y:C&&R==="floating"?C:k).filter(Boolean).flat()});M.useEffect(()=>{if(r||!c)return;function H(R){if(R.key==="Tab"){at(C,Wt(lt(C)))&&j().length===0&&!E&&xt(R);const W=X(),K=kn(R);I.current[0]==="reference"&&K===y&&(xt(R),R.shiftKey?gn(W[W.length-1]):gn(W[1])),I.current[1]==="floating"&&K===C&&R.shiftKey&&(xt(R),gn(W[0]))}}const k=lt(C);return k.addEventListener("keydown",H),()=>{k.removeEventListener("keydown",H)}},[r,y,C,c,I,E,j,X]),M.useEffect(()=>{if(r||!S)return;function H(k){const R=kn(k),K=j().indexOf(R);K!==-1&&(V.current=K)}return S.addEventListener("focusin",H),()=>{S.removeEventListener("focusin",H)}},[r,S,j]),M.useEffect(()=>{if(r||!f)return;function H(){L.current=!0,setTimeout(()=>{L.current=!1})}function k(R){const W=R.relatedTarget;queueMicrotask(()=>{const K=!(at(y,W)||at(S,W)||at(W,S)||at(P==null?void 0:P.portalNode,W)||W!=null&&W.hasAttribute(er("focus-guard"))||N&&(kr(N.nodesRef.current,p).find(J=>{var ce,B;return at((ce=J.context)==null?void 0:ce.elements.floating,W)||at((B=J.context)==null?void 0:B.elements.domReference,W)})||x0(N.nodesRef.current,p).find(J=>{var ce,B;return((ce=J.context)==null?void 0:ce.elements.floating)===W||((B=J.context)==null?void 0:B.elements.domReference)===W})));if(l&&K&&Wt(lt(C))===lt(C).body){et(C)&&(C==null||C.focus());const J=V.current,ce=j(),B=ce[J]||ce[ce.length-1]||C;et(B)&&B.focus()}(E||!c)&&W&&K&&!L.current&&W!==Qf()&&(A.current=!0,m(!1,R))})}if(S&&et(y))return y.addEventListener("focusout",k),y.addEventListener("pointerdown",H),S.addEventListener("focusout",k),()=>{y.removeEventListener("focusout",k),y.removeEventListener("pointerdown",H),S.removeEventListener("focusout",k)}},[r,y,S,C,c,p,N,P,m,f,l,j,E]),M.useEffect(()=>{var H;if(r)return;const k=Array.from((P==null||(H=P.portalNode)==null?void 0:H.querySelectorAll("["+er("portal")+"]"))||[]);if(S){const R=[S,...k,$.current,O.current,I.current.includes("reference")||E?y:null].filter(K=>K!=null),W=c||E?Wf(R,_,!_):Wf(R);return()=>{W()}}},[r,y,S,c,I,P,E,_]),je(()=>{if(r||!et(C))return;const H=lt(C),k=Wt(H);queueMicrotask(()=>{const R=X(C),W=D.current,K=(typeof W=="number"?R[W]:W.current)||C,J=at(C,k);!w&&!J&&d&&gn(K,{preventScroll:K===C})})},[r,d,C,w,X,D]),je(()=>{if(r||!C)return;let H=!1;const k=lt(C),R=Wt(k);let K=v.current.openEvent;Wa(R);function J(ce){let{open:B,reason:Me,event:Ue,nested:Qe}=ce;B&&(K=Ue),Me==="escape-key"&&h.domReference.current&&Wa(h.domReference.current),Me==="hover"&&Ue.type==="mouseleave"&&(A.current=!0),Me==="outside-press"&&(Qe?(A.current=!1,H=!0):A.current=!(ff(Ue)||Ea(Ue)))}return g.on("openchange",J),()=>{g.off("openchange",J);const ce=Wt(k),B=at(S,ce)||N&&kr(N.nodesRef.current,p).some(Qe=>{var ae;return at((ae=Qe.context)==null?void 0:ae.elements.floating,ce)});(B||K&&["click","mousedown"].includes(K.type))&&h.domReference.current&&Wa(h.domReference.current);const Ue=Qf();F.current&&!A.current&&et(Ue)&&(!(Ue!==ce&&ce!==k.body)||B)&&gn(Ue,{cancelPrevious:!1,preventScroll:H})}},[r,S,C,F,v,h,g,N,p]),je(()=>{if(!r&&P)return P.setFocusManagerState({modal:c,closeOnFocusOut:f,open:d,onOpenChange:m,refs:h}),()=>{P.setFocusManagerState(null)}},[r,P,c,d,m,h,f]),je(()=>{if(r||!C||typeof MutationObserver!="function"||w)return;const H=()=>{const R=C.getAttribute("tabindex"),W=j(),K=Wt(lt(S)),J=W.indexOf(K);J!==-1&&(V.current=J),I.current.includes("floating")||K!==h.domReference.current&&W.length===0?R!=="0"&&C.setAttribute("tabindex","0"):R!=="-1"&&C.setAttribute("tabindex","-1")};H();const k=new MutationObserver(H);return k.observe(C,{childList:!0,subtree:!0,attributes:!0}),()=>{k.disconnect()}},[r,S,C,h,I,j,w]);function re(H){return r||!u||!c?null:M.createElement(I0,{ref:H==="start"?$:O,onClick:k=>m(!1,k.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&_&&(c?!E:!0)&&(z||c);return M.createElement(M.Fragment,null,ee&&M.createElement(Wi,{"data-type":"inside",ref:P==null?void 0:P.beforeInsideRef,onFocus:H=>{if(c){const R=X();gn(o[0]==="reference"?R[0]:R[R.length-1])}else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(A.current=!1,_o(H,P.portalNode)){const R=Gf()||y;R==null||R.focus()}else{var k;(k=P.beforeOutsideRef.current)==null||k.focus()}}}),!E&&re("start"),n,re("end"),ee&&M.createElement(Wi,{"data-type":"inside",ref:P==null?void 0:P.afterInsideRef,onFocus:H=>{if(c)gn(X()[0]);else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(f&&(A.current=!0),_o(H,P.portalNode)){const R=Kf()||y;R==null||R.focus()}else{var k;(k=P.afterOutsideRef.current)==null||k.focus()}}}))}const Ga=new Set,O0=M.forwardRef(function(e,n){const{lockScroll:r=!1,...o}=e,i=To();return je(()=>{if(!r)return;Ga.add(i);const s=/iP(hone|ad|od)|iOS/.test(Ta()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,f=a.left?parseFloat(a.left):window.scrollX,d=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),s){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,g=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(d-Math.floor(g))+"px",left:-(f-Math.floor(m))+"px",right:"0"})}return()=>{Ga.delete(i),Ga.size===0&&(Object.assign(a,{overflow:"",[c]:""}),s&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(f,d)))}},[i,r]),M.createElement("div",Or({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function ed(t){return et(t.target)&&t.target.tagName==="BUTTON"}function td(t){return Pa(t)}function nd(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=t,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=e,f=M.useRef(),d=M.useRef(!1),h=M.useMemo(()=>({onPointerDown(p){f.current=p.pointerType},onMouseDown(p){const m=f.current;p.button===0&&a!=="click"&&(xo(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent,"click"):(p.preventDefault(),r(!0,p.nativeEvent,"click"))))},onClick(p){const m=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}xo(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){f.current=void 0,!(p.defaultPrevented||!u||ed(p))&&(p.key===" "&&!td(i)&&(p.preventDefault(),d.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||ed(p)||td(i)||p.key===" "&&d.current&&(d.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,l]);return M.useMemo(()=>s?{reference:h}:{},[s,h])}const k0={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},D0={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},rd=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t==null?void 0:t.outsidePress)!=null?n:!0}};function Gi(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=t,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:h,capture:p}=e,m=Co(),g=Ft(typeof l=="function"?l:()=>!1),v=typeof l=="function"?g:l,x=M.useRef(!1),y=M.useRef(!1),{escapeKey:S,outsidePress:w}=rd(h),{escapeKey:E,outsidePress:_}=rd(p),I=Ft(O=>{var A;if(!n||!s||!a||O.key!=="Escape")return;const L=(A=i.current.floatingContext)==null?void 0:A.nodeId,V=m?kr(m.nodesRef.current,L):[];if(!S&&(O.stopPropagation(),V.length>0)){let z=!0;if(V.forEach(Z=>{var C;if((C=Z.context)!=null&&C.open&&!Z.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}r(!1,rb(O)?O.nativeEvent:O,"escape-key")}),D=Ft(O=>{var A;const L=()=>{var V;I(O),(V=kn(O))==null||V.removeEventListener("keydown",L)};(A=kn(O))==null||A.addEventListener("keydown",L)}),F=Ft(O=>{var A;const L=x.current;x.current=!1;const V=y.current;if(y.current=!1,c==="click"&&V||L||typeof v=="function"&&!v(O))return;const z=kn(O),Z="["+er("inert")+"]",C=lt(o.floating).querySelectorAll(Z);let j=$e(z)?z:null;for(;j&&!In(j);){const H=mn(j);if(In(H)||!$e(H))break;j=H}if(C.length&&$e(z)&&!ob(z)&&!at(z,o.floating)&&Array.from(C).every(H=>!at(j,H)))return;if(et(z)&&$){const H=z.clientWidth>0&&z.scrollWidth>z.clientWidth,k=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let R=k&&O.offsetX>z.clientWidth;if(k&&Dt(z).direction==="rtl"&&(R=O.offsetX<=z.offsetWidth-z.clientWidth),R||H&&O.offsetY>z.clientHeight)return}const X=(A=i.current.floatingContext)==null?void 0:A.nodeId,re=m&&kr(m.nodesRef.current,X).some(H=>{var k;return _a(O,(k=H.context)==null?void 0:k.elements.floating)});if(_a(O,o.floating)||_a(O,o.domReference)||re)return;const ee=m?kr(m.nodesRef.current,X):[];if(ee.length>0){let H=!0;if(ee.forEach(k=>{var R;if((R=k.context)!=null&&R.open&&!k.context.dataRef.current.__outsidePressBubbles){H=!1;return}}),!H)return}r(!1,O,"outside-press")}),N=Ft(O=>{var A;const L=()=>{var V;F(O),(V=kn(O))==null||V.removeEventListener(c,L)};(A=kn(O))==null||A.addEventListener(c,L)});M.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=w;function O(V){r(!1,V,"ancestor-scroll")}const A=lt(o.floating);a&&A.addEventListener("keydown",E?D:I,E),v&&A.addEventListener(c,_?N:F,_);let L=[];return d&&($e(o.domReference)&&(L=On(o.domReference)),$e(o.floating)&&(L=L.concat(On(o.floating))),!$e(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(On(o.reference.contextElement)))),L=L.filter(V=>{var z;return V!==((z=A.defaultView)==null?void 0:z.visualViewport)}),L.forEach(V=>{V.addEventListener("scroll",O,{passive:!0})}),()=>{a&&A.removeEventListener("keydown",E?D:I,E),v&&A.removeEventListener(c,_?N:F,_),L.forEach(V=>{V.removeEventListener("scroll",O)})}},[i,o,a,v,c,n,r,d,s,S,w,I,E,D,F,_,N]),M.useEffect(()=>{x.current=!1},[v,c]);const P=M.useMemo(()=>({onKeyDown:I,[k0[f]]:O=>{u&&r(!1,O.nativeEvent,"reference-press")}}),[I,r,u,f]),$=M.useMemo(()=>({onKeyDown:I,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[D0[c]]:()=>{x.current=!0}}),[I,c]);return M.useMemo(()=>s?{reference:P,floating:$}:{},[s,P,$])}function M0(t){const{open:e=!1,onOpenChange:n,elements:r}=t,o=To(),i=M.useRef({}),[s]=M.useState(()=>g0()),a=Bi()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!$e(h)&&m0("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=M.useState(r.reference),u=Ft((h,p,m)=>{i.current.openEvent=h?p:void 0,s.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),f=M.useMemo(()=>({setPositionReference:c}),[]),d=M.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return M.useMemo(()=>({dataRef:i,open:e,onOpenChange:u,elements:d,events:s,floatingId:o,refs:f}),[e,u,d,s,o,f])}function Ki(t){t===void 0&&(t={});const{nodeId:e}=t,n=M0({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,o=r.elements,[i,s]=M.useState(null),[a,l]=M.useState(null),u=(o==null?void 0:o.reference)||i,f=M.useRef(null),d=Co();je(()=>{u&&(f.current=u)},[u]);const h=i0({...t,elements:{...o,...a&&{reference:a}}}),p=M.useCallback(y=>{const S=$e(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(S),h.refs.setReference(S)},[h.refs]),m=M.useCallback(y=>{($e(y)||y===null)&&(f.current=y,s(y)),($e(h.refs.reference.current)||h.refs.reference.current===null||y!==null&&!$e(y))&&h.refs.setReference(y)},[h.refs]),g=M.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:f}),[h.refs,m,p]),v=M.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),x=M.useMemo(()=>({...h,...r,refs:g,elements:v,nodeId:e}),[h,g,v,e,r]);return je(()=>{r.dataRef.current.floatingContext=x;const y=d==null?void 0:d.nodesRef.current.find(S=>S.id===e);y&&(y.context=x)}),M.useMemo(()=>({...h,context:x,refs:g,elements:v}),[h,g,v,x])}function F0(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=t,{enabled:a=!0,visibleOnly:l=!0}=e,c=M.useRef(!1),u=M.useRef(),f=M.useRef(!0);M.useEffect(()=>{if(!a)return;const h=At(s.domReference);function p(){!n&&et(s.domReference)&&s.domReference===Wt(lt(s.domReference))&&(c.current=!0)}function m(){f.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[s.domReference,n,a]),M.useEffect(()=>{if(!a)return;function h(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,a]),M.useEffect(()=>()=>{clearTimeout(u.current)},[]);const d=M.useMemo(()=>({onPointerDown(h){Ea(h.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=kn(h.nativeEvent);if(l&&$e(p))try{if(Ca()&&df())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!f.current&&!Pa(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,g=$e(p)&&p.hasAttribute(er("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const x=Wt(s.domReference?s.domReference.ownerDocument:document);!p&&x===s.domReference||at((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,x)||at(s.domReference,x)||g||r(!1,m,"focus")})}}),[i,s.domReference,r,l]);return M.useMemo(()=>a?{reference:d}:{},[a,d])}const od="active",id="selected";function Ka(t,e,n){const r=new Map,o=n==="item";let i=t;if(o&&t){const{[od]:s,[id]:a,...l}=t;i=l}return{...n==="floating"&&{tabIndex:-1},...i,...e.map(s=>{const a=s?s[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[od,id].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),s[c]=function(){for(var d,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(d=r.get(c))==null?void 0:d.map(g=>g(...p)).find(g=>g!==void 0)}}}else s[c]=u}),s),{})}}function qi(t){t===void 0&&(t=[]);const e=t.map(a=>a==null?void 0:a.reference),n=t.map(a=>a==null?void 0:a.floating),r=t.map(a=>a==null?void 0:a.item),o=M.useCallback(a=>Ka(a,t,"reference"),e),i=M.useCallback(a=>Ka(a,t,"floating"),n),s=M.useCallback(a=>Ka(a,t,"item"),r);return M.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}let sd=!1;function Zi(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function ad(t,e){return Zi(e,t===$a||t===wo,t===Pr||t===Ir)}function qa(t,e,n){return Zi(e,t===wo,n?t===Pr:t===Ir)||t==="Enter"||t===" "||t===""}function L0(t,e,n){return Zi(e,n?t===Pr:t===Ir,t===wo)}function ld(t,e,n){return Zi(e,n?t===Ir:t===Pr,t===$a)}function N0(t,e){const{open:n,onOpenChange:r,elements:o}=t,{listRef:i,activeIndex:s,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:f=!1,nested:d=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:v=!0,disabledIndices:x=void 0,orientation:y="vertical",cols:S=1,scrollItemIntoView:w=!0,virtualItemRef:E,itemSizes:_,dense:I=!1}=e;process.env.NODE_ENV!=="production"&&(u&&(f||ji("`useListNavigation` looping must be enabled to allow escaping."),p||ji("`useListNavigation` must be virtual to allow escaping.")),y==="vertical"&&S>1&&ji("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const D=Bi(),F=Co(),N=Ft(a),P=M.useRef(m),$=M.useRef(c??-1),O=M.useRef(null),A=M.useRef(!0),L=M.useRef(N),V=M.useRef(!!o.floating),z=M.useRef(!1),Z=M.useRef(!1),C=wt(x),j=wt(n),X=wt(w),re=wt(o.floating),ee=wt(c),[H,k]=M.useState(),[R,W]=M.useState(),K=Ft(function(ae,_e,Te){Te===void 0&&(Te=!1);function Ae(Oe){p?(k(Oe.id),F==null||F.events.emit("virtualfocus",Oe),E&&(E.current=Oe)):gn(Oe,{preventScroll:!0,sync:df()&&Ca()?sd||z.current:!1})}const me=ae.current[_e.current];me&&Ae(me),requestAnimationFrame(()=>{const Oe=ae.current[_e.current]||me;if(!Oe)return;me||Ae(Oe);const rt=X.current;rt&&ce&&(Te||!A.current)&&(Oe.scrollIntoView==null||Oe.scrollIntoView(typeof rt=="boolean"?{block:"nearest",inline:"nearest"}:rt))})});je(()=>{document.createElement("div").focus({get preventScroll(){return sd=!0,!1}})},[]),je(()=>{l&&(n&&o.floating?P.current&&c!=null&&(Z.current=!0,$.current=c,N(c)):V.current&&($.current=-1,L.current(null)))},[l,n,o.floating,c,N]),je(()=>{if(l&&n&&o.floating)if(s==null){if(z.current=!1,ee.current!=null)return;if(V.current&&($.current=-1,K(i,$)),!V.current&&P.current&&(O.current!=null||P.current===!0&&O.current==null)){let ae=0;const _e=()=>{i.current[0]==null?(ae<2&&(ae?requestAnimationFrame:queueMicrotask)(_e),ae++):($.current=O.current==null||qa(O.current,y,h)||d?ja(i,C.current):Vf(i,C.current),O.current=null,N($.current))};_e()}}else So(i,s)||($.current=s,K(i,$,Z.current),Z.current=!1)},[l,n,o.floating,s,ee,d,i,y,h,N,K,C]),je(()=>{var ae;if(!l||o.floating||!F||p||!V.current)return;const _e=F.nodesRef.current,Te=(ae=_e.find(Oe=>Oe.id===D))==null||(ae=ae.context)==null?void 0:ae.elements.floating,Ae=Wt(lt(o.floating)),me=_e.some(Oe=>Oe.context&&at(Oe.context.elements.floating,Ae));Te&&!me&&A.current&&Te.focus({preventScroll:!0})},[l,o.floating,F,D,p]),je(()=>{if(!l||!F||!p||D)return;function ae(_e){W(_e.id),E&&(E.current=_e)}return F.events.on("virtualfocus",ae),()=>{F.events.off("virtualfocus",ae)}},[l,F,p,D,E]),je(()=>{L.current=N,V.current=!!o.floating}),je(()=>{n||(O.current=null)},[n]);const J=s!=null,ce=M.useMemo(()=>{function ae(Te){if(!n)return;const Ae=i.current.indexOf(Te);Ae!==-1&&N(Ae)}return{onFocus(Te){let{currentTarget:Ae}=Te;ae(Ae)},onClick:Te=>{let{currentTarget:Ae}=Te;return Ae.focus({preventScroll:!0})},...g&&{onMouseMove(Te){let{currentTarget:Ae}=Te;ae(Ae)},onPointerLeave(Te){let{pointerType:Ae}=Te;!A.current||Ae==="touch"||($.current=-1,K(i,$),N(null),p||gn(re.current,{preventScroll:!0}))}}}},[n,re,K,g,i,N,p]),B=Ft(ae=>{if(A.current=!1,z.current=!0,!j.current&&ae.currentTarget===re.current)return;if(d&&ld(ae.key,y,h)){xt(ae),r(!1,ae.nativeEvent,"list-navigation"),et(o.domReference)&&!p&&o.domReference.focus();return}const _e=$.current,Te=ja(i,x),Ae=Vf(i,x);if(ae.key==="Home"&&(xt(ae),$.current=Te,N($.current)),ae.key==="End"&&(xt(ae),$.current=Ae,N($.current)),S>1){const me=_||Array.from({length:i.current.length},()=>({width:1,height:1})),Oe=u0(me,S,I),rt=Oe.findIndex(q=>q!=null&&!$i(i.current,q,x)),Ct=Oe.reduce((q,oe,Ne)=>oe!=null&&!$i(i.current,oe,x)?Ne:q,-1);if($.current=Oe[c0({current:Oe.map(q=>q!=null?i.current[q]:null)},{event:ae,orientation:y,loop:f,cols:S,disabledIndices:d0([...x||i.current.map((q,oe)=>$i(i.current,oe)?oe:void 0),void 0],Oe),minIndex:rt,maxIndex:Ct,prevIndex:f0($.current>Ae?Te:$.current,me,Oe,S,ae.key===wo?"bl":ae.key===Ir?"tr":"tl"),stopEvent:!0})],N($.current),y==="both")return}if(ad(ae.key,y)){if(xt(ae),n&&!p&&Wt(ae.currentTarget.ownerDocument)===ae.currentTarget){$.current=qa(ae.key,y,h)?Te:Ae,N($.current);return}qa(ae.key,y,h)?f?$.current=_e>=Ae?u&&_e!==i.current.length?-1:Te:pt(i,{startingIndex:_e,disabledIndices:x}):$.current=Math.min(Ae,pt(i,{startingIndex:_e,disabledIndices:x})):f?$.current=_e<=Te?u&&_e!==-1?i.current.length:Ae:pt(i,{startingIndex:_e,decrement:!0,disabledIndices:x}):$.current=Math.max(Te,pt(i,{startingIndex:_e,decrement:!0,disabledIndices:x})),So(i,$.current)?N(null):N($.current)}}),Me=M.useMemo(()=>p&&n&&J&&{"aria-activedescendant":R||H},[p,n,J,R,H]),Ue=M.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...!hf(o.domReference)&&Me,onKeyDown:B,onPointerMove(){A.current=!0}}),[Me,B,o.domReference,y]),Qe=M.useMemo(()=>{const ae=C.current,_e=i.current.find(me=>(me==null?void 0:me.id)===H);function Te(me){m==="auto"&&ff(me.nativeEvent)&&(P.current=!0)}function Ae(me){P.current=m,m==="auto"&&Ea(me.nativeEvent)&&(P.current=!0)}return{...Me,onKeyDown(me){A.current=!1;const Oe=me.key.indexOf("Arrow")===0,rt=L0(me.key,y,h),Ct=ld(me.key,y,h),q=ad(me.key,y),oe=(d?rt:q)||me.key==="Enter"||me.key.trim()==="";if(p&&n){const dn=F==null?void 0:F.nodesRef.current.find(hn=>hn.parentId==null),ot=F&&dn?w0(F.nodesRef.current,dn.id):null;if(Oe&&ot&&E){const hn=new KeyboardEvent("keydown",{key:me.key,bubbles:!0});if(rt||Ct){var Ne,qe;const Ai=((Ne=ot.context)==null?void 0:Ne.elements.domReference)===me.currentTarget,vo=Ct&&!Ai?(qe=ot.context)==null?void 0:qe.elements.domReference:rt?_e:null;vo&&(xt(me),vo.dispatchEvent(hn),W(void 0))}if(q&&ot.context&&ot.context.open&&ot.parentId&&me.currentTarget!==ot.context.elements.domReference){var ht;xt(me),(ht=ot.context.elements.domReference)==null||ht.dispatchEvent(hn);return}}return B(me)}if(!(!n&&!v&&Oe)){if(oe&&(O.current=d&&q?null:me.key),d){rt&&(xt(me),n?($.current=ja(i,ae),N($.current)):r(!0,me.nativeEvent,"list-navigation"));return}q&&(c!=null&&($.current=c),xt(me),!n&&v?r(!0,me.nativeEvent,"list-navigation"):B(me),n&&N($.current))}},onFocus(){n&&!p&&N(null)},onPointerDown:Ae,onMouseDown:Te,onClick:Te}},[H,Me,B,C,m,i,d,N,r,n,v,y,h,c,F,p,E]);return M.useMemo(()=>l?{reference:Qe,floating:Ue,item:ce}:{},[l,Qe,Ue,ce])}const V0=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Yi(t,e){var n;e===void 0&&(e={});const{open:r,floatingId:o}=t,{enabled:i=!0,role:s="dialog"}=e,a=(n=V0.get(s))!=null?n:s,l=To(),u=Bi()!=null,f=M.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,s]),d=M.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,s]),h=M.useCallback(p=>{let{active:m,selected:g}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(s){case"select":return{...v,"aria-selected":m&&g};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,s]);return M.useMemo(()=>i?{reference:f,floating:d,item:h}:{},[i,f,d,h])}const cd=t=>t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,n)=>(n?"-":"")+e.toLowerCase());function Mr(t,e){return typeof t=="function"?t(e):t}function R0(t,e){const[n,r]=M.useState(t);return t&&!n&&r(!0),M.useEffect(()=>{if(!t&&n){const o=setTimeout(()=>r(!1),e);return()=>clearTimeout(o)}},[t,n,e]),n}function $0(t,e){e===void 0&&(e={});const{open:n,elements:{floating:r}}=t,{duration:o=250}=e,s=(typeof o=="number"?o:o.close)||0,[a,l]=M.useState("unmounted"),c=R0(n,s);return!c&&a==="close"&&l("unmounted"),je(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function j0(t,e){e===void 0&&(e={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=e,a=t.placement,l=a.split("-")[0],c=M.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",f=(u?s:s.open)||0,d=(u?s:s.close)||0,[h,p]=M.useState(()=>({...Mr(i,c),...Mr(n,c)})),{isMounted:m,status:g}=$0(t,{duration:s}),v=wt(n),x=wt(r),y=wt(o),S=wt(i);return je(()=>{const w=Mr(v.current,c),E=Mr(y.current,c),_=Mr(S.current,c),I=Mr(x.current,c)||Object.keys(w).reduce((D,F)=>(D[F]="",D),{});if(g==="initial"&&p(D=>({transitionProperty:D.transitionProperty,..._,...w})),g==="open"&&p({transitionProperty:Object.keys(I).map(cd).join(","),transitionDuration:f+"ms",..._,...I}),g==="close"){const D=E||w;p({transitionProperty:Object.keys(D).map(cd).join(","),transitionDuration:d+"ms",..._,...D})}},[d,y,v,x,S,f,g,c]),{isMounted:m,styles:h}}class Xi{static getDescendantProperty(e,n,r=[]){let o,i,s,a,l,c;if(n){if(s=n.indexOf("."),s===-1?o=n:(o=n.slice(0,s),i=n.slice(s+1)),a=e[o],a!==null&&typeof a<"u")if(!i&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)Xi.getDescendantProperty(a[l],i,r);else i&&Xi.getDescendantProperty(a,i,r)}else r.push(e);return r}}class Fr{constructor(e=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=e,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(e=""){if(e==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const i=Fr.isMatch(o,e,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const s=Xi.getDescendantProperty(o,this.keys[i]);let a=!1;for(let l=0;l<s.length;l++){const c=Fr.isMatch(s[l],e,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(e,n,r){e=String(e),n=String(n),r||(e=e.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Fr.nearestIndexesFor(e,n);return o?e===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(e,n){const r=n.split("");let o=[];return Fr.indexesOfFirstLetter(e,n).forEach((s,a)=>{let l=s+1;o[a]=[s];for(let c=1;c<r.length;c++){const u=r[c];if(l=e.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(s=>s!==!1),o.length?o.sort((s,a)=>s.length===1?s[0]-a[0]:(s=s[s.length-1]-s[0],a=a[a.length-1]-a[0],s-a))[0]:!1}static indexesOfFirstLetter(e,n){const r=n[0];return e.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}/**
|
|
5
5
|
* @license lucide-react v0.407.0 - ISC
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the ISC license.
|
|
8
8
|
* See the LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/const
|
|
9
|
+
*/const B0=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ud=(...t)=>t.filter((e,n,r)=>!!e&&r.indexOf(e)===n).join(" ");/**
|
|
10
10
|
* @license lucide-react v0.407.0 - ISC
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the ISC license.
|
|
13
13
|
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/var
|
|
14
|
+
*/var z0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
15
15
|
* @license lucide-react v0.407.0 - ISC
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the ISC license.
|
|
18
18
|
* See the LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/const
|
|
19
|
+
*/const H0=b.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>b.createElement("svg",{ref:l,...z0,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:ud("lucide",o),...a},[...s.map(([c,u])=>b.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
|
|
20
20
|
* @license lucide-react v0.407.0 - ISC
|
|
21
21
|
*
|
|
22
22
|
* This source code is licensed under the ISC license.
|
|
23
23
|
* See the LICENSE file in the root directory of this source tree.
|
|
24
|
-
*/const Lt=(t,e)=>{const n=b.forwardRef(({className:r,...o},i)=>b.createElement(
|
|
24
|
+
*/const Lt=(t,e)=>{const n=b.forwardRef(({className:r,...o},i)=>b.createElement(H0,{ref:i,iconNode:e,className:ud(`lucide-${B0(t)}`,r),...o}));return n.displayName=`${t}`,n};/**
|
|
25
25
|
* @license lucide-react v0.407.0 - ISC
|
|
26
26
|
*
|
|
27
27
|
* This source code is licensed under the ISC license.
|
|
@@ -36,37 +36,37 @@
|
|
|
36
36
|
*
|
|
37
37
|
* This source code is licensed under the ISC license.
|
|
38
38
|
* See the LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/const
|
|
39
|
+
*/const W0=Lt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
40
40
|
* @license lucide-react v0.407.0 - ISC
|
|
41
41
|
*
|
|
42
42
|
* This source code is licensed under the ISC license.
|
|
43
43
|
* See the LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/const
|
|
44
|
+
*/const U0=Lt("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
45
45
|
* @license lucide-react v0.407.0 - ISC
|
|
46
46
|
*
|
|
47
47
|
* This source code is licensed under the ISC license.
|
|
48
48
|
* See the LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/const
|
|
49
|
+
*/const G0=Lt("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
50
50
|
* @license lucide-react v0.407.0 - ISC
|
|
51
51
|
*
|
|
52
52
|
* This source code is licensed under the ISC license.
|
|
53
53
|
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
-
*/const
|
|
54
|
+
*/const K0=Lt("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
55
55
|
* @license lucide-react v0.407.0 - ISC
|
|
56
56
|
*
|
|
57
57
|
* This source code is licensed under the ISC license.
|
|
58
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/const
|
|
59
|
+
*/const q0=Lt("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
|
|
60
60
|
* @license lucide-react v0.407.0 - ISC
|
|
61
61
|
*
|
|
62
62
|
* This source code is licensed under the ISC license.
|
|
63
63
|
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
-
*/const
|
|
64
|
+
*/const Z0=Lt("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
65
65
|
* @license lucide-react v0.407.0 - ISC
|
|
66
66
|
*
|
|
67
67
|
* This source code is licensed under the ISC license.
|
|
68
68
|
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/const
|
|
69
|
+
*/const Y0=Lt("Group",[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]]);/**
|
|
70
70
|
* @license lucide-react v0.407.0 - ISC
|
|
71
71
|
*
|
|
72
72
|
* This source code is licensed under the ISC license.
|
|
@@ -86,33 +86,33 @@
|
|
|
86
86
|
*
|
|
87
87
|
* This source code is licensed under the ISC license.
|
|
88
88
|
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
-
*/const Y0=Lt("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);function hd(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=hd(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function X0(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=hd(t))&&(r&&(r+=" "),r+=e);return r}var pd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function J0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Q0(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var ex=Error,tx=EvalError,nx=RangeError,rx=ReferenceError,md=SyntaxError,Po=TypeError,ox=URIError,ix=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},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;e[n]=o;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0},gd=typeof Symbol<"u"&&Symbol,sx=ix,ax=function(){return typeof gd!="function"||typeof Symbol!="function"||typeof gd("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:sx()},Xa={__proto__:null,foo:{}},lx=Object,cx=function(){return{__proto__:Xa}.foo===Xa.foo&&!(Xa instanceof lx)},ux="Function.prototype.bind called on incompatible ",fx=Object.prototype.toString,dx=Math.max,hx="[object Function]",yd=function(e,n){for(var r=[],o=0;o<e.length;o+=1)r[o]=e[o];for(var i=0;i<n.length;i+=1)r[i+e.length]=n[i];return r},px=function(e,n){for(var r=[],o=n,i=0;o<e.length;o+=1,i+=1)r[i]=e[o];return r},mx=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n},gx=function(e){var n=this;if(typeof n!="function"||fx.apply(n)!==hx)throw new TypeError(ux+n);for(var r=px(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,yd(r,arguments));return Object(u)===u?u:this}return n.apply(e,yd(r,arguments))},s=dx(0,n.length-r.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(o=Function("binder","return function ("+mx(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},yx=gx,Ja=Function.prototype.bind||yx,vx=Function.prototype.call,bx=Object.prototype.hasOwnProperty,xx=Ja,wx=xx.call(vx,bx),we,Sx=ex,Tx=tx,Ex=nx,Cx=rx,Nr=md,Vr=Po,Ax=ox,vd=Function,Qa=function(t){try{return vd('"use strict"; return ('+t+").constructor;")()}catch{}},nr=Object.getOwnPropertyDescriptor;if(nr)try{nr({},"")}catch{nr=null}var el=function(){throw new Vr},_x=nr?function(){try{return arguments.callee,el}catch{try{return nr(arguments,"callee").get}catch{return el}}}():el,Rr=ax(),Px=cx(),it=Object.getPrototypeOf||(Px?function(t){return t.__proto__}:null),$r={},Ix=typeof Uint8Array>"u"||!it?we:it(Uint8Array),rr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?we:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?we:ArrayBuffer,"%ArrayIteratorPrototype%":Rr&&it?it([][Symbol.iterator]()):we,"%AsyncFromSyncIteratorPrototype%":we,"%AsyncFunction%":$r,"%AsyncGenerator%":$r,"%AsyncGeneratorFunction%":$r,"%AsyncIteratorPrototype%":$r,"%Atomics%":typeof Atomics>"u"?we:Atomics,"%BigInt%":typeof BigInt>"u"?we:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?we:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?we:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?we:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Sx,"%eval%":eval,"%EvalError%":Tx,"%Float32Array%":typeof Float32Array>"u"?we:Float32Array,"%Float64Array%":typeof Float64Array>"u"?we:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?we:FinalizationRegistry,"%Function%":vd,"%GeneratorFunction%":$r,"%Int8Array%":typeof Int8Array>"u"?we:Int8Array,"%Int16Array%":typeof Int16Array>"u"?we:Int16Array,"%Int32Array%":typeof Int32Array>"u"?we:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Rr&&it?it(it([][Symbol.iterator]())):we,"%JSON%":typeof JSON=="object"?JSON:we,"%Map%":typeof Map>"u"?we:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Rr||!it?we:it(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?we:Promise,"%Proxy%":typeof Proxy>"u"?we:Proxy,"%RangeError%":Ex,"%ReferenceError%":Cx,"%Reflect%":typeof Reflect>"u"?we:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?we:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Rr||!it?we:it(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?we:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Rr&&it?it(""[Symbol.iterator]()):we,"%Symbol%":Rr?Symbol:we,"%SyntaxError%":Nr,"%ThrowTypeError%":_x,"%TypedArray%":Ix,"%TypeError%":Vr,"%Uint8Array%":typeof Uint8Array>"u"?we:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?we:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?we:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?we:Uint32Array,"%URIError%":Ax,"%WeakMap%":typeof WeakMap>"u"?we:WeakMap,"%WeakRef%":typeof WeakRef>"u"?we:WeakRef,"%WeakSet%":typeof WeakSet>"u"?we:WeakSet};if(it)try{null.error}catch(t){var Ox=it(it(t));rr["%Error.prototype%"]=Ox}var kx=function t(e){var n;if(e==="%AsyncFunction%")n=Qa("async function () {}");else if(e==="%GeneratorFunction%")n=Qa("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=Qa("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&it&&(n=it(o.prototype))}return rr[e]=n,n},bd={__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"]},Io=Ja,Ji=wx,Dx=Io.call(Function.call,Array.prototype.concat),Mx=Io.call(Function.apply,Array.prototype.splice),xd=Io.call(Function.call,String.prototype.replace),Qi=Io.call(Function.call,String.prototype.slice),Fx=Io.call(Function.call,RegExp.prototype.exec),Lx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Nx=/\\(\\)?/g,Vx=function(e){var n=Qi(e,0,1),r=Qi(e,-1);if(n==="%"&&r!=="%")throw new Nr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Nr("invalid intrinsic syntax, expected opening `%`");var o=[];return xd(e,Lx,function(i,s,a,l){o[o.length]=a?xd(l,Nx,"$1"):s||i}),o},Rx=function(e,n){var r=e,o;if(Ji(bd,r)&&(o=bd[r],r="%"+o[0]+"%"),Ji(rr,r)){var i=rr[r];if(i===$r&&(i=kx(r)),typeof i>"u"&&!n)throw new Vr("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Nr("intrinsic "+e+" does not exist!")},jr=function(e,n){if(typeof e!="string"||e.length===0)throw new Vr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Vr('"allowMissing" argument must be a boolean');if(Fx(/^%?[^%]*%?$/,e)===null)throw new Nr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Vx(e),o=r.length>0?r[0]:"",i=Rx("%"+o+"%",n),s=i.name,a=i.value,l=!1,c=i.alias;c&&(o=c[0],Mx(r,Dx([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var d=r[u],h=Qi(d,0,1),p=Qi(d,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new Nr("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(l=!0),o+="."+d,s="%"+o+"%",Ji(rr,s))a=rr[s];else if(a!=null){if(!(d in a)){if(!n)throw new Vr("base intrinsic for "+e+" exists, but the property is not available.");return}if(nr&&u+1>=r.length){var m=nr(a,d);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else f=Ji(a,d),a=a[d];f&&!l&&(rr[s]=a)}}return a},wd={exports:{}},tl,Sd;function nl(){if(Sd)return tl;Sd=1;var t=jr,e=t("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return tl=e,tl}var $x=jr,es=$x("%Object.getOwnPropertyDescriptor%",!0);if(es)try{es([],"length")}catch{es=null}var Td=es,Ed=nl(),jx=md,Br=Po,Cd=Td,Bx=function(e,n,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Br("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Br("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Br("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Br("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Br("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Br("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!Cd&&Cd(e,n);if(Ed)Ed(e,n,{configurable:s===null&&l?l.configurable:!s,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:i===null&&l?l.writable:!i});else if(a||!o&&!i&&!s)e[n]=r;else throw new jx("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},rl=nl(),Ad=function(){return!!rl};Ad.hasArrayLengthDefineBug=function(){if(!rl)return null;try{return rl([],"length",{value:1}).length!==1}catch{return!0}};var zx=Ad,Hx=jr,_d=Bx,Wx=zx(),Pd=Td,Id=Po,Ux=Hx("%Math.floor%"),Gx=function(e,n){if(typeof e!="function")throw new Id("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Ux(n)!==n)throw new Id("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&Pd){var s=Pd(e,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!r)&&(Wx?_d(e,"length",n,!0,!0):_d(e,"length",n)),e};(function(t){var e=Ja,n=jr,r=Gx,o=Po,i=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||e.call(s,i),l=nl(),c=n("%Math.max%");t.exports=function(d){if(typeof d!="function")throw new o("a function is required");var h=a(e,s,arguments);return r(h,1+c(0,d.length-(arguments.length-1)),!0)};var u=function(){return a(e,i,arguments)};l?l(t.exports,"apply",{value:u}):t.exports.apply=u})(wd);var Kx=wd.exports,Od=jr,kd=Kx,qx=kd(Od("String.prototype.indexOf")),Zx=function(e,n){var r=Od(e,!!n);return typeof r=="function"&&qx(e,".prototype.")>-1?kd(r):r};const Yx=Q0(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ol=typeof Map=="function"&&Map.prototype,il=Object.getOwnPropertyDescriptor&&ol?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ts=ol&&il&&typeof il.get=="function"?il.get:null,Dd=ol&&Map.prototype.forEach,sl=typeof Set=="function"&&Set.prototype,al=Object.getOwnPropertyDescriptor&&sl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ns=sl&&al&&typeof al.get=="function"?al.get:null,Md=sl&&Set.prototype.forEach,Xx=typeof WeakMap=="function"&&WeakMap.prototype,Oo=Xx?WeakMap.prototype.has:null,Jx=typeof WeakSet=="function"&&WeakSet.prototype,ko=Jx?WeakSet.prototype.has:null,Qx=typeof WeakRef=="function"&&WeakRef.prototype,Fd=Qx?WeakRef.prototype.deref:null,ew=Boolean.prototype.valueOf,tw=Object.prototype.toString,nw=Function.prototype.toString,rw=String.prototype.match,ll=String.prototype.slice,Fn=String.prototype.replace,ow=String.prototype.toUpperCase,Ld=String.prototype.toLowerCase,Nd=RegExp.prototype.test,Vd=Array.prototype.concat,Jt=Array.prototype.join,iw=Array.prototype.slice,Rd=Math.floor,cl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ul=Object.getOwnPropertySymbols,fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,zr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",mt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===zr||!0)?Symbol.toStringTag:null,$d=Object.prototype.propertyIsEnumerable,jd=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Bd(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Nd.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var r=t<0?-Rd(-t):Rd(t);if(r!==t){var o=String(r),i=ll.call(e,o.length+1);return Fn.call(o,n,"$&_")+"."+Fn.call(Fn.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Fn.call(e,n,"$&_")}var dl=Yx,zd=dl.custom,Hd=Gd(zd)?zd:null,sw=function t(e,n,r,o){var i=n||{};if(Ln(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ln(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Ln(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ln(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ln(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return qd(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return a?Bd(e,l):l}if(typeof e=="bigint"){var c=String(e)+"n";return a?Bd(e,c):c}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof e=="object")return hl(e)?"[Array]":"[Object]";var f=Ew(i,r);if(typeof o>"u")o=[];else if(Kd(o,e)>=0)return"[Circular]";function d($,O,A){if(O&&(o=iw.call(o),o.push(O)),A){var L={depth:i.depth};return Ln(i,"quoteStyle")&&(L.quoteStyle=i.quoteStyle),t($,L,r+1,o)}return t($,i,r+1,o)}if(typeof e=="function"&&!Ud(e)){var h=mw(e),p=rs(e,d);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+Jt.call(p,", ")+" }":"")}if(Gd(e)){var m=zr?Fn.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):fl.call(e);return typeof e=="object"&&!zr?Do(m):m}if(ww(e)){for(var g="<"+Ld.call(String(e.nodeName)),v=e.attributes||[],x=0;x<v.length;x++)g+=" "+v[x].name+"="+Wd(aw(v[x].value),"double",i);return g+=">",e.childNodes&&e.childNodes.length&&(g+="..."),g+="</"+Ld.call(String(e.nodeName))+">",g}if(hl(e)){if(e.length===0)return"[]";var y=rs(e,d);return f&&!Tw(y)?"["+ml(y,f)+"]":"[ "+Jt.call(y,", ")+" ]"}if(cw(e)){var S=rs(e,d);return!("cause"in Error.prototype)&&"cause"in e&&!$d.call(e,"cause")?"{ ["+String(e)+"] "+Jt.call(Vd.call("[cause]: "+d(e.cause),S),", ")+" }":S.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Jt.call(S,", ")+" }"}if(typeof e=="object"&&s){if(Hd&&typeof e[Hd]=="function"&&dl)return dl(e,{depth:u-r});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(gw(e)){var w=[];return Dd&&Dd.call(e,function($,O){w.push(d(O,e,!0)+" => "+d($,e))}),Zd("Map",ts.call(e),w,f)}if(bw(e)){var E=[];return Md&&Md.call(e,function($){E.push(d($,e))}),Zd("Set",ns.call(e),E,f)}if(yw(e))return pl("WeakMap");if(xw(e))return pl("WeakSet");if(vw(e))return pl("WeakRef");if(fw(e))return Do(d(Number(e)));if(hw(e))return Do(d(cl.call(e)));if(dw(e))return Do(ew.call(e));if(uw(e))return Do(d(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof pd<"u"&&e===pd)return"{ [object globalThis] }";if(!lw(e)&&!Ud(e)){var _=rs(e,d),I=jd?jd(e)===Object.prototype:e instanceof Object||e.constructor===Object,D=e instanceof Object?"":"null prototype",F=!I&&mt&&Object(e)===e&&mt in e?ll.call(Nn(e),8,-1):D?"Object":"",N=I||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",P=N+(F||D?"["+Jt.call(Vd.call([],F||[],D||[]),": ")+"] ":"");return _.length===0?P+"{}":f?P+"{"+ml(_,f)+"}":P+"{ "+Jt.call(_,", ")+" }"}return String(e)};function Wd(t,e,n){var r=(n.quoteStyle||e)==="double"?'"':"'";return r+t+r}function aw(t){return Fn.call(String(t),/"/g,""")}function hl(t){return Nn(t)==="[object Array]"&&(!mt||!(typeof t=="object"&&mt in t))}function lw(t){return Nn(t)==="[object Date]"&&(!mt||!(typeof t=="object"&&mt in t))}function Ud(t){return Nn(t)==="[object RegExp]"&&(!mt||!(typeof t=="object"&&mt in t))}function cw(t){return Nn(t)==="[object Error]"&&(!mt||!(typeof t=="object"&&mt in t))}function uw(t){return Nn(t)==="[object String]"&&(!mt||!(typeof t=="object"&&mt in t))}function fw(t){return Nn(t)==="[object Number]"&&(!mt||!(typeof t=="object"&&mt in t))}function dw(t){return Nn(t)==="[object Boolean]"&&(!mt||!(typeof t=="object"&&mt in t))}function Gd(t){if(zr)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!fl)return!1;try{return fl.call(t),!0}catch{}return!1}function hw(t){if(!t||typeof t!="object"||!cl)return!1;try{return cl.call(t),!0}catch{}return!1}var pw=Object.prototype.hasOwnProperty||function(t){return t in this};function Ln(t,e){return pw.call(t,e)}function Nn(t){return tw.call(t)}function mw(t){if(t.name)return t.name;var e=rw.call(nw.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Kd(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function gw(t){if(!ts||!t||typeof t!="object")return!1;try{ts.call(t);try{ns.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function yw(t){if(!Oo||!t||typeof t!="object")return!1;try{Oo.call(t,Oo);try{ko.call(t,ko)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function vw(t){if(!Fd||!t||typeof t!="object")return!1;try{return Fd.call(t),!0}catch{}return!1}function bw(t){if(!ns||!t||typeof t!="object")return!1;try{ns.call(t);try{ts.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function xw(t){if(!ko||!t||typeof t!="object")return!1;try{ko.call(t,ko);try{Oo.call(t,Oo)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function ww(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function qd(t,e){if(t.length>e.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return qd(ll.call(t,0,e.maxStringLength),e)+r}var o=Fn.call(Fn.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Sw);return Wd(o,"single",e)}function Sw(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+ow.call(e.toString(16))}function Do(t){return"Object("+t+")"}function pl(t){return t+" { ? }"}function Zd(t,e,n,r){var o=r?ml(n,r):Jt.call(n,", ");return t+" ("+e+") {"+o+"}"}function Tw(t){for(var e=0;e<t.length;e++)if(Kd(t[e],`
|
|
90
|
-
`)>=0)return!1;return!0}function
|
|
89
|
+
*/const X0=Lt("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);function hd(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=hd(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function J0(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=hd(t))&&(r&&(r+=" "),r+=e);return r}var pd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Q0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ex(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var tx=Error,nx=EvalError,rx=RangeError,ox=ReferenceError,md=SyntaxError,Po=TypeError,ix=URIError,sx=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},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;e[n]=o;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0},gd=typeof Symbol<"u"&&Symbol,ax=sx,lx=function(){return typeof gd!="function"||typeof Symbol!="function"||typeof gd("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ax()},Xa={__proto__:null,foo:{}},cx=Object,ux=function(){return{__proto__:Xa}.foo===Xa.foo&&!(Xa instanceof cx)},fx="Function.prototype.bind called on incompatible ",dx=Object.prototype.toString,hx=Math.max,px="[object Function]",yd=function(e,n){for(var r=[],o=0;o<e.length;o+=1)r[o]=e[o];for(var i=0;i<n.length;i+=1)r[i+e.length]=n[i];return r},mx=function(e,n){for(var r=[],o=n,i=0;o<e.length;o+=1,i+=1)r[i]=e[o];return r},gx=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n},yx=function(e){var n=this;if(typeof n!="function"||dx.apply(n)!==px)throw new TypeError(fx+n);for(var r=mx(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,yd(r,arguments));return Object(u)===u?u:this}return n.apply(e,yd(r,arguments))},s=hx(0,n.length-r.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(o=Function("binder","return function ("+gx(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},vx=yx,Ja=Function.prototype.bind||vx,bx=Function.prototype.call,xx=Object.prototype.hasOwnProperty,wx=Ja,Sx=wx.call(bx,xx),we,Tx=tx,Ex=nx,Cx=rx,Ax=ox,Nr=md,Vr=Po,_x=ix,vd=Function,Qa=function(t){try{return vd('"use strict"; return ('+t+").constructor;")()}catch{}},nr=Object.getOwnPropertyDescriptor;if(nr)try{nr({},"")}catch{nr=null}var el=function(){throw new Vr},Px=nr?function(){try{return arguments.callee,el}catch{try{return nr(arguments,"callee").get}catch{return el}}}():el,Rr=lx(),Ix=ux(),it=Object.getPrototypeOf||(Ix?function(t){return t.__proto__}:null),$r={},Ox=typeof Uint8Array>"u"||!it?we:it(Uint8Array),rr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?we:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?we:ArrayBuffer,"%ArrayIteratorPrototype%":Rr&&it?it([][Symbol.iterator]()):we,"%AsyncFromSyncIteratorPrototype%":we,"%AsyncFunction%":$r,"%AsyncGenerator%":$r,"%AsyncGeneratorFunction%":$r,"%AsyncIteratorPrototype%":$r,"%Atomics%":typeof Atomics>"u"?we:Atomics,"%BigInt%":typeof BigInt>"u"?we:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?we:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?we:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?we:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Tx,"%eval%":eval,"%EvalError%":Ex,"%Float32Array%":typeof Float32Array>"u"?we:Float32Array,"%Float64Array%":typeof Float64Array>"u"?we:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?we:FinalizationRegistry,"%Function%":vd,"%GeneratorFunction%":$r,"%Int8Array%":typeof Int8Array>"u"?we:Int8Array,"%Int16Array%":typeof Int16Array>"u"?we:Int16Array,"%Int32Array%":typeof Int32Array>"u"?we:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Rr&&it?it(it([][Symbol.iterator]())):we,"%JSON%":typeof JSON=="object"?JSON:we,"%Map%":typeof Map>"u"?we:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Rr||!it?we:it(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?we:Promise,"%Proxy%":typeof Proxy>"u"?we:Proxy,"%RangeError%":Cx,"%ReferenceError%":Ax,"%Reflect%":typeof Reflect>"u"?we:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?we:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Rr||!it?we:it(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?we:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Rr&&it?it(""[Symbol.iterator]()):we,"%Symbol%":Rr?Symbol:we,"%SyntaxError%":Nr,"%ThrowTypeError%":Px,"%TypedArray%":Ox,"%TypeError%":Vr,"%Uint8Array%":typeof Uint8Array>"u"?we:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?we:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?we:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?we:Uint32Array,"%URIError%":_x,"%WeakMap%":typeof WeakMap>"u"?we:WeakMap,"%WeakRef%":typeof WeakRef>"u"?we:WeakRef,"%WeakSet%":typeof WeakSet>"u"?we:WeakSet};if(it)try{null.error}catch(t){var kx=it(it(t));rr["%Error.prototype%"]=kx}var Dx=function t(e){var n;if(e==="%AsyncFunction%")n=Qa("async function () {}");else if(e==="%GeneratorFunction%")n=Qa("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=Qa("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&it&&(n=it(o.prototype))}return rr[e]=n,n},bd={__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"]},Io=Ja,Ji=Sx,Mx=Io.call(Function.call,Array.prototype.concat),Fx=Io.call(Function.apply,Array.prototype.splice),xd=Io.call(Function.call,String.prototype.replace),Qi=Io.call(Function.call,String.prototype.slice),Lx=Io.call(Function.call,RegExp.prototype.exec),Nx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Vx=/\\(\\)?/g,Rx=function(e){var n=Qi(e,0,1),r=Qi(e,-1);if(n==="%"&&r!=="%")throw new Nr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Nr("invalid intrinsic syntax, expected opening `%`");var o=[];return xd(e,Nx,function(i,s,a,l){o[o.length]=a?xd(l,Vx,"$1"):s||i}),o},$x=function(e,n){var r=e,o;if(Ji(bd,r)&&(o=bd[r],r="%"+o[0]+"%"),Ji(rr,r)){var i=rr[r];if(i===$r&&(i=Dx(r)),typeof i>"u"&&!n)throw new Vr("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Nr("intrinsic "+e+" does not exist!")},jr=function(e,n){if(typeof e!="string"||e.length===0)throw new Vr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Vr('"allowMissing" argument must be a boolean');if(Lx(/^%?[^%]*%?$/,e)===null)throw new Nr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Rx(e),o=r.length>0?r[0]:"",i=$x("%"+o+"%",n),s=i.name,a=i.value,l=!1,c=i.alias;c&&(o=c[0],Fx(r,Mx([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var d=r[u],h=Qi(d,0,1),p=Qi(d,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new Nr("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(l=!0),o+="."+d,s="%"+o+"%",Ji(rr,s))a=rr[s];else if(a!=null){if(!(d in a)){if(!n)throw new Vr("base intrinsic for "+e+" exists, but the property is not available.");return}if(nr&&u+1>=r.length){var m=nr(a,d);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else f=Ji(a,d),a=a[d];f&&!l&&(rr[s]=a)}}return a},wd={exports:{}},tl,Sd;function nl(){if(Sd)return tl;Sd=1;var t=jr,e=t("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return tl=e,tl}var jx=jr,es=jx("%Object.getOwnPropertyDescriptor%",!0);if(es)try{es([],"length")}catch{es=null}var Td=es,Ed=nl(),Bx=md,Br=Po,Cd=Td,zx=function(e,n,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Br("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Br("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Br("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Br("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Br("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Br("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!Cd&&Cd(e,n);if(Ed)Ed(e,n,{configurable:s===null&&l?l.configurable:!s,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:i===null&&l?l.writable:!i});else if(a||!o&&!i&&!s)e[n]=r;else throw new Bx("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},rl=nl(),Ad=function(){return!!rl};Ad.hasArrayLengthDefineBug=function(){if(!rl)return null;try{return rl([],"length",{value:1}).length!==1}catch{return!0}};var Hx=Ad,Wx=jr,_d=zx,Ux=Hx(),Pd=Td,Id=Po,Gx=Wx("%Math.floor%"),Kx=function(e,n){if(typeof e!="function")throw new Id("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Gx(n)!==n)throw new Id("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&Pd){var s=Pd(e,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!r)&&(Ux?_d(e,"length",n,!0,!0):_d(e,"length",n)),e};(function(t){var e=Ja,n=jr,r=Kx,o=Po,i=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||e.call(s,i),l=nl(),c=n("%Math.max%");t.exports=function(d){if(typeof d!="function")throw new o("a function is required");var h=a(e,s,arguments);return r(h,1+c(0,d.length-(arguments.length-1)),!0)};var u=function(){return a(e,i,arguments)};l?l(t.exports,"apply",{value:u}):t.exports.apply=u})(wd);var qx=wd.exports,Od=jr,kd=qx,Zx=kd(Od("String.prototype.indexOf")),Yx=function(e,n){var r=Od(e,!!n);return typeof r=="function"&&Zx(e,".prototype.")>-1?kd(r):r};const Xx=ex(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ol=typeof Map=="function"&&Map.prototype,il=Object.getOwnPropertyDescriptor&&ol?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ts=ol&&il&&typeof il.get=="function"?il.get:null,Dd=ol&&Map.prototype.forEach,sl=typeof Set=="function"&&Set.prototype,al=Object.getOwnPropertyDescriptor&&sl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ns=sl&&al&&typeof al.get=="function"?al.get:null,Md=sl&&Set.prototype.forEach,Jx=typeof WeakMap=="function"&&WeakMap.prototype,Oo=Jx?WeakMap.prototype.has:null,Qx=typeof WeakSet=="function"&&WeakSet.prototype,ko=Qx?WeakSet.prototype.has:null,ew=typeof WeakRef=="function"&&WeakRef.prototype,Fd=ew?WeakRef.prototype.deref:null,tw=Boolean.prototype.valueOf,nw=Object.prototype.toString,rw=Function.prototype.toString,ow=String.prototype.match,ll=String.prototype.slice,Fn=String.prototype.replace,iw=String.prototype.toUpperCase,Ld=String.prototype.toLowerCase,Nd=RegExp.prototype.test,Vd=Array.prototype.concat,Jt=Array.prototype.join,sw=Array.prototype.slice,Rd=Math.floor,cl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ul=Object.getOwnPropertySymbols,fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,zr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",mt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===zr||!0)?Symbol.toStringTag:null,$d=Object.prototype.propertyIsEnumerable,jd=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Bd(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Nd.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var r=t<0?-Rd(-t):Rd(t);if(r!==t){var o=String(r),i=ll.call(e,o.length+1);return Fn.call(o,n,"$&_")+"."+Fn.call(Fn.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Fn.call(e,n,"$&_")}var dl=Xx,zd=dl.custom,Hd=Gd(zd)?zd:null,aw=function t(e,n,r,o){var i=n||{};if(Ln(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ln(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Ln(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ln(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ln(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return qd(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return a?Bd(e,l):l}if(typeof e=="bigint"){var c=String(e)+"n";return a?Bd(e,c):c}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof e=="object")return hl(e)?"[Array]":"[Object]";var f=Cw(i,r);if(typeof o>"u")o=[];else if(Kd(o,e)>=0)return"[Circular]";function d($,O,A){if(O&&(o=sw.call(o),o.push(O)),A){var L={depth:i.depth};return Ln(i,"quoteStyle")&&(L.quoteStyle=i.quoteStyle),t($,L,r+1,o)}return t($,i,r+1,o)}if(typeof e=="function"&&!Ud(e)){var h=gw(e),p=rs(e,d);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+Jt.call(p,", ")+" }":"")}if(Gd(e)){var m=zr?Fn.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):fl.call(e);return typeof e=="object"&&!zr?Do(m):m}if(Sw(e)){for(var g="<"+Ld.call(String(e.nodeName)),v=e.attributes||[],x=0;x<v.length;x++)g+=" "+v[x].name+"="+Wd(lw(v[x].value),"double",i);return g+=">",e.childNodes&&e.childNodes.length&&(g+="..."),g+="</"+Ld.call(String(e.nodeName))+">",g}if(hl(e)){if(e.length===0)return"[]";var y=rs(e,d);return f&&!Ew(y)?"["+ml(y,f)+"]":"[ "+Jt.call(y,", ")+" ]"}if(uw(e)){var S=rs(e,d);return!("cause"in Error.prototype)&&"cause"in e&&!$d.call(e,"cause")?"{ ["+String(e)+"] "+Jt.call(Vd.call("[cause]: "+d(e.cause),S),", ")+" }":S.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Jt.call(S,", ")+" }"}if(typeof e=="object"&&s){if(Hd&&typeof e[Hd]=="function"&&dl)return dl(e,{depth:u-r});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(yw(e)){var w=[];return Dd&&Dd.call(e,function($,O){w.push(d(O,e,!0)+" => "+d($,e))}),Zd("Map",ts.call(e),w,f)}if(xw(e)){var E=[];return Md&&Md.call(e,function($){E.push(d($,e))}),Zd("Set",ns.call(e),E,f)}if(vw(e))return pl("WeakMap");if(ww(e))return pl("WeakSet");if(bw(e))return pl("WeakRef");if(dw(e))return Do(d(Number(e)));if(pw(e))return Do(d(cl.call(e)));if(hw(e))return Do(tw.call(e));if(fw(e))return Do(d(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof pd<"u"&&e===pd)return"{ [object globalThis] }";if(!cw(e)&&!Ud(e)){var _=rs(e,d),I=jd?jd(e)===Object.prototype:e instanceof Object||e.constructor===Object,D=e instanceof Object?"":"null prototype",F=!I&&mt&&Object(e)===e&&mt in e?ll.call(Nn(e),8,-1):D?"Object":"",N=I||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",P=N+(F||D?"["+Jt.call(Vd.call([],F||[],D||[]),": ")+"] ":"");return _.length===0?P+"{}":f?P+"{"+ml(_,f)+"}":P+"{ "+Jt.call(_,", ")+" }"}return String(e)};function Wd(t,e,n){var r=(n.quoteStyle||e)==="double"?'"':"'";return r+t+r}function lw(t){return Fn.call(String(t),/"/g,""")}function hl(t){return Nn(t)==="[object Array]"&&(!mt||!(typeof t=="object"&&mt in t))}function cw(t){return Nn(t)==="[object Date]"&&(!mt||!(typeof t=="object"&&mt in t))}function Ud(t){return Nn(t)==="[object RegExp]"&&(!mt||!(typeof t=="object"&&mt in t))}function uw(t){return Nn(t)==="[object Error]"&&(!mt||!(typeof t=="object"&&mt in t))}function fw(t){return Nn(t)==="[object String]"&&(!mt||!(typeof t=="object"&&mt in t))}function dw(t){return Nn(t)==="[object Number]"&&(!mt||!(typeof t=="object"&&mt in t))}function hw(t){return Nn(t)==="[object Boolean]"&&(!mt||!(typeof t=="object"&&mt in t))}function Gd(t){if(zr)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!fl)return!1;try{return fl.call(t),!0}catch{}return!1}function pw(t){if(!t||typeof t!="object"||!cl)return!1;try{return cl.call(t),!0}catch{}return!1}var mw=Object.prototype.hasOwnProperty||function(t){return t in this};function Ln(t,e){return mw.call(t,e)}function Nn(t){return nw.call(t)}function gw(t){if(t.name)return t.name;var e=ow.call(rw.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Kd(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function yw(t){if(!ts||!t||typeof t!="object")return!1;try{ts.call(t);try{ns.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function vw(t){if(!Oo||!t||typeof t!="object")return!1;try{Oo.call(t,Oo);try{ko.call(t,ko)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function bw(t){if(!Fd||!t||typeof t!="object")return!1;try{return Fd.call(t),!0}catch{}return!1}function xw(t){if(!ns||!t||typeof t!="object")return!1;try{ns.call(t);try{ts.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function ww(t){if(!ko||!t||typeof t!="object")return!1;try{ko.call(t,ko);try{Oo.call(t,Oo)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function Sw(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function qd(t,e){if(t.length>e.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return qd(ll.call(t,0,e.maxStringLength),e)+r}var o=Fn.call(Fn.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Tw);return Wd(o,"single",e)}function Tw(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+iw.call(e.toString(16))}function Do(t){return"Object("+t+")"}function pl(t){return t+" { ? }"}function Zd(t,e,n,r){var o=r?ml(n,r):Jt.call(n,", ");return t+" ("+e+") {"+o+"}"}function Ew(t){for(var e=0;e<t.length;e++)if(Kd(t[e],`
|
|
90
|
+
`)>=0)return!1;return!0}function Cw(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=Jt.call(Array(t.indent+1)," ");else return null;return{base:n,prev:Jt.call(Array(e+1),n)}}function ml(t,e){if(t.length===0)return"";var n=`
|
|
91
91
|
`+e.prev+e.base;return n+Jt.call(t,","+n)+`
|
|
92
|
-
`+e.prev}function rs(t,e){var n=hl(t),r=[];if(n){r.length=t.length;for(var o=0;o<t.length;o++)r[o]=Ln(t,o)?e(t[o],t):""}var i=typeof ul=="function"?ul(t):[],s;if(zr){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in t)Ln(t,l)&&(n&&String(Number(l))===l&&l<t.length||zr&&s["$"+l]instanceof Symbol||(Nd.call(/[^\w$]/,l)?r.push(e(l,t)+": "+e(t[l],t)):r.push(l+": "+e(t[l],t))));if(typeof ul=="function")for(var c=0;c<i.length;c++)$d.call(t,i[c])&&r.push("["+e(i[c])+"]: "+e(t[i[c]],t));return r}var Yd=jr,Hr=Zx,Cw=sw,Aw=Po,os=Yd("%WeakMap%",!0),is=Yd("%Map%",!0),_w=Hr("WeakMap.prototype.get",!0),Pw=Hr("WeakMap.prototype.set",!0),Iw=Hr("WeakMap.prototype.has",!0),Ow=Hr("Map.prototype.get",!0),kw=Hr("Map.prototype.set",!0),Dw=Hr("Map.prototype.has",!0),gl=function(t,e){for(var n=t,r;(r=n.next)!==null;n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},Mw=function(t,e){var n=gl(t,e);return n&&n.value},Fw=function(t,e,n){var r=gl(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},Lw=function(t,e){return!!gl(t,e)},Nw=function(){var e,n,r,o={assert:function(i){if(!o.has(i))throw new Aw("Side channel does not contain "+Cw(i))},get:function(i){if(os&&i&&(typeof i=="object"||typeof i=="function")){if(e)return _w(e,i)}else if(is){if(n)return Ow(n,i)}else if(r)return Mw(r,i)},has:function(i){if(os&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Iw(e,i)}else if(is){if(n)return Dw(n,i)}else if(r)return Lw(r,i);return!1},set:function(i,s){os&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new os),Pw(e,i,s)):is?(n||(n=new is),kw(n,i,s)):(r||(r={key:{},next:null}),Fw(r,i,s))}};return o},Vw=String.prototype.replace,Rw=/%20/g,yl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Xd={default:yl.RFC3986,formatters:{RFC1738:function(t){return Vw.call(t,Rw,"+")},RFC3986:function(t){return String(t)}},RFC1738:yl.RFC1738,RFC3986:yl.RFC3986},$w=Xd,vl=Object.prototype.hasOwnProperty,or=Array.isArray,Qt=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),jw=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(or(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Jd=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<e.length;++o)typeof e[o]<"u"&&(r[o]=e[o]);return r},Bw=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(or(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!vl.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var o=e;return or(e)&&!or(n)&&(o=Jd(e,r)),or(e)&&or(n)?(n.forEach(function(i,s){if(vl.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,r):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return vl.call(i,s)?i[s]=t(i[s],a,r):i[s]=a,i},o)},zw=function(e,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},e)},Hw=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Ww=function(e,n,r,o,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;++l){var c=s.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===$w.RFC1738&&(c===40||c===41)){a+=s.charAt(l);continue}if(c<128){a=a+Qt[c];continue}if(c<2048){a=a+(Qt[192|c>>6]+Qt[128|c&63]);continue}if(c<55296||c>=57344){a=a+(Qt[224|c>>12]+Qt[128|c>>6&63]+Qt[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|s.charCodeAt(l)&1023),a+=Qt[240|c>>18]+Qt[128|c>>12&63]+Qt[128|c>>6&63]+Qt[128|c&63]}return a},Uw=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return jw(n),e},Gw=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Kw=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},qw=function(e,n){return[].concat(e,n)},Zw=function(e,n){if(or(e)){for(var r=[],o=0;o<e.length;o+=1)r.push(n(e[o]));return r}return n(e)},Qd={arrayToObject:Jd,assign:zw,combine:qw,compact:Uw,decode:Hw,encode:Ww,isBuffer:Kw,isRegExp:Gw,maybeMap:Zw,merge:Bw},Yw=Qd,eh=Xd,Xw=Date.prototype.toISOString,th=eh.default;Yw.encode,eh.formatters[th];var Jw=Qd;Jw.decode;var nh=t=>Array.isArray(t),bl=t=>t===void 0,xl=t=>t===null,Qw=Function.bind.call(Function.call,Object.prototype.toString),eS=t=>!!t&&Qw(t)==="[object Error]"||t instanceof Error,rh=(t,e)=>t instanceof e,tS=t=>{const e=typeof t;return e==="undefined"||e===null||e==="number"||e==="string"||e==="boolean"||e==="bigint"},nS=t=>Object.prototype.toString.call(t)==="[object Date]"&&rh(t,Date),Mo={array:nh,date:nS,empty:t=>xl(t)||bl(t)?!0:typeof t=="object"?Object.keys(t).length===0:typeof t=="string"?t==="":Array.isArray(t)?t.length===0:Number.isNaN(t),function:t=>typeof t=="function",instance:rh,isError:eS,keyof:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),nan:t=>Number.isNaN(t),nil:t=>xl(t)||bl(t),null:xl,number:t=>typeof t=="number"||!Number.isNaN(t),object:t=>!nh(t)&&typeof t=="object",primitive:tS,string:t=>typeof t=="string",undefined:bl},wl=(t,e,n)=>{const[r,...o]=e;if(o.length>0){if(!t[r]){const i=`${+o[0]}`===o[0];t[r]=i?[]:{}}if(typeof t[r]!="object"){const i=`${+o[0]}`===o[0];t[r]=wl(i?[]:{},o,n)}else t[r]=wl(t[r],o,n)}else t[r]=n;return t},rS=t=>Object.keys(t),oS=t=>t.replace("[",".").replace("]","").split("."),oh=(t,e,n)=>{const r=Array.isArray(e)?e:oS(e),o=structuredClone(t);return wl(o,r,n),o};const Sl="-";function iS(t){const e=aS(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;function o(s){const a=s.split(Sl);return a[0]===""&&a.length!==1&&a.shift(),ih(a,e)||sS(s)}function i(s,a){const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function ih(t,e){var s;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),o=r?ih(t.slice(1),r):void 0;if(o)return o;if(e.validators.length===0)return;const i=t.join(Sl);return(s=e.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const sh=/^\[(.+)\]$/;function sS(t){if(sh.test(t)){const e=sh.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}}function aS(t){const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return cS(Object.entries(t.classGroups),n).forEach(([i,s])=>{Tl(s,r,i,e)}),r}function Tl(t,e,n,r){t.forEach(o=>{if(typeof o=="string"){const i=o===""?e:ah(e,o);i.classGroupId=n;return}if(typeof o=="function"){if(lS(o)){Tl(o(r),e,n,r);return}e.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{Tl(s,ah(e,i),n,r)})})}function ah(t,e){let n=t;return e.split(Sl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function lS(t){return t.isThemeGetter}function cS(t,e){return e?t.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[e+s,a])):i);return[n,o]}):t}function uS(t){if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),e++,e>t&&(e=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const lh="!";function fS(t){const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,o=e[0],i=e.length;function s(a){const l=[];let c=0,u=0,f;for(let g=0;g<a.length;g++){let v=a[g];if(c===0){if(v===o&&(r||a.slice(g,g+i)===e)){l.push(a.slice(u,g)),u=g+i;continue}if(v==="/"){f=g;continue}}v==="["?c++:v==="]"&&c--}const d=l.length===0?a:a.substring(u),h=d.startsWith(lh),p=h?d.substring(1):d,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:s})}:s}function dS(t){if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e}function hS(t){return{cache:uS(t.cacheSize),parseClassName:fS(t),...iS(t)}}const pS=/\s+/;function mS(t,e){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=e,i=new Set;return t.trim().split(pS).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(s);let f=!!u,d=r(f?c.substring(0,u):c);if(!d){if(!f)return{isTailwindClass:!1,originalClassName:s};if(d=r(c),!d)return{isTailwindClass:!1,originalClassName:s};f=!1}const h=dS(a).join(":");return{isTailwindClass:!0,modifierId:l?h+lh:h,classGroupId:d,originalClassName:s,hasPostfixModifier:f}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=s,u=a+l;return i.has(u)?!1:(i.add(u),o(l,c).forEach(f=>i.add(a+f)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function gS(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=ch(e))&&(r&&(r+=" "),r+=n);return r}function ch(t){if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=ch(t[r]))&&(n&&(n+=" "),n+=e);return n}function yS(t,...e){let n,r,o,i=s;function s(l){const c=e.reduce((u,f)=>f(u),t());return n=hS(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=mS(l,n);return o(l,u),u}return function(){return i(gS.apply(null,arguments))}}function Be(t){const e=n=>n[t]||[];return e.isThemeGetter=!0,e}const uh=/^\[(?:([a-z-]+):)?(.+)\]$/i,vS=/^\d+\/\d+$/,bS=new Set(["px","full","screen"]),xS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wS=/\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$/,SS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,TS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ES=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function yn(t){return ir(t)||bS.has(t)||vS.test(t)}function Vn(t){return Wr(t,"length",DS)}function ir(t){return!!t&&!Number.isNaN(Number(t))}function ss(t){return Wr(t,"number",ir)}function Fo(t){return!!t&&Number.isInteger(Number(t))}function CS(t){return t.endsWith("%")&&ir(t.slice(0,-1))}function ye(t){return uh.test(t)}function Rn(t){return xS.test(t)}const AS=new Set(["length","size","percentage"]);function _S(t){return Wr(t,AS,fh)}function PS(t){return Wr(t,"position",fh)}const IS=new Set(["image","url"]);function OS(t){return Wr(t,IS,FS)}function kS(t){return Wr(t,"",MS)}function Lo(){return!0}function Wr(t,e,n){const r=uh.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1}function DS(t){return wS.test(t)&&!SS.test(t)}function fh(){return!1}function MS(t){return TS.test(t)}function FS(t){return ES.test(t)}function LS(){const t=Be("colors"),e=Be("spacing"),n=Be("blur"),r=Be("brightness"),o=Be("borderColor"),i=Be("borderRadius"),s=Be("borderSpacing"),a=Be("borderWidth"),l=Be("contrast"),c=Be("grayscale"),u=Be("hueRotate"),f=Be("invert"),d=Be("gap"),h=Be("gradientColorStops"),p=Be("gradientColorStopPositions"),m=Be("inset"),g=Be("margin"),v=Be("opacity"),x=Be("padding"),y=Be("saturate"),S=Be("scale"),w=Be("sepia"),E=Be("skew"),_=Be("space"),I=Be("translate"),D=()=>["auto","contain","none"],F=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto",ye,e],P=()=>[ye,e],$=()=>["",yn,Vn],O=()=>["auto",ir,ye],A=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",ye],C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[ir,ss],X=()=>[ir,ye];return{cacheSize:500,separator:":",theme:{colors:[Lo],spacing:[yn,Vn],blur:["none","",Rn,ye],brightness:j(),borderColor:[t],borderRadius:["none","","full",Rn,ye],borderSpacing:P(),borderWidth:$(),contrast:j(),grayscale:Z(),hueRotate:X(),invert:Z(),gap:P(),gradientColorStops:[t],gradientColorStopPositions:[CS,Vn],inset:N(),margin:N(),opacity:j(),padding:P(),saturate:j(),scale:j(),sepia:Z(),skew:X(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",ye]}],container:["container"],columns:[{columns:[Rn]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...A(),ye]}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Fo,ye]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ye]}],grow:[{grow:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Fo,ye]}],"grid-cols":[{"grid-cols":[Lo]}],"col-start-end":[{col:["auto",{span:["full",Fo,ye]},ye]}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":[Lo]}],"row-start-end":[{row:["auto",{span:[Fo,ye]},ye]}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ye]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ye,e]}],"min-w":[{"min-w":[ye,e,"min","max","fit"]}],"max-w":[{"max-w":[ye,e,"none","full","min","max","fit","prose",{screen:[Rn]},Rn]}],h:[{h:[ye,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ye,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ye,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ye,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Rn,Vn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ss]}],"font-family":[{font:[Lo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ye]}],"line-clamp":[{"line-clamp":["none",ir,ss]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",yn,ye]}],"list-image":[{"list-image":["none",ye]}],"list-style-type":[{list:["none","disc","decimal",ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",yn,Vn]}],"underline-offset":[{"underline-offset":["auto",yn,ye]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye]}],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",ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...A(),PS]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_S]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},OS]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:L()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[yn,ye]}],"outline-w":[{outline:[yn,Vn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[yn,Vn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Rn,kS]}],"shadow-color":[{shadow:[Lo]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Rn,ye]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[y]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ye]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",ye]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Fo,ye]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ye]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",ye]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[yn,Vn,ss]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const NS=yS(LS),El=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n!==null&&(n.current=e)})},VS=t=>t.$$typeof===Symbol.for("react.forward_ref")||t.$$typeof===Symbol.for("react.fragment")?!0:t.$$typeof===Symbol.for("react.element"),RS=t=>Mo.function(t),_t=(...t)=>NS(X0(t)),dh=({reportStatus:t,hideLeft:e=!1,className:n,children:r,title:o})=>T.jsxs("div",{className:_t("w-full justify-between",e&&r===null?"hidden":"flex",n),children:[e?null:T.jsxs("span",{className:"flex items-center gap-1 group-hover:text-primary group-focus-within:text-primary transition-colors group-error:text-danger",children:[o,t?T.jsxs("span",{className:"flex aspect-square h-4 w-4 items-center justify-center",children:[T.jsx(U0,{className:"hidden aspect-square h-3 w-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}),T.jsx(G0,{className:"hidden aspect-square h-3 w-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}),r]}),as=({optionalText:t="Optional",left:e,rightLabel:n,container:r,right:o,children:i,error:s,form:a,id:l,name:c,title:u,placeholder:f,hideLeft:d,required:h})=>{const p=l??c;return T.jsxs("fieldset",{"data-error":!!s,form:a,className:_t("group inline-block w-full",r),children:[T.jsxs("label",{form:a,htmlFor:p,className:"inline-flex w-full cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-error:text-danger group-hover:border-primary",children:[!d&&!n?T.jsx(dh,{hideLeft:d,reportStatus:!0,title:u,placeholder:f,children:t||n?T.jsxs(b.Fragment,{children:[h?null:T.jsx("span",{className:"text-opacity-70",children:t}),n?T.jsx(b.Fragment,{children:n}):null]}):null}):null,T.jsxs("div",{className:"relative group flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-focus-within:border-primary group-hover:border-primary group-error:border-danger",children:[e?T.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:e}):null,i,o?T.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:o}):null]})]}),T.jsx("p",{className:"mt-1 text-xs group-error:block group-error:text-danger",children:s})]})},hh=t=>{const e=b.useRef();return b.useEffect(()=>{e.current=t},[t]),e.current},ph=b.forwardRef(({selected:t,active:e,onClick:n,option:r,...o},i)=>T.jsx("li",{...o,ref:i,role:"option","aria-selected":t,className:"w-full",children:T.jsx("button",{type:"button",onClick:n,"aria-selected":t,className:`p-2 w-full text-left cursor-pointer ${t?"bg-primary text-primary-foreground":""} ${e?"bg-primary-subtle text-primary-foreground":""}`,children:r.label??r.value})})),$S={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},jS={caseSensitive:!1,sort:!1},BS=[],zS=b.forwardRef(({options:t,required:e=!0,...n},r)=>{const[o,i]=b.useState(!1),[s,a]=b.useState(""),[l,c]=b.useState(n.value??n.defaultValue??""),[u,f]=b.useState(null),d=b.useRef(BS),h=hh(u),p=new Fr(t,["value"],jS).search(s),{x:m,y:g,strategy:v,refs:x,context:y}=Ki({open:o,transform:!0,onOpenChange:i,whileElementsMounted:Va,middleware:[Ra(4),s0({padding:10,apply(P){Object.assign(P.elements.floating.style,{width:`${P.rects.reference.width}px`,maxHeight:`${Math.min(480,P.availableHeight)}px`})}})]});b.useImperativeHandle(r,()=>{var P;return(P=x.domReference)==null?void 0:P.current},[x]);const S=$0(y,$S),{getReferenceProps:w,getFloatingProps:E,getItemProps:_}=qi([Yi(y,{role:"listbox"}),Gi(y),L0(y,{listRef:d,loop:!0,activeIndex:u,allowEscape:!0,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:u,virtual:!0,onNavigate:P=>{const $=p.length-1;if(P===null&&h===0)return f($);if(P===null&&h===$)return f(0);const O=P??h??null;return O===null?void 0:f(O)}})]),I=P=>{c(P.value),i(!1),a("")},D=P=>{var O;const $=P.target.value;return a($),!o&&$===""||$?i(!0):(O=n.onChange)==null?void 0:O.call(n,P)},F=()=>{i(!0),a("")},N=()=>{a(""),c(""),i(!1)};return T.jsxs("fieldset",{className:"relative w-auto",children:[T.jsx(as,{...n,required:e,right:T.jsxs("span",{className:"flex items-center gap-0.5",children:[T.jsx(Za,{size:20}),l?T.jsx("button",{type:"button",onClick:N,className:"link:text-danger transition-colors",children:T.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:T.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:T.jsx("input",{...w({...n,onChange:D,onFocus:F,ref:x.setReference,onClick:P=>P.currentTarget.focus(),onKeyDown(P){if(P.key==="Escape")return P.currentTarget.blur(),i(!1);if(P.key==="Enter"){if(u!==null&&p[u])return P.preventDefault(),I(p[u]);if(p.length===1)return P.preventDefault(),I(p[0])}}}),required:e,value:o?s:l,"aria-autocomplete":"list",autoComplete:"off",className:_t("input text-foreground group h-10 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",n.right||s?"pe-12":"",n.left?"ps-8":"",n.className)})}),T.jsx(Ui,{preserveTabOrder:!0,children:T.jsx(Ua,{closeOnFocusOut:!0,guards:!0,returnFocus:!0,context:y,initialFocus:-1,visuallyHiddenDismiss:!0,children:T.jsx("ul",{...E({ref:x.setFloating,style:{position:v,left:m??0,top:g??0,...S.styles}}),"data-floating":"true",className:"bg-floating-background shadow-floating text-foreground list-none p-0 m-0 rounded-b-lg overflow-auto origin-[top_center] overflow-y-auto z-floating",children:p.map((P,$)=>b.createElement(ph,{..._({onClick:()=>I(P),ref:O=>void(d.current[$]=O)}),key:`${P.value}-option`,option:P,selected:u===$,active:l===P.value}))})})})]})});var ct=function(){return ct=Object.assign||function(e){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)&&(e[i]=n[i])}return e},ct.apply(this,arguments)};function Cl(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function Al(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var No=function(t){return t.replace(new RegExp(" ","g")," ")},mh=function(t,e){var n=t.length,r=e+1;if(n>=r)return t;var o="0".repeat(r-n);return"".concat(o).concat(t)},HS=function(t){return t.replace(/^0+([0-9]+)/,"$1")},gh=function(t,e,n){var r=t.length-2,o=HS(t.substring(0,r)),i=t.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(e)+n+i},yh=function(t){return t===void 0&&(t=""),t.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},vh=function(t){return Number.parseFloat(t.replace(/,/g,".").replace(/(.*)\./,function(e){return"".concat(e.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},WS=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},_l=function(t){var e=b.useRef(t);return b.useEffect(function(){e.current=t},[t]),e},US=function(t){return t==="money"||t==="currency"},GS=function(t,e,n){return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return ct(ct({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Pl=function(t,e){var n=mh(yh(t),e.fraction.length),r="".concat(e.currency).concat(gh(n,e.group,e.decimal));return No(r)},KS=b.forwardRef(function(t,e){var n=t.locale,r=n===void 0?"pt-BR":n,o=t.currency,i=o===void 0?"BRL":o,s=t.currencyDisplay,a=s===void 0?"symbol":s;t.mask;var l=t.onChange,c=Cl(t,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(e,function(){return u.current});var f=b.useMemo(function(){var p=GS(r,i,a);return p.currency=No("".concat(p.currency.trim()," ")),p.literal=No(p.literal.trim()),p},[r,i]),d=function(p){var m=Pl(p.target.value,f),g=vh(m);p.target.value=m,p.target.setAttribute("data-number",g.toString()),l==null||l(p),g!==0&&(u.current.selectionEnd=m.length)},h=c.defaultValue?Pl(c.defaultValue,f):void 0;return b.createElement("input",ct({},c,{value:typeof c.value=="string"?Pl(c.value,f):c.value,defaultValue:h,type:"text",ref:u,onChange:d,inputMode:"decimal"}))}),qS=1,ZS=function(t){return t==="percentage"||t==="percent"||t==="percentual"},YS=function(t){return new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(e,n){var r;return ct(ct({},e),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Il=function(t,e){var n=mh(yh(t),e.fraction.length),r="".concat(gh(n,e.group,e.decimal)," ").concat(e.percentSign);return No(r)},XS=b.forwardRef(function(t,e){var n=t.locale,r=n===void 0?"pt-BR":n;t.mask;var o=t.onChange,i=t.onKeyUp,s=Cl(t,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=Al(b.useState(function(){var v,x;return(x=(v=s.value)===null||v===void 0?void 0:v.toString())!==null&&x!==void 0?x:""}),2),c=l[0],u=l[1];b.useImperativeHandle(e,function(){return a.current}),b.useEffect(function(){var v,x=Number.parseFloat("".concat((v=s.value)!==null&&v!==void 0?v:"0")).toFixed(f.fraction.length);u(Il(x,f))},[s.value]);var f=b.useMemo(function(){var v=YS(r);return v.percentSign=No("".concat(v.percentSign)),v},[r]),d=c.length-f.percentSign.length-qS,h=function(v){var x,y=a.current;y&&(y.setSelectionRange(d,d),v&&((x=s.onFocus)===null||x===void 0||x.call(s,v)))},p=function(v){var x=v.currentTarget;if(x.selectionStart!==null){var y=x.selectionStart,S=x.selectionEnd,w=y!==S,E=d<y;!w&&E&&h()}i==null||i(v)},m=function(v){var x=Il(v.target.value,f),y=vh(x);u(x),v.target.value=x,v.target.setAttribute("data-number",y.toString()),o==null||o(v)};b.useEffect(function(){return h()},[c]);var g=s.defaultValue?Il(s.defaultValue,f):void 0;return b.createElement("input",ct({},s,{defaultValue:g,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),Vo={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},JS=function(t){for(var e,n=t.length,r=[],o=0;o<n;o++){var i=t[o],s=ls[i];s===void 0?r.push(i.replace(Vo.dots,"\\.").replace(Vo.openParenthesis,"\\(").replace(Vo.closeParenthesis,"\\)")):r.push((e=s.regex)===null||e===void 0?void 0:e.source)}return r.join("").replace(Vo.leadingBars,"\\")},Ro=function(t,e,n){var r=typeof t=="function",o=r?"":t;if(r&&(o=t(e)),Array.isArray(o))return Ol(o,n);var i=JS(o);return n?"^".concat(i,"$"):i},QS=function(t){return t.replace(Vo.escape,"\\$&")},Ol=function(t,e){var n=t.map(function(r){return typeof r=="string"?QS(r):r.source}).join("");return new RegExp(e?"^".concat(n,"$"):n).source},ls={A:{regex:/[a-zA-Z]/,parse:function(t){return t.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(t){return t.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},eT=/\d/,bh="(dd) 9dddd-dddd",xh="(dd) dddd-dddd",wh="ddd.ddd.ddd-dd",Sh="dd.ddd.ddd/dddd-dd",cs=function(t){return t.replace(/\D/g,"")},tT=["2",/[0-3]/,":",/[0-5]/,/\d/],nT=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Pt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:wh,isoDate:"dddd-dd-dd",cnpj:Sh,telephone:xh,cellphone:bh,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(t){return t.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(t){return cs(t).length<=11?wh:Sh},int:function(t){return t===void 0&&(t=""),eT.test(t.toString().slice(-1))?"d".repeat(Math.max(t.length,0)):"d".repeat(Math.max(t.length-1,0))},cellTelephone:function(t){var e=cs(t);return e.length<11?xh:bh},time:function(t){var e=cs(t),n=e[0];return n==="2"?tT:nT}},It=function(t,e,n){var r;return n===void 0&&(n={}),ct({mask:t,inputMode:e,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof t=="function")?void 0:Ro(t,"",!0),infinity:n.infinity},n)},gt={cellTelephone:It(Pt.cellTelephone,"tel"),cellphone:It(Pt.cellphone,"tel"),cep:It(Pt.cep,"decimal"),cnpj:It(Pt.cnpj,"decimal"),color:It(Pt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:It(Pt.cpf,"decimal"),cpfCnpj:It(Pt.cpfCnpj,"decimal",{transform:cs}),creditCard:It(Pt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:It(Pt.date,"decimal"),int:It(Pt.int,"decimal",{pattern:"[0-9]+"}),isoDate:It(Pt.isoDate,"decimal"),telephone:It(Pt.telephone,"tel"),time:It(Pt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:It(Pt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Th(t,e,n,r){var o,i;r===void 0&&(r=ls);for(var s=n(t),a="",l=0,c=0;l<e.length&&c<s.length;){var u=e[l],f=u instanceof RegExp?u:r[u],d=s[c];if(f===void 0){a+=u,d===u&&(c+=1),l+=1;continue}var h=f instanceof RegExp?{regex:f}:f;h.regex.test(d)&&(a+=(i=(o=h.parse)===null||o===void 0?void 0:o.call(h,d))!==null&&i!==void 0?i:d),c+=1,l+=1}return a}var Eh=function(t){return t},rT=function(t,e,n){if(!t||!n)return!1;var r=new RegExp(Ro(t,n,e));return r.test(n)};function oT(t){var e=b.useRef(t);return b.useEffect(function(){e.current=t},[t]),e.current}var iT=b.forwardRef(function(t,e){var n=t.infinity,r=n===void 0?!1:n,o=t.strict,i=o===void 0?!0:o,s=t.transform,a=t.onChange,l=t.pattern,c=t.tokens,u=t.mask,f=t.onChangeText,d=t.as,h=Cl(t,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(e,function(){return p.current});var m=_l(a),g=_l(f),v=_l(u),x=b.useRef(rT(u,i,h.value||h.defaultValue)),y=d??"input",S=Al(b.useState(""),2),w=S[0],E=S[1],_=oT(w),I=b.useCallback(function(A,L){var V,z,Z=(V=A??L)!==null&&V!==void 0?V:"";if(u===void 0)return Z;var C=(z=Z==null?void 0:Z.toString())!==null&&z!==void 0?z:"";return Th(C,typeof u=="function"?u(C):u,s??Eh,c??ls)},[s,u,c]),D=Al(b.useState(function(){return I(h.value,h.defaultValue)}),2),F=D[0],N=D[1],P=I(h.defaultValue,h.defaultValue),$=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var A=u(F);return Array.isArray(A)?Ol(A,i):Ro(u,F,i)}return typeof u=="string"?Ro(u,F,i):Ol(u,i)},[l,F,i,u]);b.useEffect(function(){if(h.value!==void 0){var A=I(h.value,h.defaultValue);N(A),p.current!==null&&(p.current.value=A)}},[h.value,u,s,h.defaultValue]);var O=function(A){var L,V,z,Z,C,j=A.currentTarget,X=A.target.value;if(v.current===void 0)return N(X),(L=g.current)===null||L===void 0||L.call(g,X),(V=m.current)===null||V===void 0||V.call(m,A),f==null?void 0:f(X);var re=new RegExp(Ro(v.current,X,i)),ee=(z=j.selectionEnd)!==null&&z!==void 0?z:0,H=function(J,ce,B){if(J.type!=="number")return J.setSelectionRange(ce,B)};if(r&&x.current&&X.length>=F.length)return j.value=F,H(j,ee-1,ee-1);var k=!1;X.length<_.length&&(x.current=!1,k=!0),re.test(X)&&(x.current=!0);var R=ee,W=X[R-1],K=Th(X,typeof v.current=="function"?v.current(X):v.current,s??Eh,c??ls);for(j.value=K,N(K);R<K.length&&K.charAt(R-1)!==W;)R+=1;k?H(j,ee,ee):H(j,R,R),A.target.value=K,E(K),(Z=g.current)===null||Z===void 0||Z.call(g,K),(C=m.current)===null||C===void 0||C.call(m,A)};return b.createElement(y,ct({},h,{ref:p,pattern:$,onChange:O,defaultValue:Ch(h.defaultValue)?P:void 0,value:Ch(h.value)?I(h.value,h.value):h.value}))}),Ch=function(t){return typeof t=="string"},Ah=b.forwardRef(function(t,e){return US(t.mask)?b.createElement(KS,ct({},t,{mask:void 0,ref:e})):ZS(t.mask)?b.createElement(XS,ct({},t,{mask:void 0,ref:e})):b.createElement(iT,ct({},t,{ref:e}))}),Ot=function(t){return function(e){return b.createElement(Ah,ct({},t,e))}};Ot(gt.cellTelephone),Ot(gt.cellphone),Ot(gt.cep),Ot(gt.cnpj),Ot(gt.color),Ot(gt.cpf),Ot(gt.cpfCnpj),Ot(gt.creditCard),Ot(gt.date),Ot(gt.int),Ot(gt.isoDate),Ot(gt.telephone),Ot(gt.time),Ot(gt.uuid);var sT=b.forwardRef(function(e,n){var r=b.useMemo(function(){if(e.mask)return typeof e.mask=="string"&&WS(gt,e.mask)?gt[e.mask]:{mask:e.mask}},[e.mask]),o=ct(ct({},e),r);return b.createElement(Ah,ct({},o,{ref:n}))});const us=b.forwardRef(({type:t="text",container:e,next:n,rightLabel:r,optionalText:o,hideLeft:i=!1,right:s,left:a,...l},c)=>{const u=l.id??l.name,f=b.useRef(null);return b.useEffect(()=>{if(f.current===null)return;const d=f.current,h=()=>d.setAttribute("data-initialized","true"),p=m=>{const g=m;if(g.key==="Enter"&&d.enterKeyHint==="next"){const v=d.getAttribute("data-next");if(v){const x=document.getElementById(v);if(x)return x.focus(),void g.preventDefault()}}};return d.addEventListener("keydown",p),d.addEventListener("focus",h),()=>{d.removeEventListener("keydown",p),d.removeEventListener("focus",h)}},[]),T.jsx(as,{...l,right:s,left:a,hideLeft:i,rightLabel:r,optionalText:o,container:_t("group inline-block w-full",e),children:T.jsx(sT,{...l,type:t,"data-next":n,ref:El(c,f),id:u,name:u,className:_t("input text-foreground group h-10 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",s?"pe-4":"",a?"ps-4":"",l.className)})})}),sr=b.forwardRef(({container:t,required:e=!0,options:n,...r},o)=>{const i=b.useRef(null),s=r.id??r.name;return b.useEffect(()=>{if(i.current===null)return;const a=i.current,l=()=>a.setAttribute("data-initialized","true"),c=()=>a.setAttribute("data-selected","true");return a.addEventListener("focus",l),a.addEventListener("change",c),()=>{a.removeEventListener("focus",l),a.removeEventListener("change",c)}},[]),T.jsx(as,{...r,required:e,container:_t("group inline-block w-full",t),right:T.jsx(Za,{size:20}),children:T.jsxs("select",{...r,ref:El(o,i),id:s,name:s,required:e,"data-selected":!!r.value||!1,className:_t("input bg-transparent text-foreground select group h-10 w-full flex-1 rounded-md p-2 placeholder-input-placeholder outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",r.className),children:[T.jsx("option",{value:"",hidden:!0,disabled:!0,children:r.placeholder}),n.map(a=>T.jsx("option",{...a,children:a.label??a.value},`${s}-select-option-${a.value}`))]})})}),aT=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],lT=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],cT=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],uT=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],_h=(t,e,n)=>{let r=t;return typeof e=="string"||Array.isArray(e)?r=t.toLocaleString(e,n):(e===!0||n!==void 0)&&(r=t.toLocaleString(void 0,n)),r};function Ph(t,e){if(!Number.isFinite(t))throw new TypeError(`Expected a finite number, got ${typeof t}: ${t}`);e={bits:!1,binary:!1,space:!0,...e};const n=e.bits?e.binary?uT:cT:e.binary?lT:aT,r=e.space?" ":"";if(e.signed&&t===0)return` 0${r}${n[0]}`;const o=t<0,i=o?"-":e.signed?"+":"";o&&(t=-t);let s;if(e.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:e.minimumFractionDigits}),e.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:e.maximumFractionDigits,...s}),t<1){const u=_h(t,e.locale,s);return i+u+r+n[0]}const a=Math.min(Math.floor(e.binary?Math.log(t)/Math.log(1024):Math.log10(t)/3),n.length-1);t/=(e.binary?1024:1e3)**a,s||(t=t.toPrecision(3));const l=_h(Number(t),e.locale,s),c=n[a];return i+l+r+c}var kl={exports:{}},fs={exports:{}},ke={};/** @license React v16.13.1
|
|
92
|
+
`+e.prev}function rs(t,e){var n=hl(t),r=[];if(n){r.length=t.length;for(var o=0;o<t.length;o++)r[o]=Ln(t,o)?e(t[o],t):""}var i=typeof ul=="function"?ul(t):[],s;if(zr){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in t)Ln(t,l)&&(n&&String(Number(l))===l&&l<t.length||zr&&s["$"+l]instanceof Symbol||(Nd.call(/[^\w$]/,l)?r.push(e(l,t)+": "+e(t[l],t)):r.push(l+": "+e(t[l],t))));if(typeof ul=="function")for(var c=0;c<i.length;c++)$d.call(t,i[c])&&r.push("["+e(i[c])+"]: "+e(t[i[c]],t));return r}var Yd=jr,Hr=Yx,Aw=aw,_w=Po,os=Yd("%WeakMap%",!0),is=Yd("%Map%",!0),Pw=Hr("WeakMap.prototype.get",!0),Iw=Hr("WeakMap.prototype.set",!0),Ow=Hr("WeakMap.prototype.has",!0),kw=Hr("Map.prototype.get",!0),Dw=Hr("Map.prototype.set",!0),Mw=Hr("Map.prototype.has",!0),gl=function(t,e){for(var n=t,r;(r=n.next)!==null;n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},Fw=function(t,e){var n=gl(t,e);return n&&n.value},Lw=function(t,e,n){var r=gl(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},Nw=function(t,e){return!!gl(t,e)},Vw=function(){var e,n,r,o={assert:function(i){if(!o.has(i))throw new _w("Side channel does not contain "+Aw(i))},get:function(i){if(os&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Pw(e,i)}else if(is){if(n)return kw(n,i)}else if(r)return Fw(r,i)},has:function(i){if(os&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Ow(e,i)}else if(is){if(n)return Mw(n,i)}else if(r)return Nw(r,i);return!1},set:function(i,s){os&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new os),Iw(e,i,s)):is?(n||(n=new is),Dw(n,i,s)):(r||(r={key:{},next:null}),Lw(r,i,s))}};return o},Rw=String.prototype.replace,$w=/%20/g,yl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Xd={default:yl.RFC3986,formatters:{RFC1738:function(t){return Rw.call(t,$w,"+")},RFC3986:function(t){return String(t)}},RFC1738:yl.RFC1738,RFC3986:yl.RFC3986},jw=Xd,vl=Object.prototype.hasOwnProperty,or=Array.isArray,Qt=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Bw=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(or(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Jd=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<e.length;++o)typeof e[o]<"u"&&(r[o]=e[o]);return r},zw=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(or(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!vl.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var o=e;return or(e)&&!or(n)&&(o=Jd(e,r)),or(e)&&or(n)?(n.forEach(function(i,s){if(vl.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,r):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return vl.call(i,s)?i[s]=t(i[s],a,r):i[s]=a,i},o)},Hw=function(e,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},e)},Ww=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Uw=function(e,n,r,o,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;++l){var c=s.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===jw.RFC1738&&(c===40||c===41)){a+=s.charAt(l);continue}if(c<128){a=a+Qt[c];continue}if(c<2048){a=a+(Qt[192|c>>6]+Qt[128|c&63]);continue}if(c<55296||c>=57344){a=a+(Qt[224|c>>12]+Qt[128|c>>6&63]+Qt[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|s.charCodeAt(l)&1023),a+=Qt[240|c>>18]+Qt[128|c>>12&63]+Qt[128|c>>6&63]+Qt[128|c&63]}return a},Gw=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return Bw(n),e},Kw=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},qw=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Zw=function(e,n){return[].concat(e,n)},Yw=function(e,n){if(or(e)){for(var r=[],o=0;o<e.length;o+=1)r.push(n(e[o]));return r}return n(e)},Qd={arrayToObject:Jd,assign:Hw,combine:Zw,compact:Gw,decode:Ww,encode:Uw,isBuffer:qw,isRegExp:Kw,maybeMap:Yw,merge:zw},Xw=Qd,eh=Xd,Jw=Date.prototype.toISOString,th=eh.default;Xw.encode,eh.formatters[th];var Qw=Qd;Qw.decode;var nh=t=>Array.isArray(t),bl=t=>t===void 0,xl=t=>t===null,eS=Function.bind.call(Function.call,Object.prototype.toString),tS=t=>!!t&&eS(t)==="[object Error]"||t instanceof Error,rh=(t,e)=>t instanceof e,nS=t=>{const e=typeof t;return e==="undefined"||e===null||e==="number"||e==="string"||e==="boolean"||e==="bigint"},rS=t=>Object.prototype.toString.call(t)==="[object Date]"&&rh(t,Date),Mo={array:nh,date:rS,empty:t=>xl(t)||bl(t)?!0:typeof t=="object"?Object.keys(t).length===0:typeof t=="string"?t==="":Array.isArray(t)?t.length===0:Number.isNaN(t),function:t=>typeof t=="function",instance:rh,isError:tS,keyof:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),nan:t=>Number.isNaN(t),nil:t=>xl(t)||bl(t),null:xl,number:t=>typeof t=="number"||!Number.isNaN(t),object:t=>!nh(t)&&typeof t=="object",primitive:nS,string:t=>typeof t=="string",undefined:bl},wl=(t,e,n)=>{const[r,...o]=e;if(o.length>0){if(!t[r]){const i=`${+o[0]}`===o[0];t[r]=i?[]:{}}if(typeof t[r]!="object"){const i=`${+o[0]}`===o[0];t[r]=wl(i?[]:{},o,n)}else t[r]=wl(t[r],o,n)}else t[r]=n;return t},oS=t=>Object.keys(t),iS=t=>t.replace("[",".").replace("]","").split("."),oh=(t,e,n)=>{const r=Array.isArray(e)?e:iS(e),o=structuredClone(t);return wl(o,r,n),o};const Sl="-";function sS(t){const e=lS(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;function o(s){const a=s.split(Sl);return a[0]===""&&a.length!==1&&a.shift(),ih(a,e)||aS(s)}function i(s,a){const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function ih(t,e){var s;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),o=r?ih(t.slice(1),r):void 0;if(o)return o;if(e.validators.length===0)return;const i=t.join(Sl);return(s=e.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const sh=/^\[(.+)\]$/;function aS(t){if(sh.test(t)){const e=sh.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}}function lS(t){const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return uS(Object.entries(t.classGroups),n).forEach(([i,s])=>{Tl(s,r,i,e)}),r}function Tl(t,e,n,r){t.forEach(o=>{if(typeof o=="string"){const i=o===""?e:ah(e,o);i.classGroupId=n;return}if(typeof o=="function"){if(cS(o)){Tl(o(r),e,n,r);return}e.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{Tl(s,ah(e,i),n,r)})})}function ah(t,e){let n=t;return e.split(Sl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function cS(t){return t.isThemeGetter}function uS(t,e){return e?t.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[e+s,a])):i);return[n,o]}):t}function fS(t){if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),e++,e>t&&(e=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const lh="!";function dS(t){const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,o=e[0],i=e.length;function s(a){const l=[];let c=0,u=0,f;for(let g=0;g<a.length;g++){let v=a[g];if(c===0){if(v===o&&(r||a.slice(g,g+i)===e)){l.push(a.slice(u,g)),u=g+i;continue}if(v==="/"){f=g;continue}}v==="["?c++:v==="]"&&c--}const d=l.length===0?a:a.substring(u),h=d.startsWith(lh),p=h?d.substring(1):d,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:s})}:s}function hS(t){if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e}function pS(t){return{cache:fS(t.cacheSize),parseClassName:dS(t),...sS(t)}}const mS=/\s+/;function gS(t,e){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=e,i=new Set;return t.trim().split(mS).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(s);let f=!!u,d=r(f?c.substring(0,u):c);if(!d){if(!f)return{isTailwindClass:!1,originalClassName:s};if(d=r(c),!d)return{isTailwindClass:!1,originalClassName:s};f=!1}const h=hS(a).join(":");return{isTailwindClass:!0,modifierId:l?h+lh:h,classGroupId:d,originalClassName:s,hasPostfixModifier:f}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=s,u=a+l;return i.has(u)?!1:(i.add(u),o(l,c).forEach(f=>i.add(a+f)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function yS(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=ch(e))&&(r&&(r+=" "),r+=n);return r}function ch(t){if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=ch(t[r]))&&(n&&(n+=" "),n+=e);return n}function vS(t,...e){let n,r,o,i=s;function s(l){const c=e.reduce((u,f)=>f(u),t());return n=pS(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=gS(l,n);return o(l,u),u}return function(){return i(yS.apply(null,arguments))}}function Be(t){const e=n=>n[t]||[];return e.isThemeGetter=!0,e}const uh=/^\[(?:([a-z-]+):)?(.+)\]$/i,bS=/^\d+\/\d+$/,xS=new Set(["px","full","screen"]),wS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,SS=/\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$/,TS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ES=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,CS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function yn(t){return ir(t)||xS.has(t)||bS.test(t)}function Vn(t){return Wr(t,"length",MS)}function ir(t){return!!t&&!Number.isNaN(Number(t))}function ss(t){return Wr(t,"number",ir)}function Fo(t){return!!t&&Number.isInteger(Number(t))}function AS(t){return t.endsWith("%")&&ir(t.slice(0,-1))}function ye(t){return uh.test(t)}function Rn(t){return wS.test(t)}const _S=new Set(["length","size","percentage"]);function PS(t){return Wr(t,_S,fh)}function IS(t){return Wr(t,"position",fh)}const OS=new Set(["image","url"]);function kS(t){return Wr(t,OS,LS)}function DS(t){return Wr(t,"",FS)}function Lo(){return!0}function Wr(t,e,n){const r=uh.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1}function MS(t){return SS.test(t)&&!TS.test(t)}function fh(){return!1}function FS(t){return ES.test(t)}function LS(t){return CS.test(t)}function NS(){const t=Be("colors"),e=Be("spacing"),n=Be("blur"),r=Be("brightness"),o=Be("borderColor"),i=Be("borderRadius"),s=Be("borderSpacing"),a=Be("borderWidth"),l=Be("contrast"),c=Be("grayscale"),u=Be("hueRotate"),f=Be("invert"),d=Be("gap"),h=Be("gradientColorStops"),p=Be("gradientColorStopPositions"),m=Be("inset"),g=Be("margin"),v=Be("opacity"),x=Be("padding"),y=Be("saturate"),S=Be("scale"),w=Be("sepia"),E=Be("skew"),_=Be("space"),I=Be("translate"),D=()=>["auto","contain","none"],F=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto",ye,e],P=()=>[ye,e],$=()=>["",yn,Vn],O=()=>["auto",ir,ye],A=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",ye],C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[ir,ss],X=()=>[ir,ye];return{cacheSize:500,separator:":",theme:{colors:[Lo],spacing:[yn,Vn],blur:["none","",Rn,ye],brightness:j(),borderColor:[t],borderRadius:["none","","full",Rn,ye],borderSpacing:P(),borderWidth:$(),contrast:j(),grayscale:Z(),hueRotate:X(),invert:Z(),gap:P(),gradientColorStops:[t],gradientColorStopPositions:[AS,Vn],inset:N(),margin:N(),opacity:j(),padding:P(),saturate:j(),scale:j(),sepia:Z(),skew:X(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",ye]}],container:["container"],columns:[{columns:[Rn]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...A(),ye]}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Fo,ye]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ye]}],grow:[{grow:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Fo,ye]}],"grid-cols":[{"grid-cols":[Lo]}],"col-start-end":[{col:["auto",{span:["full",Fo,ye]},ye]}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":[Lo]}],"row-start-end":[{row:["auto",{span:[Fo,ye]},ye]}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ye]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ye,e]}],"min-w":[{"min-w":[ye,e,"min","max","fit"]}],"max-w":[{"max-w":[ye,e,"none","full","min","max","fit","prose",{screen:[Rn]},Rn]}],h:[{h:[ye,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ye,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ye,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ye,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Rn,Vn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ss]}],"font-family":[{font:[Lo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ye]}],"line-clamp":[{"line-clamp":["none",ir,ss]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",yn,ye]}],"list-image":[{"list-image":["none",ye]}],"list-style-type":[{list:["none","disc","decimal",ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",yn,Vn]}],"underline-offset":[{"underline-offset":["auto",yn,ye]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye]}],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",ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...A(),IS]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",PS]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},kS]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:L()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[yn,ye]}],"outline-w":[{outline:[yn,Vn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[yn,Vn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Rn,DS]}],"shadow-color":[{shadow:[Lo]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Rn,ye]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[y]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ye]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",ye]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Fo,ye]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ye]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",ye]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[yn,Vn,ss]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const VS=vS(NS),El=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n!==null&&(n.current=e)})},RS=t=>t.$$typeof===Symbol.for("react.forward_ref")||t.$$typeof===Symbol.for("react.fragment")?!0:t.$$typeof===Symbol.for("react.element"),$S=t=>Mo.function(t),_t=(...t)=>VS(J0(t)),dh=({reportStatus:t,hideLeft:e=!1,className:n,children:r,title:o})=>T.jsxs("div",{className:_t("w-full justify-between",e&&r===null?"hidden":"flex",n),children:[e?null:T.jsxs("span",{className:"flex items-center gap-1 group-hover:text-primary group-focus-within:text-primary transition-colors group-error:text-danger",children:[o,t?T.jsxs("span",{className:"flex aspect-square h-4 w-4 items-center justify-center",children:[T.jsx(G0,{className:"hidden aspect-square h-3 w-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}),T.jsx(K0,{className:"hidden aspect-square h-3 w-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}),r]}),as=({optionalText:t="Optional",left:e,rightLabel:n,container:r,right:o,children:i,error:s,form:a,id:l,name:c,title:u,placeholder:f,hideLeft:d,required:h})=>{const p=l??c;return T.jsxs("fieldset",{"data-error":!!s,form:a,className:_t("group inline-block w-full",r),children:[T.jsxs("label",{form:a,htmlFor:p,className:"inline-flex w-full cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-error:text-danger group-hover:border-primary",children:[!d&&!n?T.jsx(dh,{hideLeft:d,reportStatus:!0,title:u,placeholder:f,children:t||n?T.jsxs(b.Fragment,{children:[h?null:T.jsx("span",{className:"text-opacity-70",children:t}),n?T.jsx(b.Fragment,{children:n}):null]}):null}):null,T.jsxs("div",{className:"relative group flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-focus-within:border-primary group-hover:border-primary group-error:border-danger",children:[e?T.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:e}):null,i,o?T.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:o}):null]})]}),T.jsx("p",{className:"mt-1 text-xs group-error:block group-error:text-danger",children:s})]})},hh=t=>{const e=b.useRef();return b.useEffect(()=>{e.current=t},[t]),e.current},ph=b.forwardRef(({selected:t,active:e,onClick:n,option:r,...o},i)=>T.jsx("li",{...o,ref:i,role:"option","aria-selected":t,className:"w-full",children:T.jsx("button",{type:"button",onClick:n,"aria-selected":t,className:`p-2 w-full text-left cursor-pointer ${t?"bg-primary text-primary-foreground":""} ${e?"bg-primary-subtle text-primary-foreground":""}`,children:r.label??r.value})})),jS={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},BS={caseSensitive:!1,sort:!1},zS=[],HS=b.forwardRef(({options:t,required:e=!0,...n},r)=>{const[o,i]=b.useState(!1),[s,a]=b.useState(""),[l,c]=b.useState(n.value??n.defaultValue??""),[u,f]=b.useState(null),d=b.useRef(zS),h=hh(u),p=new Fr(t,["value"],BS).search(s),{x:m,y:g,strategy:v,refs:x,context:y}=Ki({open:o,transform:!0,onOpenChange:i,whileElementsMounted:Va,middleware:[Ra(4),a0({padding:10,apply(P){Object.assign(P.elements.floating.style,{width:`${P.rects.reference.width}px`,maxHeight:`${Math.min(480,P.availableHeight)}px`})}})]});b.useImperativeHandle(r,()=>{var P;return(P=x.domReference)==null?void 0:P.current},[x]);const S=j0(y,jS),{getReferenceProps:w,getFloatingProps:E,getItemProps:_}=qi([Yi(y,{role:"listbox"}),Gi(y),N0(y,{listRef:d,loop:!0,activeIndex:u,allowEscape:!0,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:u,virtual:!0,onNavigate:P=>{const $=p.length-1;if(P===null&&h===0)return f($);if(P===null&&h===$)return f(0);const O=P??h??null;return O===null?void 0:f(O)}})]),I=P=>{c(P.value),i(!1),a("")},D=P=>{var O;const $=P.target.value;return a($),!o&&$===""||$?i(!0):(O=n.onChange)==null?void 0:O.call(n,P)},F=()=>{i(!0),a("")},N=()=>{a(""),c(""),i(!1)};return T.jsxs("fieldset",{className:"relative w-auto",children:[T.jsx(as,{...n,required:e,right:T.jsxs("span",{className:"flex items-center gap-0.5",children:[T.jsx(Za,{size:20}),l?T.jsx("button",{type:"button",onClick:N,className:"link:text-danger transition-colors",children:T.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:T.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:T.jsx("input",{...w({...n,onChange:D,onFocus:F,ref:x.setReference,onClick:P=>P.currentTarget.focus(),onKeyDown(P){if(P.key==="Escape")return P.currentTarget.blur(),i(!1);if(P.key==="Enter"){if(u!==null&&p[u])return P.preventDefault(),I(p[u]);if(p.length===1)return P.preventDefault(),I(p[0])}}}),required:e,value:o?s:l,"aria-autocomplete":"list",autoComplete:"off",className:_t("input text-foreground group h-10 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",n.right||s?"pe-12":"",n.left?"ps-8":"",n.className)})}),T.jsx(Ui,{preserveTabOrder:!0,children:T.jsx(Ua,{closeOnFocusOut:!0,guards:!0,returnFocus:!0,context:y,initialFocus:-1,visuallyHiddenDismiss:!0,children:T.jsx("ul",{...E({ref:x.setFloating,style:{position:v,left:m??0,top:g??0,...S.styles}}),"data-floating":"true",className:"bg-floating-background shadow-floating text-foreground list-none p-0 m-0 rounded-b-lg overflow-auto origin-[top_center] overflow-y-auto z-floating",children:p.map((P,$)=>b.createElement(ph,{..._({onClick:()=>I(P),ref:O=>void(d.current[$]=O)}),key:`${P.value}-option`,option:P,selected:u===$,active:l===P.value}))})})})]})});var ct=function(){return ct=Object.assign||function(e){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)&&(e[i]=n[i])}return e},ct.apply(this,arguments)};function Cl(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function Al(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var No=function(t){return t.replace(new RegExp(" ","g")," ")},mh=function(t,e){var n=t.length,r=e+1;if(n>=r)return t;var o="0".repeat(r-n);return"".concat(o).concat(t)},WS=function(t){return t.replace(/^0+([0-9]+)/,"$1")},gh=function(t,e,n){var r=t.length-2,o=WS(t.substring(0,r)),i=t.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(e)+n+i},yh=function(t){return t===void 0&&(t=""),t.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},vh=function(t){return Number.parseFloat(t.replace(/,/g,".").replace(/(.*)\./,function(e){return"".concat(e.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},US=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},_l=function(t){var e=b.useRef(t);return b.useEffect(function(){e.current=t},[t]),e},GS=function(t){return t==="money"||t==="currency"},KS=function(t,e,n){return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return ct(ct({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Pl=function(t,e){var n=mh(yh(t),e.fraction.length),r="".concat(e.currency).concat(gh(n,e.group,e.decimal));return No(r)},qS=b.forwardRef(function(t,e){var n=t.locale,r=n===void 0?"pt-BR":n,o=t.currency,i=o===void 0?"BRL":o,s=t.currencyDisplay,a=s===void 0?"symbol":s;t.mask;var l=t.onChange,c=Cl(t,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(e,function(){return u.current});var f=b.useMemo(function(){var p=KS(r,i,a);return p.currency=No("".concat(p.currency.trim()," ")),p.literal=No(p.literal.trim()),p},[r,i]),d=function(p){var m=Pl(p.target.value,f),g=vh(m);p.target.value=m,p.target.setAttribute("data-number",g.toString()),l==null||l(p),g!==0&&(u.current.selectionEnd=m.length)},h=c.defaultValue?Pl(c.defaultValue,f):void 0;return b.createElement("input",ct({},c,{value:typeof c.value=="string"?Pl(c.value,f):c.value,defaultValue:h,type:"text",ref:u,onChange:d,inputMode:"decimal"}))}),ZS=1,YS=function(t){return t==="percentage"||t==="percent"||t==="percentual"},XS=function(t){return new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(e,n){var r;return ct(ct({},e),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Il=function(t,e){var n=mh(yh(t),e.fraction.length),r="".concat(gh(n,e.group,e.decimal)," ").concat(e.percentSign);return No(r)},JS=b.forwardRef(function(t,e){var n=t.locale,r=n===void 0?"pt-BR":n;t.mask;var o=t.onChange,i=t.onKeyUp,s=Cl(t,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=Al(b.useState(function(){var v,x;return(x=(v=s.value)===null||v===void 0?void 0:v.toString())!==null&&x!==void 0?x:""}),2),c=l[0],u=l[1];b.useImperativeHandle(e,function(){return a.current}),b.useEffect(function(){var v,x=Number.parseFloat("".concat((v=s.value)!==null&&v!==void 0?v:"0")).toFixed(f.fraction.length);u(Il(x,f))},[s.value]);var f=b.useMemo(function(){var v=XS(r);return v.percentSign=No("".concat(v.percentSign)),v},[r]),d=c.length-f.percentSign.length-ZS,h=function(v){var x,y=a.current;y&&(y.setSelectionRange(d,d),v&&((x=s.onFocus)===null||x===void 0||x.call(s,v)))},p=function(v){var x=v.currentTarget;if(x.selectionStart!==null){var y=x.selectionStart,S=x.selectionEnd,w=y!==S,E=d<y;!w&&E&&h()}i==null||i(v)},m=function(v){var x=Il(v.target.value,f),y=vh(x);u(x),v.target.value=x,v.target.setAttribute("data-number",y.toString()),o==null||o(v)};b.useEffect(function(){return h()},[c]);var g=s.defaultValue?Il(s.defaultValue,f):void 0;return b.createElement("input",ct({},s,{defaultValue:g,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),Vo={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},QS=function(t){for(var e,n=t.length,r=[],o=0;o<n;o++){var i=t[o],s=ls[i];s===void 0?r.push(i.replace(Vo.dots,"\\.").replace(Vo.openParenthesis,"\\(").replace(Vo.closeParenthesis,"\\)")):r.push((e=s.regex)===null||e===void 0?void 0:e.source)}return r.join("").replace(Vo.leadingBars,"\\")},Ro=function(t,e,n){var r=typeof t=="function",o=r?"":t;if(r&&(o=t(e)),Array.isArray(o))return Ol(o,n);var i=QS(o);return n?"^".concat(i,"$"):i},eT=function(t){return t.replace(Vo.escape,"\\$&")},Ol=function(t,e){var n=t.map(function(r){return typeof r=="string"?eT(r):r.source}).join("");return new RegExp(e?"^".concat(n,"$"):n).source},ls={A:{regex:/[a-zA-Z]/,parse:function(t){return t.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(t){return t.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},tT=/\d/,bh="(dd) 9dddd-dddd",xh="(dd) dddd-dddd",wh="ddd.ddd.ddd-dd",Sh="dd.ddd.ddd/dddd-dd",cs=function(t){return t.replace(/\D/g,"")},nT=["2",/[0-3]/,":",/[0-5]/,/\d/],rT=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Pt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:wh,isoDate:"dddd-dd-dd",cnpj:Sh,telephone:xh,cellphone:bh,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(t){return t.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(t){return cs(t).length<=11?wh:Sh},int:function(t){return t===void 0&&(t=""),tT.test(t.toString().slice(-1))?"d".repeat(Math.max(t.length,0)):"d".repeat(Math.max(t.length-1,0))},cellTelephone:function(t){var e=cs(t);return e.length<11?xh:bh},time:function(t){var e=cs(t),n=e[0];return n==="2"?nT:rT}},It=function(t,e,n){var r;return n===void 0&&(n={}),ct({mask:t,inputMode:e,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof t=="function")?void 0:Ro(t,"",!0),infinity:n.infinity},n)},gt={cellTelephone:It(Pt.cellTelephone,"tel"),cellphone:It(Pt.cellphone,"tel"),cep:It(Pt.cep,"decimal"),cnpj:It(Pt.cnpj,"decimal"),color:It(Pt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:It(Pt.cpf,"decimal"),cpfCnpj:It(Pt.cpfCnpj,"decimal",{transform:cs}),creditCard:It(Pt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:It(Pt.date,"decimal"),int:It(Pt.int,"decimal",{pattern:"[0-9]+"}),isoDate:It(Pt.isoDate,"decimal"),telephone:It(Pt.telephone,"tel"),time:It(Pt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:It(Pt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Th(t,e,n,r){var o,i;r===void 0&&(r=ls);for(var s=n(t),a="",l=0,c=0;l<e.length&&c<s.length;){var u=e[l],f=u instanceof RegExp?u:r[u],d=s[c];if(f===void 0){a+=u,d===u&&(c+=1),l+=1;continue}var h=f instanceof RegExp?{regex:f}:f;h.regex.test(d)&&(a+=(i=(o=h.parse)===null||o===void 0?void 0:o.call(h,d))!==null&&i!==void 0?i:d),c+=1,l+=1}return a}var Eh=function(t){return t},oT=function(t,e,n){if(!t||!n)return!1;var r=new RegExp(Ro(t,n,e));return r.test(n)};function iT(t){var e=b.useRef(t);return b.useEffect(function(){e.current=t},[t]),e.current}var sT=b.forwardRef(function(t,e){var n=t.infinity,r=n===void 0?!1:n,o=t.strict,i=o===void 0?!0:o,s=t.transform,a=t.onChange,l=t.pattern,c=t.tokens,u=t.mask,f=t.onChangeText,d=t.as,h=Cl(t,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(e,function(){return p.current});var m=_l(a),g=_l(f),v=_l(u),x=b.useRef(oT(u,i,h.value||h.defaultValue)),y=d??"input",S=Al(b.useState(""),2),w=S[0],E=S[1],_=iT(w),I=b.useCallback(function(A,L){var V,z,Z=(V=A??L)!==null&&V!==void 0?V:"";if(u===void 0)return Z;var C=(z=Z==null?void 0:Z.toString())!==null&&z!==void 0?z:"";return Th(C,typeof u=="function"?u(C):u,s??Eh,c??ls)},[s,u,c]),D=Al(b.useState(function(){return I(h.value,h.defaultValue)}),2),F=D[0],N=D[1],P=I(h.defaultValue,h.defaultValue),$=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var A=u(F);return Array.isArray(A)?Ol(A,i):Ro(u,F,i)}return typeof u=="string"?Ro(u,F,i):Ol(u,i)},[l,F,i,u]);b.useEffect(function(){if(h.value!==void 0){var A=I(h.value,h.defaultValue);N(A),p.current!==null&&(p.current.value=A)}},[h.value,u,s,h.defaultValue]);var O=function(A){var L,V,z,Z,C,j=A.currentTarget,X=A.target.value;if(v.current===void 0)return N(X),(L=g.current)===null||L===void 0||L.call(g,X),(V=m.current)===null||V===void 0||V.call(m,A),f==null?void 0:f(X);var re=new RegExp(Ro(v.current,X,i)),ee=(z=j.selectionEnd)!==null&&z!==void 0?z:0,H=function(J,ce,B){if(J.type!=="number")return J.setSelectionRange(ce,B)};if(r&&x.current&&X.length>=F.length)return j.value=F,H(j,ee-1,ee-1);var k=!1;X.length<_.length&&(x.current=!1,k=!0),re.test(X)&&(x.current=!0);var R=ee,W=X[R-1],K=Th(X,typeof v.current=="function"?v.current(X):v.current,s??Eh,c??ls);for(j.value=K,N(K);R<K.length&&K.charAt(R-1)!==W;)R+=1;k?H(j,ee,ee):H(j,R,R),A.target.value=K,E(K),(Z=g.current)===null||Z===void 0||Z.call(g,K),(C=m.current)===null||C===void 0||C.call(m,A)};return b.createElement(y,ct({},h,{ref:p,pattern:$,onChange:O,defaultValue:Ch(h.defaultValue)?P:void 0,value:Ch(h.value)?I(h.value,h.value):h.value}))}),Ch=function(t){return typeof t=="string"},Ah=b.forwardRef(function(t,e){return GS(t.mask)?b.createElement(qS,ct({},t,{mask:void 0,ref:e})):YS(t.mask)?b.createElement(JS,ct({},t,{mask:void 0,ref:e})):b.createElement(sT,ct({},t,{ref:e}))}),Ot=function(t){return function(e){return b.createElement(Ah,ct({},t,e))}};Ot(gt.cellTelephone),Ot(gt.cellphone),Ot(gt.cep),Ot(gt.cnpj),Ot(gt.color),Ot(gt.cpf),Ot(gt.cpfCnpj),Ot(gt.creditCard),Ot(gt.date),Ot(gt.int),Ot(gt.isoDate),Ot(gt.telephone),Ot(gt.time),Ot(gt.uuid);var aT=b.forwardRef(function(e,n){var r=b.useMemo(function(){if(e.mask)return typeof e.mask=="string"&&US(gt,e.mask)?gt[e.mask]:{mask:e.mask}},[e.mask]),o=ct(ct({},e),r);return b.createElement(Ah,ct({},o,{ref:n}))});const us=b.forwardRef(({type:t="text",container:e,next:n,rightLabel:r,optionalText:o,hideLeft:i=!1,right:s,left:a,...l},c)=>{const u=l.id??l.name,f=b.useRef(null);return b.useEffect(()=>{if(f.current===null)return;const d=f.current,h=()=>d.setAttribute("data-initialized","true"),p=m=>{const g=m;if(g.key==="Enter"&&d.enterKeyHint==="next"){const v=d.getAttribute("data-next");if(v){const x=document.getElementById(v);if(x)return x.focus(),void g.preventDefault()}}};return d.addEventListener("keydown",p),d.addEventListener("focus",h),()=>{d.removeEventListener("keydown",p),d.removeEventListener("focus",h)}},[]),T.jsx(as,{...l,right:s,left:a,hideLeft:i,rightLabel:r,optionalText:o,container:_t("group inline-block w-full",e),children:T.jsx(aT,{...l,type:t,"data-next":n,ref:El(c,f),id:u,name:u,className:_t("input text-foreground group h-10 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",s?"pe-4":"",a?"ps-4":"",l.className)})})}),sr=b.forwardRef(({container:t,required:e=!0,options:n,...r},o)=>{const i=b.useRef(null),s=r.id??r.name;return b.useEffect(()=>{if(i.current===null)return;const a=i.current,l=()=>a.setAttribute("data-initialized","true"),c=()=>a.setAttribute("data-selected","true");return a.addEventListener("focus",l),a.addEventListener("change",c),()=>{a.removeEventListener("focus",l),a.removeEventListener("change",c)}},[]),T.jsx(as,{...r,required:e,container:_t("group inline-block w-full",t),right:T.jsx(Za,{size:20}),children:T.jsxs("select",{...r,ref:El(o,i),id:s,name:s,required:e,"data-selected":!!r.value||!1,className:_t("input bg-transparent text-foreground select group h-10 w-full flex-1 rounded-md p-2 placeholder-input-placeholder outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",r.className),children:[T.jsx("option",{value:"",hidden:!0,disabled:!0,children:r.placeholder}),n.map(a=>T.jsx("option",{...a,children:a.label??a.value},`${s}-select-option-${a.value}`))]})})}),lT=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],cT=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],uT=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],fT=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],_h=(t,e,n)=>{let r=t;return typeof e=="string"||Array.isArray(e)?r=t.toLocaleString(e,n):(e===!0||n!==void 0)&&(r=t.toLocaleString(void 0,n)),r};function Ph(t,e){if(!Number.isFinite(t))throw new TypeError(`Expected a finite number, got ${typeof t}: ${t}`);e={bits:!1,binary:!1,space:!0,...e};const n=e.bits?e.binary?fT:uT:e.binary?cT:lT,r=e.space?" ":"";if(e.signed&&t===0)return` 0${r}${n[0]}`;const o=t<0,i=o?"-":e.signed?"+":"";o&&(t=-t);let s;if(e.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:e.minimumFractionDigits}),e.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:e.maximumFractionDigits,...s}),t<1){const u=_h(t,e.locale,s);return i+u+r+n[0]}const a=Math.min(Math.floor(e.binary?Math.log(t)/Math.log(1024):Math.log10(t)/3),n.length-1);t/=(e.binary?1024:1e3)**a,s||(t=t.toPrecision(3));const l=_h(Number(t),e.locale,s),c=n[a];return i+l+r+c}var kl={exports:{}},fs={exports:{}},ke={};/** @license React v16.13.1
|
|
93
93
|
* react-is.production.min.js
|
|
94
94
|
*
|
|
95
95
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
96
96
|
*
|
|
97
97
|
* This source code is licensed under the MIT license found in the
|
|
98
98
|
* LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/var Ih;function
|
|
99
|
+
*/var Ih;function dT(){if(Ih)return ke;Ih=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function y(w){if(typeof w=="object"&&w!==null){var E=w.$$typeof;switch(E){case e:switch(w=w.type,w){case l:case c:case r:case i:case o:case f:return w;default:switch(w=w&&w.$$typeof,w){case a:case u:case p:case h:case s:return w;default:return E}}case n:return E}}}function S(w){return y(w)===c}return ke.AsyncMode=l,ke.ConcurrentMode=c,ke.ContextConsumer=a,ke.ContextProvider=s,ke.Element=e,ke.ForwardRef=u,ke.Fragment=r,ke.Lazy=p,ke.Memo=h,ke.Portal=n,ke.Profiler=i,ke.StrictMode=o,ke.Suspense=f,ke.isAsyncMode=function(w){return S(w)||y(w)===l},ke.isConcurrentMode=S,ke.isContextConsumer=function(w){return y(w)===a},ke.isContextProvider=function(w){return y(w)===s},ke.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},ke.isForwardRef=function(w){return y(w)===u},ke.isFragment=function(w){return y(w)===r},ke.isLazy=function(w){return y(w)===p},ke.isMemo=function(w){return y(w)===h},ke.isPortal=function(w){return y(w)===n},ke.isProfiler=function(w){return y(w)===i},ke.isStrictMode=function(w){return y(w)===o},ke.isSuspense=function(w){return y(w)===f},ke.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===i||w===o||w===f||w===d||typeof w=="object"&&w!==null&&(w.$$typeof===p||w.$$typeof===h||w.$$typeof===s||w.$$typeof===a||w.$$typeof===u||w.$$typeof===g||w.$$typeof===v||w.$$typeof===x||w.$$typeof===m)},ke.typeOf=y,ke}var De={};/** @license React v16.13.1
|
|
100
100
|
* react-is.development.js
|
|
101
101
|
*
|
|
102
102
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the MIT license found in the
|
|
105
105
|
* LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/var Oh;function
|
|
106
|
+
*/var Oh;function hT(){return Oh||(Oh=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function y(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===f||B===d||typeof B=="object"&&B!==null&&(B.$$typeof===p||B.$$typeof===h||B.$$typeof===s||B.$$typeof===a||B.$$typeof===u||B.$$typeof===g||B.$$typeof===v||B.$$typeof===x||B.$$typeof===m)}function S(B){if(typeof B=="object"&&B!==null){var Me=B.$$typeof;switch(Me){case e:var Ue=B.type;switch(Ue){case l:case c:case r:case i:case o:case f:return Ue;default:var Qe=Ue&&Ue.$$typeof;switch(Qe){case a:case u:case p:case h:case s:return Qe;default:return Me}}case n:return Me}}}var w=l,E=c,_=a,I=s,D=e,F=u,N=r,P=p,$=h,O=n,A=i,L=o,V=f,z=!1;function Z(B){return z||(z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),C(B)||S(B)===l}function C(B){return S(B)===c}function j(B){return S(B)===a}function X(B){return S(B)===s}function re(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function ee(B){return S(B)===u}function H(B){return S(B)===r}function k(B){return S(B)===p}function R(B){return S(B)===h}function W(B){return S(B)===n}function K(B){return S(B)===i}function J(B){return S(B)===o}function ce(B){return S(B)===f}De.AsyncMode=w,De.ConcurrentMode=E,De.ContextConsumer=_,De.ContextProvider=I,De.Element=D,De.ForwardRef=F,De.Fragment=N,De.Lazy=P,De.Memo=$,De.Portal=O,De.Profiler=A,De.StrictMode=L,De.Suspense=V,De.isAsyncMode=Z,De.isConcurrentMode=C,De.isContextConsumer=j,De.isContextProvider=X,De.isElement=re,De.isForwardRef=ee,De.isFragment=H,De.isLazy=k,De.isMemo=R,De.isPortal=W,De.isProfiler=K,De.isStrictMode=J,De.isSuspense=ce,De.isValidElementType=y,De.typeOf=S}()),De}var kh;function Dh(){return kh||(kh=1,process.env.NODE_ENV==="production"?fs.exports=dT():fs.exports=hT()),fs.exports}/*
|
|
107
107
|
object-assign
|
|
108
108
|
(c) Sindre Sorhus
|
|
109
109
|
@license MIT
|
|
110
|
-
*/var Dl,Mh;function
|
|
111
|
-
Valid keys: `+JSON.stringify(Object.keys(C),null," "));var B=ce(R,J,ee,H,k+"."+J,n);if(B)return B}return null}return g(j)}function O(C){switch(typeof C){case"number":case"string":case"undefined":return!0;case"boolean":return!C;case"object":if(Array.isArray(C))return C.every(O);if(C===null||a(C))return!0;var j=f(C);if(j){var X=j.call(C),re;if(j!==C.entries){for(;!(re=X.next()).done;)if(!O(re.value))return!1}else for(;!(re=X.next()).done;){var ee=re.value;if(ee&&!O(ee[1]))return!1}}else return!1;return!0;default:return!1}}function A(C,j){return C==="symbol"?!0:j?j["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&j instanceof Symbol:!1}function L(C){var j=typeof C;return Array.isArray(C)?"array":C instanceof RegExp?"object":A(j,C)?"symbol":j}function V(C){if(typeof C>"u"||C===null)return""+C;var j=L(C);if(j==="object"){if(C instanceof Date)return"date";if(C instanceof RegExp)return"regexp"}return j}function z(C){var j=V(C);switch(j){case"array":case"object":return"an "+j;case"boolean":case"date":case"regexp":return"a "+j;default:return j}}function Z(C){return!C.constructor||!C.constructor.name?d:C.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Vl}var Rl,$h;function
|
|
112
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
113
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yh(t,e){if(t){if(typeof t=="string")return jl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jl(t,e)}}function jl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function
|
|
114
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
115
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function op(t,e){if(t){if(typeof t=="string")return zl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zl(t,e)}}function zl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function cE(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(t);!(o=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function uE(t){if(Array.isArray(t))return t}function ip(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ge(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ip(Object(n),!0).forEach(function(r){Hl(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ip(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Hl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ms(t,e){if(t==null)return{};var n=fE(t,e),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function fE(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}var Wl=b.forwardRef(function(t,e){var n=t.children,r=ms(t,eE),o=ap(r),i=o.open,s=ms(o,tE);return b.useImperativeHandle(e,function(){return{open:i}},[i]),b.createElement(b.Fragment,null,n(Ge(Ge({},s),{},{open:i})))});Wl.displayName="Dropzone";var sp={disabled:!1,getFilesFromEvent:TT,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Wl.defaultProps=sp,Wl.propTypes={children:Ve.func,accept:Ve.objectOf(Ve.arrayOf(Ve.string)),multiple:Ve.bool,preventDropOnDocument:Ve.bool,noClick:Ve.bool,noKeyboard:Ve.bool,noDrag:Ve.bool,noDragEventsBubbling:Ve.bool,minSize:Ve.number,maxSize:Ve.number,maxFiles:Ve.number,disabled:Ve.bool,getFilesFromEvent:Ve.func,onFileDialogCancel:Ve.func,onFileDialogOpen:Ve.func,useFsAccessApi:Ve.bool,autoFocus:Ve.bool,onDragEnter:Ve.func,onDragLeave:Ve.func,onDragOver:Ve.func,onDrop:Ve.func,onDropAccepted:Ve.func,onDropRejected:Ve.func,onError:Ve.func,validator:Ve.func};var Ul={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ap(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=Ge(Ge({},sp),t),n=e.accept,r=e.disabled,o=e.getFilesFromEvent,i=e.maxSize,s=e.minSize,a=e.multiple,l=e.maxFiles,c=e.onDragEnter,u=e.onDragLeave,f=e.onDragOver,d=e.onDrop,h=e.onDropAccepted,p=e.onDropRejected,m=e.onFileDialogCancel,g=e.onFileDialogOpen,v=e.useFsAccessApi,x=e.autoFocus,y=e.preventDropOnDocument,S=e.noClick,w=e.noKeyboard,E=e.noDrag,_=e.noDragEventsBubbling,I=e.onError,D=e.validator,F=b.useMemo(function(){return XT(n)},[n]),N=b.useMemo(function(){return YT(n)},[n]),P=b.useMemo(function(){return typeof g=="function"?g:lp},[g]),$=b.useMemo(function(){return typeof m=="function"?m:lp},[m]),O=b.useRef(null),A=b.useRef(null),L=b.useReducer(dE,Ul),V=Bl(L,2),z=V[0],Z=V[1],C=z.isFocused,j=z.isFileDialogActive,X=b.useRef(typeof window<"u"&&window.isSecureContext&&v&&ZT()),re=function(){!X.current&&j&&setTimeout(function(){if(A.current){var oe=A.current.files;oe.length||(Z({type:"closeDialog"}),$())}},300)};b.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[A,j,$,X]);var ee=b.useRef([]),H=function(oe){O.current&&O.current.contains(oe.target)||(oe.preventDefault(),ee.current=[])};b.useEffect(function(){return y&&(document.addEventListener("dragover",tp,!1),document.addEventListener("drop",H,!1)),function(){y&&(document.removeEventListener("dragover",tp),document.removeEventListener("drop",H))}},[O,y]),b.useEffect(function(){return!r&&x&&O.current&&O.current.focus(),function(){}},[O,x,r]);var k=b.useCallback(function(q){I?I(q):console.error(q)},[I]),R=b.useCallback(function(q){q.preventDefault(),q.persist(),me(q),ee.current=[].concat(oE(ee.current),[q.target]),ps(q)&&Promise.resolve(o(q)).then(function(oe){if(!(hs(q)&&!_)){var Ne=oe.length,qe=Ne>0&&UT({files:oe,accept:F,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:D}),ht=Ne>0&&!qe;Z({isDragAccept:qe,isDragReject:ht,isDragActive:!0,type:"setDraggedFiles"}),c&&c(q)}}).catch(function(oe){return k(oe)})},[o,c,k,_,F,s,i,a,l,D]),W=b.useCallback(function(q){q.preventDefault(),q.persist(),me(q);var oe=ps(q);if(oe&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return oe&&f&&f(q),!1},[f,_]),K=b.useCallback(function(q){q.preventDefault(),q.persist(),me(q);var oe=ee.current.filter(function(qe){return O.current&&O.current.contains(qe)}),Ne=oe.indexOf(q.target);Ne!==-1&&oe.splice(Ne,1),ee.current=oe,!(oe.length>0)&&(Z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ps(q)&&u&&u(q))},[O,u,_]),J=b.useCallback(function(q,oe){var Ne=[],qe=[];q.forEach(function(ht){var dn=Qh(ht,F),ot=Bl(dn,2),hn=ot[0],Ai=ot[1],vo=ep(ht,s,i),ba=Bl(vo,2),Qu=ba[0],ef=ba[1],tf=D?D(ht):null;if(hn&&Qu&&!tf)Ne.push(ht);else{var nf=[Ai,ef];tf&&(nf=nf.concat(tf)),qe.push({file:ht,errors:nf.filter(function(gD){return gD})})}}),(!a&&Ne.length>1||a&&l>=1&&Ne.length>l)&&(Ne.forEach(function(ht){qe.push({file:ht,errors:[WT]})}),Ne.splice(0)),Z({acceptedFiles:Ne,fileRejections:qe,type:"setFiles"}),d&&d(Ne,qe,oe),qe.length>0&&p&&p(qe,oe),Ne.length>0&&h&&h(Ne,oe)},[Z,a,F,s,i,l,d,h,p,D]),ce=b.useCallback(function(q){q.preventDefault(),q.persist(),me(q),ee.current=[],ps(q)&&Promise.resolve(o(q)).then(function(oe){hs(q)&&!_||J(oe,q)}).catch(function(oe){return k(oe)}),Z({type:"reset"})},[o,J,k,_]),B=b.useCallback(function(){if(X.current){Z({type:"openDialog"}),P();var q={multiple:a,types:N};window.showOpenFilePicker(q).then(function(oe){return o(oe)}).then(function(oe){J(oe,null),Z({type:"closeDialog"})}).catch(function(oe){JT(oe)?($(oe),Z({type:"closeDialog"})):QT(oe)?(X.current=!1,A.current?(A.current.value=null,A.current.click()):k(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."))):k(oe)});return}A.current&&(Z({type:"openDialog"}),P(),A.current.value=null,A.current.click())},[Z,P,$,v,J,k,N,a]),Me=b.useCallback(function(q){!O.current||!O.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),B())},[O,B]),Ue=b.useCallback(function(){Z({type:"focus"})},[]),Qe=b.useCallback(function(){Z({type:"blur"})},[]),ae=b.useCallback(function(){S||(qT()?setTimeout(B,0):B())},[S,B]),_e=function(oe){return r?null:oe},Te=function(oe){return w?null:_e(oe)},Ae=function(oe){return E?null:_e(oe)},me=function(oe){_&&oe.stopPropagation()},Oe=b.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=q.refKey,Ne=oe===void 0?"ref":oe,qe=q.role,ht=q.onKeyDown,dn=q.onFocus,ot=q.onBlur,hn=q.onClick,Ai=q.onDragEnter,vo=q.onDragOver,ba=q.onDragLeave,Qu=q.onDrop,ef=ms(q,nE);return Ge(Ge(Hl({onKeyDown:Te(en(ht,Me)),onFocus:Te(en(dn,Ue)),onBlur:Te(en(ot,Qe)),onClick:_e(en(hn,ae)),onDragEnter:Ae(en(Ai,R)),onDragOver:Ae(en(vo,W)),onDragLeave:Ae(en(ba,K)),onDrop:Ae(en(Qu,ce)),role:typeof qe=="string"&&qe!==""?qe:"presentation"},Ne,O),!r&&!w?{tabIndex:0}:{}),ef)}},[O,Me,Ue,Qe,ae,R,W,K,ce,w,E,r]),rt=b.useCallback(function(q){q.stopPropagation()},[]),Ct=b.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=q.refKey,Ne=oe===void 0?"ref":oe,qe=q.onChange,ht=q.onClick,dn=ms(q,rE),ot=Hl({accept:F,multiple:a,type:"file",style:{display:"none"},onChange:_e(en(qe,ce)),onClick:_e(en(ht,rt)),tabIndex:-1},Ne,A);return Ge(Ge({},ot),dn)}},[A,n,a,ce,r]);return Ge(Ge({},z),{},{isFocused:C&&!r,getRootProps:Oe,getInputProps:Ct,rootRef:O,inputRef:A,open:_e(B)})}function dE(t,e){switch(e.type){case"focus":return Ge(Ge({},t),{},{isFocused:!0});case"blur":return Ge(Ge({},t),{},{isFocused:!1});case"openDialog":return Ge(Ge({},Ul),{},{isFileDialogActive:!0});case"closeDialog":return Ge(Ge({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ge(Ge({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return Ge(Ge({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return Ge({},Ul);default:return t}}function lp(){}function cp(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=cp(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function hE(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=cp(t))&&(r&&(r+=" "),r+=e);return r}const up=t=>typeof t=="boolean"?"".concat(t):t===0?"0":t,fp=hE,Gl=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return fp(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=e,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=i==null?void 0:i[c];if(u===null)return null;const d=up(u)||up(f);return o[c][d]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,d]=u;return d===void 0||(c[f]=d),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:d,...h}=u;return Object.entries(h).every(p=>{let[m,g]=p;return Array.isArray(g)?g.includes({...i,...a}[m]):{...i,...a}[m]===g})?[...c,f,d]:c},[]);return fp(t,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Bo=b.forwardRef(function({as:e,...n},r){const o=e||"span";return T.jsx(o,{...n,ref:r})}),pE=Gl("inline-flex duration-700 data-[loading=true]:opacity-40 data-[loading=true]:animate-pulse gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-30 disabled:text-opacity-60 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-10 p-2 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-md",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",main:"bg-primary hover:bg-primary-hover text-primary-foreground",warn:"bg-warn hover:bg-warn-hover text-warn-foreground",danger:"bg-danger hover:bg-danger-hover text-danger-foreground",secondary:"bg-secondary hover:bg-secondary-hover text-secondary-foreground",success:"bg-success hover:bg-success-hover text-success-foreground",info:"bg-info hover:bg-info-hover text-info-foreground"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),zo=b.forwardRef(function({className:e,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return T.jsxs(Bo,{...l,ref:c,type:i,"data-theme":o,"data-loading":r,disabled:u,as:l.as??"button",onClick:u?void 0:l.onClick,className:_t(pE({size:s,rounded:a,theme:o}),e),children:[l.children,n]})}),mE=t=>T.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:t.buttons.map(e=>T.jsx("li",{className:"flex flex-1",children:T.jsx("button",{...e,type:e.type||"button","data-active":t.active===e.name?"true":"false",className:_t("flex flex-1 items-center gap-1.5 rounded-sm border-r-2 px-4 py-2 last:border-r-0","cursor-pointer justify-center whitespace-nowrap align-middle font-medium","focus-visible:ring-ring shadow-sm focus-visible:outline-none focus-visible:ring-2 disabled:text-opacity-80","data-[active=true]:bg-main-bg text-body data-[active=true]:text-main transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50")})},`button-group-${e.name}`))}),gE={isImage:t=>t.type.includes("image")},yE=t=>{const[e,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(gE.isImage(t.file)){const r=URL.createObjectURL(t.file);return n({url:r,type:"img",size:Ph(t.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:t.file.type,size:Ph(t.file.size)})},[t.file]),e.type==="img"?T.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[T.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[T.jsx("img",{src:e.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${t.file.name}`}),T.jsxs("div",{className:"flex flex-col",children:[T.jsx("span",{children:t.file.name}),T.jsx("span",{children:e.size})]})]}),T.jsx(zo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=t.onDeleteFile)==null||o.call(t,t.file)},children:T.jsx(Lr,{})})]}):T.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[T.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[T.jsx(K0,{size:48}),T.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[T.jsx("span",{children:t.file.name}),T.jsx("span",{children:e.size})]})]}),T.jsx(zo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=t.onDeleteFile)==null||o.call(t,t.file)},children:T.jsx(Lr,{className:"text-danger"})})]})},vE=t=>T.jsx("ul",{className:"w-full space-y-jade-200",children:t.files.map(e=>T.jsx(yE,{onDeleteFile:t.onDeleteFile,file:e},e.name))}),bE=t=>t.isDragActive?T.jsx("p",{children:"Solte os arquivos selecionados"}):t.files.length>0?T.jsx(vE,{onDeleteFile:t.onDeleteFile,files:t.files}):T.jsx(b.Fragment,{children:t.idle}),xE=T.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[T.jsx(Y0,{size:64}),T.jsxs("p",{children:["You can drag your files or"," ",T.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),wE=({idle:t=xE,onDeleteFile:e,onDrop:n,...r})=>{var u;const[o,i]=b.useState([]),s=f=>{n==null||n(f),i(f)},{getRootProps:a,getInputProps:l,isDragActive:c}=ap({onDrop:s});return T.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex text-foreground flex-col items-center justify-center border-2 rounded-lg p-6 border-card-border data-[active=true]:bg-card-background data-[active=true]:border-solid data-[active=false]:border-dashed",children:[T.jsx("input",{...l(r),name:r.name,id:r.name}),T.jsx(bE,{onDeleteFile:e,isDragActive:c,idle:t,files:r.files??o})]})},SE=["INPUT","SELECT"],dp=t=>{if(!t)return;Array.from(t.elements).forEach(n=>{SE.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},TE=t=>{const e=n=>{var r;n.persist(),n.preventDefault(),(r=t.onSubmit)==null||r.call(t,n)};return T.jsx("form",{...t,onSubmit:e})},EE=({children:t,...e})=>{const n=b.useId(),[r,o]=b.useState(!1),i=e.checked??r,s=a=>{var u;const c=a.target.dataset.checked!=="true";o(c),(u=e==null?void 0:e.onCheck)==null||u.call(e,c)};return T.jsxs("div",{className:"flex items-center",children:[T.jsx("input",{...e,hidden:!0,type:"checkbox",checked:i,onChange:a=>o(a.target.checked)}),T.jsx("button",{type:"button",role:"switch",onClick:s,"aria-checked":i,"data-checked":i,"aria-labelledby":`${n}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary transition-colors ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:T.jsx("span",{"aria-hidden":"true","data-checked":i,className:"data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch pointer-events-none inline-block size-5 aspect-square data-[checked=false]translate-x-0 data-[checked=true]:translate-x-5 transform rounded-full shadow ring-0 transition ease-in-out"})}),T.jsx("span",{className:"ml-3 text-sm",id:`${n}-label`,children:T.jsx("span",{className:"font-medium text-foreground",children:t})})]})},gs=0,$n=1,Kr=2,hp=4;function Ho(t,e){return n=>t(e(n))}function CE(t,e){return e(t)}function pp(t,e){return n=>t(e,n)}function mp(t,e){return()=>t(e)}function ys(t,e){return e(t),t}function ze(...t){return t}function AE(t){t()}function gp(t){return()=>t}function _E(...t){return()=>{t.map(AE)}}function Kl(t){return t!==void 0}function lr(){}function Fe(t,e){return t($n,e)}function ve(t,e){t(gs,e)}function ql(t){t(Kr)}function yt(t){return t(hp)}function le(t,e){return Fe(t,pp(e,gs))}function tn(t,e){const n=t($n,r=>{n(),e(r)});return n}function Ee(){const t=[];return(e,n)=>{switch(e){case Kr:t.splice(0,t.length);return;case $n:return t.push(n),()=>{const r=t.indexOf(n);r>-1&&t.splice(r,1)};case gs:t.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${e}`)}}}function Y(t){let e=t;const n=Ee();return(r,o)=>{switch(r){case $n:o(e);break;case gs:e=o;break;case hp:return e}return n(r,o)}}function PE(t){let e,n;const r=()=>e&&e();return function(o,i){switch(o){case $n:return i?n===i?void 0:(r(),n=i,e=Fe(t,i),e):(r(),lr);case Kr:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Nt(t){return ys(Ee(),e=>le(t,e))}function vt(t,e){return ys(Y(e),n=>le(t,n))}function IE(...t){return e=>t.reduceRight(CE,e)}function U(t,...e){const n=IE(...e);return(r,o)=>{switch(r){case $n:return Fe(t,n(o));case Kr:ql(t);return}}}function yp(t,e){return t===e}function He(t=yp){let e;return n=>r=>{t(e,r)||(e=r,n(r))}}function de(t){return e=>n=>{t(n)&&e(n)}}function ne(t){return e=>Ho(e,t)}function nn(t){return e=>()=>e(t)}function rn(t,e){return n=>r=>n(e=t(e,r))}function qr(t){return e=>n=>{t>0?t--:e(n)}}function jn(t){let e=null,n;return r=>o=>{e=o,!n&&(n=setTimeout(()=>{n=void 0,r(e)},t))}}function vp(t){let e,n;return r=>o=>{e=o,n&&clearTimeout(n),n=setTimeout(()=>{r(e)},t)}}function be(...t){const e=new Array(t.length);let n=0,r=null;const o=Math.pow(2,t.length)-1;return t.forEach((i,s)=>{const a=Math.pow(2,s);Fe(i,l=>{const c=n;n=n|a,e[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>i([s].concat(e));n===o?a():r=a}}function bp(...t){return function(e,n){switch(e){case $n:return _E(...t.map(r=>Fe(r,n)));case Kr:return;default:throw new Error(`unrecognized action ${e}`)}}}function pe(t,e=yp){return U(t,He(e))}function st(...t){const e=Ee(),n=new Array(t.length);let r=0;const o=Math.pow(2,t.length)-1;return t.forEach((i,s)=>{const a=Math.pow(2,s);Fe(i,l=>{n[s]=l,r=r|a,r===o&&ve(e,n)})}),function(i,s){switch(i){case $n:return r===o&&s(n),Fe(e,s);case Kr:return ql(e);default:throw new Error(`unrecognized action ${i}`)}}}function Pe(t,e=[],{singleton:n}={singleton:!0}){return{id:OE(),constructor:t,dependencies:e,singleton:n}}const OE=()=>Symbol();function kE(t){const e=new Map,n=({id:r,constructor:o,dependencies:i,singleton:s})=>{if(s&&e.has(r))return e.get(r);const a=o(i.map(l=>n(l)));return s&&e.set(r,a),a};return n(t)}function DE(t,e){const n={},r={};let o=0;const i=t.length;for(;o<i;)r[t[o]]=1,o+=1;for(const s in e)r.hasOwnProperty(s)||(n[s]=e[s]);return n}const vs=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Zl(t,e,n){const r=Object.keys(e.required||{}),o=Object.keys(e.optional||{}),i=Object.keys(e.methods||{}),s=Object.keys(e.events||{}),a=b.createContext({});function l(v,x){v.propsReady&&ve(v.propsReady,!1);for(const y of r){const S=v[e.required[y]];ve(S,x[y])}for(const y of o)if(y in x){const S=v[e.optional[y]];ve(S,x[y])}v.propsReady&&ve(v.propsReady,!0)}function c(v){return i.reduce((x,y)=>(x[y]=S=>{const w=v[e.methods[y]];ve(w,S)},x),{})}function u(v){return s.reduce((x,y)=>(x[y]=PE(v[e.events[y]]),x),{})}const f=b.forwardRef((v,x)=>{const{children:y,...S}=v,[w]=b.useState(()=>ys(kE(t),_=>l(_,S))),[E]=b.useState(mp(u,w));return vs(()=>{for(const _ of s)_ in S&&Fe(E[_],S[_]);return()=>{Object.values(E).map(ql)}},[S,E,w]),vs(()=>{l(w,S)}),b.useImperativeHandle(x,gp(c(w))),b.createElement(a.Provider,{value:w},n?b.createElement(n,DE([...r,...o,...s],S),y):y)}),d=v=>b.useCallback(pp(ve,b.useContext(a)[v]),[v]),h=v=>{const y=b.useContext(a)[v],S=b.useCallback(w=>Fe(y,w),[y]);return b.useSyncExternalStore(S,()=>yt(y),()=>yt(y))},p=v=>{const y=b.useContext(a)[v],[S,w]=b.useState(mp(yt,y));return vs(()=>Fe(y,E=>{E!==S&&w(gp(E))}),[y,S]),S},m=b.version.startsWith("18")?h:p;return{Component:f,usePublisher:d,useEmitterValue:m,useEmitter:(v,x)=>{const S=b.useContext(a)[v];vs(()=>Fe(S,x),[x,S])}}}const ME=typeof document<"u"?b.useLayoutEffect:b.useEffect;var Vt=(t=>(t[t.DEBUG=0]="DEBUG",t[t.INFO=1]="INFO",t[t.WARN=2]="WARN",t[t.ERROR=3]="ERROR",t))(Vt||{});const FE={0:"debug",1:"log",2:"warn",3:"error"},LE=()=>typeof globalThis>"u"?window:globalThis,Bn=Pe(()=>{const t=Y(3);return{log:Y((n,r,o=1)=>{var i;const s=(i=LE().VIRTUOSO_LOG_LEVEL)!=null?i:yt(t);o>=s&&console[FE[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:t}},[],{singleton:!0});function Yl(t,e=!0){const n=b.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=b.useMemo(()=>new ResizeObserver(i=>{requestAnimationFrame(()=>{const s=i[0].target;s.offsetParent!==null&&t(s)})}),[t]);r=i=>{i&&e?(o.observe(i),n.current=i):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function on(t,e=!0){return Yl(t,e).callbackRef}function xp(t,e,n,r,o,i,s){const a=b.useCallback(l=>{const c=NE(l.children,e,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const f=u.lastElementChild.dataset.viewportType==="window",d=s?s.scrollTop:f?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=s?s.scrollHeight:f?document.documentElement.scrollHeight:u.scrollHeight,p=s?s.offsetHeight:f?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(d,0),scrollHeight:h,viewportHeight:p}),i==null||i(VE("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&t(c)},[t,e,o,i,s,r]);return Yl(a,n)}function NE(t,e,n,r){const o=t.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=t.item(s);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=e(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Vt.ERROR),u===c)continue;const f=i[i.length-1];i.length===0||f.size!==u||f.endIndex!==l-1?i.push({startIndex:l,endIndex:l,size:u}):i[i.length-1].endIndex++}return i}function VE(t,e,n){return e!=="normal"&&!(e!=null&&e.endsWith("px"))&&n(`${t} was not resolved to pixel value correctly`,e,Vt.WARN),e==="normal"?0:parseInt(e??"0",10)}function Ut(t,e){return Math.round(t.getBoundingClientRect()[e])}function wp(t,e){return Math.abs(t-e)<1.01}function Sp(t,e,n,r=lr,o){const i=b.useRef(null),s=b.useRef(null),a=b.useRef(null),l=b.useCallback(f=>{const d=f.target,h=d===window||d===document,p=h?window.pageYOffset||document.documentElement.scrollTop:d.scrollTop,m=h?document.documentElement.scrollHeight:d.scrollHeight,g=h?window.innerHeight:d.offsetHeight,v=()=>{t({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:g})};f.suppressFlushSync?v():of.flushSync(v),s.current!==null&&(p===s.current||p<=0||p===m-g)&&(s.current=null,e(!0),a.current&&(clearTimeout(a.current),a.current=null))},[t,e]);b.useEffect(()=>{const f=o||i.current;return r(o||i.current),l({target:f,suppressFlushSync:!0}),f.addEventListener("scroll",l,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",l)}},[i,l,n,r,o]);function c(f){const d=i.current;if(!d||"offsetHeight"in d&&d.offsetHeight===0)return;const h=f.behavior==="smooth";let p,m,g;d===window?(m=Math.max(Ut(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,g=document.documentElement.scrollTop):(m=d.scrollHeight,p=Ut(d,"height"),g=d.scrollTop);const v=m-p;if(f.top=Math.ceil(Math.max(Math.min(v,f.top),0)),wp(p,m)||f.top===g){t({scrollTop:g,scrollHeight:m,viewportHeight:p}),h&&e(!0);return}h?(s.current=f.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,e(!0)},1e3)):s.current=null,d.scrollTo(f)}function u(f){i.current.scrollBy(f)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:c}}const St=Pe(()=>{const t=Ee(),e=Ee(),n=Y(0),r=Ee(),o=Y(0),i=Ee(),s=Ee(),a=Y(0),l=Y(0),c=Y(0),u=Y(0),f=Ee(),d=Ee(),h=Y(!1);return le(U(t,ne(({scrollTop:p})=>p)),e),le(U(t,ne(({scrollHeight:p})=>p)),s),le(e,o),{scrollContainerState:t,scrollTop:e,viewportHeight:i,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:f,scrollBy:d,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),Wo={lvl:0};function Tp(t,e,n,r=Wo,o=Wo){return{k:t,v:e,lvl:n,l:r,r:o}}function Re(t){return t===Wo}function Zr(){return Wo}function Xl(t,e){if(Re(t))return Wo;const{k:n,l:r,r:o}=t;if(e===n){if(Re(r))return o;if(Re(o))return r;{const[i,s]=Ep(r);return bs(tt(t,{k:i,v:s,l:Cp(r)}))}}else return e<n?bs(tt(t,{l:Xl(r,e)})):bs(tt(t,{r:Xl(o,e)}))}function Uo(t,e){if(!Re(t))return e===t.k?t.v:e<t.k?Uo(t.l,e):Uo(t.r,e)}function Gt(t,e,n="k"){if(Re(t))return[-1/0,void 0];if(Number(t[n])===e)return[t.k,t.v];if(Number(t[n])<e){const r=Gt(t.r,e,n);return r[0]===-1/0?[t.k,t.v]:r}return Gt(t.l,e,n)}function Rt(t,e,n){return Re(t)?Tp(e,n,1):e===t.k?tt(t,{k:e,v:n}):e<t.k?Ap(tt(t,{l:Rt(t.l,e,n)})):Ap(tt(t,{r:Rt(t.r,e,n)}))}function Jl(t,e,n){if(Re(t))return[];const{k:r,v:o,l:i,r:s}=t;let a=[];return r>e&&(a=a.concat(Jl(i,e,n))),r>=e&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Jl(s,e,n))),a}function cr(t){return Re(t)?[]:[...cr(t.l),{k:t.k,v:t.v},...cr(t.r)]}function Ep(t){return Re(t.r)?[t.k,t.v]:Ep(t.r)}function Cp(t){return Re(t.r)?t.l:bs(tt(t,{r:Cp(t.r)}))}function tt(t,e){return Tp(e.k!==void 0?e.k:t.k,e.v!==void 0?e.v:t.v,e.lvl!==void 0?e.lvl:t.lvl,e.l!==void 0?e.l:t.l,e.r!==void 0?e.r:t.r)}function Ql(t){return Re(t)||t.lvl>t.r.lvl}function Ap(t){return ec(Pp(t))}function bs(t){const{l:e,r:n,lvl:r}=t;if(n.lvl>=r-1&&e.lvl>=r-1)return t;if(r>n.lvl+1){if(Ql(e))return Pp(tt(t,{lvl:r-1}));if(!Re(e)&&!Re(e.r))return tt(e.r,{l:tt(e,{r:e.r.l}),r:tt(t,{l:e.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(Ql(t))return ec(tt(t,{lvl:r-1}));if(!Re(n)&&!Re(n.l)){const o=n.l,i=Ql(o)?n.lvl-1:n.lvl;return tt(o,{l:tt(t,{r:o.l,lvl:r-1}),r:ec(tt(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function xs(t,e,n){if(Re(t))return[];const r=Gt(t,e)[0];return RE(Jl(t,r,n))}function _p(t,e){const n=t.length;if(n===0)return[];let{index:r,value:o}=e(t[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=e(t[s]);i.push({start:r,end:a-1,value:o}),r=a,o=l}return i.push({start:r,end:1/0,value:o}),i}function RE(t){return _p(t,({k:e,v:n})=>({index:e,value:n}))}function ec(t){const{r:e,lvl:n}=t;return!Re(e)&&!Re(e.r)&&e.lvl===n&&e.r.lvl===n?tt(e,{l:tt(t,{r:e.l}),lvl:n+1}):t}function Pp(t){const{l:e}=t;return!Re(e)&&e.lvl===t.lvl?tt(e,{r:tt(t,{l:e.r})}):t}function ws(t,e,n,r=0){let o=t.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=t[i],a=n(s,e);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`)}function Ip(t,e,n){return t[ws(t,e,n)]}function $E(t,e,n,r){const o=ws(t,e,r),i=ws(t,n,r,o);return t.slice(o,i+1)}const tc=Pe(()=>({recalcInProgress:Y(!1)}),[],{singleton:!0});function jE(t){const{size:e,startIndex:n,endIndex:r}=t;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===e}function Op(t,e){let n=0,r=0;for(;n<t;)n+=e[r+1]-e[r]-1,r++;return r-(n===t?0:1)}function BE(t,e){let n=Re(t)?0:1/0;for(const r of e){const{size:o,startIndex:i,endIndex:s}=r;if(n=Math.min(n,i),Re(t)){t=Rt(t,0,o);continue}const a=xs(t,i-1,s+1);if(a.some(jE(r)))continue;let l=!1,c=!1;for(const{start:u,end:f,value:d}of a)l?(s>=u||o===d)&&(t=Xl(t,u)):(c=d!==o,l=!0),f>s&&s>=u&&d!==o&&(t=Rt(t,s+1,d));c&&(t=Rt(t,i,o))}return[t,n]}function zE(){return{offsetTree:[],sizeTree:Zr(),groupOffsetTree:Zr(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function nc({index:t},e){return e===t?0:e<t?-1:1}function HE({offset:t},e){return e===t?0:e<t?-1:1}function WE(t){return{index:t.index,value:t}}function UE(t,e,n,r=0){return r>0&&(e=Math.max(e,Ip(t,r,nc).offset)),_p($E(t,e,n,HE),WE)}function rc(t,e,n,r){let o=t,i=0,s=0,a=0,l=0;if(e!==0){l=ws(o,e-1,nc),a=o[l].offset;const u=Gt(n,e-1);i=u[0],s=u[1],o.length&&o[l].size===Gt(n,e)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of xs(n,e,1/0)){const f=c-i,d=f*s+a+f*r;o.push({offset:d,size:u,index:c}),i=c,a=d,s=u}return{offsetTree:o,lastIndex:i,lastOffset:a,lastSize:s}}function GE(t,[e,n,r,o]){e.length>0&&r("received item sizes",e,Vt.DEBUG);const i=t.sizeTree;let s=i,a=0;if(n.length>0&&Re(i)&&e.length===2){const d=e[0].size,h=e[1].size;s=n.reduce((p,m)=>Rt(Rt(p,m,d),m+1,h),s)}else[s,a]=BE(s,e);if(s===i)return t;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:f}=rc(t.offsetTree,a,s,o);return{sizeTree:s,offsetTree:l,lastIndex:c,lastOffset:f,lastSize:u,groupOffsetTree:n.reduce((d,h)=>Rt(d,h,Go(h,l,o)),Zr()),groupIndices:n}}function Go(t,e,n){if(e.length===0)return 0;const{offset:r,index:o,size:i}=Ip(e,t,nc),s=t-o,a=i*s+(s-1)*n+r;return a>0?a+n:a}function KE(t){return typeof t.groupIndex<"u"}function kp(t,e,n){if(KE(t))return e.groupIndices[t.groupIndex]+1;{const r=t.index==="LAST"?n:t.index;let o=Dp(r,e);return o=Math.max(0,o,Math.min(n,o)),o}}function Dp(t,e){if(!Ss(e))return t;let n=0;for(;e.groupIndices[n]<=t+n;)n++;return t+n}function Ss(t){return!Re(t.groupOffsetTree)}function qE(t){return cr(t).map(({k:e,v:n},r,o)=>{const i=o[r+1],s=i?i.k-1:1/0;return{startIndex:e,endIndex:s,size:n}})}const ZE={offsetHeight:"height",offsetWidth:"width"},sn=Pe(([{log:t},{recalcInProgress:e}])=>{const n=Ee(),r=Ee(),o=vt(r,0),i=Ee(),s=Ee(),a=Y(0),l=Y([]),c=Y(void 0),u=Y(void 0),f=Y((w,E)=>Ut(w,ZE[E])),d=Y(void 0),h=Y(0),p=zE(),m=vt(U(n,be(l,t,h),rn(GE,p),He()),p),g=vt(U(l,He(),rn((w,E)=>({prev:w.current,current:E}),{prev:[],current:[]}),ne(({prev:w})=>w)),[]);le(U(l,de(w=>w.length>0),be(m,h),ne(([w,E,_])=>{const I=w.reduce((D,F,N)=>Rt(D,F,Go(F,E.offsetTree,_)||N),Zr());return{...E,groupIndices:w,groupOffsetTree:I}})),m),le(U(r,be(m),de(([w,{lastIndex:E}])=>w<E),ne(([w,{lastIndex:E,lastSize:_}])=>[{startIndex:w,endIndex:E,size:_}])),n),le(c,u);const v=vt(U(c,ne(w=>w===void 0)),!0);le(U(u,de(w=>w!==void 0&&Re(yt(m).sizeTree)),ne(w=>[{startIndex:0,endIndex:0,size:w}])),n);const x=Nt(U(n,be(m),rn(({sizes:w},[E,_])=>({changed:_!==w,sizes:_}),{changed:!1,sizes:p}),ne(w=>w.changed)));Fe(U(a,rn((w,E)=>({diff:w.prev-E,prev:E}),{diff:0,prev:0}),ne(w=>w.diff)),w=>{const{groupIndices:E}=yt(m);if(w>0)ve(e,!0),ve(i,w+Op(w,E));else if(w<0){const _=yt(g);_.length>0&&(w-=Op(-w,_)),ve(s,w)}}),Fe(U(a,be(t)),([w,E])=>{w<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},Vt.ERROR)});const y=Nt(i);le(U(i,be(m),ne(([w,E])=>{const _=E.groupIndices.length>0,I=[],D=E.lastSize;if(_){const F=Uo(E.sizeTree,0);let N=0,P=0;for(;N<w;){const A=E.groupIndices[P],L=E.groupIndices.length===P+1?1/0:E.groupIndices[P+1]-A-1;I.push({startIndex:A,endIndex:A,size:F}),I.push({startIndex:A+1,endIndex:A+1+L-1,size:D}),P++,N+=L+1}const $=cr(E.sizeTree);return N!==w&&$.shift(),$.reduce((A,{k:L,v:V})=>{let z=A.ranges;return A.prevSize!==0&&(z=[...A.ranges,{startIndex:A.prevIndex,endIndex:L+w-1,size:A.prevSize}]),{ranges:z,prevIndex:L+w,prevSize:V}},{ranges:I,prevIndex:w,prevSize:0}).ranges}return cr(E.sizeTree).reduce((F,{k:N,v:P})=>({ranges:[...F.ranges,{startIndex:F.prevIndex,endIndex:N+w-1,size:F.prevSize}],prevIndex:N+w,prevSize:P}),{ranges:[],prevIndex:0,prevSize:D}).ranges})),n);const S=Nt(U(s,be(m,h),ne(([w,{offsetTree:E},_])=>{const I=-w;return Go(I,E,_)})));return le(U(s,be(m,h),ne(([w,E,_])=>{if(E.groupIndices.length>0){if(Re(E.sizeTree))return E;let D=Zr();const F=yt(g);let N=0,P=0,$=0;for(;N<-w;){$=F[P];const A=F[P+1]-$-1;P++,N+=A+1}if(D=cr(E.sizeTree).reduce((A,{k:L,v:V})=>Rt(A,Math.max(0,L+w),V),D),N!==-w){const A=Uo(E.sizeTree,$);D=Rt(D,0,A);const L=Gt(E.sizeTree,-w+1)[1];D=Rt(D,1,L)}return{...E,sizeTree:D,...rc(E.offsetTree,0,D,_)}}else{const D=cr(E.sizeTree).reduce((F,{k:N,v:P})=>Rt(F,Math.max(0,N+w),P),Zr());return{...E,sizeTree:D,...rc(E.offsetTree,0,D,_)}}})),m),{data:d,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:i,shiftWith:s,shiftWithOffset:S,beforeUnshiftWith:y,firstItemIndex:a,gap:h,sizes:m,listRefresh:x,statefulTotalCount:o,trackItemSizes:v,itemSize:f}},ze(Bn,tc),{singleton:!0}),YE=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Mp(t){const e=typeof t=="number"?{index:t}:t;return e.align||(e.align="start"),(!e.behavior||!YE)&&(e.behavior="auto"),e.offset||(e.offset=0),e}const Ko=Pe(([{sizes:t,totalCount:e,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:f},{log:d}])=>{const h=Ee(),p=Ee(),m=Y(0);let g=null,v=null,x=null;function y(){g&&(g(),g=null),x&&(x(),x=null),v&&(clearTimeout(v),v=null),ve(o,!1)}return le(U(h,be(t,i,e,m,l,c,d),be(r,u,f),ne(([[S,w,E,_,I,D,F,N],P,$,O])=>{const A=Mp(S),{align:L,behavior:V,offset:z}=A,Z=_-1,C=kp(A,w,Z);let j=Go(C,w.offsetTree,P)+D;L==="end"?(j+=$+Gt(w.sizeTree,C)[1]-E+O,C===Z&&(j+=F)):L==="center"?j+=($+Gt(w.sizeTree,C)[1]-E+O)/2:j-=I,z&&(j+=z);const X=re=>{y(),re?(N("retrying to scroll to",{location:S},Vt.DEBUG),ve(h,S)):(ve(p,!0),N("list did not change, scroll successful",{},Vt.DEBUG))};if(y(),V==="smooth"){let re=!1;x=Fe(n,ee=>{re=re||ee}),g=tn(a,()=>{X(re)})}else g=tn(U(n,XE(150)),X);return v=setTimeout(()=>{y()},1200),ve(o,!0),N("scrolling from index to",{index:C,top:j,behavior:V},Vt.DEBUG),{top:j,behavior:V}})),s),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},ze(sn,St,Bn),{singleton:!0});function XE(t){return e=>{const n=setTimeout(()=>{e(!1)},t);return r=>{r&&(e(!0),clearTimeout(n))}}}const qo="up",Zo="down",JE="none",QE={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},eC=0,Yo=Pe(([{scrollContainerState:t,scrollTop:e,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:i}])=>{const s=Y(!1),a=Y(!0),l=Ee(),c=Ee(),u=Y(4),f=Y(eC),d=vt(U(bp(U(pe(e),qr(1),nn(!0)),U(pe(e),qr(1),nn(!1),vp(100))),He()),!1),h=vt(U(bp(U(i,nn(!0)),U(i,nn(!1),vp(200))),He()),!1);le(U(st(pe(e),pe(f)),ne(([x,y])=>x<=y),He()),a),le(U(a,jn(50)),c);const p=Nt(U(st(t,pe(n),pe(r),pe(o),pe(u)),rn((x,[{scrollTop:y,scrollHeight:S},w,E,_,I])=>{const D=y+w-S>-I,F={viewportHeight:w,scrollTop:y,scrollHeight:S};if(D){let P,$;return y>x.state.scrollTop?(P="SCROLLED_DOWN",$=x.state.scrollTop-y):(P="SIZE_DECREASED",$=x.state.scrollTop-y||x.scrollTopDelta),{atBottom:!0,state:F,atBottomBecause:P,scrollTopDelta:$}}let N;return F.scrollHeight>x.state.scrollHeight?N="SIZE_INCREASED":w<x.state.viewportHeight?N="VIEWPORT_HEIGHT_DECREASING":y<x.state.scrollTop?N="SCROLLING_UPWARDS":N="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:N,state:F}},QE),He((x,y)=>x&&x.atBottom===y.atBottom))),m=vt(U(t,rn((x,{scrollTop:y,scrollHeight:S,viewportHeight:w})=>{if(wp(x.scrollHeight,S))return{scrollTop:y,scrollHeight:S,jump:0,changed:!1};{const E=S-(y+w)<1;return x.scrollTop!==y&&E?{scrollHeight:S,scrollTop:y,jump:x.scrollTop-y,changed:!0}:{scrollHeight:S,scrollTop:y,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),de(x=>x.changed),ne(x=>x.jump)),0);le(U(p,ne(x=>x.atBottom)),s),le(U(s,jn(50)),l);const g=Y(Zo);le(U(t,ne(({scrollTop:x})=>x),He(),rn((x,y)=>yt(h)?{direction:x.direction,prevScrollTop:y}:{direction:y<x.prevScrollTop?qo:Zo,prevScrollTop:y},{direction:Zo,prevScrollTop:0}),ne(x=>x.direction)),g),le(U(t,jn(50),nn(JE)),g);const v=Y(0);return le(U(d,de(x=>!x),nn(0)),v),le(U(e,jn(100),be(d),de(([x,y])=>!!y),rn(([x,y],[S])=>[y,S],[0,0]),ne(([x,y])=>y-x)),v),{isScrolling:d,isAtTop:a,isAtBottom:s,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:g,atBottomThreshold:u,atTopThreshold:f,scrollVelocity:v,lastJumpDueToItemResize:m}},ze(St)),zn=Pe(([{log:t}])=>{const e=Y(!1),n=Nt(U(e,de(r=>r),He()));return Fe(e,r=>{r&&yt(t)("props updated",{},Vt.DEBUG)}),{propsReady:e,didMount:n}},ze(Bn),{singleton:!0});function oc(t,e){t==0?e():requestAnimationFrame(()=>oc(t-1,e))}function ic(t,e){const n=e-1;return typeof t=="number"?t:t.index==="LAST"?n:t.index}const Xo=Pe(([{sizes:t,listRefresh:e,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:i},{didMount:s}])=>{const a=Y(!0),l=Y(0),c=Y(!0);return le(U(s,be(l),de(([u,f])=>!!f),nn(!1)),a),le(U(s,be(l),de(([u,f])=>!!f),nn(!1)),c),Fe(U(st(e,s),be(a,t,n,c),de(([[,u],f,{sizeTree:d},h,p])=>u&&(!Re(d)||Kl(h))&&!f&&!p),be(l)),([,u])=>{tn(i,()=>{ve(c,!0)}),oc(4,()=>{tn(r,()=>{ve(a,!0)}),ve(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},ze(sn,St,Ko,zn),{singleton:!0});function Fp(t){return t?t==="smooth"?"smooth":"auto":!1}const tC=(t,e)=>typeof t=="function"?Fp(t(e)):e&&Fp(t),nC=Pe(([{totalCount:t,listRefresh:e},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=Y(!1),f=Ee();let d=null;function h(m){ve(o,{index:"LAST",align:"end",behavior:m})}Fe(U(st(U(pe(t),qr(1)),a),be(pe(u),n,i,c),ne(([[m,g],v,x,y,S])=>{let w=g&&y,E="auto";return w&&(E=tC(v,x||S),w=w&&!!E),{totalCount:m,shouldFollow:w,followOutputBehavior:E}}),de(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:g})=>{d&&(d(),d=null),d=tn(e,()=>{yt(l)("following output to ",{totalCount:m},Vt.DEBUG),h(g),d=null})});function p(m){const g=tn(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!d&&(yt(l)("scrolling to bottom due to increased size",{},Vt.DEBUG),h("auto"))});setTimeout(g,100)}return Fe(U(st(pe(u),t,s),de(([m,,g])=>m&&g),rn(({value:m},[,g])=>({refreshed:m===g,value:g}),{refreshed:!1,value:0}),de(({refreshed:m})=>m),be(u,t)),([,m])=>{yt(i)&&p(m!==!1)}),Fe(f,()=>{p(yt(u)!==!1)}),Fe(st(pe(u),r),([m,g])=>{m&&!g.atBottom&&g.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:f}},ze(sn,Yo,Ko,Xo,zn,Bn,St));function rC(t){return t.reduce((e,n)=>(e.groupIndices.push(e.totalCount),e.totalCount+=n+1,e),{totalCount:0,groupIndices:[]})}const Lp=Pe(([{totalCount:t,groupIndices:e,sizes:n},{scrollTop:r,headerHeight:o}])=>{const i=Ee(),s=Ee(),a=Nt(U(i,ne(rC)));return le(U(a,ne(l=>l.totalCount)),t),le(U(a,ne(l=>l.groupIndices)),e),le(U(st(r,n,o),de(([l,c])=>Ss(c)),ne(([l,c,u])=>Gt(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),He(),ne(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},ze(sn,St));function Jo(t,e){return!!(t&&t[0]===e[0]&&t[1]===e[1])}function Np(t,e){return!!(t&&t.startIndex===e.startIndex&&t.endIndex===e.endIndex)}const Ts="top",Es="bottom",Vp="none";function Rp(t,e,n){return typeof t=="number"?n===qo&&e===Ts||n===Zo&&e===Es?t:0:n===qo?e===Ts?t.main:t.reverse:e===Es?t.main:t.reverse}function $p(t,e){return typeof t=="number"?t:t[e]||0}const sc=Pe(([{scrollTop:t,viewportHeight:e,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const i=Ee(),s=Y(0),a=Y(0),l=Y(0),c=vt(U(st(pe(t),pe(e),pe(r),pe(i,Jo),pe(l),pe(s),pe(o),pe(n),pe(a)),ne(([u,f,d,[h,p],m,g,v,x,y])=>{const S=u-x,w=g+v,E=Math.max(d-S,0);let _=Vp;const I=$p(y,Ts),D=$p(y,Es);return h-=x,h+=d+v,p+=d+v,p-=x,h>u+w-I&&(_=qo),p<u-E+f+D&&(_=Zo),_!==Vp?[Math.max(S-d-Rp(m,Ts,_)-I,0),S-E-v+f+Rp(m,Es,_)+D]:null}),de(u=>u!=null),He(Jo)),[0,0]);return{listBoundary:i,overscan:l,topListHeight:s,increaseViewportBy:a,visibleRange:c}},ze(St),{singleton:!0});function oC(t,e,n){if(Ss(e)){const r=Dp(t,e);return[{index:Gt(e.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:t,size:0,offset:0,data:n&&n[0]}]}const ac={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function jp(t,e,n){if(t.length===0)return[];if(!Ss(e))return t.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=t[0].index,o=t[t.length-1].index,i=[],s=xs(e.groupOffsetTree,r,o);let a,l=0;for(const c of t){(!a||a.end<c.index)&&(a=s.shift(),l=e.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},i.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return i}function Cs(t,e,n,r,o,i){const{lastSize:s,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(t.length>0){c=t[0].offset;const m=t[t.length-1];u=m.offset+m.size}const f=n-l,d=a+f*s+(f-1)*r,h=c,p=d-u;return{items:jp(t,o,i),topItems:jp(e,o,i),topListHeight:e.reduce((m,g)=>g.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:i}}function Bp(t,e,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=t)break;s++}const a=t+s,l=ic(e,a),c=Array.from({length:a}).map((u,f)=>({index:f+l,size:0,offset:0,data:i[f+l]}));return Cs(c,[],a,o,n,r)}const ur=Pe(([{sizes:t,totalCount:e,data:n,firstItemIndex:r,gap:o},i,{visibleRange:s,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:f},d,{didMount:h},{recalcInProgress:p}])=>{const m=Y([]),g=Y(0),v=Ee();le(i.topItemsIndexes,m);const x=vt(U(st(h,p,pe(s,Jo),pe(e),pe(t),pe(u),c,pe(m),pe(r),pe(o),n),de(([E,_,,I,,,,,,,D])=>{const F=D&&D.length!==I;return E&&!_&&!F}),ne(([,,[E,_],I,D,F,N,P,$,O,A])=>{const L=D,{sizeTree:V,offsetTree:z}=L,Z=yt(g);if(I===0)return{...ac,totalCount:I};if(E===0&&_===0)return Z===0?{...ac,totalCount:I}:Bp(Z,F,D,$,O,A||[]);if(Re(V))return Z>0?null:Cs(oC(ic(F,I),L,A),[],I,O,L,$);const C=[];if(P.length>0){const H=P[0],k=P[P.length-1];let R=0;for(const W of xs(V,H,k)){const K=W.value,J=Math.max(W.start,H),ce=Math.min(W.end,k);for(let B=J;B<=ce;B++)C.push({index:B,size:K,offset:R,data:A&&A[B]}),R+=K}}if(!N)return Cs([],C,I,O,L,$);const j=P.length>0?P[P.length-1]+1:0,X=UE(z,E,_,j);if(X.length===0)return null;const re=I-1,ee=ys([],H=>{for(const k of X){const R=k.value;let W=R.offset,K=k.start;const J=R.size;if(R.offset<E){K+=Math.floor((E-R.offset+O)/(J+O));const B=K-k.start;W+=B*J+B*O}K<j&&(W+=(j-K)*J,K=j);const ce=Math.min(k.end,re);for(let B=K;B<=ce&&!(W>=_);B++)H.push({index:B,size:J,offset:W,data:A&&A[B]}),W+=J+O}});return Cs(ee,C,I,O,L,$)}),de(E=>E!==null),He()),ac);le(U(n,de(Kl),ne(E=>E==null?void 0:E.length)),e),le(U(x,ne(E=>E.topListHeight)),f),le(f,l),le(U(x,ne(E=>[E.top,E.bottom])),a),le(U(x,ne(E=>E.items)),v);const y=Nt(U(x,de(({items:E})=>E.length>0),be(e,n),de(([{items:E},_])=>E[E.length-1].originalIndex===_-1),ne(([,E,_])=>[E-1,_]),He(Jo),ne(([E])=>E))),S=Nt(U(x,jn(200),de(({items:E,topItems:_})=>E.length>0&&E[0].originalIndex===_.length),ne(({items:E})=>E[0].index),He())),w=Nt(U(x,de(({items:E})=>E.length>0),ne(({items:E})=>{let _=0,I=E.length-1;for(;E[_].type==="group"&&_<I;)_++;for(;E[I].type==="group"&&I>_;)I--;return{startIndex:E[_].index,endIndex:E[I].index}}),He(Np)));return{listState:x,topItemsIndexes:m,endReached:y,startReached:S,rangeChanged:w,itemsRendered:v,initialItemCount:g,...d}},ze(sn,Lp,sc,Xo,Ko,Yo,zn,tc),{singleton:!0}),iC=Pe(([{sizes:t,firstItemIndex:e,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(le(U(a,be(i),de(([,l])=>l!==0),be(o,t,e,r,n),ne(([[,l],c,u,f,d,h=[]])=>Bp(l,c,u,f,d,h))),s),{}),ze(sn,Xo,ur,zn),{singleton:!0}),zp=Pe(([{scrollVelocity:t}])=>{const e=Y(!1),n=Ee(),r=Y(!1);return le(U(t,be(r,e,n),de(([o,i])=>!!i),ne(([o,i,s,a])=>{const{exit:l,enter:c}=i;if(s){if(l(o,a))return!1}else if(c(o,a))return!0;return s}),He()),e),Fe(U(st(e,t,n),be(r)),([[o,i,s],a])=>o&&a&&a.change&&a.change(i,s)),{isSeeking:e,scrollSeekConfiguration:r,scrollVelocity:t,scrollSeekRangeChanged:n}},ze(Yo),{singleton:!0}),sC=Pe(([{topItemsIndexes:t}])=>{const e=Y(0);return le(U(e,de(n=>n>0),ne(n=>Array.from({length:n}).map((r,o)=>o))),t),{topItemCount:e}},ze(ur)),Hp=Pe(([{footerHeight:t,headerHeight:e,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const i=Ee(),s=vt(U(st(t,r,e,n,o),ne(([a,l,c,u,f])=>a+l+c+u+f.offsetBottom+f.bottom)),0);return le(pe(s),i),{totalListHeight:s,totalListHeightChanged:i}},ze(St,ur),{singleton:!0});function Wp(t){let e=!1,n;return()=>(e||(e=!0,n=t()),n)}const aC=Wp(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),lC=Pe(([{scrollBy:t,scrollTop:e,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:f,gap:d},{log:h},{recalcInProgress:p}])=>{const m=Nt(U(l,be(a),rn(([,v,x,y],[{items:S,totalCount:w,bottom:E,offsetBottom:_},I])=>{const D=E+_;let F=0;return x===w&&v.length>0&&S.length>0&&(S[0].originalIndex===0&&v[0].originalIndex===0||(F=D-y,F!==0&&(F+=I))),[F,S,w,D]},[0,[],0,0]),de(([v])=>v!==0),be(e,s,r,i,h,p),de(([,v,x,y,,,S])=>!S&&!y&&v!==0&&x===qo),ne(([[v],,,,,x])=>(x("Upward scrolling compensation",{amount:v},Vt.DEBUG),v))));function g(v){v>0?(ve(t,{top:-v,behavior:"auto"}),ve(n,0)):(ve(n,0),ve(t,{top:-v,behavior:"auto"}))}return Fe(U(m,be(n,o)),([v,x,y])=>{y&&aC()?ve(n,x-v):g(-v)}),Fe(U(st(vt(o,!1),n,p),de(([v,x,y])=>!v&&!y&&x!==0),ne(([v,x])=>x),jn(1)),g),le(U(u,ne(v=>({top:-v}))),t),Fe(U(c,be(f,d),ne(([v,{lastSize:x,groupIndices:y,sizeTree:S},w])=>{function E(_){return _*(x+w)}if(y.length===0)return E(v);{let _=0;const I=Uo(S,0);let D=0,F=0;for(;D<v;){D++,_+=I;let N=y.length===F+1?1/0:y[F+1]-y[F]-1;D+N>v&&(_-=I,N=v-D+1),D+=N,_+=E(N),F++}return _}})),v=>{ve(n,v),requestAnimationFrame(()=>{ve(t,{top:v}),requestAnimationFrame(()=>{ve(n,0),ve(p,!1)})})}),{deviation:n}},ze(St,Yo,ur,sn,Bn,tc)),cC=Pe(([{didMount:t},{scrollTo:e},{listState:n}])=>{const r=Y(0);return Fe(U(t,be(r),de(([,o])=>o!==0),ne(([,o])=>({top:o}))),o=>{tn(U(n,qr(1),de(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{ve(e,o)})})}),{initialScrollTop:r}},ze(zn,St,ur),{singleton:!0}),uC=Pe(([{viewportHeight:t},{totalListHeight:e}])=>{const n=Y(!1),r=vt(U(st(n,t,e),de(([o])=>o),ne(([,o,i])=>Math.max(0,o-i)),jn(0),He()),0);return{alignToBottom:n,paddingTopAddition:r}},ze(St,Hp),{singleton:!0}),lc=Pe(([{scrollTo:t,scrollContainerState:e}])=>{const n=Ee(),r=Ee(),o=Ee(),i=Y(!1),s=Y(void 0);return le(U(st(n,r),ne(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),e),le(U(t,be(r),ne(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},ze(St)),fC=({itemTop:t,itemBottom:e,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:i,...s}})=>t<n?{...s,behavior:o,align:i??"start"}:e>r?{...s,behavior:o,align:i??"end"}:null,dC=Pe(([{sizes:t,totalCount:e,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ee();return le(U(u,be(t,o,e,i,s,a,r),be(n),ne(([[f,d,h,p,m,g,v,x],y])=>{const{done:S,behavior:w,align:E,calculateViewLocation:_=fC,...I}=f,D=kp(f,d,p-1),F=Go(D,d.offsetTree,y)+m+g,N=F+Gt(d.sizeTree,D)[1],P=x+g,$=x+h-v,O=_({itemTop:F,itemBottom:N,viewportTop:P,viewportBottom:$,locationParams:{behavior:w,align:E,...I}});return O?S&&tn(U(l,de(A=>A===!1),qr(yt(l)?1:2)),S):S&&S(),O}),de(f=>f!==null)),c),{scrollIntoView:u}},ze(sn,St,Ko,ur,Bn),{singleton:!0}),hC=Pe(([{sizes:t,sizeRanges:e},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:o},{useWindowScroll:i,windowScrollContainerState:s,windowViewportRect:a}])=>{const l=Ee(),c=Y(void 0),u=Y(null),f=Y(null);return le(s,u),le(a,f),Fe(U(l,be(t,n,i,u,f)),([d,h,p,m,g,v])=>{const x=qE(h.sizeTree);m&&g!==null&&v!==null&&(p=g.scrollTop-v.offsetTop),d({ranges:x,scrollTop:p})}),le(U(c,de(Kl),ne(pC)),r),le(U(o,be(c),de(([,d])=>d!==void 0),He(),ne(([,d])=>d.ranges)),e),{getState:l,restoreStateFrom:c}},ze(sn,St,Xo,zn,lc));function pC(t){return{offset:t.scrollTop,index:0,align:"start"}}const mC=Pe(([t,e,n,r,o,i,s,a,l,c])=>({...t,...e,...n,...r,...o,...i,...s,...a,...l,...c}),ze(sc,iC,zn,zp,Hp,cC,uC,lc,dC,Bn)),Up=Pe(([{totalCount:t,sizeRanges:e,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:i,data:s,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:f},{initialTopMostItemIndex:d,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,g,v,{listState:x,topItemsIndexes:y,...S},{scrollToIndex:w},E,{topItemCount:_},{groupCounts:I},D])=>(le(S.rangeChanged,D.scrollSeekRangeChanged),le(U(D.windowViewportRect,ne(F=>F.visibleHeight)),m.viewportHeight),{totalCount:t,data:s,firstItemIndex:a,sizeRanges:e,initialTopMostItemIndex:d,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:y,topItemCount:_,groupCounts:I,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:x,scrollToIndex:w,trackItemSizes:o,itemSize:i,groupIndices:l,...S,...D,...m,sizes:f,...g}),ze(sn,Xo,St,hC,nC,ur,Ko,lC,sC,Lp,mC)),cc="-webkit-sticky",Gp="sticky",Kp=Wp(()=>{if(typeof document>"u")return Gp;const t=document.createElement("div");return t.style.position=cc,t.style.position===cc?cc:Gp});function uc(t,e){const n=b.useRef(null),r=b.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,f;if(e){const d=e.getBoundingClientRect(),h=l.top-d.top;u=d.height-Math.max(0,h),f=h+e.scrollTop}else u=window.innerHeight-Math.max(0,l.top),f=l.top+window.pageYOffset;n.current={offsetTop:f,visibleHeight:u,visibleWidth:c},t(n.current)},[t,e]),{callbackRef:o,ref:i}=Yl(r),s=b.useCallback(()=>{r(i.current)},[r,i]);return b.useEffect(()=>{if(e){e.addEventListener("scroll",s);const a=new ResizeObserver(()=>{requestAnimationFrame(s)});return a.observe(e),()=>{e.removeEventListener("scroll",s),a.unobserve(e)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,e]),o}const As=b.createContext(void 0),qp=b.createContext(void 0);function fc(t){return t}const gC=Pe(([t,e])=>({...t,...e}),ze(Up,Pe(()=>{const t=Y(l=>`Item ${l}`),e=Y(null),n=Y(l=>`Group ${l}`),r=Y({}),o=Y(fc),i=Y("div"),s=Y(lr),a=(l,c=null)=>vt(U(r,ne(u=>u[l]),He()),c);return{context:e,itemContent:t,groupContent:n,components:r,computeItemKey:o,headerFooterTag:i,scrollerRef:s,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}))),yC=({height:t})=>b.createElement("div",{style:{height:t}}),vC={position:Kp(),zIndex:1,overflowAnchor:"none"},bC={overflowAnchor:"none"},Zp=b.memo(function({showTopList:e=!1}){const n=Se("listState"),r=jt("sizeRanges"),o=Se("useWindowScroll"),i=Se("customScrollParent"),s=jt("windowScrollContainerState"),a=jt("scrollContainerState"),l=i||o?s:a,c=Se("itemContent"),u=Se("context"),f=Se("groupContent"),d=Se("trackItemSizes"),h=Se("itemSize"),p=Se("log"),m=jt("gap"),{callbackRef:g}=xp(r,h,d,e?lr:l,p,m,i),[v,x]=b.useState(0);pc("deviation",O=>{v!==O&&x(O)});const y=Se("EmptyPlaceholder"),S=Se("ScrollSeekPlaceholder")||yC,w=Se("ListComponent"),E=Se("ItemComponent"),_=Se("GroupComponent"),I=Se("computeItemKey"),D=Se("isSeeking"),F=Se("groupIndices").length>0,N=Se("alignToBottom"),P=Se("initialItemFinalLocationReached"),$=e?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:v!==0?v:N?"auto":0,...P?{}:{visibility:"hidden"}};return!e&&n.totalCount===0&&y?b.createElement(y,Ze(y,u)):b.createElement(w,{...Ze(w,u),ref:g,style:$,"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list"},(e?n.topItems:n.items).map(O=>{const A=O.originalIndex,L=I(A+n.firstItemIndex,O.data,u);return D?b.createElement(S,{...Ze(S,u),key:L,index:O.index,height:O.size,type:O.type||"item",...O.type==="group"?{}:{groupIndex:O.groupIndex}}):O.type==="group"?b.createElement(_,{...Ze(_,u),key:L,"data-index":A,"data-known-size":O.size,"data-item-index":O.index,style:vC},f(O.index,u)):b.createElement(E,{...Ze(E,u),...Yp(E,O.data),key:L,"data-index":A,"data-known-size":O.size,"data-item-index":O.index,"data-item-group-index":O.groupIndex,style:bC},F?c(O.index,O.groupIndex,O.data,u):c(O.index,O.data,u))}))}),xC={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Yr=t=>({width:"100%",height:"100%",position:"absolute",top:0,...t?{display:"flex",flexDirection:"column"}:{}}),wC={width:"100%",position:Kp(),top:0,zIndex:1};function Ze(t,e){if(typeof t!="string")return{context:e}}function Yp(t,e){return{item:typeof t=="string"?void 0:e}}const SC=b.memo(function(){const e=Se("HeaderComponent"),n=jt("headerHeight"),r=Se("headerFooterTag"),o=on(s=>n(Ut(s,"height"))),i=Se("context");return e?b.createElement(r,{ref:o},b.createElement(e,Ze(e,i))):null}),TC=b.memo(function(){const e=Se("FooterComponent"),n=jt("footerHeight"),r=Se("headerFooterTag"),o=on(s=>n(Ut(s,"height"))),i=Se("context");return e?b.createElement(r,{ref:o},b.createElement(e,Ze(e,i))):null});function dc({usePublisher:t,useEmitter:e,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=t("scrollContainerState"),c=n("ScrollerComponent"),u=t("smoothScrollTargetReached"),f=n("scrollerRef"),d=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=Sp(l,u,c,f);return e("scrollTo",m),e("scrollBy",p),b.createElement(c,{ref:h,style:{...xC,...i},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...Ze(c,d)},s)})}function hc({usePublisher:t,useEmitter:e,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=t("windowScrollContainerState"),c=n("ScrollerComponent"),u=t("smoothScrollTargetReached"),f=n("totalListHeight"),d=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:g,scrollToCallback:v}=Sp(l,u,c,lr,h);return ME(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),e("windowScrollTo",v),e("scrollBy",g),b.createElement(c,{style:{position:"relative",...i,...f!==0?{height:f+d}:{}},"data-virtuoso-scroller":!0,...a,...Ze(c,p)},s)})}const EC=({children:t})=>{const e=b.useContext(As),n=jt("viewportHeight"),r=jt("fixedItemHeight"),o=Se("alignToBottom"),i=on(Ho(n,s=>Ut(s,"height")));return b.useEffect(()=>{e&&(n(e.viewportHeight),r(e.itemHeight))},[e,n,r]),b.createElement("div",{style:Yr(o),ref:i,"data-viewport-type":"element"},t)},CC=({children:t})=>{const e=b.useContext(As),n=jt("windowViewportRect"),r=jt("fixedItemHeight"),o=Se("customScrollParent"),i=uc(n,o),s=Se("alignToBottom");return b.useEffect(()=>{e&&(r(e.itemHeight),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:100}))},[e,n,r]),b.createElement("div",{ref:i,style:Yr(s),"data-viewport-type":"window"},t)},AC=({children:t})=>{const e=Se("TopItemListComponent")||"div",n=Se("headerHeight"),r={...wC,marginTop:`${n}px`},o=Se("context");return b.createElement(e,{style:r,...Ze(e,o)},t)},_C=b.memo(function(e){const n=Se("useWindowScroll"),r=Se("topItemsIndexes").length>0,o=Se("customScrollParent"),i=o||n?OC:IC,s=o||n?CC:EC;return b.createElement(i,{...e},r&&b.createElement(AC,null,b.createElement(Zp,{showTopList:!0})),b.createElement(s,null,b.createElement(SC,null),b.createElement(Zp,null),b.createElement(TC,null)))}),{Component:PC,usePublisher:jt,useEmitterValue:Se,useEmitter:pc}=Zl(gC,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},_C),IC=dc({usePublisher:jt,useEmitterValue:Se,useEmitter:pc}),OC=hc({usePublisher:jt,useEmitterValue:Se,useEmitter:pc}),kC=PC,Xp={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},DC={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Jp,ceil:Qp,floor:_s,min:mc,max:Qo}=Math;function MC(t){return{...DC,items:t}}function em(t,e,n){return Array.from({length:e-t+1}).map((r,o)=>{const i=n===null?null:n[o+t];return{index:o+t,data:i}})}function FC(t,e){return t&&t.column===e.column&&t.row===e.row}function Ps(t,e){return t&&t.width===e.width&&t.height===e.height}const LC=Pe(([{overscan:t,visibleRange:e,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},f,d,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:g,customScrollParent:v,windowScrollContainerState:x,windowScrollTo:y},S])=>{const w=Y(0),E=Y(0),_=Y(Xp),I=Y({height:0,width:0}),D=Y({height:0,width:0}),F=Ee(),N=Ee(),P=Y(0),$=Y(null),O=Y({row:0,column:0}),A=Ee(),L=Ee(),V=Y(!1),z=Y(0),Z=Y(!0),C=Y(!1);Fe(U(p,be(z),de(([k,R])=>!!R)),()=>{ve(Z,!1),ve(E,0)}),Fe(U(st(p,Z,D,I,z,C),de(([k,R,W,K,,J])=>k&&!R&&W.height!==0&&K.height!==0&&!J)),([,,,,k])=>{ve(C,!0),oc(1,()=>{ve(F,k)}),tn(U(r),()=>{ve(n,[0,0]),ve(Z,!0)})}),le(U(L,de(k=>k!=null&&k.scrollTop>0),nn(0)),E),Fe(U(p,be(L),de(([,k])=>k!=null)),([,k])=>{k&&(ve(I,k.viewport),ve(D,k==null?void 0:k.item),ve(O,k.gap),k.scrollTop>0&&(ve(V,!0),tn(U(r,qr(1)),R=>{ve(V,!1)}),ve(s,{top:k.scrollTop})))}),le(U(I,ne(({height:k})=>k)),o),le(U(st(pe(I,Ps),pe(D,Ps),pe(O,(k,R)=>k&&k.column===R.column&&k.row===R.row),pe(r)),ne(([k,R,W,K])=>({viewport:k,item:R,gap:W,scrollTop:K}))),A),le(U(st(pe(w),e,pe(O,FC),pe(D,Ps),pe(I,Ps),pe($),pe(E),pe(V),pe(Z),pe(z)),de(([,,,,,,,k])=>!k),ne(([k,[R,W],K,J,ce,B,Me,,Ue,Qe])=>{const{row:ae,column:_e}=K,{height:Te,width:Ae}=J,{width:me}=ce;if(Me===0&&(k===0||me===0))return Xp;if(Ae===0){const ot=ic(Qe,k),hn=ot===0?Math.max(Me-1,0):ot;return MC(em(ot,hn,B))}const Oe=nm(me,Ae,_e);let rt,Ct;Ue?R===0&&W===0&&Me>0?(rt=0,Ct=Me-1):(rt=Oe*_s((R+ae)/(Te+ae)),Ct=Oe*Qp((W+ae)/(Te+ae))-1,Ct=mc(k-1,Qo(Ct,Oe-1)),rt=mc(Ct,Qo(0,rt))):(rt=0,Ct=-1);const q=em(rt,Ct,B),{top:oe,bottom:Ne}=tm(ce,K,J,q),qe=Qp(k/Oe),dn=qe*Te+(qe-1)*ae-Ne;return{items:q,offsetTop:oe,offsetBottom:dn,top:oe,bottom:Ne,itemHeight:Te,itemWidth:Ae}})),_),le(U($,de(k=>k!==null),ne(k=>k.length)),w),le(U(st(I,D,_,O),de(([k,R,{items:W}])=>W.length>0&&R.height!==0&&k.height!==0),ne(([k,R,{items:W},K])=>{const{top:J,bottom:ce}=tm(k,K,R,W);return[J,ce]}),He(Jo)),n);const j=Y(!1);le(U(r,be(j),ne(([k,R])=>R||k!==0)),j);const X=Nt(U(pe(_),de(({items:k})=>k.length>0),be(w,j),de(([{items:k},R,W])=>W&&k[k.length-1].index===R-1),ne(([,k])=>k-1),He())),re=Nt(U(pe(_),de(({items:k})=>k.length>0&&k[0].index===0),nn(0),He())),ee=Nt(U(pe(_),be(V),de(([{items:k},R])=>k.length>0&&!R),ne(([{items:k}])=>({startIndex:k[0].index,endIndex:k[k.length-1].index})),He(Np),jn(0)));le(ee,d.scrollSeekRangeChanged),le(U(F,be(I,D,w,O),ne(([k,R,W,K,J])=>{const ce=Mp(k),{align:B,behavior:Me,offset:Ue}=ce;let Qe=ce.index;Qe==="LAST"&&(Qe=K-1),Qe=Qo(0,Qe,mc(K-1,Qe));let ae=gc(R,J,W,Qe);return B==="end"?ae=Jp(ae-R.height+W.height):B==="center"&&(ae=Jp(ae-R.height/2+W.height/2)),Ue&&(ae+=Ue),{top:ae,behavior:Me}})),s);const H=vt(U(_,ne(k=>k.offsetBottom+k.bottom)),0);return le(U(m,ne(k=>({width:k.visibleWidth,height:k.visibleHeight}))),I),{data:$,totalCount:w,viewportDimensions:I,itemDimensions:D,scrollTop:r,scrollHeight:N,overscan:t,scrollBy:i,scrollTo:s,scrollToIndex:F,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:y,useWindowScroll:g,customScrollParent:v,windowScrollContainerState:x,deviation:P,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:O,restoreStateFrom:L,...d,initialTopMostItemIndex:z,gridState:_,totalListHeight:H,...f,startReached:re,endReached:X,rangeChanged:ee,stateChanged:A,propsReady:h,stateRestoreInProgress:V,...S}},ze(sc,St,Yo,zp,zn,lc,Bn));function tm(t,e,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const i=gc(t,e,n,r[0].index),s=gc(t,e,n,r[r.length-1].index)+o;return{top:i,bottom:s}}function gc(t,e,n,r){const o=nm(t.width,n.width,e.column),i=_s(r/o),s=i*n.height+Qo(0,i-1)*e.row;return s>0?s+e.row:s}function nm(t,e,n){return Qo(1,_s((t+n)/(_s(e)+n)))}const NC=Pe(([t,e])=>({...t,...e}),ze(LC,Pe(()=>{const t=Y(c=>`Item ${c}`),e=Y({}),n=Y(null),r=Y("virtuoso-grid-item"),o=Y("virtuoso-grid-list"),i=Y(fc),s=Y("div"),a=Y(lr),l=(c,u=null)=>vt(U(e,ne(f=>f[c]),He()),u);return{context:n,itemContent:t,components:e,computeItemKey:i,itemClassName:r,listClassName:o,headerFooterTag:s,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),VC=b.memo(function(){const e=Ke("gridState"),n=Ke("listClassName"),r=Ke("itemClassName"),o=Ke("itemContent"),i=Ke("computeItemKey"),s=Ke("isSeeking"),a=Kt("scrollHeight"),l=Ke("ItemComponent"),c=Ke("ListComponent"),u=Ke("ScrollSeekPlaceholder"),f=Ke("context"),d=Kt("itemDimensions"),h=Kt("gap"),p=Ke("log"),m=Ke("stateRestoreInProgress"),g=on(v=>{const x=v.parentElement.parentElement.scrollHeight;a(x);const y=v.firstChild;if(y){const{width:S,height:w}=y.getBoundingClientRect();d({width:S,height:w})}h({row:om("row-gap",getComputedStyle(v).rowGap,p),column:om("column-gap",getComputedStyle(v).columnGap,p)})});return m?null:b.createElement(c,{ref:g,className:n,...Ze(c,f),style:{paddingTop:e.offsetTop,paddingBottom:e.offsetBottom},"data-testid":"virtuoso-item-list"},e.items.map(v=>{const x=i(v.index,v.data,f);return s?b.createElement(u,{key:x,...Ze(u,f),index:v.index,height:e.itemHeight,width:e.itemWidth}):b.createElement(l,{...Ze(l,f),className:r,"data-index":v.index,key:x},o(v.index,v.data,f))}))}),RC=b.memo(function(){const e=Ke("HeaderComponent"),n=Kt("headerHeight"),r=Ke("headerFooterTag"),o=on(s=>n(Ut(s,"height"))),i=Ke("context");return e?b.createElement(r,{ref:o},b.createElement(e,Ze(e,i))):null}),$C=b.memo(function(){const e=Ke("FooterComponent"),n=Kt("footerHeight"),r=Ke("headerFooterTag"),o=on(s=>n(Ut(s,"height"))),i=Ke("context");return e?b.createElement(r,{ref:o},b.createElement(e,Ze(e,i))):null}),jC=({children:t})=>{const e=b.useContext(qp),n=Kt("itemDimensions"),r=Kt("viewportDimensions"),o=on(i=>{r(i.getBoundingClientRect())});return b.useEffect(()=>{e&&(r({height:e.viewportHeight,width:e.viewportWidth}),n({height:e.itemHeight,width:e.itemWidth}))},[e,r,n]),b.createElement("div",{style:Yr(!1),ref:o},t)},BC=({children:t})=>{const e=b.useContext(qp),n=Kt("windowViewportRect"),r=Kt("itemDimensions"),o=Ke("customScrollParent"),i=uc(n,o);return b.useEffect(()=>{e&&(r({height:e.itemHeight,width:e.itemWidth}),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:e.viewportWidth}))},[e,n,r]),b.createElement("div",{ref:i,style:Yr(!1)},t)},zC=b.memo(function({...e}){const n=Ke("useWindowScroll"),r=Ke("customScrollParent"),o=r||n?WC:HC,i=r||n?BC:jC;return b.createElement(o,{...e},b.createElement(i,null,b.createElement(RC,null),b.createElement(VC,null),b.createElement($C,null)))}),{Component:ED,usePublisher:Kt,useEmitterValue:Ke,useEmitter:rm}=Zl(NC,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},zC),HC=dc({usePublisher:Kt,useEmitterValue:Ke,useEmitter:rm}),WC=hc({usePublisher:Kt,useEmitterValue:Ke,useEmitter:rm});function om(t,e,n){return e!=="normal"&&!(e!=null&&e.endsWith("px"))&&n(`${t} was not resolved to pixel value correctly`,e,Vt.WARN),e==="normal"?0:parseInt(e??"0",10)}const UC=Pe(([t,e])=>({...t,...e}),ze(Up,Pe(()=>{const t=Y(l=>b.createElement("td",null,"Item $",l)),e=Y(null),n=Y(null),r=Y(null),o=Y({}),i=Y(fc),s=Y(lr),a=(l,c=null)=>vt(U(o,ne(u=>u[l]),He()),c);return{context:e,itemContent:t,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:i,scrollerRef:s,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),GC=({height:t})=>b.createElement("tr",null,b.createElement("td",{style:{height:t}})),KC=({height:t})=>b.createElement("tr",null,b.createElement("td",{style:{height:t,padding:0,border:0}})),qC={overflowAnchor:"none"},ZC=b.memo(function(){const e=Le("listState"),n=qt("sizeRanges"),r=Le("useWindowScroll"),o=Le("customScrollParent"),i=qt("windowScrollContainerState"),s=qt("scrollContainerState"),a=o||r?i:s,l=Le("itemContent"),c=Le("trackItemSizes"),u=Le("itemSize"),f=Le("log"),{callbackRef:d,ref:h}=xp(n,u,c,a,f,void 0,o),[p,m]=b.useState(0);yc("deviation",L=>{p!==L&&(h.current.style.marginTop=`${L}px`,m(L))});const g=Le("EmptyPlaceholder"),v=Le("ScrollSeekPlaceholder")||GC,x=Le("FillerRow")||KC,y=Le("TableBodyComponent"),S=Le("TableRowComponent"),w=Le("computeItemKey"),E=Le("isSeeking"),_=Le("paddingTopAddition"),I=Le("firstItemIndex"),D=Le("statefulTotalCount"),F=Le("context");if(D===0&&g)return b.createElement(g,Ze(g,F));const N=e.offsetTop+_+p,P=e.offsetBottom,$=N>0?b.createElement(x,{height:N,key:"padding-top",context:F}):null,O=P>0?b.createElement(x,{height:P,key:"padding-bottom",context:F}):null,A=e.items.map(L=>{const V=L.originalIndex,z=w(V+I,L.data,F);return E?b.createElement(v,{...Ze(v,F),key:z,index:L.index,height:L.size,type:L.type||"item"}):b.createElement(S,{...Ze(S,F),...Yp(S,L.data),key:z,"data-index":V,"data-known-size":L.size,"data-item-index":L.index,style:qC},l(L.index,L.data,F))});return b.createElement(y,{ref:d,"data-testid":"virtuoso-item-list",...Ze(y,F)},[$,...A,O])}),YC=({children:t})=>{const e=b.useContext(As),n=qt("viewportHeight"),r=qt("fixedItemHeight"),o=on(Ho(n,i=>Ut(i,"height")));return b.useEffect(()=>{e&&(n(e.viewportHeight),r(e.itemHeight))},[e,n,r]),b.createElement("div",{style:Yr(!1),ref:o,"data-viewport-type":"element"},t)},XC=({children:t})=>{const e=b.useContext(As),n=qt("windowViewportRect"),r=qt("fixedItemHeight"),o=Le("customScrollParent"),i=uc(n,o);return b.useEffect(()=>{e&&(r(e.itemHeight),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:100}))},[e,n,r]),b.createElement("div",{ref:i,style:Yr(!1),"data-viewport-type":"window"},t)},JC=b.memo(function(e){const n=Le("useWindowScroll"),r=Le("customScrollParent"),o=qt("fixedHeaderHeight"),i=qt("fixedFooterHeight"),s=Le("fixedHeaderContent"),a=Le("fixedFooterContent"),l=Le("context"),c=on(Ho(o,x=>Ut(x,"height"))),u=on(Ho(i,x=>Ut(x,"height"))),f=r||n?t1:e1,d=r||n?XC:YC,h=Le("TableComponent"),p=Le("TableHeadComponent"),m=Le("TableFooterComponent"),g=s?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...Ze(p,l)},s()):null,v=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...Ze(m,l)},a()):null;return b.createElement(f,{...e},b.createElement(d,null,b.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...Ze(h,l)},[g,b.createElement(ZC,{key:"TableBody"}),v])))}),{Component:QC,usePublisher:qt,useEmitterValue:Le,useEmitter:yc}=Zl(UC,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},JC),e1=dc({usePublisher:qt,useEmitterValue:Le,useEmitter:yc}),t1=hc({usePublisher:qt,useEmitterValue:Le,useEmitter:yc}),n1=QC,r1=t=>{const[e,n]=b.useState(0);return b.useEffect(()=>{const r=t.current;if(!r)return;const o=r.parentElement;if(console.log(o),!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),e},im=({children:t,className:e="",size:n,...r})=>T.jsxs("label",{className:"font-normal flex items-center gap-2",children:[T.jsx("input",{...r,type:"checkbox",className:_t("form-checkbox h-4 w-4 app rounded border-card-border text-primary focus:ring-primary appearance-none inline-block bg-origin-border select-none",e),...r}),t]}),o1={Item:b.forwardRef(function(e,n){return T.jsx("li",{...e,ref:n,className:"flex items-center gap-1 justify-between"})}),List:b.forwardRef(function(e,n){return T.jsx("ul",{...e,ref:n,className:"space-y-3"})})},i1=t=>{const e=b.useRef(null),n=r1(e);return T.jsxs("div",{className:"flex flex-row gap-4",ref:e,children:[T.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:[T.jsx("header",{className:"border-b border-card-border pb-2"}),T.jsxs("div",{className:"px-8 space-y-2",children:[T.jsx(us,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),T.jsx(kC,{height:n,useWindowScroll:!0,data:t.source,components:o1,itemContent:(r,o)=>T.jsx(b.Fragment,{children:T.jsx(im,{children:T.jsx(t.Item,{data:o})})})})]})]}),T.jsx("div",{children:T.jsx(zo,{children:T.jsx(H0,{})})}),T.jsx("div",{})]})},s1=Gl("inline-flex rounded-pill bg-opacity-90 gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle whitespace-nowrap font-medium",{variants:{size:{default:"h-8 px-4 py-2",big:"h-12 px-6 py-4",small:"h-10 p-2 text-sm",icon:"p-1"},theme:{raw:"",main:"bg-primary-subtle text-primary-hover",warn:"bg-warn-subtle text-warn-hover",danger:"bg-danger-subtle text-danger-hover",secondary:"bg-secondary-subtle text-secondary-hover",success:"bg-success-subtle text-success-hover",info:"bg-info-subtle text-info-hover",loading:"animate-pulse bg-disabled duration-700 opacity-70",disabled:"bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"main",size:"default"}}),a1=b.forwardRef(function({className:e,icon:n,loading:r,theme:o,size:i,...s},a){return T.jsxs(Bo,{...s,ref:a,"data-theme":o,as:s.as??"span",className:_t(s1({size:i,theme:r?"loading":o!=null&&o.disabled?"disabled":o}),e),children:[s.children,n]})}),sm=({children:t,title:e,container:n="",header:r=null,className:o="",...i})=>T.jsxs(Bo,{...i,as:"div",className:_t("rounded-card flex flex-col gap-4 bg-card-background py-4 pb-8 border-card-border border shadow",n),children:[e?T.jsx("header",{className:"w-full px-8 pb-4 mb-2 border-b border-card-border font-medium text-xl",children:e}):r,T.jsx("div",{className:`min-w-full px-8 ${o}`,children:t})]}),l1=t=>T.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[T.jsxs("header",{className:"p-6 items-start flex gap-4",children:[T.jsx("div",{className:_t("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",t.iconContainer),children:T.jsx("div",{children:T.jsx(t.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),T.jsxs("div",{className:"flex flex-col gap-1",children:[T.jsx("header",{children:T.jsx("h3",{className:"text-base leading-none",children:t.title})}),T.jsx("p",{className:"text-4xl font-semibold",children:t.children})]})]}),t.footer?T.jsx("footer",{className:"px-6 py-2",children:t.footer}):null]}),Is=b.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Os=b.createContext({}),ks=b.createContext(null),vc=typeof document<"u",Ds=vc?b.useLayoutEffect:b.useEffect,am=b.createContext({strict:!1}),Ms=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),lm="data-"+Ms("framerAppearId"),c1={skipAnimations:!1,useManualTiming:!1};class cm{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function u1(t){let e=new cm,n=new cm,r=0,o=!1,i=!1;const s=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const f=u&&o,d=f?e:n;return c&&s.add(l),d.add(l)&&f&&o&&(r=e.order.length),l},cancel:l=>{n.remove(l),s.delete(l)},process:l=>{if(o){i=!0;return}if(o=!0,[e,n]=[n,e],n.clear(),r=e.order.length,r)for(let c=0;c<r;c++){const u=e.order[c];s.has(u)&&(a.schedule(u),t()),u(l)}o=!1,i&&(i=!1,a.process(l))}};return a}const Fs=["read","resolveKeyframes","update","preRender","render","postRender"],f1=40;function um(t,e){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Fs.reduce((v,x)=>(v[x]=u1(i),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:f,postRender:d}=s,h=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,f1),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),f.process(o),d.process(o),o.isProcessing=!1,n&&e&&(r=!1,t(h))},p=()=>{n=!0,r=!0,o.isProcessing||t(h)};return{schedule:Fs.reduce((v,x)=>{const y=s[x];return v[x]=(S,w=!1,E=!1)=>(n||p(),y.schedule(S,w,E)),v},{}),cancel:v=>{for(let x=0;x<Fs.length;x++)s[Fs[x]].cancel(v)},state:o,steps:s}}const{schedule:bc,cancel:_D}=um(queueMicrotask,!1);function Xr(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const fm=b.createContext({});let dm=!1;function d1(t,e,n,r,o){const{visualElement:i}=b.useContext(Os),s=b.useContext(am),a=b.useContext(ks),l=b.useContext(Is).reducedMotion,c=b.useRef();r=r||s.renderer,!c.current&&r&&(c.current=r(t,{visualState:e,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=b.useContext(fm);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&p1(c.current,n,o,f),b.useInsertionEffect(()=>{u&&u.update(n,a)});const d=b.useRef(!!(n[lm]&&!window.HandoffComplete));return Ds(()=>{u&&(u.updateFeatures(),bc.render(u.render),d.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!d.current&&u.animationState&&u.animationState.animateChanges(),d.current&&(d.current=!1,dm||(dm=!0,queueMicrotask(h1))))}),u}function h1(){window.HandoffComplete=!0}function p1(t,e,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:hm(t.parent)),t.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&Xr(a),visualElement:t,scheduleRender:()=>t.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function hm(t){if(t)return t.options.allowProjection!==!1?t.projection:hm(t.parent)}function m1(t,e,n){return b.useCallback(r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Xr(n)&&(n.current=r))},[e])}function ei(t){return typeof t=="string"||Array.isArray(t)}function ti(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const xc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wc=["initial",...xc];function Ls(t){return ti(t.animate)||wc.some(e=>ei(t[e]))}function pm(t){return!!(Ls(t)||t.variants)}function g1(t,e){if(Ls(t)){const{initial:n,animate:r}=t;return{initial:n===!1||ei(n)?n:void 0,animate:ei(r)?r:void 0}}return t.inherit!==!1?e:{}}function y1(t){const{initial:e,animate:n}=g1(t,b.useContext(Os));return b.useMemo(()=>({initial:e,animate:n}),[mm(e),mm(n)])}function mm(t){return Array.isArray(t)?t.join(" "):t}const gm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Jr={};for(const t in gm)Jr[t]={isEnabled:e=>gm[t].some(n=>!!e[n])};function v1(t){for(const e in t)Jr[e]={...Jr[e],...t[e]}}const ni=b.createContext({}),b1=Symbol.for("motionComponentSymbol"),ut=t=>t;let Qr=ut,Zt=ut;process.env.NODE_ENV!=="production"&&(Qr=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},Zt=(t,e)=>{if(!t)throw new Error(e)});function x1({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:o}){t&&v1(t);function i(a,l){let c;const u={...b.useContext(Is),...a,layoutId:w1(a)},{isStatic:f}=u,d=y1(a),h=r(a,f);if(!f&&vc){S1(u,t);const p=T1(u);c=p.MeasureLayout,d.visualElement=d1(o,h,u,e,p.ProjectionNode)}return T.jsxs(Os.Provider,{value:d,children:[c&&d.visualElement?T.jsx(c,{visualElement:d.visualElement,...u}):null,n(o,a,m1(h,d.visualElement,l),h,f,d.visualElement)]})}const s=b.forwardRef(i);return s[b1]=o,s}function w1({layoutId:t}){const e=b.useContext(ni).id;return e&&t!==void 0?e+"-"+t:t}function S1(t,e){const n=b.useContext(am).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Qr(!1,r):Zt(!1,r)}}function T1(t){const{drag:e,layout:n}=Jr;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function E1(t){function e(r,o={}){return x1(t(r,o))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(r,o)=>(n.has(o)||n.set(o,e(o)),n.get(o))})}const C1=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Sc(t){return typeof t!="string"||t.includes("-")?!1:!!(C1.indexOf(t)>-1||/[A-Z]/u.test(t))}const Ns={};function A1(t){Object.assign(Ns,t)}const ri=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Hn=new Set(ri);function ym(t,{layout:e,layoutId:n}){return Hn.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ns[t]||t==="opacity")}const ft=t=>!!(t&&t.getVelocity),_1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},P1=ri.length;function I1(t,e,n){let r="";for(let o=0;o<P1;o++){const i=ri[o];if(t[i]!==void 0){const s=_1[i]||i;r+=`${s}(${t[i]}) `}}return r=r.trim(),n?r=n(t,e?"":r):e&&(r="none"),r}const vm=t=>e=>typeof e=="string"&&e.startsWith(t),bm=vm("--"),O1=vm("var(--"),Tc=t=>O1(t)?k1.test(t.split("/*")[0].trim()):!1,k1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,D1=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Wn=(t,e,n)=>n>e?e:n<t?t:n,eo={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},oi={...eo,transform:t=>Wn(0,1,t)},Vs={...eo,default:1},ii=t=>Math.round(t*1e5)/1e5,Ec=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,M1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,F1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function si(t){return typeof t=="string"}function L1(t){return t==null}const ai=t=>({test:e=>si(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Un=ai("deg"),an=ai("%"),ue=ai("px"),N1=ai("vh"),V1=ai("vw"),xm={...an,parse:t=>an.parse(t)/100,transform:t=>an.transform(t*100)},wm={...eo,transform:Math.round},Sm={borderWidth:ue,borderTopWidth:ue,borderRightWidth:ue,borderBottomWidth:ue,borderLeftWidth:ue,borderRadius:ue,radius:ue,borderTopLeftRadius:ue,borderTopRightRadius:ue,borderBottomRightRadius:ue,borderBottomLeftRadius:ue,width:ue,maxWidth:ue,height:ue,maxHeight:ue,size:ue,top:ue,right:ue,bottom:ue,left:ue,padding:ue,paddingTop:ue,paddingRight:ue,paddingBottom:ue,paddingLeft:ue,margin:ue,marginTop:ue,marginRight:ue,marginBottom:ue,marginLeft:ue,rotate:Un,rotateX:Un,rotateY:Un,rotateZ:Un,scale:Vs,scaleX:Vs,scaleY:Vs,scaleZ:Vs,skew:Un,skewX:Un,skewY:Un,distance:ue,translateX:ue,translateY:ue,translateZ:ue,x:ue,y:ue,z:ue,perspective:ue,transformPerspective:ue,opacity:oi,originX:xm,originY:xm,originZ:ue,zIndex:wm,backgroundPositionX:ue,backgroundPositionY:ue,fillOpacity:oi,strokeOpacity:oi,numOctaves:wm};function Cc(t,e,n){const{style:r,vars:o,transform:i,transformOrigin:s}=t;let a=!1,l=!1,c=!0;for(const u in e){const f=e[u];if(bm(u)){o[u]=f;continue}const d=Sm[u],h=D1(f,d);if(Hn.has(u)){if(a=!0,i[u]=h,!c)continue;f!==(d.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,s[u]=h):r[u]=h}if(e.transform||(a||n?r.transform=I1(t.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:d=0}=s;r.transformOrigin=`${u} ${f} ${d}`}}const Ac=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Tm(t,e,n){for(const r in e)!ft(e[r])&&!ym(r,n)&&(t[r]=e[r])}function R1({transformTemplate:t},e){return b.useMemo(()=>{const n=Ac();return Cc(n,e,t),Object.assign({},n.vars,n.style)},[e])}function $1(t,e){const n=t.style||{},r={};return Tm(r,n,t),Object.assign(r,R1(t,e)),r}function j1(t,e){const n={},r=$1(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const B1=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Rs(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||B1.has(t)}let Em=t=>!Rs(t);function z1(t){t&&(Em=e=>e.startsWith("on")?!Rs(e):t(e))}try{z1(require("@emotion/is-prop-valid").default)}catch{}function H1(t,e,n){const r={};for(const o in t)o==="values"&&typeof t.values=="object"||(Em(o)||n===!0&&Rs(o)||!e&&!Rs(o)||t.draggable&&o.startsWith("onDrag"))&&(r[o]=t[o]);return r}function Cm(t,e,n){return typeof t=="string"?t:ue.transform(e+n*t)}function W1(t,e,n){const r=Cm(e,t.x,t.width),o=Cm(n,t.y,t.height);return`${r} ${o}`}const U1={offset:"stroke-dashoffset",array:"stroke-dasharray"},G1={offset:"strokeDashoffset",array:"strokeDasharray"};function K1(t,e,n=1,r=0,o=!0){t.pathLength=1;const i=o?U1:G1;t[i.offset]=ue.transform(-r);const s=ue.transform(e),a=ue.transform(n);t[i.array]=`${s} ${a}`}function _c(t,{attrX:e,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,f){if(Cc(t,c,f),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:p}=t;d.transform&&(p&&(h.transform=d.transform),delete d.transform),p&&(o!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=W1(p,o!==void 0?o:.5,i!==void 0?i:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&K1(d,s,a,l,!1)}const Am=()=>({...Ac(),attrs:{}}),Pc=t=>typeof t=="string"&&t.toLowerCase()==="svg";function q1(t,e,n,r){const o=b.useMemo(()=>{const i=Am();return _c(i,e,Pc(r),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};Tm(i,t.style,t),o.style={...i,...o.style}}return o}function Z1(t=!1){return(n,r,o,{latestValues:i},s)=>{const l=(Sc(n)?q1:j1)(r,i,s,n),c=H1(r,typeof n=="string",t),u=n!==b.Fragment?{...c,...l,ref:o}:{},{children:f}=r,d=b.useMemo(()=>ft(f)?f.get():f,[f]);return b.createElement(n,{...u,children:d})}}function _m(t,{style:e,vars:n},r,o){Object.assign(t.style,e,o&&o.getProjectionStyles(r));for(const i in n)t.style.setProperty(i,n[i])}const Pm=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Im(t,e,n,r){_m(t,e,void 0,r);for(const o in e.attrs)t.setAttribute(Pm.has(o)?o:Ms(o),e.attrs[o])}function Ic(t,e,n){var r;const{style:o}=t,i={};for(const s in o)(ft(o[s])||e.style&&ft(e.style[s])||ym(s,t)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),i}function Om(t,e,n){const r=Ic(t,e,n);for(const o in t)if(ft(t[o])||ft(e[o])){const i=ri.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=t[o]}return r}function km(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function Oc(t,e,n,r){if(typeof e=="function"){const[o,i]=km(r);e=e(n!==void 0?n:t.custom,o,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[o,i]=km(r);e=e(n!==void 0?n:t.custom,o,i)}return e}function fr(t){const e=b.useRef(null);return e.current===null&&(e.current=t()),e.current}const kc=t=>Array.isArray(t),Y1=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),X1=t=>kc(t)?t[t.length-1]||0:t;function $s(t){const e=ft(t)?t.get():t;return Y1(e)?e.toValue():e}const Dm=new Set(["opacity","clipPath","filter","transform"]);function Mm(t){if(Hn.has(t))return"transform";if(Dm.has(t)||t==="backgroundColor")return Ms(t)}function js(t,e){t.indexOf(e)===-1&&t.push(e)}function Bs(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function J1([...t],e,n){const r=e<0?t.length+e:e;if(r>=0&&r<t.length){const o=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(o,0,i)}return t}function Q1({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:n,onMount:r},o,i,s,a){const l={latestValues:eA(o,i,s,a?!1:t,e),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Fm=t=>(e,n)=>{const r=b.useContext(Os),o=b.useContext(ks),i=()=>Q1(t,e,r,o,n);return n?i():fr(i)};function Lm(t,e){const n=Mm(e);n&&js(t,n)}function Nm(t,e,n){const r=Array.isArray(e)?e:[e];for(let o=0;o<r.length;o++){const i=Oc(t,r[o]);if(i){const{transitionEnd:s,transition:a,...l}=i;n(l,s)}}}function eA(t,e,n,r,o){var i;const s={},a=[],l=r&&((i=t.style)===null||i===void 0?void 0:i.willChange)===void 0,c=o(t,{});for(const g in c)s[g]=$s(c[g]),l&&Lm(a,g);let{initial:u,animate:f}=t;const d=Ls(t),h=pm(t);e&&h&&!d&&t.inherit!==!1&&(u===void 0&&(u=e.initial),f===void 0&&(f=e.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?f:u;return m&&typeof m!="boolean"&&!ti(m)&&Nm(t,m,(g,v)=>{for(const x in g){let y=g[x];if(Array.isArray(y)){const S=p?y.length-1:0;y=y[S]}y!==null&&(s[x]=y)}for(const x in v)s[x]=v[x]}),l&&(f&&u!==!1&&!ti(f)&&Nm(t,f,g=>{for(const v in g)Lm(a,v)}),a.length&&(s.willChange=a.join(","))),s}const{schedule:Ie,cancel:ln,state:dt,steps:Dc}=um(typeof requestAnimationFrame<"u"?requestAnimationFrame:ut,!0),tA={useVisualState:Fm({scrapeMotionValuesFromProps:Om,createRenderState:Am,onMount:(t,e,{renderState:n,latestValues:r})=>{Ie.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Ie.render(()=>{_c(n,r,Pc(e.tagName),t.transformTemplate),Im(e,n)})}})},nA={useVisualState:Fm({applyWillChange:!0,scrapeMotionValuesFromProps:Ic,createRenderState:Ac})};function rA(t,{forwardMotionProps:e=!1},n,r){return{...Sc(t)?tA:nA,preloadedFeatures:n,useRender:Z1(e),createVisualElement:r,Component:t}}function vn(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const Vm=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function zs(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const oA=t=>e=>Vm(e)&&t(e,zs(e));function bn(t,e,n,r){return vn(t,e,oA(n),r)}const iA=(t,e)=>n=>e(t(n)),xn=(...t)=>t.reduce(iA);function Rm(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const $m=Rm("dragHorizontal"),jm=Rm("dragVertical");function Bm(t){let e=!1;if(t==="y")e=jm();else if(t==="x")e=$m();else{const n=$m(),r=jm();n&&r?e=()=>{n(),r()}:(n&&n(),r&&r())}return e}function zm(){const t=Bm(!0);return t?(t(),!1):!0}class Gn{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Hm(t,e){const n=e?"pointerenter":"pointerleave",r=e?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||zm())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[r];l&&Ie.postRender(()=>l(i,s))};return bn(t.current,n,o,{passive:!t.getProps()[r]})}class sA extends Gn{mount(){this.unmount=xn(Hm(this.node,!0),Hm(this.node,!1))}unmount(){}}class aA extends Gn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=xn(vn(this.node.current,"focus",()=>this.onFocus()),vn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Wm=(t,e)=>e?t===e?!0:Wm(t,e.parentElement):!1;function Mc(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,zs(n))}class lA extends Gn{constructor(){super(...arguments),this.removeStartListeners=ut,this.removeEndListeners=ut,this.removeAccessibleListeners=ut,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=bn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),d=!f&&!Wm(this.node.current,a.target)?u:c;d&&Ie.update(()=>d(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=bn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=xn(i,s),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Mc("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Ie.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=vn(this.node.current,"keyup",s),Mc("down",(a,l)=>{this.startPress(a,l)})},n=vn(this.node.current,"keydown",e),r=()=>{this.isPressing&&Mc("cancel",(i,s)=>this.cancelPress(i,s))},o=vn(this.node.current,"blur",r);this.removeAccessibleListeners=xn(n,o)}}startPress(e,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Ie.postRender(()=>r(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!zm()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Ie.postRender(()=>r(e,n))}mount(){const e=this.node.getProps(),n=bn(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),r=vn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=xn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Fc=new WeakMap,Lc=new WeakMap,cA=t=>{const e=Fc.get(t.target);e&&e(t)},uA=t=>{t.forEach(cA)};function fA({root:t,...e}){const n=t||document;Lc.has(n)||Lc.set(n,{});const r=Lc.get(n),o=JSON.stringify(e);return r[o]||(r[o]=new IntersectionObserver(uA,{root:t,...e})),r[o]}function dA(t,e,n){const r=fA(e);return Fc.set(t,n),r.observe(t),()=>{Fc.delete(t),r.unobserve(t)}}const hA={some:0,all:1};class pA extends Gn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:hA[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return dA(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(mA(e,n))&&this.startObserver()}unmount(){}}function mA({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const gA={inView:{Feature:pA},tap:{Feature:lA},focus:{Feature:aA},hover:{Feature:sA}};function Um(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Hs(t,e,n){const r=t.getProps();return Oc(r,e,n!==void 0?n:r.custom,t)}const wn=t=>t*1e3,Sn=t=>t/1e3,yA={type:"spring",stiffness:500,damping:25,restSpeed:10},vA=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),bA={type:"keyframes",duration:.8},xA={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wA=(t,{keyframes:e})=>e.length>2?bA:Hn.has(t)?t.startsWith("scale")?vA(e[1]):yA:xA;function SA({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Nc(t,e){return t[e]||t.default||t}const TA=t=>t!==null;function Ws(t,{repeat:e,repeatType:n="loop"},r){const o=t.filter(TA),i=e&&n!=="loop"&&e%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let Us;function EA(){Us=void 0}const Kn={now:()=>(Us===void 0&&Kn.set(dt.isProcessing||c1.useManualTiming?dt.timestamp:performance.now()),Us),set:t=>{Us=t,queueMicrotask(EA)}},Gm=t=>/^0[^.\s]+$/u.test(t);function CA(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Gm(t):!0}const Km=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),AA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _A(t){const e=AA.exec(t);if(!e)return[,];const[,n,r,o]=e;return[`--${n??r}`,o]}const PA=4;function qm(t,e,n=1){Zt(n<=PA,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[r,o]=_A(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const s=i.trim();return Km(s)?parseFloat(s):s}return Tc(o)?qm(o,e,n+1):o}const IA=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Zm=t=>t===eo||t===ue,Ym=(t,e)=>parseFloat(t.split(", ")[e]),Xm=(t,e)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Ym(o[1],e);{const i=r.match(/^matrix\((.+)\)$/u);return i?Ym(i[1],t):0}},OA=new Set(["x","y","z"]),kA=ri.filter(t=>!OA.has(t));function DA(t){const e=[];return kA.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const to={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Xm(4,13),y:Xm(5,14)};to.translateX=to.x,to.translateY=to.y;const Jm=t=>e=>e.test(t),Qm=[eo,ue,an,Un,V1,N1,{test:t=>t==="auto",parse:t=>t}],eg=t=>Qm.find(Jm(t)),dr=new Set;let Vc=!1,Rc=!1;function tg(){if(Rc){const t=Array.from(dr).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const o=DA(r);o.length&&(n.set(r,o),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Rc=!1,Vc=!1,dr.forEach(t=>t.complete()),dr.clear()}function ng(){dr.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Rc=!0)})}function MA(){ng(),tg()}class $c{constructor(e,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(dr.add(this),Vc||(Vc=!0,Ie.read(ng),Ie.resolveKeyframes(tg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:o}=this;for(let i=0;i<e.length;i++)if(e[i]===null)if(i===0){const s=o==null?void 0:o.get(),a=e[e.length-1];if(s!==void 0)e[0]=s;else if(r&&n){const l=r.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),o&&s===void 0&&o.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),dr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,dr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const jc=(t,e)=>n=>!!(si(n)&&F1.test(n)&&n.startsWith(t)||e&&!L1(n)&&Object.prototype.hasOwnProperty.call(n,e)),rg=(t,e,n)=>r=>{if(!si(r))return r;const[o,i,s,a]=r.match(Ec);return{[t]:parseFloat(o),[e]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},FA=t=>Wn(0,255,t),Bc={...eo,transform:t=>Math.round(FA(t))},hr={test:jc("rgb","red"),parse:rg("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Bc.transform(t)+", "+Bc.transform(e)+", "+Bc.transform(n)+", "+ii(oi.transform(r))+")"};function LA(t){let e="",n="",r="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const zc={test:jc("#"),parse:LA,transform:hr.transform},no={test:jc("hsl","hue"),parse:rg("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+an.transform(ii(e))+", "+an.transform(ii(n))+", "+ii(oi.transform(r))+")"},bt={test:t=>hr.test(t)||zc.test(t)||no.test(t),parse:t=>hr.test(t)?hr.parse(t):no.test(t)?no.parse(t):zc.parse(t),transform:t=>si(t)?t:t.hasOwnProperty("red")?hr.transform(t):no.transform(t)};function NA(t){var e,n;return isNaN(t)&&si(t)&&(((e=t.match(Ec))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(M1))===null||n===void 0?void 0:n.length)||0)>0}const og="number",ig="color",VA="var",RA="var(",sg="${}",$A=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function li(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=e.replace($A,l=>(bt.test(l)?(r.color.push(i),o.push(ig),n.push(bt.parse(l))):l.startsWith(RA)?(r.var.push(i),o.push(VA),n.push(l)):(r.number.push(i),o.push(og),n.push(parseFloat(l))),++i,sg)).split(sg);return{values:n,split:a,indexes:r,types:o}}function ag(t){return li(t).values}function lg(t){const{split:e,types:n}=li(t),r=e.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=e[s],o[s]!==void 0){const a=n[s];a===og?i+=ii(o[s]):a===ig?i+=bt.transform(o[s]):i+=o[s]}return i}}const jA=t=>typeof t=="number"?0:t;function BA(t){const e=ag(t);return lg(t)(e.map(jA))}const qn={test:NA,parse:ag,createTransformer:lg,getAnimatableNone:BA},zA=new Set(["brightness","contrast","saturate","opacity"]);function HA(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(Ec)||[];if(!r)return t;const o=n.replace(r,"");let i=zA.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+o+")"}const WA=/\b([a-z-]*)\(.*?\)/gu,Hc={...qn,getAnimatableNone:t=>{const e=t.match(WA);return e?e.map(HA).join(" "):t}},UA={...Sm,color:bt,backgroundColor:bt,outlineColor:bt,fill:bt,stroke:bt,borderColor:bt,borderTopColor:bt,borderRightColor:bt,borderBottomColor:bt,borderLeftColor:bt,filter:Hc,WebkitFilter:Hc},Wc=t=>UA[t];function cg(t,e){let n=Wc(t);return n!==Hc&&(n=qn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const GA=new Set(["auto","none","0"]);function KA(t,e,n){let r=0,o;for(;r<t.length&&!o;){const i=t[r];typeof i=="string"&&!GA.has(i)&&li(i).values.length&&(o=t[r]),r++}if(o&&n)for(const i of e)t[i]=cg(n,o)}class ug extends $c{constructor(e,n,r,o){super(e,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),Tc(c))){const u=qm(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!IA.has(r)||e.length!==2)return;const[o,i]=e,s=eg(o),a=eg(i);if(s!==a)if(Zm(s)&&Zm(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let o=0;o<e.length;o++)CA(e[o])&&r.push(o);r.length&&KA(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=to[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&e.getValue(r,o).jump(o,!1)}measureEndState(){var e;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=to[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function fg(t){let e;return()=>(e===void 0&&(e=t()),e)}const dg=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(qn.test(t)||t==="0")&&!t.startsWith("url("));function qA(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function ZA(t,e,n,r){const o=t[0];if(o===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],s=dg(o,e),a=dg(i,e);return Qr(s===a,`You are trying to animate ${e} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!s||!a?!1:qA(t)||n==="spring"&&r}class hg{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&MA(),this._resolved}onKeyframesResolved(e,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!ZA(e,r,o,i))if(s)this.options.duration=0;else{l==null||l(Ws(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function pg(t,e){return e?t*(1e3/e):0}const YA=5;function mg(t,e,n){const r=Math.max(e-YA,0);return pg(n-t(r),e-r)}const Uc=.001,XA=.01,gg=10,JA=.05,QA=1;function e_({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,i;Qr(t<=wn(gg),"Spring duration must be 10 seconds or less");let s=1-e;s=Wn(JA,QA,s),t=Wn(XA,gg,Sn(t)),s<1?(o=c=>{const u=c*s,f=u*t,d=u-n,h=Gc(c,s),p=Math.exp(-f);return Uc-d/h*p},i=c=>{const f=c*s*t,d=f*n+n,h=Math.pow(s,2)*Math.pow(c,2)*t,p=Math.exp(-f),m=Gc(Math.pow(c,2),s);return(-o(c)+Uc>0?-1:1)*((d-h)*p)/m}):(o=c=>{const u=Math.exp(-c*t),f=(c-n)*t+1;return-Uc+u*f},i=c=>{const u=Math.exp(-c*t),f=(n-c)*(t*t);return u*f});const a=5/t,l=n_(o,i,a);if(t=wn(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:t}}}const t_=12;function n_(t,e,n){let r=n;for(let o=1;o<t_;o++)r=r-t(r)/e(r);return r}function Gc(t,e){return t*Math.sqrt(1-e*e)}const r_=["duration","bounce"],o_=["stiffness","damping","mass"];function yg(t,e){return e.some(n=>t[n]!==void 0)}function i_(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!yg(t,o_)&&yg(t,r_)){const n=e_(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function vg({keyframes:t,restDelta:e,restSpeed:n,...r}){const o=t[0],i=t[t.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:d}=i_({...r,velocity:-Sn(r.velocity||0)}),h=f||0,p=l/(2*Math.sqrt(a*c)),m=i-o,g=Sn(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),e||(e=v?.005:.5);let x;if(p<1){const y=Gc(g,p);x=S=>{const w=Math.exp(-p*g*S);return i-w*((h+p*g*m)/y*Math.sin(y*S)+m*Math.cos(y*S))}}else if(p===1)x=y=>i-Math.exp(-g*y)*(m+(h+g*m)*y);else{const y=g*Math.sqrt(p*p-1);x=S=>{const w=Math.exp(-p*g*S),E=Math.min(y*S,300);return i-w*((h+p*g*m)*Math.sinh(E)+y*m*Math.cosh(E))/y}}return{calculatedDuration:d&&u||null,next:y=>{const S=x(y);if(d)s.done=y>=u;else{let w=h;y!==0&&(p<1?w=mg(x,y,S):w=0);const E=Math.abs(w)<=n,_=Math.abs(i-S)<=e;s.done=E&&_}return s.value=s.done?i:S,s}}}function bg({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=t[0],d={done:!1,value:f},h=I=>a!==void 0&&I<a||l!==void 0&&I>l,p=I=>a===void 0?l:l===void 0||Math.abs(a-I)<Math.abs(l-I)?a:l;let m=n*e;const g=f+m,v=s===void 0?g:s(g);v!==g&&(m=v-f);const x=I=>-m*Math.exp(-I/r),y=I=>v+x(I),S=I=>{const D=x(I),F=y(I);d.done=Math.abs(D)<=c,d.value=d.done?v:F};let w,E;const _=I=>{h(d.value)&&(w=I,E=vg({keyframes:[d.value,p(d.value)],velocity:mg(y,I,d.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return _(0),{calculatedDuration:null,next:I=>{let D=!1;return!E&&w===void 0&&(D=!0,S(I),_(I)),w!==void 0&&I>=w?E.next(I-w):(!D&&S(I),d)}}}const xg=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,s_=1e-7,a_=12;function l_(t,e,n,r,o){let i,s,a=0;do s=e+(n-e)/2,i=xg(s,r,o)-t,i>0?n=s:e=s;while(Math.abs(i)>s_&&++a<a_);return s}function ci(t,e,n,r){if(t===e&&n===r)return ut;const o=i=>l_(i,0,1,t,n);return i=>i===0||i===1?i:xg(o(i),e,r)}const c_=ci(.42,0,1,1),u_=ci(0,0,.58,1),wg=ci(.42,0,.58,1),f_=t=>Array.isArray(t)&&typeof t[0]!="number",Sg=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Tg=t=>e=>1-t(1-e),Kc=t=>1-Math.sin(Math.acos(t)),Eg=Tg(Kc),d_=Sg(Kc),Cg=ci(.33,1.53,.69,.99),qc=Tg(Cg),h_=Sg(qc),Ag={linear:ut,easeIn:c_,easeInOut:wg,easeOut:u_,circIn:Kc,circInOut:d_,circOut:Eg,backIn:qc,backInOut:h_,backOut:Cg,anticipate:t=>(t*=2)<1?.5*qc(t):.5*(2-Math.pow(2,-10*(t-1)))},_g=t=>{if(Array.isArray(t)){Zt(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,r,o]=t;return ci(e,n,r,o)}else if(typeof t=="string")return Zt(Ag[t]!==void 0,`Invalid easing type '${t}'`),Ag[t];return t},ui=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},We=(t,e,n)=>t+(e-t)*n;function Zc(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function p_({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let o=0,i=0,s=0;if(!e)o=i=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;o=Zc(l,a,t+1/3),i=Zc(l,a,t),s=Zc(l,a,t-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function Gs(t,e){return n=>n>0?e:t}const Yc=(t,e,n)=>{const r=t*t,o=n*(e*e-r)+r;return o<0?0:Math.sqrt(o)},m_=[zc,hr,no],g_=t=>m_.find(e=>e.test(t));function Pg(t){const e=g_(t);if(Qr(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let n=e.parse(t);return e===no&&(n=p_(n)),n}const Ig=(t,e)=>{const n=Pg(t),r=Pg(e);if(!n||!r)return Gs(t,e);const o={...n};return i=>(o.red=Yc(n.red,r.red,i),o.green=Yc(n.green,r.green,i),o.blue=Yc(n.blue,r.blue,i),o.alpha=We(n.alpha,r.alpha,i),hr.transform(o))},Xc=new Set(["none","hidden"]);function y_(t,e){return Xc.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function v_(t,e){return n=>We(t,e,n)}function Jc(t){return typeof t=="number"?v_:typeof t=="string"?Tc(t)?Gs:bt.test(t)?Ig:w_:Array.isArray(t)?Og:typeof t=="object"?bt.test(t)?Ig:b_:Gs}function Og(t,e){const n=[...t],r=n.length,o=t.map((i,s)=>Jc(i)(i,e[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function b_(t,e){const n={...t,...e},r={};for(const o in n)t[o]!==void 0&&e[o]!==void 0&&(r[o]=Jc(t[o])(t[o],e[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function x_(t,e){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const s=e.types[i],a=t.indexes[s][o[s]],l=(n=t.values[a])!==null&&n!==void 0?n:0;r[i]=l,o[s]++}return r}const w_=(t,e)=>{const n=qn.createTransformer(e),r=li(t),o=li(e);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Xc.has(t)&&!o.values.length||Xc.has(e)&&!r.values.length?y_(t,e):xn(Og(x_(r,o),o.values),n):(Qr(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Gs(t,e))};function kg(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?We(t,e,n):Jc(t)(t,e)}function S_(t,e,n){const r=[],o=n||kg,i=t.length-1;for(let s=0;s<i;s++){let a=o(t[s],t[s+1]);if(e){const l=Array.isArray(e)?e[s]||ut:e;a=xn(l,a)}r.push(a)}return r}function Dg(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const i=t.length;if(Zt(i===e.length,"Both input and output ranges must be the same length"),i===1)return()=>e[0];if(i===2&&t[0]===t[1])return()=>e[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=S_(e,r,o),a=s.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const f=ui(t[u],t[u+1],c);return s[u](f)};return n?c=>l(Wn(t[0],t[i-1],c)):l}function T_(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const o=ui(0,e,r);t.push(We(n,1,o))}}function E_(t){const e=[0];return T_(e,t.length-1),e}function C_(t,e){return t.map(n=>n*e)}function A_(t,e){return t.map(()=>e||wg).splice(0,t.length-1)}function Ks({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const o=f_(r)?r.map(_g):_g(r),i={done:!1,value:e[0]},s=C_(n&&n.length===e.length?n:E_(e),t),a=Dg(s,e,{ease:Array.isArray(o)?o:A_(e,o)});return{calculatedDuration:t,next:l=>(i.value=a(l),i.done=l>=t,i)}}const Mg=2e4;function __(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<Mg;)e+=n,r=t.next(e);return e>=Mg?1/0:e}const P_=t=>{const e=({timestamp:n})=>t(n);return{start:()=>Ie.update(e,!0),stop:()=>ln(e),now:()=>dt.isProcessing?dt.timestamp:Kn.now()}},I_={decay:bg,inertia:bg,tween:Ks,keyframes:Ks,spring:vg},O_=t=>t/100;class Qc extends hg{constructor({KeyframeResolver:e=$c,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:i}=this.options,s=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(i,s,r,o):this.resolver=new e(i,s,r,o),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=I_[n]||Ks;let l,c;a!==Ks&&typeof e[0]!="number"&&(process.env.NODE_ENV!=="production"&&Zt(e.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),l=xn(O_,kg(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});i==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=__(u));const{calculatedDuration:f}=u,d=f+o,h=d*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:r}=this;if(!r){const{keyframes:I}=this.options;return{done:!0,value:I[I.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:m,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-d*(this.speed>=0?1:-1),x=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let y=this.currentTime,S=i;if(h){const I=Math.min(this.currentTime,u)/f;let D=Math.floor(I),F=I%1;!F&&I>=1&&(F=1),F===1&&D--,D=Math.min(D,h+1),!!(D%2)&&(p==="reverse"?(F=1-F,m&&(F-=m/f)):p==="mirror"&&(S=s)),y=Wn(0,1,F)*f}const w=x?{done:!1,value:l[0]}:S.next(y);a&&(w.value=a(w.value));let{done:E}=w;!x&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const _=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return _&&o!==void 0&&(w.value=Ws(l,this.options,o)),g&&g(w.value),_&&this.finish(),w}get duration(){const{resolved:e}=this;return e?Sn(e.calculatedDuration):0}get time(){return Sn(this.currentTime)}set time(e){e=wn(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Sn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=P_,onPlay:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Fg=t=>Array.isArray(t)&&typeof t[0]=="number";function Lg(t){return!!(!t||typeof t=="string"&&t in eu||Fg(t)||Array.isArray(t)&&t.every(Lg))}const fi=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,eu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:fi([0,.65,.55,1]),circOut:fi([.55,0,1,.45]),backIn:fi([.31,.01,.66,-.59]),backOut:fi([.33,1.53,.69,.99])};function k_(t){return Ng(t)||eu.easeOut}function Ng(t){if(t)return Fg(t)?fi(t):Array.isArray(t)?t.map(k_):eu[t]}function D_(t,e,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=Ng(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const M_=fg(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),qs=10,F_=2e4;function L_(t){return t.type==="spring"||t.name==="backgroundColor"||!Lg(t.ease)}function N_(t,e){const n=new Qc({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:t[0]};const o=[];let i=0;for(;!r.done&&i<F_;)r=n.sample(i),o.push(r.value),i+=qs;return{times:void 0,keyframes:o,duration:i-qs,ease:"linear"}}class Vg extends hg{constructor(e){super(e);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new ug(o,(i,s)=>this.onKeyframesResolved(i,s),n,r),this.resolver.scheduleResolve()}initPlayback(e,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(L_(this.options)){const{onComplete:f,onUpdate:d,motionValue:h,...p}=this.options,m=N_(e,p);e=m.keyframes,e.length===1&&(e[1]=e[0]),o=m.duration,i=m.times,s=m.ease,a="keyframes"}const u=D_(l.owner.current,c,e,{...this.options,duration:o,times:i,ease:s});return u.startTime=Kn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(Ws(e,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:i,type:a,ease:s,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return Sn(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return Sn(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=wn(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return ut;const{animation:r}=n;r.timeline=e,r.onfinish=null}return ut}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:r,duration:o,type:i,ease:s,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:f,...d}=this.options,h=new Qc({...d,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),p=wn(this.time);c.setWithVelocity(h.sample(p-qs).value,h.sample(p).value,qs)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=e;return M_()&&r&&Dm.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function V_(t,e){let n;const r=()=>{const{currentTime:o}=e,s=(o===null?0:o.value)/100;n!==s&&t(s),n=s};return Ie.update(r,!0),()=>ln(r)}const R_=fg(()=>window.ScrollTimeline!==void 0);class $_{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let r=0;r<this.animations.length;r++)this.animations[r][e]=n}attachTimeline(e){const n=this.animations.map(r=>{if(R_()&&r.attachTimeline)r.attachTimeline(e);else return r.pause(),V_(o=>{r.time=r.duration*o},e)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const tu=(t,e,n,r={},o,i,s)=>a=>{const l=Nc(r,t)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-wn(c);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:h=>{e.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:t,motionValue:e,element:i?void 0:o};SA(l)||(f={...f,...wA(t,f)}),f.duration&&(f.duration=wn(f.duration)),f.repeatDelay&&(f.repeatDelay=wn(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!i&&e.get()!==void 0){const h=Ws(f.keyframes,l);if(h!==void 0)return Ie.update(()=>{f.onUpdate(h),f.onComplete()}),new $_([])}return!i&&Vg.supports(f)?new Vg(f):new Qc(f)};class nu{constructor(){this.subscriptions=[]}add(e){return js(this.subscriptions,e),()=>Bs(this.subscriptions,e)}notify(e,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Rg=new Set;function ru(t,e,n){t||Rg.has(e)||(console.warn(e),Rg.add(e))}const $g=30,j_=t=>!isNaN(parseFloat(t)),di={current:void 0};class jg{constructor(e,n={}){this.version="11.3.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Kn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Kn.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=j_(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&ru(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new nu);const r=this.events[e].add(n);return e==="change"?()=>{r(),Ie.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return di.current&&di.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Kn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>$g)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,$g);return pg(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ro(t,e){return new jg(t,e)}function B_(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ro(n))}function z_(t,e){const n=Hs(t,e);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=X1(i[s]);B_(t,s,a)}}function Bg(t){return t.getProps()[lm]}class H_ extends jg{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(e){const n=Mm(e);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const i=this.counts.get(n)-1;this.counts.set(n,i),i===0&&(Bs(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function W_(t){return!!(ft(t)&&t.add)}function ou(t,e){var n;if(!t.applyWillChange)return;let r=t.getValue("willChange");if(!r&&!(!((n=t.props.style)===null||n===void 0)&&n.willChange)&&(r=new H_("auto"),t.addValue("willChange",r)),W_(r))return r.add(e)}function U_({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function zg(t,e,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=e;r&&(s=r);const c=[],u=o&&t.animationState&&t.animationState.getState()[o];for(const f in l){const d=t.getValue(f,(i=t.latestValues[f])!==null&&i!==void 0?i:null),h=l[f];if(h===void 0||u&&U_(u,f))continue;const p={delay:n,elapsed:0,...Nc(s||{},f)};let m=!1;if(window.HandoffAppearAnimations){const v=Bg(t);if(v){const x=window.HandoffAppearAnimations(v,f,d,Ie);x!==null&&(p.elapsed=x,m=!0)}}d.start(tu(f,d,h,t.shouldReduceMotion&&Hn.has(f)?{type:!1}:p,t,m,ou(t,f)));const g=d.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{Ie.update(()=>{a&&z_(t,a)})}),c}function iu(t,e,n={}){var r;const o=Hs(t,e,n.type==="exit"?(r=t.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(zg(t,o,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=i;return G_(t,e,u+c,f,d,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function G_(t,e,n=0,r=0,o=1,i){const s=[],a=(t.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(t.variantChildren).sort(K_).forEach((c,u)=>{c.notify("AnimationStart",e),s.push(iu(c,e,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(s)}function K_(t,e){return t.sortNodePosition(e)}function q_(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const o=e.map(i=>iu(t,i,n));r=Promise.all(o)}else if(typeof e=="string")r=iu(t,e,n);else{const o=typeof e=="function"?Hs(t,e,n.custom):e;r=Promise.all(zg(t,o,n))}return r.then(()=>{Ie.postRender(()=>{t.notify("AnimationComplete",e)})})}const Z_=[...xc].reverse(),Y_=xc.length;function X_(t){return e=>Promise.all(e.map(({animation:n,options:r})=>q_(t,n,r)))}function J_(t){let e=X_(t),n=Hg(),r=!0;const o=l=>(c,u)=>{var f;const d=Hs(t,u,l==="exit"?(f=t.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:p,...m}=d;c={...c,...m,...p}}return c};function i(l){e=l(t)}function s(l){const c=t.getProps(),u=t.getVariantContext(!0)||{},f=[],d=new Set;let h={},p=1/0;for(let g=0;g<Y_;g++){const v=Z_[g],x=n[v],y=c[v]!==void 0?c[v]:u[v],S=ei(y),w=v===l?x.isActive:null;w===!1&&(p=g);let E=y===u[v]&&y!==c[v]&&S;if(E&&r&&t.manuallyAnimateOnMount&&(E=!1),x.protectedKeys={...h},!x.isActive&&w===null||!y&&!x.prevProp||ti(y)||typeof y=="boolean")continue;let I=Q_(x.prevProp,y)||v===l&&x.isActive&&!E&&S||g>p&&S,D=!1;const F=Array.isArray(y)?y:[y];let N=F.reduce(o(v),{});w===!1&&(N={});const{prevResolvedValues:P={}}=x,$={...P,...N},O=A=>{I=!0,d.has(A)&&(D=!0,d.delete(A)),x.needsAnimating[A]=!0;const L=t.getValue(A);L&&(L.liveStyle=!1)};for(const A in $){const L=N[A],V=P[A];if(h.hasOwnProperty(A))continue;let z=!1;kc(L)&&kc(V)?z=!Um(L,V):z=L!==V,z?L!=null?O(A):d.add(A):L!==void 0&&d.has(A)?O(A):x.protectedKeys[A]=!0}x.prevProp=y,x.prevResolvedValues=N,x.isActive&&(h={...h,...N}),r&&t.blockInitialAnimation&&(I=!1),I&&(!E||D)&&f.push(...F.map(A=>({animation:A,options:{type:v}})))}if(d.size){const g={};d.forEach(v=>{const x=t.getBaseTarget(v),y=t.getValue(v);y&&(y.liveStyle=!0),g[v]=x??null}),f.push({animation:g})}let m=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(m=!1),r=!1,m?e(f):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(d=>{var h;return(h=d.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const f=s(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Hg(),r=!0}}}function Q_(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Um(e,t):!1}function pr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Hg(){return{animate:pr(!0),whileInView:pr(),whileHover:pr(),whileTap:pr(),whileDrag:pr(),whileFocus:pr(),exit:pr()}}class eP extends Gn{constructor(e){super(e),e.animationState||(e.animationState=J_(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ti(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let tP=0;class nP extends Gn{constructor(){super(...arguments),this.id=tP++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const o=this.node.animationState.setActive("exit",!e);n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const rP={animation:{Feature:eP},exit:{Feature:nP}},Wg=(t,e)=>Math.abs(t-e);function oP(t,e){const n=Wg(t.x,e.x),r=Wg(t.y,e.y);return Math.sqrt(n**2+r**2)}class Ug{constructor(e,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=au(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=oP(f.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=f,{timestamp:m}=dt;this.history.push({...p,timestamp:m});const{onStart:g,onMove:v}=this.handlers;d||(g&&g(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=su(d,this.transformPagePoint),Ie.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=au(f.type==="pointercancel"?this.lastMoveEventInfo:su(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,g),p&&p(f,g)},!Vm(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=zs(e),a=su(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=dt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,au(a,this.history)),this.removeListeners=xn(bn(this.contextWindow,"pointermove",this.handlePointerMove),bn(this.contextWindow,"pointerup",this.handlePointerUp),bn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ln(this.updatePoint)}}function su(t,e){return e?{point:e(t.point)}:t}function Gg(t,e){return{x:t.x-e.x,y:t.y-e.y}}function au({point:t},e){return{point:t,delta:Gg(t,Kg(e)),offset:Gg(t,iP(e)),velocity:sP(e,.1)}}function iP(t){return t[0]}function Kg(t){return t[t.length-1]}function sP(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const o=Kg(t);for(;n>=0&&(r=t[n],!(o.timestamp-r.timestamp>wn(e)));)n--;if(!r)return{x:0,y:0};const i=Sn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function $t(t){return t.max-t.min}function lu(t,e=0,n=.01){return Math.abs(t-e)<=n}function qg(t,e,n,r=.5){t.origin=r,t.originPoint=We(e.min,e.max,t.origin),t.scale=$t(n)/$t(e),(lu(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=We(n.min,n.max,t.origin)-t.originPoint,(lu(t.translate)||isNaN(t.translate))&&(t.translate=0)}function hi(t,e,n,r){qg(t.x,e.x,n.x,r?r.originX:void 0),qg(t.y,e.y,n.y,r?r.originY:void 0)}function Zg(t,e,n){t.min=n.min+e.min,t.max=t.min+$t(e)}function aP(t,e,n){Zg(t.x,e.x,n.x),Zg(t.y,e.y,n.y)}function Yg(t,e,n){t.min=e.min-n.min,t.max=t.min+$t(e)}function pi(t,e,n){Yg(t.x,e.x,n.x),Yg(t.y,e.y,n.y)}function lP(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?We(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?We(n,t,r.max):Math.min(t,n)),t}function Xg(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function cP(t,{top:e,left:n,bottom:r,right:o}){return{x:Xg(t.x,n,o),y:Xg(t.y,e,r)}}function Jg(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function uP(t,e){return{x:Jg(t.x,e.x),y:Jg(t.y,e.y)}}function fP(t,e){let n=.5;const r=$t(t),o=$t(e);return o>r?n=ui(e.min,e.max-r,t.min):r>o&&(n=ui(t.min,t.max-o,e.min)),Wn(0,1,n)}function dP(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const cu=.35;function hP(t=cu){return t===!1?t=0:t===!0&&(t=cu),{x:Qg(t,"left","right"),y:Qg(t,"top","bottom")}}function Qg(t,e,n){return{min:ey(t,e),max:ey(t,n)}}function ey(t,e){return typeof t=="number"?t:t[e]||0}const ty=()=>({translate:0,scale:1,origin:0,originPoint:0}),oo=()=>({x:ty(),y:ty()}),ny=()=>({min:0,max:0}),Xe=()=>({x:ny(),y:ny()});function Bt(t){return[t("x"),t("y")]}function ry({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function pP({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function mP(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function uu(t){return t===void 0||t===1}function fu({scale:t,scaleX:e,scaleY:n}){return!uu(t)||!uu(e)||!uu(n)}function mr(t){return fu(t)||oy(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function oy(t){return iy(t.x)||iy(t.y)}function iy(t){return t&&t!=="0%"}function Zs(t,e,n){const r=t-n,o=e*r;return n+o}function sy(t,e,n,r,o){return o!==void 0&&(t=Zs(t,o,r)),Zs(t,n,r)+e}function du(t,e=0,n=1,r,o){t.min=sy(t.min,e,n,r,o),t.max=sy(t.max,e,n,r,o)}function ay(t,{x:e,y:n}){du(t.x,e.translate,e.scale,e.originPoint),du(t.y,n.translate,n.scale,n.originPoint)}function gP(t,e,n,r=!1){const o=n.length;if(!o)return;e.x=e.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const l=i.instance;l&&l.style&&l.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&io(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,ay(t,s)),r&&mr(i.latestValues)&&io(t,i.latestValues))}e.x=ly(e.x),e.y=ly(e.y)}function ly(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Zn(t,e){t.min=t.min+e,t.max=t.max+e}function cy(t,e,[n,r,o]){const i=e[o]!==void 0?e[o]:.5,s=We(t.min,t.max,i);du(t,e[n],e[r],s,e.scale)}const yP=["x","scaleX","originX"],vP=["y","scaleY","originY"];function io(t,e){cy(t.x,e,yP),cy(t.y,e,vP)}function uy(t,e){return ry(mP(t.getBoundingClientRect(),e))}function bP(t,e,n){const r=uy(t,n),{scroll:o}=e;return o&&(Zn(r.x,o.offset.x),Zn(r.y,o.offset.y)),r}const fy=({current:t})=>t?t.ownerDocument.defaultView:null,xP=new WeakMap;class wP{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Xe(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(zs(u,"page").point)},i=(u,f)=>{var d;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Bm(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Bt(v=>{let x=this.getAxisMotionValue(v).get()||0;if(an.test(x)){const{projection:y}=this.visualElement;if(y&&y.layout){const S=y.layout.layoutBox[v];S&&(x=$t(S)*(parseFloat(x)/100))}}this.originPoint[v]=x}),m&&Ie.postRender(()=>m(u,f)),(d=this.removeWillChange)===null||d===void 0||d.call(this),this.removeWillChange=ou(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(u,f)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:g}=f;if(h&&this.currentDirection===null){this.currentDirection=SP(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),m&&m(u,f)},a=(u,f)=>this.stop(u,f),l=()=>Bt(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ug(e,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:fy(this.visualElement)})}stop(e,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Ie.postRender(()=>s(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:o}=this.getProps();if(!r||!Ys(e,o,this.currentDirection))return;const i=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=lP(s,this.constraints[e],this.elastic[e])),i.set(s)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,i=this.constraints;n&&Xr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=cP(o.layoutBox,n):this.constraints=!1,this.elastic=hP(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Bt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=dP(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Xr(e))return!1;const r=e.current;Zt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=bP(r,o.root,this.visualElement.getTransformPagePoint());let s=uP(o.layout.layoutBox,i);if(n){const a=n(pP(s));this.hasMutatedConstraints=!!a,a&&(s=ry(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Bt(u=>{if(!Ys(u,n,this.currentDirection))return;let f=l&&l[u]||{};s&&(f={min:0,max:0});const d=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?e[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return r.start(tu(e,r,0,n,this.visualElement,!1,ou(this.visualElement,e)))}stopAnimation(){Bt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Bt(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){Bt(n=>{const{drag:r}=this.getProps();if(!Ys(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(e[n]-We(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Xr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Bt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=fP({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Bt(s=>{if(!Ys(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(We(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;xP.set(this.visualElement,this);const e=this.visualElement.current,n=bn(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Xr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ie.read(r);const s=vn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Bt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=cu,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Ys(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function SP(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class TP extends Gn{constructor(e){super(e),this.removeGroupControls=ut,this.removeListeners=ut,this.controls=new wP(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const dy=t=>(e,n)=>{t&&Ie.postRender(()=>t(e,n))};class EP extends Gn{constructor(){super(...arguments),this.removePointerDownListener=ut}onPointerDown(e){this.session=new Ug(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:fy(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:dy(e),onStart:dy(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&Ie.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=bn(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function CP(){const t=b.useContext(ks);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,o=b.useId();return b.useEffect(()=>r(o),[]),!e&&n?[!1,()=>n&&n(o)]:[!0]}const Xs={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function hy(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const mi={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ue.test(t))t=parseFloat(t);else return t;const n=hy(t,e.target.x),r=hy(t,e.target.y);return`${n}% ${r}%`}},AP={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,o=qn.parse(t);if(o.length>5)return r;const i=qn.createTransformer(t),s=typeof o[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;o[0+s]/=a,o[1+s]/=l;const c=We(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}};class _P extends b.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=e;A1(PP),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Xs.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||e.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?s.promote():s.relegate()||Ie.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),bc.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=e;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function py(t){const[e,n]=CP(),r=b.useContext(ni);return T.jsx(_P,{...t,layoutGroup:r,switchLayoutGroup:b.useContext(fm),isPresent:e,safeToRemove:n})}const PP={borderRadius:{...mi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mi,borderTopRightRadius:mi,borderBottomLeftRadius:mi,borderBottomRightRadius:mi,boxShadow:AP},my=["TopLeft","TopRight","BottomLeft","BottomRight"],IP=my.length,gy=t=>typeof t=="string"?parseFloat(t):t,yy=t=>typeof t=="number"||ue.test(t);function OP(t,e,n,r,o,i){o?(t.opacity=We(0,n.opacity!==void 0?n.opacity:1,kP(r)),t.opacityExit=We(e.opacity!==void 0?e.opacity:1,0,DP(r))):i&&(t.opacity=We(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<IP;s++){const a=`border${my[s]}Radius`;let l=vy(e,a),c=vy(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||yy(l)===yy(c)?(t[a]=Math.max(We(gy(l),gy(c),r),0),(an.test(c)||an.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=We(e.rotate||0,n.rotate||0,r))}function vy(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const kP=by(0,.5,Eg),DP=by(.5,.95,ut);function by(t,e,n){return r=>r<t?0:r>e?1:n(ui(t,e,r))}function xy(t,e){t.min=e.min,t.max=e.max}function zt(t,e){xy(t.x,e.x),xy(t.y,e.y)}function wy(t,e,n,r,o){return t-=e,t=Zs(t,1/n,r),o!==void 0&&(t=Zs(t,1/o,r)),t}function MP(t,e=0,n=1,r=.5,o,i=t,s=t){if(an.test(e)&&(e=parseFloat(e),e=We(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=We(i.min,i.max,r);t===i&&(a-=e),t.min=wy(t.min,e,n,a,o),t.max=wy(t.max,e,n,a,o)}function Sy(t,e,[n,r,o],i,s){MP(t,e[n],e[r],e[o],e.scale,i,s)}const FP=["x","scaleX","originX"],LP=["y","scaleY","originY"];function Ty(t,e,n,r){Sy(t.x,e,FP,n?n.x:void 0,r?r.x:void 0),Sy(t.y,e,LP,n?n.y:void 0,r?r.y:void 0)}function Ey(t){return t.translate===0&&t.scale===1}function Cy(t){return Ey(t.x)&&Ey(t.y)}function NP(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Ay(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function _y(t){return $t(t.x)/$t(t.y)}class VP{constructor(){this.members=[]}add(e){js(this.members,e),e.scheduleRender()}remove(e){if(Bs(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(o=>e===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:o}=e.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Py(t,e,n){let r="";const o=t.x.translate/e.x,i=t.y.translate/e.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const RP=(t,e)=>t.depth-e.depth;class $P{constructor(){this.children=[],this.isDirty=!1}add(e){js(this.children,e),this.isDirty=!0}remove(e){Bs(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(RP),this.isDirty=!1,this.children.forEach(e)}}function jP(t,e){const n=Kn.now(),r=({timestamp:o})=>{const i=o-n;i>=e&&(ln(r),t(i-e))};return Ie.read(r,!0),()=>ln(r)}function BP(t){window.MotionDebug&&window.MotionDebug.record(t)}function zP(t){return t instanceof SVGElement&&t.tagName!=="svg"}function HP(t,e,n){const r=ft(t)?t:ro(t);return r.start(tu("",r,e,n)),r.animation}const hu=["","X","Y","Z"],WP={visibility:"hidden"},Iy=1e3;let UP=0;const gr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function pu(t,e,n,r){const{latestValues:o}=e;o[t]&&(n[t]=o[t],e.setStaticValue(t,0),r&&(r[t]=0))}function Oy(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return!1;const{visualElement:e}=t.options;return e?Bg(e)?!0:t.parent&&!t.parent.hasCheckedOptimisedAppear?Oy(t.parent):!1:!1}function ky({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=e==null?void 0:e()){this.id=UP++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,gr.totalNodes=gr.resolvedTargetDeltas=gr.recalculatedProjection=0,this.nodes.forEach(qP),this.nodes.forEach(QP),this.nodes.forEach(eI),this.nodes.forEach(ZP),BP(gr)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new $P)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new nu),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=zP(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let f;const d=()=>this.root.updateBlockedByResize=!1;t(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=jP(d,250),Xs.hasAnimatedSinceResize&&(Xs.hasAnimatedSinceResize=!1,this.nodes.forEach(My))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||iI,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),x=!this.targetLayout||!Ay(this.targetLayout,p)||h,y=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||d&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const S={...Nc(m,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else d||My(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ln(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(tI),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Oy(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Dy);return}this.isUpdating||this.nodes.forEach(XP),this.isUpdating=!1,this.nodes.forEach(JP),this.nodes.forEach(GP),this.nodes.forEach(KP),this.clearAllSnapshots();const a=Kn.now();dt.delta=Wn(0,1e3/60,a-dt.timestamp),dt.timestamp=a,dt.isProcessing=!0,Dc.update.process(dt),Dc.preRender.process(dt),Dc.render.process(dt),dt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,bc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(YP),this.sharedNodes.forEach(nI)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ie.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ie.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Xe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Cy(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||mr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),sI(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return Xe();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(Zn(a.x,l.offset.x),Zn(a.y,l.offset.y)),a}removeElementScroll(s){const a=Xe();zt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){zt(a,s);const{scroll:d}=this.root;d&&(Zn(a.x,-d.offset.x),Zn(a.y,-d.offset.y))}Zn(a.x,u.offset.x),Zn(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const l=Xe();zt(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&io(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),mr(u.latestValues)&&io(l,u.latestValues)}return mr(this.latestValues)&&io(l,this.latestValues),l}removeTransform(s){const a=Xe();zt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!mr(c.latestValues))continue;fu(c.latestValues)&&c.updateSnapshot();const u=Xe(),f=c.measurePageBox();zt(u,f),Ty(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return mr(this.latestValues)&&Ty(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==dt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:d}=this.options;if(!(!this.layout||!(f||d))){if(this.resolvedRelativeTargetAt=dt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Xe(),this.relativeTargetOrigin=Xe(),pi(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Xe(),this.targetWithTransforms=Xe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),aP(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):zt(this.target,this.layout.layoutBox),ay(this.target,this.targetDelta)):zt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Xe(),this.relativeTargetOrigin=Xe(),pi(this.relativeTargetOrigin,this.target,h.target),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}gr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||fu(this.parent.latestValues)||oy(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===dt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;zt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;gP(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Xe());const{target:p}=a;if(!p){this.projectionTransform&&(this.projectionDelta=oo(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=oo(),this.projectionDeltaWithTransform=oo());const m=this.projectionTransform;hi(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=Py(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==d||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),gr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=oo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=Xe(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,g=this.getStack(),v=!g||g.members.length<=1,x=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(oI));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const w=S/1e3;Fy(f.x,s.x,w),Fy(f.y,s.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(pi(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),rI(this.relativeTarget,this.relativeTargetOrigin,d,w),y&&NP(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Xe()),zt(y,this.relativeTarget)),m&&(this.animationValues=u,OP(u,c,this.latestValues,w,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ln(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ie.update(()=>{Xs.hasAnimatedSinceResize=!0,this.currentAnimation=HP(0,Iy,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Iy),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&$y(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Xe();const f=$t(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const d=$t(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}zt(a,l),io(a,u),hi(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new VP),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&pu("z",s,c,this.animationValues);for(let u=0;u<hu.length;u++)pu(`rotate${hu[u]}`,s,c,this.animationValues),pu(`skew${hu[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return WP;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=$s(s==null?void 0:s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=$s(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!mr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const d=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=Py(this.projectionDeltaWithTransform,this.treeScale,d),u&&(c.transform=u(d,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=d.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:c.opacity=f===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in Ns){if(d[m]===void 0)continue;const{correct:g,applyTo:v}=Ns[m],x=c.transform==="none"?d[m]:g(d[m],f);if(v){const y=v.length;for(let S=0;S<y;S++)c[v[S]]=x}else c[m]=x}return this.options.layoutId&&(c.pointerEvents=f===this?$s(s==null?void 0:s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Dy),this.root.sharedNodes.clear()}}}function GP(t){t.updateLayout()}function KP(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=t.layout,{animationType:i}=t.options,s=n.source!==t.layout.source;i==="size"?Bt(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=$t(d);d.min=r[f].min,d.max=d.min+h}):$y(i,n.layoutBox,r)&&Bt(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=$t(r[f]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+h)});const a=oo();hi(a,r,n.layoutBox);const l=oo();s?hi(l,t.applyTransform(o,!0),n.measuredBox):hi(l,r,n.layoutBox);const c=!Cy(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const p=Xe();pi(p,n.layoutBox,d.layoutBox);const m=Xe();pi(m,r,h.layoutBox),Ay(p,m)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function qP(t){gr.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function ZP(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function YP(t){t.clearSnapshot()}function Dy(t){t.clearMeasurements()}function XP(t){t.isLayoutDirty=!1}function JP(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function My(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function QP(t){t.resolveTargetDelta()}function eI(t){t.calcProjection()}function tI(t){t.resetSkewAndRotation()}function nI(t){t.removeLeadSnapshot()}function Fy(t,e,n){t.translate=We(e.translate,0,n),t.scale=We(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ly(t,e,n,r){t.min=We(e.min,n.min,r),t.max=We(e.max,n.max,r)}function rI(t,e,n,r){Ly(t.x,e.x,n.x,r),Ly(t.y,e.y,n.y,r)}function oI(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const iI={duration:.45,ease:[.4,0,.1,1]},Ny=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Vy=Ny("applewebkit/")&&!Ny("chrome/")?Math.round:ut;function Ry(t){t.min=Vy(t.min),t.max=Vy(t.max)}function sI(t){Ry(t.x),Ry(t.y)}function $y(t,e,n){return t==="position"||t==="preserve-aspect"&&!lu(_y(e),_y(n),.2)}const aI=ky({attachResizeListener:(t,e)=>vn(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),mu={current:void 0},jy=ky({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!mu.current){const t=new aI({});t.mount(window),t.setOptions({layoutScroll:!0}),mu.current=t}return mu.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),lI={pan:{Feature:EP},drag:{Feature:TP,ProjectionNode:jy,MeasureLayout:py}},gu={current:null},By={current:!1};function cI(){if(By.current=!0,!!vc)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>gu.current=t.matches;t.addListener(e),e()}else gu.current=!1}function uI(t,e,n){for(const r in e){const o=e[r],i=n[r];if(ft(o))t.addValue(r,o),process.env.NODE_ENV==="development"&&ru(o.version==="11.3.0",`Attempting to mix Framer Motion versions ${o.version} with 11.3.0 may not work as expected.`);else if(ft(i))t.addValue(r,ro(o,{owner:t}));else if(i!==o)if(t.hasValue(r)){const s=t.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=t.getStaticValue(r);t.addValue(r,ro(s!==void 0?s:o,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const zy=new WeakMap,fI=[...Qm,bt,qn],dI=t=>fI.find(Jm(t)),Hy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],hI=wc.length;class pI{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.applyWillChange=!1,this.resolveKeyframes=(d,h,p,m)=>new this.KeyframeResolver(d,h,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=$c,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Ie.render(this.render,!1,!0);const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Ls(n),this.isVariantNode=pm(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&ft(h)&&h.set(l[d],!1)}}mount(e){this.current=e,zy.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),By.current||cI(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gu.current,process.env.NODE_ENV!=="production"&&ru(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){zy.delete(this.current),this.projection&&this.projection.unmount(),ln(this.notifyUpdate),ln(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){const r=Hn.has(e),o=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&Ie.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{o(),i(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Jr){const n=Jr[e];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[e]&&o&&r(this.props)&&(this.features[e]=new o(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Xe()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Hy.length;r++){const o=Hy[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=e[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=uI(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<hI;r++){const o=wc[r],i=this.props[o];(ei(i)||i===!1)&&(n[o]=i)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=ro(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){var r;let o=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(r=this.getBaseTargetFromProps(this.props,e))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,e,this.options);return o!=null&&(typeof o=="string"&&(Km(o)||Gm(o))?o=parseFloat(o):!dI(o)&&qn.test(n)&&(o=cg(e,n)),this.setBaseTarget(e,ft(o)?o.get():o)),ft(o)?o.get():o}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const s=Oc(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[e])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!ft(i)?i:this.initialValues[e]!==void 0&&o===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new nu),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Wy extends pI{constructor(){super(...arguments),this.KeyframeResolver=ug}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}}function mI(t){return window.getComputedStyle(t)}class gI extends Wy{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0}readValueFromInstance(e,n){if(Hn.has(n)){const r=Wc(n);return r&&r.default||0}else{const r=mI(e),o=(bm(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return uy(e,n)}build(e,n,r){Cc(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return Ic(e,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ft(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,r,o){_m(e,n,r,o)}}class yI extends Wy{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Hn.has(n)){const r=Wc(n);return r&&r.default||0}return n=Pm.has(n)?n:Ms(n),e.getAttribute(n)}measureInstanceViewportBox(){return Xe()}scrapeMotionValuesFromProps(e,n,r){return Om(e,n,r)}build(e,n,r){_c(e,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,n,r,o){Im(e,n,r,o)}mount(e){this.isSVGTag=Pc(e.tagName),super.mount(e)}}const vI=(t,e)=>Sc(t)?new yI(e):new gI(e,{allowProjection:t!==b.Fragment}),bI={...rP,...gA,...lI,...{layout:{ProjectionNode:jy,MeasureLayout:py}}},so=E1((t,e)=>rA(t,e,bI,vI));function Uy(){const t=b.useRef(!1);return Ds(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Gy(){const t=Uy(),[e,n]=b.useState(0),r=b.useCallback(()=>{t.current&&n(e+1)},[e]);return[b.useCallback(()=>Ie.postRender(r),[r]),e]}class xI extends M.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function wI({children:t,isPresent:e}){const n=b.useId(),r=b.useRef(null),o=b.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=b.useContext(Is);return b.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:c}=o.current;if(e||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return i&&(u.nonce=i),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
110
|
+
*/var Dl,Mh;function pT(){if(Mh)return Dl;Mh=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Dl=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var f in a)e.call(a,f)&&(l[f]=a[f]);if(t){c=t(a);for(var d=0;d<c.length;d++)n.call(a,c[d])&&(l[c[d]]=a[c[d]])}}return l},Dl}var Ml,Fh;function Fl(){if(Fh)return Ml;Fh=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ml=t,Ml}var Ll,Lh;function Nh(){return Lh||(Lh=1,Ll=Function.call.bind(Object.prototype.hasOwnProperty)),Ll}var Nl,Vh;function mT(){if(Vh)return Nl;Vh=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=Fl(),n={},r=Nh();t=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var d=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=i[u](s,u,l,a,null,e)}catch(p){f=p}if(f&&!(f instanceof Error)&&t((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=c?c():"";t("Failed "+a+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Nl=o,Nl}var Vl,Rh;function gT(){if(Rh)return Vl;Rh=1;var t=Dh(),e=pT(),n=Fl(),r=Nh(),o=mT(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Vl=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(C){var j=C&&(c&&C[c]||C[u]);if(typeof j=="function")return j}var d="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:x(),arrayOf:y,element:S(),elementType:w(),instanceOf:E,node:F(),objectOf:I,oneOf:_,oneOfType:D,shape:P,exact:$};function p(C,j){return C===j?C!==0||1/C===1/j:C!==C&&j!==j}function m(C,j){this.message=C,this.data=j&&typeof j=="object"?j:{},this.stack=""}m.prototype=Error.prototype;function g(C){if(process.env.NODE_ENV!=="production")var j={},X=0;function re(H,k,R,W,K,J,ce){if(W=W||d,J=J||R,ce!==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 Me=W+":"+R;!j[Me]&&X<3&&(i("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),j[Me]=!0,X++)}}return k[R]==null?H?k[R]===null?new m("The "+K+" `"+J+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+K+" `"+J+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:C(k,R,W,K,J)}var ee=re.bind(null,!1);return ee.isRequired=re.bind(null,!0),ee}function v(C){function j(X,re,ee,H,k,R){var W=X[re],K=L(W);if(K!==C){var J=V(W);return new m("Invalid "+H+" `"+k+"` of type "+("`"+J+"` supplied to `"+ee+"`, expected ")+("`"+C+"`."),{expectedType:C})}return null}return g(j)}function x(){return g(s)}function y(C){function j(X,re,ee,H,k){if(typeof C!="function")return new m("Property `"+k+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var R=X[re];if(!Array.isArray(R)){var W=L(R);return new m("Invalid "+H+" `"+k+"` of type "+("`"+W+"` supplied to `"+ee+"`, expected an array."))}for(var K=0;K<R.length;K++){var J=C(R,K,ee,H,k+"["+K+"]",n);if(J instanceof Error)return J}return null}return g(j)}function S(){function C(j,X,re,ee,H){var k=j[X];if(!a(k)){var R=L(k);return new m("Invalid "+ee+" `"+H+"` of type "+("`"+R+"` supplied to `"+re+"`, expected a single ReactElement."))}return null}return g(C)}function w(){function C(j,X,re,ee,H){var k=j[X];if(!t.isValidElementType(k)){var R=L(k);return new m("Invalid "+ee+" `"+H+"` of type "+("`"+R+"` supplied to `"+re+"`, expected a single ReactElement type."))}return null}return g(C)}function E(C){function j(X,re,ee,H,k){if(!(X[re]instanceof C)){var R=C.name||d,W=Z(X[re]);return new m("Invalid "+H+" `"+k+"` of type "+("`"+W+"` supplied to `"+ee+"`, expected ")+("instance of `"+R+"`."))}return null}return g(j)}function _(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function j(X,re,ee,H,k){for(var R=X[re],W=0;W<C.length;W++)if(p(R,C[W]))return null;var K=JSON.stringify(C,function(ce,B){var Me=V(B);return Me==="symbol"?String(B):B});return new m("Invalid "+H+" `"+k+"` of value `"+String(R)+"` "+("supplied to `"+ee+"`, expected one of "+K+"."))}return g(j)}function I(C){function j(X,re,ee,H,k){if(typeof C!="function")return new m("Property `"+k+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var R=X[re],W=L(R);if(W!=="object")return new m("Invalid "+H+" `"+k+"` of type "+("`"+W+"` supplied to `"+ee+"`, expected an object."));for(var K in R)if(r(R,K)){var J=C(R,K,ee,H,k+"."+K,n);if(J instanceof Error)return J}return null}return g(j)}function D(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var j=0;j<C.length;j++){var X=C[j];if(typeof X!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(X)+" at index "+j+"."),s}function re(ee,H,k,R,W){for(var K=[],J=0;J<C.length;J++){var ce=C[J],B=ce(ee,H,k,R,W,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&K.push(B.data.expectedType)}var Me=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new m("Invalid "+R+" `"+W+"` supplied to "+("`"+k+"`"+Me+"."))}return g(re)}function F(){function C(j,X,re,ee,H){return O(j[X])?null:new m("Invalid "+ee+" `"+H+"` supplied to "+("`"+re+"`, expected a ReactNode."))}return g(C)}function N(C,j,X,re,ee){return new m((C||"React class")+": "+j+" type `"+X+"."+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function P(C){function j(X,re,ee,H,k){var R=X[re],W=L(R);if(W!=="object")return new m("Invalid "+H+" `"+k+"` of type `"+W+"` "+("supplied to `"+ee+"`, expected `object`."));for(var K in C){var J=C[K];if(typeof J!="function")return N(ee,H,k,K,V(J));var ce=J(R,K,ee,H,k+"."+K,n);if(ce)return ce}return null}return g(j)}function $(C){function j(X,re,ee,H,k){var R=X[re],W=L(R);if(W!=="object")return new m("Invalid "+H+" `"+k+"` of type `"+W+"` "+("supplied to `"+ee+"`, expected `object`."));var K=e({},X[re],C);for(var J in K){var ce=C[J];if(r(C,J)&&typeof ce!="function")return N(ee,H,k,J,V(ce));if(!ce)return new m("Invalid "+H+" `"+k+"` key `"+J+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(X[re],null," ")+`
|
|
111
|
+
Valid keys: `+JSON.stringify(Object.keys(C),null," "));var B=ce(R,J,ee,H,k+"."+J,n);if(B)return B}return null}return g(j)}function O(C){switch(typeof C){case"number":case"string":case"undefined":return!0;case"boolean":return!C;case"object":if(Array.isArray(C))return C.every(O);if(C===null||a(C))return!0;var j=f(C);if(j){var X=j.call(C),re;if(j!==C.entries){for(;!(re=X.next()).done;)if(!O(re.value))return!1}else for(;!(re=X.next()).done;){var ee=re.value;if(ee&&!O(ee[1]))return!1}}else return!1;return!0;default:return!1}}function A(C,j){return C==="symbol"?!0:j?j["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&j instanceof Symbol:!1}function L(C){var j=typeof C;return Array.isArray(C)?"array":C instanceof RegExp?"object":A(j,C)?"symbol":j}function V(C){if(typeof C>"u"||C===null)return""+C;var j=L(C);if(j==="object"){if(C instanceof Date)return"date";if(C instanceof RegExp)return"regexp"}return j}function z(C){var j=V(C);switch(j){case"array":case"object":return"an "+j;case"boolean":case"date":case"regexp":return"a "+j;default:return j}}function Z(C){return!C.constructor||!C.constructor.name?d:C.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Vl}var Rl,$h;function yT(){if($h)return Rl;$h=1;var t=Fl();function e(){}function n(){}return n.resetWarningCache=e,Rl=function(){function r(s,a,l,c,u,f){if(f!==t){var d=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 d.name="Invariant Violation",d}}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:e};return i.PropTypes=i,i},Rl}if(process.env.NODE_ENV!=="production"){var vT=Dh(),bT=!0;kl.exports=gT()(vT.isElement,bT)}else kl.exports=yT()();var xT=kl.exports;const Ve=Q0(xT);function Ur(t,e,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(f){s(f)}}function l(u){try{c(r.throw(u))}catch(f){s(f)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}function Gr(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function jh(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function Bh(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var wT=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function $o(t,e){var n=ST(t);if(typeof n.path!="string"){var r=t.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof e=="string"?e:typeof r=="string"&&r.length>0?r:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}function ST(t){var e=t.name,n=e&&e.lastIndexOf(".")!==-1;if(n&&!t.type){var r=e.split(".").pop().toLowerCase(),o=wT.get(r);o&&Object.defineProperty(t,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return t}var TT=[".DS_Store","Thumbs.db"];function ET(t){return Ur(this,void 0,void 0,function(){return Gr(this,function(e){return ds(t)&&CT(t.dataTransfer)?[2,IT(t.dataTransfer,t.type)]:AT(t)?[2,_T(t)]:Array.isArray(t)&&t.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,PT(t)]:[2,[]]})})}function CT(t){return ds(t)}function AT(t){return ds(t)&&ds(t.target)}function ds(t){return typeof t=="object"&&t!==null}function _T(t){return $l(t.target.files).map(function(e){return $o(e)})}function PT(t){return Ur(this,void 0,void 0,function(){var e;return Gr(this,function(n){switch(n.label){case 0:return[4,Promise.all(t.map(function(r){return r.getFile()}))];case 1:return e=n.sent(),[2,e.map(function(r){return $o(r)})]}})})}function IT(t,e){return Ur(this,void 0,void 0,function(){var n,r;return Gr(this,function(o){switch(o.label){case 0:return t.items?(n=$l(t.items).filter(function(i){return i.kind==="file"}),e!=="drop"?[2,n]:[4,Promise.all(n.map(OT))]):[3,2];case 1:return r=o.sent(),[2,zh(Hh(r))];case 2:return[2,zh($l(t.files).map(function(i){return $o(i)}))]}})})}function zh(t){return t.filter(function(e){return TT.indexOf(e.name)===-1})}function $l(t){if(t===null)return[];for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r)}return e}function OT(t){if(typeof t.webkitGetAsEntry!="function")return Wh(t);var e=t.webkitGetAsEntry();return e&&e.isDirectory?Uh(e):Wh(t)}function Hh(t){return t.reduce(function(e,n){return Bh(Bh([],jh(e),!1),jh(Array.isArray(n)?Hh(n):[n]),!1)},[])}function Wh(t){var e=t.getAsFile();if(!e)return Promise.reject("".concat(t," is not a File"));var n=$o(e);return Promise.resolve(n)}function kT(t){return Ur(this,void 0,void 0,function(){return Gr(this,function(e){return[2,t.isDirectory?Uh(t):DT(t)]})})}function Uh(t){var e=t.createReader();return new Promise(function(n,r){var o=[];function i(){var s=this;e.readEntries(function(a){return Ur(s,void 0,void 0,function(){var l,c,u;return Gr(this,function(f){switch(f.label){case 0:if(a.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=f.sent(),n(l),[3,4];case 3:return c=f.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(kT)),o.push(u),i(),f.label=6;case 6:return[2]}})})},function(a){r(a)})}i()})}function DT(t){return Ur(this,void 0,void 0,function(){return Gr(this,function(e){return[2,new Promise(function(n,r){t.file(function(o){var i=$o(o,t.fullPath);n(i)},function(o){r(o)})})]})})}var MT=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",o=(t.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0};function Gh(t){return NT(t)||LT(t)||Yh(t)||FT()}function FT(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
112
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LT(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function NT(t){if(Array.isArray(t))return jl(t)}function Kh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function qh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Kh(Object(n),!0).forEach(function(r){Zh(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kh(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Zh(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function jo(t,e){return $T(t)||RT(t,e)||Yh(t,e)||VT()}function VT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
113
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yh(t,e){if(t){if(typeof t=="string")return jl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jl(t,e)}}function jl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function RT(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(t);!(o=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function $T(t){if(Array.isArray(t))return t}var jT="file-invalid-type",BT="file-too-large",zT="file-too-small",HT="too-many-files",WT=function(e){e=Array.isArray(e)&&e.length===1?e[0]:e;var n=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:jT,message:"File type must be ".concat(n)}},Xh=function(e){return{code:BT,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},Jh=function(e){return{code:zT,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},UT={code:HT,message:"Too many files"};function Qh(t,e){var n=t.type==="application/x-moz-file"||MT(t,e);return[n,n?null:WT(e)]}function ep(t,e,n){if(ar(t.size))if(ar(e)&&ar(n)){if(t.size>n)return[!1,Xh(n)];if(t.size<e)return[!1,Jh(e)]}else{if(ar(e)&&t.size<e)return[!1,Jh(e)];if(ar(n)&&t.size>n)return[!1,Xh(n)]}return[!0,null]}function ar(t){return t!=null}function GT(t){var e=t.files,n=t.accept,r=t.minSize,o=t.maxSize,i=t.multiple,s=t.maxFiles,a=t.validator;return!i&&e.length>1||i&&s>=1&&e.length>s?!1:e.every(function(l){var c=Qh(l,n),u=jo(c,1),f=u[0],d=ep(l,r,o),h=jo(d,1),p=h[0],m=a?a(l):null;return f&&p&&!m})}function hs(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function ps(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!t.target&&!!t.target.files}function tp(t){t.preventDefault()}function KT(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function qT(t){return t.indexOf("Edge/")!==-1}function ZT(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return KT(t)||qT(t)}function en(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return e.some(function(a){return!hs(r)&&a&&a.apply(void 0,[r].concat(i)),hs(r)})}}function YT(){return"showOpenFilePicker"in window}function XT(t){if(ar(t)){var e=Object.entries(t).filter(function(n){var r=jo(n,2),o=r[0],i=r[1],s=!0;return np(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(rp))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=jo(r,2),i=o[0],s=o[1];return qh(qh({},n),{},Zh({},i,s))},{});return[{description:"Files",accept:e}]}return t}function JT(t){if(ar(t))return Object.entries(t).reduce(function(e,n){var r=jo(n,2),o=r[0],i=r[1];return[].concat(Gh(e),[o],Gh(i))},[]).filter(function(e){return np(e)||rp(e)}).join(",")}function QT(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function eE(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function np(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||/\w+\/[-+.\w]+/g.test(t)}function rp(t){return/^.*\.[\w]+$/.test(t)}var tE=["children"],nE=["open"],rE=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],oE=["refKey","onChange","onClick"];function iE(t){return lE(t)||aE(t)||op(t)||sE()}function sE(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
114
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aE(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function lE(t){if(Array.isArray(t))return zl(t)}function Bl(t,e){return fE(t)||uE(t,e)||op(t,e)||cE()}function cE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
115
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function op(t,e){if(t){if(typeof t=="string")return zl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zl(t,e)}}function zl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function uE(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(t);!(o=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function fE(t){if(Array.isArray(t))return t}function ip(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ge(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ip(Object(n),!0).forEach(function(r){Hl(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ip(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Hl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ms(t,e){if(t==null)return{};var n=dE(t,e),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function dE(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}var Wl=b.forwardRef(function(t,e){var n=t.children,r=ms(t,tE),o=ap(r),i=o.open,s=ms(o,nE);return b.useImperativeHandle(e,function(){return{open:i}},[i]),b.createElement(b.Fragment,null,n(Ge(Ge({},s),{},{open:i})))});Wl.displayName="Dropzone";var sp={disabled:!1,getFilesFromEvent:ET,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Wl.defaultProps=sp,Wl.propTypes={children:Ve.func,accept:Ve.objectOf(Ve.arrayOf(Ve.string)),multiple:Ve.bool,preventDropOnDocument:Ve.bool,noClick:Ve.bool,noKeyboard:Ve.bool,noDrag:Ve.bool,noDragEventsBubbling:Ve.bool,minSize:Ve.number,maxSize:Ve.number,maxFiles:Ve.number,disabled:Ve.bool,getFilesFromEvent:Ve.func,onFileDialogCancel:Ve.func,onFileDialogOpen:Ve.func,useFsAccessApi:Ve.bool,autoFocus:Ve.bool,onDragEnter:Ve.func,onDragLeave:Ve.func,onDragOver:Ve.func,onDrop:Ve.func,onDropAccepted:Ve.func,onDropRejected:Ve.func,onError:Ve.func,validator:Ve.func};var Ul={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ap(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=Ge(Ge({},sp),t),n=e.accept,r=e.disabled,o=e.getFilesFromEvent,i=e.maxSize,s=e.minSize,a=e.multiple,l=e.maxFiles,c=e.onDragEnter,u=e.onDragLeave,f=e.onDragOver,d=e.onDrop,h=e.onDropAccepted,p=e.onDropRejected,m=e.onFileDialogCancel,g=e.onFileDialogOpen,v=e.useFsAccessApi,x=e.autoFocus,y=e.preventDropOnDocument,S=e.noClick,w=e.noKeyboard,E=e.noDrag,_=e.noDragEventsBubbling,I=e.onError,D=e.validator,F=b.useMemo(function(){return JT(n)},[n]),N=b.useMemo(function(){return XT(n)},[n]),P=b.useMemo(function(){return typeof g=="function"?g:lp},[g]),$=b.useMemo(function(){return typeof m=="function"?m:lp},[m]),O=b.useRef(null),A=b.useRef(null),L=b.useReducer(hE,Ul),V=Bl(L,2),z=V[0],Z=V[1],C=z.isFocused,j=z.isFileDialogActive,X=b.useRef(typeof window<"u"&&window.isSecureContext&&v&&YT()),re=function(){!X.current&&j&&setTimeout(function(){if(A.current){var oe=A.current.files;oe.length||(Z({type:"closeDialog"}),$())}},300)};b.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[A,j,$,X]);var ee=b.useRef([]),H=function(oe){O.current&&O.current.contains(oe.target)||(oe.preventDefault(),ee.current=[])};b.useEffect(function(){return y&&(document.addEventListener("dragover",tp,!1),document.addEventListener("drop",H,!1)),function(){y&&(document.removeEventListener("dragover",tp),document.removeEventListener("drop",H))}},[O,y]),b.useEffect(function(){return!r&&x&&O.current&&O.current.focus(),function(){}},[O,x,r]);var k=b.useCallback(function(q){I?I(q):console.error(q)},[I]),R=b.useCallback(function(q){q.preventDefault(),q.persist(),me(q),ee.current=[].concat(iE(ee.current),[q.target]),ps(q)&&Promise.resolve(o(q)).then(function(oe){if(!(hs(q)&&!_)){var Ne=oe.length,qe=Ne>0&>({files:oe,accept:F,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:D}),ht=Ne>0&&!qe;Z({isDragAccept:qe,isDragReject:ht,isDragActive:!0,type:"setDraggedFiles"}),c&&c(q)}}).catch(function(oe){return k(oe)})},[o,c,k,_,F,s,i,a,l,D]),W=b.useCallback(function(q){q.preventDefault(),q.persist(),me(q);var oe=ps(q);if(oe&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return oe&&f&&f(q),!1},[f,_]),K=b.useCallback(function(q){q.preventDefault(),q.persist(),me(q);var oe=ee.current.filter(function(qe){return O.current&&O.current.contains(qe)}),Ne=oe.indexOf(q.target);Ne!==-1&&oe.splice(Ne,1),ee.current=oe,!(oe.length>0)&&(Z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ps(q)&&u&&u(q))},[O,u,_]),J=b.useCallback(function(q,oe){var Ne=[],qe=[];q.forEach(function(ht){var dn=Qh(ht,F),ot=Bl(dn,2),hn=ot[0],Ai=ot[1],vo=ep(ht,s,i),ba=Bl(vo,2),Qu=ba[0],ef=ba[1],tf=D?D(ht):null;if(hn&&Qu&&!tf)Ne.push(ht);else{var nf=[Ai,ef];tf&&(nf=nf.concat(tf)),qe.push({file:ht,errors:nf.filter(function(yD){return yD})})}}),(!a&&Ne.length>1||a&&l>=1&&Ne.length>l)&&(Ne.forEach(function(ht){qe.push({file:ht,errors:[UT]})}),Ne.splice(0)),Z({acceptedFiles:Ne,fileRejections:qe,type:"setFiles"}),d&&d(Ne,qe,oe),qe.length>0&&p&&p(qe,oe),Ne.length>0&&h&&h(Ne,oe)},[Z,a,F,s,i,l,d,h,p,D]),ce=b.useCallback(function(q){q.preventDefault(),q.persist(),me(q),ee.current=[],ps(q)&&Promise.resolve(o(q)).then(function(oe){hs(q)&&!_||J(oe,q)}).catch(function(oe){return k(oe)}),Z({type:"reset"})},[o,J,k,_]),B=b.useCallback(function(){if(X.current){Z({type:"openDialog"}),P();var q={multiple:a,types:N};window.showOpenFilePicker(q).then(function(oe){return o(oe)}).then(function(oe){J(oe,null),Z({type:"closeDialog"})}).catch(function(oe){QT(oe)?($(oe),Z({type:"closeDialog"})):eE(oe)?(X.current=!1,A.current?(A.current.value=null,A.current.click()):k(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."))):k(oe)});return}A.current&&(Z({type:"openDialog"}),P(),A.current.value=null,A.current.click())},[Z,P,$,v,J,k,N,a]),Me=b.useCallback(function(q){!O.current||!O.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),B())},[O,B]),Ue=b.useCallback(function(){Z({type:"focus"})},[]),Qe=b.useCallback(function(){Z({type:"blur"})},[]),ae=b.useCallback(function(){S||(ZT()?setTimeout(B,0):B())},[S,B]),_e=function(oe){return r?null:oe},Te=function(oe){return w?null:_e(oe)},Ae=function(oe){return E?null:_e(oe)},me=function(oe){_&&oe.stopPropagation()},Oe=b.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=q.refKey,Ne=oe===void 0?"ref":oe,qe=q.role,ht=q.onKeyDown,dn=q.onFocus,ot=q.onBlur,hn=q.onClick,Ai=q.onDragEnter,vo=q.onDragOver,ba=q.onDragLeave,Qu=q.onDrop,ef=ms(q,rE);return Ge(Ge(Hl({onKeyDown:Te(en(ht,Me)),onFocus:Te(en(dn,Ue)),onBlur:Te(en(ot,Qe)),onClick:_e(en(hn,ae)),onDragEnter:Ae(en(Ai,R)),onDragOver:Ae(en(vo,W)),onDragLeave:Ae(en(ba,K)),onDrop:Ae(en(Qu,ce)),role:typeof qe=="string"&&qe!==""?qe:"presentation"},Ne,O),!r&&!w?{tabIndex:0}:{}),ef)}},[O,Me,Ue,Qe,ae,R,W,K,ce,w,E,r]),rt=b.useCallback(function(q){q.stopPropagation()},[]),Ct=b.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=q.refKey,Ne=oe===void 0?"ref":oe,qe=q.onChange,ht=q.onClick,dn=ms(q,oE),ot=Hl({accept:F,multiple:a,type:"file",style:{display:"none"},onChange:_e(en(qe,ce)),onClick:_e(en(ht,rt)),tabIndex:-1},Ne,A);return Ge(Ge({},ot),dn)}},[A,n,a,ce,r]);return Ge(Ge({},z),{},{isFocused:C&&!r,getRootProps:Oe,getInputProps:Ct,rootRef:O,inputRef:A,open:_e(B)})}function hE(t,e){switch(e.type){case"focus":return Ge(Ge({},t),{},{isFocused:!0});case"blur":return Ge(Ge({},t),{},{isFocused:!1});case"openDialog":return Ge(Ge({},Ul),{},{isFileDialogActive:!0});case"closeDialog":return Ge(Ge({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ge(Ge({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return Ge(Ge({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return Ge({},Ul);default:return t}}function lp(){}function cp(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=cp(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function pE(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=cp(t))&&(r&&(r+=" "),r+=e);return r}const up=t=>typeof t=="boolean"?"".concat(t):t===0?"0":t,fp=pE,Gl=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return fp(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=e,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=i==null?void 0:i[c];if(u===null)return null;const d=up(u)||up(f);return o[c][d]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,d]=u;return d===void 0||(c[f]=d),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:d,...h}=u;return Object.entries(h).every(p=>{let[m,g]=p;return Array.isArray(g)?g.includes({...i,...a}[m]):{...i,...a}[m]===g})?[...c,f,d]:c},[]);return fp(t,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Bo=b.forwardRef(function({as:e,...n},r){const o=e||"span";return T.jsx(o,{...n,ref:r})}),mE=Gl("inline-flex duration-700 data-[loading=true]:opacity-40 data-[loading=true]:animate-pulse gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-30 disabled:text-opacity-60 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-10 p-2 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-md",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",main:"bg-primary hover:bg-primary-hover text-primary-foreground",warn:"bg-warn hover:bg-warn-hover text-warn-foreground",danger:"bg-danger hover:bg-danger-hover text-danger-foreground",secondary:"bg-secondary hover:bg-secondary-hover text-secondary-foreground",success:"bg-success hover:bg-success-hover text-success-foreground",info:"bg-info hover:bg-info-hover text-info-foreground"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),zo=b.forwardRef(function({className:e,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return T.jsxs(Bo,{...l,ref:c,type:i,"data-theme":o,"data-loading":r,disabled:u,as:l.as??"button",onClick:u?void 0:l.onClick,className:_t(mE({size:s,rounded:a,theme:o}),e),children:[l.children,n]})}),gE=t=>T.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:t.buttons.map(e=>T.jsx("li",{className:"flex flex-1",children:T.jsx("button",{...e,type:e.type||"button","data-active":t.active===e.name?"true":"false",className:_t("flex flex-1 items-center gap-1.5 rounded-sm border-r-2 px-4 py-2 last:border-r-0","cursor-pointer justify-center whitespace-nowrap align-middle font-medium","focus-visible:ring-ring shadow-sm focus-visible:outline-none focus-visible:ring-2 disabled:text-opacity-80","data-[active=true]:bg-main-bg text-body data-[active=true]:text-main transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50")})},`button-group-${e.name}`))}),yE={isImage:t=>t.type.includes("image")},vE=t=>{const[e,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(yE.isImage(t.file)){const r=URL.createObjectURL(t.file);return n({url:r,type:"img",size:Ph(t.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:t.file.type,size:Ph(t.file.size)})},[t.file]),e.type==="img"?T.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[T.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[T.jsx("img",{src:e.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${t.file.name}`}),T.jsxs("div",{className:"flex flex-col",children:[T.jsx("span",{children:t.file.name}),T.jsx("span",{children:e.size})]})]}),T.jsx(zo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=t.onDeleteFile)==null||o.call(t,t.file)},children:T.jsx(Lr,{})})]}):T.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[T.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[T.jsx(q0,{size:48}),T.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[T.jsx("span",{children:t.file.name}),T.jsx("span",{children:e.size})]})]}),T.jsx(zo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=t.onDeleteFile)==null||o.call(t,t.file)},children:T.jsx(Lr,{className:"text-danger"})})]})},bE=t=>T.jsx("ul",{className:"w-full space-y-jade-200",children:t.files.map(e=>T.jsx(vE,{onDeleteFile:t.onDeleteFile,file:e},e.name))}),xE=t=>t.isDragActive?T.jsx("p",{children:"Solte os arquivos selecionados"}):t.files.length>0?T.jsx(bE,{onDeleteFile:t.onDeleteFile,files:t.files}):T.jsx(b.Fragment,{children:t.idle}),wE=T.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[T.jsx(X0,{size:64}),T.jsxs("p",{children:["You can drag your files or"," ",T.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),SE=({idle:t=wE,onDeleteFile:e,onDrop:n,...r})=>{var u;const[o,i]=b.useState([]),s=f=>{n==null||n(f),i(f)},{getRootProps:a,getInputProps:l,isDragActive:c}=ap({onDrop:s});return T.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex text-foreground flex-col items-center justify-center border-2 rounded-lg p-6 border-card-border data-[active=true]:bg-card-background data-[active=true]:border-solid data-[active=false]:border-dashed",children:[T.jsx("input",{...l(r),name:r.name,id:r.name}),T.jsx(xE,{onDeleteFile:e,isDragActive:c,idle:t,files:r.files??o})]})},TE=["INPUT","SELECT"],dp=t=>{if(!t)return;Array.from(t.elements).forEach(n=>{TE.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},EE=t=>{const e=n=>{var r;n.persist(),n.preventDefault(),(r=t.onSubmit)==null||r.call(t,n)};return T.jsx("form",{...t,onSubmit:e})},CE=({children:t,...e})=>{const n=b.useId(),[r,o]=b.useState(!1),i=e.checked??r,s=a=>{var u;const c=a.target.dataset.checked!=="true";o(c),(u=e==null?void 0:e.onCheck)==null||u.call(e,c)};return T.jsxs("div",{className:"flex items-center",children:[T.jsx("input",{...e,hidden:!0,type:"checkbox",checked:i,onChange:a=>o(a.target.checked)}),T.jsx("button",{type:"button",role:"switch",onClick:s,"aria-checked":i,"data-checked":i,"aria-labelledby":`${n}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary transition-colors ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:T.jsx("span",{"aria-hidden":"true","data-checked":i,className:"data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch pointer-events-none inline-block size-5 aspect-square data-[checked=false]translate-x-0 data-[checked=true]:translate-x-5 transform rounded-full shadow ring-0 transition ease-in-out"})}),T.jsx("span",{className:"ml-3 text-sm",id:`${n}-label`,children:T.jsx("span",{className:"font-medium text-foreground",children:t})})]})},gs=0,$n=1,Kr=2,hp=4;function Ho(t,e){return n=>t(e(n))}function AE(t,e){return e(t)}function pp(t,e){return n=>t(e,n)}function mp(t,e){return()=>t(e)}function ys(t,e){return e(t),t}function ze(...t){return t}function _E(t){t()}function gp(t){return()=>t}function PE(...t){return()=>{t.map(_E)}}function Kl(t){return t!==void 0}function lr(){}function Fe(t,e){return t($n,e)}function ve(t,e){t(gs,e)}function ql(t){t(Kr)}function yt(t){return t(hp)}function le(t,e){return Fe(t,pp(e,gs))}function tn(t,e){const n=t($n,r=>{n(),e(r)});return n}function Ee(){const t=[];return(e,n)=>{switch(e){case Kr:t.splice(0,t.length);return;case $n:return t.push(n),()=>{const r=t.indexOf(n);r>-1&&t.splice(r,1)};case gs:t.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${e}`)}}}function Y(t){let e=t;const n=Ee();return(r,o)=>{switch(r){case $n:o(e);break;case gs:e=o;break;case hp:return e}return n(r,o)}}function IE(t){let e,n;const r=()=>e&&e();return function(o,i){switch(o){case $n:return i?n===i?void 0:(r(),n=i,e=Fe(t,i),e):(r(),lr);case Kr:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Nt(t){return ys(Ee(),e=>le(t,e))}function vt(t,e){return ys(Y(e),n=>le(t,n))}function OE(...t){return e=>t.reduceRight(AE,e)}function U(t,...e){const n=OE(...e);return(r,o)=>{switch(r){case $n:return Fe(t,n(o));case Kr:ql(t);return}}}function yp(t,e){return t===e}function He(t=yp){let e;return n=>r=>{t(e,r)||(e=r,n(r))}}function de(t){return e=>n=>{t(n)&&e(n)}}function ne(t){return e=>Ho(e,t)}function nn(t){return e=>()=>e(t)}function rn(t,e){return n=>r=>n(e=t(e,r))}function qr(t){return e=>n=>{t>0?t--:e(n)}}function jn(t){let e=null,n;return r=>o=>{e=o,!n&&(n=setTimeout(()=>{n=void 0,r(e)},t))}}function vp(t){let e,n;return r=>o=>{e=o,n&&clearTimeout(n),n=setTimeout(()=>{r(e)},t)}}function be(...t){const e=new Array(t.length);let n=0,r=null;const o=Math.pow(2,t.length)-1;return t.forEach((i,s)=>{const a=Math.pow(2,s);Fe(i,l=>{const c=n;n=n|a,e[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>i([s].concat(e));n===o?a():r=a}}function bp(...t){return function(e,n){switch(e){case $n:return PE(...t.map(r=>Fe(r,n)));case Kr:return;default:throw new Error(`unrecognized action ${e}`)}}}function pe(t,e=yp){return U(t,He(e))}function st(...t){const e=Ee(),n=new Array(t.length);let r=0;const o=Math.pow(2,t.length)-1;return t.forEach((i,s)=>{const a=Math.pow(2,s);Fe(i,l=>{n[s]=l,r=r|a,r===o&&ve(e,n)})}),function(i,s){switch(i){case $n:return r===o&&s(n),Fe(e,s);case Kr:return ql(e);default:throw new Error(`unrecognized action ${i}`)}}}function Pe(t,e=[],{singleton:n}={singleton:!0}){return{id:kE(),constructor:t,dependencies:e,singleton:n}}const kE=()=>Symbol();function DE(t){const e=new Map,n=({id:r,constructor:o,dependencies:i,singleton:s})=>{if(s&&e.has(r))return e.get(r);const a=o(i.map(l=>n(l)));return s&&e.set(r,a),a};return n(t)}function ME(t,e){const n={},r={};let o=0;const i=t.length;for(;o<i;)r[t[o]]=1,o+=1;for(const s in e)r.hasOwnProperty(s)||(n[s]=e[s]);return n}const vs=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Zl(t,e,n){const r=Object.keys(e.required||{}),o=Object.keys(e.optional||{}),i=Object.keys(e.methods||{}),s=Object.keys(e.events||{}),a=b.createContext({});function l(v,x){v.propsReady&&ve(v.propsReady,!1);for(const y of r){const S=v[e.required[y]];ve(S,x[y])}for(const y of o)if(y in x){const S=v[e.optional[y]];ve(S,x[y])}v.propsReady&&ve(v.propsReady,!0)}function c(v){return i.reduce((x,y)=>(x[y]=S=>{const w=v[e.methods[y]];ve(w,S)},x),{})}function u(v){return s.reduce((x,y)=>(x[y]=IE(v[e.events[y]]),x),{})}const f=b.forwardRef((v,x)=>{const{children:y,...S}=v,[w]=b.useState(()=>ys(DE(t),_=>l(_,S))),[E]=b.useState(mp(u,w));return vs(()=>{for(const _ of s)_ in S&&Fe(E[_],S[_]);return()=>{Object.values(E).map(ql)}},[S,E,w]),vs(()=>{l(w,S)}),b.useImperativeHandle(x,gp(c(w))),b.createElement(a.Provider,{value:w},n?b.createElement(n,ME([...r,...o,...s],S),y):y)}),d=v=>b.useCallback(pp(ve,b.useContext(a)[v]),[v]),h=v=>{const y=b.useContext(a)[v],S=b.useCallback(w=>Fe(y,w),[y]);return b.useSyncExternalStore(S,()=>yt(y),()=>yt(y))},p=v=>{const y=b.useContext(a)[v],[S,w]=b.useState(mp(yt,y));return vs(()=>Fe(y,E=>{E!==S&&w(gp(E))}),[y,S]),S},m=b.version.startsWith("18")?h:p;return{Component:f,usePublisher:d,useEmitterValue:m,useEmitter:(v,x)=>{const S=b.useContext(a)[v];vs(()=>Fe(S,x),[x,S])}}}const FE=typeof document<"u"?b.useLayoutEffect:b.useEffect;var Vt=(t=>(t[t.DEBUG=0]="DEBUG",t[t.INFO=1]="INFO",t[t.WARN=2]="WARN",t[t.ERROR=3]="ERROR",t))(Vt||{});const LE={0:"debug",1:"log",2:"warn",3:"error"},NE=()=>typeof globalThis>"u"?window:globalThis,Bn=Pe(()=>{const t=Y(3);return{log:Y((n,r,o=1)=>{var i;const s=(i=NE().VIRTUOSO_LOG_LEVEL)!=null?i:yt(t);o>=s&&console[LE[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:t}},[],{singleton:!0});function Yl(t,e=!0){const n=b.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=b.useMemo(()=>new ResizeObserver(i=>{requestAnimationFrame(()=>{const s=i[0].target;s.offsetParent!==null&&t(s)})}),[t]);r=i=>{i&&e?(o.observe(i),n.current=i):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function on(t,e=!0){return Yl(t,e).callbackRef}function xp(t,e,n,r,o,i,s){const a=b.useCallback(l=>{const c=VE(l.children,e,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const f=u.lastElementChild.dataset.viewportType==="window",d=s?s.scrollTop:f?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=s?s.scrollHeight:f?document.documentElement.scrollHeight:u.scrollHeight,p=s?s.offsetHeight:f?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(d,0),scrollHeight:h,viewportHeight:p}),i==null||i(RE("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&t(c)},[t,e,o,i,s,r]);return Yl(a,n)}function VE(t,e,n,r){const o=t.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=t.item(s);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=e(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Vt.ERROR),u===c)continue;const f=i[i.length-1];i.length===0||f.size!==u||f.endIndex!==l-1?i.push({startIndex:l,endIndex:l,size:u}):i[i.length-1].endIndex++}return i}function RE(t,e,n){return e!=="normal"&&!(e!=null&&e.endsWith("px"))&&n(`${t} was not resolved to pixel value correctly`,e,Vt.WARN),e==="normal"?0:parseInt(e??"0",10)}function Ut(t,e){return Math.round(t.getBoundingClientRect()[e])}function wp(t,e){return Math.abs(t-e)<1.01}function Sp(t,e,n,r=lr,o){const i=b.useRef(null),s=b.useRef(null),a=b.useRef(null),l=b.useCallback(f=>{const d=f.target,h=d===window||d===document,p=h?window.pageYOffset||document.documentElement.scrollTop:d.scrollTop,m=h?document.documentElement.scrollHeight:d.scrollHeight,g=h?window.innerHeight:d.offsetHeight,v=()=>{t({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:g})};f.suppressFlushSync?v():of.flushSync(v),s.current!==null&&(p===s.current||p<=0||p===m-g)&&(s.current=null,e(!0),a.current&&(clearTimeout(a.current),a.current=null))},[t,e]);b.useEffect(()=>{const f=o||i.current;return r(o||i.current),l({target:f,suppressFlushSync:!0}),f.addEventListener("scroll",l,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",l)}},[i,l,n,r,o]);function c(f){const d=i.current;if(!d||"offsetHeight"in d&&d.offsetHeight===0)return;const h=f.behavior==="smooth";let p,m,g;d===window?(m=Math.max(Ut(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,g=document.documentElement.scrollTop):(m=d.scrollHeight,p=Ut(d,"height"),g=d.scrollTop);const v=m-p;if(f.top=Math.ceil(Math.max(Math.min(v,f.top),0)),wp(p,m)||f.top===g){t({scrollTop:g,scrollHeight:m,viewportHeight:p}),h&&e(!0);return}h?(s.current=f.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,e(!0)},1e3)):s.current=null,d.scrollTo(f)}function u(f){i.current.scrollBy(f)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:c}}const St=Pe(()=>{const t=Ee(),e=Ee(),n=Y(0),r=Ee(),o=Y(0),i=Ee(),s=Ee(),a=Y(0),l=Y(0),c=Y(0),u=Y(0),f=Ee(),d=Ee(),h=Y(!1);return le(U(t,ne(({scrollTop:p})=>p)),e),le(U(t,ne(({scrollHeight:p})=>p)),s),le(e,o),{scrollContainerState:t,scrollTop:e,viewportHeight:i,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:f,scrollBy:d,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),Wo={lvl:0};function Tp(t,e,n,r=Wo,o=Wo){return{k:t,v:e,lvl:n,l:r,r:o}}function Re(t){return t===Wo}function Zr(){return Wo}function Xl(t,e){if(Re(t))return Wo;const{k:n,l:r,r:o}=t;if(e===n){if(Re(r))return o;if(Re(o))return r;{const[i,s]=Ep(r);return bs(tt(t,{k:i,v:s,l:Cp(r)}))}}else return e<n?bs(tt(t,{l:Xl(r,e)})):bs(tt(t,{r:Xl(o,e)}))}function Uo(t,e){if(!Re(t))return e===t.k?t.v:e<t.k?Uo(t.l,e):Uo(t.r,e)}function Gt(t,e,n="k"){if(Re(t))return[-1/0,void 0];if(Number(t[n])===e)return[t.k,t.v];if(Number(t[n])<e){const r=Gt(t.r,e,n);return r[0]===-1/0?[t.k,t.v]:r}return Gt(t.l,e,n)}function Rt(t,e,n){return Re(t)?Tp(e,n,1):e===t.k?tt(t,{k:e,v:n}):e<t.k?Ap(tt(t,{l:Rt(t.l,e,n)})):Ap(tt(t,{r:Rt(t.r,e,n)}))}function Jl(t,e,n){if(Re(t))return[];const{k:r,v:o,l:i,r:s}=t;let a=[];return r>e&&(a=a.concat(Jl(i,e,n))),r>=e&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Jl(s,e,n))),a}function cr(t){return Re(t)?[]:[...cr(t.l),{k:t.k,v:t.v},...cr(t.r)]}function Ep(t){return Re(t.r)?[t.k,t.v]:Ep(t.r)}function Cp(t){return Re(t.r)?t.l:bs(tt(t,{r:Cp(t.r)}))}function tt(t,e){return Tp(e.k!==void 0?e.k:t.k,e.v!==void 0?e.v:t.v,e.lvl!==void 0?e.lvl:t.lvl,e.l!==void 0?e.l:t.l,e.r!==void 0?e.r:t.r)}function Ql(t){return Re(t)||t.lvl>t.r.lvl}function Ap(t){return ec(Pp(t))}function bs(t){const{l:e,r:n,lvl:r}=t;if(n.lvl>=r-1&&e.lvl>=r-1)return t;if(r>n.lvl+1){if(Ql(e))return Pp(tt(t,{lvl:r-1}));if(!Re(e)&&!Re(e.r))return tt(e.r,{l:tt(e,{r:e.r.l}),r:tt(t,{l:e.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(Ql(t))return ec(tt(t,{lvl:r-1}));if(!Re(n)&&!Re(n.l)){const o=n.l,i=Ql(o)?n.lvl-1:n.lvl;return tt(o,{l:tt(t,{r:o.l,lvl:r-1}),r:ec(tt(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function xs(t,e,n){if(Re(t))return[];const r=Gt(t,e)[0];return $E(Jl(t,r,n))}function _p(t,e){const n=t.length;if(n===0)return[];let{index:r,value:o}=e(t[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=e(t[s]);i.push({start:r,end:a-1,value:o}),r=a,o=l}return i.push({start:r,end:1/0,value:o}),i}function $E(t){return _p(t,({k:e,v:n})=>({index:e,value:n}))}function ec(t){const{r:e,lvl:n}=t;return!Re(e)&&!Re(e.r)&&e.lvl===n&&e.r.lvl===n?tt(e,{l:tt(t,{r:e.l}),lvl:n+1}):t}function Pp(t){const{l:e}=t;return!Re(e)&&e.lvl===t.lvl?tt(e,{r:tt(t,{l:e.r})}):t}function ws(t,e,n,r=0){let o=t.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=t[i],a=n(s,e);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`)}function Ip(t,e,n){return t[ws(t,e,n)]}function jE(t,e,n,r){const o=ws(t,e,r),i=ws(t,n,r,o);return t.slice(o,i+1)}const tc=Pe(()=>({recalcInProgress:Y(!1)}),[],{singleton:!0});function BE(t){const{size:e,startIndex:n,endIndex:r}=t;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===e}function Op(t,e){let n=0,r=0;for(;n<t;)n+=e[r+1]-e[r]-1,r++;return r-(n===t?0:1)}function zE(t,e){let n=Re(t)?0:1/0;for(const r of e){const{size:o,startIndex:i,endIndex:s}=r;if(n=Math.min(n,i),Re(t)){t=Rt(t,0,o);continue}const a=xs(t,i-1,s+1);if(a.some(BE(r)))continue;let l=!1,c=!1;for(const{start:u,end:f,value:d}of a)l?(s>=u||o===d)&&(t=Xl(t,u)):(c=d!==o,l=!0),f>s&&s>=u&&d!==o&&(t=Rt(t,s+1,d));c&&(t=Rt(t,i,o))}return[t,n]}function HE(){return{offsetTree:[],sizeTree:Zr(),groupOffsetTree:Zr(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function nc({index:t},e){return e===t?0:e<t?-1:1}function WE({offset:t},e){return e===t?0:e<t?-1:1}function UE(t){return{index:t.index,value:t}}function GE(t,e,n,r=0){return r>0&&(e=Math.max(e,Ip(t,r,nc).offset)),_p(jE(t,e,n,WE),UE)}function rc(t,e,n,r){let o=t,i=0,s=0,a=0,l=0;if(e!==0){l=ws(o,e-1,nc),a=o[l].offset;const u=Gt(n,e-1);i=u[0],s=u[1],o.length&&o[l].size===Gt(n,e)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of xs(n,e,1/0)){const f=c-i,d=f*s+a+f*r;o.push({offset:d,size:u,index:c}),i=c,a=d,s=u}return{offsetTree:o,lastIndex:i,lastOffset:a,lastSize:s}}function KE(t,[e,n,r,o]){e.length>0&&r("received item sizes",e,Vt.DEBUG);const i=t.sizeTree;let s=i,a=0;if(n.length>0&&Re(i)&&e.length===2){const d=e[0].size,h=e[1].size;s=n.reduce((p,m)=>Rt(Rt(p,m,d),m+1,h),s)}else[s,a]=zE(s,e);if(s===i)return t;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:f}=rc(t.offsetTree,a,s,o);return{sizeTree:s,offsetTree:l,lastIndex:c,lastOffset:f,lastSize:u,groupOffsetTree:n.reduce((d,h)=>Rt(d,h,Go(h,l,o)),Zr()),groupIndices:n}}function Go(t,e,n){if(e.length===0)return 0;const{offset:r,index:o,size:i}=Ip(e,t,nc),s=t-o,a=i*s+(s-1)*n+r;return a>0?a+n:a}function qE(t){return typeof t.groupIndex<"u"}function kp(t,e,n){if(qE(t))return e.groupIndices[t.groupIndex]+1;{const r=t.index==="LAST"?n:t.index;let o=Dp(r,e);return o=Math.max(0,o,Math.min(n,o)),o}}function Dp(t,e){if(!Ss(e))return t;let n=0;for(;e.groupIndices[n]<=t+n;)n++;return t+n}function Ss(t){return!Re(t.groupOffsetTree)}function ZE(t){return cr(t).map(({k:e,v:n},r,o)=>{const i=o[r+1],s=i?i.k-1:1/0;return{startIndex:e,endIndex:s,size:n}})}const YE={offsetHeight:"height",offsetWidth:"width"},sn=Pe(([{log:t},{recalcInProgress:e}])=>{const n=Ee(),r=Ee(),o=vt(r,0),i=Ee(),s=Ee(),a=Y(0),l=Y([]),c=Y(void 0),u=Y(void 0),f=Y((w,E)=>Ut(w,YE[E])),d=Y(void 0),h=Y(0),p=HE(),m=vt(U(n,be(l,t,h),rn(KE,p),He()),p),g=vt(U(l,He(),rn((w,E)=>({prev:w.current,current:E}),{prev:[],current:[]}),ne(({prev:w})=>w)),[]);le(U(l,de(w=>w.length>0),be(m,h),ne(([w,E,_])=>{const I=w.reduce((D,F,N)=>Rt(D,F,Go(F,E.offsetTree,_)||N),Zr());return{...E,groupIndices:w,groupOffsetTree:I}})),m),le(U(r,be(m),de(([w,{lastIndex:E}])=>w<E),ne(([w,{lastIndex:E,lastSize:_}])=>[{startIndex:w,endIndex:E,size:_}])),n),le(c,u);const v=vt(U(c,ne(w=>w===void 0)),!0);le(U(u,de(w=>w!==void 0&&Re(yt(m).sizeTree)),ne(w=>[{startIndex:0,endIndex:0,size:w}])),n);const x=Nt(U(n,be(m),rn(({sizes:w},[E,_])=>({changed:_!==w,sizes:_}),{changed:!1,sizes:p}),ne(w=>w.changed)));Fe(U(a,rn((w,E)=>({diff:w.prev-E,prev:E}),{diff:0,prev:0}),ne(w=>w.diff)),w=>{const{groupIndices:E}=yt(m);if(w>0)ve(e,!0),ve(i,w+Op(w,E));else if(w<0){const _=yt(g);_.length>0&&(w-=Op(-w,_)),ve(s,w)}}),Fe(U(a,be(t)),([w,E])=>{w<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},Vt.ERROR)});const y=Nt(i);le(U(i,be(m),ne(([w,E])=>{const _=E.groupIndices.length>0,I=[],D=E.lastSize;if(_){const F=Uo(E.sizeTree,0);let N=0,P=0;for(;N<w;){const A=E.groupIndices[P],L=E.groupIndices.length===P+1?1/0:E.groupIndices[P+1]-A-1;I.push({startIndex:A,endIndex:A,size:F}),I.push({startIndex:A+1,endIndex:A+1+L-1,size:D}),P++,N+=L+1}const $=cr(E.sizeTree);return N!==w&&$.shift(),$.reduce((A,{k:L,v:V})=>{let z=A.ranges;return A.prevSize!==0&&(z=[...A.ranges,{startIndex:A.prevIndex,endIndex:L+w-1,size:A.prevSize}]),{ranges:z,prevIndex:L+w,prevSize:V}},{ranges:I,prevIndex:w,prevSize:0}).ranges}return cr(E.sizeTree).reduce((F,{k:N,v:P})=>({ranges:[...F.ranges,{startIndex:F.prevIndex,endIndex:N+w-1,size:F.prevSize}],prevIndex:N+w,prevSize:P}),{ranges:[],prevIndex:0,prevSize:D}).ranges})),n);const S=Nt(U(s,be(m,h),ne(([w,{offsetTree:E},_])=>{const I=-w;return Go(I,E,_)})));return le(U(s,be(m,h),ne(([w,E,_])=>{if(E.groupIndices.length>0){if(Re(E.sizeTree))return E;let D=Zr();const F=yt(g);let N=0,P=0,$=0;for(;N<-w;){$=F[P];const A=F[P+1]-$-1;P++,N+=A+1}if(D=cr(E.sizeTree).reduce((A,{k:L,v:V})=>Rt(A,Math.max(0,L+w),V),D),N!==-w){const A=Uo(E.sizeTree,$);D=Rt(D,0,A);const L=Gt(E.sizeTree,-w+1)[1];D=Rt(D,1,L)}return{...E,sizeTree:D,...rc(E.offsetTree,0,D,_)}}else{const D=cr(E.sizeTree).reduce((F,{k:N,v:P})=>Rt(F,Math.max(0,N+w),P),Zr());return{...E,sizeTree:D,...rc(E.offsetTree,0,D,_)}}})),m),{data:d,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:i,shiftWith:s,shiftWithOffset:S,beforeUnshiftWith:y,firstItemIndex:a,gap:h,sizes:m,listRefresh:x,statefulTotalCount:o,trackItemSizes:v,itemSize:f}},ze(Bn,tc),{singleton:!0}),XE=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Mp(t){const e=typeof t=="number"?{index:t}:t;return e.align||(e.align="start"),(!e.behavior||!XE)&&(e.behavior="auto"),e.offset||(e.offset=0),e}const Ko=Pe(([{sizes:t,totalCount:e,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:f},{log:d}])=>{const h=Ee(),p=Ee(),m=Y(0);let g=null,v=null,x=null;function y(){g&&(g(),g=null),x&&(x(),x=null),v&&(clearTimeout(v),v=null),ve(o,!1)}return le(U(h,be(t,i,e,m,l,c,d),be(r,u,f),ne(([[S,w,E,_,I,D,F,N],P,$,O])=>{const A=Mp(S),{align:L,behavior:V,offset:z}=A,Z=_-1,C=kp(A,w,Z);let j=Go(C,w.offsetTree,P)+D;L==="end"?(j+=$+Gt(w.sizeTree,C)[1]-E+O,C===Z&&(j+=F)):L==="center"?j+=($+Gt(w.sizeTree,C)[1]-E+O)/2:j-=I,z&&(j+=z);const X=re=>{y(),re?(N("retrying to scroll to",{location:S},Vt.DEBUG),ve(h,S)):(ve(p,!0),N("list did not change, scroll successful",{},Vt.DEBUG))};if(y(),V==="smooth"){let re=!1;x=Fe(n,ee=>{re=re||ee}),g=tn(a,()=>{X(re)})}else g=tn(U(n,JE(150)),X);return v=setTimeout(()=>{y()},1200),ve(o,!0),N("scrolling from index to",{index:C,top:j,behavior:V},Vt.DEBUG),{top:j,behavior:V}})),s),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},ze(sn,St,Bn),{singleton:!0});function JE(t){return e=>{const n=setTimeout(()=>{e(!1)},t);return r=>{r&&(e(!0),clearTimeout(n))}}}const qo="up",Zo="down",QE="none",eC={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},tC=0,Yo=Pe(([{scrollContainerState:t,scrollTop:e,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:i}])=>{const s=Y(!1),a=Y(!0),l=Ee(),c=Ee(),u=Y(4),f=Y(tC),d=vt(U(bp(U(pe(e),qr(1),nn(!0)),U(pe(e),qr(1),nn(!1),vp(100))),He()),!1),h=vt(U(bp(U(i,nn(!0)),U(i,nn(!1),vp(200))),He()),!1);le(U(st(pe(e),pe(f)),ne(([x,y])=>x<=y),He()),a),le(U(a,jn(50)),c);const p=Nt(U(st(t,pe(n),pe(r),pe(o),pe(u)),rn((x,[{scrollTop:y,scrollHeight:S},w,E,_,I])=>{const D=y+w-S>-I,F={viewportHeight:w,scrollTop:y,scrollHeight:S};if(D){let P,$;return y>x.state.scrollTop?(P="SCROLLED_DOWN",$=x.state.scrollTop-y):(P="SIZE_DECREASED",$=x.state.scrollTop-y||x.scrollTopDelta),{atBottom:!0,state:F,atBottomBecause:P,scrollTopDelta:$}}let N;return F.scrollHeight>x.state.scrollHeight?N="SIZE_INCREASED":w<x.state.viewportHeight?N="VIEWPORT_HEIGHT_DECREASING":y<x.state.scrollTop?N="SCROLLING_UPWARDS":N="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:N,state:F}},eC),He((x,y)=>x&&x.atBottom===y.atBottom))),m=vt(U(t,rn((x,{scrollTop:y,scrollHeight:S,viewportHeight:w})=>{if(wp(x.scrollHeight,S))return{scrollTop:y,scrollHeight:S,jump:0,changed:!1};{const E=S-(y+w)<1;return x.scrollTop!==y&&E?{scrollHeight:S,scrollTop:y,jump:x.scrollTop-y,changed:!0}:{scrollHeight:S,scrollTop:y,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),de(x=>x.changed),ne(x=>x.jump)),0);le(U(p,ne(x=>x.atBottom)),s),le(U(s,jn(50)),l);const g=Y(Zo);le(U(t,ne(({scrollTop:x})=>x),He(),rn((x,y)=>yt(h)?{direction:x.direction,prevScrollTop:y}:{direction:y<x.prevScrollTop?qo:Zo,prevScrollTop:y},{direction:Zo,prevScrollTop:0}),ne(x=>x.direction)),g),le(U(t,jn(50),nn(QE)),g);const v=Y(0);return le(U(d,de(x=>!x),nn(0)),v),le(U(e,jn(100),be(d),de(([x,y])=>!!y),rn(([x,y],[S])=>[y,S],[0,0]),ne(([x,y])=>y-x)),v),{isScrolling:d,isAtTop:a,isAtBottom:s,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:g,atBottomThreshold:u,atTopThreshold:f,scrollVelocity:v,lastJumpDueToItemResize:m}},ze(St)),zn=Pe(([{log:t}])=>{const e=Y(!1),n=Nt(U(e,de(r=>r),He()));return Fe(e,r=>{r&&yt(t)("props updated",{},Vt.DEBUG)}),{propsReady:e,didMount:n}},ze(Bn),{singleton:!0});function oc(t,e){t==0?e():requestAnimationFrame(()=>oc(t-1,e))}function ic(t,e){const n=e-1;return typeof t=="number"?t:t.index==="LAST"?n:t.index}const Xo=Pe(([{sizes:t,listRefresh:e,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:i},{didMount:s}])=>{const a=Y(!0),l=Y(0),c=Y(!0);return le(U(s,be(l),de(([u,f])=>!!f),nn(!1)),a),le(U(s,be(l),de(([u,f])=>!!f),nn(!1)),c),Fe(U(st(e,s),be(a,t,n,c),de(([[,u],f,{sizeTree:d},h,p])=>u&&(!Re(d)||Kl(h))&&!f&&!p),be(l)),([,u])=>{tn(i,()=>{ve(c,!0)}),oc(4,()=>{tn(r,()=>{ve(a,!0)}),ve(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},ze(sn,St,Ko,zn),{singleton:!0});function Fp(t){return t?t==="smooth"?"smooth":"auto":!1}const nC=(t,e)=>typeof t=="function"?Fp(t(e)):e&&Fp(t),rC=Pe(([{totalCount:t,listRefresh:e},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=Y(!1),f=Ee();let d=null;function h(m){ve(o,{index:"LAST",align:"end",behavior:m})}Fe(U(st(U(pe(t),qr(1)),a),be(pe(u),n,i,c),ne(([[m,g],v,x,y,S])=>{let w=g&&y,E="auto";return w&&(E=nC(v,x||S),w=w&&!!E),{totalCount:m,shouldFollow:w,followOutputBehavior:E}}),de(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:g})=>{d&&(d(),d=null),d=tn(e,()=>{yt(l)("following output to ",{totalCount:m},Vt.DEBUG),h(g),d=null})});function p(m){const g=tn(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!d&&(yt(l)("scrolling to bottom due to increased size",{},Vt.DEBUG),h("auto"))});setTimeout(g,100)}return Fe(U(st(pe(u),t,s),de(([m,,g])=>m&&g),rn(({value:m},[,g])=>({refreshed:m===g,value:g}),{refreshed:!1,value:0}),de(({refreshed:m})=>m),be(u,t)),([,m])=>{yt(i)&&p(m!==!1)}),Fe(f,()=>{p(yt(u)!==!1)}),Fe(st(pe(u),r),([m,g])=>{m&&!g.atBottom&&g.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:f}},ze(sn,Yo,Ko,Xo,zn,Bn,St));function oC(t){return t.reduce((e,n)=>(e.groupIndices.push(e.totalCount),e.totalCount+=n+1,e),{totalCount:0,groupIndices:[]})}const Lp=Pe(([{totalCount:t,groupIndices:e,sizes:n},{scrollTop:r,headerHeight:o}])=>{const i=Ee(),s=Ee(),a=Nt(U(i,ne(oC)));return le(U(a,ne(l=>l.totalCount)),t),le(U(a,ne(l=>l.groupIndices)),e),le(U(st(r,n,o),de(([l,c])=>Ss(c)),ne(([l,c,u])=>Gt(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),He(),ne(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},ze(sn,St));function Jo(t,e){return!!(t&&t[0]===e[0]&&t[1]===e[1])}function Np(t,e){return!!(t&&t.startIndex===e.startIndex&&t.endIndex===e.endIndex)}const Ts="top",Es="bottom",Vp="none";function Rp(t,e,n){return typeof t=="number"?n===qo&&e===Ts||n===Zo&&e===Es?t:0:n===qo?e===Ts?t.main:t.reverse:e===Es?t.main:t.reverse}function $p(t,e){return typeof t=="number"?t:t[e]||0}const sc=Pe(([{scrollTop:t,viewportHeight:e,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const i=Ee(),s=Y(0),a=Y(0),l=Y(0),c=vt(U(st(pe(t),pe(e),pe(r),pe(i,Jo),pe(l),pe(s),pe(o),pe(n),pe(a)),ne(([u,f,d,[h,p],m,g,v,x,y])=>{const S=u-x,w=g+v,E=Math.max(d-S,0);let _=Vp;const I=$p(y,Ts),D=$p(y,Es);return h-=x,h+=d+v,p+=d+v,p-=x,h>u+w-I&&(_=qo),p<u-E+f+D&&(_=Zo),_!==Vp?[Math.max(S-d-Rp(m,Ts,_)-I,0),S-E-v+f+Rp(m,Es,_)+D]:null}),de(u=>u!=null),He(Jo)),[0,0]);return{listBoundary:i,overscan:l,topListHeight:s,increaseViewportBy:a,visibleRange:c}},ze(St),{singleton:!0});function iC(t,e,n){if(Ss(e)){const r=Dp(t,e);return[{index:Gt(e.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:t,size:0,offset:0,data:n&&n[0]}]}const ac={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function jp(t,e,n){if(t.length===0)return[];if(!Ss(e))return t.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=t[0].index,o=t[t.length-1].index,i=[],s=xs(e.groupOffsetTree,r,o);let a,l=0;for(const c of t){(!a||a.end<c.index)&&(a=s.shift(),l=e.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},i.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return i}function Cs(t,e,n,r,o,i){const{lastSize:s,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(t.length>0){c=t[0].offset;const m=t[t.length-1];u=m.offset+m.size}const f=n-l,d=a+f*s+(f-1)*r,h=c,p=d-u;return{items:jp(t,o,i),topItems:jp(e,o,i),topListHeight:e.reduce((m,g)=>g.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:i}}function Bp(t,e,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=t)break;s++}const a=t+s,l=ic(e,a),c=Array.from({length:a}).map((u,f)=>({index:f+l,size:0,offset:0,data:i[f+l]}));return Cs(c,[],a,o,n,r)}const ur=Pe(([{sizes:t,totalCount:e,data:n,firstItemIndex:r,gap:o},i,{visibleRange:s,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:f},d,{didMount:h},{recalcInProgress:p}])=>{const m=Y([]),g=Y(0),v=Ee();le(i.topItemsIndexes,m);const x=vt(U(st(h,p,pe(s,Jo),pe(e),pe(t),pe(u),c,pe(m),pe(r),pe(o),n),de(([E,_,,I,,,,,,,D])=>{const F=D&&D.length!==I;return E&&!_&&!F}),ne(([,,[E,_],I,D,F,N,P,$,O,A])=>{const L=D,{sizeTree:V,offsetTree:z}=L,Z=yt(g);if(I===0)return{...ac,totalCount:I};if(E===0&&_===0)return Z===0?{...ac,totalCount:I}:Bp(Z,F,D,$,O,A||[]);if(Re(V))return Z>0?null:Cs(iC(ic(F,I),L,A),[],I,O,L,$);const C=[];if(P.length>0){const H=P[0],k=P[P.length-1];let R=0;for(const W of xs(V,H,k)){const K=W.value,J=Math.max(W.start,H),ce=Math.min(W.end,k);for(let B=J;B<=ce;B++)C.push({index:B,size:K,offset:R,data:A&&A[B]}),R+=K}}if(!N)return Cs([],C,I,O,L,$);const j=P.length>0?P[P.length-1]+1:0,X=GE(z,E,_,j);if(X.length===0)return null;const re=I-1,ee=ys([],H=>{for(const k of X){const R=k.value;let W=R.offset,K=k.start;const J=R.size;if(R.offset<E){K+=Math.floor((E-R.offset+O)/(J+O));const B=K-k.start;W+=B*J+B*O}K<j&&(W+=(j-K)*J,K=j);const ce=Math.min(k.end,re);for(let B=K;B<=ce&&!(W>=_);B++)H.push({index:B,size:J,offset:W,data:A&&A[B]}),W+=J+O}});return Cs(ee,C,I,O,L,$)}),de(E=>E!==null),He()),ac);le(U(n,de(Kl),ne(E=>E==null?void 0:E.length)),e),le(U(x,ne(E=>E.topListHeight)),f),le(f,l),le(U(x,ne(E=>[E.top,E.bottom])),a),le(U(x,ne(E=>E.items)),v);const y=Nt(U(x,de(({items:E})=>E.length>0),be(e,n),de(([{items:E},_])=>E[E.length-1].originalIndex===_-1),ne(([,E,_])=>[E-1,_]),He(Jo),ne(([E])=>E))),S=Nt(U(x,jn(200),de(({items:E,topItems:_})=>E.length>0&&E[0].originalIndex===_.length),ne(({items:E})=>E[0].index),He())),w=Nt(U(x,de(({items:E})=>E.length>0),ne(({items:E})=>{let _=0,I=E.length-1;for(;E[_].type==="group"&&_<I;)_++;for(;E[I].type==="group"&&I>_;)I--;return{startIndex:E[_].index,endIndex:E[I].index}}),He(Np)));return{listState:x,topItemsIndexes:m,endReached:y,startReached:S,rangeChanged:w,itemsRendered:v,initialItemCount:g,...d}},ze(sn,Lp,sc,Xo,Ko,Yo,zn,tc),{singleton:!0}),sC=Pe(([{sizes:t,firstItemIndex:e,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(le(U(a,be(i),de(([,l])=>l!==0),be(o,t,e,r,n),ne(([[,l],c,u,f,d,h=[]])=>Bp(l,c,u,f,d,h))),s),{}),ze(sn,Xo,ur,zn),{singleton:!0}),zp=Pe(([{scrollVelocity:t}])=>{const e=Y(!1),n=Ee(),r=Y(!1);return le(U(t,be(r,e,n),de(([o,i])=>!!i),ne(([o,i,s,a])=>{const{exit:l,enter:c}=i;if(s){if(l(o,a))return!1}else if(c(o,a))return!0;return s}),He()),e),Fe(U(st(e,t,n),be(r)),([[o,i,s],a])=>o&&a&&a.change&&a.change(i,s)),{isSeeking:e,scrollSeekConfiguration:r,scrollVelocity:t,scrollSeekRangeChanged:n}},ze(Yo),{singleton:!0}),aC=Pe(([{topItemsIndexes:t}])=>{const e=Y(0);return le(U(e,de(n=>n>0),ne(n=>Array.from({length:n}).map((r,o)=>o))),t),{topItemCount:e}},ze(ur)),Hp=Pe(([{footerHeight:t,headerHeight:e,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const i=Ee(),s=vt(U(st(t,r,e,n,o),ne(([a,l,c,u,f])=>a+l+c+u+f.offsetBottom+f.bottom)),0);return le(pe(s),i),{totalListHeight:s,totalListHeightChanged:i}},ze(St,ur),{singleton:!0});function Wp(t){let e=!1,n;return()=>(e||(e=!0,n=t()),n)}const lC=Wp(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),cC=Pe(([{scrollBy:t,scrollTop:e,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:f,gap:d},{log:h},{recalcInProgress:p}])=>{const m=Nt(U(l,be(a),rn(([,v,x,y],[{items:S,totalCount:w,bottom:E,offsetBottom:_},I])=>{const D=E+_;let F=0;return x===w&&v.length>0&&S.length>0&&(S[0].originalIndex===0&&v[0].originalIndex===0||(F=D-y,F!==0&&(F+=I))),[F,S,w,D]},[0,[],0,0]),de(([v])=>v!==0),be(e,s,r,i,h,p),de(([,v,x,y,,,S])=>!S&&!y&&v!==0&&x===qo),ne(([[v],,,,,x])=>(x("Upward scrolling compensation",{amount:v},Vt.DEBUG),v))));function g(v){v>0?(ve(t,{top:-v,behavior:"auto"}),ve(n,0)):(ve(n,0),ve(t,{top:-v,behavior:"auto"}))}return Fe(U(m,be(n,o)),([v,x,y])=>{y&&lC()?ve(n,x-v):g(-v)}),Fe(U(st(vt(o,!1),n,p),de(([v,x,y])=>!v&&!y&&x!==0),ne(([v,x])=>x),jn(1)),g),le(U(u,ne(v=>({top:-v}))),t),Fe(U(c,be(f,d),ne(([v,{lastSize:x,groupIndices:y,sizeTree:S},w])=>{function E(_){return _*(x+w)}if(y.length===0)return E(v);{let _=0;const I=Uo(S,0);let D=0,F=0;for(;D<v;){D++,_+=I;let N=y.length===F+1?1/0:y[F+1]-y[F]-1;D+N>v&&(_-=I,N=v-D+1),D+=N,_+=E(N),F++}return _}})),v=>{ve(n,v),requestAnimationFrame(()=>{ve(t,{top:v}),requestAnimationFrame(()=>{ve(n,0),ve(p,!1)})})}),{deviation:n}},ze(St,Yo,ur,sn,Bn,tc)),uC=Pe(([{didMount:t},{scrollTo:e},{listState:n}])=>{const r=Y(0);return Fe(U(t,be(r),de(([,o])=>o!==0),ne(([,o])=>({top:o}))),o=>{tn(U(n,qr(1),de(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{ve(e,o)})})}),{initialScrollTop:r}},ze(zn,St,ur),{singleton:!0}),fC=Pe(([{viewportHeight:t},{totalListHeight:e}])=>{const n=Y(!1),r=vt(U(st(n,t,e),de(([o])=>o),ne(([,o,i])=>Math.max(0,o-i)),jn(0),He()),0);return{alignToBottom:n,paddingTopAddition:r}},ze(St,Hp),{singleton:!0}),lc=Pe(([{scrollTo:t,scrollContainerState:e}])=>{const n=Ee(),r=Ee(),o=Ee(),i=Y(!1),s=Y(void 0);return le(U(st(n,r),ne(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),e),le(U(t,be(r),ne(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},ze(St)),dC=({itemTop:t,itemBottom:e,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:i,...s}})=>t<n?{...s,behavior:o,align:i??"start"}:e>r?{...s,behavior:o,align:i??"end"}:null,hC=Pe(([{sizes:t,totalCount:e,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ee();return le(U(u,be(t,o,e,i,s,a,r),be(n),ne(([[f,d,h,p,m,g,v,x],y])=>{const{done:S,behavior:w,align:E,calculateViewLocation:_=dC,...I}=f,D=kp(f,d,p-1),F=Go(D,d.offsetTree,y)+m+g,N=F+Gt(d.sizeTree,D)[1],P=x+g,$=x+h-v,O=_({itemTop:F,itemBottom:N,viewportTop:P,viewportBottom:$,locationParams:{behavior:w,align:E,...I}});return O?S&&tn(U(l,de(A=>A===!1),qr(yt(l)?1:2)),S):S&&S(),O}),de(f=>f!==null)),c),{scrollIntoView:u}},ze(sn,St,Ko,ur,Bn),{singleton:!0}),pC=Pe(([{sizes:t,sizeRanges:e},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:o},{useWindowScroll:i,windowScrollContainerState:s,windowViewportRect:a}])=>{const l=Ee(),c=Y(void 0),u=Y(null),f=Y(null);return le(s,u),le(a,f),Fe(U(l,be(t,n,i,u,f)),([d,h,p,m,g,v])=>{const x=ZE(h.sizeTree);m&&g!==null&&v!==null&&(p=g.scrollTop-v.offsetTop),d({ranges:x,scrollTop:p})}),le(U(c,de(Kl),ne(mC)),r),le(U(o,be(c),de(([,d])=>d!==void 0),He(),ne(([,d])=>d.ranges)),e),{getState:l,restoreStateFrom:c}},ze(sn,St,Xo,zn,lc));function mC(t){return{offset:t.scrollTop,index:0,align:"start"}}const gC=Pe(([t,e,n,r,o,i,s,a,l,c])=>({...t,...e,...n,...r,...o,...i,...s,...a,...l,...c}),ze(sc,sC,zn,zp,Hp,uC,fC,lc,hC,Bn)),Up=Pe(([{totalCount:t,sizeRanges:e,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:i,data:s,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:f},{initialTopMostItemIndex:d,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,g,v,{listState:x,topItemsIndexes:y,...S},{scrollToIndex:w},E,{topItemCount:_},{groupCounts:I},D])=>(le(S.rangeChanged,D.scrollSeekRangeChanged),le(U(D.windowViewportRect,ne(F=>F.visibleHeight)),m.viewportHeight),{totalCount:t,data:s,firstItemIndex:a,sizeRanges:e,initialTopMostItemIndex:d,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:y,topItemCount:_,groupCounts:I,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:x,scrollToIndex:w,trackItemSizes:o,itemSize:i,groupIndices:l,...S,...D,...m,sizes:f,...g}),ze(sn,Xo,St,pC,rC,ur,Ko,cC,aC,Lp,gC)),cc="-webkit-sticky",Gp="sticky",Kp=Wp(()=>{if(typeof document>"u")return Gp;const t=document.createElement("div");return t.style.position=cc,t.style.position===cc?cc:Gp});function uc(t,e){const n=b.useRef(null),r=b.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,f;if(e){const d=e.getBoundingClientRect(),h=l.top-d.top;u=d.height-Math.max(0,h),f=h+e.scrollTop}else u=window.innerHeight-Math.max(0,l.top),f=l.top+window.pageYOffset;n.current={offsetTop:f,visibleHeight:u,visibleWidth:c},t(n.current)},[t,e]),{callbackRef:o,ref:i}=Yl(r),s=b.useCallback(()=>{r(i.current)},[r,i]);return b.useEffect(()=>{if(e){e.addEventListener("scroll",s);const a=new ResizeObserver(()=>{requestAnimationFrame(s)});return a.observe(e),()=>{e.removeEventListener("scroll",s),a.unobserve(e)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,e]),o}const As=b.createContext(void 0),qp=b.createContext(void 0);function fc(t){return t}const yC=Pe(([t,e])=>({...t,...e}),ze(Up,Pe(()=>{const t=Y(l=>`Item ${l}`),e=Y(null),n=Y(l=>`Group ${l}`),r=Y({}),o=Y(fc),i=Y("div"),s=Y(lr),a=(l,c=null)=>vt(U(r,ne(u=>u[l]),He()),c);return{context:e,itemContent:t,groupContent:n,components:r,computeItemKey:o,headerFooterTag:i,scrollerRef:s,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}))),vC=({height:t})=>b.createElement("div",{style:{height:t}}),bC={position:Kp(),zIndex:1,overflowAnchor:"none"},xC={overflowAnchor:"none"},Zp=b.memo(function({showTopList:e=!1}){const n=Se("listState"),r=jt("sizeRanges"),o=Se("useWindowScroll"),i=Se("customScrollParent"),s=jt("windowScrollContainerState"),a=jt("scrollContainerState"),l=i||o?s:a,c=Se("itemContent"),u=Se("context"),f=Se("groupContent"),d=Se("trackItemSizes"),h=Se("itemSize"),p=Se("log"),m=jt("gap"),{callbackRef:g}=xp(r,h,d,e?lr:l,p,m,i),[v,x]=b.useState(0);pc("deviation",O=>{v!==O&&x(O)});const y=Se("EmptyPlaceholder"),S=Se("ScrollSeekPlaceholder")||vC,w=Se("ListComponent"),E=Se("ItemComponent"),_=Se("GroupComponent"),I=Se("computeItemKey"),D=Se("isSeeking"),F=Se("groupIndices").length>0,N=Se("alignToBottom"),P=Se("initialItemFinalLocationReached"),$=e?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:v!==0?v:N?"auto":0,...P?{}:{visibility:"hidden"}};return!e&&n.totalCount===0&&y?b.createElement(y,Ze(y,u)):b.createElement(w,{...Ze(w,u),ref:g,style:$,"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list"},(e?n.topItems:n.items).map(O=>{const A=O.originalIndex,L=I(A+n.firstItemIndex,O.data,u);return D?b.createElement(S,{...Ze(S,u),key:L,index:O.index,height:O.size,type:O.type||"item",...O.type==="group"?{}:{groupIndex:O.groupIndex}}):O.type==="group"?b.createElement(_,{...Ze(_,u),key:L,"data-index":A,"data-known-size":O.size,"data-item-index":O.index,style:bC},f(O.index,u)):b.createElement(E,{...Ze(E,u),...Yp(E,O.data),key:L,"data-index":A,"data-known-size":O.size,"data-item-index":O.index,"data-item-group-index":O.groupIndex,style:xC},F?c(O.index,O.groupIndex,O.data,u):c(O.index,O.data,u))}))}),wC={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Yr=t=>({width:"100%",height:"100%",position:"absolute",top:0,...t?{display:"flex",flexDirection:"column"}:{}}),SC={width:"100%",position:Kp(),top:0,zIndex:1};function Ze(t,e){if(typeof t!="string")return{context:e}}function Yp(t,e){return{item:typeof t=="string"?void 0:e}}const TC=b.memo(function(){const e=Se("HeaderComponent"),n=jt("headerHeight"),r=Se("headerFooterTag"),o=on(s=>n(Ut(s,"height"))),i=Se("context");return e?b.createElement(r,{ref:o},b.createElement(e,Ze(e,i))):null}),EC=b.memo(function(){const e=Se("FooterComponent"),n=jt("footerHeight"),r=Se("headerFooterTag"),o=on(s=>n(Ut(s,"height"))),i=Se("context");return e?b.createElement(r,{ref:o},b.createElement(e,Ze(e,i))):null});function dc({usePublisher:t,useEmitter:e,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=t("scrollContainerState"),c=n("ScrollerComponent"),u=t("smoothScrollTargetReached"),f=n("scrollerRef"),d=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=Sp(l,u,c,f);return e("scrollTo",m),e("scrollBy",p),b.createElement(c,{ref:h,style:{...wC,...i},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...Ze(c,d)},s)})}function hc({usePublisher:t,useEmitter:e,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=t("windowScrollContainerState"),c=n("ScrollerComponent"),u=t("smoothScrollTargetReached"),f=n("totalListHeight"),d=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:g,scrollToCallback:v}=Sp(l,u,c,lr,h);return FE(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),e("windowScrollTo",v),e("scrollBy",g),b.createElement(c,{style:{position:"relative",...i,...f!==0?{height:f+d}:{}},"data-virtuoso-scroller":!0,...a,...Ze(c,p)},s)})}const CC=({children:t})=>{const e=b.useContext(As),n=jt("viewportHeight"),r=jt("fixedItemHeight"),o=Se("alignToBottom"),i=on(Ho(n,s=>Ut(s,"height")));return b.useEffect(()=>{e&&(n(e.viewportHeight),r(e.itemHeight))},[e,n,r]),b.createElement("div",{style:Yr(o),ref:i,"data-viewport-type":"element"},t)},AC=({children:t})=>{const e=b.useContext(As),n=jt("windowViewportRect"),r=jt("fixedItemHeight"),o=Se("customScrollParent"),i=uc(n,o),s=Se("alignToBottom");return b.useEffect(()=>{e&&(r(e.itemHeight),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:100}))},[e,n,r]),b.createElement("div",{ref:i,style:Yr(s),"data-viewport-type":"window"},t)},_C=({children:t})=>{const e=Se("TopItemListComponent")||"div",n=Se("headerHeight"),r={...SC,marginTop:`${n}px`},o=Se("context");return b.createElement(e,{style:r,...Ze(e,o)},t)},PC=b.memo(function(e){const n=Se("useWindowScroll"),r=Se("topItemsIndexes").length>0,o=Se("customScrollParent"),i=o||n?kC:OC,s=o||n?AC:CC;return b.createElement(i,{...e},r&&b.createElement(_C,null,b.createElement(Zp,{showTopList:!0})),b.createElement(s,null,b.createElement(TC,null),b.createElement(Zp,null),b.createElement(EC,null)))}),{Component:IC,usePublisher:jt,useEmitterValue:Se,useEmitter:pc}=Zl(yC,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},PC),OC=dc({usePublisher:jt,useEmitterValue:Se,useEmitter:pc}),kC=hc({usePublisher:jt,useEmitterValue:Se,useEmitter:pc}),DC=IC,Xp={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},MC={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Jp,ceil:Qp,floor:_s,min:mc,max:Qo}=Math;function FC(t){return{...MC,items:t}}function em(t,e,n){return Array.from({length:e-t+1}).map((r,o)=>{const i=n===null?null:n[o+t];return{index:o+t,data:i}})}function LC(t,e){return t&&t.column===e.column&&t.row===e.row}function Ps(t,e){return t&&t.width===e.width&&t.height===e.height}const NC=Pe(([{overscan:t,visibleRange:e,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},f,d,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:g,customScrollParent:v,windowScrollContainerState:x,windowScrollTo:y},S])=>{const w=Y(0),E=Y(0),_=Y(Xp),I=Y({height:0,width:0}),D=Y({height:0,width:0}),F=Ee(),N=Ee(),P=Y(0),$=Y(null),O=Y({row:0,column:0}),A=Ee(),L=Ee(),V=Y(!1),z=Y(0),Z=Y(!0),C=Y(!1);Fe(U(p,be(z),de(([k,R])=>!!R)),()=>{ve(Z,!1),ve(E,0)}),Fe(U(st(p,Z,D,I,z,C),de(([k,R,W,K,,J])=>k&&!R&&W.height!==0&&K.height!==0&&!J)),([,,,,k])=>{ve(C,!0),oc(1,()=>{ve(F,k)}),tn(U(r),()=>{ve(n,[0,0]),ve(Z,!0)})}),le(U(L,de(k=>k!=null&&k.scrollTop>0),nn(0)),E),Fe(U(p,be(L),de(([,k])=>k!=null)),([,k])=>{k&&(ve(I,k.viewport),ve(D,k==null?void 0:k.item),ve(O,k.gap),k.scrollTop>0&&(ve(V,!0),tn(U(r,qr(1)),R=>{ve(V,!1)}),ve(s,{top:k.scrollTop})))}),le(U(I,ne(({height:k})=>k)),o),le(U(st(pe(I,Ps),pe(D,Ps),pe(O,(k,R)=>k&&k.column===R.column&&k.row===R.row),pe(r)),ne(([k,R,W,K])=>({viewport:k,item:R,gap:W,scrollTop:K}))),A),le(U(st(pe(w),e,pe(O,LC),pe(D,Ps),pe(I,Ps),pe($),pe(E),pe(V),pe(Z),pe(z)),de(([,,,,,,,k])=>!k),ne(([k,[R,W],K,J,ce,B,Me,,Ue,Qe])=>{const{row:ae,column:_e}=K,{height:Te,width:Ae}=J,{width:me}=ce;if(Me===0&&(k===0||me===0))return Xp;if(Ae===0){const ot=ic(Qe,k),hn=ot===0?Math.max(Me-1,0):ot;return FC(em(ot,hn,B))}const Oe=nm(me,Ae,_e);let rt,Ct;Ue?R===0&&W===0&&Me>0?(rt=0,Ct=Me-1):(rt=Oe*_s((R+ae)/(Te+ae)),Ct=Oe*Qp((W+ae)/(Te+ae))-1,Ct=mc(k-1,Qo(Ct,Oe-1)),rt=mc(Ct,Qo(0,rt))):(rt=0,Ct=-1);const q=em(rt,Ct,B),{top:oe,bottom:Ne}=tm(ce,K,J,q),qe=Qp(k/Oe),dn=qe*Te+(qe-1)*ae-Ne;return{items:q,offsetTop:oe,offsetBottom:dn,top:oe,bottom:Ne,itemHeight:Te,itemWidth:Ae}})),_),le(U($,de(k=>k!==null),ne(k=>k.length)),w),le(U(st(I,D,_,O),de(([k,R,{items:W}])=>W.length>0&&R.height!==0&&k.height!==0),ne(([k,R,{items:W},K])=>{const{top:J,bottom:ce}=tm(k,K,R,W);return[J,ce]}),He(Jo)),n);const j=Y(!1);le(U(r,be(j),ne(([k,R])=>R||k!==0)),j);const X=Nt(U(pe(_),de(({items:k})=>k.length>0),be(w,j),de(([{items:k},R,W])=>W&&k[k.length-1].index===R-1),ne(([,k])=>k-1),He())),re=Nt(U(pe(_),de(({items:k})=>k.length>0&&k[0].index===0),nn(0),He())),ee=Nt(U(pe(_),be(V),de(([{items:k},R])=>k.length>0&&!R),ne(([{items:k}])=>({startIndex:k[0].index,endIndex:k[k.length-1].index})),He(Np),jn(0)));le(ee,d.scrollSeekRangeChanged),le(U(F,be(I,D,w,O),ne(([k,R,W,K,J])=>{const ce=Mp(k),{align:B,behavior:Me,offset:Ue}=ce;let Qe=ce.index;Qe==="LAST"&&(Qe=K-1),Qe=Qo(0,Qe,mc(K-1,Qe));let ae=gc(R,J,W,Qe);return B==="end"?ae=Jp(ae-R.height+W.height):B==="center"&&(ae=Jp(ae-R.height/2+W.height/2)),Ue&&(ae+=Ue),{top:ae,behavior:Me}})),s);const H=vt(U(_,ne(k=>k.offsetBottom+k.bottom)),0);return le(U(m,ne(k=>({width:k.visibleWidth,height:k.visibleHeight}))),I),{data:$,totalCount:w,viewportDimensions:I,itemDimensions:D,scrollTop:r,scrollHeight:N,overscan:t,scrollBy:i,scrollTo:s,scrollToIndex:F,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:y,useWindowScroll:g,customScrollParent:v,windowScrollContainerState:x,deviation:P,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:O,restoreStateFrom:L,...d,initialTopMostItemIndex:z,gridState:_,totalListHeight:H,...f,startReached:re,endReached:X,rangeChanged:ee,stateChanged:A,propsReady:h,stateRestoreInProgress:V,...S}},ze(sc,St,Yo,zp,zn,lc,Bn));function tm(t,e,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const i=gc(t,e,n,r[0].index),s=gc(t,e,n,r[r.length-1].index)+o;return{top:i,bottom:s}}function gc(t,e,n,r){const o=nm(t.width,n.width,e.column),i=_s(r/o),s=i*n.height+Qo(0,i-1)*e.row;return s>0?s+e.row:s}function nm(t,e,n){return Qo(1,_s((t+n)/(_s(e)+n)))}const VC=Pe(([t,e])=>({...t,...e}),ze(NC,Pe(()=>{const t=Y(c=>`Item ${c}`),e=Y({}),n=Y(null),r=Y("virtuoso-grid-item"),o=Y("virtuoso-grid-list"),i=Y(fc),s=Y("div"),a=Y(lr),l=(c,u=null)=>vt(U(e,ne(f=>f[c]),He()),u);return{context:n,itemContent:t,components:e,computeItemKey:i,itemClassName:r,listClassName:o,headerFooterTag:s,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),RC=b.memo(function(){const e=Ke("gridState"),n=Ke("listClassName"),r=Ke("itemClassName"),o=Ke("itemContent"),i=Ke("computeItemKey"),s=Ke("isSeeking"),a=Kt("scrollHeight"),l=Ke("ItemComponent"),c=Ke("ListComponent"),u=Ke("ScrollSeekPlaceholder"),f=Ke("context"),d=Kt("itemDimensions"),h=Kt("gap"),p=Ke("log"),m=Ke("stateRestoreInProgress"),g=on(v=>{const x=v.parentElement.parentElement.scrollHeight;a(x);const y=v.firstChild;if(y){const{width:S,height:w}=y.getBoundingClientRect();d({width:S,height:w})}h({row:om("row-gap",getComputedStyle(v).rowGap,p),column:om("column-gap",getComputedStyle(v).columnGap,p)})});return m?null:b.createElement(c,{ref:g,className:n,...Ze(c,f),style:{paddingTop:e.offsetTop,paddingBottom:e.offsetBottom},"data-testid":"virtuoso-item-list"},e.items.map(v=>{const x=i(v.index,v.data,f);return s?b.createElement(u,{key:x,...Ze(u,f),index:v.index,height:e.itemHeight,width:e.itemWidth}):b.createElement(l,{...Ze(l,f),className:r,"data-index":v.index,key:x},o(v.index,v.data,f))}))}),$C=b.memo(function(){const e=Ke("HeaderComponent"),n=Kt("headerHeight"),r=Ke("headerFooterTag"),o=on(s=>n(Ut(s,"height"))),i=Ke("context");return e?b.createElement(r,{ref:o},b.createElement(e,Ze(e,i))):null}),jC=b.memo(function(){const e=Ke("FooterComponent"),n=Kt("footerHeight"),r=Ke("headerFooterTag"),o=on(s=>n(Ut(s,"height"))),i=Ke("context");return e?b.createElement(r,{ref:o},b.createElement(e,Ze(e,i))):null}),BC=({children:t})=>{const e=b.useContext(qp),n=Kt("itemDimensions"),r=Kt("viewportDimensions"),o=on(i=>{r(i.getBoundingClientRect())});return b.useEffect(()=>{e&&(r({height:e.viewportHeight,width:e.viewportWidth}),n({height:e.itemHeight,width:e.itemWidth}))},[e,r,n]),b.createElement("div",{style:Yr(!1),ref:o},t)},zC=({children:t})=>{const e=b.useContext(qp),n=Kt("windowViewportRect"),r=Kt("itemDimensions"),o=Ke("customScrollParent"),i=uc(n,o);return b.useEffect(()=>{e&&(r({height:e.itemHeight,width:e.itemWidth}),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:e.viewportWidth}))},[e,n,r]),b.createElement("div",{ref:i,style:Yr(!1)},t)},HC=b.memo(function({...e}){const n=Ke("useWindowScroll"),r=Ke("customScrollParent"),o=r||n?UC:WC,i=r||n?zC:BC;return b.createElement(o,{...e},b.createElement(i,null,b.createElement($C,null),b.createElement(RC,null),b.createElement(jC,null)))}),{Component:CD,usePublisher:Kt,useEmitterValue:Ke,useEmitter:rm}=Zl(VC,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},HC),WC=dc({usePublisher:Kt,useEmitterValue:Ke,useEmitter:rm}),UC=hc({usePublisher:Kt,useEmitterValue:Ke,useEmitter:rm});function om(t,e,n){return e!=="normal"&&!(e!=null&&e.endsWith("px"))&&n(`${t} was not resolved to pixel value correctly`,e,Vt.WARN),e==="normal"?0:parseInt(e??"0",10)}const GC=Pe(([t,e])=>({...t,...e}),ze(Up,Pe(()=>{const t=Y(l=>b.createElement("td",null,"Item $",l)),e=Y(null),n=Y(null),r=Y(null),o=Y({}),i=Y(fc),s=Y(lr),a=(l,c=null)=>vt(U(o,ne(u=>u[l]),He()),c);return{context:e,itemContent:t,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:i,scrollerRef:s,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),KC=({height:t})=>b.createElement("tr",null,b.createElement("td",{style:{height:t}})),qC=({height:t})=>b.createElement("tr",null,b.createElement("td",{style:{height:t,padding:0,border:0}})),ZC={overflowAnchor:"none"},YC=b.memo(function(){const e=Le("listState"),n=qt("sizeRanges"),r=Le("useWindowScroll"),o=Le("customScrollParent"),i=qt("windowScrollContainerState"),s=qt("scrollContainerState"),a=o||r?i:s,l=Le("itemContent"),c=Le("trackItemSizes"),u=Le("itemSize"),f=Le("log"),{callbackRef:d,ref:h}=xp(n,u,c,a,f,void 0,o),[p,m]=b.useState(0);yc("deviation",L=>{p!==L&&(h.current.style.marginTop=`${L}px`,m(L))});const g=Le("EmptyPlaceholder"),v=Le("ScrollSeekPlaceholder")||KC,x=Le("FillerRow")||qC,y=Le("TableBodyComponent"),S=Le("TableRowComponent"),w=Le("computeItemKey"),E=Le("isSeeking"),_=Le("paddingTopAddition"),I=Le("firstItemIndex"),D=Le("statefulTotalCount"),F=Le("context");if(D===0&&g)return b.createElement(g,Ze(g,F));const N=e.offsetTop+_+p,P=e.offsetBottom,$=N>0?b.createElement(x,{height:N,key:"padding-top",context:F}):null,O=P>0?b.createElement(x,{height:P,key:"padding-bottom",context:F}):null,A=e.items.map(L=>{const V=L.originalIndex,z=w(V+I,L.data,F);return E?b.createElement(v,{...Ze(v,F),key:z,index:L.index,height:L.size,type:L.type||"item"}):b.createElement(S,{...Ze(S,F),...Yp(S,L.data),key:z,"data-index":V,"data-known-size":L.size,"data-item-index":L.index,style:ZC},l(L.index,L.data,F))});return b.createElement(y,{ref:d,"data-testid":"virtuoso-item-list",...Ze(y,F)},[$,...A,O])}),XC=({children:t})=>{const e=b.useContext(As),n=qt("viewportHeight"),r=qt("fixedItemHeight"),o=on(Ho(n,i=>Ut(i,"height")));return b.useEffect(()=>{e&&(n(e.viewportHeight),r(e.itemHeight))},[e,n,r]),b.createElement("div",{style:Yr(!1),ref:o,"data-viewport-type":"element"},t)},JC=({children:t})=>{const e=b.useContext(As),n=qt("windowViewportRect"),r=qt("fixedItemHeight"),o=Le("customScrollParent"),i=uc(n,o);return b.useEffect(()=>{e&&(r(e.itemHeight),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:100}))},[e,n,r]),b.createElement("div",{ref:i,style:Yr(!1),"data-viewport-type":"window"},t)},QC=b.memo(function(e){const n=Le("useWindowScroll"),r=Le("customScrollParent"),o=qt("fixedHeaderHeight"),i=qt("fixedFooterHeight"),s=Le("fixedHeaderContent"),a=Le("fixedFooterContent"),l=Le("context"),c=on(Ho(o,x=>Ut(x,"height"))),u=on(Ho(i,x=>Ut(x,"height"))),f=r||n?n1:t1,d=r||n?JC:XC,h=Le("TableComponent"),p=Le("TableHeadComponent"),m=Le("TableFooterComponent"),g=s?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...Ze(p,l)},s()):null,v=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...Ze(m,l)},a()):null;return b.createElement(f,{...e},b.createElement(d,null,b.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...Ze(h,l)},[g,b.createElement(YC,{key:"TableBody"}),v])))}),{Component:e1,usePublisher:qt,useEmitterValue:Le,useEmitter:yc}=Zl(GC,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},QC),t1=dc({usePublisher:qt,useEmitterValue:Le,useEmitter:yc}),n1=hc({usePublisher:qt,useEmitterValue:Le,useEmitter:yc}),r1=e1,o1=t=>{const[e,n]=b.useState(0);return b.useEffect(()=>{const r=t.current;if(!r)return;const o=r.parentElement;if(console.log(o),!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),e},im=({children:t,className:e="",size:n,...r})=>T.jsxs("label",{className:"font-normal flex items-center gap-2",children:[T.jsx("input",{...r,type:"checkbox",className:_t("form-checkbox h-4 w-4 app rounded border-card-border text-primary focus:ring-primary appearance-none inline-block bg-origin-border select-none",e),...r}),t]}),i1={Item:b.forwardRef(function(e,n){return T.jsx("li",{...e,ref:n,className:"flex items-center gap-1 justify-between"})}),List:b.forwardRef(function(e,n){return T.jsx("ul",{...e,ref:n,className:"space-y-3"})})},s1=t=>{const e=b.useRef(null),n=o1(e);return T.jsxs("div",{className:"flex flex-row gap-4",ref:e,children:[T.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:[T.jsx("header",{className:"border-b border-card-border pb-2"}),T.jsxs("div",{className:"px-8 space-y-2",children:[T.jsx(us,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),T.jsx(DC,{height:n,useWindowScroll:!0,data:t.source,components:i1,itemContent:(r,o)=>T.jsx(b.Fragment,{children:T.jsx(im,{children:T.jsx(t.Item,{data:o})})})})]})]}),T.jsx("div",{children:T.jsx(zo,{children:T.jsx(W0,{})})}),T.jsx("div",{})]})},a1=Gl("inline-flex rounded-pill gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{raw:"",main:"bg-primary-subtle text-primary-hover",warn:"bg-warn-subtle text-warn-hover",danger:"bg-danger-subtle text-danger-hover",secondary:"bg-secondary-subtle text-secondary-hover",success:"bg-success-subtle text-success-hover",info:"bg-info-subtle text-info-hover",loading:"animate-pulse bg-disabled duration-700 opacity-70",disabled:"bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"main",size:"default"}}),l1=b.forwardRef(function({className:e,icon:n,loading:r,theme:o,size:i,...s},a){return T.jsxs(Bo,{...s,ref:a,"data-theme":o,as:s.as??"span",className:_t(a1({size:i,theme:o}),e),children:[s.children,n]})}),sm=({children:t,title:e,container:n="",header:r=null,className:o="",...i})=>T.jsxs(Bo,{...i,as:"div",className:_t("rounded-card flex flex-col gap-4 bg-card-background py-4 pb-8 border-card-border border shadow",n),children:[e?T.jsx("header",{className:"w-full px-8 pb-4 mb-2 border-b border-card-border font-medium text-xl",children:e}):r,T.jsx("div",{className:`min-w-full px-8 ${o}`,children:t})]}),c1=t=>T.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[T.jsxs("header",{className:"p-6 items-start flex gap-4",children:[T.jsx("div",{className:_t("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",t.iconContainer),children:T.jsx("div",{children:T.jsx(t.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),T.jsxs("div",{className:"flex flex-col gap-1",children:[T.jsx("header",{children:T.jsx("h3",{className:"text-base leading-none",children:t.title})}),T.jsx("p",{className:"text-4xl font-semibold",children:t.children})]})]}),t.footer?T.jsx("footer",{className:"px-6 py-2",children:t.footer}):null]}),Is=b.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Os=b.createContext({}),ks=b.createContext(null),vc=typeof document<"u",Ds=vc?b.useLayoutEffect:b.useEffect,am=b.createContext({strict:!1}),Ms=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),lm="data-"+Ms("framerAppearId"),u1={skipAnimations:!1,useManualTiming:!1};class cm{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function f1(t){let e=new cm,n=new cm,r=0,o=!1,i=!1;const s=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const f=u&&o,d=f?e:n;return c&&s.add(l),d.add(l)&&f&&o&&(r=e.order.length),l},cancel:l=>{n.remove(l),s.delete(l)},process:l=>{if(o){i=!0;return}if(o=!0,[e,n]=[n,e],n.clear(),r=e.order.length,r)for(let c=0;c<r;c++){const u=e.order[c];s.has(u)&&(a.schedule(u),t()),u(l)}o=!1,i&&(i=!1,a.process(l))}};return a}const Fs=["read","resolveKeyframes","update","preRender","render","postRender"],d1=40;function um(t,e){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Fs.reduce((v,x)=>(v[x]=f1(i),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:f,postRender:d}=s,h=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,d1),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),f.process(o),d.process(o),o.isProcessing=!1,n&&e&&(r=!1,t(h))},p=()=>{n=!0,r=!0,o.isProcessing||t(h)};return{schedule:Fs.reduce((v,x)=>{const y=s[x];return v[x]=(S,w=!1,E=!1)=>(n||p(),y.schedule(S,w,E)),v},{}),cancel:v=>{for(let x=0;x<Fs.length;x++)s[Fs[x]].cancel(v)},state:o,steps:s}}const{schedule:bc,cancel:PD}=um(queueMicrotask,!1);function Xr(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const fm=b.createContext({});let dm=!1;function h1(t,e,n,r,o){const{visualElement:i}=b.useContext(Os),s=b.useContext(am),a=b.useContext(ks),l=b.useContext(Is).reducedMotion,c=b.useRef();r=r||s.renderer,!c.current&&r&&(c.current=r(t,{visualState:e,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=b.useContext(fm);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&m1(c.current,n,o,f),b.useInsertionEffect(()=>{u&&u.update(n,a)});const d=b.useRef(!!(n[lm]&&!window.HandoffComplete));return Ds(()=>{u&&(u.updateFeatures(),bc.render(u.render),d.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!d.current&&u.animationState&&u.animationState.animateChanges(),d.current&&(d.current=!1,dm||(dm=!0,queueMicrotask(p1))))}),u}function p1(){window.HandoffComplete=!0}function m1(t,e,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:hm(t.parent)),t.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&Xr(a),visualElement:t,scheduleRender:()=>t.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function hm(t){if(t)return t.options.allowProjection!==!1?t.projection:hm(t.parent)}function g1(t,e,n){return b.useCallback(r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Xr(n)&&(n.current=r))},[e])}function ei(t){return typeof t=="string"||Array.isArray(t)}function ti(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const xc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wc=["initial",...xc];function Ls(t){return ti(t.animate)||wc.some(e=>ei(t[e]))}function pm(t){return!!(Ls(t)||t.variants)}function y1(t,e){if(Ls(t)){const{initial:n,animate:r}=t;return{initial:n===!1||ei(n)?n:void 0,animate:ei(r)?r:void 0}}return t.inherit!==!1?e:{}}function v1(t){const{initial:e,animate:n}=y1(t,b.useContext(Os));return b.useMemo(()=>({initial:e,animate:n}),[mm(e),mm(n)])}function mm(t){return Array.isArray(t)?t.join(" "):t}const gm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Jr={};for(const t in gm)Jr[t]={isEnabled:e=>gm[t].some(n=>!!e[n])};function b1(t){for(const e in t)Jr[e]={...Jr[e],...t[e]}}const ni=b.createContext({}),x1=Symbol.for("motionComponentSymbol"),ut=t=>t;let Qr=ut,Zt=ut;process.env.NODE_ENV!=="production"&&(Qr=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},Zt=(t,e)=>{if(!t)throw new Error(e)});function w1({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:o}){t&&b1(t);function i(a,l){let c;const u={...b.useContext(Is),...a,layoutId:S1(a)},{isStatic:f}=u,d=v1(a),h=r(a,f);if(!f&&vc){T1(u,t);const p=E1(u);c=p.MeasureLayout,d.visualElement=h1(o,h,u,e,p.ProjectionNode)}return T.jsxs(Os.Provider,{value:d,children:[c&&d.visualElement?T.jsx(c,{visualElement:d.visualElement,...u}):null,n(o,a,g1(h,d.visualElement,l),h,f,d.visualElement)]})}const s=b.forwardRef(i);return s[x1]=o,s}function S1({layoutId:t}){const e=b.useContext(ni).id;return e&&t!==void 0?e+"-"+t:t}function T1(t,e){const n=b.useContext(am).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Qr(!1,r):Zt(!1,r)}}function E1(t){const{drag:e,layout:n}=Jr;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function C1(t){function e(r,o={}){return w1(t(r,o))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(r,o)=>(n.has(o)||n.set(o,e(o)),n.get(o))})}const A1=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Sc(t){return typeof t!="string"||t.includes("-")?!1:!!(A1.indexOf(t)>-1||/[A-Z]/u.test(t))}const Ns={};function _1(t){Object.assign(Ns,t)}const ri=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Hn=new Set(ri);function ym(t,{layout:e,layoutId:n}){return Hn.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ns[t]||t==="opacity")}const ft=t=>!!(t&&t.getVelocity),P1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},I1=ri.length;function O1(t,e,n){let r="";for(let o=0;o<I1;o++){const i=ri[o];if(t[i]!==void 0){const s=P1[i]||i;r+=`${s}(${t[i]}) `}}return r=r.trim(),n?r=n(t,e?"":r):e&&(r="none"),r}const vm=t=>e=>typeof e=="string"&&e.startsWith(t),bm=vm("--"),k1=vm("var(--"),Tc=t=>k1(t)?D1.test(t.split("/*")[0].trim()):!1,D1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,M1=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Wn=(t,e,n)=>n>e?e:n<t?t:n,eo={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},oi={...eo,transform:t=>Wn(0,1,t)},Vs={...eo,default:1},ii=t=>Math.round(t*1e5)/1e5,Ec=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,F1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,L1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function si(t){return typeof t=="string"}function N1(t){return t==null}const ai=t=>({test:e=>si(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Un=ai("deg"),an=ai("%"),ue=ai("px"),V1=ai("vh"),R1=ai("vw"),xm={...an,parse:t=>an.parse(t)/100,transform:t=>an.transform(t*100)},wm={...eo,transform:Math.round},Sm={borderWidth:ue,borderTopWidth:ue,borderRightWidth:ue,borderBottomWidth:ue,borderLeftWidth:ue,borderRadius:ue,radius:ue,borderTopLeftRadius:ue,borderTopRightRadius:ue,borderBottomRightRadius:ue,borderBottomLeftRadius:ue,width:ue,maxWidth:ue,height:ue,maxHeight:ue,size:ue,top:ue,right:ue,bottom:ue,left:ue,padding:ue,paddingTop:ue,paddingRight:ue,paddingBottom:ue,paddingLeft:ue,margin:ue,marginTop:ue,marginRight:ue,marginBottom:ue,marginLeft:ue,rotate:Un,rotateX:Un,rotateY:Un,rotateZ:Un,scale:Vs,scaleX:Vs,scaleY:Vs,scaleZ:Vs,skew:Un,skewX:Un,skewY:Un,distance:ue,translateX:ue,translateY:ue,translateZ:ue,x:ue,y:ue,z:ue,perspective:ue,transformPerspective:ue,opacity:oi,originX:xm,originY:xm,originZ:ue,zIndex:wm,backgroundPositionX:ue,backgroundPositionY:ue,fillOpacity:oi,strokeOpacity:oi,numOctaves:wm};function Cc(t,e,n){const{style:r,vars:o,transform:i,transformOrigin:s}=t;let a=!1,l=!1,c=!0;for(const u in e){const f=e[u];if(bm(u)){o[u]=f;continue}const d=Sm[u],h=M1(f,d);if(Hn.has(u)){if(a=!0,i[u]=h,!c)continue;f!==(d.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,s[u]=h):r[u]=h}if(e.transform||(a||n?r.transform=O1(t.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:d=0}=s;r.transformOrigin=`${u} ${f} ${d}`}}const Ac=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Tm(t,e,n){for(const r in e)!ft(e[r])&&!ym(r,n)&&(t[r]=e[r])}function $1({transformTemplate:t},e){return b.useMemo(()=>{const n=Ac();return Cc(n,e,t),Object.assign({},n.vars,n.style)},[e])}function j1(t,e){const n=t.style||{},r={};return Tm(r,n,t),Object.assign(r,$1(t,e)),r}function B1(t,e){const n={},r=j1(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const z1=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Rs(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||z1.has(t)}let Em=t=>!Rs(t);function H1(t){t&&(Em=e=>e.startsWith("on")?!Rs(e):t(e))}try{H1(require("@emotion/is-prop-valid").default)}catch{}function W1(t,e,n){const r={};for(const o in t)o==="values"&&typeof t.values=="object"||(Em(o)||n===!0&&Rs(o)||!e&&!Rs(o)||t.draggable&&o.startsWith("onDrag"))&&(r[o]=t[o]);return r}function Cm(t,e,n){return typeof t=="string"?t:ue.transform(e+n*t)}function U1(t,e,n){const r=Cm(e,t.x,t.width),o=Cm(n,t.y,t.height);return`${r} ${o}`}const G1={offset:"stroke-dashoffset",array:"stroke-dasharray"},K1={offset:"strokeDashoffset",array:"strokeDasharray"};function q1(t,e,n=1,r=0,o=!0){t.pathLength=1;const i=o?G1:K1;t[i.offset]=ue.transform(-r);const s=ue.transform(e),a=ue.transform(n);t[i.array]=`${s} ${a}`}function _c(t,{attrX:e,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,f){if(Cc(t,c,f),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:p}=t;d.transform&&(p&&(h.transform=d.transform),delete d.transform),p&&(o!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=U1(p,o!==void 0?o:.5,i!==void 0?i:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&q1(d,s,a,l,!1)}const Am=()=>({...Ac(),attrs:{}}),Pc=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Z1(t,e,n,r){const o=b.useMemo(()=>{const i=Am();return _c(i,e,Pc(r),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};Tm(i,t.style,t),o.style={...i,...o.style}}return o}function Y1(t=!1){return(n,r,o,{latestValues:i},s)=>{const l=(Sc(n)?Z1:B1)(r,i,s,n),c=W1(r,typeof n=="string",t),u=n!==b.Fragment?{...c,...l,ref:o}:{},{children:f}=r,d=b.useMemo(()=>ft(f)?f.get():f,[f]);return b.createElement(n,{...u,children:d})}}function _m(t,{style:e,vars:n},r,o){Object.assign(t.style,e,o&&o.getProjectionStyles(r));for(const i in n)t.style.setProperty(i,n[i])}const Pm=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Im(t,e,n,r){_m(t,e,void 0,r);for(const o in e.attrs)t.setAttribute(Pm.has(o)?o:Ms(o),e.attrs[o])}function Ic(t,e,n){var r;const{style:o}=t,i={};for(const s in o)(ft(o[s])||e.style&&ft(e.style[s])||ym(s,t)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),i}function Om(t,e,n){const r=Ic(t,e,n);for(const o in t)if(ft(t[o])||ft(e[o])){const i=ri.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=t[o]}return r}function km(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function Oc(t,e,n,r){if(typeof e=="function"){const[o,i]=km(r);e=e(n!==void 0?n:t.custom,o,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[o,i]=km(r);e=e(n!==void 0?n:t.custom,o,i)}return e}function fr(t){const e=b.useRef(null);return e.current===null&&(e.current=t()),e.current}const kc=t=>Array.isArray(t),X1=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),J1=t=>kc(t)?t[t.length-1]||0:t;function $s(t){const e=ft(t)?t.get():t;return X1(e)?e.toValue():e}const Dm=new Set(["opacity","clipPath","filter","transform"]);function Mm(t){if(Hn.has(t))return"transform";if(Dm.has(t)||t==="backgroundColor")return Ms(t)}function js(t,e){t.indexOf(e)===-1&&t.push(e)}function Bs(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function Q1([...t],e,n){const r=e<0?t.length+e:e;if(r>=0&&r<t.length){const o=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(o,0,i)}return t}function eA({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:n,onMount:r},o,i,s,a){const l={latestValues:tA(o,i,s,a?!1:t,e),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Fm=t=>(e,n)=>{const r=b.useContext(Os),o=b.useContext(ks),i=()=>eA(t,e,r,o,n);return n?i():fr(i)};function Lm(t,e){const n=Mm(e);n&&js(t,n)}function Nm(t,e,n){const r=Array.isArray(e)?e:[e];for(let o=0;o<r.length;o++){const i=Oc(t,r[o]);if(i){const{transitionEnd:s,transition:a,...l}=i;n(l,s)}}}function tA(t,e,n,r,o){var i;const s={},a=[],l=r&&((i=t.style)===null||i===void 0?void 0:i.willChange)===void 0,c=o(t,{});for(const g in c)s[g]=$s(c[g]),l&&Lm(a,g);let{initial:u,animate:f}=t;const d=Ls(t),h=pm(t);e&&h&&!d&&t.inherit!==!1&&(u===void 0&&(u=e.initial),f===void 0&&(f=e.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?f:u;return m&&typeof m!="boolean"&&!ti(m)&&Nm(t,m,(g,v)=>{for(const x in g){let y=g[x];if(Array.isArray(y)){const S=p?y.length-1:0;y=y[S]}y!==null&&(s[x]=y)}for(const x in v)s[x]=v[x]}),l&&(f&&u!==!1&&!ti(f)&&Nm(t,f,g=>{for(const v in g)Lm(a,v)}),a.length&&(s.willChange=a.join(","))),s}const{schedule:Ie,cancel:ln,state:dt,steps:Dc}=um(typeof requestAnimationFrame<"u"?requestAnimationFrame:ut,!0),nA={useVisualState:Fm({scrapeMotionValuesFromProps:Om,createRenderState:Am,onMount:(t,e,{renderState:n,latestValues:r})=>{Ie.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Ie.render(()=>{_c(n,r,Pc(e.tagName),t.transformTemplate),Im(e,n)})}})},rA={useVisualState:Fm({applyWillChange:!0,scrapeMotionValuesFromProps:Ic,createRenderState:Ac})};function oA(t,{forwardMotionProps:e=!1},n,r){return{...Sc(t)?nA:rA,preloadedFeatures:n,useRender:Y1(e),createVisualElement:r,Component:t}}function vn(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const Vm=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function zs(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const iA=t=>e=>Vm(e)&&t(e,zs(e));function bn(t,e,n,r){return vn(t,e,iA(n),r)}const sA=(t,e)=>n=>e(t(n)),xn=(...t)=>t.reduce(sA);function Rm(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const $m=Rm("dragHorizontal"),jm=Rm("dragVertical");function Bm(t){let e=!1;if(t==="y")e=jm();else if(t==="x")e=$m();else{const n=$m(),r=jm();n&&r?e=()=>{n(),r()}:(n&&n(),r&&r())}return e}function zm(){const t=Bm(!0);return t?(t(),!1):!0}class Gn{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Hm(t,e){const n=e?"pointerenter":"pointerleave",r=e?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||zm())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[r];l&&Ie.postRender(()=>l(i,s))};return bn(t.current,n,o,{passive:!t.getProps()[r]})}class aA extends Gn{mount(){this.unmount=xn(Hm(this.node,!0),Hm(this.node,!1))}unmount(){}}class lA extends Gn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=xn(vn(this.node.current,"focus",()=>this.onFocus()),vn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Wm=(t,e)=>e?t===e?!0:Wm(t,e.parentElement):!1;function Mc(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,zs(n))}class cA extends Gn{constructor(){super(...arguments),this.removeStartListeners=ut,this.removeEndListeners=ut,this.removeAccessibleListeners=ut,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=bn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),d=!f&&!Wm(this.node.current,a.target)?u:c;d&&Ie.update(()=>d(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=bn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=xn(i,s),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Mc("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Ie.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=vn(this.node.current,"keyup",s),Mc("down",(a,l)=>{this.startPress(a,l)})},n=vn(this.node.current,"keydown",e),r=()=>{this.isPressing&&Mc("cancel",(i,s)=>this.cancelPress(i,s))},o=vn(this.node.current,"blur",r);this.removeAccessibleListeners=xn(n,o)}}startPress(e,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Ie.postRender(()=>r(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!zm()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Ie.postRender(()=>r(e,n))}mount(){const e=this.node.getProps(),n=bn(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),r=vn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=xn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Fc=new WeakMap,Lc=new WeakMap,uA=t=>{const e=Fc.get(t.target);e&&e(t)},fA=t=>{t.forEach(uA)};function dA({root:t,...e}){const n=t||document;Lc.has(n)||Lc.set(n,{});const r=Lc.get(n),o=JSON.stringify(e);return r[o]||(r[o]=new IntersectionObserver(fA,{root:t,...e})),r[o]}function hA(t,e,n){const r=dA(e);return Fc.set(t,n),r.observe(t),()=>{Fc.delete(t),r.unobserve(t)}}const pA={some:0,all:1};class mA extends Gn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:pA[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return hA(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(gA(e,n))&&this.startObserver()}unmount(){}}function gA({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const yA={inView:{Feature:mA},tap:{Feature:cA},focus:{Feature:lA},hover:{Feature:aA}};function Um(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Hs(t,e,n){const r=t.getProps();return Oc(r,e,n!==void 0?n:r.custom,t)}const wn=t=>t*1e3,Sn=t=>t/1e3,vA={type:"spring",stiffness:500,damping:25,restSpeed:10},bA=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),xA={type:"keyframes",duration:.8},wA={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},SA=(t,{keyframes:e})=>e.length>2?xA:Hn.has(t)?t.startsWith("scale")?bA(e[1]):vA:wA;function TA({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Nc(t,e){return t[e]||t.default||t}const EA=t=>t!==null;function Ws(t,{repeat:e,repeatType:n="loop"},r){const o=t.filter(EA),i=e&&n!=="loop"&&e%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let Us;function CA(){Us=void 0}const Kn={now:()=>(Us===void 0&&Kn.set(dt.isProcessing||u1.useManualTiming?dt.timestamp:performance.now()),Us),set:t=>{Us=t,queueMicrotask(CA)}},Gm=t=>/^0[^.\s]+$/u.test(t);function AA(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Gm(t):!0}const Km=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),_A=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function PA(t){const e=_A.exec(t);if(!e)return[,];const[,n,r,o]=e;return[`--${n??r}`,o]}const IA=4;function qm(t,e,n=1){Zt(n<=IA,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[r,o]=PA(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const s=i.trim();return Km(s)?parseFloat(s):s}return Tc(o)?qm(o,e,n+1):o}const OA=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Zm=t=>t===eo||t===ue,Ym=(t,e)=>parseFloat(t.split(", ")[e]),Xm=(t,e)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Ym(o[1],e);{const i=r.match(/^matrix\((.+)\)$/u);return i?Ym(i[1],t):0}},kA=new Set(["x","y","z"]),DA=ri.filter(t=>!kA.has(t));function MA(t){const e=[];return DA.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const to={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Xm(4,13),y:Xm(5,14)};to.translateX=to.x,to.translateY=to.y;const Jm=t=>e=>e.test(t),Qm=[eo,ue,an,Un,R1,V1,{test:t=>t==="auto",parse:t=>t}],eg=t=>Qm.find(Jm(t)),dr=new Set;let Vc=!1,Rc=!1;function tg(){if(Rc){const t=Array.from(dr).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const o=MA(r);o.length&&(n.set(r,o),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Rc=!1,Vc=!1,dr.forEach(t=>t.complete()),dr.clear()}function ng(){dr.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Rc=!0)})}function FA(){ng(),tg()}class $c{constructor(e,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(dr.add(this),Vc||(Vc=!0,Ie.read(ng),Ie.resolveKeyframes(tg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:o}=this;for(let i=0;i<e.length;i++)if(e[i]===null)if(i===0){const s=o==null?void 0:o.get(),a=e[e.length-1];if(s!==void 0)e[0]=s;else if(r&&n){const l=r.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),o&&s===void 0&&o.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),dr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,dr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const jc=(t,e)=>n=>!!(si(n)&&L1.test(n)&&n.startsWith(t)||e&&!N1(n)&&Object.prototype.hasOwnProperty.call(n,e)),rg=(t,e,n)=>r=>{if(!si(r))return r;const[o,i,s,a]=r.match(Ec);return{[t]:parseFloat(o),[e]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},LA=t=>Wn(0,255,t),Bc={...eo,transform:t=>Math.round(LA(t))},hr={test:jc("rgb","red"),parse:rg("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Bc.transform(t)+", "+Bc.transform(e)+", "+Bc.transform(n)+", "+ii(oi.transform(r))+")"};function NA(t){let e="",n="",r="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const zc={test:jc("#"),parse:NA,transform:hr.transform},no={test:jc("hsl","hue"),parse:rg("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+an.transform(ii(e))+", "+an.transform(ii(n))+", "+ii(oi.transform(r))+")"},bt={test:t=>hr.test(t)||zc.test(t)||no.test(t),parse:t=>hr.test(t)?hr.parse(t):no.test(t)?no.parse(t):zc.parse(t),transform:t=>si(t)?t:t.hasOwnProperty("red")?hr.transform(t):no.transform(t)};function VA(t){var e,n;return isNaN(t)&&si(t)&&(((e=t.match(Ec))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(F1))===null||n===void 0?void 0:n.length)||0)>0}const og="number",ig="color",RA="var",$A="var(",sg="${}",jA=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function li(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=e.replace(jA,l=>(bt.test(l)?(r.color.push(i),o.push(ig),n.push(bt.parse(l))):l.startsWith($A)?(r.var.push(i),o.push(RA),n.push(l)):(r.number.push(i),o.push(og),n.push(parseFloat(l))),++i,sg)).split(sg);return{values:n,split:a,indexes:r,types:o}}function ag(t){return li(t).values}function lg(t){const{split:e,types:n}=li(t),r=e.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=e[s],o[s]!==void 0){const a=n[s];a===og?i+=ii(o[s]):a===ig?i+=bt.transform(o[s]):i+=o[s]}return i}}const BA=t=>typeof t=="number"?0:t;function zA(t){const e=ag(t);return lg(t)(e.map(BA))}const qn={test:VA,parse:ag,createTransformer:lg,getAnimatableNone:zA},HA=new Set(["brightness","contrast","saturate","opacity"]);function WA(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(Ec)||[];if(!r)return t;const o=n.replace(r,"");let i=HA.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+o+")"}const UA=/\b([a-z-]*)\(.*?\)/gu,Hc={...qn,getAnimatableNone:t=>{const e=t.match(UA);return e?e.map(WA).join(" "):t}},GA={...Sm,color:bt,backgroundColor:bt,outlineColor:bt,fill:bt,stroke:bt,borderColor:bt,borderTopColor:bt,borderRightColor:bt,borderBottomColor:bt,borderLeftColor:bt,filter:Hc,WebkitFilter:Hc},Wc=t=>GA[t];function cg(t,e){let n=Wc(t);return n!==Hc&&(n=qn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const KA=new Set(["auto","none","0"]);function qA(t,e,n){let r=0,o;for(;r<t.length&&!o;){const i=t[r];typeof i=="string"&&!KA.has(i)&&li(i).values.length&&(o=t[r]),r++}if(o&&n)for(const i of e)t[i]=cg(n,o)}class ug extends $c{constructor(e,n,r,o){super(e,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),Tc(c))){const u=qm(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!OA.has(r)||e.length!==2)return;const[o,i]=e,s=eg(o),a=eg(i);if(s!==a)if(Zm(s)&&Zm(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let o=0;o<e.length;o++)AA(e[o])&&r.push(o);r.length&&qA(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=to[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&e.getValue(r,o).jump(o,!1)}measureEndState(){var e;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=to[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function fg(t){let e;return()=>(e===void 0&&(e=t()),e)}const dg=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(qn.test(t)||t==="0")&&!t.startsWith("url("));function ZA(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function YA(t,e,n,r){const o=t[0];if(o===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],s=dg(o,e),a=dg(i,e);return Qr(s===a,`You are trying to animate ${e} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!s||!a?!1:ZA(t)||n==="spring"&&r}class hg{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&FA(),this._resolved}onKeyframesResolved(e,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!YA(e,r,o,i))if(s)this.options.duration=0;else{l==null||l(Ws(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function pg(t,e){return e?t*(1e3/e):0}const XA=5;function mg(t,e,n){const r=Math.max(e-XA,0);return pg(n-t(r),e-r)}const Uc=.001,JA=.01,gg=10,QA=.05,e_=1;function t_({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,i;Qr(t<=wn(gg),"Spring duration must be 10 seconds or less");let s=1-e;s=Wn(QA,e_,s),t=Wn(JA,gg,Sn(t)),s<1?(o=c=>{const u=c*s,f=u*t,d=u-n,h=Gc(c,s),p=Math.exp(-f);return Uc-d/h*p},i=c=>{const f=c*s*t,d=f*n+n,h=Math.pow(s,2)*Math.pow(c,2)*t,p=Math.exp(-f),m=Gc(Math.pow(c,2),s);return(-o(c)+Uc>0?-1:1)*((d-h)*p)/m}):(o=c=>{const u=Math.exp(-c*t),f=(c-n)*t+1;return-Uc+u*f},i=c=>{const u=Math.exp(-c*t),f=(n-c)*(t*t);return u*f});const a=5/t,l=r_(o,i,a);if(t=wn(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:t}}}const n_=12;function r_(t,e,n){let r=n;for(let o=1;o<n_;o++)r=r-t(r)/e(r);return r}function Gc(t,e){return t*Math.sqrt(1-e*e)}const o_=["duration","bounce"],i_=["stiffness","damping","mass"];function yg(t,e){return e.some(n=>t[n]!==void 0)}function s_(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!yg(t,i_)&&yg(t,o_)){const n=t_(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function vg({keyframes:t,restDelta:e,restSpeed:n,...r}){const o=t[0],i=t[t.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:d}=s_({...r,velocity:-Sn(r.velocity||0)}),h=f||0,p=l/(2*Math.sqrt(a*c)),m=i-o,g=Sn(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),e||(e=v?.005:.5);let x;if(p<1){const y=Gc(g,p);x=S=>{const w=Math.exp(-p*g*S);return i-w*((h+p*g*m)/y*Math.sin(y*S)+m*Math.cos(y*S))}}else if(p===1)x=y=>i-Math.exp(-g*y)*(m+(h+g*m)*y);else{const y=g*Math.sqrt(p*p-1);x=S=>{const w=Math.exp(-p*g*S),E=Math.min(y*S,300);return i-w*((h+p*g*m)*Math.sinh(E)+y*m*Math.cosh(E))/y}}return{calculatedDuration:d&&u||null,next:y=>{const S=x(y);if(d)s.done=y>=u;else{let w=h;y!==0&&(p<1?w=mg(x,y,S):w=0);const E=Math.abs(w)<=n,_=Math.abs(i-S)<=e;s.done=E&&_}return s.value=s.done?i:S,s}}}function bg({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=t[0],d={done:!1,value:f},h=I=>a!==void 0&&I<a||l!==void 0&&I>l,p=I=>a===void 0?l:l===void 0||Math.abs(a-I)<Math.abs(l-I)?a:l;let m=n*e;const g=f+m,v=s===void 0?g:s(g);v!==g&&(m=v-f);const x=I=>-m*Math.exp(-I/r),y=I=>v+x(I),S=I=>{const D=x(I),F=y(I);d.done=Math.abs(D)<=c,d.value=d.done?v:F};let w,E;const _=I=>{h(d.value)&&(w=I,E=vg({keyframes:[d.value,p(d.value)],velocity:mg(y,I,d.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return _(0),{calculatedDuration:null,next:I=>{let D=!1;return!E&&w===void 0&&(D=!0,S(I),_(I)),w!==void 0&&I>=w?E.next(I-w):(!D&&S(I),d)}}}const xg=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,a_=1e-7,l_=12;function c_(t,e,n,r,o){let i,s,a=0;do s=e+(n-e)/2,i=xg(s,r,o)-t,i>0?n=s:e=s;while(Math.abs(i)>a_&&++a<l_);return s}function ci(t,e,n,r){if(t===e&&n===r)return ut;const o=i=>c_(i,0,1,t,n);return i=>i===0||i===1?i:xg(o(i),e,r)}const u_=ci(.42,0,1,1),f_=ci(0,0,.58,1),wg=ci(.42,0,.58,1),d_=t=>Array.isArray(t)&&typeof t[0]!="number",Sg=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Tg=t=>e=>1-t(1-e),Kc=t=>1-Math.sin(Math.acos(t)),Eg=Tg(Kc),h_=Sg(Kc),Cg=ci(.33,1.53,.69,.99),qc=Tg(Cg),p_=Sg(qc),Ag={linear:ut,easeIn:u_,easeInOut:wg,easeOut:f_,circIn:Kc,circInOut:h_,circOut:Eg,backIn:qc,backInOut:p_,backOut:Cg,anticipate:t=>(t*=2)<1?.5*qc(t):.5*(2-Math.pow(2,-10*(t-1)))},_g=t=>{if(Array.isArray(t)){Zt(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,r,o]=t;return ci(e,n,r,o)}else if(typeof t=="string")return Zt(Ag[t]!==void 0,`Invalid easing type '${t}'`),Ag[t];return t},ui=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},We=(t,e,n)=>t+(e-t)*n;function Zc(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function m_({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let o=0,i=0,s=0;if(!e)o=i=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;o=Zc(l,a,t+1/3),i=Zc(l,a,t),s=Zc(l,a,t-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function Gs(t,e){return n=>n>0?e:t}const Yc=(t,e,n)=>{const r=t*t,o=n*(e*e-r)+r;return o<0?0:Math.sqrt(o)},g_=[zc,hr,no],y_=t=>g_.find(e=>e.test(t));function Pg(t){const e=y_(t);if(Qr(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let n=e.parse(t);return e===no&&(n=m_(n)),n}const Ig=(t,e)=>{const n=Pg(t),r=Pg(e);if(!n||!r)return Gs(t,e);const o={...n};return i=>(o.red=Yc(n.red,r.red,i),o.green=Yc(n.green,r.green,i),o.blue=Yc(n.blue,r.blue,i),o.alpha=We(n.alpha,r.alpha,i),hr.transform(o))},Xc=new Set(["none","hidden"]);function v_(t,e){return Xc.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function b_(t,e){return n=>We(t,e,n)}function Jc(t){return typeof t=="number"?b_:typeof t=="string"?Tc(t)?Gs:bt.test(t)?Ig:S_:Array.isArray(t)?Og:typeof t=="object"?bt.test(t)?Ig:x_:Gs}function Og(t,e){const n=[...t],r=n.length,o=t.map((i,s)=>Jc(i)(i,e[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function x_(t,e){const n={...t,...e},r={};for(const o in n)t[o]!==void 0&&e[o]!==void 0&&(r[o]=Jc(t[o])(t[o],e[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function w_(t,e){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const s=e.types[i],a=t.indexes[s][o[s]],l=(n=t.values[a])!==null&&n!==void 0?n:0;r[i]=l,o[s]++}return r}const S_=(t,e)=>{const n=qn.createTransformer(e),r=li(t),o=li(e);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Xc.has(t)&&!o.values.length||Xc.has(e)&&!r.values.length?v_(t,e):xn(Og(w_(r,o),o.values),n):(Qr(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Gs(t,e))};function kg(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?We(t,e,n):Jc(t)(t,e)}function T_(t,e,n){const r=[],o=n||kg,i=t.length-1;for(let s=0;s<i;s++){let a=o(t[s],t[s+1]);if(e){const l=Array.isArray(e)?e[s]||ut:e;a=xn(l,a)}r.push(a)}return r}function Dg(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const i=t.length;if(Zt(i===e.length,"Both input and output ranges must be the same length"),i===1)return()=>e[0];if(i===2&&t[0]===t[1])return()=>e[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=T_(e,r,o),a=s.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const f=ui(t[u],t[u+1],c);return s[u](f)};return n?c=>l(Wn(t[0],t[i-1],c)):l}function E_(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const o=ui(0,e,r);t.push(We(n,1,o))}}function C_(t){const e=[0];return E_(e,t.length-1),e}function A_(t,e){return t.map(n=>n*e)}function __(t,e){return t.map(()=>e||wg).splice(0,t.length-1)}function Ks({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const o=d_(r)?r.map(_g):_g(r),i={done:!1,value:e[0]},s=A_(n&&n.length===e.length?n:C_(e),t),a=Dg(s,e,{ease:Array.isArray(o)?o:__(e,o)});return{calculatedDuration:t,next:l=>(i.value=a(l),i.done=l>=t,i)}}const Mg=2e4;function P_(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<Mg;)e+=n,r=t.next(e);return e>=Mg?1/0:e}const I_=t=>{const e=({timestamp:n})=>t(n);return{start:()=>Ie.update(e,!0),stop:()=>ln(e),now:()=>dt.isProcessing?dt.timestamp:Kn.now()}},O_={decay:bg,inertia:bg,tween:Ks,keyframes:Ks,spring:vg},k_=t=>t/100;class Qc extends hg{constructor({KeyframeResolver:e=$c,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:i}=this.options,s=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(i,s,r,o):this.resolver=new e(i,s,r,o),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=O_[n]||Ks;let l,c;a!==Ks&&typeof e[0]!="number"&&(process.env.NODE_ENV!=="production"&&Zt(e.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),l=xn(k_,kg(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});i==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=P_(u));const{calculatedDuration:f}=u,d=f+o,h=d*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:r}=this;if(!r){const{keyframes:I}=this.options;return{done:!0,value:I[I.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:m,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-d*(this.speed>=0?1:-1),x=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let y=this.currentTime,S=i;if(h){const I=Math.min(this.currentTime,u)/f;let D=Math.floor(I),F=I%1;!F&&I>=1&&(F=1),F===1&&D--,D=Math.min(D,h+1),!!(D%2)&&(p==="reverse"?(F=1-F,m&&(F-=m/f)):p==="mirror"&&(S=s)),y=Wn(0,1,F)*f}const w=x?{done:!1,value:l[0]}:S.next(y);a&&(w.value=a(w.value));let{done:E}=w;!x&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const _=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return _&&o!==void 0&&(w.value=Ws(l,this.options,o)),g&&g(w.value),_&&this.finish(),w}get duration(){const{resolved:e}=this;return e?Sn(e.calculatedDuration):0}get time(){return Sn(this.currentTime)}set time(e){e=wn(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Sn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=I_,onPlay:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Fg=t=>Array.isArray(t)&&typeof t[0]=="number";function Lg(t){return!!(!t||typeof t=="string"&&t in eu||Fg(t)||Array.isArray(t)&&t.every(Lg))}const fi=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,eu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:fi([0,.65,.55,1]),circOut:fi([.55,0,1,.45]),backIn:fi([.31,.01,.66,-.59]),backOut:fi([.33,1.53,.69,.99])};function D_(t){return Ng(t)||eu.easeOut}function Ng(t){if(t)return Fg(t)?fi(t):Array.isArray(t)?t.map(D_):eu[t]}function M_(t,e,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=Ng(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const F_=fg(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),qs=10,L_=2e4;function N_(t){return t.type==="spring"||t.name==="backgroundColor"||!Lg(t.ease)}function V_(t,e){const n=new Qc({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:t[0]};const o=[];let i=0;for(;!r.done&&i<L_;)r=n.sample(i),o.push(r.value),i+=qs;return{times:void 0,keyframes:o,duration:i-qs,ease:"linear"}}class Vg extends hg{constructor(e){super(e);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new ug(o,(i,s)=>this.onKeyframesResolved(i,s),n,r),this.resolver.scheduleResolve()}initPlayback(e,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(N_(this.options)){const{onComplete:f,onUpdate:d,motionValue:h,...p}=this.options,m=V_(e,p);e=m.keyframes,e.length===1&&(e[1]=e[0]),o=m.duration,i=m.times,s=m.ease,a="keyframes"}const u=M_(l.owner.current,c,e,{...this.options,duration:o,times:i,ease:s});return u.startTime=Kn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(Ws(e,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:i,type:a,ease:s,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return Sn(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return Sn(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=wn(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return ut;const{animation:r}=n;r.timeline=e,r.onfinish=null}return ut}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:r,duration:o,type:i,ease:s,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:f,...d}=this.options,h=new Qc({...d,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),p=wn(this.time);c.setWithVelocity(h.sample(p-qs).value,h.sample(p).value,qs)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=e;return F_()&&r&&Dm.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function R_(t,e){let n;const r=()=>{const{currentTime:o}=e,s=(o===null?0:o.value)/100;n!==s&&t(s),n=s};return Ie.update(r,!0),()=>ln(r)}const $_=fg(()=>window.ScrollTimeline!==void 0);class j_{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let r=0;r<this.animations.length;r++)this.animations[r][e]=n}attachTimeline(e){const n=this.animations.map(r=>{if($_()&&r.attachTimeline)r.attachTimeline(e);else return r.pause(),R_(o=>{r.time=r.duration*o},e)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const tu=(t,e,n,r={},o,i,s)=>a=>{const l=Nc(r,t)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-wn(c);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:h=>{e.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:t,motionValue:e,element:i?void 0:o};TA(l)||(f={...f,...SA(t,f)}),f.duration&&(f.duration=wn(f.duration)),f.repeatDelay&&(f.repeatDelay=wn(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!i&&e.get()!==void 0){const h=Ws(f.keyframes,l);if(h!==void 0)return Ie.update(()=>{f.onUpdate(h),f.onComplete()}),new j_([])}return!i&&Vg.supports(f)?new Vg(f):new Qc(f)};class nu{constructor(){this.subscriptions=[]}add(e){return js(this.subscriptions,e),()=>Bs(this.subscriptions,e)}notify(e,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Rg=new Set;function ru(t,e,n){t||Rg.has(e)||(console.warn(e),Rg.add(e))}const $g=30,B_=t=>!isNaN(parseFloat(t)),di={current:void 0};class jg{constructor(e,n={}){this.version="11.3.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Kn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Kn.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=B_(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&ru(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new nu);const r=this.events[e].add(n);return e==="change"?()=>{r(),Ie.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return di.current&&di.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Kn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>$g)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,$g);return pg(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ro(t,e){return new jg(t,e)}function z_(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ro(n))}function H_(t,e){const n=Hs(t,e);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=J1(i[s]);z_(t,s,a)}}function Bg(t){return t.getProps()[lm]}class W_ extends jg{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(e){const n=Mm(e);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const i=this.counts.get(n)-1;this.counts.set(n,i),i===0&&(Bs(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function U_(t){return!!(ft(t)&&t.add)}function ou(t,e){var n;if(!t.applyWillChange)return;let r=t.getValue("willChange");if(!r&&!(!((n=t.props.style)===null||n===void 0)&&n.willChange)&&(r=new W_("auto"),t.addValue("willChange",r)),U_(r))return r.add(e)}function G_({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function zg(t,e,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=e;r&&(s=r);const c=[],u=o&&t.animationState&&t.animationState.getState()[o];for(const f in l){const d=t.getValue(f,(i=t.latestValues[f])!==null&&i!==void 0?i:null),h=l[f];if(h===void 0||u&&G_(u,f))continue;const p={delay:n,elapsed:0,...Nc(s||{},f)};let m=!1;if(window.HandoffAppearAnimations){const v=Bg(t);if(v){const x=window.HandoffAppearAnimations(v,f,d,Ie);x!==null&&(p.elapsed=x,m=!0)}}d.start(tu(f,d,h,t.shouldReduceMotion&&Hn.has(f)?{type:!1}:p,t,m,ou(t,f)));const g=d.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{Ie.update(()=>{a&&H_(t,a)})}),c}function iu(t,e,n={}){var r;const o=Hs(t,e,n.type==="exit"?(r=t.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(zg(t,o,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=i;return K_(t,e,u+c,f,d,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function K_(t,e,n=0,r=0,o=1,i){const s=[],a=(t.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(t.variantChildren).sort(q_).forEach((c,u)=>{c.notify("AnimationStart",e),s.push(iu(c,e,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(s)}function q_(t,e){return t.sortNodePosition(e)}function Z_(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const o=e.map(i=>iu(t,i,n));r=Promise.all(o)}else if(typeof e=="string")r=iu(t,e,n);else{const o=typeof e=="function"?Hs(t,e,n.custom):e;r=Promise.all(zg(t,o,n))}return r.then(()=>{Ie.postRender(()=>{t.notify("AnimationComplete",e)})})}const Y_=[...xc].reverse(),X_=xc.length;function J_(t){return e=>Promise.all(e.map(({animation:n,options:r})=>Z_(t,n,r)))}function Q_(t){let e=J_(t),n=Hg(),r=!0;const o=l=>(c,u)=>{var f;const d=Hs(t,u,l==="exit"?(f=t.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:p,...m}=d;c={...c,...m,...p}}return c};function i(l){e=l(t)}function s(l){const c=t.getProps(),u=t.getVariantContext(!0)||{},f=[],d=new Set;let h={},p=1/0;for(let g=0;g<X_;g++){const v=Y_[g],x=n[v],y=c[v]!==void 0?c[v]:u[v],S=ei(y),w=v===l?x.isActive:null;w===!1&&(p=g);let E=y===u[v]&&y!==c[v]&&S;if(E&&r&&t.manuallyAnimateOnMount&&(E=!1),x.protectedKeys={...h},!x.isActive&&w===null||!y&&!x.prevProp||ti(y)||typeof y=="boolean")continue;let I=eP(x.prevProp,y)||v===l&&x.isActive&&!E&&S||g>p&&S,D=!1;const F=Array.isArray(y)?y:[y];let N=F.reduce(o(v),{});w===!1&&(N={});const{prevResolvedValues:P={}}=x,$={...P,...N},O=A=>{I=!0,d.has(A)&&(D=!0,d.delete(A)),x.needsAnimating[A]=!0;const L=t.getValue(A);L&&(L.liveStyle=!1)};for(const A in $){const L=N[A],V=P[A];if(h.hasOwnProperty(A))continue;let z=!1;kc(L)&&kc(V)?z=!Um(L,V):z=L!==V,z?L!=null?O(A):d.add(A):L!==void 0&&d.has(A)?O(A):x.protectedKeys[A]=!0}x.prevProp=y,x.prevResolvedValues=N,x.isActive&&(h={...h,...N}),r&&t.blockInitialAnimation&&(I=!1),I&&(!E||D)&&f.push(...F.map(A=>({animation:A,options:{type:v}})))}if(d.size){const g={};d.forEach(v=>{const x=t.getBaseTarget(v),y=t.getValue(v);y&&(y.liveStyle=!0),g[v]=x??null}),f.push({animation:g})}let m=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(m=!1),r=!1,m?e(f):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(d=>{var h;return(h=d.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const f=s(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Hg(),r=!0}}}function eP(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Um(e,t):!1}function pr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Hg(){return{animate:pr(!0),whileInView:pr(),whileHover:pr(),whileTap:pr(),whileDrag:pr(),whileFocus:pr(),exit:pr()}}class tP extends Gn{constructor(e){super(e),e.animationState||(e.animationState=Q_(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ti(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let nP=0;class rP extends Gn{constructor(){super(...arguments),this.id=nP++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const o=this.node.animationState.setActive("exit",!e);n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const oP={animation:{Feature:tP},exit:{Feature:rP}},Wg=(t,e)=>Math.abs(t-e);function iP(t,e){const n=Wg(t.x,e.x),r=Wg(t.y,e.y);return Math.sqrt(n**2+r**2)}class Ug{constructor(e,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=au(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=iP(f.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=f,{timestamp:m}=dt;this.history.push({...p,timestamp:m});const{onStart:g,onMove:v}=this.handlers;d||(g&&g(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=su(d,this.transformPagePoint),Ie.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=au(f.type==="pointercancel"?this.lastMoveEventInfo:su(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,g),p&&p(f,g)},!Vm(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=zs(e),a=su(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=dt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,au(a,this.history)),this.removeListeners=xn(bn(this.contextWindow,"pointermove",this.handlePointerMove),bn(this.contextWindow,"pointerup",this.handlePointerUp),bn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ln(this.updatePoint)}}function su(t,e){return e?{point:e(t.point)}:t}function Gg(t,e){return{x:t.x-e.x,y:t.y-e.y}}function au({point:t},e){return{point:t,delta:Gg(t,Kg(e)),offset:Gg(t,sP(e)),velocity:aP(e,.1)}}function sP(t){return t[0]}function Kg(t){return t[t.length-1]}function aP(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const o=Kg(t);for(;n>=0&&(r=t[n],!(o.timestamp-r.timestamp>wn(e)));)n--;if(!r)return{x:0,y:0};const i=Sn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function $t(t){return t.max-t.min}function lu(t,e=0,n=.01){return Math.abs(t-e)<=n}function qg(t,e,n,r=.5){t.origin=r,t.originPoint=We(e.min,e.max,t.origin),t.scale=$t(n)/$t(e),(lu(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=We(n.min,n.max,t.origin)-t.originPoint,(lu(t.translate)||isNaN(t.translate))&&(t.translate=0)}function hi(t,e,n,r){qg(t.x,e.x,n.x,r?r.originX:void 0),qg(t.y,e.y,n.y,r?r.originY:void 0)}function Zg(t,e,n){t.min=n.min+e.min,t.max=t.min+$t(e)}function lP(t,e,n){Zg(t.x,e.x,n.x),Zg(t.y,e.y,n.y)}function Yg(t,e,n){t.min=e.min-n.min,t.max=t.min+$t(e)}function pi(t,e,n){Yg(t.x,e.x,n.x),Yg(t.y,e.y,n.y)}function cP(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?We(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?We(n,t,r.max):Math.min(t,n)),t}function Xg(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function uP(t,{top:e,left:n,bottom:r,right:o}){return{x:Xg(t.x,n,o),y:Xg(t.y,e,r)}}function Jg(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function fP(t,e){return{x:Jg(t.x,e.x),y:Jg(t.y,e.y)}}function dP(t,e){let n=.5;const r=$t(t),o=$t(e);return o>r?n=ui(e.min,e.max-r,t.min):r>o&&(n=ui(t.min,t.max-o,e.min)),Wn(0,1,n)}function hP(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const cu=.35;function pP(t=cu){return t===!1?t=0:t===!0&&(t=cu),{x:Qg(t,"left","right"),y:Qg(t,"top","bottom")}}function Qg(t,e,n){return{min:ey(t,e),max:ey(t,n)}}function ey(t,e){return typeof t=="number"?t:t[e]||0}const ty=()=>({translate:0,scale:1,origin:0,originPoint:0}),oo=()=>({x:ty(),y:ty()}),ny=()=>({min:0,max:0}),Xe=()=>({x:ny(),y:ny()});function Bt(t){return[t("x"),t("y")]}function ry({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function mP({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function gP(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function uu(t){return t===void 0||t===1}function fu({scale:t,scaleX:e,scaleY:n}){return!uu(t)||!uu(e)||!uu(n)}function mr(t){return fu(t)||oy(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function oy(t){return iy(t.x)||iy(t.y)}function iy(t){return t&&t!=="0%"}function Zs(t,e,n){const r=t-n,o=e*r;return n+o}function sy(t,e,n,r,o){return o!==void 0&&(t=Zs(t,o,r)),Zs(t,n,r)+e}function du(t,e=0,n=1,r,o){t.min=sy(t.min,e,n,r,o),t.max=sy(t.max,e,n,r,o)}function ay(t,{x:e,y:n}){du(t.x,e.translate,e.scale,e.originPoint),du(t.y,n.translate,n.scale,n.originPoint)}function yP(t,e,n,r=!1){const o=n.length;if(!o)return;e.x=e.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const l=i.instance;l&&l.style&&l.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&io(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,ay(t,s)),r&&mr(i.latestValues)&&io(t,i.latestValues))}e.x=ly(e.x),e.y=ly(e.y)}function ly(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Zn(t,e){t.min=t.min+e,t.max=t.max+e}function cy(t,e,[n,r,o]){const i=e[o]!==void 0?e[o]:.5,s=We(t.min,t.max,i);du(t,e[n],e[r],s,e.scale)}const vP=["x","scaleX","originX"],bP=["y","scaleY","originY"];function io(t,e){cy(t.x,e,vP),cy(t.y,e,bP)}function uy(t,e){return ry(gP(t.getBoundingClientRect(),e))}function xP(t,e,n){const r=uy(t,n),{scroll:o}=e;return o&&(Zn(r.x,o.offset.x),Zn(r.y,o.offset.y)),r}const fy=({current:t})=>t?t.ownerDocument.defaultView:null,wP=new WeakMap;class SP{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Xe(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(zs(u,"page").point)},i=(u,f)=>{var d;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Bm(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Bt(v=>{let x=this.getAxisMotionValue(v).get()||0;if(an.test(x)){const{projection:y}=this.visualElement;if(y&&y.layout){const S=y.layout.layoutBox[v];S&&(x=$t(S)*(parseFloat(x)/100))}}this.originPoint[v]=x}),m&&Ie.postRender(()=>m(u,f)),(d=this.removeWillChange)===null||d===void 0||d.call(this),this.removeWillChange=ou(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(u,f)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:g}=f;if(h&&this.currentDirection===null){this.currentDirection=TP(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),m&&m(u,f)},a=(u,f)=>this.stop(u,f),l=()=>Bt(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ug(e,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:fy(this.visualElement)})}stop(e,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Ie.postRender(()=>s(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:o}=this.getProps();if(!r||!Ys(e,o,this.currentDirection))return;const i=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=cP(s,this.constraints[e],this.elastic[e])),i.set(s)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,i=this.constraints;n&&Xr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=uP(o.layoutBox,n):this.constraints=!1,this.elastic=pP(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Bt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=hP(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Xr(e))return!1;const r=e.current;Zt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=xP(r,o.root,this.visualElement.getTransformPagePoint());let s=fP(o.layout.layoutBox,i);if(n){const a=n(mP(s));this.hasMutatedConstraints=!!a,a&&(s=ry(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Bt(u=>{if(!Ys(u,n,this.currentDirection))return;let f=l&&l[u]||{};s&&(f={min:0,max:0});const d=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?e[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return r.start(tu(e,r,0,n,this.visualElement,!1,ou(this.visualElement,e)))}stopAnimation(){Bt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Bt(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){Bt(n=>{const{drag:r}=this.getProps();if(!Ys(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(e[n]-We(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Xr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Bt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=dP({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Bt(s=>{if(!Ys(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(We(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;wP.set(this.visualElement,this);const e=this.visualElement.current,n=bn(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Xr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ie.read(r);const s=vn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Bt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=cu,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Ys(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function TP(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class EP extends Gn{constructor(e){super(e),this.removeGroupControls=ut,this.removeListeners=ut,this.controls=new SP(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const dy=t=>(e,n)=>{t&&Ie.postRender(()=>t(e,n))};class CP extends Gn{constructor(){super(...arguments),this.removePointerDownListener=ut}onPointerDown(e){this.session=new Ug(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:fy(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:dy(e),onStart:dy(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&Ie.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=bn(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function AP(){const t=b.useContext(ks);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,o=b.useId();return b.useEffect(()=>r(o),[]),!e&&n?[!1,()=>n&&n(o)]:[!0]}const Xs={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function hy(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const mi={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ue.test(t))t=parseFloat(t);else return t;const n=hy(t,e.target.x),r=hy(t,e.target.y);return`${n}% ${r}%`}},_P={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,o=qn.parse(t);if(o.length>5)return r;const i=qn.createTransformer(t),s=typeof o[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;o[0+s]/=a,o[1+s]/=l;const c=We(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}};class PP extends b.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=e;_1(IP),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Xs.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||e.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?s.promote():s.relegate()||Ie.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),bc.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=e;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function py(t){const[e,n]=AP(),r=b.useContext(ni);return T.jsx(PP,{...t,layoutGroup:r,switchLayoutGroup:b.useContext(fm),isPresent:e,safeToRemove:n})}const IP={borderRadius:{...mi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mi,borderTopRightRadius:mi,borderBottomLeftRadius:mi,borderBottomRightRadius:mi,boxShadow:_P},my=["TopLeft","TopRight","BottomLeft","BottomRight"],OP=my.length,gy=t=>typeof t=="string"?parseFloat(t):t,yy=t=>typeof t=="number"||ue.test(t);function kP(t,e,n,r,o,i){o?(t.opacity=We(0,n.opacity!==void 0?n.opacity:1,DP(r)),t.opacityExit=We(e.opacity!==void 0?e.opacity:1,0,MP(r))):i&&(t.opacity=We(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<OP;s++){const a=`border${my[s]}Radius`;let l=vy(e,a),c=vy(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||yy(l)===yy(c)?(t[a]=Math.max(We(gy(l),gy(c),r),0),(an.test(c)||an.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=We(e.rotate||0,n.rotate||0,r))}function vy(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const DP=by(0,.5,Eg),MP=by(.5,.95,ut);function by(t,e,n){return r=>r<t?0:r>e?1:n(ui(t,e,r))}function xy(t,e){t.min=e.min,t.max=e.max}function zt(t,e){xy(t.x,e.x),xy(t.y,e.y)}function wy(t,e,n,r,o){return t-=e,t=Zs(t,1/n,r),o!==void 0&&(t=Zs(t,1/o,r)),t}function FP(t,e=0,n=1,r=.5,o,i=t,s=t){if(an.test(e)&&(e=parseFloat(e),e=We(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=We(i.min,i.max,r);t===i&&(a-=e),t.min=wy(t.min,e,n,a,o),t.max=wy(t.max,e,n,a,o)}function Sy(t,e,[n,r,o],i,s){FP(t,e[n],e[r],e[o],e.scale,i,s)}const LP=["x","scaleX","originX"],NP=["y","scaleY","originY"];function Ty(t,e,n,r){Sy(t.x,e,LP,n?n.x:void 0,r?r.x:void 0),Sy(t.y,e,NP,n?n.y:void 0,r?r.y:void 0)}function Ey(t){return t.translate===0&&t.scale===1}function Cy(t){return Ey(t.x)&&Ey(t.y)}function VP(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Ay(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function _y(t){return $t(t.x)/$t(t.y)}class RP{constructor(){this.members=[]}add(e){js(this.members,e),e.scheduleRender()}remove(e){if(Bs(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(o=>e===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:o}=e.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Py(t,e,n){let r="";const o=t.x.translate/e.x,i=t.y.translate/e.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const $P=(t,e)=>t.depth-e.depth;class jP{constructor(){this.children=[],this.isDirty=!1}add(e){js(this.children,e),this.isDirty=!0}remove(e){Bs(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort($P),this.isDirty=!1,this.children.forEach(e)}}function BP(t,e){const n=Kn.now(),r=({timestamp:o})=>{const i=o-n;i>=e&&(ln(r),t(i-e))};return Ie.read(r,!0),()=>ln(r)}function zP(t){window.MotionDebug&&window.MotionDebug.record(t)}function HP(t){return t instanceof SVGElement&&t.tagName!=="svg"}function WP(t,e,n){const r=ft(t)?t:ro(t);return r.start(tu("",r,e,n)),r.animation}const hu=["","X","Y","Z"],UP={visibility:"hidden"},Iy=1e3;let GP=0;const gr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function pu(t,e,n,r){const{latestValues:o}=e;o[t]&&(n[t]=o[t],e.setStaticValue(t,0),r&&(r[t]=0))}function Oy(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return!1;const{visualElement:e}=t.options;return e?Bg(e)?!0:t.parent&&!t.parent.hasCheckedOptimisedAppear?Oy(t.parent):!1:!1}function ky({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=e==null?void 0:e()){this.id=GP++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,gr.totalNodes=gr.resolvedTargetDeltas=gr.recalculatedProjection=0,this.nodes.forEach(ZP),this.nodes.forEach(eI),this.nodes.forEach(tI),this.nodes.forEach(YP),zP(gr)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new jP)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new nu),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=HP(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let f;const d=()=>this.root.updateBlockedByResize=!1;t(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=BP(d,250),Xs.hasAnimatedSinceResize&&(Xs.hasAnimatedSinceResize=!1,this.nodes.forEach(My))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||sI,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),x=!this.targetLayout||!Ay(this.targetLayout,p)||h,y=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||d&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const S={...Nc(m,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else d||My(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ln(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(nI),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Oy(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Dy);return}this.isUpdating||this.nodes.forEach(JP),this.isUpdating=!1,this.nodes.forEach(QP),this.nodes.forEach(KP),this.nodes.forEach(qP),this.clearAllSnapshots();const a=Kn.now();dt.delta=Wn(0,1e3/60,a-dt.timestamp),dt.timestamp=a,dt.isProcessing=!0,Dc.update.process(dt),Dc.preRender.process(dt),Dc.render.process(dt),dt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,bc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(XP),this.sharedNodes.forEach(rI)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ie.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ie.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Xe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Cy(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||mr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),aI(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return Xe();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(Zn(a.x,l.offset.x),Zn(a.y,l.offset.y)),a}removeElementScroll(s){const a=Xe();zt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){zt(a,s);const{scroll:d}=this.root;d&&(Zn(a.x,-d.offset.x),Zn(a.y,-d.offset.y))}Zn(a.x,u.offset.x),Zn(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const l=Xe();zt(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&io(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),mr(u.latestValues)&&io(l,u.latestValues)}return mr(this.latestValues)&&io(l,this.latestValues),l}removeTransform(s){const a=Xe();zt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!mr(c.latestValues))continue;fu(c.latestValues)&&c.updateSnapshot();const u=Xe(),f=c.measurePageBox();zt(u,f),Ty(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return mr(this.latestValues)&&Ty(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==dt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:d}=this.options;if(!(!this.layout||!(f||d))){if(this.resolvedRelativeTargetAt=dt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Xe(),this.relativeTargetOrigin=Xe(),pi(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Xe(),this.targetWithTransforms=Xe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),lP(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):zt(this.target,this.layout.layoutBox),ay(this.target,this.targetDelta)):zt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Xe(),this.relativeTargetOrigin=Xe(),pi(this.relativeTargetOrigin,this.target,h.target),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}gr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||fu(this.parent.latestValues)||oy(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===dt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;zt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;yP(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Xe());const{target:p}=a;if(!p){this.projectionTransform&&(this.projectionDelta=oo(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=oo(),this.projectionDeltaWithTransform=oo());const m=this.projectionTransform;hi(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=Py(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==d||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),gr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=oo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=Xe(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,g=this.getStack(),v=!g||g.members.length<=1,x=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(iI));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const w=S/1e3;Fy(f.x,s.x,w),Fy(f.y,s.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(pi(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),oI(this.relativeTarget,this.relativeTargetOrigin,d,w),y&&VP(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Xe()),zt(y,this.relativeTarget)),m&&(this.animationValues=u,kP(u,c,this.latestValues,w,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ln(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ie.update(()=>{Xs.hasAnimatedSinceResize=!0,this.currentAnimation=WP(0,Iy,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Iy),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&$y(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Xe();const f=$t(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const d=$t(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}zt(a,l),io(a,u),hi(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new RP),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&pu("z",s,c,this.animationValues);for(let u=0;u<hu.length;u++)pu(`rotate${hu[u]}`,s,c,this.animationValues),pu(`skew${hu[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return UP;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=$s(s==null?void 0:s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=$s(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!mr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const d=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=Py(this.projectionDeltaWithTransform,this.treeScale,d),u&&(c.transform=u(d,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=d.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:c.opacity=f===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in Ns){if(d[m]===void 0)continue;const{correct:g,applyTo:v}=Ns[m],x=c.transform==="none"?d[m]:g(d[m],f);if(v){const y=v.length;for(let S=0;S<y;S++)c[v[S]]=x}else c[m]=x}return this.options.layoutId&&(c.pointerEvents=f===this?$s(s==null?void 0:s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Dy),this.root.sharedNodes.clear()}}}function KP(t){t.updateLayout()}function qP(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=t.layout,{animationType:i}=t.options,s=n.source!==t.layout.source;i==="size"?Bt(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=$t(d);d.min=r[f].min,d.max=d.min+h}):$y(i,n.layoutBox,r)&&Bt(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=$t(r[f]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+h)});const a=oo();hi(a,r,n.layoutBox);const l=oo();s?hi(l,t.applyTransform(o,!0),n.measuredBox):hi(l,r,n.layoutBox);const c=!Cy(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const p=Xe();pi(p,n.layoutBox,d.layoutBox);const m=Xe();pi(m,r,h.layoutBox),Ay(p,m)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function ZP(t){gr.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function YP(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function XP(t){t.clearSnapshot()}function Dy(t){t.clearMeasurements()}function JP(t){t.isLayoutDirty=!1}function QP(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function My(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function eI(t){t.resolveTargetDelta()}function tI(t){t.calcProjection()}function nI(t){t.resetSkewAndRotation()}function rI(t){t.removeLeadSnapshot()}function Fy(t,e,n){t.translate=We(e.translate,0,n),t.scale=We(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ly(t,e,n,r){t.min=We(e.min,n.min,r),t.max=We(e.max,n.max,r)}function oI(t,e,n,r){Ly(t.x,e.x,n.x,r),Ly(t.y,e.y,n.y,r)}function iI(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const sI={duration:.45,ease:[.4,0,.1,1]},Ny=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Vy=Ny("applewebkit/")&&!Ny("chrome/")?Math.round:ut;function Ry(t){t.min=Vy(t.min),t.max=Vy(t.max)}function aI(t){Ry(t.x),Ry(t.y)}function $y(t,e,n){return t==="position"||t==="preserve-aspect"&&!lu(_y(e),_y(n),.2)}const lI=ky({attachResizeListener:(t,e)=>vn(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),mu={current:void 0},jy=ky({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!mu.current){const t=new lI({});t.mount(window),t.setOptions({layoutScroll:!0}),mu.current=t}return mu.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),cI={pan:{Feature:CP},drag:{Feature:EP,ProjectionNode:jy,MeasureLayout:py}},gu={current:null},By={current:!1};function uI(){if(By.current=!0,!!vc)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>gu.current=t.matches;t.addListener(e),e()}else gu.current=!1}function fI(t,e,n){for(const r in e){const o=e[r],i=n[r];if(ft(o))t.addValue(r,o),process.env.NODE_ENV==="development"&&ru(o.version==="11.3.0",`Attempting to mix Framer Motion versions ${o.version} with 11.3.0 may not work as expected.`);else if(ft(i))t.addValue(r,ro(o,{owner:t}));else if(i!==o)if(t.hasValue(r)){const s=t.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=t.getStaticValue(r);t.addValue(r,ro(s!==void 0?s:o,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const zy=new WeakMap,dI=[...Qm,bt,qn],hI=t=>dI.find(Jm(t)),Hy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],pI=wc.length;class mI{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.applyWillChange=!1,this.resolveKeyframes=(d,h,p,m)=>new this.KeyframeResolver(d,h,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=$c,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Ie.render(this.render,!1,!0);const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Ls(n),this.isVariantNode=pm(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&ft(h)&&h.set(l[d],!1)}}mount(e){this.current=e,zy.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),By.current||uI(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gu.current,process.env.NODE_ENV!=="production"&&ru(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){zy.delete(this.current),this.projection&&this.projection.unmount(),ln(this.notifyUpdate),ln(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){const r=Hn.has(e),o=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&Ie.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{o(),i(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Jr){const n=Jr[e];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[e]&&o&&r(this.props)&&(this.features[e]=new o(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Xe()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Hy.length;r++){const o=Hy[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=e[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=fI(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<pI;r++){const o=wc[r],i=this.props[o];(ei(i)||i===!1)&&(n[o]=i)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=ro(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){var r;let o=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(r=this.getBaseTargetFromProps(this.props,e))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,e,this.options);return o!=null&&(typeof o=="string"&&(Km(o)||Gm(o))?o=parseFloat(o):!hI(o)&&qn.test(n)&&(o=cg(e,n)),this.setBaseTarget(e,ft(o)?o.get():o)),ft(o)?o.get():o}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const s=Oc(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[e])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!ft(i)?i:this.initialValues[e]!==void 0&&o===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new nu),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Wy extends mI{constructor(){super(...arguments),this.KeyframeResolver=ug}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}}function gI(t){return window.getComputedStyle(t)}class yI extends Wy{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0}readValueFromInstance(e,n){if(Hn.has(n)){const r=Wc(n);return r&&r.default||0}else{const r=gI(e),o=(bm(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return uy(e,n)}build(e,n,r){Cc(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return Ic(e,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ft(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,r,o){_m(e,n,r,o)}}class vI extends Wy{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Hn.has(n)){const r=Wc(n);return r&&r.default||0}return n=Pm.has(n)?n:Ms(n),e.getAttribute(n)}measureInstanceViewportBox(){return Xe()}scrapeMotionValuesFromProps(e,n,r){return Om(e,n,r)}build(e,n,r){_c(e,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,n,r,o){Im(e,n,r,o)}mount(e){this.isSVGTag=Pc(e.tagName),super.mount(e)}}const bI=(t,e)=>Sc(t)?new vI(e):new yI(e,{allowProjection:t!==b.Fragment}),xI={...oP,...yA,...cI,...{layout:{ProjectionNode:jy,MeasureLayout:py}}},so=C1((t,e)=>oA(t,e,xI,bI));function Uy(){const t=b.useRef(!1);return Ds(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Gy(){const t=Uy(),[e,n]=b.useState(0),r=b.useCallback(()=>{t.current&&n(e+1)},[e]);return[b.useCallback(()=>Ie.postRender(r),[r]),e]}class wI extends M.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function SI({children:t,isPresent:e}){const n=b.useId(),r=b.useRef(null),o=b.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=b.useContext(Is);return b.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:c}=o.current;if(e||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return i&&(u.nonce=i),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
116
116
|
[data-motion-pop-id="${n}"] {
|
|
117
117
|
position: absolute !important;
|
|
118
118
|
width: ${s}px !important;
|
|
@@ -120,7 +120,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
120
120
|
top: ${l}px !important;
|
|
121
121
|
left: ${c}px !important;
|
|
122
122
|
}
|
|
123
|
-
`),()=>{document.head.removeChild(u)}},[e]),T.jsx(xI,{isPresent:e,childRef:r,sizeRef:o,children:M.cloneElement(t,{ref:r})})}const yu=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=fr(SI),l=b.useId(),c=b.useMemo(()=>({id:l,initial:e,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),i?[Math.random()]:[n]);return b.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[n]),M.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(t=T.jsx(wI,{isPresent:n,children:t})),T.jsx(ks.Provider,{value:c,children:t})};function SI(){return new Map}function TI(t){return b.useEffect(()=>()=>t(),[])}const yr=t=>t.key||"";function EI(t,e){t.forEach(n=>{const r=yr(n);e.set(r,n)})}function CI(t){const e=[];return b.Children.forEach(t,n=>{b.isValidElement(n)&&e.push(n)}),e}const vu=({children:t,custom:e,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{Zt(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(ni).forceRender||Gy()[0],l=Uy(),c=CI(t);let u=c;const f=b.useRef(new Map).current,d=b.useRef(u),h=b.useRef(new Map).current,p=b.useRef(!0);if(Ds(()=>{p.current=!1,EI(c,h),d.current=u}),TI(()=>{p.current=!0,h.clear(),f.clear()}),p.current)return T.jsx(T.Fragment,{children:u.map(x=>T.jsx(yu,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s,children:x},yr(x)))});u=[...u];const m=d.current.map(yr),g=c.map(yr),v=m.length;for(let x=0;x<v;x++){const y=m[x];g.indexOf(y)===-1&&!f.has(y)&&f.set(y,void 0)}return s==="wait"&&f.size&&(u=[]),f.forEach((x,y)=>{if(g.indexOf(y)!==-1)return;const S=h.get(y);if(!S)return;const w=m.indexOf(y);let E=x;if(!E){const _=()=>{f.delete(y);const I=Array.from(h.keys()).filter(D=>!g.includes(D));if(I.forEach(D=>h.delete(D)),d.current=c.filter(D=>{const F=yr(D);return F===y||I.includes(F)}),!f.size){if(l.current===!1)return;a(),r&&r()}};E=T.jsx(yu,{isPresent:!1,onExitComplete:_,custom:e,presenceAffectsLayout:i,mode:s,children:S},yr(S)),f.set(y,E)}u.splice(w,0,E)}),u=u.map(x=>{const y=x.key;return f.has(y)?x:T.jsx(yu,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:x},yr(x))}),process.env.NODE_ENV!=="production"&&s==="wait"&&u.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),T.jsx(T.Fragment,{children:f.size?u:u.map(x=>b.cloneElement(x))})},AI=b.createContext(null),_I=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Ky(){const t=new Set,e=new WeakMap,n=()=>t.forEach(_I);return{add:r=>{t.add(r),e.set(r,r.addEventListener("willUpdate",n))},remove:r=>{t.delete(r);const o=e.get(r);o&&(o(),e.delete(r)),n()},dirty:n}}const qy=t=>t===!0,PI=t=>qy(t===!0)||t==="id",II=({children:t,id:e,inherit:n=!0})=>{const r=b.useContext(ni),o=b.useContext(AI),[i,s]=Gy(),a=b.useRef(null),l=r.id||o;a.current===null&&(PI(n)&&l&&(e=e?l+"-"+e:l),a.current={id:e,group:qy(n)&&r.group||Ky()});const c=b.useMemo(()=>({...a.current,forceRender:i}),[s]);return T.jsx(ni.Provider,{value:c,children:t})},Zy=b.createContext(null);function OI(t,e,n,r){if(!r)return t;const o=t.findIndex(u=>u.value===e);if(o===-1)return t;const i=r>0?1:-1,s=t[o+i];if(!s)return t;const a=t[o],l=s.layout,c=We(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?J1(t,o,o+i):t}function kI({children:t,as:e="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=fr(()=>so(e)),l=[],c=b.useRef(!1);Zt(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(f,d)=>{const h=l.findIndex(p=>f===p.value);h!==-1?l[h].layout=d[n]:l.push({value:f,layout:d[n]}),l.sort(FI)},updateOrder:(f,d,h)=>{if(c.current)return;const p=OI(l,f,d,h);l!==p&&(c.current=!0,r(p.map(MI).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{c.current=!1}),T.jsx(a,{...i,ref:s,ignoreStrict:!0,children:T.jsx(Zy.Provider,{value:u,children:t})})}const DI=b.forwardRef(kI);function MI(t){return t.value}function FI(t,e){return t.layout.min-e.layout.min}function ao(t){const e=fr(()=>ro(t)),{isStatic:n}=b.useContext(Is);if(n){const[,r]=b.useState(t);b.useEffect(()=>e.on("change",r),[])}return e}const LI=t=>t&&typeof t=="object"&&t.mix,NI=t=>LI(t)?t.mix:void 0;function VI(...t){const e=!Array.isArray(t[0]),n=e?0:-1,r=t[0+n],o=t[1+n],i=t[2+n],s=t[3+n],a=Dg(o,i,{mixer:NI(i[0]),...s});return e?a(r):a}function Yy(t,e){const n=ao(e()),r=()=>n.set(e());return r(),Ds(()=>{const o=()=>Ie.preRender(r,!1,!0),i=t.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),ln(r)}}),n}function RI(t){di.current=[],t();const e=Yy(di.current,t);return di.current=void 0,e}function $I(t,e,n,r){if(typeof t=="function")return RI(t);const o=typeof e=="function"?e:VI(e,n,r);return Array.isArray(t)?Xy(t,o):Xy([t],([i])=>o(i))}function Xy(t,e){const n=fr(()=>[]);return Yy(t,()=>{n.length=0;const r=t.length;for(let o=0;o<r;o++)n[o]=t[o].get();return e(n)})}function Jy(t,e=0){return ft(t)?t:ao(e)}function jI({children:t,style:e={},value:n,as:r="li",onDrag:o,layout:i=!0,...s},a){const l=fr(()=>so(r)),c=b.useContext(Zy),u={x:Jy(e.x),y:Jy(e.y)},f=$I([u.x,u.y],([m,g])=>m||g?1:"unset");Zt(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:d,registerItem:h,updateOrder:p}=c;return T.jsx(l,{drag:d,...s,dragSnapToOrigin:!0,style:{...e,x:u.x,y:u.y,zIndex:f},layout:i,onDrag:(m,g)=>{const{velocity:v}=g;v[d]&&p(n,u[d].get(),v[d]),o&&o(m,g)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:t})}const BI=b.forwardRef(jI),Js={Group:DI,Item:BI};class zI{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,n){this.componentControls.forEach(r=>{r.start(e.nativeEvent||e,n)})}}const HI=()=>new zI;function WI(){return fr(HI)}const Qy=(t,e)=>{const[n,r]=b.useState(()=>e||t);return b.useEffect(()=>{r(t)},[t]),[n,r]},ev=b.createContext(""),UI=t=>{const[e,n]=Qy(t.active),r=ao(0),o=ao(0),i=b.useRef(null),s=t.useHash?"a":"button";b.useEffect(()=>{const c=i.current;if(c===null)return;const u=p=>{if(!p)return;const m=p.getBoundingClientRect();o.set(m.width),r.set(p.offsetLeft)},f=()=>{const p=c.querySelector("li[data-active=true]");return void u(p)};window.addEventListener("resize",f);let d=c.querySelector("li[data-active=true]");const h=window.location.hash.replace(/^#/,"");if(t.active===""&&h!==""&&(d=c.querySelector(`li[data-id=${h}]`),n(h)),d===null){d=c.querySelector("li[data-id]");const p=d.getAttribute("data-id")||"";n(p)}return u(d),()=>window.removeEventListener("resize",f)},[]),b.useEffect(()=>{t.onChange&&t.onChange(e)},[t.onChange,e]);const a=b.Children.toArray(t.children),l=c=>{const u=c.currentTarget,f=u.getBoundingClientRect();o.set(f.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return T.jsx(ev.Provider,{value:e,children:T.jsx(sm,{container:"pt-0",header:T.jsxs("header",{ref:i,className:"border-b border-card-border relative mb-2",children:[T.jsx(so.div,{layout:!0,initial:!1,"aria-hidden":"true",style:{left:r,width:o},transition:{type:"tween",left:r,width:o},className:"w-28 h-0.5 bg-primary absolute bottom-0 duration-300 transition-all hidden md:block"}),T.jsx("nav",{children:T.jsx("ul",{className:"divide-x divide-card-border overflow-x-auto flex justify-between md:justify-start",children:a.map(c=>{const u=c.props;return T.jsx("li",{"data-id":u.id,"data-active":e===u.id,className:"data-[active=true]:text-primary w-full md:w-auto",children:T.jsx(s,{"data-id":u.id,onClick:l,"aria-current":"page",className:"px-10 py-4 block font-medium w-full whitespace-nowrap",href:t.useHash?`#${u.id}`:void 0,children:u.title})},`tab-header-${u.id}`)})})})]}),children:t.children})})},GI=()=>b.useContext(ev),KI=t=>{const e=GI();return T.jsx(b.Fragment,{children:t.id===e?t.children:null})},gi=t=>{const e=b.useId(),[n,r]=b.useState(t.open),o=b.useRef(null),i=b.useMemo(()=>[Ra(10),Ff({fallbackAxisSideDirection:"end"}),Mf(),Lf({padding:5,element:o})],[t.arrow]),{refs:s,floatingStyles:a,context:l}=Ki({open:n,middleware:i,transform:!0,whileElementsMounted:Va,onOpenChange:(p,m)=>{var v;const g=m==null?void 0:m.relatedTarget;g&&g.dataset.floating==="true"&&!p||(r(p),(v=t.onChange)==null||v.call(t,p))}}),c=nd(l),u=Gi(l),f=Yi(l),{getReferenceProps:d,getFloatingProps:h}=qi([c,u,f]);return T.jsxs(b.Fragment,{children:[T.jsx("button",{ref:s.setReference,...d(),type:"button",children:t.trigger}),n&&T.jsx(Ui,{id:`${e}-portal`,children:T.jsx(Ua,{returnFocus:!0,visuallyHiddenDismiss:!0,restoreFocus:!0,context:l,modal:!1,children:T.jsxs("div",{className:"bg-floating-background relative min-w-96 isolate z-floating border shadow-2xl p-6 border-floating-border rounded-lg",ref:s.setFloating,style:a,"aria-labelledby":e,...h(),children:[T.jsx(Bf,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),T.jsx("header",{className:"mb-2",children:T.jsx("h3",{className:"leading-snug font-medium text-2xl tracking-tight text-left",children:t.title})}),t.children]})})})]})},qI=({children:t,as:e,title:n,...r})=>{const[o,i]=b.useState(!1),s=b.useRef(null),a=e||"div",{refs:l,floatingStyles:c,context:u}=Ki({open:o,onOpenChange:i,whileElementsMounted:Va,transform:!0,middleware:[Ra(5),Ff({fallbackAxisSideDirection:"start"}),Mf(),Lf({element:s,padding:5})]}),f=v0(u,{move:!1}),d=M0(u),h=Gi(u),p=Yi(u,{role:"tooltip"}),{getReferenceProps:m,getFloatingProps:g}=qi([f,d,h,p]);return T.jsxs(b.Fragment,{children:[T.jsx(a,{ref:l.setReference,...m(r),children:n}),T.jsx(Ui,{children:o&&T.jsxs(Bo,{ref:l.setFloating,style:c,...g(),className:"bg-tooltip-background text-foreground border border-tooltip-border p-4 rounded-lg",children:[T.jsx(Bf,{ref:s,context:u,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),t]})})]})};function ZI(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function YI(...t){return e=>t.forEach(n=>ZI(n,e))}var tv=M.forwardRef((t,e)=>{const{children:n,...r}=t,o=M.Children.toArray(n),i=o.find(JI);if(i){const s=i.props.children,a=o.map(l=>l===i?M.Children.count(s)>1?M.Children.only(null):M.isValidElement(s)?s.props.children:null:l);return T.jsx(bu,{...r,ref:e,children:M.isValidElement(s)?M.cloneElement(s,void 0,a):null})}return T.jsx(bu,{...r,ref:e,children:n})});tv.displayName="Slot";var bu=M.forwardRef((t,e)=>{const{children:n,...r}=t;if(M.isValidElement(n)){const o=eO(n);return M.cloneElement(n,{...QI(r,n.props),ref:e?YI(e,o):o})}return M.Children.count(n)>1?M.Children.only(null):null});bu.displayName="SlotClone";var XI=({children:t})=>T.jsx(T.Fragment,{children:t});function JI(t){return M.isValidElement(t)&&t.type===XI}function QI(t,e){const n={...e};for(const r in e){const o=t[r],i=e[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...t,...n}}function eO(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}const tO={initial:{left:"-48rem",opacity:.4},enter:{left:0,opacity:1},exit:{left:"-48rem",opacity:.4}},nO={initial:{right:"-48rem",opacity:.4},enter:{right:0,opacity:1},exit:{right:"-48rem",opacity:.4}},nv={drawer:t=>t==="left"?tO:nO,dialog:{initial:{opacity:0,scale:.9},enter:{opacity:1,scale:[1.05,1]},exit:{opacity:0,scale:.9}}},rO=Gl("isolate ring-0 outline-0 appearance-none container flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] h-[inherit] relative rounded-lg py-8"},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"}}),oO={top:0,left:0,right:0,bottom:0},iO=t=>{const e=(n,r)=>{if(t.parent.current){const o=t.parent.current,i=t.value.get()||o.getBoundingClientRect().width,s=t.type==="right"?-r.delta.x:r.delta.x;t.value.set(Math.abs(i+s))}};return T.jsx(so.div,{drag:"x",dragElastic:0,dragMomentum:!1,onDrag:e,dragConstraints:oO,whileDrag:{cursor:"grabbing"},className:`absolute top-1/2 ${t.type==="left"?"right-5":"left-2"} rounded-lg cursor-grab h-10 w-2 bg-floating-border`})},sO=({type:t="dialog",resizer:e=!0,...n})=>{const r=t==="dialog",o=r?"none":n.position||"left",i=r?nv.dialog:nv.drawer(o),s=b.useId(),a=b.useId(),{refs:l,context:c}=Ki({open:n.open,onOpenChange:n.onChange}),u=nd(c),f=Yi(c),d=Gi(c,{escapeKey:!0,referencePress:!0,outsidePress:!1}),{getReferenceProps:h,getFloatingProps:p}=qi([u,f,d]),m=n.trigger,g=ao(void 0);return T.jsxs(b.Fragment,{children:[n.asChild?T.jsx(tv,{ref:l.setReference,...h(),children:m}):T.jsx("button",{ref:l.setReference,...h(),type:"button",children:m}),T.jsx(Ui,{children:T.jsx(vu,{presenceAffectsLayout:!0,children:n.open&&T.jsx(I0,{lockScroll:!0,className:`relative !overflow-clip h-[100dvh] z-floating bg-floating-overlay/70 ${t==="drawer"?"":"grid items-baseline p-8"}`,children:T.jsx(Ua,{modal:!0,closeOnFocusOut:!0,context:c,children:T.jsxs(so.div,{animate:"enter","aria-describedby":a,"aria-labelledby":s,className:rO({position:o,type:t}),exit:"exit",initial:"initial",ref:l.setFloating,variants:i,style:{width:g},...p(),children:[!r&&e?T.jsx(iO,{value:g,parent:l.floating,type:o}):null,n.title?T.jsx("header",{className:"w-full",children:T.jsx("h2",{className:"px-8 pb-4 border-b border-floating-border text-3xl font-medium leading-relaxed",children:n.title})}):null,T.jsx("div",{className:"flex-1 px-8 overflow-y-auto",children:n.children}),n.footer?T.jsx("footer",{className:"px-8 border-t border-floating-border pt-4 w-full",children:n.footer}):null]})})})})})]})};var aO=Object.defineProperty,rv=Object.getOwnPropertySymbols,lO=Object.prototype.hasOwnProperty,cO=Object.prototype.propertyIsEnumerable,ov=(t,e,n)=>e in t?aO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uO=(t,e)=>{for(var n in e||(e={}))lO.call(e,n)&&ov(t,n,e[n]);if(rv)for(var n of rv(e))cO.call(e,n)&&ov(t,n,e[n]);return t},xu=(t,e)=>{const n=t.length;for(let r=0;r<n;r++)if(e(t[r],r,t))return!0;return!1},fO=(t,e,n,r)=>ea(xu,t,e,n,r),lo=t=>typeof t=="object",Yn=(t,e)=>{if(t===e)return!0;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(!t||!e||!lo(t)&&!lo(e))return t===e;if(t.prototype!==e.prototype)return!1;const n=Object.keys(t);return n.length!==Object.keys(e).length?!1:n.every(r=>Yn(t[r],e[r]))},dO=(t,e)=>(lo(t)||Array.isArray(t))&&e?t[e]:t,hO=t=>(e,n)=>e[t]===n[t]?0:e[t]>n[t]?1:-1,Qs=t=>/[0-9.]+/.test(t),iv=t=>["string","number"].includes(typeof t),sv=t=>t==null||(t==null?void 0:t.length)===0||t==="",av={eq:Yn,is:Object.is,"!=":(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>=e,includes:(t,e)=>`${t}`.includes(e),notIncludes:(t,e)=>!`${t}`.includes(e),startsWith:(t,e)=>`${t}`.startsWith(e),endsWith:(t,e)=>`${t}`.endsWith(e),like:(t,e)=>new RegExp(`.*${e}.*`,"gi").test(`${t}`),alphabetical:(t,e)=>t.toString().localeCompare(e.toString()),empty:sv,notEmpty:t=>!sv(t),in:(t,e)=>xu(e,n=>Yn(t,n)),notIn:(t,e)=>lv(e,n=>!Yn(t,n))},pO=t=>{if(t in av)return av[t];throw new Error("Linq - Symbol not found")},co=(t,e)=>{const n=[],r=t.length;for(let o=0;o<r;o++)e(t[o],o,t)&&n.push(t[o]);return n},ea=(t,e,n,r,o)=>{if(typeof n=="function")return t(e,n);const i=pO(r);return n&&r&&o!==void 0?t(e,s=>i(s[n],o)):t(e,s=>i(s,o))},mO=(t,e,n,r)=>ea(co,t,e,n,r),lv=(t,e)=>{for(let n=0;n<t.length;n++)if(!e(t[n],n,t))return!1;return!0},gO=(t,e,n,r)=>ea(lv,t,e,n,r),cv=t=>{if(t===null)return null;const e=uO({},t);return Object.keys(e).forEach(n=>e[n]=lo(t[n])?cv(t[n]):t[n]),Array.isArray(t)&&t.length?(e.length=t.length)&&Array.from(e):Array.isArray(t)?Array.from(t):e},uv=(t,e)=>{if(lo(e)){for(let n=0;n<t.length;n++){const r=t[n];if(Yn(e,r))return!0}return!1}for(let n=0;n<t.length;n++){const r=t[n];if(Yn(e,r))return!0}return!1},yO=(t,e)=>{const n=new Map(t.map(r=>[r[e],r]));return Object.fromEntries(n.entries())},vO=t=>co(t,(e,n,r)=>lo(e)?n===r.findIndex(o=>Yn(o,e)):n===r.indexOf(e)),bO=(t,e)=>{const n=t.length;for(let r=0;r<n;r++)if(e(t[r],r,t))return t[r]},fv=(t,e)=>{const n=new Map;return t.forEach(r=>{const o=e(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},xO=(t,e)=>fv(t,n=>n[e]),dv=(t,e)=>{const n=[];let r=0;const o=t.length;for(r;r<o;r++){const i=e(t[r],r,t);n.push(i)}return n},wO=(t,e)=>{let n=Number.parseInt(t,10),r=Number.parseInt(e,10);return n>r?[r,n]:[n,r]},SO=(t,e,n=1)=>{const r=[];let o=t.charCodeAt(0);const i=e.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return Qs(t)&&Qs(e)?r.map(s=>Number.parseInt(s)):r},wu=(t,e,n=1)=>{let r=Math.abs(n);if((t.length>1||e.length>1)&&Qs(t)&&Qs(e)){const o=[],[i,s]=wO(t,e);for(let a=i;a<=s;a+=r)o.push(a);return o}return SO(t,e,r)},TO=(t,e,n=1)=>{if(e===void 0){const[r,o,i]=t.split("..");return i===void 0?wu(r,o,1):wu(r,i,Number.parseInt(o,10))}return iv(t)&&iv(e)?wu(`${t}`,`${e}`,n):Array.from({length:t},(r,o)=>o*Math.abs(e))},Su=(t,e,n)=>{let r=e;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=t(r,s,i,n)}return r},hv=t=>{const e=Array.from(t.values());let n=null,r=null,o=e.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=e[n];e[n]=e[r],e[r]=i}return e},EO=(t,e)=>{if(typeof e=="number")return t.slice(e);let n=t.length;for(let r=0;r<n;r++){const o=t[r];if(e(o,r,t))return t.slice(r)}return t.slice(0)},CO=(t,e,n,r)=>ea(EO,t,e,n,r),pv=(t,e)=>{const n=[...t];return e===void 0?n.sort():typeof e=="function"?n.toSorted(e):n.toSorted(hO(e))},AO=t=>(e,n)=>t.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=e[s]>n[s]?i:e[s]<n[s]?-i:0;return r!==0?r:a},0),_O=(t,e)=>t.sort(AO(e)),PO=(t,e)=>{if(e===void 0)return[...new Set(t).values()];const n=new Set;return Array.isArray(e)?[...new Set(e)]:co(t,r=>{const o=e?n.has(r[e]):n.has(e);return e&&(o||n.add(r[e])),!o})},IO=class rf{constructor(e=[]){this.array=e}static Range(...e){return TO(...e)}static New(e){return new rf(e)}Where(e,n,r){return this.array=mO(this.array,e,n,r),this}Some(e,n,r){return fO(this.array,e,n,r)}All(e,n,r){return gO(this.array,e,n,r)}Reverse(){return this.array=hv(this.array),this}Add(e){return this.array=Array.isArray(e)?this.array.concat(e):this.array.concat([e]),this}Prepend(e){return this.array=Array.isArray(e)?e.concat(this.array):[e].concat(this.array),this}Select(e){return e===void 0?this.array:this.array.map(e)}Take(e,n){return n!==void 0?this.array=this.array.slice(e,Math.max(0,n)):this.array=this.array.slice(e),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(e,n,r){return this.array=CO(this.array,e,n,r),this}Distinct(){return this.array=vO(this.array),this}First(e){return e===void 0?this.array[0]:bO(this.array,e)||null}Last(e){const n=this.array.length;if(e===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(e(this.array[r],r,this.array))return this.array[r]}Sum(e){return e===void 0?Su((n,r)=>n+r,0,this.array):Su((n,r)=>n+dO(r,e),0,this.array)}Average(e){return this.Sum(e)/this.array.length}GroupBy(e){return xO(this.array,e)}GroupWith(e){return fv(this.array,e)}Except(e){return co(this.array,n=>!uv(e,n))}Intersect(e){return co(this.array,n=>uv(e,n))}OrderBy(e,n){let r;return r=e?pv(this.array,e):this.array.toSorted(),this.array=n==="desc"?hv(r):r,this}Includes(e){return xu(this.array,n=>Yn(n,e))}In(e){const n=e.length;for(let r=0;r<n;r++){const o=e[r];if(this.Includes(o))return!0}return!1}Reduce(e,n){return Su(e,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(e){return new Map(dv(this.array,n=>[e,n]))}Zip(e,n){return dv(this.array,(r,o)=>n(r,e[o]))}Count(e){return e===void 0?this.array.length:co(this.array,e).length}Get(e){return this.array[e]}Clone(){return new rf(cv(this.array))}ToObject(e){return yO(this.array,e)}Sort(e){return Array.isArray(e)?_O(this.array,e):pv(this.array,e)}Unique(e){return PO(this.array,e)}},mv=IO,Tu={},Eu={exports:{}},Cu={};/**
|
|
123
|
+
`),()=>{document.head.removeChild(u)}},[e]),T.jsx(wI,{isPresent:e,childRef:r,sizeRef:o,children:M.cloneElement(t,{ref:r})})}const yu=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=fr(TI),l=b.useId(),c=b.useMemo(()=>({id:l,initial:e,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),i?[Math.random()]:[n]);return b.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[n]),M.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(t=T.jsx(SI,{isPresent:n,children:t})),T.jsx(ks.Provider,{value:c,children:t})};function TI(){return new Map}function EI(t){return b.useEffect(()=>()=>t(),[])}const yr=t=>t.key||"";function CI(t,e){t.forEach(n=>{const r=yr(n);e.set(r,n)})}function AI(t){const e=[];return b.Children.forEach(t,n=>{b.isValidElement(n)&&e.push(n)}),e}const vu=({children:t,custom:e,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{Zt(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(ni).forceRender||Gy()[0],l=Uy(),c=AI(t);let u=c;const f=b.useRef(new Map).current,d=b.useRef(u),h=b.useRef(new Map).current,p=b.useRef(!0);if(Ds(()=>{p.current=!1,CI(c,h),d.current=u}),EI(()=>{p.current=!0,h.clear(),f.clear()}),p.current)return T.jsx(T.Fragment,{children:u.map(x=>T.jsx(yu,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s,children:x},yr(x)))});u=[...u];const m=d.current.map(yr),g=c.map(yr),v=m.length;for(let x=0;x<v;x++){const y=m[x];g.indexOf(y)===-1&&!f.has(y)&&f.set(y,void 0)}return s==="wait"&&f.size&&(u=[]),f.forEach((x,y)=>{if(g.indexOf(y)!==-1)return;const S=h.get(y);if(!S)return;const w=m.indexOf(y);let E=x;if(!E){const _=()=>{f.delete(y);const I=Array.from(h.keys()).filter(D=>!g.includes(D));if(I.forEach(D=>h.delete(D)),d.current=c.filter(D=>{const F=yr(D);return F===y||I.includes(F)}),!f.size){if(l.current===!1)return;a(),r&&r()}};E=T.jsx(yu,{isPresent:!1,onExitComplete:_,custom:e,presenceAffectsLayout:i,mode:s,children:S},yr(S)),f.set(y,E)}u.splice(w,0,E)}),u=u.map(x=>{const y=x.key;return f.has(y)?x:T.jsx(yu,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:x},yr(x))}),process.env.NODE_ENV!=="production"&&s==="wait"&&u.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),T.jsx(T.Fragment,{children:f.size?u:u.map(x=>b.cloneElement(x))})},_I=b.createContext(null),PI=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Ky(){const t=new Set,e=new WeakMap,n=()=>t.forEach(PI);return{add:r=>{t.add(r),e.set(r,r.addEventListener("willUpdate",n))},remove:r=>{t.delete(r);const o=e.get(r);o&&(o(),e.delete(r)),n()},dirty:n}}const qy=t=>t===!0,II=t=>qy(t===!0)||t==="id",OI=({children:t,id:e,inherit:n=!0})=>{const r=b.useContext(ni),o=b.useContext(_I),[i,s]=Gy(),a=b.useRef(null),l=r.id||o;a.current===null&&(II(n)&&l&&(e=e?l+"-"+e:l),a.current={id:e,group:qy(n)&&r.group||Ky()});const c=b.useMemo(()=>({...a.current,forceRender:i}),[s]);return T.jsx(ni.Provider,{value:c,children:t})},Zy=b.createContext(null);function kI(t,e,n,r){if(!r)return t;const o=t.findIndex(u=>u.value===e);if(o===-1)return t;const i=r>0?1:-1,s=t[o+i];if(!s)return t;const a=t[o],l=s.layout,c=We(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?Q1(t,o,o+i):t}function DI({children:t,as:e="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=fr(()=>so(e)),l=[],c=b.useRef(!1);Zt(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(f,d)=>{const h=l.findIndex(p=>f===p.value);h!==-1?l[h].layout=d[n]:l.push({value:f,layout:d[n]}),l.sort(LI)},updateOrder:(f,d,h)=>{if(c.current)return;const p=kI(l,f,d,h);l!==p&&(c.current=!0,r(p.map(FI).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{c.current=!1}),T.jsx(a,{...i,ref:s,ignoreStrict:!0,children:T.jsx(Zy.Provider,{value:u,children:t})})}const MI=b.forwardRef(DI);function FI(t){return t.value}function LI(t,e){return t.layout.min-e.layout.min}function ao(t){const e=fr(()=>ro(t)),{isStatic:n}=b.useContext(Is);if(n){const[,r]=b.useState(t);b.useEffect(()=>e.on("change",r),[])}return e}const NI=t=>t&&typeof t=="object"&&t.mix,VI=t=>NI(t)?t.mix:void 0;function RI(...t){const e=!Array.isArray(t[0]),n=e?0:-1,r=t[0+n],o=t[1+n],i=t[2+n],s=t[3+n],a=Dg(o,i,{mixer:VI(i[0]),...s});return e?a(r):a}function Yy(t,e){const n=ao(e()),r=()=>n.set(e());return r(),Ds(()=>{const o=()=>Ie.preRender(r,!1,!0),i=t.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),ln(r)}}),n}function $I(t){di.current=[],t();const e=Yy(di.current,t);return di.current=void 0,e}function jI(t,e,n,r){if(typeof t=="function")return $I(t);const o=typeof e=="function"?e:RI(e,n,r);return Array.isArray(t)?Xy(t,o):Xy([t],([i])=>o(i))}function Xy(t,e){const n=fr(()=>[]);return Yy(t,()=>{n.length=0;const r=t.length;for(let o=0;o<r;o++)n[o]=t[o].get();return e(n)})}function Jy(t,e=0){return ft(t)?t:ao(e)}function BI({children:t,style:e={},value:n,as:r="li",onDrag:o,layout:i=!0,...s},a){const l=fr(()=>so(r)),c=b.useContext(Zy),u={x:Jy(e.x),y:Jy(e.y)},f=jI([u.x,u.y],([m,g])=>m||g?1:"unset");Zt(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:d,registerItem:h,updateOrder:p}=c;return T.jsx(l,{drag:d,...s,dragSnapToOrigin:!0,style:{...e,x:u.x,y:u.y,zIndex:f},layout:i,onDrag:(m,g)=>{const{velocity:v}=g;v[d]&&p(n,u[d].get(),v[d]),o&&o(m,g)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:t})}const zI=b.forwardRef(BI),Js={Group:MI,Item:zI};class HI{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,n){this.componentControls.forEach(r=>{r.start(e.nativeEvent||e,n)})}}const WI=()=>new HI;function UI(){return fr(WI)}const Qy=(t,e)=>{const[n,r]=b.useState(()=>e||t);return b.useEffect(()=>{r(t)},[t]),[n,r]},ev=b.createContext(""),GI=t=>{const[e,n]=Qy(t.active),r=ao(0),o=ao(0),i=b.useRef(null),s=t.useHash?"a":"button";b.useEffect(()=>{const c=i.current;if(c===null)return;const u=p=>{if(!p)return;const m=p.getBoundingClientRect();o.set(m.width),r.set(p.offsetLeft)},f=()=>{const p=c.querySelector("li[data-active=true]");return void u(p)};window.addEventListener("resize",f);let d=c.querySelector("li[data-active=true]");const h=window.location.hash.replace(/^#/,"");if(t.active===""&&h!==""&&(d=c.querySelector(`li[data-id=${h}]`),n(h)),d===null){d=c.querySelector("li[data-id]");const p=d.getAttribute("data-id")||"";n(p)}return u(d),()=>window.removeEventListener("resize",f)},[]),b.useEffect(()=>{t.onChange&&t.onChange(e)},[t.onChange,e]);const a=b.Children.toArray(t.children),l=c=>{const u=c.currentTarget,f=u.getBoundingClientRect();o.set(f.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return T.jsx(ev.Provider,{value:e,children:T.jsx(sm,{container:"pt-0",header:T.jsxs("header",{ref:i,className:"border-b border-card-border relative mb-2",children:[T.jsx(so.div,{layout:!0,initial:!1,"aria-hidden":"true",style:{left:r,width:o},transition:{type:"tween",left:r,width:o},className:"w-28 h-0.5 bg-primary absolute bottom-0 duration-300 transition-all hidden md:block"}),T.jsx("nav",{children:T.jsx("ul",{className:"divide-x divide-card-border overflow-x-auto flex justify-between md:justify-start",children:a.map(c=>{const u=c.props;return T.jsx("li",{"data-id":u.id,"data-active":e===u.id,className:"data-[active=true]:text-primary w-full md:w-auto",children:T.jsx(s,{"data-id":u.id,onClick:l,"aria-current":"page",className:"px-10 py-4 block font-medium w-full whitespace-nowrap",href:t.useHash?`#${u.id}`:void 0,children:u.title})},`tab-header-${u.id}`)})})})]}),children:t.children})})},KI=()=>b.useContext(ev),qI=t=>{const e=KI();return T.jsx(b.Fragment,{children:t.id===e?t.children:null})},gi=t=>{const e=b.useId(),[n,r]=b.useState(t.open),o=b.useRef(null),i=b.useMemo(()=>[Ra(10),Ff({fallbackAxisSideDirection:"end"}),Mf(),Lf({padding:5,element:o})],[t.arrow]),{refs:s,floatingStyles:a,context:l}=Ki({open:n,middleware:i,transform:!0,whileElementsMounted:Va,onOpenChange:(p,m)=>{var v;const g=m==null?void 0:m.relatedTarget;g&&g.dataset.floating==="true"&&!p||(r(p),(v=t.onChange)==null||v.call(t,p))}}),c=nd(l),u=Gi(l),f=Yi(l),{getReferenceProps:d,getFloatingProps:h}=qi([c,u,f]);return T.jsxs(b.Fragment,{children:[T.jsx("button",{ref:s.setReference,...d(),type:"button",children:t.trigger}),n&&T.jsx(Ui,{id:`${e}-portal`,children:T.jsx(Ua,{returnFocus:!0,visuallyHiddenDismiss:!0,restoreFocus:!0,context:l,modal:!1,children:T.jsxs("div",{className:"bg-floating-background relative min-w-96 isolate z-floating border shadow-2xl p-6 border-floating-border rounded-lg",ref:s.setFloating,style:a,"aria-labelledby":e,...h(),children:[T.jsx(Bf,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),T.jsx("header",{className:"mb-2",children:T.jsx("h3",{className:"leading-snug font-medium text-2xl tracking-tight text-left",children:t.title})}),t.children]})})})]})},ZI=({children:t,as:e,title:n,...r})=>{const[o,i]=b.useState(!1),s=b.useRef(null),a=e||"span",{refs:l,floatingStyles:c,context:u}=Ki({open:o,onOpenChange:i,whileElementsMounted:Va,transform:!0,middleware:[Ra(5),Ff({fallbackAxisSideDirection:"start"}),Mf(),Lf({element:s,padding:5})]}),f=b0(u,{move:!0}),d=F0(u),h=Gi(u),p=Yi(u,{role:"tooltip"}),{getReferenceProps:m,getFloatingProps:g}=qi([f,d,h,p]);return T.jsxs(b.Fragment,{children:[T.jsx(a,{ref:l.setReference,...m(r),children:n}),T.jsx(Ui,{children:o&&T.jsxs(Bo,{...g(),ref:l.setFloating,style:c,className:"bg-tooltip-background text-tooltip-foreground border border-tooltip-border p-3 rounded-lg",children:[T.jsx(Bf,{ref:s,context:u,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),t]})})]})};function YI(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function XI(...t){return e=>t.forEach(n=>YI(n,e))}var tv=M.forwardRef((t,e)=>{const{children:n,...r}=t,o=M.Children.toArray(n),i=o.find(QI);if(i){const s=i.props.children,a=o.map(l=>l===i?M.Children.count(s)>1?M.Children.only(null):M.isValidElement(s)?s.props.children:null:l);return T.jsx(bu,{...r,ref:e,children:M.isValidElement(s)?M.cloneElement(s,void 0,a):null})}return T.jsx(bu,{...r,ref:e,children:n})});tv.displayName="Slot";var bu=M.forwardRef((t,e)=>{const{children:n,...r}=t;if(M.isValidElement(n)){const o=tO(n);return M.cloneElement(n,{...eO(r,n.props),ref:e?XI(e,o):o})}return M.Children.count(n)>1?M.Children.only(null):null});bu.displayName="SlotClone";var JI=({children:t})=>T.jsx(T.Fragment,{children:t});function QI(t){return M.isValidElement(t)&&t.type===JI}function eO(t,e){const n={...e};for(const r in e){const o=t[r],i=e[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...t,...n}}function tO(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}const nv=t=>({initial:{[t]:"-60%",opacity:.8},enter:{[t]:0,opacity:1},exit:{[t]:"-60%",opacity:.8}}),nO=nv("left"),rO=nv("right"),rv={drawer:t=>t==="left"?nO:rO,dialog:{initial:{opacity:0,scale:.9},enter:{opacity:1,scale:[1.125,1]},exit:{opacity:0,scale:.9}}},oO=Gl("isolate ring-0 outline-0 appearance-none container flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] h-[inherit] relative rounded-lg py-8"},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"}}),iO={top:0,left:0,right:0,bottom:0},sO=t=>{const e=(n,r)=>{if(t.parent.current){const o=t.parent.current,i=t.value.get()||o.getBoundingClientRect().width,s=t.type==="right"?-r.delta.x:r.delta.x;t.value.set(Math.abs(i+s))}};return T.jsx(so.div,{drag:"x",dragElastic:0,dragMomentum:!1,onDrag:e,dragConstraints:iO,whileDrag:{cursor:"grabbing"},className:`absolute top-1/2 ${t.type==="left"?"right-5":"left-2"} rounded-lg cursor-grab h-10 w-2 bg-floating-border`})},aO=({type:t="dialog",resizer:e=!0,...n})=>{const r=t==="dialog",o=r?"none":n.position||"left",i=r?rv.dialog:rv.drawer(o),s=b.useId(),a=b.useId(),{refs:l,context:c}=Ki({open:n.open,onOpenChange:n.onChange}),u=nd(c),f=Yi(c),d=Gi(c,{escapeKey:!0,referencePress:!0,outsidePress:!1}),{getReferenceProps:h,getFloatingProps:p}=qi([u,f,d]),m=n.trigger,g=ao(void 0);return T.jsxs(b.Fragment,{children:[n.asChild?T.jsx(tv,{ref:l.setReference,...h(),children:m}):T.jsx("button",{ref:l.setReference,...h(),type:"button",children:m}),T.jsx(Ui,{children:T.jsx(vu,{presenceAffectsLayout:!0,children:n.open&&T.jsx(O0,{lockScroll:!0,className:`relative !overflow-clip h-[100dvh] z-floating bg-floating-overlay/70 ${t==="drawer"?"":"grid items-baseline p-8"}`,children:T.jsx(Ua,{modal:!0,closeOnFocusOut:!0,context:c,children:T.jsxs(so.div,{animate:"enter","aria-describedby":a,"aria-labelledby":s,className:oO({position:o,type:t}),exit:"exit",initial:"initial",ref:l.setFloating,variants:i,style:{width:g},...p(),children:[!r&&e?T.jsx(sO,{value:g,parent:l.floating,type:o}):null,n.title?T.jsx("header",{className:"w-full",children:T.jsx("h2",{className:"px-8 pb-4 border-b border-floating-border text-3xl font-medium leading-relaxed",children:n.title})}):null,T.jsx("div",{className:"flex-1 px-8 overflow-y-auto",children:n.children}),n.footer?T.jsx("footer",{className:"px-8 border-t border-floating-border pt-4 w-full",children:n.footer}):null]})})})})})]})};var lO=Object.defineProperty,ov=Object.getOwnPropertySymbols,cO=Object.prototype.hasOwnProperty,uO=Object.prototype.propertyIsEnumerable,iv=(t,e,n)=>e in t?lO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fO=(t,e)=>{for(var n in e||(e={}))cO.call(e,n)&&iv(t,n,e[n]);if(ov)for(var n of ov(e))uO.call(e,n)&&iv(t,n,e[n]);return t},xu=(t,e)=>{const n=t.length;for(let r=0;r<n;r++)if(e(t[r],r,t))return!0;return!1},dO=(t,e,n,r)=>ea(xu,t,e,n,r),lo=t=>typeof t=="object",Yn=(t,e)=>{if(t===e)return!0;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(!t||!e||!lo(t)&&!lo(e))return t===e;if(t.prototype!==e.prototype)return!1;const n=Object.keys(t);return n.length!==Object.keys(e).length?!1:n.every(r=>Yn(t[r],e[r]))},hO=(t,e)=>(lo(t)||Array.isArray(t))&&e?t[e]:t,pO=t=>(e,n)=>e[t]===n[t]?0:e[t]>n[t]?1:-1,Qs=t=>/[0-9.]+/.test(t),sv=t=>["string","number"].includes(typeof t),av=t=>t==null||(t==null?void 0:t.length)===0||t==="",lv={eq:Yn,is:Object.is,"!=":(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>=e,includes:(t,e)=>`${t}`.includes(e),notIncludes:(t,e)=>!`${t}`.includes(e),startsWith:(t,e)=>`${t}`.startsWith(e),endsWith:(t,e)=>`${t}`.endsWith(e),like:(t,e)=>new RegExp(`.*${e}.*`,"gi").test(`${t}`),alphabetical:(t,e)=>t.toString().localeCompare(e.toString()),empty:av,notEmpty:t=>!av(t),in:(t,e)=>xu(e,n=>Yn(t,n)),notIn:(t,e)=>cv(e,n=>!Yn(t,n))},mO=t=>{if(t in lv)return lv[t];throw new Error("Linq - Symbol not found")},co=(t,e)=>{const n=[],r=t.length;for(let o=0;o<r;o++)e(t[o],o,t)&&n.push(t[o]);return n},ea=(t,e,n,r,o)=>{if(typeof n=="function")return t(e,n);const i=mO(r);return n&&r&&o!==void 0?t(e,s=>i(s[n],o)):t(e,s=>i(s,o))},gO=(t,e,n,r)=>ea(co,t,e,n,r),cv=(t,e)=>{for(let n=0;n<t.length;n++)if(!e(t[n],n,t))return!1;return!0},yO=(t,e,n,r)=>ea(cv,t,e,n,r),uv=t=>{if(t===null)return null;const e=fO({},t);return Object.keys(e).forEach(n=>e[n]=lo(t[n])?uv(t[n]):t[n]),Array.isArray(t)&&t.length?(e.length=t.length)&&Array.from(e):Array.isArray(t)?Array.from(t):e},fv=(t,e)=>{if(lo(e)){for(let n=0;n<t.length;n++){const r=t[n];if(Yn(e,r))return!0}return!1}for(let n=0;n<t.length;n++){const r=t[n];if(Yn(e,r))return!0}return!1},vO=(t,e)=>{const n=new Map(t.map(r=>[r[e],r]));return Object.fromEntries(n.entries())},bO=t=>co(t,(e,n,r)=>lo(e)?n===r.findIndex(o=>Yn(o,e)):n===r.indexOf(e)),xO=(t,e)=>{const n=t.length;for(let r=0;r<n;r++)if(e(t[r],r,t))return t[r]},dv=(t,e)=>{const n=new Map;return t.forEach(r=>{const o=e(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},wO=(t,e)=>dv(t,n=>n[e]),hv=(t,e)=>{const n=[];let r=0;const o=t.length;for(r;r<o;r++){const i=e(t[r],r,t);n.push(i)}return n},SO=(t,e)=>{let n=Number.parseInt(t,10),r=Number.parseInt(e,10);return n>r?[r,n]:[n,r]},TO=(t,e,n=1)=>{const r=[];let o=t.charCodeAt(0);const i=e.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return Qs(t)&&Qs(e)?r.map(s=>Number.parseInt(s)):r},wu=(t,e,n=1)=>{let r=Math.abs(n);if((t.length>1||e.length>1)&&Qs(t)&&Qs(e)){const o=[],[i,s]=SO(t,e);for(let a=i;a<=s;a+=r)o.push(a);return o}return TO(t,e,r)},EO=(t,e,n=1)=>{if(e===void 0){const[r,o,i]=t.split("..");return i===void 0?wu(r,o,1):wu(r,i,Number.parseInt(o,10))}return sv(t)&&sv(e)?wu(`${t}`,`${e}`,n):Array.from({length:t},(r,o)=>o*Math.abs(e))},Su=(t,e,n)=>{let r=e;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=t(r,s,i,n)}return r},pv=t=>{const e=Array.from(t.values());let n=null,r=null,o=e.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=e[n];e[n]=e[r],e[r]=i}return e},CO=(t,e)=>{if(typeof e=="number")return t.slice(e);let n=t.length;for(let r=0;r<n;r++){const o=t[r];if(e(o,r,t))return t.slice(r)}return t.slice(0)},AO=(t,e,n,r)=>ea(CO,t,e,n,r),mv=(t,e)=>{const n=[...t];return e===void 0?n.sort():typeof e=="function"?n.toSorted(e):n.toSorted(pO(e))},_O=t=>(e,n)=>t.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=e[s]>n[s]?i:e[s]<n[s]?-i:0;return r!==0?r:a},0),PO=(t,e)=>t.sort(_O(e)),IO=(t,e)=>{if(e===void 0)return[...new Set(t).values()];const n=new Set;return Array.isArray(e)?[...new Set(e)]:co(t,r=>{const o=e?n.has(r[e]):n.has(e);return e&&(o||n.add(r[e])),!o})},OO=class rf{constructor(e=[]){this.array=e}static Range(...e){return EO(...e)}static New(e){return new rf(e)}Where(e,n,r){return this.array=gO(this.array,e,n,r),this}Some(e,n,r){return dO(this.array,e,n,r)}All(e,n,r){return yO(this.array,e,n,r)}Reverse(){return this.array=pv(this.array),this}Add(e){return this.array=Array.isArray(e)?this.array.concat(e):this.array.concat([e]),this}Prepend(e){return this.array=Array.isArray(e)?e.concat(this.array):[e].concat(this.array),this}Select(e){return e===void 0?this.array:this.array.map(e)}Take(e,n){return n!==void 0?this.array=this.array.slice(e,Math.max(0,n)):this.array=this.array.slice(e),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(e,n,r){return this.array=AO(this.array,e,n,r),this}Distinct(){return this.array=bO(this.array),this}First(e){return e===void 0?this.array[0]:xO(this.array,e)||null}Last(e){const n=this.array.length;if(e===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(e(this.array[r],r,this.array))return this.array[r]}Sum(e){return e===void 0?Su((n,r)=>n+r,0,this.array):Su((n,r)=>n+hO(r,e),0,this.array)}Average(e){return this.Sum(e)/this.array.length}GroupBy(e){return wO(this.array,e)}GroupWith(e){return dv(this.array,e)}Except(e){return co(this.array,n=>!fv(e,n))}Intersect(e){return co(this.array,n=>fv(e,n))}OrderBy(e,n){let r;return r=e?mv(this.array,e):this.array.toSorted(),this.array=n==="desc"?pv(r):r,this}Includes(e){return xu(this.array,n=>Yn(n,e))}In(e){const n=e.length;for(let r=0;r<n;r++){const o=e[r];if(this.Includes(o))return!0}return!1}Reduce(e,n){return Su(e,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(e){return new Map(hv(this.array,n=>[e,n]))}Zip(e,n){return hv(this.array,(r,o)=>n(r,e[o]))}Count(e){return e===void 0?this.array.length:co(this.array,e).length}Get(e){return this.array[e]}Clone(){return new rf(uv(this.array))}ToObject(e){return vO(this.array,e)}Sort(e){return Array.isArray(e)?PO(this.array,e):mv(this.array,e)}Unique(e){return IO(this.array,e)}},gv=OO,Tu={},Eu={exports:{}},Cu={};/**
|
|
124
124
|
* @license React
|
|
125
125
|
* use-sync-external-store-shim.production.min.js
|
|
126
126
|
*
|
|
@@ -128,7 +128,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the MIT license found in the
|
|
130
130
|
* LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/var
|
|
131
|
+
*/var yv;function kO(){if(yv)return Cu;yv=1;var t=b;function e(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,i=t.useLayoutEffect,s=t.useDebugValue;function a(f,d){var h=d(),p=r({inst:{value:h,getSnapshot:d}}),m=p[0].inst,g=p[1];return i(function(){m.value=h,m.getSnapshot=d,l(m)&&g({inst:m})},[f,h,d]),o(function(){return l(m)&&g({inst:m}),f(function(){l(m)&&g({inst:m})})},[f]),s(h),h}function l(f){var d=f.getSnapshot;f=f.value;try{var h=d();return!n(f,h)}catch{return!0}}function c(f,d){return d()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Cu.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,Cu}var vv={};/**
|
|
132
132
|
* @license React
|
|
133
133
|
* use-sync-external-store-shim.development.js
|
|
134
134
|
*
|
|
@@ -136,7 +136,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
136
136
|
*
|
|
137
137
|
* This source code is licensed under the MIT license found in the
|
|
138
138
|
* LICENSE file in the root directory of this source tree.
|
|
139
|
-
*/var
|
|
139
|
+
*/var bv;function DO(){return bv||(bv=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=b,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(y){{for(var S=arguments.length,w=new Array(S>1?S-1:0),E=1;E<S;E++)w[E-1]=arguments[E];r("error",y,w)}}function r(y,S,w){{var E=e.ReactDebugCurrentFrame,_=E.getStackAddendum();_!==""&&(S+="%s",w=w.concat([_]));var I=w.map(function(D){return String(D)});I.unshift("Warning: "+S),Function.prototype.apply.call(console[y],console,I)}}function o(y,S){return y===S&&(y!==0||1/y===1/S)||y!==y&&S!==S}var i=typeof Object.is=="function"?Object.is:o,s=t.useState,a=t.useEffect,l=t.useLayoutEffect,c=t.useDebugValue,u=!1,f=!1;function d(y,S,w){u||t.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=S();if(!f){var _=S();i(E,_)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var I=s({inst:{value:E,getSnapshot:S}}),D=I[0].inst,F=I[1];return l(function(){D.value=E,D.getSnapshot=S,h(D)&&F({inst:D})},[y,E,S]),a(function(){h(D)&&F({inst:D});var N=function(){h(D)&&F({inst:D})};return y(N)},[y]),c(E),E}function h(y){var S=y.getSnapshot,w=y.value;try{var E=S();return!i(w,E)}catch{return!0}}function p(y,S,w){return S()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!m,v=g?p:d,x=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:v;vv.useSyncExternalStore=x,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),vv}var xv;function wv(){return xv||(xv=1,process.env.NODE_ENV==="production"?Eu.exports=kO():Eu.exports=DO()),Eu.exports}/**
|
|
140
140
|
* @license React
|
|
141
141
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
142
142
|
*
|
|
@@ -144,7 +144,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
144
144
|
*
|
|
145
145
|
* This source code is licensed under the MIT license found in the
|
|
146
146
|
* LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/var
|
|
147
|
+
*/var Sv;function MO(){if(Sv)return Tu;Sv=1;var t=b,e=wv();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;return Tu.useSyncExternalStoreWithSelector=function(c,u,f,d,h){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function v(E){if(!x){if(x=!0,y=E,E=d(E),h!==void 0&&m.hasValue){var _=m.value;if(h(_,E))return S=_}return S=E}if(_=S,r(y,E))return _;var I=d(E);return h!==void 0&&h(_,I)?_:(y=E,S=I)}var x=!1,y,S,w=f===void 0?null:f;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,f,d,h]);var g=o(c,p[0],p[1]);return s(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},Tu}var Tv={};/**
|
|
148
148
|
* @license React
|
|
149
149
|
* use-sync-external-store-shim/with-selector.development.js
|
|
150
150
|
*
|
|
@@ -152,5 +152,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
152
152
|
*
|
|
153
153
|
* This source code is licensed under the MIT license found in the
|
|
154
154
|
* LICENSE file in the root directory of this source tree.
|
|
155
|
-
*/var Tv;function MO(){return Tv||(Tv=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=b,e=xv();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;function c(u,f,d,h,p){var m=i(null),g;m.current===null?(g={hasValue:!1,value:null},m.current=g):g=m.current;var v=a(function(){var w=!1,E,_,I=function(P){if(!w){w=!0,E=P;var $=h(P);if(p!==void 0&&g.hasValue){var O=g.value;if(p(O,$))return _=O,O}return _=$,$}var A=E,L=_;if(r(A,P))return L;var V=h(P);return p!==void 0&&p(L,V)?L:(E=P,_=V,V)},D=d===void 0?null:d,F=function(){return I(f())},N=D===null?void 0:function(){return I(D())};return[F,N]},[f,d,h,p]),x=v[0],y=v[1],S=o(u,x,y);return s(function(){g.hasValue=!0,g.value=S},[S]),l(S),S}Sv.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Sv}process.env.NODE_ENV==="production"?DO():MO();const uo=t=>{const e=b.useRef(t??{});return b.useEffect(()=>void(e.current=t),[t]),e},FO=t=>{const e=b.useRef();return b.useEffect(()=>{e.current=t},[t]),e.current},LO=t=>Object.entries(t),Ev=t=>t instanceof Promise,Cv=(t,e,n,r)=>e===t?n.reduce((o,i)=>i(o,e,r),t):t.constructor.name===Object.name?n.reduce((o,i)=>i(o,e,r),{...e,...t}):n.reduce((o,i)=>i(o,e,r),t),NO=(t,e,n,r,o,i)=>(...s)=>{const a=performance.now(),l=e(...s),c=(u,f)=>n(d=>Cv(u,d,i,f));return Ev(l)?l.then(u=>{o.current={method:t,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:t,props:r(),time:performance.now()-a},void c(l,o.current))},VO=(t,e,n,r,o,i)=>(...s)=>{o.current={method:t,time:0,props:r()};const a=e(...s),l=c=>n(u=>Cv(c,u,i,o.current));return Ev(a)?a.then(c=>l(c)):l(a)},Av=(t,e,n)=>{const[r,o]=b.useState(()=>t),i=uo(r),s=uo((n==null?void 0:n.props)??{}),a=uo(e),l=uo((n==null?void 0:n.postMiddleware)??[]),c=uo((n==null?void 0:n.interceptor)??[]),u=b.useRef(t),f=FO(r),d=uo(f),h=b.useRef(null);b.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(g=>{g(r,f,m)})},[r,l,f]);const[p]=b.useState(()=>{const m=()=>s.current,g=a.current({props:m,state:()=>i.current,initialState:u.current,previousState:()=>d.current});return LO(g).reduce((v,[x,y])=>({...v,[x]:n!=null&&n.debug?NO(x,y,o,m,h,c.current):VO(x,y,o,m,h,c.current)}),{})});return[r,p,s.current]},_v=t=>{const e=b.useRef(t);return b.useEffect(()=>{e.current=t}),e},ta=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)}),Pv=(t,e,n)=>t.split(e).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Iv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Ov=(t,e)=>{const n=Pv(e,Iv.basic,t)||Pv(e,Iv.extend,t);return n===void 0||n===t?void 0:n},Au=()=>typeof window>"u";var _u={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=(g,v)=>{try{Object.keys(g).forEach(v)}catch(x){window.console.log(x)}},n=g=>g==null,r=g=>{const v=typeof g;return v==="string"||v==="number"||v==="boolean"||n(g)},o=(g,v)=>{const x=v.getItem(g);try{return JSON.parse(x)}catch{return x??null}},i=g=>Object.keys(g).reduce((v,x)=>({...v,[x]:o(x,g)}),{}),s=g=>g instanceof Date?g:typeof g=="number"?new Date(new Date*1+g*864e5):g,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(g=>g.split("=")).reduce((g,v)=>(g[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),g),{}),c=new Set,u=()=>{const g=l();c.forEach(v=>v(g))},f=[{name:"expires",parse:g=>`expires=${s(g.expires??a)}`},{name:"maxAge",parse:g=>g.maxAge?`max-age=${s(g.expires??a)}`:""},{name:"path",parse:g=>`path=${g.path??"/"}`},{name:"sameSite",parse:g=>`samesite=${g.sameSite??"strict"}`},{name:"useSecure",parse:g=>`${g.useSecure??!0?"secure":""}`},{name:"domain",parse:g=>{const v=g.domain??"";return v===""?"":`domain=${g.multiDomain?".":""}${v}`}},{name:"partitioned",parse:g=>g.partitioned?"Partitioned":""}],d={json:l,listener:g=>(c.add(g),()=>c.delete(g)),clearListeners:()=>c.clear(),has:g=>document.cookie.split(";").some(v=>v.trim().startsWith(`${g}=`)),deleteAll:()=>{document.cookie.split(";").forEach(g=>{document.cookie=g.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:g=>{const v=d.json()[g];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:g=>{document.cookie=`${encodeURIComponent(g)}=;expires=${new Date().toUTCString()}`,u()},set:(g,v,x={})=>{const y=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=f.reduce((w,E)=>{const _=E.parse(x);return _===""?w:w.concat(_)},[`${encodeURIComponent(g)}=${y}`]).join(";");document.cookie=S,u()}},h=g=>{const v=new Set,x=y=>{g().removeItem(y);const S=i(g());v.forEach(w=>w(S))};return{delete:x,listener:y=>(v.add(y),()=>v.delete(y)),clearListeners:()=>v.clear(),json:(y=!1)=>y?i(g()):g(),has:y=>{const S=g().getItem(y);return!n(S)},deleteAll:()=>{e(g(),x),v.forEach(y=>y(g()))},get:y=>o(y,g()),set:(y,S)=>{g().setItem(y,JSON.stringify(S)),v.forEach(w=>w(g()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);t.Cookie=d,t.LocalStorage=m,t.SessionStorage=p,t.createStorage=h})(_u);const kv=t=>t.headerLabel??t.thead??t.id,Pu=t=>t.map(e=>({value:e.id,label:e.thead??e.headerLabel??e.id}));var fo=(t=>(t.Boolean="boolean",t.Number="number",t.Select="select",t.Text="text",t))(fo||{});const Iu=t=>t.type==="number"?t.valueAsNumber:t.value,RO=t=>{let e=[];return t({add:(o,i,s)=>e.push({...s,id:o,thead:i}),remove:o=>e=e.filter(i=>i.id!==o)}),e},$O={},jO=(t,e=$O)=>{const n=Au()?null:_u.LocalStorage.get(`@unamed/table-${t}`)||null,[r,o]=Av({name:t,groups:e.groups||(n==null?void 0:n.groups)||[],sorters:e.sorters||(n==null?void 0:n.sorters)||[],filters:e.filters||(n==null?void 0:n.filters)||[],cols:e.cols||(n==null?void 0:n.cols)||[]},i=>{const s=a=>{const l=i.state(),c={...l,...a};return Au()||_u.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>s(a)}});return{...r,...o,name:t}},Tt={contains:{value:"contains",label:"Contains",symbol:"includes"},is:{value:"is",label:"Is",symbol:"is"},isNot:{value:"isNot",label:"Is not",symbol:"!=="},notContains:{value:"notContains",label:"Does not contains",symbol:"notIncludes"},lessThan:{value:"lessThan",label:"Less Than",symbol:"<="},greaterThan:{value:"greaterThan",label:"Greater than",symbol:">="},startsWith:{value:"startsWith",label:"Starts with",symbol:"startsWith"},endsWith:{value:"endsWith",label:"Ends with",symbol:"endsWith"}},Ou={[fo.Text]:[Tt.is,Tt.isNot,Tt.contains,Tt.notContains,Tt.startsWith,Tt.endsWith],[fo.Boolean]:[Tt.is,Tt.isNot],[fo.Number]:[Tt.is,Tt.isNot,Tt.greaterThan,Tt.lessThan]},ku=(t,e={})=>{var s;const n=t.id,r=t.type??fo.Text,o=(s=Ou[r])==null?void 0:s[0].value,i=Tt[o];return{id:ta(),operation:i,label:kv(t),name:n,type:r,value:"",...e}},BO=t=>{const e=()=>{const s=t.cols.at(0);t.set(a=>[...a,ku(s)])},n=s=>{const a=s.target.dataset.id||"",l=s.target.value;t.set(c=>c.map(u=>{if(a!==u.id)return u;const f=t.cols.find(d=>l===d.id);return ku(f,{value:""})}))},r=s=>{const a=s.target.dataset.id||"",l=s.target.value;t.set(c=>c.map(u=>u.id===a?{...u,operation:Tt[l]}:u))},o=s=>{const a=s.currentTarget.dataset.id||"";t.set(l=>l.filter(c=>c.id!==a))},i=s=>{const a=s.target.dataset.id||"",l=Iu(s.target);t.set(c=>c.map(u=>u.id===a?{...u,value:l}:u))};return T.jsx(b.Fragment,{children:T.jsx(gi,{arrow:!1,title:"Filters",trigger:T.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[T.jsx(dd,{size:14}),"Filtros ",t.filters.length===0?"":` (${t.filters.length})`]}),children:T.jsxs("ul",{className:"mt-4 space-y-2",children:[t.filters.map(s=>{const a=Ou[s.type];return T.jsxs("li",{className:"flex flex-nowrap gap-3",children:[T.jsx(sr,{title:"Filter",options:t.options,placeholder:"Name...",value:s.name,"data-id":s.id,onChange:n}),T.jsx(sr,{title:"Filter type","data-id":s.id,onChange:r,value:s.operation.value,options:a,placeholder:"Operator..."}),T.jsx(us,{"data-id":s.id,onChange:i,placeholder:"Search...",title:"Value",type:s.type,value:s.value}),T.jsx("div",{className:"flex items-center justify-center mt-5",children:T.jsx("button",{"data-id":s.id,type:"button",onClick:o,children:T.jsx(Lr,{className:"text-danger",size:16})})})]},`filter-select-${s.id}`)}),T.jsx("li",{children:T.jsxs("button",{type:"button",onClick:e,className:"text-primary flex items-center gap-1",children:[T.jsx(Ya,{size:14})," New filter"]})})]})})})},zO=({filter:t,onDelete:e,set:n})=>{const r=i=>{const s=i.target.value,a=i.target.dataset.id||"";n(l=>l.map(c=>c.id===a?{...c,operation:Tt[s]}:c))},o=i=>{const s=i.target.dataset.id||"",a=Iu(i.target);n(l=>l.map(c=>c.id===s?{...c,value:a}:c))};return T.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[T.jsx(sr,{onChange:r,options:Ou[t.type],placeholder:"Operation...",title:"Filter type",value:t.operation.value}),T.jsx(us,{"data-id":t.id,onChange:o,placeholder:"Looking for...",title:"Value",type:t.type,value:t.value}),T.jsx("button",{onClick:e,"data-id":t.id,type:"button",className:"mt-4",children:T.jsx(Lr,{className:"text-danger",size:14})})]})},HO=({item:t,onPointerDown:e})=>{const n=ao(0);return T.jsxs(Js.Item,{onPointerDown:e,id:t.groupId,className:"flex flex-row items-center gap-2",value:t,style:{y:n},children:[T.jsx("button",{type:"button",className:"cursor-grab",children:T.jsx(q0,{size:14})}),T.jsx("span",{children:t.groupName})]},t.groupId)},WO=t=>{var a;const e=Pu(t.cols),n=WI(),[r,o]=b.useState(((a=t.groups[0])==null?void 0:a.thead)||""),i=l=>{var m;const c=l.target,u=c.value,f=c.options.selectedIndex,d=((m=c.options.item(f))==null?void 0:m.label)||"";o(d);const h=new mv(t.rows).GroupBy(u),p=t.cols.find(g=>g.id===u);t.setGroups(rS(h).map((g,v)=>{const x=h[g];return{...p,groupId:ta(),groupKey:u,index:v,rows:x,groupName:g}}))},s=()=>t.setGroups([]);return T.jsx(b.Fragment,{children:T.jsxs(gi,{arrow:!1,title:"Groups",trigger:T.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[T.jsx(Z0,{size:14}),"Groups",t.groups.length>0?` - ${r}(${t.groups.length})`:""]}),children:[T.jsxs("div",{className:"flex flex-nowrap items-center",children:[T.jsx(sr,{value:r,title:"Tipo de agrupamento",onChange:i,options:e,placeholder:"Agrupar por..."}),T.jsx(zo,{className:"mt-4",onClick:s,theme:"raw","data-id":r,children:T.jsx(Lr,{size:16,className:"text-danger"})})]}),t.groups.length>0?T.jsxs("section",{className:"my-4",children:[T.jsx("header",{children:T.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),T.jsx(II,{children:T.jsx(Js.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:n,dragListener:!1,layoutScroll:!0,onReorder:t.setGroups,values:t.groups,children:t.groups.map(l=>T.jsx(HO,{item:l,onPointerDown:c=>{n.start(c),t.setGroups([...t.groups])}},l.groupId))})})]}):null]})})},UO=t=>(e,n)=>t.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=e[s]>n[s]?i:e[s]<n[s]?-i:0;return console.log({acc:r,p:a,a:e,b:n,property:s}),r!==0?r:a},0),GO=(t,e)=>t.sort(UO(e)),Du={asc:{label:"Ascending",value:"asc"},desc:{label:"Descending",value:"desc"}},KO=[Du.asc,Du.desc],Mu=(t,e="asc")=>({id:ta(),type:e,value:t.id,label:Du.asc.label}),qO=t=>{const e=()=>{const i=t.cols[0];i&&t.set(s=>[...s,Mu(i)])},n=i=>s=>{const a=s.target.value;t.set(l=>l.map(c=>c.id===i?{...c,value:a}:c))},r=i=>s=>{const a=s.target.value;t.set(l=>l.map(c=>c.id===i?{...c,type:a}:c))},o=i=>{const s=i.currentTarget.dataset.id||"";t.set(a=>a.filter(l=>l.id!==s))};return T.jsx(b.Fragment,{children:T.jsx(gi,{arrow:!1,title:"Order By",trigger:T.jsxs("span",{className:"flex items-center gap-1 proportional-nums text-foreground-description",children:[T.jsx(fd,{size:14}),"Order by ",t.sorters.length===0?"":` (${t.sorters.length})`]}),children:T.jsxs("ul",{className:"mt-4 space-y-2",children:[t.sorters.map(i=>T.jsxs("li",{className:"flex flex-nowrap gap-3",children:[T.jsx(sr,{onChange:n(i.id),options:t.options,title:"Field",placeholder:"Selecione um campo...",value:i.value}),T.jsx(sr,{title:"Sort type",onChange:r(i.id),value:i.type,options:KO,placeholder:"Operação..."}),T.jsx("button",{className:"mt-4","data-id":i.id,onClick:o,children:T.jsx(Lr,{className:"text-danger",size:14})})]},`sorter-select-${i.id}`)),T.jsx("li",{children:T.jsxs("button",{type:"button",onClick:e,className:"text-primary flex items-center gap-1",children:[T.jsx(Ya,{size:14})," Add sort"]})})]})})})},ZO=t=>{const e=t.sorters.find(i=>i.id===t.col.id),[n,r]=b.useState(e?e.type:"undefined"),o=()=>r(i=>i==="undefined"?"asc":i==="asc"?"desc":"undefined");return b.useEffect(()=>{t.setSorters(i=>{if(n==="undefined")return i.filter(a=>a.value!==t.col.id);const s=i.findIndex(a=>a.value===t.col.id);return s===-1?[...i,Mu(t.col,n)]:(i[s]=Mu(t.col,n),[...i])})},[n,t.col]),T.jsxs("button",{className:"isolate flex items-center",onClick:o,type:"button",children:[n==="asc"?T.jsx(Za,{size:14}):null,n==="desc"?T.jsx(W0,{size:14}):null,n==="undefined"?T.jsx(fd,{size:14}):null]})},YO=t=>T.jsx("header",{className:"min-w-full mb-1",children:T.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[T.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[T.jsx("span",{children:T.jsx(BO,{cols:t.cols,options:t.options,filters:t.filters,set:t.setFilters})}),T.jsx("span",{children:T.jsx(qO,{options:t.options,cols:t.cols,sorters:t.sorters,set:t.setSorters})}),T.jsx("span",{children:T.jsx(WO,{rows:t.rows,groups:t.groups,setGroups:t.setGroups,options:t.options,cols:t.cols})})]}),T.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:t.filters.map(e=>T.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[T.jsxs("span",{children:[T.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),e.label," ",e.operation.label.toLowerCase(),":"]}),T.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[T.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:e.value||" "}),T.jsx("input",{type:e.type,value:e.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=Iu(n.target);t.setFilters(o=>o.map(i=>e.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${e.id}`))})]})}),XO={opacity:1},JO={opacity:.75,backgroundColor:"var(--table-border)"},QO={opacity:0,transition:{duration:.4,type:"spring"}},ek=t=>{var r;const e=t.filters.filter(o=>o.name===t.header.id),n=o=>{const i=o.currentTarget.dataset.id||"";return t.setFilters(s=>s.filter(a=>a.id!==i))};return T.jsx(Js.Item,{...t.header.thProps,as:"th",exit:QO,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,value:t.header,whileDrag:JO,animate:XO,className:`hidden px-2 py-4 first:table-cell md:table-cell ${((r=t.header.thProps)==null?void 0:r.className)??""}`,children:T.jsx("span",{className:"flex items-center justify-between",children:T.jsxs("span",{className:"flex items-center gap-1",children:[T.jsx(gi,{title:`Filter by ${kv(t.header)}`,arrow:!0,trigger:T.jsx(dd,{size:14}),children:e.length===0===null?null:T.jsxs("ul",{className:"font-medium",children:[e.map(o=>T.jsx("li",{className:"my-1",children:T.jsx(zO,{onDelete:n,filter:o,set:t.setFilters})},`thead-filter-${o.id}`)),T.jsx("li",{children:T.jsxs("button",{onClick:()=>t.setFilters(o=>o.concat(ku(t.header))),className:"flex items-center",children:[T.jsx(Ya,{size:14})," Add"]})})]})}),T.jsx("span",{className:"pointer-events-auto text-balance text-base",children:t.header.thead}),T.jsx(ZO,{col:t.header,setSorters:t.setSorters,sorters:t.sorters})]})})})},tk=t=>T.jsx(Js.Group,{as:"tr",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:t.headers,onReorder:t.setCols,className:"bg-table-background border-none text-lg",children:T.jsx(vu,{children:t.headers.map(e=>T.jsx(ek,{setFilters:t.setFilters,filters:t.filters,setSorters:t.setSorters,sorters:t.sorters,header:e},`header-child-item-${e.id}`))})}),nk=b.forwardRef((t,e)=>T.jsx("tbody",{...t,className:`divide-y divide-table-border ${t.className??""}`,ref:e,children:T.jsx(vu,{children:t.children})})),rk=b.forwardRef((t,e)=>T.jsx("table",{...t,ref:e,className:`table min-w-full divide-y divide-table-border table-auto text-left ${t.className??""}`})),ok=b.forwardRef((t,e)=>T.jsx("thead",{...t,className:"bg-card-background shadow-xs group:sticky top-0",ref:e})),ik=b.forwardRef((t,e)=>T.jsx("tr",{...t,ref:e,className:`table-row ${t.className??""}`})),sk=b.forwardRef((t,e)=>t.context.loadingMore?T.jsx("tfoot",{...t,ref:e,className:"bg-card-background",children:T.jsx("tr",{className:"bg-card-background",children:T.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:T.jsx("span",{className:"block w-full h-2 bg-foreground rounded opacity-60 animate-pulse"})})})}):null),ak={TableHead:ok,Table:rk,TableBody:nk,TableRow:ik,TableFoot:sk},lk=[0,0,0,0,0,0,0,0,0,0],ck=(t,e,n)=>{const r=n.cols,o=n.loading;return T.jsx(b.Fragment,{children:r.map((i,s)=>{const a=`${s},${t}`,l=Ov(e,i.id),c=i.Element;return b.createElement("td",{...i.cellProps,"data-matrix":a,key:`accessor-${t}-${s}`,className:"px-2 h-14 border-none first:table-cell hidden md:table-cell"},o?T.jsx("div",{className:"animate-pulse h-2 bg-table-border rounded"}):c?T.jsx(c,{row:e,matrix:a,col:i,rowIndex:t,value:l}):T.jsx(b.Fragment,{children:Mo.nil(l)?"":l}))})})},uk=()=>T.jsx(b.Fragment,{}),Dv=({filters:t,onScrollEnd:e,setCols:n,setFilters:r,sorters:o,cols:i,setSorters:s,...a})=>{const l=b.useRef(null),[c,u]=b.useState(!1),f=_v(e),d=_v(a.loadingMore),h=b.useMemo(()=>{if(a.loading)return lk;const p=new mv(a.rows);return t.length>0&&t.forEach(m=>m.value===""||Number.isNaN(m.value)?void 0:p.Where(m.name,m.operation.symbol,m.value)),o.length===0?p.Select():GO(p.Select(),o)},[a.rows,t,o,a.loading]);return b.useEffect(()=>{if(l.current===null)return()=>{};const p=l.current,m=new IntersectionObserver(g=>{var y;return g.forEach(S=>console.log(S.isIntersecting,S.target)),g[g.length-1].isIntersecting&&d.current?((y=f.current)==null||y.call(f),void u(!0)):u(!1)});return m.observe(p),()=>m.disconnect()},[]),T.jsxs("div",{className:"group border border-table-border rounded-lg px-1 min-w-full",children:[T.jsx(n1,{data:h,useWindowScroll:!0,components:ak,totalCount:h.length,itemContent:ck,context:{loading:a.loading,loadingMore:a.loadingMore,cols:i},fixedFooterContent:c?uk:null,fixedHeaderContent:()=>T.jsx(tk,{sorters:o,setSorters:s,filters:t,setFilters:r,headers:i,setCols:n})}),T.jsx("div",{"aria-hidden":"true",ref:l,className:"h-0.5 w-full"})]})},fk=(t,e)=>typeof e=="function"?e(t):e,dk=t=>{const e=t.operations??!0,n=b.useMemo(()=>Pu(t.cols),[t.cols]),[r,o]=Av({cols:t.cols,filters:t.filters??[],groups:t.groups??[],sorters:t.sorters??[]},i=>{const s=a=>l=>{const c=i.state();return{...c,[a]:fk(c[a],l)}};return{cols:s("cols"),filters:s("filters"),groups:s("groups"),sorters:s("sorters")}},{postMiddleware:[i=>{var s;return(s=t.set)==null||s.call(t,i),i}]});return T.jsxs("div",{className:"relative min-w-full",children:[e?T.jsx(YO,{setCols:o.cols,rows:t.rows,cols:r.cols,filters:r.filters,groups:r.groups,options:n,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters}):null,r.groups.length===0?T.jsx(Dv,{...t,onScrollEnd:t.onScrollEnd,cols:r.cols,filters:r.filters,groups:r.groups,index:0,optionCols:n,options:n,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters}):T.jsx("div",{className:"flex flex-wrap gap-4",children:r.groups.map((i,s)=>T.jsx(so.div,{className:"min-w-full",children:T.jsx(Dv,{...t,onScrollEnd:t.onScrollEnd,cols:r.cols,filters:r.filters,group:i,groups:r.groups,index:s,optionCols:n,options:n,rows:i.rows,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters})},`group-${i.groupId}`))})]})};var hk=String.prototype.replace,pk=/%20/g,Fu={RFC1738:"RFC1738",RFC3986:"RFC3986"},Lu={default:Fu.RFC3986,formatters:{RFC1738:function(t){return hk.call(t,pk,"+")},RFC3986:function(t){return String(t)}},RFC1738:Fu.RFC1738,RFC3986:Fu.RFC3986},mk=Lu,Nu=Object.prototype.hasOwnProperty,vr=Array.isArray,cn=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),gk=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(vr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Mv=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<e.length;++o)typeof e[o]<"u"&&(r[o]=e[o]);return r},yk=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(vr(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Nu.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var o=e;return vr(e)&&!vr(n)&&(o=Mv(e,r)),vr(e)&&vr(n)?(n.forEach(function(i,s){if(Nu.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,r):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return Nu.call(i,s)?i[s]=t(i[s],a,r):i[s]=a,i},o)},vk=function(e,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},e)},bk=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Vu=1024,xk=function(e,n,r,o,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;l+=Vu){for(var c=s.length>=Vu?s.slice(l,l+Vu):s,u=[],f=0;f<c.length;++f){var d=c.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||i===mk.RFC1738&&(d===40||d===41)){u[u.length]=c.charAt(f);continue}if(d<128){u[u.length]=cn[d];continue}if(d<2048){u[u.length]=cn[192|d>>6]+cn[128|d&63];continue}if(d<55296||d>=57344){u[u.length]=cn[224|d>>12]+cn[128|d>>6&63]+cn[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|c.charCodeAt(f)&1023),u[u.length]=cn[240|d>>18]+cn[128|d>>12&63]+cn[128|d>>6&63]+cn[128|d&63]}a+=u.join("")}return a},wk=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return gk(n),e},Sk=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Tk=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Ek=function(e,n){return[].concat(e,n)},Ck=function(e,n){if(vr(e)){for(var r=[],o=0;o<e.length;o+=1)r.push(n(e[o]));return r}return n(e)},Fv={arrayToObject:Mv,assign:vk,combine:Ek,compact:wk,decode:bk,encode:xk,isBuffer:Tk,isRegExp:Sk,maybeMap:Ck,merge:yk},Lv=Nw,na=Fv,yi=Lu,Ak=Object.prototype.hasOwnProperty,Nv={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,n){return e+"["+n+"]"},repeat:function(e){return e}},un=Array.isArray,_k=Array.prototype.push,Vv=function(t,e){_k.apply(t,un(e)?e:[e])},Pk=Date.prototype.toISOString,Rv=yi.default,nt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:na.encode,encodeValuesOnly:!1,format:Rv,formatter:yi.formatters[Rv],indices:!1,serializeDate:function(e){return Pk.call(e)},skipNulls:!1,strictNullHandling:!1},Ik=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Ru={},Ok=function t(e,n,r,o,i,s,a,l,c,u,f,d,h,p,m,g,v,x){for(var y=e,S=x,w=0,E=!1;(S=S.get(Ru))!==void 0&&!E;){var _=S.get(e);if(w+=1,typeof _<"u"){if(_===w)throw new RangeError("Cyclic object value");E=!0}typeof S.get(Ru)>"u"&&(w=0)}if(typeof u=="function"?y=u(n,y):y instanceof Date?y=h(y):r==="comma"&&un(y)&&(y=na.maybeMap(y,function(C){return C instanceof Date?h(C):C})),y===null){if(s)return c&&!g?c(n,nt.encoder,v,"key",p):n;y=""}if(Ik(y)||na.isBuffer(y)){if(c){var I=g?n:c(n,nt.encoder,v,"key",p);return[m(I)+"="+m(c(y,nt.encoder,v,"value",p))]}return[m(n)+"="+m(String(y))]}var D=[];if(typeof y>"u")return D;var F;if(r==="comma"&&un(y))g&&c&&(y=na.maybeMap(y,c)),F=[{value:y.length>0?y.join(",")||null:void 0}];else if(un(u))F=u;else{var N=Object.keys(y);F=f?N.sort(f):N}var P=l?n.replace(/\./g,"%2E"):n,$=o&&un(y)&&y.length===1?P+"[]":P;if(i&&un(y)&&y.length===0)return $+"[]";for(var O=0;O<F.length;++O){var A=F[O],L=typeof A=="object"&&typeof A.value<"u"?A.value:y[A];if(!(a&&L===null)){var V=d&&l?A.replace(/\./g,"%2E"):A,z=un(y)?typeof r=="function"?r($,V):$:$+(d?"."+V:"["+V+"]");x.set(e,w);var Z=Lv();Z.set(Ru,x),Vv(D,t(L,z,r,o,i,s,a,l,r==="comma"&&g&&un(y)?null:c,u,f,d,h,p,m,g,v,Z))}}return D},kk=function(e){if(!e)return nt;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=e.charset||nt.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=yi.default;if(typeof e.format<"u"){if(!Ak.call(yi.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var o=yi.formatters[r],i=nt.filter;(typeof e.filter=="function"||un(e.filter))&&(i=e.filter);var s;if(e.arrayFormat in Nv?s=e.arrayFormat:"indices"in e?s=e.indices?"indices":"repeat":s=nt.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:nt.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:nt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:nt.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:nt.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?nt.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:nt.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:nt.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:nt.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:nt.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:nt.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:nt.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:nt.strictNullHandling}},Dk=function(t,e){var n=t,r=kk(e),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):un(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a=Nv[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=Lv(),u=0;u<o.length;++u){var f=o[u];r.skipNulls&&n[f]===null||Vv(s,Ok(n[f],f,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var d=s.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),d.length>0?h+d:""},ho=Fv,$u=Object.prototype.hasOwnProperty,Mk=Array.isArray,Je={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ho.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Fk=function(t){return t.replace(/&#(\d+);/g,function(e,n){return String.fromCharCode(parseInt(n,10))})},$v=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},Lk="utf8=%26%2310003%3B",Nk="utf8=%E2%9C%93",Vk=function(e,n){var r={__proto__:null},o=n.ignoreQueryPrefix?e.replace(/^\?/,""):e;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===Nk?c="utf-8":s[l]===Lk&&(c="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var u=s[l],f=u.indexOf("]="),d=f===-1?u.indexOf("="):f+1,h,p;d===-1?(h=n.decoder(u,Je.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,d),Je.decoder,c,"key"),p=ho.maybeMap($v(u.slice(d+1),n),function(g){return n.decoder(g,Je.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=Fk(p)),u.indexOf("[]=")>-1&&(p=Mk(p)?[p]:p);var m=$u.call(r,h);m&&n.duplicates==="combine"?r[h]=ho.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},Rk=function(t,e,n,r){for(var o=r?e:$v(e,n),i=t.length-1;i>=0;--i){var s,a=t[i];if(a==="[]"&&n.parseArrays)s=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?s={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[],s[u]=o):c!=="__proto__"&&(s[c]=o)}o=s}return o},$k=function(e,n,r,o){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!r.plainObjects&&$u.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var f=0;r.depth>0&&(l=a.exec(i))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&$u.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),Rk(u,n,r,o)}},jk=function(e){if(!e)return Je;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof e.charset>"u"?Je.charset:e.charset,r=typeof e.duplicates>"u"?Je.duplicates:e.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:Je.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:Je.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:Je.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:Je.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:Je.arrayLimit,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Je.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:Je.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:Je.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:Je.decoder,delimiter:typeof e.delimiter=="string"||ho.isRegExp(e.delimiter)?e.delimiter:Je.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:Je.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:Je.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:Je.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:Je.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Je.strictNullHandling}},Bk=function(t,e){var n=jk(e);if(t===""||t===null||typeof t>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof t=="string"?Vk(t,n):t,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],l=$k(a,r[a],n,typeof t=="string");o=ho.merge(o,l,n)}return n.allowSparse===!0?o:ho.compact(o)},zk=Dk,Hk=Bk,Wk=Lu,Uk={formats:Wk,parse:Hk,stringify:zk},Ce;(function(t){t.assertEqual=o=>o;function e(o){}t.assertIs=e;function n(o){throw new Error}t.assertNever=n,t.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},t.getValidEnumValues=o=>{const i=t.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return t.objectValues(s)},t.objectValues=o=>t.objectKeys(o).map(function(i){return o[i]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},t.find=(o,i)=>{for(const s of o)if(i(s))return s},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ce||(Ce={}));var jv;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(jv||(jv={}));const te=Ce.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),br=t=>{switch(typeof t){case"undefined":return te.undefined;case"string":return te.string;case"number":return isNaN(t)?te.nan:te.number;case"boolean":return te.boolean;case"function":return te.function;case"bigint":return te.bigint;case"symbol":return te.symbol;case"object":return Array.isArray(t)?te.array:t===null?te.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?te.promise:typeof Map<"u"&&t instanceof Map?te.map:typeof Set<"u"&&t instanceof Set?te.set:typeof Date<"u"&&t instanceof Date?te.date:te.object;default:return te.unknown}},G=Ce.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 Ht extends Error{constructor(e){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=e}get errors(){return this.issues}format(e){const n=e||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(e){if(!(e instanceof Ht))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ce.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=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(e(o))):r.push(e(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ht.create=t=>new Ht(t);const vi=(t,e)=>{let n;switch(t.code){case G.invalid_type:t.received===te.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case G.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Ce.jsonStringifyReplacer)}`;break;case G.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ce.joinValues(t.keys,", ")}`;break;case G.invalid_union:n="Invalid input";break;case G.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ce.joinValues(t.options)}`;break;case G.invalid_enum_value:n=`Invalid enum value. Expected ${Ce.joinValues(t.options)}, received '${t.received}'`;break;case G.invalid_arguments:n="Invalid function arguments";break;case G.invalid_return_type:n="Invalid function return type";break;case G.invalid_date:n="Invalid date";break;case G.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Ce.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case G.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case G.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case G.custom:n="Invalid input";break;case G.invalid_intersection_types:n="Intersection results could not be merged";break;case G.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case G.not_finite:n="Number must be finite";break;default:n=e.defaultError,Ce.assertNever(t)}return{message:n}};let Gk=vi;function ju(){return Gk}const Bu=t=>{const{data:e,path:n,errorMaps:r,issueData:o}=t,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:e,defaultError:a}).message;return{...o,path:i,message:a}};function Q(t,e){const n=ju(),r=Bu({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===vi?void 0:vi].filter(o=>!!o)});t.common.issues.push(r)}class Et{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const o of n){if(o.status==="aborted")return he;o.status==="dirty"&&e.dirty(),r.push(o.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return Et.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return he;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:e.value,value:r}}}const he=Object.freeze({status:"aborted"}),bi=t=>({status:"dirty",value:t}),kt=t=>({status:"valid",value:t}),Bv=t=>t.status==="aborted",zv=t=>t.status==="dirty",ra=t=>t.status==="valid",oa=t=>typeof Promise<"u"&&t instanceof Promise;function ia(t,e,n,r){if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Hv(t,e,n,r,o){if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}typeof SuppressedError=="function"&&SuppressedError;var ie;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ie||(ie={}));var xi,wi;class fn{constructor(e,n,r,o){this._cachedPath=[],this.parent=e,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 Wv=(t,e)=>{if(ra(e))return{success:!0,data:e.value};if(!t.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 Ht(t.common.issues);return this._error=n,this._error}}};function ge(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:o}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(s,a)=>{var l,c;const{message:u}=t;return s.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class xe{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return br(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:br(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Et,ctx:{common:e.parent.common,data:e.data,parsedType:br(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(oa(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,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:e,parsedType:br(e)},i=this._parseSync({data:e,path:o.path,parent:o});return Wv(o,i)}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,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:e,parsedType:br(e)},o=this._parse({data:e,path:r.path,parent:r}),i=await(oa(o)?o:Promise.resolve(o));return Wv(r,i)}refine(e,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=e(o),a=()=>i.addIssue({code:G.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,o)=>e(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(e){return new An({schema:this,typeName:fe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return _n.create(this,this._def)}nullable(){return Sr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Yt.create(this,this._def)}promise(){return Ei.create(this,this._def)}or(e){return la.create([this,e],this._def)}and(e){return ca.create(this,e,this._def)}transform(e){return new An({...ge(this._def),schema:this,typeName:fe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new pa({...ge(this._def),innerType:this,defaultValue:n,typeName:fe.ZodDefault})}brand(){return new qv({typeName:fe.ZodBranded,type:this,...ge(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new ma({...ge(this._def),innerType:this,catchValue:n,typeName:fe.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return ga.create(this,e)}readonly(){return ya.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Kk=/^c[^\s-]{8,}$/i,qk=/^[0-9a-z]+$/,Zk=/^[0-9A-HJKMNP-TV-Z]{26}$/,Yk=/^[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,Xk=/^[a-z0-9_-]{21}$/i,Jk=/^[-+]?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)?)??$/,Qk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,eD="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let zu;const tD=/^(?:(?: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])$/,nD=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,rD=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Uv="((\\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])))",oD=new RegExp(`^${Uv}$`);function Gv(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function iD(t){return new RegExp(`^${Gv(t)}$`)}function sD(t){let e=`${Uv}T${Gv(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function aD(t,e){return!!((e==="v4"||!e)&&tD.test(t)||(e==="v6"||!e)&&nD.test(t))}class Tn extends xe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==te.string){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.string,received:i.parsedType}),he}const r=new Et;let o;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=e.data.length>i.value,a=e.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(e,o),s?Q(o,{code:G.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&Q(o,{code:G.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Qk.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"email",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")zu||(zu=new RegExp(eD,"u")),zu.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"emoji",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Yk.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"uuid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Xk.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"nanoid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Kk.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"cuid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")qk.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"cuid2",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Zk.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"ulid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),Q(o,{validation:"url",code:G.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"regex",code:G.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?sD(i).test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?oD.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?iD(i).test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Jk.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"duration",code:G.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?aD(e.data,i.version)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"ip",code:G.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?rD.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"base64",code:G.invalid_string,message:i.message}),r.dirty()):Ce.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(o=>e.test(o),{validation:n,code:G.invalid_string,...ie.errToObj(r)})}_addCheck(e){return new Tn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ie.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ie.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ie.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ie.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ie.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ie.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ie.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ie.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ie.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ie.errToObj(e)})}datetime(e){var n,r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(r=e==null?void 0:e.local)!==null&&r!==void 0?r:!1,...ie.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ie.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ie.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...ie.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...ie.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...ie.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...ie.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...ie.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...ie.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...ie.errToObj(n)})}nonempty(e){return this.min(1,ie.errToObj(e))}trim(){return new Tn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Tn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Tn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Tn.create=t=>{var e;return new Tn({checks:[],typeName:fe.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...ge(t)})};function lD(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(t.toFixed(o).replace(".","")),s=parseInt(e.toFixed(o).replace(".",""));return i%s/Math.pow(10,o)}class xr extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==te.number){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.number,received:i.parsedType}),he}let r;const o=new Et;for(const i of this._def.checks)i.kind==="int"?Ce.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),Q(r,{code:G.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?lD(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),Q(r,{code:G.not_finite,message:i.message}),o.dirty()):Ce.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ie.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ie.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ie.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ie.toString(n))}setLimit(e,n,r,o){return new xr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ie.toString(o)}]})}_addCheck(e){return new xr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ie.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ie.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ie.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ie.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ie.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ie.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:ie.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ie.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ie.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ce.isInteger(e.value))}get isFinite(){let e=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"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}xr.create=t=>new xr({checks:[],typeName:fe.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ge(t)});class po extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==te.bigint){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.bigint,received:i.parsedType}),he}let r;const o=new Et;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ce.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ie.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ie.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ie.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ie.toString(n))}setLimit(e,n,r,o){return new po({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ie.toString(o)}]})}_addCheck(e){return new po({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ie.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ie.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ie.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ie.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ie.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}po.create=t=>{var e;return new po({checks:[],typeName:fe.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...ge(t)})};class Hu extends xe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==te.boolean){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.boolean,received:r.parsedType}),he}return kt(e.data)}}Hu.create=t=>new Hu({typeName:fe.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ge(t)});class Si extends xe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==te.date){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.date,received:i.parsedType}),he}if(isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_date}),he}const r=new Et;let o;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ce.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Si({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:ie.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:ie.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Si.create=t=>new Si({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:fe.ZodDate,...ge(t)});class Wu extends xe{_parse(e){if(this._getType(e)!==te.symbol){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.symbol,received:r.parsedType}),he}return kt(e.data)}}Wu.create=t=>new Wu({typeName:fe.ZodSymbol,...ge(t)});class sa extends xe{_parse(e){if(this._getType(e)!==te.undefined){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.undefined,received:r.parsedType}),he}return kt(e.data)}}sa.create=t=>new sa({typeName:fe.ZodUndefined,...ge(t)});class aa extends xe{_parse(e){if(this._getType(e)!==te.null){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.null,received:r.parsedType}),he}return kt(e.data)}}aa.create=t=>new aa({typeName:fe.ZodNull,...ge(t)});class Uu extends xe{constructor(){super(...arguments),this._any=!0}_parse(e){return kt(e.data)}}Uu.create=t=>new Uu({typeName:fe.ZodAny,...ge(t)});class mo extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return kt(e.data)}}mo.create=t=>new mo({typeName:fe.ZodUnknown,...ge(t)});class Xn extends xe{_parse(e){const n=this._getOrReturnCtx(e);return Q(n,{code:G.invalid_type,expected:te.never,received:n.parsedType}),he}}Xn.create=t=>new Xn({typeName:fe.ZodNever,...ge(t)});class Gu extends xe{_parse(e){if(this._getType(e)!==te.undefined){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.void,received:r.parsedType}),he}return kt(e.data)}}Gu.create=t=>new Gu({typeName:fe.ZodVoid,...ge(t)});class Yt extends xe{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),o=this._def;if(n.parsedType!==te.array)return Q(n,{code:G.invalid_type,expected:te.array,received:n.parsedType}),he;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(Q(n,{code:s?G.too_big:G.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(Q(n,{code:G.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&&(Q(n,{code:G.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new fn(n,s,n.path,a)))).then(s=>Et.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new fn(n,s,n.path,a)));return Et.mergeArray(r,i)}get element(){return this._def.type}min(e,n){return new Yt({...this._def,minLength:{value:e,message:ie.toString(n)}})}max(e,n){return new Yt({...this._def,maxLength:{value:e,message:ie.toString(n)}})}length(e,n){return new Yt({...this._def,exactLength:{value:e,message:ie.toString(n)}})}nonempty(e){return this.min(1,e)}}Yt.create=(t,e)=>new Yt({type:t,minLength:null,maxLength:null,exactLength:null,typeName:fe.ZodArray,...ge(e)});function go(t){if(t instanceof Ye){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=_n.create(go(r))}return new Ye({...t._def,shape:()=>e})}else return t instanceof Yt?new Yt({...t._def,type:go(t.element)}):t instanceof _n?_n.create(go(t.unwrap())):t instanceof Sr?Sr.create(go(t.unwrap())):t instanceof Cn?Cn.create(t.items.map(e=>go(e))):t}class Ye extends xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Ce.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==te.object){const c=this._getOrReturnCtx(e);return Q(c,{code:G.invalid_type,expected:te.object,received:c.parsedType}),he}const{status:r,ctx:o}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Xn&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],f=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new fn(o,f,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Xn){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(Q(o,{code:G.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const f=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new fn(o,f,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const f=await u.key,d=await u.value;c.push({key:f,value:d,alwaysSet:u.alwaysSet})}return c}).then(c=>Et.mergeObjectSync(r,c)):Et.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return ie.errToObj,new Ye({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var o,i,s,a;const l=(s=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=ie.errToObj(e).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Ye({...this._def,unknownKeys:"strip"})}passthrough(){return new Ye({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ye({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ye({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:fe.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Ye({...this._def,catchall:e})}pick(e){const n={};return Ce.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Ye({...this._def,shape:()=>n})}omit(e){const n={};return Ce.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new Ye({...this._def,shape:()=>n})}deepPartial(){return go(this)}partial(e){const n={};return Ce.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];e&&!e[r]?n[r]=o:n[r]=o.optional()}),new Ye({...this._def,shape:()=>n})}required(e){const n={};return Ce.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof _n;)i=i._def.innerType;n[r]=i}}),new Ye({...this._def,shape:()=>n})}keyof(){return Kv(Ce.objectKeys(this.shape))}}Ye.create=(t,e)=>new Ye({shape:()=>t,unknownKeys:"strip",catchall:Xn.create(),typeName:fe.ZodObject,...ge(e)}),Ye.strictCreate=(t,e)=>new Ye({shape:()=>t,unknownKeys:"strict",catchall:Xn.create(),typeName:fe.ZodObject,...ge(e)}),Ye.lazycreate=(t,e)=>new Ye({shape:t,unknownKeys:"strip",catchall:Xn.create(),typeName:fe.ZodObject,...ge(e)});class la extends xe{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new Ht(a.ctx.common.issues));return Q(n,{code:G.invalid_union,unionErrors:s}),he}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new Ht(l));return Q(n,{code:G.invalid_union,unionErrors:a}),he}}get options(){return this._def.options}}la.create=(t,e)=>new la({options:t,typeName:fe.ZodUnion,...ge(e)});const En=t=>t instanceof fa?En(t.schema):t instanceof An?En(t.innerType()):t instanceof da?[t.value]:t instanceof wr?t.options:t instanceof ha?Ce.objectValues(t.enum):t instanceof pa?En(t._def.innerType):t instanceof sa?[void 0]:t instanceof aa?[null]:t instanceof _n?[void 0,...En(t.unwrap())]:t instanceof Sr?[null,...En(t.unwrap())]:t instanceof qv||t instanceof ya?En(t.unwrap()):t instanceof ma?En(t._def.innerType):[];class Ku extends xe{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==te.object)return Q(n,{code:G.invalid_type,expected:te.object,received:n.parsedType}),he;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}):(Q(n,{code:G.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),he)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const o=new Map;for(const i of n){const s=En(i.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of s){if(o.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);o.set(a,i)}}return new Ku({typeName:fe.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:o,...ge(r)})}}function qu(t,e){const n=br(t),r=br(e);if(t===e)return{valid:!0,data:t};if(n===te.object&&r===te.object){const o=Ce.objectKeys(e),i=Ce.objectKeys(t).filter(a=>o.indexOf(a)!==-1),s={...t,...e};for(const a of i){const l=qu(t[a],e[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===te.array&&r===te.array){if(t.length!==e.length)return{valid:!1};const o=[];for(let i=0;i<t.length;i++){const s=t[i],a=e[i],l=qu(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===te.date&&r===te.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ca extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),o=(i,s)=>{if(Bv(i)||Bv(s))return he;const a=qu(i.value,s.value);return a.valid?((zv(i)||zv(s))&&n.dirty(),{status:n.value,value:a.data}):(Q(r,{code:G.invalid_intersection_types}),he)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ca.create=(t,e,n)=>new ca({left:t,right:e,typeName:fe.ZodIntersection,...ge(n)});class Cn extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.array)return Q(r,{code:G.invalid_type,expected:te.array,received:r.parsedType}),he;if(r.data.length<this._def.items.length)return Q(r,{code:G.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),he;!this._def.rest&&r.data.length>this._def.items.length&&(Q(r,{code:G.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new fn(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>Et.mergeArray(n,s)):Et.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new Cn({...this._def,rest:e})}}Cn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Cn({items:t,typeName:fe.ZodTuple,rest:null,...ge(e)})};class ua extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.object)return Q(r,{code:G.invalid_type,expected:te.object,received:r.parsedType}),he;const o=[],i=this._def.keyType,s=this._def.valueType;for(const a in r.data)o.push({key:i._parse(new fn(r,a,r.path,a)),value:s._parse(new fn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Et.mergeObjectAsync(n,o):Et.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof xe?new ua({keyType:e,valueType:n,typeName:fe.ZodRecord,...ge(r)}):new ua({keyType:Tn.create(),valueType:e,typeName:fe.ZodRecord,...ge(n)})}}class Zu extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.map)return Q(r,{code:G.invalid_type,expected:te.map,received:r.parsedType}),he;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new fn(r,a,r.path,[c,"key"])),value:i._parse(new fn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return he;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return he;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Zu.create=(t,e,n)=>new Zu({valueType:e,keyType:t,typeName:fe.ZodMap,...ge(n)});class yo extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.set)return Q(r,{code:G.invalid_type,expected:te.set,received:r.parsedType}),he;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(Q(r,{code:G.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&&(Q(r,{code:G.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return he;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new fn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(e,n){return new yo({...this._def,minSize:{value:e,message:ie.toString(n)}})}max(e,n){return new yo({...this._def,maxSize:{value:e,message:ie.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}yo.create=(t,e)=>new yo({valueType:t,minSize:null,maxSize:null,typeName:fe.ZodSet,...ge(e)});class Ti extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==te.function)return Q(n,{code:G.invalid_type,expected:te.function,received:n.parsedType}),he;function r(a,l){return Bu({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ju(),vi].filter(c=>!!c),issueData:{code:G.invalid_arguments,argumentsError:l}})}function o(a,l){return Bu({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ju(),vi].filter(c=>!!c),issueData:{code:G.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof Ei){const a=this;return kt(async function(...l){const c=new Ht([]),u=await a._def.args.parseAsync(l,i).catch(h=>{throw c.addIssue(r(l,h)),c}),f=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(f,i).catch(h=>{throw c.addIssue(o(f,h)),c})})}else{const a=this;return kt(function(...l){const c=a._def.args.safeParse(l,i);if(!c.success)throw new Ht([r(l,c.error)]);const u=Reflect.apply(s,this,c.data),f=a._def.returns.safeParse(u,i);if(!f.success)throw new Ht([o(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Ti({...this._def,args:Cn.create(e).rest(mo.create())})}returns(e){return new Ti({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new Ti({args:e||Cn.create([]).rest(mo.create()),returns:n||mo.create(),typeName:fe.ZodFunction,...ge(r)})}}class fa extends xe{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}fa.create=(t,e)=>new fa({getter:t,typeName:fe.ZodLazy,...ge(e)});class da extends xe{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return Q(n,{received:n.data,code:G.invalid_literal,expected:this._def.value}),he}return{status:"valid",value:e.data}}get value(){return this._def.value}}da.create=(t,e)=>new da({value:t,typeName:fe.ZodLiteral,...ge(e)});function Kv(t,e){return new wr({values:t,typeName:fe.ZodEnum,...ge(e)})}class wr extends xe{constructor(){super(...arguments),xi.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return Q(n,{expected:Ce.joinValues(r),received:n.parsedType,code:G.invalid_type}),he}if(ia(this,xi)||Hv(this,xi,new Set(this._def.values)),!ia(this,xi).has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return Q(n,{received:n.data,code:G.invalid_enum_value,options:r}),he}return kt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return wr.create(e,{...this._def,...n})}exclude(e,n=this._def){return wr.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}xi=new WeakMap,wr.create=Kv;class ha extends xe{constructor(){super(...arguments),wi.set(this,void 0)}_parse(e){const n=Ce.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==te.string&&r.parsedType!==te.number){const o=Ce.objectValues(n);return Q(r,{expected:Ce.joinValues(o),received:r.parsedType,code:G.invalid_type}),he}if(ia(this,wi)||Hv(this,wi,new Set(Ce.getValidEnumValues(this._def.values))),!ia(this,wi).has(e.data)){const o=Ce.objectValues(n);return Q(r,{received:r.data,code:G.invalid_enum_value,options:o}),he}return kt(e.data)}get enum(){return this._def.values}}wi=new WeakMap,ha.create=(t,e)=>new ha({values:t,typeName:fe.ZodNativeEnum,...ge(e)});class Ei extends xe{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==te.promise&&n.common.async===!1)return Q(n,{code:G.invalid_type,expected:te.promise,received:n.parsedType}),he;const r=n.parsedType===te.promise?n.data:Promise.resolve(n.data);return kt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ei.create=(t,e)=>new Ei({type:t,typeName:fe.ZodPromise,...ge(e)});class An extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===fe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),o=this._def.effect||null,i={addIssue:s=>{Q(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return he;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?he:l.status==="dirty"||n.value==="dirty"?bi(l.value):l});{if(n.value==="aborted")return he;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?he:a.status==="dirty"||n.value==="dirty"?bi(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?he:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?he:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ra(s))return s;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>ra(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):s);Ce.assertNever(o)}}An.create=(t,e,n)=>new An({schema:t,typeName:fe.ZodEffects,effect:e,...ge(n)}),An.createWithPreprocess=(t,e,n)=>new An({schema:e,effect:{type:"preprocess",transform:t},typeName:fe.ZodEffects,...ge(n)});class _n extends xe{_parse(e){return this._getType(e)===te.undefined?kt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}_n.create=(t,e)=>new _n({innerType:t,typeName:fe.ZodOptional,...ge(e)});class Sr extends xe{_parse(e){return this._getType(e)===te.null?kt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Sr.create=(t,e)=>new Sr({innerType:t,typeName:fe.ZodNullable,...ge(e)});class pa extends xe{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===te.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}pa.create=(t,e)=>new pa({innerType:t,typeName:fe.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ge(e)});class ma extends xe{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return oa(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ht(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ht(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ma.create=(t,e)=>new ma({innerType:t,typeName:fe.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ge(e)});class Yu extends xe{_parse(e){if(this._getType(e)!==te.nan){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.nan,received:r.parsedType}),he}return{status:"valid",value:e.data}}}Yu.create=t=>new Yu({typeName:fe.ZodNaN,...ge(t)});class qv extends xe{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class ga extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);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"?he:i.status==="dirty"?(n.dirty(),bi(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"?he:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(e,n){return new ga({in:e,out:n,typeName:fe.ZodPipeline})}}class ya extends xe{_parse(e){const n=this._def.innerType._parse(e),r=o=>(ra(o)&&(o.value=Object.freeze(o.value)),o);return oa(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}ya.create=(t,e)=>new ya({innerType:t,typeName:fe.ZodReadonly,...ge(e)}),Ye.lazycreate;var fe;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(fe||(fe={})),Tn.create,xr.create,Yu.create,po.create,Hu.create,Si.create,Wu.create,sa.create,aa.create,Uu.create,mo.create,Xn.create,Gu.create,Yt.create,Ye.create,Ye.strictCreate,la.create,Ku.create,ca.create,Cn.create,ua.create,Zu.create,yo.create,Ti.create,fa.create,da.create,wr.create,ha.create,Ei.create,An.create,_n.create,Sr.create,An.createWithPreprocess,ga.create;const cD={sort:(t,e)=>t.localeCompare(e),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},Zv=t=>{const e=new FormData(t),n=new URLSearchParams(e);return Uk.parse(n.toString(),cD)},Yv=t=>t.replace("[",".").replace("]","").split("."),Xu=(t,e)=>Yv(t).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o instanceof Yt?o.element:o},e),va=t=>t.type==="checkbox"?t.checked:t.type==="number"?t.valueAsNumber:t.value,uD=t=>{const[e,n]=b.useState(null),r=b.useRef({}),o=(l,c)=>{const u=Xu(l,t);return{...c,name:l,id:l,error:e==null?void 0:e[l],ref:f=>{f!==null&&(r.current[l]={element:f,schema:u})}}},i=(l,c)=>{const u=Xu(l,t);return{...c,name:l,id:l,type:Mo.instance(u,xr)?"number":(c==null?void 0:c.type)??"text",error:e==null?void 0:e[l],ref:f=>{f!==null&&(r.current[l]={element:f,schema:u})}}};b.useEffect(()=>{const l=Object.values(r.current).map(u=>{const f=u.schema.safeParse(va(u.element)),d=p=>{const m=u.schema.safeParse(va(p.target)),g=u.element,v=g.name;if(m.success)return g.setCustomValidity(""),n(x=>{const{[v]:y,...S}=x||{};return S===null||Mo.empty(S)?null:S});if(g.required){const x=m.error.issues[0].message;g.setCustomValidity(x),n(y=>({...y,[v]:x}))}},h=u.element.tagName==="INPUT"?"blur":"change";return u.element.addEventListener(h,d),{input:u,hasInitialError:u.element.required?!f.success:!1,unsubscribe:()=>u.element.removeEventListener(h,d)}});return l.some(u=>u.hasInitialError)&&n(u=>u===null?{}:u),()=>l.forEach(u=>u.unsubscribe())});const s=b.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget,f=Object.values(r.current).reduce((h,p)=>{const m=p.element,g=p.schema.safeParse(va(m));if(g.success)return h;const v=g.error.issues[0].message;return m.setAttribute("data-initialized","true"),{...h,[m.name]:v}},{}),d=Mo.empty(f)?null:{};n(d),l==null||l({form:u,errors:d||{}})},[]),a=b.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget;let f=Zv(u);Array.from(u.elements).forEach(d=>{if(d.tagName==="SELECT"){const h=d;f=oh(f,h.name,h.value)}if(d.tagName==="INPUT"){const h=d;f=oh(f,h.name,va(h))}}),l({form:u,json:f,event:c,reset:()=>dp(u)})},[]);return{input:i,select:o,onSubmit:a,errors:e,onInvalid:s,disabled:e!==null}},fD={name:"dark",rounded:{pill:"2rem",card:"0.75rem"},spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},colors:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 9%)",accent:"hsla(199, 89%, 54%)",disabled:"hsla(240, 4%, 33%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 14%, 35%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 21%, 27%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)"},warn:{DEFAULT:"hsla(25, 95%, 53%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(35, 92%, 41%)",foreground:"hsla(210, 40%, 98%)"},danger:{DEFAULT:"hsla(358, 75%, 59%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(210, 40%, 98%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{background:"hsla(0, 0%, 14%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 15%)"},table:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"}}},dD={name:"light",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{pill:"2rem",card:"0.75rem"},colors:{foreground:"hsla(210, 14%, 27%)",background:"hsla(210, 34%, 96%)",accent:"hsla(199, 89%, 54%)",disabled:"hsla(240, 4%, 33%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 14%, 35%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 21%, 27%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)"},warn:{DEFAULT:"hsla(25, 95%, 53%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(35, 92%, 41%)",foreground:"hsla(210, 34%, 96%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(210, 34%, 96%)"},input:{border:"hsla(218, 22%, 80%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 15%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"}}},hD={cssVariable:(t,e,n)=>`var(--${n})`,rgba:t=>`rgba(${t})`,rgb:t=>`rgb(${t})`,hsl:t=>`hsl(${t})`,hsla:t=>`hsla(${t})`,hex:t=>t,raw:t=>t,formatWithVar:t=>(e,n,r)=>`${t}(var(--${r}), <alpha-value>)`},Ci=(t,e,n="",r="")=>Object.entries(t).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(e(s,l,a))}return o.concat(Ci(s,e,n,a))},[]),Xv=(t,e,n="",r="")=>Object.entries(t).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:e(s,i,a)}}return{...o,[i]:Xv(s,e,n,a)}},{}),Jv={default:t=>`:root { ${t} }`,dark:t=>`html.dark {${t}}`},Ju=(t,e)=>{const n=e.value||((o,i)=>i),r=t.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return e.result(r)},pD={default:t=>Ju(t,{result:Jv.default}),dark:t=>Ju(t,{result:Jv.dark})},mD=(t,e)=>{const n=(s,a,l)=>({key:`--${l}`,value:`${s}`}),r=Ci(t.colors,n),o=Ci(t.spacing,n),i=Ci(t.rounded,n);return Ju(r.concat(o,i),{result:s=>`html${e?`.${e}`:""} {${s}}`,value:(s,a)=>a.replace("hsla(","").replace(")","")})};se.Autocomplete=zS,se.Button=zo,se.ButtonGroup=mE,se.Card=sm,se.Checkbox=im,se.ColType=fo,se.Dropdown=gi,se.FileUpload=wE,se.Form=TE,se.Input=us,se.InputFeedback=dh,se.InputField=as,se.Modal=sO,se.Option=ph,se.Polymorph=Bo,se.Select=sr,se.Stats=l1,se.Switch=EE,se.Tab=KI,se.Table=dk,se.Tabs=UI,se.Tag=a1,se.Tooltip=qI,se.TransferList=i1,se.convertPath=Yv,se.createColumns=RO,se.createDesignTokens=Xv,se.createOptionCols=Pu,se.createStyles=pD,se.createTheme=mD,se.css=_t,se.defaultDarkTheme=fD,se.defaultLightTheme=dD,se.formReset=dp,se.formToJson=Zv,se.getSchemaShape=Xu,se.isReactComponent=VS,se.isReactFC=RS,se.isSsr=Au,se.mergeRefs=El,se.parsers=hD,se.path=Ov,se.reduceTokens=Ci,se.useForm=uD,se.usePrevious=hh,se.useReactive=Qy,se.useTablePreferences=jO,se.uuid=ta,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});
|
|
155
|
+
*/var Ev;function FO(){return Ev||(Ev=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=b,e=wv();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;function c(u,f,d,h,p){var m=i(null),g;m.current===null?(g={hasValue:!1,value:null},m.current=g):g=m.current;var v=a(function(){var w=!1,E,_,I=function(P){if(!w){w=!0,E=P;var $=h(P);if(p!==void 0&&g.hasValue){var O=g.value;if(p(O,$))return _=O,O}return _=$,$}var A=E,L=_;if(r(A,P))return L;var V=h(P);return p!==void 0&&p(L,V)?L:(E=P,_=V,V)},D=d===void 0?null:d,F=function(){return I(f())},N=D===null?void 0:function(){return I(D())};return[F,N]},[f,d,h,p]),x=v[0],y=v[1],S=o(u,x,y);return s(function(){g.hasValue=!0,g.value=S},[S]),l(S),S}Tv.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Tv}process.env.NODE_ENV==="production"?MO():FO();const uo=t=>{const e=b.useRef(t??{});return b.useEffect(()=>void(e.current=t),[t]),e},LO=t=>{const e=b.useRef();return b.useEffect(()=>{e.current=t},[t]),e.current},NO=t=>Object.entries(t),Cv=t=>t instanceof Promise,Av=(t,e,n,r)=>e===t?n.reduce((o,i)=>i(o,e,r),t):t.constructor.name===Object.name?n.reduce((o,i)=>i(o,e,r),{...e,...t}):n.reduce((o,i)=>i(o,e,r),t),VO=(t,e,n,r,o,i)=>(...s)=>{const a=performance.now(),l=e(...s),c=(u,f)=>n(d=>Av(u,d,i,f));return Cv(l)?l.then(u=>{o.current={method:t,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:t,props:r(),time:performance.now()-a},void c(l,o.current))},RO=(t,e,n,r,o,i)=>(...s)=>{o.current={method:t,time:0,props:r()};const a=e(...s),l=c=>n(u=>Av(c,u,i,o.current));return Cv(a)?a.then(c=>l(c)):l(a)},_v=(t,e,n)=>{const[r,o]=b.useState(()=>t),i=uo(r),s=uo((n==null?void 0:n.props)??{}),a=uo(e),l=uo((n==null?void 0:n.postMiddleware)??[]),c=uo((n==null?void 0:n.interceptor)??[]),u=b.useRef(t),f=LO(r),d=uo(f),h=b.useRef(null);b.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(g=>{g(r,f,m)})},[r,l,f]);const[p]=b.useState(()=>{const m=()=>s.current,g=a.current({props:m,state:()=>i.current,initialState:u.current,previousState:()=>d.current});return NO(g).reduce((v,[x,y])=>({...v,[x]:n!=null&&n.debug?VO(x,y,o,m,h,c.current):RO(x,y,o,m,h,c.current)}),{})});return[r,p,s.current]},Pv=t=>{const e=b.useRef(t);return b.useEffect(()=>{e.current=t}),e},ta=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)}),Iv=(t,e,n)=>t.split(e).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Ov={basic:/[,[\]]+?/,extend:/[,[\].]+?/},kv=(t,e)=>{const n=Iv(e,Ov.basic,t)||Iv(e,Ov.extend,t);return n===void 0||n===t?void 0:n},Au=()=>typeof window>"u";var _u={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=(g,v)=>{try{Object.keys(g).forEach(v)}catch(x){window.console.log(x)}},n=g=>g==null,r=g=>{const v=typeof g;return v==="string"||v==="number"||v==="boolean"||n(g)},o=(g,v)=>{const x=v.getItem(g);try{return JSON.parse(x)}catch{return x??null}},i=g=>Object.keys(g).reduce((v,x)=>({...v,[x]:o(x,g)}),{}),s=g=>g instanceof Date?g:typeof g=="number"?new Date(new Date*1+g*864e5):g,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(g=>g.split("=")).reduce((g,v)=>(g[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),g),{}),c=new Set,u=()=>{const g=l();c.forEach(v=>v(g))},f=[{name:"expires",parse:g=>`expires=${s(g.expires??a)}`},{name:"maxAge",parse:g=>g.maxAge?`max-age=${s(g.expires??a)}`:""},{name:"path",parse:g=>`path=${g.path??"/"}`},{name:"sameSite",parse:g=>`samesite=${g.sameSite??"strict"}`},{name:"useSecure",parse:g=>`${g.useSecure??!0?"secure":""}`},{name:"domain",parse:g=>{const v=g.domain??"";return v===""?"":`domain=${g.multiDomain?".":""}${v}`}},{name:"partitioned",parse:g=>g.partitioned?"Partitioned":""}],d={json:l,listener:g=>(c.add(g),()=>c.delete(g)),clearListeners:()=>c.clear(),has:g=>document.cookie.split(";").some(v=>v.trim().startsWith(`${g}=`)),deleteAll:()=>{document.cookie.split(";").forEach(g=>{document.cookie=g.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:g=>{const v=d.json()[g];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:g=>{document.cookie=`${encodeURIComponent(g)}=;expires=${new Date().toUTCString()}`,u()},set:(g,v,x={})=>{const y=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=f.reduce((w,E)=>{const _=E.parse(x);return _===""?w:w.concat(_)},[`${encodeURIComponent(g)}=${y}`]).join(";");document.cookie=S,u()}},h=g=>{const v=new Set,x=y=>{g().removeItem(y);const S=i(g());v.forEach(w=>w(S))};return{delete:x,listener:y=>(v.add(y),()=>v.delete(y)),clearListeners:()=>v.clear(),json:(y=!1)=>y?i(g()):g(),has:y=>{const S=g().getItem(y);return!n(S)},deleteAll:()=>{e(g(),x),v.forEach(y=>y(g()))},get:y=>o(y,g()),set:(y,S)=>{g().setItem(y,JSON.stringify(S)),v.forEach(w=>w(g()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);t.Cookie=d,t.LocalStorage=m,t.SessionStorage=p,t.createStorage=h})(_u);const Dv=t=>t.headerLabel??t.thead??t.id,Pu=t=>t.map(e=>({value:e.id,label:e.thead??e.headerLabel??e.id}));var fo=(t=>(t.Boolean="boolean",t.Number="number",t.Select="select",t.Text="text",t))(fo||{});const Iu=t=>t.type==="number"?t.valueAsNumber:t.value,$O=t=>{let e=[];return t({add:(o,i,s)=>e.push({...s,id:o,thead:i}),remove:o=>e=e.filter(i=>i.id!==o)}),e},jO={},BO=(t,e=jO)=>{const n=Au()?null:_u.LocalStorage.get(`@unamed/table-${t}`)||null,[r,o]=_v({name:t,groups:e.groups||(n==null?void 0:n.groups)||[],sorters:e.sorters||(n==null?void 0:n.sorters)||[],filters:e.filters||(n==null?void 0:n.filters)||[],cols:e.cols||(n==null?void 0:n.cols)||[]},i=>{const s=a=>{const l=i.state(),c={...l,...a};return Au()||_u.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>s(a)}});return{...r,...o,name:t}},Tt={contains:{value:"contains",label:"Contains",symbol:"includes"},is:{value:"is",label:"Is",symbol:"is"},isNot:{value:"isNot",label:"Is not",symbol:"!=="},notContains:{value:"notContains",label:"Does not contains",symbol:"notIncludes"},lessThan:{value:"lessThan",label:"Less Than",symbol:"<="},greaterThan:{value:"greaterThan",label:"Greater than",symbol:">="},startsWith:{value:"startsWith",label:"Starts with",symbol:"startsWith"},endsWith:{value:"endsWith",label:"Ends with",symbol:"endsWith"}},Ou={[fo.Text]:[Tt.is,Tt.isNot,Tt.contains,Tt.notContains,Tt.startsWith,Tt.endsWith],[fo.Boolean]:[Tt.is,Tt.isNot],[fo.Number]:[Tt.is,Tt.isNot,Tt.greaterThan,Tt.lessThan]},ku=(t,e={})=>{var s;const n=t.id,r=t.type??fo.Text,o=(s=Ou[r])==null?void 0:s[0].value,i=Tt[o];return{id:ta(),operation:i,label:Dv(t),name:n,type:r,value:"",...e}},zO=t=>{const e=()=>{const s=t.cols.at(0);t.set(a=>[...a,ku(s)])},n=s=>{const a=s.target.dataset.id||"",l=s.target.value;t.set(c=>c.map(u=>{if(a!==u.id)return u;const f=t.cols.find(d=>l===d.id);return ku(f,{value:""})}))},r=s=>{const a=s.target.dataset.id||"",l=s.target.value;t.set(c=>c.map(u=>u.id===a?{...u,operation:Tt[l]}:u))},o=s=>{const a=s.currentTarget.dataset.id||"";t.set(l=>l.filter(c=>c.id!==a))},i=s=>{const a=s.target.dataset.id||"",l=Iu(s.target);t.set(c=>c.map(u=>u.id===a?{...u,value:l}:u))};return T.jsx(b.Fragment,{children:T.jsx(gi,{arrow:!1,title:"Filters",trigger:T.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[T.jsx(dd,{size:14}),"Filtros ",t.filters.length===0?"":` (${t.filters.length})`]}),children:T.jsxs("ul",{className:"mt-4 space-y-2",children:[t.filters.map(s=>{const a=Ou[s.type];return T.jsxs("li",{className:"flex flex-nowrap gap-3",children:[T.jsx(sr,{title:"Filter",options:t.options,placeholder:"Name...",value:s.name,"data-id":s.id,onChange:n}),T.jsx(sr,{title:"Filter type","data-id":s.id,onChange:r,value:s.operation.value,options:a,placeholder:"Operator..."}),T.jsx(us,{"data-id":s.id,onChange:i,placeholder:"Search...",title:"Value",type:s.type,value:s.value}),T.jsx("div",{className:"flex items-center justify-center mt-5",children:T.jsx("button",{"data-id":s.id,type:"button",onClick:o,children:T.jsx(Lr,{className:"text-danger",size:16})})})]},`filter-select-${s.id}`)}),T.jsx("li",{children:T.jsxs("button",{type:"button",onClick:e,className:"text-primary flex items-center gap-1",children:[T.jsx(Ya,{size:14})," New filter"]})})]})})})},HO=({filter:t,onDelete:e,set:n})=>{const r=i=>{const s=i.target.value,a=i.target.dataset.id||"";n(l=>l.map(c=>c.id===a?{...c,operation:Tt[s]}:c))},o=i=>{const s=i.target.dataset.id||"",a=Iu(i.target);n(l=>l.map(c=>c.id===s?{...c,value:a}:c))};return T.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[T.jsx(sr,{onChange:r,options:Ou[t.type],placeholder:"Operation...",title:"Filter type",value:t.operation.value}),T.jsx(us,{"data-id":t.id,onChange:o,placeholder:"Looking for...",title:"Value",type:t.type,value:t.value}),T.jsx("button",{onClick:e,"data-id":t.id,type:"button",className:"mt-4",children:T.jsx(Lr,{className:"text-danger",size:14})})]})},WO=({item:t,onPointerDown:e})=>{const n=ao(0);return T.jsxs(Js.Item,{onPointerDown:e,id:t.groupId,className:"flex flex-row items-center gap-2",value:t,style:{y:n},children:[T.jsx("button",{type:"button",className:"cursor-grab",children:T.jsx(Z0,{size:14})}),T.jsx("span",{children:t.groupName})]},t.groupId)},UO=t=>{var a;const e=Pu(t.cols),n=UI(),[r,o]=b.useState(((a=t.groups[0])==null?void 0:a.thead)||""),i=l=>{var m;const c=l.target,u=c.value,f=c.options.selectedIndex,d=((m=c.options.item(f))==null?void 0:m.label)||"";o(d);const h=new gv(t.rows).GroupBy(u),p=t.cols.find(g=>g.id===u);t.setGroups(oS(h).map((g,v)=>{const x=h[g];return{...p,groupId:ta(),groupKey:u,index:v,rows:x,groupName:g}}))},s=()=>t.setGroups([]);return T.jsx(b.Fragment,{children:T.jsxs(gi,{arrow:!1,title:"Groups",trigger:T.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[T.jsx(Y0,{size:14}),"Groups",t.groups.length>0?` - ${r}(${t.groups.length})`:""]}),children:[T.jsxs("div",{className:"flex flex-nowrap items-center",children:[T.jsx(sr,{value:r,title:"Tipo de agrupamento",onChange:i,options:e,placeholder:"Agrupar por..."}),T.jsx(zo,{className:"mt-4",onClick:s,theme:"raw","data-id":r,children:T.jsx(Lr,{size:16,className:"text-danger"})})]}),t.groups.length>0?T.jsxs("section",{className:"my-4",children:[T.jsx("header",{children:T.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),T.jsx(OI,{children:T.jsx(Js.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:n,dragListener:!1,layoutScroll:!0,onReorder:t.setGroups,values:t.groups,children:t.groups.map(l=>T.jsx(WO,{item:l,onPointerDown:c=>{n.start(c),t.setGroups([...t.groups])}},l.groupId))})})]}):null]})})},GO=t=>(e,n)=>t.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=e[s]>n[s]?i:e[s]<n[s]?-i:0;return console.log({acc:r,p:a,a:e,b:n,property:s}),r!==0?r:a},0),KO=(t,e)=>t.sort(GO(e)),Du={asc:{label:"Ascending",value:"asc"},desc:{label:"Descending",value:"desc"}},qO=[Du.asc,Du.desc],Mu=(t,e="asc")=>({id:ta(),type:e,value:t.id,label:Du.asc.label}),ZO=t=>{const e=()=>{const i=t.cols[0];i&&t.set(s=>[...s,Mu(i)])},n=i=>s=>{const a=s.target.value;t.set(l=>l.map(c=>c.id===i?{...c,value:a}:c))},r=i=>s=>{const a=s.target.value;t.set(l=>l.map(c=>c.id===i?{...c,type:a}:c))},o=i=>{const s=i.currentTarget.dataset.id||"";t.set(a=>a.filter(l=>l.id!==s))};return T.jsx(b.Fragment,{children:T.jsx(gi,{arrow:!1,title:"Order By",trigger:T.jsxs("span",{className:"flex items-center gap-1 proportional-nums text-foreground-description",children:[T.jsx(fd,{size:14}),"Order by ",t.sorters.length===0?"":` (${t.sorters.length})`]}),children:T.jsxs("ul",{className:"mt-4 space-y-2",children:[t.sorters.map(i=>T.jsxs("li",{className:"flex flex-nowrap gap-3",children:[T.jsx(sr,{onChange:n(i.id),options:t.options,title:"Field",placeholder:"Selecione um campo...",value:i.value}),T.jsx(sr,{title:"Sort type",onChange:r(i.id),value:i.type,options:qO,placeholder:"Operação..."}),T.jsx("button",{className:"mt-4","data-id":i.id,onClick:o,children:T.jsx(Lr,{className:"text-danger",size:14})})]},`sorter-select-${i.id}`)),T.jsx("li",{children:T.jsxs("button",{type:"button",onClick:e,className:"text-primary flex items-center gap-1",children:[T.jsx(Ya,{size:14})," Add sort"]})})]})})})},YO=t=>{const e=t.sorters.find(i=>i.id===t.col.id),[n,r]=b.useState(e?e.type:"undefined"),o=()=>r(i=>i==="undefined"?"asc":i==="asc"?"desc":"undefined");return b.useEffect(()=>{t.setSorters(i=>{if(n==="undefined")return i.filter(a=>a.value!==t.col.id);const s=i.findIndex(a=>a.value===t.col.id);return s===-1?[...i,Mu(t.col,n)]:(i[s]=Mu(t.col,n),[...i])})},[n,t.col]),T.jsxs("button",{className:"isolate flex items-center",onClick:o,type:"button",children:[n==="asc"?T.jsx(Za,{size:14}):null,n==="desc"?T.jsx(U0,{size:14}):null,n==="undefined"?T.jsx(fd,{size:14}):null]})},XO=t=>T.jsx("header",{className:"min-w-full mb-1",children:T.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[T.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[T.jsx("span",{children:T.jsx(zO,{cols:t.cols,options:t.options,filters:t.filters,set:t.setFilters})}),T.jsx("span",{children:T.jsx(ZO,{options:t.options,cols:t.cols,sorters:t.sorters,set:t.setSorters})}),T.jsx("span",{children:T.jsx(UO,{rows:t.rows,groups:t.groups,setGroups:t.setGroups,options:t.options,cols:t.cols})})]}),T.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:t.filters.map(e=>T.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[T.jsxs("span",{children:[T.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),e.label," ",e.operation.label.toLowerCase(),":"]}),T.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[T.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:e.value||" "}),T.jsx("input",{type:e.type,value:e.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=Iu(n.target);t.setFilters(o=>o.map(i=>e.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${e.id}`))})]})}),JO={opacity:1},QO={opacity:.75,backgroundColor:"var(--table-border)"},ek={opacity:0,transition:{duration:.4,type:"spring"}},tk=t=>{var r;const e=t.filters.filter(o=>o.name===t.header.id),n=o=>{const i=o.currentTarget.dataset.id||"";return t.setFilters(s=>s.filter(a=>a.id!==i))};return T.jsx(Js.Item,{...t.header.thProps,as:"th",exit:ek,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,value:t.header,whileDrag:QO,animate:JO,className:`hidden px-2 py-4 first:table-cell md:table-cell ${((r=t.header.thProps)==null?void 0:r.className)??""}`,children:T.jsx("span",{className:"flex items-center justify-between",children:T.jsxs("span",{className:"flex items-center gap-1",children:[T.jsx(gi,{title:`Filter by ${Dv(t.header)}`,arrow:!0,trigger:T.jsx(dd,{size:14}),children:e.length===0===null?null:T.jsxs("ul",{className:"font-medium",children:[e.map(o=>T.jsx("li",{className:"my-1",children:T.jsx(HO,{onDelete:n,filter:o,set:t.setFilters})},`thead-filter-${o.id}`)),T.jsx("li",{children:T.jsxs("button",{onClick:()=>t.setFilters(o=>o.concat(ku(t.header))),className:"flex items-center",children:[T.jsx(Ya,{size:14})," Add"]})})]})}),T.jsx("span",{className:"pointer-events-auto text-balance text-base",children:t.header.thead}),T.jsx(YO,{col:t.header,setSorters:t.setSorters,sorters:t.sorters})]})})})},nk=t=>T.jsx(Js.Group,{as:"tr",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:t.headers,onReorder:t.setCols,className:"bg-table-background border-none text-lg",children:T.jsx(vu,{children:t.headers.map(e=>T.jsx(tk,{setFilters:t.setFilters,filters:t.filters,setSorters:t.setSorters,sorters:t.sorters,header:e},`header-child-item-${e.id}`))})}),rk=b.forwardRef((t,e)=>T.jsx("tbody",{...t,className:`divide-y divide-table-border ${t.className??""}`,ref:e,children:T.jsx(vu,{children:t.children})})),ok=b.forwardRef((t,e)=>T.jsx("table",{...t,ref:e,className:`table min-w-full divide-y divide-table-border table-auto text-left ${t.className??""}`})),ik=b.forwardRef((t,e)=>T.jsx("thead",{...t,className:"bg-card-background shadow-xs group:sticky top-0",ref:e})),sk=b.forwardRef((t,e)=>T.jsx("tr",{...t,ref:e,className:`table-row ${t.className??""}`})),ak=b.forwardRef((t,e)=>t.context.loadingMore?T.jsx("tfoot",{...t,ref:e,className:"bg-card-background",children:T.jsx("tr",{className:"bg-card-background",children:T.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:T.jsx("span",{className:"block w-full h-2 bg-foreground rounded opacity-60 animate-pulse"})})})}):null),lk={TableHead:ik,Table:ok,TableBody:rk,TableRow:sk,TableFoot:ak},ck=[0,0,0,0,0,0,0,0,0,0],uk=(t,e,n)=>{const r=n.cols,o=n.loading;return T.jsx(b.Fragment,{children:r.map((i,s)=>{const a=`${s},${t}`,l=kv(e,i.id),c=i.Element;return b.createElement("td",{...i.cellProps,"data-matrix":a,key:`accessor-${t}-${s}`,className:"px-2 h-14 border-none first:table-cell hidden md:table-cell"},o?T.jsx("div",{className:"animate-pulse h-2 bg-table-border rounded"}):c?T.jsx(c,{row:e,matrix:a,col:i,rowIndex:t,value:l}):T.jsx(b.Fragment,{children:Mo.nil(l)?"":l}))})})},fk=()=>T.jsx(b.Fragment,{}),Mv=({filters:t,onScrollEnd:e,setCols:n,setFilters:r,sorters:o,cols:i,setSorters:s,...a})=>{const l=b.useRef(null),[c,u]=b.useState(!1),f=Pv(e),d=Pv(a.loadingMore),h=b.useMemo(()=>{if(a.loading)return ck;const p=new gv(a.rows);return t.length>0&&t.forEach(m=>m.value===""||Number.isNaN(m.value)?void 0:p.Where(m.name,m.operation.symbol,m.value)),o.length===0?p.Select():KO(p.Select(),o)},[a.rows,t,o,a.loading]);return b.useEffect(()=>{if(l.current===null)return()=>{};const p=l.current,m=new IntersectionObserver(g=>{var y;return g.forEach(S=>console.log(S.isIntersecting,S.target)),g[g.length-1].isIntersecting&&d.current?((y=f.current)==null||y.call(f),void u(!0)):u(!1)});return m.observe(p),()=>m.disconnect()},[]),T.jsxs("div",{className:"group border border-table-border rounded-lg px-1 min-w-full",children:[T.jsx(r1,{data:h,useWindowScroll:!0,components:lk,totalCount:h.length,itemContent:uk,context:{loading:a.loading,loadingMore:a.loadingMore,cols:i},fixedFooterContent:c?fk:null,fixedHeaderContent:()=>T.jsx(nk,{sorters:o,setSorters:s,filters:t,setFilters:r,headers:i,setCols:n})}),T.jsx("div",{"aria-hidden":"true",ref:l,className:"h-0.5 w-full"})]})},dk=(t,e)=>typeof e=="function"?e(t):e,hk=t=>{const e=t.operations??!0,n=b.useMemo(()=>Pu(t.cols),[t.cols]),[r,o]=_v({cols:t.cols,filters:t.filters??[],groups:t.groups??[],sorters:t.sorters??[]},i=>{const s=a=>l=>{const c=i.state();return{...c,[a]:dk(c[a],l)}};return{cols:s("cols"),filters:s("filters"),groups:s("groups"),sorters:s("sorters")}},{postMiddleware:[i=>{var s;return(s=t.set)==null||s.call(t,i),i}]});return T.jsxs("div",{className:"relative min-w-full",children:[e?T.jsx(XO,{setCols:o.cols,rows:t.rows,cols:r.cols,filters:r.filters,groups:r.groups,options:n,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters}):null,r.groups.length===0?T.jsx(Mv,{...t,onScrollEnd:t.onScrollEnd,cols:r.cols,filters:r.filters,groups:r.groups,index:0,optionCols:n,options:n,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters}):T.jsx("div",{className:"flex flex-wrap gap-4",children:r.groups.map((i,s)=>T.jsx(so.div,{className:"min-w-full",children:T.jsx(Mv,{...t,onScrollEnd:t.onScrollEnd,cols:r.cols,filters:r.filters,group:i,groups:r.groups,index:s,optionCols:n,options:n,rows:i.rows,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters})},`group-${i.groupId}`))})]})};var pk=String.prototype.replace,mk=/%20/g,Fu={RFC1738:"RFC1738",RFC3986:"RFC3986"},Lu={default:Fu.RFC3986,formatters:{RFC1738:function(t){return pk.call(t,mk,"+")},RFC3986:function(t){return String(t)}},RFC1738:Fu.RFC1738,RFC3986:Fu.RFC3986},gk=Lu,Nu=Object.prototype.hasOwnProperty,vr=Array.isArray,cn=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),yk=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(vr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Fv=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<e.length;++o)typeof e[o]<"u"&&(r[o]=e[o]);return r},vk=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(vr(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Nu.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var o=e;return vr(e)&&!vr(n)&&(o=Fv(e,r)),vr(e)&&vr(n)?(n.forEach(function(i,s){if(Nu.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,r):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return Nu.call(i,s)?i[s]=t(i[s],a,r):i[s]=a,i},o)},bk=function(e,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},e)},xk=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Vu=1024,wk=function(e,n,r,o,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;l+=Vu){for(var c=s.length>=Vu?s.slice(l,l+Vu):s,u=[],f=0;f<c.length;++f){var d=c.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||i===gk.RFC1738&&(d===40||d===41)){u[u.length]=c.charAt(f);continue}if(d<128){u[u.length]=cn[d];continue}if(d<2048){u[u.length]=cn[192|d>>6]+cn[128|d&63];continue}if(d<55296||d>=57344){u[u.length]=cn[224|d>>12]+cn[128|d>>6&63]+cn[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|c.charCodeAt(f)&1023),u[u.length]=cn[240|d>>18]+cn[128|d>>12&63]+cn[128|d>>6&63]+cn[128|d&63]}a+=u.join("")}return a},Sk=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return yk(n),e},Tk=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Ek=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Ck=function(e,n){return[].concat(e,n)},Ak=function(e,n){if(vr(e)){for(var r=[],o=0;o<e.length;o+=1)r.push(n(e[o]));return r}return n(e)},Lv={arrayToObject:Fv,assign:bk,combine:Ck,compact:Sk,decode:xk,encode:wk,isBuffer:Ek,isRegExp:Tk,maybeMap:Ak,merge:vk},Nv=Vw,na=Lv,yi=Lu,_k=Object.prototype.hasOwnProperty,Vv={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,n){return e+"["+n+"]"},repeat:function(e){return e}},un=Array.isArray,Pk=Array.prototype.push,Rv=function(t,e){Pk.apply(t,un(e)?e:[e])},Ik=Date.prototype.toISOString,$v=yi.default,nt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:na.encode,encodeValuesOnly:!1,format:$v,formatter:yi.formatters[$v],indices:!1,serializeDate:function(e){return Ik.call(e)},skipNulls:!1,strictNullHandling:!1},Ok=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Ru={},kk=function t(e,n,r,o,i,s,a,l,c,u,f,d,h,p,m,g,v,x){for(var y=e,S=x,w=0,E=!1;(S=S.get(Ru))!==void 0&&!E;){var _=S.get(e);if(w+=1,typeof _<"u"){if(_===w)throw new RangeError("Cyclic object value");E=!0}typeof S.get(Ru)>"u"&&(w=0)}if(typeof u=="function"?y=u(n,y):y instanceof Date?y=h(y):r==="comma"&&un(y)&&(y=na.maybeMap(y,function(C){return C instanceof Date?h(C):C})),y===null){if(s)return c&&!g?c(n,nt.encoder,v,"key",p):n;y=""}if(Ok(y)||na.isBuffer(y)){if(c){var I=g?n:c(n,nt.encoder,v,"key",p);return[m(I)+"="+m(c(y,nt.encoder,v,"value",p))]}return[m(n)+"="+m(String(y))]}var D=[];if(typeof y>"u")return D;var F;if(r==="comma"&&un(y))g&&c&&(y=na.maybeMap(y,c)),F=[{value:y.length>0?y.join(",")||null:void 0}];else if(un(u))F=u;else{var N=Object.keys(y);F=f?N.sort(f):N}var P=l?n.replace(/\./g,"%2E"):n,$=o&&un(y)&&y.length===1?P+"[]":P;if(i&&un(y)&&y.length===0)return $+"[]";for(var O=0;O<F.length;++O){var A=F[O],L=typeof A=="object"&&typeof A.value<"u"?A.value:y[A];if(!(a&&L===null)){var V=d&&l?A.replace(/\./g,"%2E"):A,z=un(y)?typeof r=="function"?r($,V):$:$+(d?"."+V:"["+V+"]");x.set(e,w);var Z=Nv();Z.set(Ru,x),Rv(D,t(L,z,r,o,i,s,a,l,r==="comma"&&g&&un(y)?null:c,u,f,d,h,p,m,g,v,Z))}}return D},Dk=function(e){if(!e)return nt;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=e.charset||nt.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=yi.default;if(typeof e.format<"u"){if(!_k.call(yi.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var o=yi.formatters[r],i=nt.filter;(typeof e.filter=="function"||un(e.filter))&&(i=e.filter);var s;if(e.arrayFormat in Vv?s=e.arrayFormat:"indices"in e?s=e.indices?"indices":"repeat":s=nt.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:nt.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:nt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:nt.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:nt.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?nt.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:nt.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:nt.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:nt.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:nt.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:nt.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:nt.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:nt.strictNullHandling}},Mk=function(t,e){var n=t,r=Dk(e),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):un(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a=Vv[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=Nv(),u=0;u<o.length;++u){var f=o[u];r.skipNulls&&n[f]===null||Rv(s,kk(n[f],f,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var d=s.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),d.length>0?h+d:""},ho=Lv,$u=Object.prototype.hasOwnProperty,Fk=Array.isArray,Je={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ho.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Lk=function(t){return t.replace(/&#(\d+);/g,function(e,n){return String.fromCharCode(parseInt(n,10))})},jv=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},Nk="utf8=%26%2310003%3B",Vk="utf8=%E2%9C%93",Rk=function(e,n){var r={__proto__:null},o=n.ignoreQueryPrefix?e.replace(/^\?/,""):e;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===Vk?c="utf-8":s[l]===Nk&&(c="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var u=s[l],f=u.indexOf("]="),d=f===-1?u.indexOf("="):f+1,h,p;d===-1?(h=n.decoder(u,Je.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,d),Je.decoder,c,"key"),p=ho.maybeMap(jv(u.slice(d+1),n),function(g){return n.decoder(g,Je.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=Lk(p)),u.indexOf("[]=")>-1&&(p=Fk(p)?[p]:p);var m=$u.call(r,h);m&&n.duplicates==="combine"?r[h]=ho.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},$k=function(t,e,n,r){for(var o=r?e:jv(e,n),i=t.length-1;i>=0;--i){var s,a=t[i];if(a==="[]"&&n.parseArrays)s=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?s={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[],s[u]=o):c!=="__proto__"&&(s[c]=o)}o=s}return o},jk=function(e,n,r,o){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!r.plainObjects&&$u.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var f=0;r.depth>0&&(l=a.exec(i))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&$u.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),$k(u,n,r,o)}},Bk=function(e){if(!e)return Je;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof e.charset>"u"?Je.charset:e.charset,r=typeof e.duplicates>"u"?Je.duplicates:e.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:Je.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:Je.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:Je.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:Je.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:Je.arrayLimit,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Je.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:Je.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:Je.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:Je.decoder,delimiter:typeof e.delimiter=="string"||ho.isRegExp(e.delimiter)?e.delimiter:Je.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:Je.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:Je.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:Je.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:Je.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Je.strictNullHandling}},zk=function(t,e){var n=Bk(e);if(t===""||t===null||typeof t>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof t=="string"?Rk(t,n):t,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],l=jk(a,r[a],n,typeof t=="string");o=ho.merge(o,l,n)}return n.allowSparse===!0?o:ho.compact(o)},Hk=Mk,Wk=zk,Uk=Lu,Gk={formats:Uk,parse:Wk,stringify:Hk},Ce;(function(t){t.assertEqual=o=>o;function e(o){}t.assertIs=e;function n(o){throw new Error}t.assertNever=n,t.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},t.getValidEnumValues=o=>{const i=t.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return t.objectValues(s)},t.objectValues=o=>t.objectKeys(o).map(function(i){return o[i]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},t.find=(o,i)=>{for(const s of o)if(i(s))return s},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ce||(Ce={}));var Bv;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Bv||(Bv={}));const te=Ce.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),br=t=>{switch(typeof t){case"undefined":return te.undefined;case"string":return te.string;case"number":return isNaN(t)?te.nan:te.number;case"boolean":return te.boolean;case"function":return te.function;case"bigint":return te.bigint;case"symbol":return te.symbol;case"object":return Array.isArray(t)?te.array:t===null?te.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?te.promise:typeof Map<"u"&&t instanceof Map?te.map:typeof Set<"u"&&t instanceof Set?te.set:typeof Date<"u"&&t instanceof Date?te.date:te.object;default:return te.unknown}},G=Ce.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 Ht extends Error{constructor(e){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=e}get errors(){return this.issues}format(e){const n=e||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(e){if(!(e instanceof Ht))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ce.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=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(e(o))):r.push(e(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ht.create=t=>new Ht(t);const vi=(t,e)=>{let n;switch(t.code){case G.invalid_type:t.received===te.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case G.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Ce.jsonStringifyReplacer)}`;break;case G.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ce.joinValues(t.keys,", ")}`;break;case G.invalid_union:n="Invalid input";break;case G.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ce.joinValues(t.options)}`;break;case G.invalid_enum_value:n=`Invalid enum value. Expected ${Ce.joinValues(t.options)}, received '${t.received}'`;break;case G.invalid_arguments:n="Invalid function arguments";break;case G.invalid_return_type:n="Invalid function return type";break;case G.invalid_date:n="Invalid date";break;case G.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Ce.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case G.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case G.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case G.custom:n="Invalid input";break;case G.invalid_intersection_types:n="Intersection results could not be merged";break;case G.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case G.not_finite:n="Number must be finite";break;default:n=e.defaultError,Ce.assertNever(t)}return{message:n}};let Kk=vi;function ju(){return Kk}const Bu=t=>{const{data:e,path:n,errorMaps:r,issueData:o}=t,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:e,defaultError:a}).message;return{...o,path:i,message:a}};function Q(t,e){const n=ju(),r=Bu({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===vi?void 0:vi].filter(o=>!!o)});t.common.issues.push(r)}class Et{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const o of n){if(o.status==="aborted")return he;o.status==="dirty"&&e.dirty(),r.push(o.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return Et.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return he;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:e.value,value:r}}}const he=Object.freeze({status:"aborted"}),bi=t=>({status:"dirty",value:t}),kt=t=>({status:"valid",value:t}),zv=t=>t.status==="aborted",Hv=t=>t.status==="dirty",ra=t=>t.status==="valid",oa=t=>typeof Promise<"u"&&t instanceof Promise;function ia(t,e,n,r){if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Wv(t,e,n,r,o){if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}typeof SuppressedError=="function"&&SuppressedError;var ie;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ie||(ie={}));var xi,wi;class fn{constructor(e,n,r,o){this._cachedPath=[],this.parent=e,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 Uv=(t,e)=>{if(ra(e))return{success:!0,data:e.value};if(!t.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 Ht(t.common.issues);return this._error=n,this._error}}};function ge(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:o}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(s,a)=>{var l,c;const{message:u}=t;return s.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class xe{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return br(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:br(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Et,ctx:{common:e.parent.common,data:e.data,parsedType:br(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(oa(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,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:e,parsedType:br(e)},i=this._parseSync({data:e,path:o.path,parent:o});return Uv(o,i)}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,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:e,parsedType:br(e)},o=this._parse({data:e,path:r.path,parent:r}),i=await(oa(o)?o:Promise.resolve(o));return Uv(r,i)}refine(e,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=e(o),a=()=>i.addIssue({code:G.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,o)=>e(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(e){return new An({schema:this,typeName:fe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return _n.create(this,this._def)}nullable(){return Sr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Yt.create(this,this._def)}promise(){return Ei.create(this,this._def)}or(e){return la.create([this,e],this._def)}and(e){return ca.create(this,e,this._def)}transform(e){return new An({...ge(this._def),schema:this,typeName:fe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new pa({...ge(this._def),innerType:this,defaultValue:n,typeName:fe.ZodDefault})}brand(){return new Zv({typeName:fe.ZodBranded,type:this,...ge(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new ma({...ge(this._def),innerType:this,catchValue:n,typeName:fe.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return ga.create(this,e)}readonly(){return ya.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const qk=/^c[^\s-]{8,}$/i,Zk=/^[0-9a-z]+$/,Yk=/^[0-9A-HJKMNP-TV-Z]{26}$/,Xk=/^[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,Jk=/^[a-z0-9_-]{21}$/i,Qk=/^[-+]?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)?)??$/,eD=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,tD="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let zu;const nD=/^(?:(?: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])$/,rD=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,oD=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Gv="((\\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])))",iD=new RegExp(`^${Gv}$`);function Kv(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function sD(t){return new RegExp(`^${Kv(t)}$`)}function aD(t){let e=`${Gv}T${Kv(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function lD(t,e){return!!((e==="v4"||!e)&&nD.test(t)||(e==="v6"||!e)&&rD.test(t))}class Tn extends xe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==te.string){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.string,received:i.parsedType}),he}const r=new Et;let o;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=e.data.length>i.value,a=e.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(e,o),s?Q(o,{code:G.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&Q(o,{code:G.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")eD.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"email",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")zu||(zu=new RegExp(tD,"u")),zu.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"emoji",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Xk.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"uuid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Jk.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"nanoid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")qk.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"cuid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Zk.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"cuid2",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Yk.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"ulid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),Q(o,{validation:"url",code:G.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"regex",code:G.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?aD(i).test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?iD.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?sD(i).test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Qk.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"duration",code:G.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?lD(e.data,i.version)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"ip",code:G.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?oD.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"base64",code:G.invalid_string,message:i.message}),r.dirty()):Ce.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(o=>e.test(o),{validation:n,code:G.invalid_string,...ie.errToObj(r)})}_addCheck(e){return new Tn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ie.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ie.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ie.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ie.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ie.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ie.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ie.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ie.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ie.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ie.errToObj(e)})}datetime(e){var n,r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(r=e==null?void 0:e.local)!==null&&r!==void 0?r:!1,...ie.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ie.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ie.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...ie.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...ie.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...ie.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...ie.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...ie.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...ie.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...ie.errToObj(n)})}nonempty(e){return this.min(1,ie.errToObj(e))}trim(){return new Tn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Tn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Tn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Tn.create=t=>{var e;return new Tn({checks:[],typeName:fe.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...ge(t)})};function cD(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(t.toFixed(o).replace(".","")),s=parseInt(e.toFixed(o).replace(".",""));return i%s/Math.pow(10,o)}class xr extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==te.number){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.number,received:i.parsedType}),he}let r;const o=new Et;for(const i of this._def.checks)i.kind==="int"?Ce.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),Q(r,{code:G.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?cD(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),Q(r,{code:G.not_finite,message:i.message}),o.dirty()):Ce.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ie.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ie.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ie.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ie.toString(n))}setLimit(e,n,r,o){return new xr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ie.toString(o)}]})}_addCheck(e){return new xr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ie.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ie.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ie.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ie.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ie.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ie.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:ie.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ie.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ie.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ce.isInteger(e.value))}get isFinite(){let e=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"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}xr.create=t=>new xr({checks:[],typeName:fe.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ge(t)});class po extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==te.bigint){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.bigint,received:i.parsedType}),he}let r;const o=new Et;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ce.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ie.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ie.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ie.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ie.toString(n))}setLimit(e,n,r,o){return new po({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ie.toString(o)}]})}_addCheck(e){return new po({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ie.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ie.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ie.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ie.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ie.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}po.create=t=>{var e;return new po({checks:[],typeName:fe.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...ge(t)})};class Hu extends xe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==te.boolean){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.boolean,received:r.parsedType}),he}return kt(e.data)}}Hu.create=t=>new Hu({typeName:fe.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ge(t)});class Si extends xe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==te.date){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.date,received:i.parsedType}),he}if(isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_date}),he}const r=new Et;let o;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ce.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Si({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:ie.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:ie.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Si.create=t=>new Si({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:fe.ZodDate,...ge(t)});class Wu extends xe{_parse(e){if(this._getType(e)!==te.symbol){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.symbol,received:r.parsedType}),he}return kt(e.data)}}Wu.create=t=>new Wu({typeName:fe.ZodSymbol,...ge(t)});class sa extends xe{_parse(e){if(this._getType(e)!==te.undefined){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.undefined,received:r.parsedType}),he}return kt(e.data)}}sa.create=t=>new sa({typeName:fe.ZodUndefined,...ge(t)});class aa extends xe{_parse(e){if(this._getType(e)!==te.null){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.null,received:r.parsedType}),he}return kt(e.data)}}aa.create=t=>new aa({typeName:fe.ZodNull,...ge(t)});class Uu extends xe{constructor(){super(...arguments),this._any=!0}_parse(e){return kt(e.data)}}Uu.create=t=>new Uu({typeName:fe.ZodAny,...ge(t)});class mo extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return kt(e.data)}}mo.create=t=>new mo({typeName:fe.ZodUnknown,...ge(t)});class Xn extends xe{_parse(e){const n=this._getOrReturnCtx(e);return Q(n,{code:G.invalid_type,expected:te.never,received:n.parsedType}),he}}Xn.create=t=>new Xn({typeName:fe.ZodNever,...ge(t)});class Gu extends xe{_parse(e){if(this._getType(e)!==te.undefined){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.void,received:r.parsedType}),he}return kt(e.data)}}Gu.create=t=>new Gu({typeName:fe.ZodVoid,...ge(t)});class Yt extends xe{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),o=this._def;if(n.parsedType!==te.array)return Q(n,{code:G.invalid_type,expected:te.array,received:n.parsedType}),he;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(Q(n,{code:s?G.too_big:G.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(Q(n,{code:G.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&&(Q(n,{code:G.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new fn(n,s,n.path,a)))).then(s=>Et.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new fn(n,s,n.path,a)));return Et.mergeArray(r,i)}get element(){return this._def.type}min(e,n){return new Yt({...this._def,minLength:{value:e,message:ie.toString(n)}})}max(e,n){return new Yt({...this._def,maxLength:{value:e,message:ie.toString(n)}})}length(e,n){return new Yt({...this._def,exactLength:{value:e,message:ie.toString(n)}})}nonempty(e){return this.min(1,e)}}Yt.create=(t,e)=>new Yt({type:t,minLength:null,maxLength:null,exactLength:null,typeName:fe.ZodArray,...ge(e)});function go(t){if(t instanceof Ye){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=_n.create(go(r))}return new Ye({...t._def,shape:()=>e})}else return t instanceof Yt?new Yt({...t._def,type:go(t.element)}):t instanceof _n?_n.create(go(t.unwrap())):t instanceof Sr?Sr.create(go(t.unwrap())):t instanceof Cn?Cn.create(t.items.map(e=>go(e))):t}class Ye extends xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Ce.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==te.object){const c=this._getOrReturnCtx(e);return Q(c,{code:G.invalid_type,expected:te.object,received:c.parsedType}),he}const{status:r,ctx:o}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Xn&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],f=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new fn(o,f,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Xn){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(Q(o,{code:G.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const f=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new fn(o,f,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const f=await u.key,d=await u.value;c.push({key:f,value:d,alwaysSet:u.alwaysSet})}return c}).then(c=>Et.mergeObjectSync(r,c)):Et.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return ie.errToObj,new Ye({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var o,i,s,a;const l=(s=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=ie.errToObj(e).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Ye({...this._def,unknownKeys:"strip"})}passthrough(){return new Ye({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ye({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ye({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:fe.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Ye({...this._def,catchall:e})}pick(e){const n={};return Ce.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Ye({...this._def,shape:()=>n})}omit(e){const n={};return Ce.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new Ye({...this._def,shape:()=>n})}deepPartial(){return go(this)}partial(e){const n={};return Ce.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];e&&!e[r]?n[r]=o:n[r]=o.optional()}),new Ye({...this._def,shape:()=>n})}required(e){const n={};return Ce.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof _n;)i=i._def.innerType;n[r]=i}}),new Ye({...this._def,shape:()=>n})}keyof(){return qv(Ce.objectKeys(this.shape))}}Ye.create=(t,e)=>new Ye({shape:()=>t,unknownKeys:"strip",catchall:Xn.create(),typeName:fe.ZodObject,...ge(e)}),Ye.strictCreate=(t,e)=>new Ye({shape:()=>t,unknownKeys:"strict",catchall:Xn.create(),typeName:fe.ZodObject,...ge(e)}),Ye.lazycreate=(t,e)=>new Ye({shape:t,unknownKeys:"strip",catchall:Xn.create(),typeName:fe.ZodObject,...ge(e)});class la extends xe{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new Ht(a.ctx.common.issues));return Q(n,{code:G.invalid_union,unionErrors:s}),he}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new Ht(l));return Q(n,{code:G.invalid_union,unionErrors:a}),he}}get options(){return this._def.options}}la.create=(t,e)=>new la({options:t,typeName:fe.ZodUnion,...ge(e)});const En=t=>t instanceof fa?En(t.schema):t instanceof An?En(t.innerType()):t instanceof da?[t.value]:t instanceof wr?t.options:t instanceof ha?Ce.objectValues(t.enum):t instanceof pa?En(t._def.innerType):t instanceof sa?[void 0]:t instanceof aa?[null]:t instanceof _n?[void 0,...En(t.unwrap())]:t instanceof Sr?[null,...En(t.unwrap())]:t instanceof Zv||t instanceof ya?En(t.unwrap()):t instanceof ma?En(t._def.innerType):[];class Ku extends xe{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==te.object)return Q(n,{code:G.invalid_type,expected:te.object,received:n.parsedType}),he;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}):(Q(n,{code:G.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),he)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const o=new Map;for(const i of n){const s=En(i.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of s){if(o.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);o.set(a,i)}}return new Ku({typeName:fe.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:o,...ge(r)})}}function qu(t,e){const n=br(t),r=br(e);if(t===e)return{valid:!0,data:t};if(n===te.object&&r===te.object){const o=Ce.objectKeys(e),i=Ce.objectKeys(t).filter(a=>o.indexOf(a)!==-1),s={...t,...e};for(const a of i){const l=qu(t[a],e[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===te.array&&r===te.array){if(t.length!==e.length)return{valid:!1};const o=[];for(let i=0;i<t.length;i++){const s=t[i],a=e[i],l=qu(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===te.date&&r===te.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ca extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),o=(i,s)=>{if(zv(i)||zv(s))return he;const a=qu(i.value,s.value);return a.valid?((Hv(i)||Hv(s))&&n.dirty(),{status:n.value,value:a.data}):(Q(r,{code:G.invalid_intersection_types}),he)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ca.create=(t,e,n)=>new ca({left:t,right:e,typeName:fe.ZodIntersection,...ge(n)});class Cn extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.array)return Q(r,{code:G.invalid_type,expected:te.array,received:r.parsedType}),he;if(r.data.length<this._def.items.length)return Q(r,{code:G.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),he;!this._def.rest&&r.data.length>this._def.items.length&&(Q(r,{code:G.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new fn(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>Et.mergeArray(n,s)):Et.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new Cn({...this._def,rest:e})}}Cn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Cn({items:t,typeName:fe.ZodTuple,rest:null,...ge(e)})};class ua extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.object)return Q(r,{code:G.invalid_type,expected:te.object,received:r.parsedType}),he;const o=[],i=this._def.keyType,s=this._def.valueType;for(const a in r.data)o.push({key:i._parse(new fn(r,a,r.path,a)),value:s._parse(new fn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Et.mergeObjectAsync(n,o):Et.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof xe?new ua({keyType:e,valueType:n,typeName:fe.ZodRecord,...ge(r)}):new ua({keyType:Tn.create(),valueType:e,typeName:fe.ZodRecord,...ge(n)})}}class Zu extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.map)return Q(r,{code:G.invalid_type,expected:te.map,received:r.parsedType}),he;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new fn(r,a,r.path,[c,"key"])),value:i._parse(new fn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return he;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return he;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Zu.create=(t,e,n)=>new Zu({valueType:e,keyType:t,typeName:fe.ZodMap,...ge(n)});class yo extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.set)return Q(r,{code:G.invalid_type,expected:te.set,received:r.parsedType}),he;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(Q(r,{code:G.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&&(Q(r,{code:G.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return he;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new fn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(e,n){return new yo({...this._def,minSize:{value:e,message:ie.toString(n)}})}max(e,n){return new yo({...this._def,maxSize:{value:e,message:ie.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}yo.create=(t,e)=>new yo({valueType:t,minSize:null,maxSize:null,typeName:fe.ZodSet,...ge(e)});class Ti extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==te.function)return Q(n,{code:G.invalid_type,expected:te.function,received:n.parsedType}),he;function r(a,l){return Bu({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ju(),vi].filter(c=>!!c),issueData:{code:G.invalid_arguments,argumentsError:l}})}function o(a,l){return Bu({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ju(),vi].filter(c=>!!c),issueData:{code:G.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof Ei){const a=this;return kt(async function(...l){const c=new Ht([]),u=await a._def.args.parseAsync(l,i).catch(h=>{throw c.addIssue(r(l,h)),c}),f=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(f,i).catch(h=>{throw c.addIssue(o(f,h)),c})})}else{const a=this;return kt(function(...l){const c=a._def.args.safeParse(l,i);if(!c.success)throw new Ht([r(l,c.error)]);const u=Reflect.apply(s,this,c.data),f=a._def.returns.safeParse(u,i);if(!f.success)throw new Ht([o(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Ti({...this._def,args:Cn.create(e).rest(mo.create())})}returns(e){return new Ti({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new Ti({args:e||Cn.create([]).rest(mo.create()),returns:n||mo.create(),typeName:fe.ZodFunction,...ge(r)})}}class fa extends xe{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}fa.create=(t,e)=>new fa({getter:t,typeName:fe.ZodLazy,...ge(e)});class da extends xe{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return Q(n,{received:n.data,code:G.invalid_literal,expected:this._def.value}),he}return{status:"valid",value:e.data}}get value(){return this._def.value}}da.create=(t,e)=>new da({value:t,typeName:fe.ZodLiteral,...ge(e)});function qv(t,e){return new wr({values:t,typeName:fe.ZodEnum,...ge(e)})}class wr extends xe{constructor(){super(...arguments),xi.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return Q(n,{expected:Ce.joinValues(r),received:n.parsedType,code:G.invalid_type}),he}if(ia(this,xi)||Wv(this,xi,new Set(this._def.values)),!ia(this,xi).has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return Q(n,{received:n.data,code:G.invalid_enum_value,options:r}),he}return kt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return wr.create(e,{...this._def,...n})}exclude(e,n=this._def){return wr.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}xi=new WeakMap,wr.create=qv;class ha extends xe{constructor(){super(...arguments),wi.set(this,void 0)}_parse(e){const n=Ce.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==te.string&&r.parsedType!==te.number){const o=Ce.objectValues(n);return Q(r,{expected:Ce.joinValues(o),received:r.parsedType,code:G.invalid_type}),he}if(ia(this,wi)||Wv(this,wi,new Set(Ce.getValidEnumValues(this._def.values))),!ia(this,wi).has(e.data)){const o=Ce.objectValues(n);return Q(r,{received:r.data,code:G.invalid_enum_value,options:o}),he}return kt(e.data)}get enum(){return this._def.values}}wi=new WeakMap,ha.create=(t,e)=>new ha({values:t,typeName:fe.ZodNativeEnum,...ge(e)});class Ei extends xe{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==te.promise&&n.common.async===!1)return Q(n,{code:G.invalid_type,expected:te.promise,received:n.parsedType}),he;const r=n.parsedType===te.promise?n.data:Promise.resolve(n.data);return kt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ei.create=(t,e)=>new Ei({type:t,typeName:fe.ZodPromise,...ge(e)});class An extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===fe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),o=this._def.effect||null,i={addIssue:s=>{Q(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return he;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?he:l.status==="dirty"||n.value==="dirty"?bi(l.value):l});{if(n.value==="aborted")return he;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?he:a.status==="dirty"||n.value==="dirty"?bi(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?he:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?he:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ra(s))return s;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>ra(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):s);Ce.assertNever(o)}}An.create=(t,e,n)=>new An({schema:t,typeName:fe.ZodEffects,effect:e,...ge(n)}),An.createWithPreprocess=(t,e,n)=>new An({schema:e,effect:{type:"preprocess",transform:t},typeName:fe.ZodEffects,...ge(n)});class _n extends xe{_parse(e){return this._getType(e)===te.undefined?kt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}_n.create=(t,e)=>new _n({innerType:t,typeName:fe.ZodOptional,...ge(e)});class Sr extends xe{_parse(e){return this._getType(e)===te.null?kt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Sr.create=(t,e)=>new Sr({innerType:t,typeName:fe.ZodNullable,...ge(e)});class pa extends xe{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===te.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}pa.create=(t,e)=>new pa({innerType:t,typeName:fe.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ge(e)});class ma extends xe{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return oa(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ht(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ht(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ma.create=(t,e)=>new ma({innerType:t,typeName:fe.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ge(e)});class Yu extends xe{_parse(e){if(this._getType(e)!==te.nan){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.nan,received:r.parsedType}),he}return{status:"valid",value:e.data}}}Yu.create=t=>new Yu({typeName:fe.ZodNaN,...ge(t)});class Zv extends xe{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class ga extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);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"?he:i.status==="dirty"?(n.dirty(),bi(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"?he:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(e,n){return new ga({in:e,out:n,typeName:fe.ZodPipeline})}}class ya extends xe{_parse(e){const n=this._def.innerType._parse(e),r=o=>(ra(o)&&(o.value=Object.freeze(o.value)),o);return oa(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}ya.create=(t,e)=>new ya({innerType:t,typeName:fe.ZodReadonly,...ge(e)}),Ye.lazycreate;var fe;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(fe||(fe={})),Tn.create,xr.create,Yu.create,po.create,Hu.create,Si.create,Wu.create,sa.create,aa.create,Uu.create,mo.create,Xn.create,Gu.create,Yt.create,Ye.create,Ye.strictCreate,la.create,Ku.create,ca.create,Cn.create,ua.create,Zu.create,yo.create,Ti.create,fa.create,da.create,wr.create,ha.create,Ei.create,An.create,_n.create,Sr.create,An.createWithPreprocess,ga.create;const uD={sort:(t,e)=>t.localeCompare(e),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},Yv=t=>{const e=new FormData(t),n=new URLSearchParams(e);return Gk.parse(n.toString(),uD)},Xv=t=>t.replace("[",".").replace("]","").split("."),Xu=(t,e)=>Xv(t).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o instanceof Yt?o.element:o},e),va=t=>t.type==="checkbox"?t.checked:t.type==="number"?t.valueAsNumber:t.value,fD=t=>{const[e,n]=b.useState(null),r=b.useRef({}),o=(l,c)=>{const u=Xu(l,t);return{...c,name:l,id:l,error:e==null?void 0:e[l],ref:f=>{f!==null&&(r.current[l]={element:f,schema:u})}}},i=(l,c)=>{const u=Xu(l,t);return{...c,name:l,id:l,type:Mo.instance(u,xr)?"number":(c==null?void 0:c.type)??"text",error:e==null?void 0:e[l],ref:f=>{f!==null&&(r.current[l]={element:f,schema:u})}}};b.useEffect(()=>{const l=Object.values(r.current).map(u=>{const f=u.schema.safeParse(va(u.element)),d=p=>{const m=u.schema.safeParse(va(p.target)),g=u.element,v=g.name;if(m.success)return g.setCustomValidity(""),n(x=>{const{[v]:y,...S}=x||{};return S===null||Mo.empty(S)?null:S});if(g.required){const x=m.error.issues[0].message;g.setCustomValidity(x),n(y=>({...y,[v]:x}))}},h=u.element.tagName==="INPUT"?"blur":"change";return u.element.addEventListener(h,d),{input:u,hasInitialError:u.element.required?!f.success:!1,unsubscribe:()=>u.element.removeEventListener(h,d)}});return l.some(u=>u.hasInitialError)&&n(u=>u===null?{}:u),()=>l.forEach(u=>u.unsubscribe())});const s=b.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget,f=Object.values(r.current).reduce((h,p)=>{const m=p.element,g=p.schema.safeParse(va(m));if(g.success)return h;const v=g.error.issues[0].message;return m.setAttribute("data-initialized","true"),{...h,[m.name]:v}},{}),d=Mo.empty(f)?null:{};n(d),l==null||l({form:u,errors:d||{}})},[]),a=b.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget;let f=Yv(u);Array.from(u.elements).forEach(d=>{if(d.tagName==="SELECT"){const h=d;f=oh(f,h.name,h.value)}if(d.tagName==="INPUT"){const h=d;f=oh(f,h.name,va(h))}}),l({form:u,json:f,event:c,reset:()=>dp(u)})},[]);return{input:i,select:o,onSubmit:a,errors:e,onInvalid:s,disabled:e!==null}},dD={name:"dark",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{pill:"2rem",card:"0.75rem"},colors:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 9%)",accent:"hsla(199, 89%, 54%)",disabled:"hsla(240, 4%, 33%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 14%, 35%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 21%, 27%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)"},danger:{DEFAULT:"hsla(358, 75%, 59%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(210, 40%, 98%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{background:"hsla(0, 0%, 14%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 15%)"},table:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"}}},hD={name:"light",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{pill:"2rem",card:"0.75rem"},colors:{foreground:"hsla(210, 14%, 27%)",background:"hsla(210, 34%, 96%)",accent:"hsla(199, 89%, 54%)",disabled:"hsla(240, 4%, 33%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 14%, 35%)",subtle:"hsla(210, 27%, 95%)",hover:"hsla(210, 21%, 27%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(210, 34%, 96%)"},input:{border:"hsla(218, 22%, 80%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 15%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"}}},pD={cssVariable:(t,e,n)=>`var(--${n})`,rgba:t=>`rgba(${t})`,rgb:t=>`rgb(${t})`,hsl:t=>`hsl(${t})`,hsla:t=>`hsla(${t})`,hex:t=>t,raw:t=>t,formatWithVar:t=>(e,n,r)=>`${t}(var(--${r}), <alpha-value>)`},Ci=(t,e,n="",r="")=>Object.entries(t).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(e(s,l,a))}return o.concat(Ci(s,e,n,a))},[]),Jv=(t,e,n="",r="")=>Object.entries(t).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:e(s,i,a)}}return{...o,[i]:Jv(s,e,n,a)}},{}),Qv={default:t=>`:root { ${t} }`,dark:t=>`html.dark {${t}}`},Ju=(t,e)=>{const n=e.value||((o,i)=>i),r=t.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return e.result(r)},mD={default:t=>Ju(t,{result:Qv.default}),dark:t=>Ju(t,{result:Qv.dark})},gD=(t,e)=>{const n=(s,a,l)=>({key:`--${l}`,value:`${s}`}),r=Ci(t.colors,n),o=Ci(t.spacing,n),i=Ci(t.rounded,n);return Ju(r.concat(o,i),{result:s=>`html${e?`.${e}`:""} {${s}}`,value:(s,a)=>a.replace("hsla(","").replace(")","")})};se.Autocomplete=HS,se.Button=zo,se.ButtonGroup=gE,se.Card=sm,se.Checkbox=im,se.ColType=fo,se.Dropdown=gi,se.FileUpload=SE,se.Form=EE,se.Input=us,se.InputFeedback=dh,se.InputField=as,se.Modal=aO,se.Option=ph,se.Polymorph=Bo,se.Select=sr,se.Stats=c1,se.Switch=CE,se.Tab=qI,se.Table=hk,se.Tabs=GI,se.Tag=l1,se.Tooltip=ZI,se.TransferList=s1,se.convertPath=Xv,se.createColumns=$O,se.createDesignTokens=Jv,se.createOptionCols=Pu,se.createStyles=mD,se.createTheme=gD,se.css=_t,se.defaultDarkTheme=dD,se.defaultLightTheme=hD,se.formReset=dp,se.formToJson=Yv,se.getSchemaShape=Xu,se.isReactComponent=RS,se.isReactFC=$S,se.isSsr=Au,se.mergeRefs=El,se.parsers=pD,se.path=kv,se.reduceTokens=Ci,se.useForm=fD,se.usePrevious=hh,se.useReactive=Qy,se.useTablePreferences=BO,se.uuid=ta,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});
|
|
156
156
|
//# sourceMappingURL=index.umd.js.map
|